annotate src/fftw-3.3.5/m4/libtool.m4 @ 83:ae30d91d2ffe

Replace these with versions built using an older toolset (so as to avoid ABI compatibilities when linking on Ubuntu 14.04 for packaging purposes)
author Chris Cannam
date Fri, 07 Feb 2020 11:51:13 +0000
parents 2cd0e3b3e1fd
children
rev   line source
Chris@42 1 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
Chris@42 2 #
Chris@42 3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
Chris@42 4 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
Chris@42 5 # Foundation, Inc.
Chris@42 6 # Written by Gordon Matzigkeit, 1996
Chris@42 7 #
Chris@42 8 # This file is free software; the Free Software Foundation gives
Chris@42 9 # unlimited permission to copy and/or distribute it, with or without
Chris@42 10 # modifications, as long as this notice is preserved.
Chris@42 11
Chris@42 12 m4_define([_LT_COPYING], [dnl
Chris@42 13 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
Chris@42 14 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
Chris@42 15 # Foundation, Inc.
Chris@42 16 # Written by Gordon Matzigkeit, 1996
Chris@42 17 #
Chris@42 18 # This file is part of GNU Libtool.
Chris@42 19 #
Chris@42 20 # GNU Libtool is free software; you can redistribute it and/or
Chris@42 21 # modify it under the terms of the GNU General Public License as
Chris@42 22 # published by the Free Software Foundation; either version 2 of
Chris@42 23 # the License, or (at your option) any later version.
Chris@42 24 #
Chris@42 25 # As a special exception to the GNU General Public License,
Chris@42 26 # if you distribute this file as part of a program or library that
Chris@42 27 # is built using GNU Libtool, you may include this file under the
Chris@42 28 # same distribution terms that you use for the rest of that program.
Chris@42 29 #
Chris@42 30 # GNU Libtool is distributed in the hope that it will be useful,
Chris@42 31 # but WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@42 32 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@42 33 # GNU General Public License for more details.
Chris@42 34 #
Chris@42 35 # You should have received a copy of the GNU General Public License
Chris@42 36 # along with GNU Libtool; see the file COPYING. If not, a copy
Chris@42 37 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
Chris@42 38 # obtained by writing to the Free Software Foundation, Inc.,
Chris@42 39 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Chris@42 40 ])
Chris@42 41
Chris@42 42 # serial 57 LT_INIT
Chris@42 43
Chris@42 44
Chris@42 45 # LT_PREREQ(VERSION)
Chris@42 46 # ------------------
Chris@42 47 # Complain and exit if this libtool version is less that VERSION.
Chris@42 48 m4_defun([LT_PREREQ],
Chris@42 49 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
Chris@42 50 [m4_default([$3],
Chris@42 51 [m4_fatal([Libtool version $1 or higher is required],
Chris@42 52 63)])],
Chris@42 53 [$2])])
Chris@42 54
Chris@42 55
Chris@42 56 # _LT_CHECK_BUILDDIR
Chris@42 57 # ------------------
Chris@42 58 # Complain if the absolute build directory name contains unusual characters
Chris@42 59 m4_defun([_LT_CHECK_BUILDDIR],
Chris@42 60 [case `pwd` in
Chris@42 61 *\ * | *\ *)
Chris@42 62 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
Chris@42 63 esac
Chris@42 64 ])
Chris@42 65
Chris@42 66
Chris@42 67 # LT_INIT([OPTIONS])
Chris@42 68 # ------------------
Chris@42 69 AC_DEFUN([LT_INIT],
Chris@42 70 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
Chris@42 71 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
Chris@42 72 AC_BEFORE([$0], [LT_LANG])dnl
Chris@42 73 AC_BEFORE([$0], [LT_OUTPUT])dnl
Chris@42 74 AC_BEFORE([$0], [LTDL_INIT])dnl
Chris@42 75 m4_require([_LT_CHECK_BUILDDIR])dnl
Chris@42 76
Chris@42 77 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
Chris@42 78 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
Chris@42 79 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
Chris@42 80 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
Chris@42 81 dnl unless we require an AC_DEFUNed macro:
Chris@42 82 AC_REQUIRE([LTOPTIONS_VERSION])dnl
Chris@42 83 AC_REQUIRE([LTSUGAR_VERSION])dnl
Chris@42 84 AC_REQUIRE([LTVERSION_VERSION])dnl
Chris@42 85 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
Chris@42 86 m4_require([_LT_PROG_LTMAIN])dnl
Chris@42 87
Chris@42 88 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
Chris@42 89
Chris@42 90 dnl Parse OPTIONS
Chris@42 91 _LT_SET_OPTIONS([$0], [$1])
Chris@42 92
Chris@42 93 # This can be used to rebuild libtool when needed
Chris@42 94 LIBTOOL_DEPS="$ltmain"
Chris@42 95
Chris@42 96 # Always use our own libtool.
Chris@42 97 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
Chris@42 98 AC_SUBST(LIBTOOL)dnl
Chris@42 99
Chris@42 100 _LT_SETUP
Chris@42 101
Chris@42 102 # Only expand once:
Chris@42 103 m4_define([LT_INIT])
Chris@42 104 ])# LT_INIT
Chris@42 105
Chris@42 106 # Old names:
Chris@42 107 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
Chris@42 108 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
Chris@42 109 dnl aclocal-1.4 backwards compatibility:
Chris@42 110 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
Chris@42 111 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
Chris@42 112
Chris@42 113
Chris@42 114 # _LT_CC_BASENAME(CC)
Chris@42 115 # -------------------
Chris@42 116 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
Chris@42 117 m4_defun([_LT_CC_BASENAME],
Chris@42 118 [for cc_temp in $1""; do
Chris@42 119 case $cc_temp in
Chris@42 120 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
Chris@42 121 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
Chris@42 122 \-*) ;;
Chris@42 123 *) break;;
Chris@42 124 esac
Chris@42 125 done
Chris@42 126 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
Chris@42 127 ])
Chris@42 128
Chris@42 129
Chris@42 130 # _LT_FILEUTILS_DEFAULTS
Chris@42 131 # ----------------------
Chris@42 132 # It is okay to use these file commands and assume they have been set
Chris@42 133 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
Chris@42 134 m4_defun([_LT_FILEUTILS_DEFAULTS],
Chris@42 135 [: ${CP="cp -f"}
Chris@42 136 : ${MV="mv -f"}
Chris@42 137 : ${RM="rm -f"}
Chris@42 138 ])# _LT_FILEUTILS_DEFAULTS
Chris@42 139
Chris@42 140
Chris@42 141 # _LT_SETUP
Chris@42 142 # ---------
Chris@42 143 m4_defun([_LT_SETUP],
Chris@42 144 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@42 145 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
Chris@42 146 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
Chris@42 147 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
Chris@42 148
Chris@42 149 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
Chris@42 150 dnl
Chris@42 151 _LT_DECL([], [host_alias], [0], [The host system])dnl
Chris@42 152 _LT_DECL([], [host], [0])dnl
Chris@42 153 _LT_DECL([], [host_os], [0])dnl
Chris@42 154 dnl
Chris@42 155 _LT_DECL([], [build_alias], [0], [The build system])dnl
Chris@42 156 _LT_DECL([], [build], [0])dnl
Chris@42 157 _LT_DECL([], [build_os], [0])dnl
Chris@42 158 dnl
Chris@42 159 AC_REQUIRE([AC_PROG_CC])dnl
Chris@42 160 AC_REQUIRE([LT_PATH_LD])dnl
Chris@42 161 AC_REQUIRE([LT_PATH_NM])dnl
Chris@42 162 dnl
Chris@42 163 AC_REQUIRE([AC_PROG_LN_S])dnl
Chris@42 164 test -z "$LN_S" && LN_S="ln -s"
Chris@42 165 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
Chris@42 166 dnl
Chris@42 167 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
Chris@42 168 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
Chris@42 169 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
Chris@42 170 dnl
Chris@42 171 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@42 172 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
Chris@42 173 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
Chris@42 174 m4_require([_LT_CMD_RELOAD])dnl
Chris@42 175 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
Chris@42 176 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
Chris@42 177 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
Chris@42 178 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
Chris@42 179 m4_require([_LT_WITH_SYSROOT])dnl
Chris@42 180
Chris@42 181 _LT_CONFIG_LIBTOOL_INIT([
Chris@42 182 # See if we are running on zsh, and set the options which allow our
Chris@42 183 # commands through without removal of \ escapes INIT.
Chris@42 184 if test -n "\${ZSH_VERSION+set}" ; then
Chris@42 185 setopt NO_GLOB_SUBST
Chris@42 186 fi
Chris@42 187 ])
Chris@42 188 if test -n "${ZSH_VERSION+set}" ; then
Chris@42 189 setopt NO_GLOB_SUBST
Chris@42 190 fi
Chris@42 191
Chris@42 192 _LT_CHECK_OBJDIR
Chris@42 193
Chris@42 194 m4_require([_LT_TAG_COMPILER])dnl
Chris@42 195
Chris@42 196 case $host_os in
Chris@42 197 aix3*)
Chris@42 198 # AIX sometimes has problems with the GCC collect2 program. For some
Chris@42 199 # reason, if we set the COLLECT_NAMES environment variable, the problems
Chris@42 200 # vanish in a puff of smoke.
Chris@42 201 if test "X${COLLECT_NAMES+set}" != Xset; then
Chris@42 202 COLLECT_NAMES=
Chris@42 203 export COLLECT_NAMES
Chris@42 204 fi
Chris@42 205 ;;
Chris@42 206 esac
Chris@42 207
Chris@42 208 # Global variables:
Chris@42 209 ofile=libtool
Chris@42 210 can_build_shared=yes
Chris@42 211
Chris@42 212 # All known linkers require a `.a' archive for static linking (except MSVC,
Chris@42 213 # which needs '.lib').
Chris@42 214 libext=a
Chris@42 215
Chris@42 216 with_gnu_ld="$lt_cv_prog_gnu_ld"
Chris@42 217
Chris@42 218 old_CC="$CC"
Chris@42 219 old_CFLAGS="$CFLAGS"
Chris@42 220
Chris@42 221 # Set sane defaults for various variables
Chris@42 222 test -z "$CC" && CC=cc
Chris@42 223 test -z "$LTCC" && LTCC=$CC
Chris@42 224 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
Chris@42 225 test -z "$LD" && LD=ld
Chris@42 226 test -z "$ac_objext" && ac_objext=o
Chris@42 227
Chris@42 228 _LT_CC_BASENAME([$compiler])
Chris@42 229
Chris@42 230 # Only perform the check for file, if the check method requires it
Chris@42 231 test -z "$MAGIC_CMD" && MAGIC_CMD=file
Chris@42 232 case $deplibs_check_method in
Chris@42 233 file_magic*)
Chris@42 234 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
Chris@42 235 _LT_PATH_MAGIC
Chris@42 236 fi
Chris@42 237 ;;
Chris@42 238 esac
Chris@42 239
Chris@42 240 # Use C for the default configuration in the libtool script
Chris@42 241 LT_SUPPORTED_TAG([CC])
Chris@42 242 _LT_LANG_C_CONFIG
Chris@42 243 _LT_LANG_DEFAULT_CONFIG
Chris@42 244 _LT_CONFIG_COMMANDS
Chris@42 245 ])# _LT_SETUP
Chris@42 246
Chris@42 247
Chris@42 248 # _LT_PREPARE_SED_QUOTE_VARS
Chris@42 249 # --------------------------
Chris@42 250 # Define a few sed substitution that help us do robust quoting.
Chris@42 251 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
Chris@42 252 [# Backslashify metacharacters that are still active within
Chris@42 253 # double-quoted strings.
Chris@42 254 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
Chris@42 255
Chris@42 256 # Same as above, but do not quote variable references.
Chris@42 257 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
Chris@42 258
Chris@42 259 # Sed substitution to delay expansion of an escaped shell variable in a
Chris@42 260 # double_quote_subst'ed string.
Chris@42 261 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
Chris@42 262
Chris@42 263 # Sed substitution to delay expansion of an escaped single quote.
Chris@42 264 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
Chris@42 265
Chris@42 266 # Sed substitution to avoid accidental globbing in evaled expressions
Chris@42 267 no_glob_subst='s/\*/\\\*/g'
Chris@42 268 ])
Chris@42 269
Chris@42 270 # _LT_PROG_LTMAIN
Chris@42 271 # ---------------
Chris@42 272 # Note that this code is called both from `configure', and `config.status'
Chris@42 273 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
Chris@42 274 # `config.status' has no value for ac_aux_dir unless we are using Automake,
Chris@42 275 # so we pass a copy along to make sure it has a sensible value anyway.
Chris@42 276 m4_defun([_LT_PROG_LTMAIN],
Chris@42 277 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
Chris@42 278 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
Chris@42 279 ltmain="$ac_aux_dir/ltmain.sh"
Chris@42 280 ])# _LT_PROG_LTMAIN
Chris@42 281
Chris@42 282
Chris@42 283 ## ------------------------------------- ##
Chris@42 284 ## Accumulate code for creating libtool. ##
Chris@42 285 ## ------------------------------------- ##
Chris@42 286
Chris@42 287 # So that we can recreate a full libtool script including additional
Chris@42 288 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
Chris@42 289 # in macros and then make a single call at the end using the `libtool'
Chris@42 290 # label.
Chris@42 291
Chris@42 292
Chris@42 293 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
Chris@42 294 # ----------------------------------------
Chris@42 295 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
Chris@42 296 m4_define([_LT_CONFIG_LIBTOOL_INIT],
Chris@42 297 [m4_ifval([$1],
Chris@42 298 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
Chris@42 299 [$1
Chris@42 300 ])])])
Chris@42 301
Chris@42 302 # Initialize.
Chris@42 303 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
Chris@42 304
Chris@42 305
Chris@42 306 # _LT_CONFIG_LIBTOOL([COMMANDS])
Chris@42 307 # ------------------------------
Chris@42 308 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
Chris@42 309 m4_define([_LT_CONFIG_LIBTOOL],
Chris@42 310 [m4_ifval([$1],
Chris@42 311 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
Chris@42 312 [$1
Chris@42 313 ])])])
Chris@42 314
Chris@42 315 # Initialize.
Chris@42 316 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
Chris@42 317
Chris@42 318
Chris@42 319 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
Chris@42 320 # -----------------------------------------------------
Chris@42 321 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
Chris@42 322 [_LT_CONFIG_LIBTOOL([$1])
Chris@42 323 _LT_CONFIG_LIBTOOL_INIT([$2])
Chris@42 324 ])
Chris@42 325
Chris@42 326
Chris@42 327 # _LT_FORMAT_COMMENT([COMMENT])
Chris@42 328 # -----------------------------
Chris@42 329 # Add leading comment marks to the start of each line, and a trailing
Chris@42 330 # full-stop to the whole comment if one is not present already.
Chris@42 331 m4_define([_LT_FORMAT_COMMENT],
Chris@42 332 [m4_ifval([$1], [
Chris@42 333 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
Chris@42 334 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
Chris@42 335 )])
Chris@42 336
Chris@42 337
Chris@42 338
Chris@42 339 ## ------------------------ ##
Chris@42 340 ## FIXME: Eliminate VARNAME ##
Chris@42 341 ## ------------------------ ##
Chris@42 342
Chris@42 343
Chris@42 344 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
Chris@42 345 # -------------------------------------------------------------------
Chris@42 346 # CONFIGNAME is the name given to the value in the libtool script.
Chris@42 347 # VARNAME is the (base) name used in the configure script.
Chris@42 348 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
Chris@42 349 # VARNAME. Any other value will be used directly.
Chris@42 350 m4_define([_LT_DECL],
Chris@42 351 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
Chris@42 352 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
Chris@42 353 [m4_ifval([$1], [$1], [$2])])
Chris@42 354 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
Chris@42 355 m4_ifval([$4],
Chris@42 356 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
Chris@42 357 lt_dict_add_subkey([lt_decl_dict], [$2],
Chris@42 358 [tagged?], [m4_ifval([$5], [yes], [no])])])
Chris@42 359 ])
Chris@42 360
Chris@42 361
Chris@42 362 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
Chris@42 363 # --------------------------------------------------------
Chris@42 364 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
Chris@42 365
Chris@42 366
Chris@42 367 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
Chris@42 368 # ------------------------------------------------
Chris@42 369 m4_define([lt_decl_tag_varnames],
Chris@42 370 [_lt_decl_filter([tagged?], [yes], $@)])
Chris@42 371
Chris@42 372
Chris@42 373 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
Chris@42 374 # ---------------------------------------------------------
Chris@42 375 m4_define([_lt_decl_filter],
Chris@42 376 [m4_case([$#],
Chris@42 377 [0], [m4_fatal([$0: too few arguments: $#])],
Chris@42 378 [1], [m4_fatal([$0: too few arguments: $#: $1])],
Chris@42 379 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
Chris@42 380 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
Chris@42 381 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
Chris@42 382 ])
Chris@42 383
Chris@42 384
Chris@42 385 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
Chris@42 386 # --------------------------------------------------
Chris@42 387 m4_define([lt_decl_quote_varnames],
Chris@42 388 [_lt_decl_filter([value], [1], $@)])
Chris@42 389
Chris@42 390
Chris@42 391 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
Chris@42 392 # ---------------------------------------------------
Chris@42 393 m4_define([lt_decl_dquote_varnames],
Chris@42 394 [_lt_decl_filter([value], [2], $@)])
Chris@42 395
Chris@42 396
Chris@42 397 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
Chris@42 398 # ---------------------------------------------------
Chris@42 399 m4_define([lt_decl_varnames_tagged],
Chris@42 400 [m4_assert([$# <= 2])dnl
Chris@42 401 _$0(m4_quote(m4_default([$1], [[, ]])),
Chris@42 402 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
Chris@42 403 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
Chris@42 404 m4_define([_lt_decl_varnames_tagged],
Chris@42 405 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
Chris@42 406
Chris@42 407
Chris@42 408 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
Chris@42 409 # ------------------------------------------------
Chris@42 410 m4_define([lt_decl_all_varnames],
Chris@42 411 [_$0(m4_quote(m4_default([$1], [[, ]])),
Chris@42 412 m4_if([$2], [],
Chris@42 413 m4_quote(lt_decl_varnames),
Chris@42 414 m4_quote(m4_shift($@))))[]dnl
Chris@42 415 ])
Chris@42 416 m4_define([_lt_decl_all_varnames],
Chris@42 417 [lt_join($@, lt_decl_varnames_tagged([$1],
Chris@42 418 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
Chris@42 419 ])
Chris@42 420
Chris@42 421
Chris@42 422 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
Chris@42 423 # ------------------------------------
Chris@42 424 # Quote a variable value, and forward it to `config.status' so that its
Chris@42 425 # declaration there will have the same value as in `configure'. VARNAME
Chris@42 426 # must have a single quote delimited value for this to work.
Chris@42 427 m4_define([_LT_CONFIG_STATUS_DECLARE],
Chris@42 428 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
Chris@42 429
Chris@42 430
Chris@42 431 # _LT_CONFIG_STATUS_DECLARATIONS
Chris@42 432 # ------------------------------
Chris@42 433 # We delimit libtool config variables with single quotes, so when
Chris@42 434 # we write them to config.status, we have to be sure to quote all
Chris@42 435 # embedded single quotes properly. In configure, this macro expands
Chris@42 436 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
Chris@42 437 #
Chris@42 438 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
Chris@42 439 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
Chris@42 440 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
Chris@42 441 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
Chris@42 442
Chris@42 443
Chris@42 444 # _LT_LIBTOOL_TAGS
Chris@42 445 # ----------------
Chris@42 446 # Output comment and list of tags supported by the script
Chris@42 447 m4_defun([_LT_LIBTOOL_TAGS],
Chris@42 448 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
Chris@42 449 available_tags="_LT_TAGS"dnl
Chris@42 450 ])
Chris@42 451
Chris@42 452
Chris@42 453 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
Chris@42 454 # -----------------------------------
Chris@42 455 # Extract the dictionary values for VARNAME (optionally with TAG) and
Chris@42 456 # expand to a commented shell variable setting:
Chris@42 457 #
Chris@42 458 # # Some comment about what VAR is for.
Chris@42 459 # visible_name=$lt_internal_name
Chris@42 460 m4_define([_LT_LIBTOOL_DECLARE],
Chris@42 461 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
Chris@42 462 [description])))[]dnl
Chris@42 463 m4_pushdef([_libtool_name],
Chris@42 464 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
Chris@42 465 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
Chris@42 466 [0], [_libtool_name=[$]$1],
Chris@42 467 [1], [_libtool_name=$lt_[]$1],
Chris@42 468 [2], [_libtool_name=$lt_[]$1],
Chris@42 469 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
Chris@42 470 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
Chris@42 471 ])
Chris@42 472
Chris@42 473
Chris@42 474 # _LT_LIBTOOL_CONFIG_VARS
Chris@42 475 # -----------------------
Chris@42 476 # Produce commented declarations of non-tagged libtool config variables
Chris@42 477 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
Chris@42 478 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
Chris@42 479 # section) are produced by _LT_LIBTOOL_TAG_VARS.
Chris@42 480 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
Chris@42 481 [m4_foreach([_lt_var],
Chris@42 482 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
Chris@42 483 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
Chris@42 484
Chris@42 485
Chris@42 486 # _LT_LIBTOOL_TAG_VARS(TAG)
Chris@42 487 # -------------------------
Chris@42 488 m4_define([_LT_LIBTOOL_TAG_VARS],
Chris@42 489 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
Chris@42 490 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
Chris@42 491
Chris@42 492
Chris@42 493 # _LT_TAGVAR(VARNAME, [TAGNAME])
Chris@42 494 # ------------------------------
Chris@42 495 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
Chris@42 496
Chris@42 497
Chris@42 498 # _LT_CONFIG_COMMANDS
Chris@42 499 # -------------------
Chris@42 500 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
Chris@42 501 # variables for single and double quote escaping we saved from calls
Chris@42 502 # to _LT_DECL, we can put quote escaped variables declarations
Chris@42 503 # into `config.status', and then the shell code to quote escape them in
Chris@42 504 # for loops in `config.status'. Finally, any additional code accumulated
Chris@42 505 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
Chris@42 506 m4_defun([_LT_CONFIG_COMMANDS],
Chris@42 507 [AC_PROVIDE_IFELSE([LT_OUTPUT],
Chris@42 508 dnl If the libtool generation code has been placed in $CONFIG_LT,
Chris@42 509 dnl instead of duplicating it all over again into config.status,
Chris@42 510 dnl then we will have config.status run $CONFIG_LT later, so it
Chris@42 511 dnl needs to know what name is stored there:
Chris@42 512 [AC_CONFIG_COMMANDS([libtool],
Chris@42 513 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
Chris@42 514 dnl If the libtool generation code is destined for config.status,
Chris@42 515 dnl expand the accumulated commands and init code now:
Chris@42 516 [AC_CONFIG_COMMANDS([libtool],
Chris@42 517 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
Chris@42 518 ])#_LT_CONFIG_COMMANDS
Chris@42 519
Chris@42 520
Chris@42 521 # Initialize.
Chris@42 522 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
Chris@42 523 [
Chris@42 524
Chris@42 525 # The HP-UX ksh and POSIX shell print the target directory to stdout
Chris@42 526 # if CDPATH is set.
Chris@42 527 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
Chris@42 528
Chris@42 529 sed_quote_subst='$sed_quote_subst'
Chris@42 530 double_quote_subst='$double_quote_subst'
Chris@42 531 delay_variable_subst='$delay_variable_subst'
Chris@42 532 _LT_CONFIG_STATUS_DECLARATIONS
Chris@42 533 LTCC='$LTCC'
Chris@42 534 LTCFLAGS='$LTCFLAGS'
Chris@42 535 compiler='$compiler_DEFAULT'
Chris@42 536
Chris@42 537 # A function that is used when there is no print builtin or printf.
Chris@42 538 func_fallback_echo ()
Chris@42 539 {
Chris@42 540 eval 'cat <<_LTECHO_EOF
Chris@42 541 \$[]1
Chris@42 542 _LTECHO_EOF'
Chris@42 543 }
Chris@42 544
Chris@42 545 # Quote evaled strings.
Chris@42 546 for var in lt_decl_all_varnames([[ \
Chris@42 547 ]], lt_decl_quote_varnames); do
Chris@42 548 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
Chris@42 549 *[[\\\\\\\`\\"\\\$]]*)
Chris@42 550 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
Chris@42 551 ;;
Chris@42 552 *)
Chris@42 553 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
Chris@42 554 ;;
Chris@42 555 esac
Chris@42 556 done
Chris@42 557
Chris@42 558 # Double-quote double-evaled strings.
Chris@42 559 for var in lt_decl_all_varnames([[ \
Chris@42 560 ]], lt_decl_dquote_varnames); do
Chris@42 561 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
Chris@42 562 *[[\\\\\\\`\\"\\\$]]*)
Chris@42 563 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
Chris@42 564 ;;
Chris@42 565 *)
Chris@42 566 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
Chris@42 567 ;;
Chris@42 568 esac
Chris@42 569 done
Chris@42 570
Chris@42 571 _LT_OUTPUT_LIBTOOL_INIT
Chris@42 572 ])
Chris@42 573
Chris@42 574 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
Chris@42 575 # ------------------------------------
Chris@42 576 # Generate a child script FILE with all initialization necessary to
Chris@42 577 # reuse the environment learned by the parent script, and make the
Chris@42 578 # file executable. If COMMENT is supplied, it is inserted after the
Chris@42 579 # `#!' sequence but before initialization text begins. After this
Chris@42 580 # macro, additional text can be appended to FILE to form the body of
Chris@42 581 # the child script. The macro ends with non-zero status if the
Chris@42 582 # file could not be fully written (such as if the disk is full).
Chris@42 583 m4_ifdef([AS_INIT_GENERATED],
Chris@42 584 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
Chris@42 585 [m4_defun([_LT_GENERATED_FILE_INIT],
Chris@42 586 [m4_require([AS_PREPARE])]dnl
Chris@42 587 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
Chris@42 588 [lt_write_fail=0
Chris@42 589 cat >$1 <<_ASEOF || lt_write_fail=1
Chris@42 590 #! $SHELL
Chris@42 591 # Generated by $as_me.
Chris@42 592 $2
Chris@42 593 SHELL=\${CONFIG_SHELL-$SHELL}
Chris@42 594 export SHELL
Chris@42 595 _ASEOF
Chris@42 596 cat >>$1 <<\_ASEOF || lt_write_fail=1
Chris@42 597 AS_SHELL_SANITIZE
Chris@42 598 _AS_PREPARE
Chris@42 599 exec AS_MESSAGE_FD>&1
Chris@42 600 _ASEOF
Chris@42 601 test $lt_write_fail = 0 && chmod +x $1[]dnl
Chris@42 602 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
Chris@42 603
Chris@42 604 # LT_OUTPUT
Chris@42 605 # ---------
Chris@42 606 # This macro allows early generation of the libtool script (before
Chris@42 607 # AC_OUTPUT is called), incase it is used in configure for compilation
Chris@42 608 # tests.
Chris@42 609 AC_DEFUN([LT_OUTPUT],
Chris@42 610 [: ${CONFIG_LT=./config.lt}
Chris@42 611 AC_MSG_NOTICE([creating $CONFIG_LT])
Chris@42 612 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
Chris@42 613 [# Run this file to recreate a libtool stub with the current configuration.])
Chris@42 614
Chris@42 615 cat >>"$CONFIG_LT" <<\_LTEOF
Chris@42 616 lt_cl_silent=false
Chris@42 617 exec AS_MESSAGE_LOG_FD>>config.log
Chris@42 618 {
Chris@42 619 echo
Chris@42 620 AS_BOX([Running $as_me.])
Chris@42 621 } >&AS_MESSAGE_LOG_FD
Chris@42 622
Chris@42 623 lt_cl_help="\
Chris@42 624 \`$as_me' creates a local libtool stub from the current configuration,
Chris@42 625 for use in further configure time tests before the real libtool is
Chris@42 626 generated.
Chris@42 627
Chris@42 628 Usage: $[0] [[OPTIONS]]
Chris@42 629
Chris@42 630 -h, --help print this help, then exit
Chris@42 631 -V, --version print version number, then exit
Chris@42 632 -q, --quiet do not print progress messages
Chris@42 633 -d, --debug don't remove temporary files
Chris@42 634
Chris@42 635 Report bugs to <bug-libtool@gnu.org>."
Chris@42 636
Chris@42 637 lt_cl_version="\
Chris@42 638 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
Chris@42 639 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
Chris@42 640 configured by $[0], generated by m4_PACKAGE_STRING.
Chris@42 641
Chris@42 642 Copyright (C) 2011 Free Software Foundation, Inc.
Chris@42 643 This config.lt script is free software; the Free Software Foundation
Chris@42 644 gives unlimited permision to copy, distribute and modify it."
Chris@42 645
Chris@42 646 while test $[#] != 0
Chris@42 647 do
Chris@42 648 case $[1] in
Chris@42 649 --version | --v* | -V )
Chris@42 650 echo "$lt_cl_version"; exit 0 ;;
Chris@42 651 --help | --h* | -h )
Chris@42 652 echo "$lt_cl_help"; exit 0 ;;
Chris@42 653 --debug | --d* | -d )
Chris@42 654 debug=: ;;
Chris@42 655 --quiet | --q* | --silent | --s* | -q )
Chris@42 656 lt_cl_silent=: ;;
Chris@42 657
Chris@42 658 -*) AC_MSG_ERROR([unrecognized option: $[1]
Chris@42 659 Try \`$[0] --help' for more information.]) ;;
Chris@42 660
Chris@42 661 *) AC_MSG_ERROR([unrecognized argument: $[1]
Chris@42 662 Try \`$[0] --help' for more information.]) ;;
Chris@42 663 esac
Chris@42 664 shift
Chris@42 665 done
Chris@42 666
Chris@42 667 if $lt_cl_silent; then
Chris@42 668 exec AS_MESSAGE_FD>/dev/null
Chris@42 669 fi
Chris@42 670 _LTEOF
Chris@42 671
Chris@42 672 cat >>"$CONFIG_LT" <<_LTEOF
Chris@42 673 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
Chris@42 674 _LTEOF
Chris@42 675
Chris@42 676 cat >>"$CONFIG_LT" <<\_LTEOF
Chris@42 677 AC_MSG_NOTICE([creating $ofile])
Chris@42 678 _LT_OUTPUT_LIBTOOL_COMMANDS
Chris@42 679 AS_EXIT(0)
Chris@42 680 _LTEOF
Chris@42 681 chmod +x "$CONFIG_LT"
Chris@42 682
Chris@42 683 # configure is writing to config.log, but config.lt does its own redirection,
Chris@42 684 # appending to config.log, which fails on DOS, as config.log is still kept
Chris@42 685 # open by configure. Here we exec the FD to /dev/null, effectively closing
Chris@42 686 # config.log, so it can be properly (re)opened and appended to by config.lt.
Chris@42 687 lt_cl_success=:
Chris@42 688 test "$silent" = yes &&
Chris@42 689 lt_config_lt_args="$lt_config_lt_args --quiet"
Chris@42 690 exec AS_MESSAGE_LOG_FD>/dev/null
Chris@42 691 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
Chris@42 692 exec AS_MESSAGE_LOG_FD>>config.log
Chris@42 693 $lt_cl_success || AS_EXIT(1)
Chris@42 694 ])# LT_OUTPUT
Chris@42 695
Chris@42 696
Chris@42 697 # _LT_CONFIG(TAG)
Chris@42 698 # ---------------
Chris@42 699 # If TAG is the built-in tag, create an initial libtool script with a
Chris@42 700 # default configuration from the untagged config vars. Otherwise add code
Chris@42 701 # to config.status for appending the configuration named by TAG from the
Chris@42 702 # matching tagged config vars.
Chris@42 703 m4_defun([_LT_CONFIG],
Chris@42 704 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@42 705 _LT_CONFIG_SAVE_COMMANDS([
Chris@42 706 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
Chris@42 707 m4_if(_LT_TAG, [C], [
Chris@42 708 # See if we are running on zsh, and set the options which allow our
Chris@42 709 # commands through without removal of \ escapes.
Chris@42 710 if test -n "${ZSH_VERSION+set}" ; then
Chris@42 711 setopt NO_GLOB_SUBST
Chris@42 712 fi
Chris@42 713
Chris@42 714 cfgfile="${ofile}T"
Chris@42 715 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
Chris@42 716 $RM "$cfgfile"
Chris@42 717
Chris@42 718 cat <<_LT_EOF >> "$cfgfile"
Chris@42 719 #! $SHELL
Chris@42 720
Chris@42 721 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
Chris@42 722 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
Chris@42 723 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
Chris@42 724 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
Chris@42 725 #
Chris@42 726 _LT_COPYING
Chris@42 727 _LT_LIBTOOL_TAGS
Chris@42 728
Chris@42 729 # ### BEGIN LIBTOOL CONFIG
Chris@42 730 _LT_LIBTOOL_CONFIG_VARS
Chris@42 731 _LT_LIBTOOL_TAG_VARS
Chris@42 732 # ### END LIBTOOL CONFIG
Chris@42 733
Chris@42 734 _LT_EOF
Chris@42 735
Chris@42 736 case $host_os in
Chris@42 737 aix3*)
Chris@42 738 cat <<\_LT_EOF >> "$cfgfile"
Chris@42 739 # AIX sometimes has problems with the GCC collect2 program. For some
Chris@42 740 # reason, if we set the COLLECT_NAMES environment variable, the problems
Chris@42 741 # vanish in a puff of smoke.
Chris@42 742 if test "X${COLLECT_NAMES+set}" != Xset; then
Chris@42 743 COLLECT_NAMES=
Chris@42 744 export COLLECT_NAMES
Chris@42 745 fi
Chris@42 746 _LT_EOF
Chris@42 747 ;;
Chris@42 748 esac
Chris@42 749
Chris@42 750 _LT_PROG_LTMAIN
Chris@42 751
Chris@42 752 # We use sed instead of cat because bash on DJGPP gets confused if
Chris@42 753 # if finds mixed CR/LF and LF-only lines. Since sed operates in
Chris@42 754 # text mode, it properly converts lines to CR/LF. This bash problem
Chris@42 755 # is reportedly fixed, but why not run on old versions too?
Chris@42 756 sed '$q' "$ltmain" >> "$cfgfile" \
Chris@42 757 || (rm -f "$cfgfile"; exit 1)
Chris@42 758
Chris@42 759 _LT_PROG_REPLACE_SHELLFNS
Chris@42 760
Chris@42 761 mv -f "$cfgfile" "$ofile" ||
Chris@42 762 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
Chris@42 763 chmod +x "$ofile"
Chris@42 764 ],
Chris@42 765 [cat <<_LT_EOF >> "$ofile"
Chris@42 766
Chris@42 767 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
Chris@42 768 dnl in a comment (ie after a #).
Chris@42 769 # ### BEGIN LIBTOOL TAG CONFIG: $1
Chris@42 770 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
Chris@42 771 # ### END LIBTOOL TAG CONFIG: $1
Chris@42 772 _LT_EOF
Chris@42 773 ])dnl /m4_if
Chris@42 774 ],
Chris@42 775 [m4_if([$1], [], [
Chris@42 776 PACKAGE='$PACKAGE'
Chris@42 777 VERSION='$VERSION'
Chris@42 778 TIMESTAMP='$TIMESTAMP'
Chris@42 779 RM='$RM'
Chris@42 780 ofile='$ofile'], [])
Chris@42 781 ])dnl /_LT_CONFIG_SAVE_COMMANDS
Chris@42 782 ])# _LT_CONFIG
Chris@42 783
Chris@42 784
Chris@42 785 # LT_SUPPORTED_TAG(TAG)
Chris@42 786 # ---------------------
Chris@42 787 # Trace this macro to discover what tags are supported by the libtool
Chris@42 788 # --tag option, using:
Chris@42 789 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
Chris@42 790 AC_DEFUN([LT_SUPPORTED_TAG], [])
Chris@42 791
Chris@42 792
Chris@42 793 # C support is built-in for now
Chris@42 794 m4_define([_LT_LANG_C_enabled], [])
Chris@42 795 m4_define([_LT_TAGS], [])
Chris@42 796
Chris@42 797
Chris@42 798 # LT_LANG(LANG)
Chris@42 799 # -------------
Chris@42 800 # Enable libtool support for the given language if not already enabled.
Chris@42 801 AC_DEFUN([LT_LANG],
Chris@42 802 [AC_BEFORE([$0], [LT_OUTPUT])dnl
Chris@42 803 m4_case([$1],
Chris@42 804 [C], [_LT_LANG(C)],
Chris@42 805 [C++], [_LT_LANG(CXX)],
Chris@42 806 [Go], [_LT_LANG(GO)],
Chris@42 807 [Java], [_LT_LANG(GCJ)],
Chris@42 808 [Fortran 77], [_LT_LANG(F77)],
Chris@42 809 [Fortran], [_LT_LANG(FC)],
Chris@42 810 [Windows Resource], [_LT_LANG(RC)],
Chris@42 811 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
Chris@42 812 [_LT_LANG($1)],
Chris@42 813 [m4_fatal([$0: unsupported language: "$1"])])])dnl
Chris@42 814 ])# LT_LANG
Chris@42 815
Chris@42 816
Chris@42 817 # _LT_LANG(LANGNAME)
Chris@42 818 # ------------------
Chris@42 819 m4_defun([_LT_LANG],
Chris@42 820 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
Chris@42 821 [LT_SUPPORTED_TAG([$1])dnl
Chris@42 822 m4_append([_LT_TAGS], [$1 ])dnl
Chris@42 823 m4_define([_LT_LANG_]$1[_enabled], [])dnl
Chris@42 824 _LT_LANG_$1_CONFIG($1)])dnl
Chris@42 825 ])# _LT_LANG
Chris@42 826
Chris@42 827
Chris@42 828 m4_ifndef([AC_PROG_GO], [
Chris@42 829 ############################################################
Chris@42 830 # NOTE: This macro has been submitted for inclusion into #
Chris@42 831 # GNU Autoconf as AC_PROG_GO. When it is available in #
Chris@42 832 # a released version of Autoconf we should remove this #
Chris@42 833 # macro and use it instead. #
Chris@42 834 ############################################################
Chris@42 835 m4_defun([AC_PROG_GO],
Chris@42 836 [AC_LANG_PUSH(Go)dnl
Chris@42 837 AC_ARG_VAR([GOC], [Go compiler command])dnl
Chris@42 838 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
Chris@42 839 _AC_ARG_VAR_LDFLAGS()dnl
Chris@42 840 AC_CHECK_TOOL(GOC, gccgo)
Chris@42 841 if test -z "$GOC"; then
Chris@42 842 if test -n "$ac_tool_prefix"; then
Chris@42 843 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
Chris@42 844 fi
Chris@42 845 fi
Chris@42 846 if test -z "$GOC"; then
Chris@42 847 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
Chris@42 848 fi
Chris@42 849 ])#m4_defun
Chris@42 850 ])#m4_ifndef
Chris@42 851
Chris@42 852
Chris@42 853 # _LT_LANG_DEFAULT_CONFIG
Chris@42 854 # -----------------------
Chris@42 855 m4_defun([_LT_LANG_DEFAULT_CONFIG],
Chris@42 856 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
Chris@42 857 [LT_LANG(CXX)],
Chris@42 858 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
Chris@42 859
Chris@42 860 AC_PROVIDE_IFELSE([AC_PROG_F77],
Chris@42 861 [LT_LANG(F77)],
Chris@42 862 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
Chris@42 863
Chris@42 864 AC_PROVIDE_IFELSE([AC_PROG_FC],
Chris@42 865 [LT_LANG(FC)],
Chris@42 866 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
Chris@42 867
Chris@42 868 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
Chris@42 869 dnl pulling things in needlessly.
Chris@42 870 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
Chris@42 871 [LT_LANG(GCJ)],
Chris@42 872 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
Chris@42 873 [LT_LANG(GCJ)],
Chris@42 874 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
Chris@42 875 [LT_LANG(GCJ)],
Chris@42 876 [m4_ifdef([AC_PROG_GCJ],
Chris@42 877 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
Chris@42 878 m4_ifdef([A][M_PROG_GCJ],
Chris@42 879 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
Chris@42 880 m4_ifdef([LT_PROG_GCJ],
Chris@42 881 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
Chris@42 882
Chris@42 883 AC_PROVIDE_IFELSE([AC_PROG_GO],
Chris@42 884 [LT_LANG(GO)],
Chris@42 885 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
Chris@42 886
Chris@42 887 AC_PROVIDE_IFELSE([LT_PROG_RC],
Chris@42 888 [LT_LANG(RC)],
Chris@42 889 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
Chris@42 890 ])# _LT_LANG_DEFAULT_CONFIG
Chris@42 891
Chris@42 892 # Obsolete macros:
Chris@42 893 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
Chris@42 894 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
Chris@42 895 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
Chris@42 896 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
Chris@42 897 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
Chris@42 898 dnl aclocal-1.4 backwards compatibility:
Chris@42 899 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
Chris@42 900 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
Chris@42 901 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
Chris@42 902 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
Chris@42 903 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
Chris@42 904
Chris@42 905
Chris@42 906 # _LT_TAG_COMPILER
Chris@42 907 # ----------------
Chris@42 908 m4_defun([_LT_TAG_COMPILER],
Chris@42 909 [AC_REQUIRE([AC_PROG_CC])dnl
Chris@42 910
Chris@42 911 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
Chris@42 912 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
Chris@42 913 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
Chris@42 914 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
Chris@42 915
Chris@42 916 # If no C compiler was specified, use CC.
Chris@42 917 LTCC=${LTCC-"$CC"}
Chris@42 918
Chris@42 919 # If no C compiler flags were specified, use CFLAGS.
Chris@42 920 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
Chris@42 921
Chris@42 922 # Allow CC to be a program name with arguments.
Chris@42 923 compiler=$CC
Chris@42 924 ])# _LT_TAG_COMPILER
Chris@42 925
Chris@42 926
Chris@42 927 # _LT_COMPILER_BOILERPLATE
Chris@42 928 # ------------------------
Chris@42 929 # Check for compiler boilerplate output or warnings with
Chris@42 930 # the simple compiler test code.
Chris@42 931 m4_defun([_LT_COMPILER_BOILERPLATE],
Chris@42 932 [m4_require([_LT_DECL_SED])dnl
Chris@42 933 ac_outfile=conftest.$ac_objext
Chris@42 934 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
Chris@42 935 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
Chris@42 936 _lt_compiler_boilerplate=`cat conftest.err`
Chris@42 937 $RM conftest*
Chris@42 938 ])# _LT_COMPILER_BOILERPLATE
Chris@42 939
Chris@42 940
Chris@42 941 # _LT_LINKER_BOILERPLATE
Chris@42 942 # ----------------------
Chris@42 943 # Check for linker boilerplate output or warnings with
Chris@42 944 # the simple link test code.
Chris@42 945 m4_defun([_LT_LINKER_BOILERPLATE],
Chris@42 946 [m4_require([_LT_DECL_SED])dnl
Chris@42 947 ac_outfile=conftest.$ac_objext
Chris@42 948 echo "$lt_simple_link_test_code" >conftest.$ac_ext
Chris@42 949 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
Chris@42 950 _lt_linker_boilerplate=`cat conftest.err`
Chris@42 951 $RM -r conftest*
Chris@42 952 ])# _LT_LINKER_BOILERPLATE
Chris@42 953
Chris@42 954 # _LT_REQUIRED_DARWIN_CHECKS
Chris@42 955 # -------------------------
Chris@42 956 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
Chris@42 957 case $host_os in
Chris@42 958 rhapsody* | darwin*)
Chris@42 959 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
Chris@42 960 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
Chris@42 961 AC_CHECK_TOOL([LIPO], [lipo], [:])
Chris@42 962 AC_CHECK_TOOL([OTOOL], [otool], [:])
Chris@42 963 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
Chris@42 964 _LT_DECL([], [DSYMUTIL], [1],
Chris@42 965 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
Chris@42 966 _LT_DECL([], [NMEDIT], [1],
Chris@42 967 [Tool to change global to local symbols on Mac OS X])
Chris@42 968 _LT_DECL([], [LIPO], [1],
Chris@42 969 [Tool to manipulate fat objects and archives on Mac OS X])
Chris@42 970 _LT_DECL([], [OTOOL], [1],
Chris@42 971 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
Chris@42 972 _LT_DECL([], [OTOOL64], [1],
Chris@42 973 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
Chris@42 974
Chris@42 975 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
Chris@42 976 [lt_cv_apple_cc_single_mod=no
Chris@42 977 if test -z "${LT_MULTI_MODULE}"; then
Chris@42 978 # By default we will add the -single_module flag. You can override
Chris@42 979 # by either setting the environment variable LT_MULTI_MODULE
Chris@42 980 # non-empty at configure time, or by adding -multi_module to the
Chris@42 981 # link flags.
Chris@42 982 rm -rf libconftest.dylib*
Chris@42 983 echo "int foo(void){return 1;}" > conftest.c
Chris@42 984 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
Chris@42 985 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
Chris@42 986 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
Chris@42 987 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
Chris@42 988 _lt_result=$?
Chris@42 989 # If there is a non-empty error log, and "single_module"
Chris@42 990 # appears in it, assume the flag caused a linker warning
Chris@42 991 if test -s conftest.err && $GREP single_module conftest.err; then
Chris@42 992 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@42 993 # Otherwise, if the output was created with a 0 exit code from
Chris@42 994 # the compiler, it worked.
Chris@42 995 elif test -f libconftest.dylib && test $_lt_result -eq 0; then
Chris@42 996 lt_cv_apple_cc_single_mod=yes
Chris@42 997 else
Chris@42 998 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@42 999 fi
Chris@42 1000 rm -rf libconftest.dylib*
Chris@42 1001 rm -f conftest.*
Chris@42 1002 fi])
Chris@42 1003
Chris@42 1004 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
Chris@42 1005 [lt_cv_ld_exported_symbols_list],
Chris@42 1006 [lt_cv_ld_exported_symbols_list=no
Chris@42 1007 save_LDFLAGS=$LDFLAGS
Chris@42 1008 echo "_main" > conftest.sym
Chris@42 1009 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
Chris@42 1010 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
Chris@42 1011 [lt_cv_ld_exported_symbols_list=yes],
Chris@42 1012 [lt_cv_ld_exported_symbols_list=no])
Chris@42 1013 LDFLAGS="$save_LDFLAGS"
Chris@42 1014 ])
Chris@42 1015
Chris@42 1016 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
Chris@42 1017 [lt_cv_ld_force_load=no
Chris@42 1018 cat > conftest.c << _LT_EOF
Chris@42 1019 int forced_loaded() { return 2;}
Chris@42 1020 _LT_EOF
Chris@42 1021 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
Chris@42 1022 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
Chris@42 1023 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
Chris@42 1024 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
Chris@42 1025 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
Chris@42 1026 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
Chris@42 1027 cat > conftest.c << _LT_EOF
Chris@42 1028 int main() { return 0;}
Chris@42 1029 _LT_EOF
Chris@42 1030 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
Chris@42 1031 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
Chris@42 1032 _lt_result=$?
Chris@42 1033 if test -s conftest.err && $GREP force_load conftest.err; then
Chris@42 1034 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@42 1035 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
Chris@42 1036 lt_cv_ld_force_load=yes
Chris@42 1037 else
Chris@42 1038 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@42 1039 fi
Chris@42 1040 rm -f conftest.err libconftest.a conftest conftest.c
Chris@42 1041 rm -rf conftest.dSYM
Chris@42 1042 ])
Chris@42 1043 case $host_os in
Chris@42 1044 rhapsody* | darwin1.[[012]])
Chris@42 1045 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
Chris@42 1046 darwin1.*)
Chris@42 1047 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
Chris@42 1048 darwin*) # darwin 5.x on
Chris@42 1049 # if running on 10.5 or later, the deployment target defaults
Chris@42 1050 # to the OS version, if on x86, and 10.4, the deployment
Chris@42 1051 # target defaults to 10.4. Don't you love it?
Chris@42 1052 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
Chris@42 1053 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
Chris@42 1054 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
Chris@42 1055 10.[[012]]*)
Chris@42 1056 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
Chris@42 1057 10.*)
Chris@42 1058 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
Chris@42 1059 esac
Chris@42 1060 ;;
Chris@42 1061 esac
Chris@42 1062 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
Chris@42 1063 _lt_dar_single_mod='$single_module'
Chris@42 1064 fi
Chris@42 1065 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
Chris@42 1066 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
Chris@42 1067 else
Chris@42 1068 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
Chris@42 1069 fi
Chris@42 1070 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
Chris@42 1071 _lt_dsymutil='~$DSYMUTIL $lib || :'
Chris@42 1072 else
Chris@42 1073 _lt_dsymutil=
Chris@42 1074 fi
Chris@42 1075 ;;
Chris@42 1076 esac
Chris@42 1077 ])
Chris@42 1078
Chris@42 1079
Chris@42 1080 # _LT_DARWIN_LINKER_FEATURES([TAG])
Chris@42 1081 # ---------------------------------
Chris@42 1082 # Checks for linker and compiler features on darwin
Chris@42 1083 m4_defun([_LT_DARWIN_LINKER_FEATURES],
Chris@42 1084 [
Chris@42 1085 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
Chris@42 1086 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@42 1087 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@42 1088 _LT_TAGVAR(hardcode_automatic, $1)=yes
Chris@42 1089 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
Chris@42 1090 if test "$lt_cv_ld_force_load" = "yes"; then
Chris@42 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@42 1092 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
Chris@42 1093 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
Chris@42 1094 else
Chris@42 1095 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
Chris@42 1096 fi
Chris@42 1097 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@42 1098 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
Chris@42 1099 case $cc_basename in
Chris@42 1100 ifort*) _lt_dar_can_shared=yes ;;
Chris@42 1101 *) _lt_dar_can_shared=$GCC ;;
Chris@42 1102 esac
Chris@42 1103 if test "$_lt_dar_can_shared" = "yes"; then
Chris@42 1104 output_verbose_link_cmd=func_echo_all
Chris@42 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@42 1106 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
Chris@42 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@42 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@42 1109 m4_if([$1], [CXX],
Chris@42 1110 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
Chris@42 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@42 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@42 1113 fi
Chris@42 1114 ],[])
Chris@42 1115 else
Chris@42 1116 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 1117 fi
Chris@42 1118 ])
Chris@42 1119
Chris@42 1120 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
Chris@42 1121 # ----------------------------------
Chris@42 1122 # Links a minimal program and checks the executable
Chris@42 1123 # for the system default hardcoded library path. In most cases,
Chris@42 1124 # this is /usr/lib:/lib, but when the MPI compilers are used
Chris@42 1125 # the location of the communication and MPI libs are included too.
Chris@42 1126 # If we don't find anything, use the default library path according
Chris@42 1127 # to the aix ld manual.
Chris@42 1128 # Store the results from the different compilers for each TAGNAME.
Chris@42 1129 # Allow to override them for all tags through lt_cv_aix_libpath.
Chris@42 1130 m4_defun([_LT_SYS_MODULE_PATH_AIX],
Chris@42 1131 [m4_require([_LT_DECL_SED])dnl
Chris@42 1132 if test "${lt_cv_aix_libpath+set}" = set; then
Chris@42 1133 aix_libpath=$lt_cv_aix_libpath
Chris@42 1134 else
Chris@42 1135 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
Chris@42 1136 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
Chris@42 1137 lt_aix_libpath_sed='[
Chris@42 1138 /Import File Strings/,/^$/ {
Chris@42 1139 /^0/ {
Chris@42 1140 s/^0 *\([^ ]*\) *$/\1/
Chris@42 1141 p
Chris@42 1142 }
Chris@42 1143 }]'
Chris@42 1144 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
Chris@42 1145 # Check for a 64-bit object if we didn't find anything.
Chris@42 1146 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
Chris@42 1147 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
Chris@42 1148 fi],[])
Chris@42 1149 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
Chris@42 1150 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
Chris@42 1151 fi
Chris@42 1152 ])
Chris@42 1153 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
Chris@42 1154 fi
Chris@42 1155 ])# _LT_SYS_MODULE_PATH_AIX
Chris@42 1156
Chris@42 1157
Chris@42 1158 # _LT_SHELL_INIT(ARG)
Chris@42 1159 # -------------------
Chris@42 1160 m4_define([_LT_SHELL_INIT],
Chris@42 1161 [m4_divert_text([M4SH-INIT], [$1
Chris@42 1162 ])])# _LT_SHELL_INIT
Chris@42 1163
Chris@42 1164
Chris@42 1165
Chris@42 1166 # _LT_PROG_ECHO_BACKSLASH
Chris@42 1167 # -----------------------
Chris@42 1168 # Find how we can fake an echo command that does not interpret backslash.
Chris@42 1169 # In particular, with Autoconf 2.60 or later we add some code to the start
Chris@42 1170 # of the generated configure script which will find a shell with a builtin
Chris@42 1171 # printf (which we can use as an echo command).
Chris@42 1172 m4_defun([_LT_PROG_ECHO_BACKSLASH],
Chris@42 1173 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
Chris@42 1174 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
Chris@42 1175 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
Chris@42 1176
Chris@42 1177 AC_MSG_CHECKING([how to print strings])
Chris@42 1178 # Test print first, because it will be a builtin if present.
Chris@42 1179 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
Chris@42 1180 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
Chris@42 1181 ECHO='print -r --'
Chris@42 1182 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
Chris@42 1183 ECHO='printf %s\n'
Chris@42 1184 else
Chris@42 1185 # Use this function as a fallback that always works.
Chris@42 1186 func_fallback_echo ()
Chris@42 1187 {
Chris@42 1188 eval 'cat <<_LTECHO_EOF
Chris@42 1189 $[]1
Chris@42 1190 _LTECHO_EOF'
Chris@42 1191 }
Chris@42 1192 ECHO='func_fallback_echo'
Chris@42 1193 fi
Chris@42 1194
Chris@42 1195 # func_echo_all arg...
Chris@42 1196 # Invoke $ECHO with all args, space-separated.
Chris@42 1197 func_echo_all ()
Chris@42 1198 {
Chris@42 1199 $ECHO "$*"
Chris@42 1200 }
Chris@42 1201
Chris@42 1202 case "$ECHO" in
Chris@42 1203 printf*) AC_MSG_RESULT([printf]) ;;
Chris@42 1204 print*) AC_MSG_RESULT([print -r]) ;;
Chris@42 1205 *) AC_MSG_RESULT([cat]) ;;
Chris@42 1206 esac
Chris@42 1207
Chris@42 1208 m4_ifdef([_AS_DETECT_SUGGESTED],
Chris@42 1209 [_AS_DETECT_SUGGESTED([
Chris@42 1210 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
Chris@42 1211 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
Chris@42 1212 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
Chris@42 1213 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
Chris@42 1214 PATH=/empty FPATH=/empty; export PATH FPATH
Chris@42 1215 test "X`printf %s $ECHO`" = "X$ECHO" \
Chris@42 1216 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
Chris@42 1217
Chris@42 1218 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
Chris@42 1219 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
Chris@42 1220 ])# _LT_PROG_ECHO_BACKSLASH
Chris@42 1221
Chris@42 1222
Chris@42 1223 # _LT_WITH_SYSROOT
Chris@42 1224 # ----------------
Chris@42 1225 AC_DEFUN([_LT_WITH_SYSROOT],
Chris@42 1226 [AC_MSG_CHECKING([for sysroot])
Chris@42 1227 AC_ARG_WITH([sysroot],
Chris@42 1228 [ --with-sysroot[=DIR] Search for dependent libraries within DIR
Chris@42 1229 (or the compiler's sysroot if not specified).],
Chris@42 1230 [], [with_sysroot=no])
Chris@42 1231
Chris@42 1232 dnl lt_sysroot will always be passed unquoted. We quote it here
Chris@42 1233 dnl in case the user passed a directory name.
Chris@42 1234 lt_sysroot=
Chris@42 1235 case ${with_sysroot} in #(
Chris@42 1236 yes)
Chris@42 1237 if test "$GCC" = yes; then
Chris@42 1238 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
Chris@42 1239 fi
Chris@42 1240 ;; #(
Chris@42 1241 /*)
Chris@42 1242 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
Chris@42 1243 ;; #(
Chris@42 1244 no|'')
Chris@42 1245 ;; #(
Chris@42 1246 *)
Chris@42 1247 AC_MSG_RESULT([${with_sysroot}])
Chris@42 1248 AC_MSG_ERROR([The sysroot must be an absolute path.])
Chris@42 1249 ;;
Chris@42 1250 esac
Chris@42 1251
Chris@42 1252 AC_MSG_RESULT([${lt_sysroot:-no}])
Chris@42 1253 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
Chris@42 1254 [dependent libraries, and in which our libraries should be installed.])])
Chris@42 1255
Chris@42 1256 # _LT_ENABLE_LOCK
Chris@42 1257 # ---------------
Chris@42 1258 m4_defun([_LT_ENABLE_LOCK],
Chris@42 1259 [AC_ARG_ENABLE([libtool-lock],
Chris@42 1260 [AS_HELP_STRING([--disable-libtool-lock],
Chris@42 1261 [avoid locking (might break parallel builds)])])
Chris@42 1262 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
Chris@42 1263
Chris@42 1264 # Some flags need to be propagated to the compiler or linker for good
Chris@42 1265 # libtool support.
Chris@42 1266 case $host in
Chris@42 1267 ia64-*-hpux*)
Chris@42 1268 # Find out which ABI we are using.
Chris@42 1269 echo 'int i;' > conftest.$ac_ext
Chris@42 1270 if AC_TRY_EVAL(ac_compile); then
Chris@42 1271 case `/usr/bin/file conftest.$ac_objext` in
Chris@42 1272 *ELF-32*)
Chris@42 1273 HPUX_IA64_MODE="32"
Chris@42 1274 ;;
Chris@42 1275 *ELF-64*)
Chris@42 1276 HPUX_IA64_MODE="64"
Chris@42 1277 ;;
Chris@42 1278 esac
Chris@42 1279 fi
Chris@42 1280 rm -rf conftest*
Chris@42 1281 ;;
Chris@42 1282 *-*-irix6*)
Chris@42 1283 # Find out which ABI we are using.
Chris@42 1284 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
Chris@42 1285 if AC_TRY_EVAL(ac_compile); then
Chris@42 1286 if test "$lt_cv_prog_gnu_ld" = yes; then
Chris@42 1287 case `/usr/bin/file conftest.$ac_objext` in
Chris@42 1288 *32-bit*)
Chris@42 1289 LD="${LD-ld} -melf32bsmip"
Chris@42 1290 ;;
Chris@42 1291 *N32*)
Chris@42 1292 LD="${LD-ld} -melf32bmipn32"
Chris@42 1293 ;;
Chris@42 1294 *64-bit*)
Chris@42 1295 LD="${LD-ld} -melf64bmip"
Chris@42 1296 ;;
Chris@42 1297 esac
Chris@42 1298 else
Chris@42 1299 case `/usr/bin/file conftest.$ac_objext` in
Chris@42 1300 *32-bit*)
Chris@42 1301 LD="${LD-ld} -32"
Chris@42 1302 ;;
Chris@42 1303 *N32*)
Chris@42 1304 LD="${LD-ld} -n32"
Chris@42 1305 ;;
Chris@42 1306 *64-bit*)
Chris@42 1307 LD="${LD-ld} -64"
Chris@42 1308 ;;
Chris@42 1309 esac
Chris@42 1310 fi
Chris@42 1311 fi
Chris@42 1312 rm -rf conftest*
Chris@42 1313 ;;
Chris@42 1314
Chris@42 1315 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
Chris@42 1316 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
Chris@42 1317 # Find out which ABI we are using.
Chris@42 1318 echo 'int i;' > conftest.$ac_ext
Chris@42 1319 if AC_TRY_EVAL(ac_compile); then
Chris@42 1320 case `/usr/bin/file conftest.o` in
Chris@42 1321 *32-bit*)
Chris@42 1322 case $host in
Chris@42 1323 x86_64-*kfreebsd*-gnu)
Chris@42 1324 LD="${LD-ld} -m elf_i386_fbsd"
Chris@42 1325 ;;
Chris@42 1326 x86_64-*linux*)
Chris@42 1327 case `/usr/bin/file conftest.o` in
Chris@42 1328 *x86-64*)
Chris@42 1329 LD="${LD-ld} -m elf32_x86_64"
Chris@42 1330 ;;
Chris@42 1331 *)
Chris@42 1332 LD="${LD-ld} -m elf_i386"
Chris@42 1333 ;;
Chris@42 1334 esac
Chris@42 1335 ;;
Chris@42 1336 powerpc64le-*)
Chris@42 1337 LD="${LD-ld} -m elf32lppclinux"
Chris@42 1338 ;;
Chris@42 1339 powerpc64-*)
Chris@42 1340 LD="${LD-ld} -m elf32ppclinux"
Chris@42 1341 ;;
Chris@42 1342 s390x-*linux*)
Chris@42 1343 LD="${LD-ld} -m elf_s390"
Chris@42 1344 ;;
Chris@42 1345 sparc64-*linux*)
Chris@42 1346 LD="${LD-ld} -m elf32_sparc"
Chris@42 1347 ;;
Chris@42 1348 esac
Chris@42 1349 ;;
Chris@42 1350 *64-bit*)
Chris@42 1351 case $host in
Chris@42 1352 x86_64-*kfreebsd*-gnu)
Chris@42 1353 LD="${LD-ld} -m elf_x86_64_fbsd"
Chris@42 1354 ;;
Chris@42 1355 x86_64-*linux*)
Chris@42 1356 LD="${LD-ld} -m elf_x86_64"
Chris@42 1357 ;;
Chris@42 1358 powerpcle-*)
Chris@42 1359 LD="${LD-ld} -m elf64lppc"
Chris@42 1360 ;;
Chris@42 1361 powerpc-*)
Chris@42 1362 LD="${LD-ld} -m elf64ppc"
Chris@42 1363 ;;
Chris@42 1364 s390*-*linux*|s390*-*tpf*)
Chris@42 1365 LD="${LD-ld} -m elf64_s390"
Chris@42 1366 ;;
Chris@42 1367 sparc*-*linux*)
Chris@42 1368 LD="${LD-ld} -m elf64_sparc"
Chris@42 1369 ;;
Chris@42 1370 esac
Chris@42 1371 ;;
Chris@42 1372 esac
Chris@42 1373 fi
Chris@42 1374 rm -rf conftest*
Chris@42 1375 ;;
Chris@42 1376
Chris@42 1377 *-*-sco3.2v5*)
Chris@42 1378 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
Chris@42 1379 SAVE_CFLAGS="$CFLAGS"
Chris@42 1380 CFLAGS="$CFLAGS -belf"
Chris@42 1381 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
Chris@42 1382 [AC_LANG_PUSH(C)
Chris@42 1383 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
Chris@42 1384 AC_LANG_POP])
Chris@42 1385 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
Chris@42 1386 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
Chris@42 1387 CFLAGS="$SAVE_CFLAGS"
Chris@42 1388 fi
Chris@42 1389 ;;
Chris@42 1390 *-*solaris*)
Chris@42 1391 # Find out which ABI we are using.
Chris@42 1392 echo 'int i;' > conftest.$ac_ext
Chris@42 1393 if AC_TRY_EVAL(ac_compile); then
Chris@42 1394 case `/usr/bin/file conftest.o` in
Chris@42 1395 *64-bit*)
Chris@42 1396 case $lt_cv_prog_gnu_ld in
Chris@42 1397 yes*)
Chris@42 1398 case $host in
Chris@42 1399 i?86-*-solaris*)
Chris@42 1400 LD="${LD-ld} -m elf_x86_64"
Chris@42 1401 ;;
Chris@42 1402 sparc*-*-solaris*)
Chris@42 1403 LD="${LD-ld} -m elf64_sparc"
Chris@42 1404 ;;
Chris@42 1405 esac
Chris@42 1406 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
Chris@42 1407 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
Chris@42 1408 LD="${LD-ld}_sol2"
Chris@42 1409 fi
Chris@42 1410 ;;
Chris@42 1411 *)
Chris@42 1412 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
Chris@42 1413 LD="${LD-ld} -64"
Chris@42 1414 fi
Chris@42 1415 ;;
Chris@42 1416 esac
Chris@42 1417 ;;
Chris@42 1418 esac
Chris@42 1419 fi
Chris@42 1420 rm -rf conftest*
Chris@42 1421 ;;
Chris@42 1422 esac
Chris@42 1423
Chris@42 1424 need_locks="$enable_libtool_lock"
Chris@42 1425 ])# _LT_ENABLE_LOCK
Chris@42 1426
Chris@42 1427
Chris@42 1428 # _LT_PROG_AR
Chris@42 1429 # -----------
Chris@42 1430 m4_defun([_LT_PROG_AR],
Chris@42 1431 [AC_CHECK_TOOLS(AR, [ar], false)
Chris@42 1432 : ${AR=ar}
Chris@42 1433 : ${AR_FLAGS=cru}
Chris@42 1434 _LT_DECL([], [AR], [1], [The archiver])
Chris@42 1435 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
Chris@42 1436
Chris@42 1437 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
Chris@42 1438 [lt_cv_ar_at_file=no
Chris@42 1439 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
Chris@42 1440 [echo conftest.$ac_objext > conftest.lst
Chris@42 1441 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
Chris@42 1442 AC_TRY_EVAL([lt_ar_try])
Chris@42 1443 if test "$ac_status" -eq 0; then
Chris@42 1444 # Ensure the archiver fails upon bogus file names.
Chris@42 1445 rm -f conftest.$ac_objext libconftest.a
Chris@42 1446 AC_TRY_EVAL([lt_ar_try])
Chris@42 1447 if test "$ac_status" -ne 0; then
Chris@42 1448 lt_cv_ar_at_file=@
Chris@42 1449 fi
Chris@42 1450 fi
Chris@42 1451 rm -f conftest.* libconftest.a
Chris@42 1452 ])
Chris@42 1453 ])
Chris@42 1454
Chris@42 1455 if test "x$lt_cv_ar_at_file" = xno; then
Chris@42 1456 archiver_list_spec=
Chris@42 1457 else
Chris@42 1458 archiver_list_spec=$lt_cv_ar_at_file
Chris@42 1459 fi
Chris@42 1460 _LT_DECL([], [archiver_list_spec], [1],
Chris@42 1461 [How to feed a file listing to the archiver])
Chris@42 1462 ])# _LT_PROG_AR
Chris@42 1463
Chris@42 1464
Chris@42 1465 # _LT_CMD_OLD_ARCHIVE
Chris@42 1466 # -------------------
Chris@42 1467 m4_defun([_LT_CMD_OLD_ARCHIVE],
Chris@42 1468 [_LT_PROG_AR
Chris@42 1469
Chris@42 1470 AC_CHECK_TOOL(STRIP, strip, :)
Chris@42 1471 test -z "$STRIP" && STRIP=:
Chris@42 1472 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
Chris@42 1473
Chris@42 1474 AC_CHECK_TOOL(RANLIB, ranlib, :)
Chris@42 1475 test -z "$RANLIB" && RANLIB=:
Chris@42 1476 _LT_DECL([], [RANLIB], [1],
Chris@42 1477 [Commands used to install an old-style archive])
Chris@42 1478
Chris@42 1479 # Determine commands to create old-style static archives.
Chris@42 1480 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
Chris@42 1481 old_postinstall_cmds='chmod 644 $oldlib'
Chris@42 1482 old_postuninstall_cmds=
Chris@42 1483
Chris@42 1484 if test -n "$RANLIB"; then
Chris@42 1485 case $host_os in
Chris@42 1486 openbsd*)
Chris@42 1487 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
Chris@42 1488 ;;
Chris@42 1489 *)
Chris@42 1490 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
Chris@42 1491 ;;
Chris@42 1492 esac
Chris@42 1493 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
Chris@42 1494 fi
Chris@42 1495
Chris@42 1496 case $host_os in
Chris@42 1497 darwin*)
Chris@42 1498 lock_old_archive_extraction=yes ;;
Chris@42 1499 *)
Chris@42 1500 lock_old_archive_extraction=no ;;
Chris@42 1501 esac
Chris@42 1502 _LT_DECL([], [old_postinstall_cmds], [2])
Chris@42 1503 _LT_DECL([], [old_postuninstall_cmds], [2])
Chris@42 1504 _LT_TAGDECL([], [old_archive_cmds], [2],
Chris@42 1505 [Commands used to build an old-style archive])
Chris@42 1506 _LT_DECL([], [lock_old_archive_extraction], [0],
Chris@42 1507 [Whether to use a lock for old archive extraction])
Chris@42 1508 ])# _LT_CMD_OLD_ARCHIVE
Chris@42 1509
Chris@42 1510
Chris@42 1511 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
Chris@42 1512 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
Chris@42 1513 # ----------------------------------------------------------------
Chris@42 1514 # Check whether the given compiler option works
Chris@42 1515 AC_DEFUN([_LT_COMPILER_OPTION],
Chris@42 1516 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@42 1517 m4_require([_LT_DECL_SED])dnl
Chris@42 1518 AC_CACHE_CHECK([$1], [$2],
Chris@42 1519 [$2=no
Chris@42 1520 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
Chris@42 1521 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
Chris@42 1522 lt_compiler_flag="$3"
Chris@42 1523 # Insert the option either (1) after the last *FLAGS variable, or
Chris@42 1524 # (2) before a word containing "conftest.", or (3) at the end.
Chris@42 1525 # Note that $ac_compile itself does not contain backslashes and begins
Chris@42 1526 # with a dollar sign (not a hyphen), so the echo should work correctly.
Chris@42 1527 # The option is referenced via a variable to avoid confusing sed.
Chris@42 1528 lt_compile=`echo "$ac_compile" | $SED \
Chris@42 1529 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
Chris@42 1530 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
Chris@42 1531 -e 's:$: $lt_compiler_flag:'`
Chris@42 1532 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
Chris@42 1533 (eval "$lt_compile" 2>conftest.err)
Chris@42 1534 ac_status=$?
Chris@42 1535 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@42 1536 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
Chris@42 1537 if (exit $ac_status) && test -s "$ac_outfile"; then
Chris@42 1538 # The compiler can only warn and ignore the option if not recognized
Chris@42 1539 # So say no if there are warnings other than the usual output.
Chris@42 1540 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
Chris@42 1541 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
Chris@42 1542 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
Chris@42 1543 $2=yes
Chris@42 1544 fi
Chris@42 1545 fi
Chris@42 1546 $RM conftest*
Chris@42 1547 ])
Chris@42 1548
Chris@42 1549 if test x"[$]$2" = xyes; then
Chris@42 1550 m4_if([$5], , :, [$5])
Chris@42 1551 else
Chris@42 1552 m4_if([$6], , :, [$6])
Chris@42 1553 fi
Chris@42 1554 ])# _LT_COMPILER_OPTION
Chris@42 1555
Chris@42 1556 # Old name:
Chris@42 1557 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
Chris@42 1558 dnl aclocal-1.4 backwards compatibility:
Chris@42 1559 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
Chris@42 1560
Chris@42 1561
Chris@42 1562 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
Chris@42 1563 # [ACTION-SUCCESS], [ACTION-FAILURE])
Chris@42 1564 # ----------------------------------------------------
Chris@42 1565 # Check whether the given linker option works
Chris@42 1566 AC_DEFUN([_LT_LINKER_OPTION],
Chris@42 1567 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@42 1568 m4_require([_LT_DECL_SED])dnl
Chris@42 1569 AC_CACHE_CHECK([$1], [$2],
Chris@42 1570 [$2=no
Chris@42 1571 save_LDFLAGS="$LDFLAGS"
Chris@42 1572 LDFLAGS="$LDFLAGS $3"
Chris@42 1573 echo "$lt_simple_link_test_code" > conftest.$ac_ext
Chris@42 1574 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
Chris@42 1575 # The linker can only warn and ignore the option if not recognized
Chris@42 1576 # So say no if there are warnings
Chris@42 1577 if test -s conftest.err; then
Chris@42 1578 # Append any errors to the config.log.
Chris@42 1579 cat conftest.err 1>&AS_MESSAGE_LOG_FD
Chris@42 1580 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
Chris@42 1581 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
Chris@42 1582 if diff conftest.exp conftest.er2 >/dev/null; then
Chris@42 1583 $2=yes
Chris@42 1584 fi
Chris@42 1585 else
Chris@42 1586 $2=yes
Chris@42 1587 fi
Chris@42 1588 fi
Chris@42 1589 $RM -r conftest*
Chris@42 1590 LDFLAGS="$save_LDFLAGS"
Chris@42 1591 ])
Chris@42 1592
Chris@42 1593 if test x"[$]$2" = xyes; then
Chris@42 1594 m4_if([$4], , :, [$4])
Chris@42 1595 else
Chris@42 1596 m4_if([$5], , :, [$5])
Chris@42 1597 fi
Chris@42 1598 ])# _LT_LINKER_OPTION
Chris@42 1599
Chris@42 1600 # Old name:
Chris@42 1601 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
Chris@42 1602 dnl aclocal-1.4 backwards compatibility:
Chris@42 1603 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
Chris@42 1604
Chris@42 1605
Chris@42 1606 # LT_CMD_MAX_LEN
Chris@42 1607 #---------------
Chris@42 1608 AC_DEFUN([LT_CMD_MAX_LEN],
Chris@42 1609 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@42 1610 # find the maximum length of command line arguments
Chris@42 1611 AC_MSG_CHECKING([the maximum length of command line arguments])
Chris@42 1612 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
Chris@42 1613 i=0
Chris@42 1614 teststring="ABCD"
Chris@42 1615
Chris@42 1616 case $build_os in
Chris@42 1617 msdosdjgpp*)
Chris@42 1618 # On DJGPP, this test can blow up pretty badly due to problems in libc
Chris@42 1619 # (any single argument exceeding 2000 bytes causes a buffer overrun
Chris@42 1620 # during glob expansion). Even if it were fixed, the result of this
Chris@42 1621 # check would be larger than it should be.
Chris@42 1622 lt_cv_sys_max_cmd_len=12288; # 12K is about right
Chris@42 1623 ;;
Chris@42 1624
Chris@42 1625 gnu*)
Chris@42 1626 # Under GNU Hurd, this test is not required because there is
Chris@42 1627 # no limit to the length of command line arguments.
Chris@42 1628 # Libtool will interpret -1 as no limit whatsoever
Chris@42 1629 lt_cv_sys_max_cmd_len=-1;
Chris@42 1630 ;;
Chris@42 1631
Chris@42 1632 cygwin* | mingw* | cegcc*)
Chris@42 1633 # On Win9x/ME, this test blows up -- it succeeds, but takes
Chris@42 1634 # about 5 minutes as the teststring grows exponentially.
Chris@42 1635 # Worse, since 9x/ME are not pre-emptively multitasking,
Chris@42 1636 # you end up with a "frozen" computer, even though with patience
Chris@42 1637 # the test eventually succeeds (with a max line length of 256k).
Chris@42 1638 # Instead, let's just punt: use the minimum linelength reported by
Chris@42 1639 # all of the supported platforms: 8192 (on NT/2K/XP).
Chris@42 1640 lt_cv_sys_max_cmd_len=8192;
Chris@42 1641 ;;
Chris@42 1642
Chris@42 1643 mint*)
Chris@42 1644 # On MiNT this can take a long time and run out of memory.
Chris@42 1645 lt_cv_sys_max_cmd_len=8192;
Chris@42 1646 ;;
Chris@42 1647
Chris@42 1648 amigaos*)
Chris@42 1649 # On AmigaOS with pdksh, this test takes hours, literally.
Chris@42 1650 # So we just punt and use a minimum line length of 8192.
Chris@42 1651 lt_cv_sys_max_cmd_len=8192;
Chris@42 1652 ;;
Chris@42 1653
Chris@42 1654 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
Chris@42 1655 # This has been around since 386BSD, at least. Likely further.
Chris@42 1656 if test -x /sbin/sysctl; then
Chris@42 1657 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
Chris@42 1658 elif test -x /usr/sbin/sysctl; then
Chris@42 1659 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
Chris@42 1660 else
Chris@42 1661 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
Chris@42 1662 fi
Chris@42 1663 # And add a safety zone
Chris@42 1664 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
Chris@42 1665 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
Chris@42 1666 ;;
Chris@42 1667
Chris@42 1668 interix*)
Chris@42 1669 # We know the value 262144 and hardcode it with a safety zone (like BSD)
Chris@42 1670 lt_cv_sys_max_cmd_len=196608
Chris@42 1671 ;;
Chris@42 1672
Chris@42 1673 os2*)
Chris@42 1674 # The test takes a long time on OS/2.
Chris@42 1675 lt_cv_sys_max_cmd_len=8192
Chris@42 1676 ;;
Chris@42 1677
Chris@42 1678 osf*)
Chris@42 1679 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
Chris@42 1680 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
Chris@42 1681 # nice to cause kernel panics so lets avoid the loop below.
Chris@42 1682 # First set a reasonable default.
Chris@42 1683 lt_cv_sys_max_cmd_len=16384
Chris@42 1684 #
Chris@42 1685 if test -x /sbin/sysconfig; then
Chris@42 1686 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
Chris@42 1687 *1*) lt_cv_sys_max_cmd_len=-1 ;;
Chris@42 1688 esac
Chris@42 1689 fi
Chris@42 1690 ;;
Chris@42 1691 sco3.2v5*)
Chris@42 1692 lt_cv_sys_max_cmd_len=102400
Chris@42 1693 ;;
Chris@42 1694 sysv5* | sco5v6* | sysv4.2uw2*)
Chris@42 1695 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
Chris@42 1696 if test -n "$kargmax"; then
Chris@42 1697 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
Chris@42 1698 else
Chris@42 1699 lt_cv_sys_max_cmd_len=32768
Chris@42 1700 fi
Chris@42 1701 ;;
Chris@42 1702 *)
Chris@42 1703 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
Chris@42 1704 if test -n "$lt_cv_sys_max_cmd_len" && \
Chris@42 1705 test undefined != "$lt_cv_sys_max_cmd_len"; then
Chris@42 1706 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
Chris@42 1707 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
Chris@42 1708 else
Chris@42 1709 # Make teststring a little bigger before we do anything with it.
Chris@42 1710 # a 1K string should be a reasonable start.
Chris@42 1711 for i in 1 2 3 4 5 6 7 8 ; do
Chris@42 1712 teststring=$teststring$teststring
Chris@42 1713 done
Chris@42 1714 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
Chris@42 1715 # If test is not a shell built-in, we'll probably end up computing a
Chris@42 1716 # maximum length that is only half of the actual maximum length, but
Chris@42 1717 # we can't tell.
Chris@42 1718 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
Chris@42 1719 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
Chris@42 1720 test $i != 17 # 1/2 MB should be enough
Chris@42 1721 do
Chris@42 1722 i=`expr $i + 1`
Chris@42 1723 teststring=$teststring$teststring
Chris@42 1724 done
Chris@42 1725 # Only check the string length outside the loop.
Chris@42 1726 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
Chris@42 1727 teststring=
Chris@42 1728 # Add a significant safety factor because C++ compilers can tack on
Chris@42 1729 # massive amounts of additional arguments before passing them to the
Chris@42 1730 # linker. It appears as though 1/2 is a usable value.
Chris@42 1731 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
Chris@42 1732 fi
Chris@42 1733 ;;
Chris@42 1734 esac
Chris@42 1735 ])
Chris@42 1736 if test -n $lt_cv_sys_max_cmd_len ; then
Chris@42 1737 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
Chris@42 1738 else
Chris@42 1739 AC_MSG_RESULT(none)
Chris@42 1740 fi
Chris@42 1741 max_cmd_len=$lt_cv_sys_max_cmd_len
Chris@42 1742 _LT_DECL([], [max_cmd_len], [0],
Chris@42 1743 [What is the maximum length of a command?])
Chris@42 1744 ])# LT_CMD_MAX_LEN
Chris@42 1745
Chris@42 1746 # Old name:
Chris@42 1747 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
Chris@42 1748 dnl aclocal-1.4 backwards compatibility:
Chris@42 1749 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
Chris@42 1750
Chris@42 1751
Chris@42 1752 # _LT_HEADER_DLFCN
Chris@42 1753 # ----------------
Chris@42 1754 m4_defun([_LT_HEADER_DLFCN],
Chris@42 1755 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
Chris@42 1756 ])# _LT_HEADER_DLFCN
Chris@42 1757
Chris@42 1758
Chris@42 1759 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
Chris@42 1760 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
Chris@42 1761 # ----------------------------------------------------------------
Chris@42 1762 m4_defun([_LT_TRY_DLOPEN_SELF],
Chris@42 1763 [m4_require([_LT_HEADER_DLFCN])dnl
Chris@42 1764 if test "$cross_compiling" = yes; then :
Chris@42 1765 [$4]
Chris@42 1766 else
Chris@42 1767 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
Chris@42 1768 lt_status=$lt_dlunknown
Chris@42 1769 cat > conftest.$ac_ext <<_LT_EOF
Chris@42 1770 [#line $LINENO "configure"
Chris@42 1771 #include "confdefs.h"
Chris@42 1772
Chris@42 1773 #if HAVE_DLFCN_H
Chris@42 1774 #include <dlfcn.h>
Chris@42 1775 #endif
Chris@42 1776
Chris@42 1777 #include <stdio.h>
Chris@42 1778
Chris@42 1779 #ifdef RTLD_GLOBAL
Chris@42 1780 # define LT_DLGLOBAL RTLD_GLOBAL
Chris@42 1781 #else
Chris@42 1782 # ifdef DL_GLOBAL
Chris@42 1783 # define LT_DLGLOBAL DL_GLOBAL
Chris@42 1784 # else
Chris@42 1785 # define LT_DLGLOBAL 0
Chris@42 1786 # endif
Chris@42 1787 #endif
Chris@42 1788
Chris@42 1789 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
Chris@42 1790 find out it does not work in some platform. */
Chris@42 1791 #ifndef LT_DLLAZY_OR_NOW
Chris@42 1792 # ifdef RTLD_LAZY
Chris@42 1793 # define LT_DLLAZY_OR_NOW RTLD_LAZY
Chris@42 1794 # else
Chris@42 1795 # ifdef DL_LAZY
Chris@42 1796 # define LT_DLLAZY_OR_NOW DL_LAZY
Chris@42 1797 # else
Chris@42 1798 # ifdef RTLD_NOW
Chris@42 1799 # define LT_DLLAZY_OR_NOW RTLD_NOW
Chris@42 1800 # else
Chris@42 1801 # ifdef DL_NOW
Chris@42 1802 # define LT_DLLAZY_OR_NOW DL_NOW
Chris@42 1803 # else
Chris@42 1804 # define LT_DLLAZY_OR_NOW 0
Chris@42 1805 # endif
Chris@42 1806 # endif
Chris@42 1807 # endif
Chris@42 1808 # endif
Chris@42 1809 #endif
Chris@42 1810
Chris@42 1811 /* When -fvisbility=hidden is used, assume the code has been annotated
Chris@42 1812 correspondingly for the symbols needed. */
Chris@42 1813 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
Chris@42 1814 int fnord () __attribute__((visibility("default")));
Chris@42 1815 #endif
Chris@42 1816
Chris@42 1817 int fnord () { return 42; }
Chris@42 1818 int main ()
Chris@42 1819 {
Chris@42 1820 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
Chris@42 1821 int status = $lt_dlunknown;
Chris@42 1822
Chris@42 1823 if (self)
Chris@42 1824 {
Chris@42 1825 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
Chris@42 1826 else
Chris@42 1827 {
Chris@42 1828 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
Chris@42 1829 else puts (dlerror ());
Chris@42 1830 }
Chris@42 1831 /* dlclose (self); */
Chris@42 1832 }
Chris@42 1833 else
Chris@42 1834 puts (dlerror ());
Chris@42 1835
Chris@42 1836 return status;
Chris@42 1837 }]
Chris@42 1838 _LT_EOF
Chris@42 1839 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
Chris@42 1840 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
Chris@42 1841 lt_status=$?
Chris@42 1842 case x$lt_status in
Chris@42 1843 x$lt_dlno_uscore) $1 ;;
Chris@42 1844 x$lt_dlneed_uscore) $2 ;;
Chris@42 1845 x$lt_dlunknown|x*) $3 ;;
Chris@42 1846 esac
Chris@42 1847 else :
Chris@42 1848 # compilation failed
Chris@42 1849 $3
Chris@42 1850 fi
Chris@42 1851 fi
Chris@42 1852 rm -fr conftest*
Chris@42 1853 ])# _LT_TRY_DLOPEN_SELF
Chris@42 1854
Chris@42 1855
Chris@42 1856 # LT_SYS_DLOPEN_SELF
Chris@42 1857 # ------------------
Chris@42 1858 AC_DEFUN([LT_SYS_DLOPEN_SELF],
Chris@42 1859 [m4_require([_LT_HEADER_DLFCN])dnl
Chris@42 1860 if test "x$enable_dlopen" != xyes; then
Chris@42 1861 enable_dlopen=unknown
Chris@42 1862 enable_dlopen_self=unknown
Chris@42 1863 enable_dlopen_self_static=unknown
Chris@42 1864 else
Chris@42 1865 lt_cv_dlopen=no
Chris@42 1866 lt_cv_dlopen_libs=
Chris@42 1867
Chris@42 1868 case $host_os in
Chris@42 1869 beos*)
Chris@42 1870 lt_cv_dlopen="load_add_on"
Chris@42 1871 lt_cv_dlopen_libs=
Chris@42 1872 lt_cv_dlopen_self=yes
Chris@42 1873 ;;
Chris@42 1874
Chris@42 1875 mingw* | pw32* | cegcc*)
Chris@42 1876 lt_cv_dlopen="LoadLibrary"
Chris@42 1877 lt_cv_dlopen_libs=
Chris@42 1878 ;;
Chris@42 1879
Chris@42 1880 cygwin*)
Chris@42 1881 lt_cv_dlopen="dlopen"
Chris@42 1882 lt_cv_dlopen_libs=
Chris@42 1883 ;;
Chris@42 1884
Chris@42 1885 darwin*)
Chris@42 1886 # if libdl is installed we need to link against it
Chris@42 1887 AC_CHECK_LIB([dl], [dlopen],
Chris@42 1888 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
Chris@42 1889 lt_cv_dlopen="dyld"
Chris@42 1890 lt_cv_dlopen_libs=
Chris@42 1891 lt_cv_dlopen_self=yes
Chris@42 1892 ])
Chris@42 1893 ;;
Chris@42 1894
Chris@42 1895 *)
Chris@42 1896 AC_CHECK_FUNC([shl_load],
Chris@42 1897 [lt_cv_dlopen="shl_load"],
Chris@42 1898 [AC_CHECK_LIB([dld], [shl_load],
Chris@42 1899 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
Chris@42 1900 [AC_CHECK_FUNC([dlopen],
Chris@42 1901 [lt_cv_dlopen="dlopen"],
Chris@42 1902 [AC_CHECK_LIB([dl], [dlopen],
Chris@42 1903 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
Chris@42 1904 [AC_CHECK_LIB([svld], [dlopen],
Chris@42 1905 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
Chris@42 1906 [AC_CHECK_LIB([dld], [dld_link],
Chris@42 1907 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
Chris@42 1908 ])
Chris@42 1909 ])
Chris@42 1910 ])
Chris@42 1911 ])
Chris@42 1912 ])
Chris@42 1913 ;;
Chris@42 1914 esac
Chris@42 1915
Chris@42 1916 if test "x$lt_cv_dlopen" != xno; then
Chris@42 1917 enable_dlopen=yes
Chris@42 1918 else
Chris@42 1919 enable_dlopen=no
Chris@42 1920 fi
Chris@42 1921
Chris@42 1922 case $lt_cv_dlopen in
Chris@42 1923 dlopen)
Chris@42 1924 save_CPPFLAGS="$CPPFLAGS"
Chris@42 1925 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
Chris@42 1926
Chris@42 1927 save_LDFLAGS="$LDFLAGS"
Chris@42 1928 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
Chris@42 1929
Chris@42 1930 save_LIBS="$LIBS"
Chris@42 1931 LIBS="$lt_cv_dlopen_libs $LIBS"
Chris@42 1932
Chris@42 1933 AC_CACHE_CHECK([whether a program can dlopen itself],
Chris@42 1934 lt_cv_dlopen_self, [dnl
Chris@42 1935 _LT_TRY_DLOPEN_SELF(
Chris@42 1936 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
Chris@42 1937 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
Chris@42 1938 ])
Chris@42 1939
Chris@42 1940 if test "x$lt_cv_dlopen_self" = xyes; then
Chris@42 1941 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
Chris@42 1942 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
Chris@42 1943 lt_cv_dlopen_self_static, [dnl
Chris@42 1944 _LT_TRY_DLOPEN_SELF(
Chris@42 1945 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
Chris@42 1946 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
Chris@42 1947 ])
Chris@42 1948 fi
Chris@42 1949
Chris@42 1950 CPPFLAGS="$save_CPPFLAGS"
Chris@42 1951 LDFLAGS="$save_LDFLAGS"
Chris@42 1952 LIBS="$save_LIBS"
Chris@42 1953 ;;
Chris@42 1954 esac
Chris@42 1955
Chris@42 1956 case $lt_cv_dlopen_self in
Chris@42 1957 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
Chris@42 1958 *) enable_dlopen_self=unknown ;;
Chris@42 1959 esac
Chris@42 1960
Chris@42 1961 case $lt_cv_dlopen_self_static in
Chris@42 1962 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
Chris@42 1963 *) enable_dlopen_self_static=unknown ;;
Chris@42 1964 esac
Chris@42 1965 fi
Chris@42 1966 _LT_DECL([dlopen_support], [enable_dlopen], [0],
Chris@42 1967 [Whether dlopen is supported])
Chris@42 1968 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
Chris@42 1969 [Whether dlopen of programs is supported])
Chris@42 1970 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
Chris@42 1971 [Whether dlopen of statically linked programs is supported])
Chris@42 1972 ])# LT_SYS_DLOPEN_SELF
Chris@42 1973
Chris@42 1974 # Old name:
Chris@42 1975 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
Chris@42 1976 dnl aclocal-1.4 backwards compatibility:
Chris@42 1977 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
Chris@42 1978
Chris@42 1979
Chris@42 1980 # _LT_COMPILER_C_O([TAGNAME])
Chris@42 1981 # ---------------------------
Chris@42 1982 # Check to see if options -c and -o are simultaneously supported by compiler.
Chris@42 1983 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
Chris@42 1984 m4_defun([_LT_COMPILER_C_O],
Chris@42 1985 [m4_require([_LT_DECL_SED])dnl
Chris@42 1986 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@42 1987 m4_require([_LT_TAG_COMPILER])dnl
Chris@42 1988 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
Chris@42 1989 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
Chris@42 1990 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
Chris@42 1991 $RM -r conftest 2>/dev/null
Chris@42 1992 mkdir conftest
Chris@42 1993 cd conftest
Chris@42 1994 mkdir out
Chris@42 1995 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
Chris@42 1996
Chris@42 1997 lt_compiler_flag="-o out/conftest2.$ac_objext"
Chris@42 1998 # Insert the option either (1) after the last *FLAGS variable, or
Chris@42 1999 # (2) before a word containing "conftest.", or (3) at the end.
Chris@42 2000 # Note that $ac_compile itself does not contain backslashes and begins
Chris@42 2001 # with a dollar sign (not a hyphen), so the echo should work correctly.
Chris@42 2002 lt_compile=`echo "$ac_compile" | $SED \
Chris@42 2003 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
Chris@42 2004 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
Chris@42 2005 -e 's:$: $lt_compiler_flag:'`
Chris@42 2006 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
Chris@42 2007 (eval "$lt_compile" 2>out/conftest.err)
Chris@42 2008 ac_status=$?
Chris@42 2009 cat out/conftest.err >&AS_MESSAGE_LOG_FD
Chris@42 2010 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
Chris@42 2011 if (exit $ac_status) && test -s out/conftest2.$ac_objext
Chris@42 2012 then
Chris@42 2013 # The compiler can only warn and ignore the option if not recognized
Chris@42 2014 # So say no if there are warnings
Chris@42 2015 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
Chris@42 2016 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
Chris@42 2017 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
Chris@42 2018 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
Chris@42 2019 fi
Chris@42 2020 fi
Chris@42 2021 chmod u+w . 2>&AS_MESSAGE_LOG_FD
Chris@42 2022 $RM conftest*
Chris@42 2023 # SGI C++ compiler will create directory out/ii_files/ for
Chris@42 2024 # template instantiation
Chris@42 2025 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
Chris@42 2026 $RM out/* && rmdir out
Chris@42 2027 cd ..
Chris@42 2028 $RM -r conftest
Chris@42 2029 $RM conftest*
Chris@42 2030 ])
Chris@42 2031 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
Chris@42 2032 [Does compiler simultaneously support -c and -o options?])
Chris@42 2033 ])# _LT_COMPILER_C_O
Chris@42 2034
Chris@42 2035
Chris@42 2036 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
Chris@42 2037 # ----------------------------------
Chris@42 2038 # Check to see if we can do hard links to lock some files if needed
Chris@42 2039 m4_defun([_LT_COMPILER_FILE_LOCKS],
Chris@42 2040 [m4_require([_LT_ENABLE_LOCK])dnl
Chris@42 2041 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@42 2042 _LT_COMPILER_C_O([$1])
Chris@42 2043
Chris@42 2044 hard_links="nottested"
Chris@42 2045 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
Chris@42 2046 # do not overwrite the value of need_locks provided by the user
Chris@42 2047 AC_MSG_CHECKING([if we can lock with hard links])
Chris@42 2048 hard_links=yes
Chris@42 2049 $RM conftest*
Chris@42 2050 ln conftest.a conftest.b 2>/dev/null && hard_links=no
Chris@42 2051 touch conftest.a
Chris@42 2052 ln conftest.a conftest.b 2>&5 || hard_links=no
Chris@42 2053 ln conftest.a conftest.b 2>/dev/null && hard_links=no
Chris@42 2054 AC_MSG_RESULT([$hard_links])
Chris@42 2055 if test "$hard_links" = no; then
Chris@42 2056 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
Chris@42 2057 need_locks=warn
Chris@42 2058 fi
Chris@42 2059 else
Chris@42 2060 need_locks=no
Chris@42 2061 fi
Chris@42 2062 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
Chris@42 2063 ])# _LT_COMPILER_FILE_LOCKS
Chris@42 2064
Chris@42 2065
Chris@42 2066 # _LT_CHECK_OBJDIR
Chris@42 2067 # ----------------
Chris@42 2068 m4_defun([_LT_CHECK_OBJDIR],
Chris@42 2069 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
Chris@42 2070 [rm -f .libs 2>/dev/null
Chris@42 2071 mkdir .libs 2>/dev/null
Chris@42 2072 if test -d .libs; then
Chris@42 2073 lt_cv_objdir=.libs
Chris@42 2074 else
Chris@42 2075 # MS-DOS does not allow filenames that begin with a dot.
Chris@42 2076 lt_cv_objdir=_libs
Chris@42 2077 fi
Chris@42 2078 rmdir .libs 2>/dev/null])
Chris@42 2079 objdir=$lt_cv_objdir
Chris@42 2080 _LT_DECL([], [objdir], [0],
Chris@42 2081 [The name of the directory that contains temporary libtool files])dnl
Chris@42 2082 m4_pattern_allow([LT_OBJDIR])dnl
Chris@42 2083 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
Chris@42 2084 [Define to the sub-directory in which libtool stores uninstalled libraries.])
Chris@42 2085 ])# _LT_CHECK_OBJDIR
Chris@42 2086
Chris@42 2087
Chris@42 2088 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
Chris@42 2089 # --------------------------------------
Chris@42 2090 # Check hardcoding attributes.
Chris@42 2091 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
Chris@42 2092 [AC_MSG_CHECKING([how to hardcode library paths into programs])
Chris@42 2093 _LT_TAGVAR(hardcode_action, $1)=
Chris@42 2094 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
Chris@42 2095 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
Chris@42 2096 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
Chris@42 2097
Chris@42 2098 # We can hardcode non-existent directories.
Chris@42 2099 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
Chris@42 2100 # If the only mechanism to avoid hardcoding is shlibpath_var, we
Chris@42 2101 # have to relink, otherwise we might link with an installed library
Chris@42 2102 # when we should be linking with a yet-to-be-installed one
Chris@42 2103 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
Chris@42 2104 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
Chris@42 2105 # Linking always hardcodes the temporary library directory.
Chris@42 2106 _LT_TAGVAR(hardcode_action, $1)=relink
Chris@42 2107 else
Chris@42 2108 # We can link without hardcoding, and we can hardcode nonexisting dirs.
Chris@42 2109 _LT_TAGVAR(hardcode_action, $1)=immediate
Chris@42 2110 fi
Chris@42 2111 else
Chris@42 2112 # We cannot hardcode anything, or else we can only hardcode existing
Chris@42 2113 # directories.
Chris@42 2114 _LT_TAGVAR(hardcode_action, $1)=unsupported
Chris@42 2115 fi
Chris@42 2116 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
Chris@42 2117
Chris@42 2118 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
Chris@42 2119 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
Chris@42 2120 # Fast installation is not supported
Chris@42 2121 enable_fast_install=no
Chris@42 2122 elif test "$shlibpath_overrides_runpath" = yes ||
Chris@42 2123 test "$enable_shared" = no; then
Chris@42 2124 # Fast installation is not necessary
Chris@42 2125 enable_fast_install=needless
Chris@42 2126 fi
Chris@42 2127 _LT_TAGDECL([], [hardcode_action], [0],
Chris@42 2128 [How to hardcode a shared library path into an executable])
Chris@42 2129 ])# _LT_LINKER_HARDCODE_LIBPATH
Chris@42 2130
Chris@42 2131
Chris@42 2132 # _LT_CMD_STRIPLIB
Chris@42 2133 # ----------------
Chris@42 2134 m4_defun([_LT_CMD_STRIPLIB],
Chris@42 2135 [m4_require([_LT_DECL_EGREP])
Chris@42 2136 striplib=
Chris@42 2137 old_striplib=
Chris@42 2138 AC_MSG_CHECKING([whether stripping libraries is possible])
Chris@42 2139 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
Chris@42 2140 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
Chris@42 2141 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
Chris@42 2142 AC_MSG_RESULT([yes])
Chris@42 2143 else
Chris@42 2144 # FIXME - insert some real tests, host_os isn't really good enough
Chris@42 2145 case $host_os in
Chris@42 2146 darwin*)
Chris@42 2147 if test -n "$STRIP" ; then
Chris@42 2148 striplib="$STRIP -x"
Chris@42 2149 old_striplib="$STRIP -S"
Chris@42 2150 AC_MSG_RESULT([yes])
Chris@42 2151 else
Chris@42 2152 AC_MSG_RESULT([no])
Chris@42 2153 fi
Chris@42 2154 ;;
Chris@42 2155 *)
Chris@42 2156 AC_MSG_RESULT([no])
Chris@42 2157 ;;
Chris@42 2158 esac
Chris@42 2159 fi
Chris@42 2160 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
Chris@42 2161 _LT_DECL([], [striplib], [1])
Chris@42 2162 ])# _LT_CMD_STRIPLIB
Chris@42 2163
Chris@42 2164
Chris@42 2165 # _LT_SYS_DYNAMIC_LINKER([TAG])
Chris@42 2166 # -----------------------------
Chris@42 2167 # PORTME Fill in your ld.so characteristics
Chris@42 2168 m4_defun([_LT_SYS_DYNAMIC_LINKER],
Chris@42 2169 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@42 2170 m4_require([_LT_DECL_EGREP])dnl
Chris@42 2171 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@42 2172 m4_require([_LT_DECL_OBJDUMP])dnl
Chris@42 2173 m4_require([_LT_DECL_SED])dnl
Chris@42 2174 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
Chris@42 2175 AC_MSG_CHECKING([dynamic linker characteristics])
Chris@42 2176 m4_if([$1],
Chris@42 2177 [], [
Chris@42 2178 if test "$GCC" = yes; then
Chris@42 2179 case $host_os in
Chris@42 2180 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
Chris@42 2181 *) lt_awk_arg="/^libraries:/" ;;
Chris@42 2182 esac
Chris@42 2183 case $host_os in
Chris@42 2184 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
Chris@42 2185 *) lt_sed_strip_eq="s,=/,/,g" ;;
Chris@42 2186 esac
Chris@42 2187 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
Chris@42 2188 case $lt_search_path_spec in
Chris@42 2189 *\;*)
Chris@42 2190 # if the path contains ";" then we assume it to be the separator
Chris@42 2191 # otherwise default to the standard path separator (i.e. ":") - it is
Chris@42 2192 # assumed that no part of a normal pathname contains ";" but that should
Chris@42 2193 # okay in the real world where ";" in dirpaths is itself problematic.
Chris@42 2194 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
Chris@42 2195 ;;
Chris@42 2196 *)
Chris@42 2197 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
Chris@42 2198 ;;
Chris@42 2199 esac
Chris@42 2200 # Ok, now we have the path, separated by spaces, we can step through it
Chris@42 2201 # and add multilib dir if necessary.
Chris@42 2202 lt_tmp_lt_search_path_spec=
Chris@42 2203 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
Chris@42 2204 for lt_sys_path in $lt_search_path_spec; do
Chris@42 2205 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
Chris@42 2206 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
Chris@42 2207 else
Chris@42 2208 test -d "$lt_sys_path" && \
Chris@42 2209 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
Chris@42 2210 fi
Chris@42 2211 done
Chris@42 2212 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
Chris@42 2213 BEGIN {RS=" "; FS="/|\n";} {
Chris@42 2214 lt_foo="";
Chris@42 2215 lt_count=0;
Chris@42 2216 for (lt_i = NF; lt_i > 0; lt_i--) {
Chris@42 2217 if ($lt_i != "" && $lt_i != ".") {
Chris@42 2218 if ($lt_i == "..") {
Chris@42 2219 lt_count++;
Chris@42 2220 } else {
Chris@42 2221 if (lt_count == 0) {
Chris@42 2222 lt_foo="/" $lt_i lt_foo;
Chris@42 2223 } else {
Chris@42 2224 lt_count--;
Chris@42 2225 }
Chris@42 2226 }
Chris@42 2227 }
Chris@42 2228 }
Chris@42 2229 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
Chris@42 2230 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
Chris@42 2231 }'`
Chris@42 2232 # AWK program above erroneously prepends '/' to C:/dos/paths
Chris@42 2233 # for these hosts.
Chris@42 2234 case $host_os in
Chris@42 2235 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
Chris@42 2236 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
Chris@42 2237 esac
Chris@42 2238 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
Chris@42 2239 else
Chris@42 2240 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
Chris@42 2241 fi])
Chris@42 2242 library_names_spec=
Chris@42 2243 libname_spec='lib$name'
Chris@42 2244 soname_spec=
Chris@42 2245 shrext_cmds=".so"
Chris@42 2246 postinstall_cmds=
Chris@42 2247 postuninstall_cmds=
Chris@42 2248 finish_cmds=
Chris@42 2249 finish_eval=
Chris@42 2250 shlibpath_var=
Chris@42 2251 shlibpath_overrides_runpath=unknown
Chris@42 2252 version_type=none
Chris@42 2253 dynamic_linker="$host_os ld.so"
Chris@42 2254 sys_lib_dlsearch_path_spec="/lib /usr/lib"
Chris@42 2255 need_lib_prefix=unknown
Chris@42 2256 hardcode_into_libs=no
Chris@42 2257
Chris@42 2258 # when you set need_version to no, make sure it does not cause -set_version
Chris@42 2259 # flags to be left without arguments
Chris@42 2260 need_version=unknown
Chris@42 2261
Chris@42 2262 case $host_os in
Chris@42 2263 aix3*)
Chris@42 2264 version_type=linux # correct to gnu/linux during the next big refactor
Chris@42 2265 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
Chris@42 2266 shlibpath_var=LIBPATH
Chris@42 2267
Chris@42 2268 # AIX 3 has no versioning support, so we append a major version to the name.
Chris@42 2269 soname_spec='${libname}${release}${shared_ext}$major'
Chris@42 2270 ;;
Chris@42 2271
Chris@42 2272 aix[[4-9]]*)
Chris@42 2273 version_type=linux # correct to gnu/linux during the next big refactor
Chris@42 2274 need_lib_prefix=no
Chris@42 2275 need_version=no
Chris@42 2276 hardcode_into_libs=yes
Chris@42 2277 if test "$host_cpu" = ia64; then
Chris@42 2278 # AIX 5 supports IA64
Chris@42 2279 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
Chris@42 2280 shlibpath_var=LD_LIBRARY_PATH
Chris@42 2281 else
Chris@42 2282 # With GCC up to 2.95.x, collect2 would create an import file
Chris@42 2283 # for dependence libraries. The import file would start with
Chris@42 2284 # the line `#! .'. This would cause the generated library to
Chris@42 2285 # depend on `.', always an invalid library. This was fixed in
Chris@42 2286 # development snapshots of GCC prior to 3.0.
Chris@42 2287 case $host_os in
Chris@42 2288 aix4 | aix4.[[01]] | aix4.[[01]].*)
Chris@42 2289 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
Chris@42 2290 echo ' yes '
Chris@42 2291 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
Chris@42 2292 :
Chris@42 2293 else
Chris@42 2294 can_build_shared=no
Chris@42 2295 fi
Chris@42 2296 ;;
Chris@42 2297 esac
Chris@42 2298 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
Chris@42 2299 # soname into executable. Probably we can add versioning support to
Chris@42 2300 # collect2, so additional links can be useful in future.
Chris@42 2301 if test "$aix_use_runtimelinking" = yes; then
Chris@42 2302 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
Chris@42 2303 # instead of lib<name>.a to let people know that these are not
Chris@42 2304 # typical AIX shared libraries.
Chris@42 2305 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@42 2306 else
Chris@42 2307 # We preserve .a as extension for shared libraries through AIX4.2
Chris@42 2308 # and later when we are not doing run time linking.
Chris@42 2309 library_names_spec='${libname}${release}.a $libname.a'
Chris@42 2310 soname_spec='${libname}${release}${shared_ext}$major'
Chris@42 2311 fi
Chris@42 2312 shlibpath_var=LIBPATH
Chris@42 2313 fi
Chris@42 2314 ;;
Chris@42 2315
Chris@42 2316 amigaos*)
Chris@42 2317 case $host_cpu in
Chris@42 2318 powerpc)
Chris@42 2319 # Since July 2007 AmigaOS4 officially supports .so libraries.
Chris@42 2320 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
Chris@42 2321 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@42 2322 ;;
Chris@42 2323 m68k)
Chris@42 2324 library_names_spec='$libname.ixlibrary $libname.a'
Chris@42 2325 # Create ${libname}_ixlibrary.a entries in /sys/libs.
Chris@42 2326 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@42 2327 ;;
Chris@42 2328 esac
Chris@42 2329 ;;
Chris@42 2330
Chris@42 2331 beos*)
Chris@42 2332 library_names_spec='${libname}${shared_ext}'
Chris@42 2333 dynamic_linker="$host_os ld.so"
Chris@42 2334 shlibpath_var=LIBRARY_PATH
Chris@42 2335 ;;
Chris@42 2336
Chris@42 2337 bsdi[[45]]*)
Chris@42 2338 version_type=linux # correct to gnu/linux during the next big refactor
Chris@42 2339 need_version=no
Chris@42 2340 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@42 2341 soname_spec='${libname}${release}${shared_ext}$major'
Chris@42 2342 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
Chris@42 2343 shlibpath_var=LD_LIBRARY_PATH
Chris@42 2344 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
Chris@42 2345 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
Chris@42 2346 # the default ld.so.conf also contains /usr/contrib/lib and
Chris@42 2347 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
Chris@42 2348 # libtool to hard-code these into programs
Chris@42 2349 ;;
Chris@42 2350
Chris@42 2351 cygwin* | mingw* | pw32* | cegcc*)
Chris@42 2352 version_type=windows
Chris@42 2353 shrext_cmds=".dll"
Chris@42 2354 need_version=no
Chris@42 2355 need_lib_prefix=no
Chris@42 2356
Chris@42 2357 case $GCC,$cc_basename in
Chris@42 2358 yes,*)
Chris@42 2359 # gcc
Chris@42 2360 library_names_spec='$libname.dll.a'
Chris@42 2361 # DLL is installed to $(libdir)/../bin by postinstall_cmds
Chris@42 2362 postinstall_cmds='base_file=`basename \${file}`~
Chris@42 2363 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
Chris@42 2364 dldir=$destdir/`dirname \$dlpath`~
Chris@42 2365 test -d \$dldir || mkdir -p \$dldir~
Chris@42 2366 $install_prog $dir/$dlname \$dldir/$dlname~
Chris@42 2367 chmod a+x \$dldir/$dlname~
Chris@42 2368 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
Chris@42 2369 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
Chris@42 2370 fi'
Chris@42 2371 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
Chris@42 2372 dlpath=$dir/\$dldll~
Chris@42 2373 $RM \$dlpath'
Chris@42 2374 shlibpath_overrides_runpath=yes
Chris@42 2375
Chris@42 2376 case $host_os in
Chris@42 2377 cygwin*)
Chris@42 2378 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
Chris@42 2379 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
Chris@42 2380 m4_if([$1], [],[
Chris@42 2381 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
Chris@42 2382 ;;
Chris@42 2383 mingw* | cegcc*)
Chris@42 2384 # MinGW DLLs use traditional 'lib' prefix
Chris@42 2385 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
Chris@42 2386 ;;
Chris@42 2387 pw32*)
Chris@42 2388 # pw32 DLLs use 'pw' prefix rather than 'lib'
Chris@42 2389 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
Chris@42 2390 ;;
Chris@42 2391 esac
Chris@42 2392 dynamic_linker='Win32 ld.exe'
Chris@42 2393 ;;
Chris@42 2394
Chris@42 2395 *,cl*)
Chris@42 2396 # Native MSVC
Chris@42 2397 libname_spec='$name'
Chris@42 2398 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
Chris@42 2399 library_names_spec='${libname}.dll.lib'
Chris@42 2400
Chris@42 2401 case $build_os in
Chris@42 2402 mingw*)
Chris@42 2403 sys_lib_search_path_spec=
Chris@42 2404 lt_save_ifs=$IFS
Chris@42 2405 IFS=';'
Chris@42 2406 for lt_path in $LIB
Chris@42 2407 do
Chris@42 2408 IFS=$lt_save_ifs
Chris@42 2409 # Let DOS variable expansion print the short 8.3 style file name.
Chris@42 2410 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
Chris@42 2411 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
Chris@42 2412 done
Chris@42 2413 IFS=$lt_save_ifs
Chris@42 2414 # Convert to MSYS style.
Chris@42 2415 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@42 2416 ;;
Chris@42 2417 cygwin*)
Chris@42 2418 # Convert to unix form, then to dos form, then back to unix form
Chris@42 2419 # but this time dos style (no spaces!) so that the unix form looks
Chris@42 2420 # like /cygdrive/c/PROGRA~1:/cygdr...
Chris@42 2421 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
Chris@42 2422 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
Chris@42 2423 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
Chris@42 2424 ;;
Chris@42 2425 *)
Chris@42 2426 sys_lib_search_path_spec="$LIB"
Chris@42 2427 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
Chris@42 2428 # It is most probably a Windows format PATH.
Chris@42 2429 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
Chris@42 2430 else
Chris@42 2431 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
Chris@42 2432 fi
Chris@42 2433 # FIXME: find the short name or the path components, as spaces are
Chris@42 2434 # common. (e.g. "Program Files" -> "PROGRA~1")
Chris@42 2435 ;;
Chris@42 2436 esac
Chris@42 2437
Chris@42 2438 # DLL is installed to $(libdir)/../bin by postinstall_cmds
Chris@42 2439 postinstall_cmds='base_file=`basename \${file}`~
Chris@42 2440 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
Chris@42 2441 dldir=$destdir/`dirname \$dlpath`~
Chris@42 2442 test -d \$dldir || mkdir -p \$dldir~
Chris@42 2443 $install_prog $dir/$dlname \$dldir/$dlname'
Chris@42 2444 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
Chris@42 2445 dlpath=$dir/\$dldll~
Chris@42 2446 $RM \$dlpath'
Chris@42 2447 shlibpath_overrides_runpath=yes
Chris@42 2448 dynamic_linker='Win32 link.exe'
Chris@42 2449 ;;
Chris@42 2450
Chris@42 2451 *)
Chris@42 2452 # Assume MSVC wrapper
Chris@42 2453 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
Chris@42 2454 dynamic_linker='Win32 ld.exe'
Chris@42 2455 ;;
Chris@42 2456 esac
Chris@42 2457 # FIXME: first we should search . and the directory the executable is in
Chris@42 2458 shlibpath_var=PATH
Chris@42 2459 ;;
Chris@42 2460
Chris@42 2461 darwin* | rhapsody*)
Chris@42 2462 dynamic_linker="$host_os dyld"
Chris@42 2463 version_type=darwin
Chris@42 2464 need_lib_prefix=no
Chris@42 2465 need_version=no
Chris@42 2466 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
Chris@42 2467 soname_spec='${libname}${release}${major}$shared_ext'
Chris@42 2468 shlibpath_overrides_runpath=yes
Chris@42 2469 shlibpath_var=DYLD_LIBRARY_PATH
Chris@42 2470 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
Chris@42 2471 m4_if([$1], [],[
Chris@42 2472 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
Chris@42 2473 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
Chris@42 2474 ;;
Chris@42 2475
Chris@42 2476 dgux*)
Chris@42 2477 version_type=linux # correct to gnu/linux during the next big refactor
Chris@42 2478 need_lib_prefix=no
Chris@42 2479 need_version=no
Chris@42 2480 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
Chris@42 2481 soname_spec='${libname}${release}${shared_ext}$major'
Chris@42 2482 shlibpath_var=LD_LIBRARY_PATH
Chris@42 2483 ;;
Chris@42 2484
Chris@42 2485 freebsd* | dragonfly*)
Chris@42 2486 # DragonFly does not have aout. When/if they implement a new
Chris@42 2487 # versioning mechanism, adjust this.
Chris@42 2488 if test -x /usr/bin/objformat; then
Chris@42 2489 objformat=`/usr/bin/objformat`
Chris@42 2490 else
Chris@42 2491 case $host_os in
Chris@42 2492 freebsd[[23]].*) objformat=aout ;;
Chris@42 2493 *) objformat=elf ;;
Chris@42 2494 esac
Chris@42 2495 fi
Chris@42 2496 version_type=freebsd-$objformat
Chris@42 2497 case $version_type in
Chris@42 2498 freebsd-elf*)
Chris@42 2499 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
Chris@42 2500 need_version=no
Chris@42 2501 need_lib_prefix=no
Chris@42 2502 ;;
Chris@42 2503 freebsd-*)
Chris@42 2504 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
Chris@42 2505 need_version=yes
Chris@42 2506 ;;
Chris@42 2507 esac
Chris@42 2508 shlibpath_var=LD_LIBRARY_PATH
Chris@42 2509 case $host_os in
Chris@42 2510 freebsd2.*)
Chris@42 2511 shlibpath_overrides_runpath=yes
Chris@42 2512 ;;
Chris@42 2513 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
Chris@42 2514 shlibpath_overrides_runpath=yes
Chris@42 2515 hardcode_into_libs=yes
Chris@42 2516 ;;
Chris@42 2517 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
Chris@42 2518 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
Chris@42 2519 shlibpath_overrides_runpath=no
Chris@42 2520 hardcode_into_libs=yes
Chris@42 2521 ;;
Chris@42 2522 *) # from 4.6 on, and DragonFly
Chris@42 2523 shlibpath_overrides_runpath=yes
Chris@42 2524 hardcode_into_libs=yes
Chris@42 2525 ;;
Chris@42 2526 esac
Chris@42 2527 ;;
Chris@42 2528
Chris@42 2529 haiku*)
Chris@42 2530 version_type=linux # correct to gnu/linux during the next big refactor
Chris@42 2531 need_lib_prefix=no
Chris@42 2532 need_version=no
Chris@42 2533 dynamic_linker="$host_os runtime_loader"
Chris@42 2534 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
Chris@42 2535 soname_spec='${libname}${release}${shared_ext}$major'
Chris@42 2536 shlibpath_var=LIBRARY_PATH
Chris@42 2537 shlibpath_overrides_runpath=yes
Chris@42 2538 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
Chris@42 2539 hardcode_into_libs=yes
Chris@42 2540 ;;
Chris@42 2541
Chris@42 2542 hpux9* | hpux10* | hpux11*)
Chris@42 2543 # Give a soname corresponding to the major version so that dld.sl refuses to
Chris@42 2544 # link against other versions.
Chris@42 2545 version_type=sunos
Chris@42 2546 need_lib_prefix=no
Chris@42 2547 need_version=no
Chris@42 2548 case $host_cpu in
Chris@42 2549 ia64*)
Chris@42 2550 shrext_cmds='.so'
Chris@42 2551 hardcode_into_libs=yes
Chris@42 2552 dynamic_linker="$host_os dld.so"
Chris@42 2553 shlibpath_var=LD_LIBRARY_PATH
Chris@42 2554 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
Chris@42 2555 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@42 2556 soname_spec='${libname}${release}${shared_ext}$major'
Chris@42 2557 if test "X$HPUX_IA64_MODE" = X32; then
Chris@42 2558 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
Chris@42 2559 else
Chris@42 2560 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
Chris@42 2561 fi
Chris@42 2562 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
Chris@42 2563 ;;
Chris@42 2564 hppa*64*)
Chris@42 2565 shrext_cmds='.sl'
Chris@42 2566 hardcode_into_libs=yes
Chris@42 2567 dynamic_linker="$host_os dld.sl"
Chris@42 2568 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
Chris@42 2569 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
Chris@42 2570 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@42 2571 soname_spec='${libname}${release}${shared_ext}$major'
Chris@42 2572 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
Chris@42 2573 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
Chris@42 2574 ;;
Chris@42 2575 *)
Chris@42 2576 shrext_cmds='.sl'
Chris@42 2577 dynamic_linker="$host_os dld.sl"
Chris@42 2578 shlibpath_var=SHLIB_PATH
Chris@42 2579 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
Chris@42 2580 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@42 2581 soname_spec='${libname}${release}${shared_ext}$major'
Chris@42 2582 ;;
Chris@42 2583 esac
Chris@42 2584 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
Chris@42 2585 postinstall_cmds='chmod 555 $lib'
Chris@42 2586 # or fails outright, so override atomically:
Chris@42 2587 install_override_mode=555
Chris@42 2588 ;;
Chris@42 2589
Chris@42 2590 interix[[3-9]]*)
Chris@42 2591 version_type=linux # correct to gnu/linux during the next big refactor
Chris@42 2592 need_lib_prefix=no
Chris@42 2593 need_version=no
Chris@42 2594 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
Chris@42 2595 soname_spec='${libname}${release}${shared_ext}$major'
Chris@42 2596 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
Chris@42 2597 shlibpath_var=LD_LIBRARY_PATH
Chris@42 2598 shlibpath_overrides_runpath=no
Chris@42 2599 hardcode_into_libs=yes
Chris@42 2600 ;;
Chris@42 2601
Chris@42 2602 irix5* | irix6* | nonstopux*)
Chris@42 2603 case $host_os in
Chris@42 2604 nonstopux*) version_type=nonstopux ;;
Chris@42 2605 *)
Chris@42 2606 if test "$lt_cv_prog_gnu_ld" = yes; then
Chris@42 2607 version_type=linux # correct to gnu/linux during the next big refactor
Chris@42 2608 else
Chris@42 2609 version_type=irix
Chris@42 2610 fi ;;
Chris@42 2611 esac
Chris@42 2612 need_lib_prefix=no
Chris@42 2613 need_version=no
Chris@42 2614 soname_spec='${libname}${release}${shared_ext}$major'
Chris@42 2615 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
Chris@42 2616 case $host_os in
Chris@42 2617 irix5* | nonstopux*)
Chris@42 2618 libsuff= shlibsuff=
Chris@42 2619 ;;
Chris@42 2620 *)
Chris@42 2621 case $LD in # libtool.m4 will add one of these switches to LD
Chris@42 2622 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
Chris@42 2623 libsuff= shlibsuff= libmagic=32-bit;;
Chris@42 2624 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
Chris@42 2625 libsuff=32 shlibsuff=N32 libmagic=N32;;
Chris@42 2626 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
Chris@42 2627 libsuff=64 shlibsuff=64 libmagic=64-bit;;
Chris@42 2628 *) libsuff= shlibsuff= libmagic=never-match;;
Chris@42 2629 esac
Chris@42 2630 ;;
Chris@42 2631 esac
Chris@42 2632 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
Chris@42 2633 shlibpath_overrides_runpath=no
Chris@42 2634 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
Chris@42 2635 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
Chris@42 2636 hardcode_into_libs=yes
Chris@42 2637 ;;
Chris@42 2638
Chris@42 2639 # No shared lib support for Linux oldld, aout, or coff.
Chris@42 2640 linux*oldld* | linux*aout* | linux*coff*)
Chris@42 2641 dynamic_linker=no
Chris@42 2642 ;;
Chris@42 2643
Chris@42 2644 # This must be glibc/ELF.
Chris@42 2645 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
Chris@42 2646 version_type=linux # correct to gnu/linux during the next big refactor
Chris@42 2647 need_lib_prefix=no
Chris@42 2648 need_version=no
Chris@42 2649 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@42 2650 soname_spec='${libname}${release}${shared_ext}$major'
Chris@42 2651 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
Chris@42 2652 shlibpath_var=LD_LIBRARY_PATH
Chris@42 2653 shlibpath_overrides_runpath=no
Chris@42 2654
Chris@42 2655 # Some binutils ld are patched to set DT_RUNPATH
Chris@42 2656 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
Chris@42 2657 [lt_cv_shlibpath_overrides_runpath=no
Chris@42 2658 save_LDFLAGS=$LDFLAGS
Chris@42 2659 save_libdir=$libdir
Chris@42 2660 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
Chris@42 2661 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
Chris@42 2662 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
Chris@42 2663 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
Chris@42 2664 [lt_cv_shlibpath_overrides_runpath=yes])])
Chris@42 2665 LDFLAGS=$save_LDFLAGS
Chris@42 2666 libdir=$save_libdir
Chris@42 2667 ])
Chris@42 2668 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
Chris@42 2669
Chris@42 2670 # This implies no fast_install, which is unacceptable.
Chris@42 2671 # Some rework will be needed to allow for fast_install
Chris@42 2672 # before this can be enabled.
Chris@42 2673 hardcode_into_libs=yes
Chris@42 2674
Chris@42 2675 # Append ld.so.conf contents to the search path
Chris@42 2676 if test -f /etc/ld.so.conf; then
Chris@42 2677 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@42 2678 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
Chris@42 2679 fi
Chris@42 2680
Chris@42 2681 # We used to test for /lib/ld.so.1 and disable shared libraries on
Chris@42 2682 # powerpc, because MkLinux only supported shared libraries with the
Chris@42 2683 # GNU dynamic linker. Since this was broken with cross compilers,
Chris@42 2684 # most powerpc-linux boxes support dynamic linking these days and
Chris@42 2685 # people can always --disable-shared, the test was removed, and we
Chris@42 2686 # assume the GNU/Linux dynamic linker is in use.
Chris@42 2687 dynamic_linker='GNU/Linux ld.so'
Chris@42 2688 ;;
Chris@42 2689
Chris@42 2690 netbsdelf*-gnu)
Chris@42 2691 version_type=linux
Chris@42 2692 need_lib_prefix=no
Chris@42 2693 need_version=no
Chris@42 2694 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
Chris@42 2695 soname_spec='${libname}${release}${shared_ext}$major'
Chris@42 2696 shlibpath_var=LD_LIBRARY_PATH
Chris@42 2697 shlibpath_overrides_runpath=no
Chris@42 2698 hardcode_into_libs=yes
Chris@42 2699 dynamic_linker='NetBSD ld.elf_so'
Chris@42 2700 ;;
Chris@42 2701
Chris@42 2702 netbsd*)
Chris@42 2703 version_type=sunos
Chris@42 2704 need_lib_prefix=no
Chris@42 2705 need_version=no
Chris@42 2706 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
Chris@42 2707 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
Chris@42 2708 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
Chris@42 2709 dynamic_linker='NetBSD (a.out) ld.so'
Chris@42 2710 else
Chris@42 2711 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
Chris@42 2712 soname_spec='${libname}${release}${shared_ext}$major'
Chris@42 2713 dynamic_linker='NetBSD ld.elf_so'
Chris@42 2714 fi
Chris@42 2715 shlibpath_var=LD_LIBRARY_PATH
Chris@42 2716 shlibpath_overrides_runpath=yes
Chris@42 2717 hardcode_into_libs=yes
Chris@42 2718 ;;
Chris@42 2719
Chris@42 2720 newsos6)
Chris@42 2721 version_type=linux # correct to gnu/linux during the next big refactor
Chris@42 2722 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@42 2723 shlibpath_var=LD_LIBRARY_PATH
Chris@42 2724 shlibpath_overrides_runpath=yes
Chris@42 2725 ;;
Chris@42 2726
Chris@42 2727 *nto* | *qnx*)
Chris@42 2728 version_type=qnx
Chris@42 2729 need_lib_prefix=no
Chris@42 2730 need_version=no
Chris@42 2731 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@42 2732 soname_spec='${libname}${release}${shared_ext}$major'
Chris@42 2733 shlibpath_var=LD_LIBRARY_PATH
Chris@42 2734 shlibpath_overrides_runpath=no
Chris@42 2735 hardcode_into_libs=yes
Chris@42 2736 dynamic_linker='ldqnx.so'
Chris@42 2737 ;;
Chris@42 2738
Chris@42 2739 openbsd*)
Chris@42 2740 version_type=sunos
Chris@42 2741 sys_lib_dlsearch_path_spec="/usr/lib"
Chris@42 2742 need_lib_prefix=no
Chris@42 2743 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
Chris@42 2744 case $host_os in
Chris@42 2745 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
Chris@42 2746 *) need_version=no ;;
Chris@42 2747 esac
Chris@42 2748 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
Chris@42 2749 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
Chris@42 2750 shlibpath_var=LD_LIBRARY_PATH
Chris@42 2751 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
Chris@42 2752 case $host_os in
Chris@42 2753 openbsd2.[[89]] | openbsd2.[[89]].*)
Chris@42 2754 shlibpath_overrides_runpath=no
Chris@42 2755 ;;
Chris@42 2756 *)
Chris@42 2757 shlibpath_overrides_runpath=yes
Chris@42 2758 ;;
Chris@42 2759 esac
Chris@42 2760 else
Chris@42 2761 shlibpath_overrides_runpath=yes
Chris@42 2762 fi
Chris@42 2763 ;;
Chris@42 2764
Chris@42 2765 os2*)
Chris@42 2766 libname_spec='$name'
Chris@42 2767 shrext_cmds=".dll"
Chris@42 2768 need_lib_prefix=no
Chris@42 2769 library_names_spec='$libname${shared_ext} $libname.a'
Chris@42 2770 dynamic_linker='OS/2 ld.exe'
Chris@42 2771 shlibpath_var=LIBPATH
Chris@42 2772 ;;
Chris@42 2773
Chris@42 2774 osf3* | osf4* | osf5*)
Chris@42 2775 version_type=osf
Chris@42 2776 need_lib_prefix=no
Chris@42 2777 need_version=no
Chris@42 2778 soname_spec='${libname}${release}${shared_ext}$major'
Chris@42 2779 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@42 2780 shlibpath_var=LD_LIBRARY_PATH
Chris@42 2781 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
Chris@42 2782 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
Chris@42 2783 ;;
Chris@42 2784
Chris@42 2785 rdos*)
Chris@42 2786 dynamic_linker=no
Chris@42 2787 ;;
Chris@42 2788
Chris@42 2789 solaris*)
Chris@42 2790 version_type=linux # correct to gnu/linux during the next big refactor
Chris@42 2791 need_lib_prefix=no
Chris@42 2792 need_version=no
Chris@42 2793 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@42 2794 soname_spec='${libname}${release}${shared_ext}$major'
Chris@42 2795 shlibpath_var=LD_LIBRARY_PATH
Chris@42 2796 shlibpath_overrides_runpath=yes
Chris@42 2797 hardcode_into_libs=yes
Chris@42 2798 # ldd complains unless libraries are executable
Chris@42 2799 postinstall_cmds='chmod +x $lib'
Chris@42 2800 ;;
Chris@42 2801
Chris@42 2802 sunos4*)
Chris@42 2803 version_type=sunos
Chris@42 2804 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
Chris@42 2805 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
Chris@42 2806 shlibpath_var=LD_LIBRARY_PATH
Chris@42 2807 shlibpath_overrides_runpath=yes
Chris@42 2808 if test "$with_gnu_ld" = yes; then
Chris@42 2809 need_lib_prefix=no
Chris@42 2810 fi
Chris@42 2811 need_version=yes
Chris@42 2812 ;;
Chris@42 2813
Chris@42 2814 sysv4 | sysv4.3*)
Chris@42 2815 version_type=linux # correct to gnu/linux during the next big refactor
Chris@42 2816 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@42 2817 soname_spec='${libname}${release}${shared_ext}$major'
Chris@42 2818 shlibpath_var=LD_LIBRARY_PATH
Chris@42 2819 case $host_vendor in
Chris@42 2820 sni)
Chris@42 2821 shlibpath_overrides_runpath=no
Chris@42 2822 need_lib_prefix=no
Chris@42 2823 runpath_var=LD_RUN_PATH
Chris@42 2824 ;;
Chris@42 2825 siemens)
Chris@42 2826 need_lib_prefix=no
Chris@42 2827 ;;
Chris@42 2828 motorola)
Chris@42 2829 need_lib_prefix=no
Chris@42 2830 need_version=no
Chris@42 2831 shlibpath_overrides_runpath=no
Chris@42 2832 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
Chris@42 2833 ;;
Chris@42 2834 esac
Chris@42 2835 ;;
Chris@42 2836
Chris@42 2837 sysv4*MP*)
Chris@42 2838 if test -d /usr/nec ;then
Chris@42 2839 version_type=linux # correct to gnu/linux during the next big refactor
Chris@42 2840 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
Chris@42 2841 soname_spec='$libname${shared_ext}.$major'
Chris@42 2842 shlibpath_var=LD_LIBRARY_PATH
Chris@42 2843 fi
Chris@42 2844 ;;
Chris@42 2845
Chris@42 2846 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
Chris@42 2847 version_type=freebsd-elf
Chris@42 2848 need_lib_prefix=no
Chris@42 2849 need_version=no
Chris@42 2850 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
Chris@42 2851 soname_spec='${libname}${release}${shared_ext}$major'
Chris@42 2852 shlibpath_var=LD_LIBRARY_PATH
Chris@42 2853 shlibpath_overrides_runpath=yes
Chris@42 2854 hardcode_into_libs=yes
Chris@42 2855 if test "$with_gnu_ld" = yes; then
Chris@42 2856 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
Chris@42 2857 else
Chris@42 2858 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
Chris@42 2859 case $host_os in
Chris@42 2860 sco3.2v5*)
Chris@42 2861 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
Chris@42 2862 ;;
Chris@42 2863 esac
Chris@42 2864 fi
Chris@42 2865 sys_lib_dlsearch_path_spec='/usr/lib'
Chris@42 2866 ;;
Chris@42 2867
Chris@42 2868 tpf*)
Chris@42 2869 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
Chris@42 2870 version_type=linux # correct to gnu/linux during the next big refactor
Chris@42 2871 need_lib_prefix=no
Chris@42 2872 need_version=no
Chris@42 2873 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@42 2874 shlibpath_var=LD_LIBRARY_PATH
Chris@42 2875 shlibpath_overrides_runpath=no
Chris@42 2876 hardcode_into_libs=yes
Chris@42 2877 ;;
Chris@42 2878
Chris@42 2879 uts4*)
Chris@42 2880 version_type=linux # correct to gnu/linux during the next big refactor
Chris@42 2881 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@42 2882 soname_spec='${libname}${release}${shared_ext}$major'
Chris@42 2883 shlibpath_var=LD_LIBRARY_PATH
Chris@42 2884 ;;
Chris@42 2885
Chris@42 2886 *)
Chris@42 2887 dynamic_linker=no
Chris@42 2888 ;;
Chris@42 2889 esac
Chris@42 2890 AC_MSG_RESULT([$dynamic_linker])
Chris@42 2891 test "$dynamic_linker" = no && can_build_shared=no
Chris@42 2892
Chris@42 2893 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
Chris@42 2894 if test "$GCC" = yes; then
Chris@42 2895 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
Chris@42 2896 fi
Chris@42 2897
Chris@42 2898 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
Chris@42 2899 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
Chris@42 2900 fi
Chris@42 2901 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
Chris@42 2902 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
Chris@42 2903 fi
Chris@42 2904
Chris@42 2905 _LT_DECL([], [variables_saved_for_relink], [1],
Chris@42 2906 [Variables whose values should be saved in libtool wrapper scripts and
Chris@42 2907 restored at link time])
Chris@42 2908 _LT_DECL([], [need_lib_prefix], [0],
Chris@42 2909 [Do we need the "lib" prefix for modules?])
Chris@42 2910 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
Chris@42 2911 _LT_DECL([], [version_type], [0], [Library versioning type])
Chris@42 2912 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
Chris@42 2913 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
Chris@42 2914 _LT_DECL([], [shlibpath_overrides_runpath], [0],
Chris@42 2915 [Is shlibpath searched before the hard-coded library search path?])
Chris@42 2916 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
Chris@42 2917 _LT_DECL([], [library_names_spec], [1],
Chris@42 2918 [[List of archive names. First name is the real one, the rest are links.
Chris@42 2919 The last name is the one that the linker finds with -lNAME]])
Chris@42 2920 _LT_DECL([], [soname_spec], [1],
Chris@42 2921 [[The coded name of the library, if different from the real name]])
Chris@42 2922 _LT_DECL([], [install_override_mode], [1],
Chris@42 2923 [Permission mode override for installation of shared libraries])
Chris@42 2924 _LT_DECL([], [postinstall_cmds], [2],
Chris@42 2925 [Command to use after installation of a shared archive])
Chris@42 2926 _LT_DECL([], [postuninstall_cmds], [2],
Chris@42 2927 [Command to use after uninstallation of a shared archive])
Chris@42 2928 _LT_DECL([], [finish_cmds], [2],
Chris@42 2929 [Commands used to finish a libtool library installation in a directory])
Chris@42 2930 _LT_DECL([], [finish_eval], [1],
Chris@42 2931 [[As "finish_cmds", except a single script fragment to be evaled but
Chris@42 2932 not shown]])
Chris@42 2933 _LT_DECL([], [hardcode_into_libs], [0],
Chris@42 2934 [Whether we should hardcode library paths into libraries])
Chris@42 2935 _LT_DECL([], [sys_lib_search_path_spec], [2],
Chris@42 2936 [Compile-time system search path for libraries])
Chris@42 2937 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
Chris@42 2938 [Run-time system search path for libraries])
Chris@42 2939 ])# _LT_SYS_DYNAMIC_LINKER
Chris@42 2940
Chris@42 2941
Chris@42 2942 # _LT_PATH_TOOL_PREFIX(TOOL)
Chris@42 2943 # --------------------------
Chris@42 2944 # find a file program which can recognize shared library
Chris@42 2945 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
Chris@42 2946 [m4_require([_LT_DECL_EGREP])dnl
Chris@42 2947 AC_MSG_CHECKING([for $1])
Chris@42 2948 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
Chris@42 2949 [case $MAGIC_CMD in
Chris@42 2950 [[\\/*] | ?:[\\/]*])
Chris@42 2951 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
Chris@42 2952 ;;
Chris@42 2953 *)
Chris@42 2954 lt_save_MAGIC_CMD="$MAGIC_CMD"
Chris@42 2955 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
Chris@42 2956 dnl $ac_dummy forces splitting on constant user-supplied paths.
Chris@42 2957 dnl POSIX.2 word splitting is done only on the output of word expansions,
Chris@42 2958 dnl not every word. This closes a longstanding sh security hole.
Chris@42 2959 ac_dummy="m4_if([$2], , $PATH, [$2])"
Chris@42 2960 for ac_dir in $ac_dummy; do
Chris@42 2961 IFS="$lt_save_ifs"
Chris@42 2962 test -z "$ac_dir" && ac_dir=.
Chris@42 2963 if test -f $ac_dir/$1; then
Chris@42 2964 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
Chris@42 2965 if test -n "$file_magic_test_file"; then
Chris@42 2966 case $deplibs_check_method in
Chris@42 2967 "file_magic "*)
Chris@42 2968 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
Chris@42 2969 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
Chris@42 2970 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
Chris@42 2971 $EGREP "$file_magic_regex" > /dev/null; then
Chris@42 2972 :
Chris@42 2973 else
Chris@42 2974 cat <<_LT_EOF 1>&2
Chris@42 2975
Chris@42 2976 *** Warning: the command libtool uses to detect shared libraries,
Chris@42 2977 *** $file_magic_cmd, produces output that libtool cannot recognize.
Chris@42 2978 *** The result is that libtool may fail to recognize shared libraries
Chris@42 2979 *** as such. This will affect the creation of libtool libraries that
Chris@42 2980 *** depend on shared libraries, but programs linked with such libtool
Chris@42 2981 *** libraries will work regardless of this problem. Nevertheless, you
Chris@42 2982 *** may want to report the problem to your system manager and/or to
Chris@42 2983 *** bug-libtool@gnu.org
Chris@42 2984
Chris@42 2985 _LT_EOF
Chris@42 2986 fi ;;
Chris@42 2987 esac
Chris@42 2988 fi
Chris@42 2989 break
Chris@42 2990 fi
Chris@42 2991 done
Chris@42 2992 IFS="$lt_save_ifs"
Chris@42 2993 MAGIC_CMD="$lt_save_MAGIC_CMD"
Chris@42 2994 ;;
Chris@42 2995 esac])
Chris@42 2996 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
Chris@42 2997 if test -n "$MAGIC_CMD"; then
Chris@42 2998 AC_MSG_RESULT($MAGIC_CMD)
Chris@42 2999 else
Chris@42 3000 AC_MSG_RESULT(no)
Chris@42 3001 fi
Chris@42 3002 _LT_DECL([], [MAGIC_CMD], [0],
Chris@42 3003 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
Chris@42 3004 ])# _LT_PATH_TOOL_PREFIX
Chris@42 3005
Chris@42 3006 # Old name:
Chris@42 3007 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
Chris@42 3008 dnl aclocal-1.4 backwards compatibility:
Chris@42 3009 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
Chris@42 3010
Chris@42 3011
Chris@42 3012 # _LT_PATH_MAGIC
Chris@42 3013 # --------------
Chris@42 3014 # find a file program which can recognize a shared library
Chris@42 3015 m4_defun([_LT_PATH_MAGIC],
Chris@42 3016 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
Chris@42 3017 if test -z "$lt_cv_path_MAGIC_CMD"; then
Chris@42 3018 if test -n "$ac_tool_prefix"; then
Chris@42 3019 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
Chris@42 3020 else
Chris@42 3021 MAGIC_CMD=:
Chris@42 3022 fi
Chris@42 3023 fi
Chris@42 3024 ])# _LT_PATH_MAGIC
Chris@42 3025
Chris@42 3026
Chris@42 3027 # LT_PATH_LD
Chris@42 3028 # ----------
Chris@42 3029 # find the pathname to the GNU or non-GNU linker
Chris@42 3030 AC_DEFUN([LT_PATH_LD],
Chris@42 3031 [AC_REQUIRE([AC_PROG_CC])dnl
Chris@42 3032 AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@42 3033 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
Chris@42 3034 m4_require([_LT_DECL_SED])dnl
Chris@42 3035 m4_require([_LT_DECL_EGREP])dnl
Chris@42 3036 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
Chris@42 3037
Chris@42 3038 AC_ARG_WITH([gnu-ld],
Chris@42 3039 [AS_HELP_STRING([--with-gnu-ld],
Chris@42 3040 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
Chris@42 3041 [test "$withval" = no || with_gnu_ld=yes],
Chris@42 3042 [with_gnu_ld=no])dnl
Chris@42 3043
Chris@42 3044 ac_prog=ld
Chris@42 3045 if test "$GCC" = yes; then
Chris@42 3046 # Check if gcc -print-prog-name=ld gives a path.
Chris@42 3047 AC_MSG_CHECKING([for ld used by $CC])
Chris@42 3048 case $host in
Chris@42 3049 *-*-mingw*)
Chris@42 3050 # gcc leaves a trailing carriage return which upsets mingw
Chris@42 3051 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
Chris@42 3052 *)
Chris@42 3053 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
Chris@42 3054 esac
Chris@42 3055 case $ac_prog in
Chris@42 3056 # Accept absolute paths.
Chris@42 3057 [[\\/]]* | ?:[[\\/]]*)
Chris@42 3058 re_direlt='/[[^/]][[^/]]*/\.\./'
Chris@42 3059 # Canonicalize the pathname of ld
Chris@42 3060 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
Chris@42 3061 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
Chris@42 3062 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
Chris@42 3063 done
Chris@42 3064 test -z "$LD" && LD="$ac_prog"
Chris@42 3065 ;;
Chris@42 3066 "")
Chris@42 3067 # If it fails, then pretend we aren't using GCC.
Chris@42 3068 ac_prog=ld
Chris@42 3069 ;;
Chris@42 3070 *)
Chris@42 3071 # If it is relative, then search for the first ld in PATH.
Chris@42 3072 with_gnu_ld=unknown
Chris@42 3073 ;;
Chris@42 3074 esac
Chris@42 3075 elif test "$with_gnu_ld" = yes; then
Chris@42 3076 AC_MSG_CHECKING([for GNU ld])
Chris@42 3077 else
Chris@42 3078 AC_MSG_CHECKING([for non-GNU ld])
Chris@42 3079 fi
Chris@42 3080 AC_CACHE_VAL(lt_cv_path_LD,
Chris@42 3081 [if test -z "$LD"; then
Chris@42 3082 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
Chris@42 3083 for ac_dir in $PATH; do
Chris@42 3084 IFS="$lt_save_ifs"
Chris@42 3085 test -z "$ac_dir" && ac_dir=.
Chris@42 3086 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
Chris@42 3087 lt_cv_path_LD="$ac_dir/$ac_prog"
Chris@42 3088 # Check to see if the program is GNU ld. I'd rather use --version,
Chris@42 3089 # but apparently some variants of GNU ld only accept -v.
Chris@42 3090 # Break only if it was the GNU/non-GNU ld that we prefer.
Chris@42 3091 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
Chris@42 3092 *GNU* | *'with BFD'*)
Chris@42 3093 test "$with_gnu_ld" != no && break
Chris@42 3094 ;;
Chris@42 3095 *)
Chris@42 3096 test "$with_gnu_ld" != yes && break
Chris@42 3097 ;;
Chris@42 3098 esac
Chris@42 3099 fi
Chris@42 3100 done
Chris@42 3101 IFS="$lt_save_ifs"
Chris@42 3102 else
Chris@42 3103 lt_cv_path_LD="$LD" # Let the user override the test with a path.
Chris@42 3104 fi])
Chris@42 3105 LD="$lt_cv_path_LD"
Chris@42 3106 if test -n "$LD"; then
Chris@42 3107 AC_MSG_RESULT($LD)
Chris@42 3108 else
Chris@42 3109 AC_MSG_RESULT(no)
Chris@42 3110 fi
Chris@42 3111 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
Chris@42 3112 _LT_PATH_LD_GNU
Chris@42 3113 AC_SUBST([LD])
Chris@42 3114
Chris@42 3115 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
Chris@42 3116 ])# LT_PATH_LD
Chris@42 3117
Chris@42 3118 # Old names:
Chris@42 3119 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
Chris@42 3120 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
Chris@42 3121 dnl aclocal-1.4 backwards compatibility:
Chris@42 3122 dnl AC_DEFUN([AM_PROG_LD], [])
Chris@42 3123 dnl AC_DEFUN([AC_PROG_LD], [])
Chris@42 3124
Chris@42 3125
Chris@42 3126 # _LT_PATH_LD_GNU
Chris@42 3127 #- --------------
Chris@42 3128 m4_defun([_LT_PATH_LD_GNU],
Chris@42 3129 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
Chris@42 3130 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
Chris@42 3131 case `$LD -v 2>&1 </dev/null` in
Chris@42 3132 *GNU* | *'with BFD'*)
Chris@42 3133 lt_cv_prog_gnu_ld=yes
Chris@42 3134 ;;
Chris@42 3135 *)
Chris@42 3136 lt_cv_prog_gnu_ld=no
Chris@42 3137 ;;
Chris@42 3138 esac])
Chris@42 3139 with_gnu_ld=$lt_cv_prog_gnu_ld
Chris@42 3140 ])# _LT_PATH_LD_GNU
Chris@42 3141
Chris@42 3142
Chris@42 3143 # _LT_CMD_RELOAD
Chris@42 3144 # --------------
Chris@42 3145 # find reload flag for linker
Chris@42 3146 # -- PORTME Some linkers may need a different reload flag.
Chris@42 3147 m4_defun([_LT_CMD_RELOAD],
Chris@42 3148 [AC_CACHE_CHECK([for $LD option to reload object files],
Chris@42 3149 lt_cv_ld_reload_flag,
Chris@42 3150 [lt_cv_ld_reload_flag='-r'])
Chris@42 3151 reload_flag=$lt_cv_ld_reload_flag
Chris@42 3152 case $reload_flag in
Chris@42 3153 "" | " "*) ;;
Chris@42 3154 *) reload_flag=" $reload_flag" ;;
Chris@42 3155 esac
Chris@42 3156 reload_cmds='$LD$reload_flag -o $output$reload_objs'
Chris@42 3157 case $host_os in
Chris@42 3158 cygwin* | mingw* | pw32* | cegcc*)
Chris@42 3159 if test "$GCC" != yes; then
Chris@42 3160 reload_cmds=false
Chris@42 3161 fi
Chris@42 3162 ;;
Chris@42 3163 darwin*)
Chris@42 3164 if test "$GCC" = yes; then
Chris@42 3165 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
Chris@42 3166 else
Chris@42 3167 reload_cmds='$LD$reload_flag -o $output$reload_objs'
Chris@42 3168 fi
Chris@42 3169 ;;
Chris@42 3170 esac
Chris@42 3171 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
Chris@42 3172 _LT_TAGDECL([], [reload_cmds], [2])dnl
Chris@42 3173 ])# _LT_CMD_RELOAD
Chris@42 3174
Chris@42 3175
Chris@42 3176 # _LT_CHECK_MAGIC_METHOD
Chris@42 3177 # ----------------------
Chris@42 3178 # how to check for library dependencies
Chris@42 3179 # -- PORTME fill in with the dynamic library characteristics
Chris@42 3180 m4_defun([_LT_CHECK_MAGIC_METHOD],
Chris@42 3181 [m4_require([_LT_DECL_EGREP])
Chris@42 3182 m4_require([_LT_DECL_OBJDUMP])
Chris@42 3183 AC_CACHE_CHECK([how to recognize dependent libraries],
Chris@42 3184 lt_cv_deplibs_check_method,
Chris@42 3185 [lt_cv_file_magic_cmd='$MAGIC_CMD'
Chris@42 3186 lt_cv_file_magic_test_file=
Chris@42 3187 lt_cv_deplibs_check_method='unknown'
Chris@42 3188 # Need to set the preceding variable on all platforms that support
Chris@42 3189 # interlibrary dependencies.
Chris@42 3190 # 'none' -- dependencies not supported.
Chris@42 3191 # `unknown' -- same as none, but documents that we really don't know.
Chris@42 3192 # 'pass_all' -- all dependencies passed with no checks.
Chris@42 3193 # 'test_compile' -- check by making test program.
Chris@42 3194 # 'file_magic [[regex]]' -- check by looking for files in library path
Chris@42 3195 # which responds to the $file_magic_cmd with a given extended regex.
Chris@42 3196 # If you have `file' or equivalent on your system and you're not sure
Chris@42 3197 # whether `pass_all' will *always* work, you probably want this one.
Chris@42 3198
Chris@42 3199 case $host_os in
Chris@42 3200 aix[[4-9]]*)
Chris@42 3201 lt_cv_deplibs_check_method=pass_all
Chris@42 3202 ;;
Chris@42 3203
Chris@42 3204 beos*)
Chris@42 3205 lt_cv_deplibs_check_method=pass_all
Chris@42 3206 ;;
Chris@42 3207
Chris@42 3208 bsdi[[45]]*)
Chris@42 3209 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
Chris@42 3210 lt_cv_file_magic_cmd='/usr/bin/file -L'
Chris@42 3211 lt_cv_file_magic_test_file=/shlib/libc.so
Chris@42 3212 ;;
Chris@42 3213
Chris@42 3214 cygwin*)
Chris@42 3215 # func_win32_libid is a shell function defined in ltmain.sh
Chris@42 3216 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
Chris@42 3217 lt_cv_file_magic_cmd='func_win32_libid'
Chris@42 3218 ;;
Chris@42 3219
Chris@42 3220 mingw* | pw32*)
Chris@42 3221 # Base MSYS/MinGW do not provide the 'file' command needed by
Chris@42 3222 # func_win32_libid shell function, so use a weaker test based on 'objdump',
Chris@42 3223 # unless we find 'file', for example because we are cross-compiling.
Chris@42 3224 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
Chris@42 3225 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
Chris@42 3226 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
Chris@42 3227 lt_cv_file_magic_cmd='func_win32_libid'
Chris@42 3228 else
Chris@42 3229 # Keep this pattern in sync with the one in func_win32_libid.
Chris@42 3230 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
Chris@42 3231 lt_cv_file_magic_cmd='$OBJDUMP -f'
Chris@42 3232 fi
Chris@42 3233 ;;
Chris@42 3234
Chris@42 3235 cegcc*)
Chris@42 3236 # use the weaker test based on 'objdump'. See mingw*.
Chris@42 3237 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
Chris@42 3238 lt_cv_file_magic_cmd='$OBJDUMP -f'
Chris@42 3239 ;;
Chris@42 3240
Chris@42 3241 darwin* | rhapsody*)
Chris@42 3242 lt_cv_deplibs_check_method=pass_all
Chris@42 3243 ;;
Chris@42 3244
Chris@42 3245 freebsd* | dragonfly*)
Chris@42 3246 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
Chris@42 3247 case $host_cpu in
Chris@42 3248 i*86 )
Chris@42 3249 # Not sure whether the presence of OpenBSD here was a mistake.
Chris@42 3250 # Let's accept both of them until this is cleared up.
Chris@42 3251 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
Chris@42 3252 lt_cv_file_magic_cmd=/usr/bin/file
Chris@42 3253 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
Chris@42 3254 ;;
Chris@42 3255 esac
Chris@42 3256 else
Chris@42 3257 lt_cv_deplibs_check_method=pass_all
Chris@42 3258 fi
Chris@42 3259 ;;
Chris@42 3260
Chris@42 3261 haiku*)
Chris@42 3262 lt_cv_deplibs_check_method=pass_all
Chris@42 3263 ;;
Chris@42 3264
Chris@42 3265 hpux10.20* | hpux11*)
Chris@42 3266 lt_cv_file_magic_cmd=/usr/bin/file
Chris@42 3267 case $host_cpu in
Chris@42 3268 ia64*)
Chris@42 3269 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
Chris@42 3270 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
Chris@42 3271 ;;
Chris@42 3272 hppa*64*)
Chris@42 3273 [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@42 3274 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
Chris@42 3275 ;;
Chris@42 3276 *)
Chris@42 3277 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
Chris@42 3278 lt_cv_file_magic_test_file=/usr/lib/libc.sl
Chris@42 3279 ;;
Chris@42 3280 esac
Chris@42 3281 ;;
Chris@42 3282
Chris@42 3283 interix[[3-9]]*)
Chris@42 3284 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
Chris@42 3285 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
Chris@42 3286 ;;
Chris@42 3287
Chris@42 3288 irix5* | irix6* | nonstopux*)
Chris@42 3289 case $LD in
Chris@42 3290 *-32|*"-32 ") libmagic=32-bit;;
Chris@42 3291 *-n32|*"-n32 ") libmagic=N32;;
Chris@42 3292 *-64|*"-64 ") libmagic=64-bit;;
Chris@42 3293 *) libmagic=never-match;;
Chris@42 3294 esac
Chris@42 3295 lt_cv_deplibs_check_method=pass_all
Chris@42 3296 ;;
Chris@42 3297
Chris@42 3298 # This must be glibc/ELF.
Chris@42 3299 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
Chris@42 3300 lt_cv_deplibs_check_method=pass_all
Chris@42 3301 ;;
Chris@42 3302
Chris@42 3303 netbsd* | netbsdelf*-gnu)
Chris@42 3304 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
Chris@42 3305 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
Chris@42 3306 else
Chris@42 3307 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
Chris@42 3308 fi
Chris@42 3309 ;;
Chris@42 3310
Chris@42 3311 newos6*)
Chris@42 3312 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
Chris@42 3313 lt_cv_file_magic_cmd=/usr/bin/file
Chris@42 3314 lt_cv_file_magic_test_file=/usr/lib/libnls.so
Chris@42 3315 ;;
Chris@42 3316
Chris@42 3317 *nto* | *qnx*)
Chris@42 3318 lt_cv_deplibs_check_method=pass_all
Chris@42 3319 ;;
Chris@42 3320
Chris@42 3321 openbsd*)
Chris@42 3322 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
Chris@42 3323 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
Chris@42 3324 else
Chris@42 3325 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
Chris@42 3326 fi
Chris@42 3327 ;;
Chris@42 3328
Chris@42 3329 osf3* | osf4* | osf5*)
Chris@42 3330 lt_cv_deplibs_check_method=pass_all
Chris@42 3331 ;;
Chris@42 3332
Chris@42 3333 rdos*)
Chris@42 3334 lt_cv_deplibs_check_method=pass_all
Chris@42 3335 ;;
Chris@42 3336
Chris@42 3337 solaris*)
Chris@42 3338 lt_cv_deplibs_check_method=pass_all
Chris@42 3339 ;;
Chris@42 3340
Chris@42 3341 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
Chris@42 3342 lt_cv_deplibs_check_method=pass_all
Chris@42 3343 ;;
Chris@42 3344
Chris@42 3345 sysv4 | sysv4.3*)
Chris@42 3346 case $host_vendor in
Chris@42 3347 motorola)
Chris@42 3348 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@42 3349 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
Chris@42 3350 ;;
Chris@42 3351 ncr)
Chris@42 3352 lt_cv_deplibs_check_method=pass_all
Chris@42 3353 ;;
Chris@42 3354 sequent)
Chris@42 3355 lt_cv_file_magic_cmd='/bin/file'
Chris@42 3356 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
Chris@42 3357 ;;
Chris@42 3358 sni)
Chris@42 3359 lt_cv_file_magic_cmd='/bin/file'
Chris@42 3360 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
Chris@42 3361 lt_cv_file_magic_test_file=/lib/libc.so
Chris@42 3362 ;;
Chris@42 3363 siemens)
Chris@42 3364 lt_cv_deplibs_check_method=pass_all
Chris@42 3365 ;;
Chris@42 3366 pc)
Chris@42 3367 lt_cv_deplibs_check_method=pass_all
Chris@42 3368 ;;
Chris@42 3369 esac
Chris@42 3370 ;;
Chris@42 3371
Chris@42 3372 tpf*)
Chris@42 3373 lt_cv_deplibs_check_method=pass_all
Chris@42 3374 ;;
Chris@42 3375 esac
Chris@42 3376 ])
Chris@42 3377
Chris@42 3378 file_magic_glob=
Chris@42 3379 want_nocaseglob=no
Chris@42 3380 if test "$build" = "$host"; then
Chris@42 3381 case $host_os in
Chris@42 3382 mingw* | pw32*)
Chris@42 3383 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
Chris@42 3384 want_nocaseglob=yes
Chris@42 3385 else
Chris@42 3386 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
Chris@42 3387 fi
Chris@42 3388 ;;
Chris@42 3389 esac
Chris@42 3390 fi
Chris@42 3391
Chris@42 3392 file_magic_cmd=$lt_cv_file_magic_cmd
Chris@42 3393 deplibs_check_method=$lt_cv_deplibs_check_method
Chris@42 3394 test -z "$deplibs_check_method" && deplibs_check_method=unknown
Chris@42 3395
Chris@42 3396 _LT_DECL([], [deplibs_check_method], [1],
Chris@42 3397 [Method to check whether dependent libraries are shared objects])
Chris@42 3398 _LT_DECL([], [file_magic_cmd], [1],
Chris@42 3399 [Command to use when deplibs_check_method = "file_magic"])
Chris@42 3400 _LT_DECL([], [file_magic_glob], [1],
Chris@42 3401 [How to find potential files when deplibs_check_method = "file_magic"])
Chris@42 3402 _LT_DECL([], [want_nocaseglob], [1],
Chris@42 3403 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
Chris@42 3404 ])# _LT_CHECK_MAGIC_METHOD
Chris@42 3405
Chris@42 3406
Chris@42 3407 # LT_PATH_NM
Chris@42 3408 # ----------
Chris@42 3409 # find the pathname to a BSD- or MS-compatible name lister
Chris@42 3410 AC_DEFUN([LT_PATH_NM],
Chris@42 3411 [AC_REQUIRE([AC_PROG_CC])dnl
Chris@42 3412 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
Chris@42 3413 [if test -n "$NM"; then
Chris@42 3414 # Let the user override the test.
Chris@42 3415 lt_cv_path_NM="$NM"
Chris@42 3416 else
Chris@42 3417 lt_nm_to_check="${ac_tool_prefix}nm"
Chris@42 3418 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
Chris@42 3419 lt_nm_to_check="$lt_nm_to_check nm"
Chris@42 3420 fi
Chris@42 3421 for lt_tmp_nm in $lt_nm_to_check; do
Chris@42 3422 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
Chris@42 3423 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
Chris@42 3424 IFS="$lt_save_ifs"
Chris@42 3425 test -z "$ac_dir" && ac_dir=.
Chris@42 3426 tmp_nm="$ac_dir/$lt_tmp_nm"
Chris@42 3427 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
Chris@42 3428 # Check to see if the nm accepts a BSD-compat flag.
Chris@42 3429 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
Chris@42 3430 # nm: unknown option "B" ignored
Chris@42 3431 # Tru64's nm complains that /dev/null is an invalid object file
Chris@42 3432 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
Chris@42 3433 */dev/null* | *'Invalid file or object type'*)
Chris@42 3434 lt_cv_path_NM="$tmp_nm -B"
Chris@42 3435 break
Chris@42 3436 ;;
Chris@42 3437 *)
Chris@42 3438 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
Chris@42 3439 */dev/null*)
Chris@42 3440 lt_cv_path_NM="$tmp_nm -p"
Chris@42 3441 break
Chris@42 3442 ;;
Chris@42 3443 *)
Chris@42 3444 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
Chris@42 3445 continue # so that we can try to find one that supports BSD flags
Chris@42 3446 ;;
Chris@42 3447 esac
Chris@42 3448 ;;
Chris@42 3449 esac
Chris@42 3450 fi
Chris@42 3451 done
Chris@42 3452 IFS="$lt_save_ifs"
Chris@42 3453 done
Chris@42 3454 : ${lt_cv_path_NM=no}
Chris@42 3455 fi])
Chris@42 3456 if test "$lt_cv_path_NM" != "no"; then
Chris@42 3457 NM="$lt_cv_path_NM"
Chris@42 3458 else
Chris@42 3459 # Didn't find any BSD compatible name lister, look for dumpbin.
Chris@42 3460 if test -n "$DUMPBIN"; then :
Chris@42 3461 # Let the user override the test.
Chris@42 3462 else
Chris@42 3463 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
Chris@42 3464 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
Chris@42 3465 *COFF*)
Chris@42 3466 DUMPBIN="$DUMPBIN -symbols"
Chris@42 3467 ;;
Chris@42 3468 *)
Chris@42 3469 DUMPBIN=:
Chris@42 3470 ;;
Chris@42 3471 esac
Chris@42 3472 fi
Chris@42 3473 AC_SUBST([DUMPBIN])
Chris@42 3474 if test "$DUMPBIN" != ":"; then
Chris@42 3475 NM="$DUMPBIN"
Chris@42 3476 fi
Chris@42 3477 fi
Chris@42 3478 test -z "$NM" && NM=nm
Chris@42 3479 AC_SUBST([NM])
Chris@42 3480 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
Chris@42 3481
Chris@42 3482 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
Chris@42 3483 [lt_cv_nm_interface="BSD nm"
Chris@42 3484 echo "int some_variable = 0;" > conftest.$ac_ext
Chris@42 3485 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
Chris@42 3486 (eval "$ac_compile" 2>conftest.err)
Chris@42 3487 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@42 3488 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
Chris@42 3489 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
Chris@42 3490 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@42 3491 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
Chris@42 3492 cat conftest.out >&AS_MESSAGE_LOG_FD
Chris@42 3493 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
Chris@42 3494 lt_cv_nm_interface="MS dumpbin"
Chris@42 3495 fi
Chris@42 3496 rm -f conftest*])
Chris@42 3497 ])# LT_PATH_NM
Chris@42 3498
Chris@42 3499 # Old names:
Chris@42 3500 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
Chris@42 3501 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
Chris@42 3502 dnl aclocal-1.4 backwards compatibility:
Chris@42 3503 dnl AC_DEFUN([AM_PROG_NM], [])
Chris@42 3504 dnl AC_DEFUN([AC_PROG_NM], [])
Chris@42 3505
Chris@42 3506 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
Chris@42 3507 # --------------------------------
Chris@42 3508 # how to determine the name of the shared library
Chris@42 3509 # associated with a specific link library.
Chris@42 3510 # -- PORTME fill in with the dynamic library characteristics
Chris@42 3511 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
Chris@42 3512 [m4_require([_LT_DECL_EGREP])
Chris@42 3513 m4_require([_LT_DECL_OBJDUMP])
Chris@42 3514 m4_require([_LT_DECL_DLLTOOL])
Chris@42 3515 AC_CACHE_CHECK([how to associate runtime and link libraries],
Chris@42 3516 lt_cv_sharedlib_from_linklib_cmd,
Chris@42 3517 [lt_cv_sharedlib_from_linklib_cmd='unknown'
Chris@42 3518
Chris@42 3519 case $host_os in
Chris@42 3520 cygwin* | mingw* | pw32* | cegcc*)
Chris@42 3521 # two different shell functions defined in ltmain.sh
Chris@42 3522 # decide which to use based on capabilities of $DLLTOOL
Chris@42 3523 case `$DLLTOOL --help 2>&1` in
Chris@42 3524 *--identify-strict*)
Chris@42 3525 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
Chris@42 3526 ;;
Chris@42 3527 *)
Chris@42 3528 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
Chris@42 3529 ;;
Chris@42 3530 esac
Chris@42 3531 ;;
Chris@42 3532 *)
Chris@42 3533 # fallback: assume linklib IS sharedlib
Chris@42 3534 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
Chris@42 3535 ;;
Chris@42 3536 esac
Chris@42 3537 ])
Chris@42 3538 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
Chris@42 3539 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
Chris@42 3540
Chris@42 3541 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
Chris@42 3542 [Command to associate shared and link libraries])
Chris@42 3543 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
Chris@42 3544
Chris@42 3545
Chris@42 3546 # _LT_PATH_MANIFEST_TOOL
Chris@42 3547 # ----------------------
Chris@42 3548 # locate the manifest tool
Chris@42 3549 m4_defun([_LT_PATH_MANIFEST_TOOL],
Chris@42 3550 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
Chris@42 3551 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
Chris@42 3552 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
Chris@42 3553 [lt_cv_path_mainfest_tool=no
Chris@42 3554 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
Chris@42 3555 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
Chris@42 3556 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@42 3557 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
Chris@42 3558 lt_cv_path_mainfest_tool=yes
Chris@42 3559 fi
Chris@42 3560 rm -f conftest*])
Chris@42 3561 if test "x$lt_cv_path_mainfest_tool" != xyes; then
Chris@42 3562 MANIFEST_TOOL=:
Chris@42 3563 fi
Chris@42 3564 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
Chris@42 3565 ])# _LT_PATH_MANIFEST_TOOL
Chris@42 3566
Chris@42 3567
Chris@42 3568 # LT_LIB_M
Chris@42 3569 # --------
Chris@42 3570 # check for math library
Chris@42 3571 AC_DEFUN([LT_LIB_M],
Chris@42 3572 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@42 3573 LIBM=
Chris@42 3574 case $host in
Chris@42 3575 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
Chris@42 3576 # These system don't have libm, or don't need it
Chris@42 3577 ;;
Chris@42 3578 *-ncr-sysv4.3*)
Chris@42 3579 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
Chris@42 3580 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
Chris@42 3581 ;;
Chris@42 3582 *)
Chris@42 3583 AC_CHECK_LIB(m, cos, LIBM="-lm")
Chris@42 3584 ;;
Chris@42 3585 esac
Chris@42 3586 AC_SUBST([LIBM])
Chris@42 3587 ])# LT_LIB_M
Chris@42 3588
Chris@42 3589 # Old name:
Chris@42 3590 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
Chris@42 3591 dnl aclocal-1.4 backwards compatibility:
Chris@42 3592 dnl AC_DEFUN([AC_CHECK_LIBM], [])
Chris@42 3593
Chris@42 3594
Chris@42 3595 # _LT_COMPILER_NO_RTTI([TAGNAME])
Chris@42 3596 # -------------------------------
Chris@42 3597 m4_defun([_LT_COMPILER_NO_RTTI],
Chris@42 3598 [m4_require([_LT_TAG_COMPILER])dnl
Chris@42 3599
Chris@42 3600 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
Chris@42 3601
Chris@42 3602 if test "$GCC" = yes; then
Chris@42 3603 case $cc_basename in
Chris@42 3604 nvcc*)
Chris@42 3605 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
Chris@42 3606 *)
Chris@42 3607 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
Chris@42 3608 esac
Chris@42 3609
Chris@42 3610 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
Chris@42 3611 lt_cv_prog_compiler_rtti_exceptions,
Chris@42 3612 [-fno-rtti -fno-exceptions], [],
Chris@42 3613 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
Chris@42 3614 fi
Chris@42 3615 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
Chris@42 3616 [Compiler flag to turn off builtin functions])
Chris@42 3617 ])# _LT_COMPILER_NO_RTTI
Chris@42 3618
Chris@42 3619
Chris@42 3620 # _LT_CMD_GLOBAL_SYMBOLS
Chris@42 3621 # ----------------------
Chris@42 3622 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
Chris@42 3623 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@42 3624 AC_REQUIRE([AC_PROG_CC])dnl
Chris@42 3625 AC_REQUIRE([AC_PROG_AWK])dnl
Chris@42 3626 AC_REQUIRE([LT_PATH_NM])dnl
Chris@42 3627 AC_REQUIRE([LT_PATH_LD])dnl
Chris@42 3628 m4_require([_LT_DECL_SED])dnl
Chris@42 3629 m4_require([_LT_DECL_EGREP])dnl
Chris@42 3630 m4_require([_LT_TAG_COMPILER])dnl
Chris@42 3631
Chris@42 3632 # Check for command to grab the raw symbol name followed by C symbol from nm.
Chris@42 3633 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
Chris@42 3634 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
Chris@42 3635 [
Chris@42 3636 # These are sane defaults that work on at least a few old systems.
Chris@42 3637 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
Chris@42 3638
Chris@42 3639 # Character class describing NM global symbol codes.
Chris@42 3640 symcode='[[BCDEGRST]]'
Chris@42 3641
Chris@42 3642 # Regexp to match symbols that can be accessed directly from C.
Chris@42 3643 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
Chris@42 3644
Chris@42 3645 # Define system-specific variables.
Chris@42 3646 case $host_os in
Chris@42 3647 aix*)
Chris@42 3648 symcode='[[BCDT]]'
Chris@42 3649 ;;
Chris@42 3650 cygwin* | mingw* | pw32* | cegcc*)
Chris@42 3651 symcode='[[ABCDGISTW]]'
Chris@42 3652 ;;
Chris@42 3653 hpux*)
Chris@42 3654 if test "$host_cpu" = ia64; then
Chris@42 3655 symcode='[[ABCDEGRST]]'
Chris@42 3656 fi
Chris@42 3657 ;;
Chris@42 3658 irix* | nonstopux*)
Chris@42 3659 symcode='[[BCDEGRST]]'
Chris@42 3660 ;;
Chris@42 3661 osf*)
Chris@42 3662 symcode='[[BCDEGQRST]]'
Chris@42 3663 ;;
Chris@42 3664 solaris*)
Chris@42 3665 symcode='[[BDRT]]'
Chris@42 3666 ;;
Chris@42 3667 sco3.2v5*)
Chris@42 3668 symcode='[[DT]]'
Chris@42 3669 ;;
Chris@42 3670 sysv4.2uw2*)
Chris@42 3671 symcode='[[DT]]'
Chris@42 3672 ;;
Chris@42 3673 sysv5* | sco5v6* | unixware* | OpenUNIX*)
Chris@42 3674 symcode='[[ABDT]]'
Chris@42 3675 ;;
Chris@42 3676 sysv4)
Chris@42 3677 symcode='[[DFNSTU]]'
Chris@42 3678 ;;
Chris@42 3679 esac
Chris@42 3680
Chris@42 3681 # If we're using GNU nm, then use its standard symbol codes.
Chris@42 3682 case `$NM -V 2>&1` in
Chris@42 3683 *GNU* | *'with BFD'*)
Chris@42 3684 symcode='[[ABCDGIRSTW]]' ;;
Chris@42 3685 esac
Chris@42 3686
Chris@42 3687 # Transform an extracted symbol line into a proper C declaration.
Chris@42 3688 # Some systems (esp. on ia64) link data and code symbols differently,
Chris@42 3689 # so use this general approach.
Chris@42 3690 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
Chris@42 3691
Chris@42 3692 # Transform an extracted symbol line into symbol name and symbol address
Chris@42 3693 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@42 3694 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@42 3695
Chris@42 3696 # Handle CRLF in mingw tool chain
Chris@42 3697 opt_cr=
Chris@42 3698 case $build_os in
Chris@42 3699 mingw*)
Chris@42 3700 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
Chris@42 3701 ;;
Chris@42 3702 esac
Chris@42 3703
Chris@42 3704 # Try without a prefix underscore, then with it.
Chris@42 3705 for ac_symprfx in "" "_"; do
Chris@42 3706
Chris@42 3707 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
Chris@42 3708 symxfrm="\\1 $ac_symprfx\\2 \\2"
Chris@42 3709
Chris@42 3710 # Write the raw and C identifiers.
Chris@42 3711 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
Chris@42 3712 # Fake it for dumpbin and say T for any non-static function
Chris@42 3713 # and D for any global variable.
Chris@42 3714 # Also find C++ and __fastcall symbols from MSVC++,
Chris@42 3715 # which start with @ or ?.
Chris@42 3716 lt_cv_sys_global_symbol_pipe="$AWK ['"\
Chris@42 3717 " {last_section=section; section=\$ 3};"\
Chris@42 3718 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
Chris@42 3719 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
Chris@42 3720 " \$ 0!~/External *\|/{next};"\
Chris@42 3721 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
Chris@42 3722 " {if(hide[section]) next};"\
Chris@42 3723 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
Chris@42 3724 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
Chris@42 3725 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
Chris@42 3726 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
Chris@42 3727 " ' prfx=^$ac_symprfx]"
Chris@42 3728 else
Chris@42 3729 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
Chris@42 3730 fi
Chris@42 3731 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
Chris@42 3732
Chris@42 3733 # Check to see that the pipe works correctly.
Chris@42 3734 pipe_works=no
Chris@42 3735
Chris@42 3736 rm -f conftest*
Chris@42 3737 cat > conftest.$ac_ext <<_LT_EOF
Chris@42 3738 #ifdef __cplusplus
Chris@42 3739 extern "C" {
Chris@42 3740 #endif
Chris@42 3741 char nm_test_var;
Chris@42 3742 void nm_test_func(void);
Chris@42 3743 void nm_test_func(void){}
Chris@42 3744 #ifdef __cplusplus
Chris@42 3745 }
Chris@42 3746 #endif
Chris@42 3747 int main(){nm_test_var='a';nm_test_func();return(0);}
Chris@42 3748 _LT_EOF
Chris@42 3749
Chris@42 3750 if AC_TRY_EVAL(ac_compile); then
Chris@42 3751 # Now try to grab the symbols.
Chris@42 3752 nlist=conftest.nm
Chris@42 3753 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
Chris@42 3754 # Try sorting and uniquifying the output.
Chris@42 3755 if sort "$nlist" | uniq > "$nlist"T; then
Chris@42 3756 mv -f "$nlist"T "$nlist"
Chris@42 3757 else
Chris@42 3758 rm -f "$nlist"T
Chris@42 3759 fi
Chris@42 3760
Chris@42 3761 # Make sure that we snagged all the symbols we need.
Chris@42 3762 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
Chris@42 3763 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
Chris@42 3764 cat <<_LT_EOF > conftest.$ac_ext
Chris@42 3765 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
Chris@42 3766 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
Chris@42 3767 /* DATA imports from DLLs on WIN32 con't be const, because runtime
Chris@42 3768 relocations are performed -- see ld's documentation on pseudo-relocs. */
Chris@42 3769 # define LT@&t@_DLSYM_CONST
Chris@42 3770 #elif defined(__osf__)
Chris@42 3771 /* This system does not cope well with relocations in const data. */
Chris@42 3772 # define LT@&t@_DLSYM_CONST
Chris@42 3773 #else
Chris@42 3774 # define LT@&t@_DLSYM_CONST const
Chris@42 3775 #endif
Chris@42 3776
Chris@42 3777 #ifdef __cplusplus
Chris@42 3778 extern "C" {
Chris@42 3779 #endif
Chris@42 3780
Chris@42 3781 _LT_EOF
Chris@42 3782 # Now generate the symbol file.
Chris@42 3783 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
Chris@42 3784
Chris@42 3785 cat <<_LT_EOF >> conftest.$ac_ext
Chris@42 3786
Chris@42 3787 /* The mapping between symbol names and symbols. */
Chris@42 3788 LT@&t@_DLSYM_CONST struct {
Chris@42 3789 const char *name;
Chris@42 3790 void *address;
Chris@42 3791 }
Chris@42 3792 lt__PROGRAM__LTX_preloaded_symbols[[]] =
Chris@42 3793 {
Chris@42 3794 { "@PROGRAM@", (void *) 0 },
Chris@42 3795 _LT_EOF
Chris@42 3796 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
Chris@42 3797 cat <<\_LT_EOF >> conftest.$ac_ext
Chris@42 3798 {0, (void *) 0}
Chris@42 3799 };
Chris@42 3800
Chris@42 3801 /* This works around a problem in FreeBSD linker */
Chris@42 3802 #ifdef FREEBSD_WORKAROUND
Chris@42 3803 static const void *lt_preloaded_setup() {
Chris@42 3804 return lt__PROGRAM__LTX_preloaded_symbols;
Chris@42 3805 }
Chris@42 3806 #endif
Chris@42 3807
Chris@42 3808 #ifdef __cplusplus
Chris@42 3809 }
Chris@42 3810 #endif
Chris@42 3811 _LT_EOF
Chris@42 3812 # Now try linking the two files.
Chris@42 3813 mv conftest.$ac_objext conftstm.$ac_objext
Chris@42 3814 lt_globsym_save_LIBS=$LIBS
Chris@42 3815 lt_globsym_save_CFLAGS=$CFLAGS
Chris@42 3816 LIBS="conftstm.$ac_objext"
Chris@42 3817 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
Chris@42 3818 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
Chris@42 3819 pipe_works=yes
Chris@42 3820 fi
Chris@42 3821 LIBS=$lt_globsym_save_LIBS
Chris@42 3822 CFLAGS=$lt_globsym_save_CFLAGS
Chris@42 3823 else
Chris@42 3824 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
Chris@42 3825 fi
Chris@42 3826 else
Chris@42 3827 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
Chris@42 3828 fi
Chris@42 3829 else
Chris@42 3830 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
Chris@42 3831 fi
Chris@42 3832 else
Chris@42 3833 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
Chris@42 3834 cat conftest.$ac_ext >&5
Chris@42 3835 fi
Chris@42 3836 rm -rf conftest* conftst*
Chris@42 3837
Chris@42 3838 # Do not use the global_symbol_pipe unless it works.
Chris@42 3839 if test "$pipe_works" = yes; then
Chris@42 3840 break
Chris@42 3841 else
Chris@42 3842 lt_cv_sys_global_symbol_pipe=
Chris@42 3843 fi
Chris@42 3844 done
Chris@42 3845 ])
Chris@42 3846 if test -z "$lt_cv_sys_global_symbol_pipe"; then
Chris@42 3847 lt_cv_sys_global_symbol_to_cdecl=
Chris@42 3848 fi
Chris@42 3849 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
Chris@42 3850 AC_MSG_RESULT(failed)
Chris@42 3851 else
Chris@42 3852 AC_MSG_RESULT(ok)
Chris@42 3853 fi
Chris@42 3854
Chris@42 3855 # Response file support.
Chris@42 3856 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
Chris@42 3857 nm_file_list_spec='@'
Chris@42 3858 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
Chris@42 3859 nm_file_list_spec='@'
Chris@42 3860 fi
Chris@42 3861
Chris@42 3862 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
Chris@42 3863 [Take the output of nm and produce a listing of raw symbols and C names])
Chris@42 3864 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
Chris@42 3865 [Transform the output of nm in a proper C declaration])
Chris@42 3866 _LT_DECL([global_symbol_to_c_name_address],
Chris@42 3867 [lt_cv_sys_global_symbol_to_c_name_address], [1],
Chris@42 3868 [Transform the output of nm in a C name address pair])
Chris@42 3869 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
Chris@42 3870 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
Chris@42 3871 [Transform the output of nm in a C name address pair when lib prefix is needed])
Chris@42 3872 _LT_DECL([], [nm_file_list_spec], [1],
Chris@42 3873 [Specify filename containing input files for $NM])
Chris@42 3874 ]) # _LT_CMD_GLOBAL_SYMBOLS
Chris@42 3875
Chris@42 3876
Chris@42 3877 # _LT_COMPILER_PIC([TAGNAME])
Chris@42 3878 # ---------------------------
Chris@42 3879 m4_defun([_LT_COMPILER_PIC],
Chris@42 3880 [m4_require([_LT_TAG_COMPILER])dnl
Chris@42 3881 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
Chris@42 3882 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@42 3883 _LT_TAGVAR(lt_prog_compiler_static, $1)=
Chris@42 3884
Chris@42 3885 m4_if([$1], [CXX], [
Chris@42 3886 # C++ specific cases for pic, static, wl, etc.
Chris@42 3887 if test "$GXX" = yes; then
Chris@42 3888 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@42 3889 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@42 3890
Chris@42 3891 case $host_os in
Chris@42 3892 aix*)
Chris@42 3893 # All AIX code is PIC.
Chris@42 3894 if test "$host_cpu" = ia64; then
Chris@42 3895 # AIX 5 now supports IA64 processor
Chris@42 3896 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@42 3897 fi
Chris@42 3898 ;;
Chris@42 3899
Chris@42 3900 amigaos*)
Chris@42 3901 case $host_cpu in
Chris@42 3902 powerpc)
Chris@42 3903 # see comment about AmigaOS4 .so support
Chris@42 3904 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@42 3905 ;;
Chris@42 3906 m68k)
Chris@42 3907 # FIXME: we need at least 68020 code to build shared libraries, but
Chris@42 3908 # adding the `-m68020' flag to GCC prevents building anything better,
Chris@42 3909 # like `-m68040'.
Chris@42 3910 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
Chris@42 3911 ;;
Chris@42 3912 esac
Chris@42 3913 ;;
Chris@42 3914
Chris@42 3915 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
Chris@42 3916 # PIC is the default for these OSes.
Chris@42 3917 ;;
Chris@42 3918 mingw* | cygwin* | os2* | pw32* | cegcc*)
Chris@42 3919 # This hack is so that the source file can tell whether it is being
Chris@42 3920 # built for inclusion in a dll (and should export symbols for example).
Chris@42 3921 # Although the cygwin gcc ignores -fPIC, still need this for old-style
Chris@42 3922 # (--disable-auto-import) libraries
Chris@42 3923 m4_if([$1], [GCJ], [],
Chris@42 3924 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
Chris@42 3925 ;;
Chris@42 3926 darwin* | rhapsody*)
Chris@42 3927 # PIC is the default on this platform
Chris@42 3928 # Common symbols not allowed in MH_DYLIB files
Chris@42 3929 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
Chris@42 3930 ;;
Chris@42 3931 *djgpp*)
Chris@42 3932 # DJGPP does not support shared libraries at all
Chris@42 3933 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@42 3934 ;;
Chris@42 3935 haiku*)
Chris@42 3936 # PIC is the default for Haiku.
Chris@42 3937 # The "-static" flag exists, but is broken.
Chris@42 3938 _LT_TAGVAR(lt_prog_compiler_static, $1)=
Chris@42 3939 ;;
Chris@42 3940 interix[[3-9]]*)
Chris@42 3941 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
Chris@42 3942 # Instead, we relocate shared libraries at runtime.
Chris@42 3943 ;;
Chris@42 3944 sysv4*MP*)
Chris@42 3945 if test -d /usr/nec; then
Chris@42 3946 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
Chris@42 3947 fi
Chris@42 3948 ;;
Chris@42 3949 hpux*)
Chris@42 3950 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
Chris@42 3951 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
Chris@42 3952 # sets the default TLS model and affects inlining.
Chris@42 3953 case $host_cpu in
Chris@42 3954 hppa*64*)
Chris@42 3955 ;;
Chris@42 3956 *)
Chris@42 3957 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@42 3958 ;;
Chris@42 3959 esac
Chris@42 3960 ;;
Chris@42 3961 *qnx* | *nto*)
Chris@42 3962 # QNX uses GNU C++, but need to define -shared option too, otherwise
Chris@42 3963 # it will coredump.
Chris@42 3964 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
Chris@42 3965 ;;
Chris@42 3966 *)
Chris@42 3967 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@42 3968 ;;
Chris@42 3969 esac
Chris@42 3970 else
Chris@42 3971 case $host_os in
Chris@42 3972 aix[[4-9]]*)
Chris@42 3973 # All AIX code is PIC.
Chris@42 3974 if test "$host_cpu" = ia64; then
Chris@42 3975 # AIX 5 now supports IA64 processor
Chris@42 3976 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@42 3977 else
Chris@42 3978 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
Chris@42 3979 fi
Chris@42 3980 ;;
Chris@42 3981 chorus*)
Chris@42 3982 case $cc_basename in
Chris@42 3983 cxch68*)
Chris@42 3984 # Green Hills C++ Compiler
Chris@42 3985 # _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@42 3986 ;;
Chris@42 3987 esac
Chris@42 3988 ;;
Chris@42 3989 mingw* | cygwin* | os2* | pw32* | cegcc*)
Chris@42 3990 # This hack is so that the source file can tell whether it is being
Chris@42 3991 # built for inclusion in a dll (and should export symbols for example).
Chris@42 3992 m4_if([$1], [GCJ], [],
Chris@42 3993 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
Chris@42 3994 ;;
Chris@42 3995 dgux*)
Chris@42 3996 case $cc_basename in
Chris@42 3997 ec++*)
Chris@42 3998 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@42 3999 ;;
Chris@42 4000 ghcx*)
Chris@42 4001 # Green Hills C++ Compiler
Chris@42 4002 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@42 4003 ;;
Chris@42 4004 *)
Chris@42 4005 ;;
Chris@42 4006 esac
Chris@42 4007 ;;
Chris@42 4008 freebsd* | dragonfly*)
Chris@42 4009 # FreeBSD uses GNU C++
Chris@42 4010 ;;
Chris@42 4011 hpux9* | hpux10* | hpux11*)
Chris@42 4012 case $cc_basename in
Chris@42 4013 CC*)
Chris@42 4014 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@42 4015 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
Chris@42 4016 if test "$host_cpu" != ia64; then
Chris@42 4017 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
Chris@42 4018 fi
Chris@42 4019 ;;
Chris@42 4020 aCC*)
Chris@42 4021 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@42 4022 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
Chris@42 4023 case $host_cpu in
Chris@42 4024 hppa*64*|ia64*)
Chris@42 4025 # +Z the default
Chris@42 4026 ;;
Chris@42 4027 *)
Chris@42 4028 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
Chris@42 4029 ;;
Chris@42 4030 esac
Chris@42 4031 ;;
Chris@42 4032 *)
Chris@42 4033 ;;
Chris@42 4034 esac
Chris@42 4035 ;;
Chris@42 4036 interix*)
Chris@42 4037 # This is c89, which is MS Visual C++ (no shared libs)
Chris@42 4038 # Anyone wants to do a port?
Chris@42 4039 ;;
Chris@42 4040 irix5* | irix6* | nonstopux*)
Chris@42 4041 case $cc_basename in
Chris@42 4042 CC*)
Chris@42 4043 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@42 4044 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@42 4045 # CC pic flag -KPIC is the default.
Chris@42 4046 ;;
Chris@42 4047 *)
Chris@42 4048 ;;
Chris@42 4049 esac
Chris@42 4050 ;;
Chris@42 4051 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
Chris@42 4052 case $cc_basename in
Chris@42 4053 KCC*)
Chris@42 4054 # KAI C++ Compiler
Chris@42 4055 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
Chris@42 4056 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@42 4057 ;;
Chris@42 4058 ecpc* )
Chris@42 4059 # old Intel C++ for x86_64 which still supported -KPIC.
Chris@42 4060 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@42 4061 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@42 4062 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@42 4063 ;;
Chris@42 4064 icpc* )
Chris@42 4065 # Intel C++, used to be incompatible with GCC.
Chris@42 4066 # ICC 10 doesn't accept -KPIC any more.
Chris@42 4067 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@42 4068 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@42 4069 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@42 4070 ;;
Chris@42 4071 pgCC* | pgcpp*)
Chris@42 4072 # Portland Group C++ compiler
Chris@42 4073 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@42 4074 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
Chris@42 4075 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@42 4076 ;;
Chris@42 4077 cxx*)
Chris@42 4078 # Compaq C++
Chris@42 4079 # Make sure the PIC flag is empty. It appears that all Alpha
Chris@42 4080 # Linux and Compaq Tru64 Unix objects are PIC.
Chris@42 4081 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@42 4082 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@42 4083 ;;
Chris@42 4084 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
Chris@42 4085 # IBM XL 8.0, 9.0 on PPC and BlueGene
Chris@42 4086 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@42 4087 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
Chris@42 4088 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
Chris@42 4089 ;;
Chris@42 4090 *)
Chris@42 4091 case `$CC -V 2>&1 | sed 5q` in
Chris@42 4092 *Sun\ C*)
Chris@42 4093 # Sun C++ 5.9
Chris@42 4094 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@42 4095 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@42 4096 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
Chris@42 4097 ;;
Chris@42 4098 esac
Chris@42 4099 ;;
Chris@42 4100 esac
Chris@42 4101 ;;
Chris@42 4102 lynxos*)
Chris@42 4103 ;;
Chris@42 4104 m88k*)
Chris@42 4105 ;;
Chris@42 4106 mvs*)
Chris@42 4107 case $cc_basename in
Chris@42 4108 cxx*)
Chris@42 4109 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
Chris@42 4110 ;;
Chris@42 4111 *)
Chris@42 4112 ;;
Chris@42 4113 esac
Chris@42 4114 ;;
Chris@42 4115 netbsd* | netbsdelf*-gnu)
Chris@42 4116 ;;
Chris@42 4117 *qnx* | *nto*)
Chris@42 4118 # QNX uses GNU C++, but need to define -shared option too, otherwise
Chris@42 4119 # it will coredump.
Chris@42 4120 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
Chris@42 4121 ;;
Chris@42 4122 osf3* | osf4* | osf5*)
Chris@42 4123 case $cc_basename in
Chris@42 4124 KCC*)
Chris@42 4125 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
Chris@42 4126 ;;
Chris@42 4127 RCC*)
Chris@42 4128 # Rational C++ 2.4.1
Chris@42 4129 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@42 4130 ;;
Chris@42 4131 cxx*)
Chris@42 4132 # Digital/Compaq C++
Chris@42 4133 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@42 4134 # Make sure the PIC flag is empty. It appears that all Alpha
Chris@42 4135 # Linux and Compaq Tru64 Unix objects are PIC.
Chris@42 4136 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@42 4137 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@42 4138 ;;
Chris@42 4139 *)
Chris@42 4140 ;;
Chris@42 4141 esac
Chris@42 4142 ;;
Chris@42 4143 psos*)
Chris@42 4144 ;;
Chris@42 4145 solaris*)
Chris@42 4146 case $cc_basename in
Chris@42 4147 CC* | sunCC*)
Chris@42 4148 # Sun C++ 4.2, 5.x and Centerline C++
Chris@42 4149 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@42 4150 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@42 4151 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
Chris@42 4152 ;;
Chris@42 4153 gcx*)
Chris@42 4154 # Green Hills C++ Compiler
Chris@42 4155 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
Chris@42 4156 ;;
Chris@42 4157 *)
Chris@42 4158 ;;
Chris@42 4159 esac
Chris@42 4160 ;;
Chris@42 4161 sunos4*)
Chris@42 4162 case $cc_basename in
Chris@42 4163 CC*)
Chris@42 4164 # Sun C++ 4.x
Chris@42 4165 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@42 4166 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@42 4167 ;;
Chris@42 4168 lcc*)
Chris@42 4169 # Lucid
Chris@42 4170 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@42 4171 ;;
Chris@42 4172 *)
Chris@42 4173 ;;
Chris@42 4174 esac
Chris@42 4175 ;;
Chris@42 4176 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
Chris@42 4177 case $cc_basename in
Chris@42 4178 CC*)
Chris@42 4179 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@42 4180 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@42 4181 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@42 4182 ;;
Chris@42 4183 esac
Chris@42 4184 ;;
Chris@42 4185 tandem*)
Chris@42 4186 case $cc_basename in
Chris@42 4187 NCC*)
Chris@42 4188 # NonStop-UX NCC 3.20
Chris@42 4189 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@42 4190 ;;
Chris@42 4191 *)
Chris@42 4192 ;;
Chris@42 4193 esac
Chris@42 4194 ;;
Chris@42 4195 vxworks*)
Chris@42 4196 ;;
Chris@42 4197 *)
Chris@42 4198 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
Chris@42 4199 ;;
Chris@42 4200 esac
Chris@42 4201 fi
Chris@42 4202 ],
Chris@42 4203 [
Chris@42 4204 if test "$GCC" = yes; then
Chris@42 4205 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@42 4206 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@42 4207
Chris@42 4208 case $host_os in
Chris@42 4209 aix*)
Chris@42 4210 # All AIX code is PIC.
Chris@42 4211 if test "$host_cpu" = ia64; then
Chris@42 4212 # AIX 5 now supports IA64 processor
Chris@42 4213 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@42 4214 fi
Chris@42 4215 ;;
Chris@42 4216
Chris@42 4217 amigaos*)
Chris@42 4218 case $host_cpu in
Chris@42 4219 powerpc)
Chris@42 4220 # see comment about AmigaOS4 .so support
Chris@42 4221 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@42 4222 ;;
Chris@42 4223 m68k)
Chris@42 4224 # FIXME: we need at least 68020 code to build shared libraries, but
Chris@42 4225 # adding the `-m68020' flag to GCC prevents building anything better,
Chris@42 4226 # like `-m68040'.
Chris@42 4227 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
Chris@42 4228 ;;
Chris@42 4229 esac
Chris@42 4230 ;;
Chris@42 4231
Chris@42 4232 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
Chris@42 4233 # PIC is the default for these OSes.
Chris@42 4234 ;;
Chris@42 4235
Chris@42 4236 mingw* | cygwin* | pw32* | os2* | cegcc*)
Chris@42 4237 # This hack is so that the source file can tell whether it is being
Chris@42 4238 # built for inclusion in a dll (and should export symbols for example).
Chris@42 4239 # Although the cygwin gcc ignores -fPIC, still need this for old-style
Chris@42 4240 # (--disable-auto-import) libraries
Chris@42 4241 m4_if([$1], [GCJ], [],
Chris@42 4242 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
Chris@42 4243 ;;
Chris@42 4244
Chris@42 4245 darwin* | rhapsody*)
Chris@42 4246 # PIC is the default on this platform
Chris@42 4247 # Common symbols not allowed in MH_DYLIB files
Chris@42 4248 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
Chris@42 4249 ;;
Chris@42 4250
Chris@42 4251 haiku*)
Chris@42 4252 # PIC is the default for Haiku.
Chris@42 4253 # The "-static" flag exists, but is broken.
Chris@42 4254 _LT_TAGVAR(lt_prog_compiler_static, $1)=
Chris@42 4255 ;;
Chris@42 4256
Chris@42 4257 hpux*)
Chris@42 4258 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
Chris@42 4259 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
Chris@42 4260 # sets the default TLS model and affects inlining.
Chris@42 4261 case $host_cpu in
Chris@42 4262 hppa*64*)
Chris@42 4263 # +Z the default
Chris@42 4264 ;;
Chris@42 4265 *)
Chris@42 4266 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@42 4267 ;;
Chris@42 4268 esac
Chris@42 4269 ;;
Chris@42 4270
Chris@42 4271 interix[[3-9]]*)
Chris@42 4272 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
Chris@42 4273 # Instead, we relocate shared libraries at runtime.
Chris@42 4274 ;;
Chris@42 4275
Chris@42 4276 msdosdjgpp*)
Chris@42 4277 # Just because we use GCC doesn't mean we suddenly get shared libraries
Chris@42 4278 # on systems that don't support them.
Chris@42 4279 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
Chris@42 4280 enable_shared=no
Chris@42 4281 ;;
Chris@42 4282
Chris@42 4283 *nto* | *qnx*)
Chris@42 4284 # QNX uses GNU C++, but need to define -shared option too, otherwise
Chris@42 4285 # it will coredump.
Chris@42 4286 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
Chris@42 4287 ;;
Chris@42 4288
Chris@42 4289 sysv4*MP*)
Chris@42 4290 if test -d /usr/nec; then
Chris@42 4291 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
Chris@42 4292 fi
Chris@42 4293 ;;
Chris@42 4294
Chris@42 4295 *)
Chris@42 4296 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@42 4297 ;;
Chris@42 4298 esac
Chris@42 4299
Chris@42 4300 case $cc_basename in
Chris@42 4301 nvcc*) # Cuda Compiler Driver 2.2
Chris@42 4302 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
Chris@42 4303 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
Chris@42 4304 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
Chris@42 4305 fi
Chris@42 4306 ;;
Chris@42 4307 esac
Chris@42 4308 else
Chris@42 4309 # PORTME Check for flag to pass linker flags through the system compiler.
Chris@42 4310 case $host_os in
Chris@42 4311 aix*)
Chris@42 4312 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@42 4313 if test "$host_cpu" = ia64; then
Chris@42 4314 # AIX 5 now supports IA64 processor
Chris@42 4315 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@42 4316 else
Chris@42 4317 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
Chris@42 4318 fi
Chris@42 4319 ;;
Chris@42 4320
Chris@42 4321 mingw* | cygwin* | pw32* | os2* | cegcc*)
Chris@42 4322 # This hack is so that the source file can tell whether it is being
Chris@42 4323 # built for inclusion in a dll (and should export symbols for example).
Chris@42 4324 m4_if([$1], [GCJ], [],
Chris@42 4325 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
Chris@42 4326 ;;
Chris@42 4327
Chris@42 4328 hpux9* | hpux10* | hpux11*)
Chris@42 4329 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@42 4330 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
Chris@42 4331 # not for PA HP-UX.
Chris@42 4332 case $host_cpu in
Chris@42 4333 hppa*64*|ia64*)
Chris@42 4334 # +Z the default
Chris@42 4335 ;;
Chris@42 4336 *)
Chris@42 4337 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
Chris@42 4338 ;;
Chris@42 4339 esac
Chris@42 4340 # Is there a better lt_prog_compiler_static that works with the bundled CC?
Chris@42 4341 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
Chris@42 4342 ;;
Chris@42 4343
Chris@42 4344 irix5* | irix6* | nonstopux*)
Chris@42 4345 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@42 4346 # PIC (with -KPIC) is the default.
Chris@42 4347 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@42 4348 ;;
Chris@42 4349
Chris@42 4350 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
Chris@42 4351 case $cc_basename in
Chris@42 4352 # old Intel for x86_64 which still supported -KPIC.
Chris@42 4353 ecc*)
Chris@42 4354 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@42 4355 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@42 4356 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@42 4357 ;;
Chris@42 4358 # icc used to be incompatible with GCC.
Chris@42 4359 # ICC 10 doesn't accept -KPIC any more.
Chris@42 4360 icc* | ifort*)
Chris@42 4361 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@42 4362 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@42 4363 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@42 4364 ;;
Chris@42 4365 # Lahey Fortran 8.1.
Chris@42 4366 lf95*)
Chris@42 4367 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@42 4368 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
Chris@42 4369 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
Chris@42 4370 ;;
Chris@42 4371 nagfor*)
Chris@42 4372 # NAG Fortran compiler
Chris@42 4373 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
Chris@42 4374 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
Chris@42 4375 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@42 4376 ;;
Chris@42 4377 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
Chris@42 4378 # Portland Group compilers (*not* the Pentium gcc compiler,
Chris@42 4379 # which looks to be a dead project)
Chris@42 4380 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@42 4381 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
Chris@42 4382 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@42 4383 ;;
Chris@42 4384 ccc*)
Chris@42 4385 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@42 4386 # All Alpha code is PIC.
Chris@42 4387 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@42 4388 ;;
Chris@42 4389 xl* | bgxl* | bgf* | mpixl*)
Chris@42 4390 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
Chris@42 4391 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@42 4392 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
Chris@42 4393 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
Chris@42 4394 ;;
Chris@42 4395 *)
Chris@42 4396 case `$CC -V 2>&1 | sed 5q` in
Chris@42 4397 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
Chris@42 4398 # Sun Fortran 8.3 passes all unrecognized flags to the linker
Chris@42 4399 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@42 4400 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@42 4401 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
Chris@42 4402 ;;
Chris@42 4403 *Sun\ F* | *Sun*Fortran*)
Chris@42 4404 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@42 4405 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@42 4406 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
Chris@42 4407 ;;
Chris@42 4408 *Sun\ C*)
Chris@42 4409 # Sun C 5.9
Chris@42 4410 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@42 4411 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@42 4412 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@42 4413 ;;
Chris@42 4414 *Intel*\ [[CF]]*Compiler*)
Chris@42 4415 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@42 4416 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@42 4417 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@42 4418 ;;
Chris@42 4419 *Portland\ Group*)
Chris@42 4420 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@42 4421 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
Chris@42 4422 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@42 4423 ;;
Chris@42 4424 esac
Chris@42 4425 ;;
Chris@42 4426 esac
Chris@42 4427 ;;
Chris@42 4428
Chris@42 4429 newsos6)
Chris@42 4430 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@42 4431 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@42 4432 ;;
Chris@42 4433
Chris@42 4434 *nto* | *qnx*)
Chris@42 4435 # QNX uses GNU C++, but need to define -shared option too, otherwise
Chris@42 4436 # it will coredump.
Chris@42 4437 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
Chris@42 4438 ;;
Chris@42 4439
Chris@42 4440 osf3* | osf4* | osf5*)
Chris@42 4441 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@42 4442 # All OSF/1 code is PIC.
Chris@42 4443 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@42 4444 ;;
Chris@42 4445
Chris@42 4446 rdos*)
Chris@42 4447 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@42 4448 ;;
Chris@42 4449
Chris@42 4450 solaris*)
Chris@42 4451 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@42 4452 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@42 4453 case $cc_basename in
Chris@42 4454 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
Chris@42 4455 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
Chris@42 4456 *)
Chris@42 4457 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
Chris@42 4458 esac
Chris@42 4459 ;;
Chris@42 4460
Chris@42 4461 sunos4*)
Chris@42 4462 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
Chris@42 4463 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
Chris@42 4464 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@42 4465 ;;
Chris@42 4466
Chris@42 4467 sysv4 | sysv4.2uw2* | sysv4.3*)
Chris@42 4468 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@42 4469 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@42 4470 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@42 4471 ;;
Chris@42 4472
Chris@42 4473 sysv4*MP*)
Chris@42 4474 if test -d /usr/nec ;then
Chris@42 4475 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
Chris@42 4476 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@42 4477 fi
Chris@42 4478 ;;
Chris@42 4479
Chris@42 4480 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
Chris@42 4481 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@42 4482 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@42 4483 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@42 4484 ;;
Chris@42 4485
Chris@42 4486 unicos*)
Chris@42 4487 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@42 4488 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
Chris@42 4489 ;;
Chris@42 4490
Chris@42 4491 uts4*)
Chris@42 4492 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@42 4493 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@42 4494 ;;
Chris@42 4495
Chris@42 4496 *)
Chris@42 4497 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
Chris@42 4498 ;;
Chris@42 4499 esac
Chris@42 4500 fi
Chris@42 4501 ])
Chris@42 4502 case $host_os in
Chris@42 4503 # For platforms which do not support PIC, -DPIC is meaningless:
Chris@42 4504 *djgpp*)
Chris@42 4505 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@42 4506 ;;
Chris@42 4507 *)
Chris@42 4508 _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@42 4509 ;;
Chris@42 4510 esac
Chris@42 4511
Chris@42 4512 AC_CACHE_CHECK([for $compiler option to produce PIC],
Chris@42 4513 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
Chris@42 4514 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
Chris@42 4515 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
Chris@42 4516
Chris@42 4517 #
Chris@42 4518 # Check to make sure the PIC flag actually works.
Chris@42 4519 #
Chris@42 4520 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
Chris@42 4521 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
Chris@42 4522 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
Chris@42 4523 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
Chris@42 4524 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
Chris@42 4525 "" | " "*) ;;
Chris@42 4526 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
Chris@42 4527 esac],
Chris@42 4528 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@42 4529 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
Chris@42 4530 fi
Chris@42 4531 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
Chris@42 4532 [Additional compiler flags for building library objects])
Chris@42 4533
Chris@42 4534 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
Chris@42 4535 [How to pass a linker flag through the compiler])
Chris@42 4536 #
Chris@42 4537 # Check to make sure the static flag actually works.
Chris@42 4538 #
Chris@42 4539 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
Chris@42 4540 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
Chris@42 4541 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
Chris@42 4542 $lt_tmp_static_flag,
Chris@42 4543 [],
Chris@42 4544 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
Chris@42 4545 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
Chris@42 4546 [Compiler flag to prevent dynamic linking])
Chris@42 4547 ])# _LT_COMPILER_PIC
Chris@42 4548
Chris@42 4549
Chris@42 4550 # _LT_LINKER_SHLIBS([TAGNAME])
Chris@42 4551 # ----------------------------
Chris@42 4552 # See if the linker supports building shared libraries.
Chris@42 4553 m4_defun([_LT_LINKER_SHLIBS],
Chris@42 4554 [AC_REQUIRE([LT_PATH_LD])dnl
Chris@42 4555 AC_REQUIRE([LT_PATH_NM])dnl
Chris@42 4556 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
Chris@42 4557 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@42 4558 m4_require([_LT_DECL_EGREP])dnl
Chris@42 4559 m4_require([_LT_DECL_SED])dnl
Chris@42 4560 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
Chris@42 4561 m4_require([_LT_TAG_COMPILER])dnl
Chris@42 4562 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
Chris@42 4563 m4_if([$1], [CXX], [
Chris@42 4564 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
Chris@42 4565 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
Chris@42 4566 case $host_os in
Chris@42 4567 aix[[4-9]]*)
Chris@42 4568 # If we're using GNU nm, then we don't want the "-C" option.
Chris@42 4569 # -C means demangle to AIX nm, but means don't demangle with GNU nm
Chris@42 4570 # Also, AIX nm treats weak defined symbols like other global defined
Chris@42 4571 # symbols, whereas GNU nm marks them as "W".
Chris@42 4572 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
Chris@42 4573 _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@42 4574 else
Chris@42 4575 _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@42 4576 fi
Chris@42 4577 ;;
Chris@42 4578 pw32*)
Chris@42 4579 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
Chris@42 4580 ;;
Chris@42 4581 cygwin* | mingw* | cegcc*)
Chris@42 4582 case $cc_basename in
Chris@42 4583 cl*)
Chris@42 4584 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
Chris@42 4585 ;;
Chris@42 4586 *)
Chris@42 4587 _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@42 4588 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
Chris@42 4589 ;;
Chris@42 4590 esac
Chris@42 4591 ;;
Chris@42 4592 linux* | k*bsd*-gnu | gnu*)
Chris@42 4593 _LT_TAGVAR(link_all_deplibs, $1)=no
Chris@42 4594 ;;
Chris@42 4595 *)
Chris@42 4596 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
Chris@42 4597 ;;
Chris@42 4598 esac
Chris@42 4599 ], [
Chris@42 4600 runpath_var=
Chris@42 4601 _LT_TAGVAR(allow_undefined_flag, $1)=
Chris@42 4602 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@42 4603 _LT_TAGVAR(archive_cmds, $1)=
Chris@42 4604 _LT_TAGVAR(archive_expsym_cmds, $1)=
Chris@42 4605 _LT_TAGVAR(compiler_needs_object, $1)=no
Chris@42 4606 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
Chris@42 4607 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@42 4608 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
Chris@42 4609 _LT_TAGVAR(hardcode_automatic, $1)=no
Chris@42 4610 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@42 4611 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@42 4612 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@42 4613 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@42 4614 _LT_TAGVAR(hardcode_minus_L, $1)=no
Chris@42 4615 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
Chris@42 4616 _LT_TAGVAR(inherit_rpath, $1)=no
Chris@42 4617 _LT_TAGVAR(link_all_deplibs, $1)=unknown
Chris@42 4618 _LT_TAGVAR(module_cmds, $1)=
Chris@42 4619 _LT_TAGVAR(module_expsym_cmds, $1)=
Chris@42 4620 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
Chris@42 4621 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
Chris@42 4622 _LT_TAGVAR(thread_safe_flag_spec, $1)=
Chris@42 4623 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@42 4624 # include_expsyms should be a list of space-separated symbols to be *always*
Chris@42 4625 # included in the symbol list
Chris@42 4626 _LT_TAGVAR(include_expsyms, $1)=
Chris@42 4627 # exclude_expsyms can be an extended regexp of symbols to exclude
Chris@42 4628 # it will be wrapped by ` (' and `)$', so one must not match beginning or
Chris@42 4629 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
Chris@42 4630 # as well as any symbol that contains `d'.
Chris@42 4631 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
Chris@42 4632 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
Chris@42 4633 # platforms (ab)use it in PIC code, but their linkers get confused if
Chris@42 4634 # the symbol is explicitly referenced. Since portable code cannot
Chris@42 4635 # rely on this symbol name, it's probably fine to never include it in
Chris@42 4636 # preloaded symbol tables.
Chris@42 4637 # Exclude shared library initialization/finalization symbols.
Chris@42 4638 dnl Note also adjust exclude_expsyms for C++ above.
Chris@42 4639 extract_expsyms_cmds=
Chris@42 4640
Chris@42 4641 case $host_os in
Chris@42 4642 cygwin* | mingw* | pw32* | cegcc*)
Chris@42 4643 # FIXME: the MSVC++ port hasn't been tested in a loooong time
Chris@42 4644 # When not using gcc, we currently assume that we are using
Chris@42 4645 # Microsoft Visual C++.
Chris@42 4646 if test "$GCC" != yes; then
Chris@42 4647 with_gnu_ld=no
Chris@42 4648 fi
Chris@42 4649 ;;
Chris@42 4650 interix*)
Chris@42 4651 # we just hope/assume this is gcc and not c89 (= MSVC++)
Chris@42 4652 with_gnu_ld=yes
Chris@42 4653 ;;
Chris@42 4654 openbsd*)
Chris@42 4655 with_gnu_ld=no
Chris@42 4656 ;;
Chris@42 4657 linux* | k*bsd*-gnu | gnu*)
Chris@42 4658 _LT_TAGVAR(link_all_deplibs, $1)=no
Chris@42 4659 ;;
Chris@42 4660 esac
Chris@42 4661
Chris@42 4662 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@42 4663
Chris@42 4664 # On some targets, GNU ld is compatible enough with the native linker
Chris@42 4665 # that we're better off using the native interface for both.
Chris@42 4666 lt_use_gnu_ld_interface=no
Chris@42 4667 if test "$with_gnu_ld" = yes; then
Chris@42 4668 case $host_os in
Chris@42 4669 aix*)
Chris@42 4670 # The AIX port of GNU ld has always aspired to compatibility
Chris@42 4671 # with the native linker. However, as the warning in the GNU ld
Chris@42 4672 # block says, versions before 2.19.5* couldn't really create working
Chris@42 4673 # shared libraries, regardless of the interface used.
Chris@42 4674 case `$LD -v 2>&1` in
Chris@42 4675 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
Chris@42 4676 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
Chris@42 4677 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
Chris@42 4678 *)
Chris@42 4679 lt_use_gnu_ld_interface=yes
Chris@42 4680 ;;
Chris@42 4681 esac
Chris@42 4682 ;;
Chris@42 4683 *)
Chris@42 4684 lt_use_gnu_ld_interface=yes
Chris@42 4685 ;;
Chris@42 4686 esac
Chris@42 4687 fi
Chris@42 4688
Chris@42 4689 if test "$lt_use_gnu_ld_interface" = yes; then
Chris@42 4690 # If archive_cmds runs LD, not CC, wlarc should be empty
Chris@42 4691 wlarc='${wl}'
Chris@42 4692
Chris@42 4693 # Set some defaults for GNU ld with shared library support. These
Chris@42 4694 # are reset later if shared libraries are not supported. Putting them
Chris@42 4695 # here allows them to be overridden if necessary.
Chris@42 4696 runpath_var=LD_RUN_PATH
Chris@42 4697 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@42 4698 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
Chris@42 4699 # ancient GNU ld didn't support --whole-archive et. al.
Chris@42 4700 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
Chris@42 4701 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
Chris@42 4702 else
Chris@42 4703 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@42 4704 fi
Chris@42 4705 supports_anon_versioning=no
Chris@42 4706 case `$LD -v 2>&1` in
Chris@42 4707 *GNU\ gold*) supports_anon_versioning=yes ;;
Chris@42 4708 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
Chris@42 4709 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
Chris@42 4710 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
Chris@42 4711 *\ 2.11.*) ;; # other 2.11 versions
Chris@42 4712 *) supports_anon_versioning=yes ;;
Chris@42 4713 esac
Chris@42 4714
Chris@42 4715 # See if GNU ld supports shared libraries.
Chris@42 4716 case $host_os in
Chris@42 4717 aix[[3-9]]*)
Chris@42 4718 # On AIX/PPC, the GNU linker is very broken
Chris@42 4719 if test "$host_cpu" != ia64; then
Chris@42 4720 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 4721 cat <<_LT_EOF 1>&2
Chris@42 4722
Chris@42 4723 *** Warning: the GNU linker, at least up to release 2.19, is reported
Chris@42 4724 *** to be unable to reliably create shared libraries on AIX.
Chris@42 4725 *** Therefore, libtool is disabling shared libraries support. If you
Chris@42 4726 *** really care for shared libraries, you may want to install binutils
Chris@42 4727 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
Chris@42 4728 *** You will then need to restart the configuration process.
Chris@42 4729
Chris@42 4730 _LT_EOF
Chris@42 4731 fi
Chris@42 4732 ;;
Chris@42 4733
Chris@42 4734 amigaos*)
Chris@42 4735 case $host_cpu in
Chris@42 4736 powerpc)
Chris@42 4737 # see comment about AmigaOS4 .so support
Chris@42 4738 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@42 4739 _LT_TAGVAR(archive_expsym_cmds, $1)=''
Chris@42 4740 ;;
Chris@42 4741 m68k)
Chris@42 4742 _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@42 4743 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@42 4744 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@42 4745 ;;
Chris@42 4746 esac
Chris@42 4747 ;;
Chris@42 4748
Chris@42 4749 beos*)
Chris@42 4750 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
Chris@42 4751 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@42 4752 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
Chris@42 4753 # support --undefined. This deserves some investigation. FIXME
Chris@42 4754 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@42 4755 else
Chris@42 4756 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 4757 fi
Chris@42 4758 ;;
Chris@42 4759
Chris@42 4760 cygwin* | mingw* | pw32* | cegcc*)
Chris@42 4761 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
Chris@42 4762 # as there is no search path for DLLs.
Chris@42 4763 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@42 4764 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
Chris@42 4765 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@42 4766 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@42 4767 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@42 4768 _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@42 4769 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
Chris@42 4770
Chris@42 4771 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
Chris@42 4772 _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@42 4773 # If the export-symbols file already is a .def file (1st line
Chris@42 4774 # is EXPORTS), use it as is; otherwise, prepend...
Chris@42 4775 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
Chris@42 4776 cp $export_symbols $output_objdir/$soname.def;
Chris@42 4777 else
Chris@42 4778 echo EXPORTS > $output_objdir/$soname.def;
Chris@42 4779 cat $export_symbols >> $output_objdir/$soname.def;
Chris@42 4780 fi~
Chris@42 4781 $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@42 4782 else
Chris@42 4783 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 4784 fi
Chris@42 4785 ;;
Chris@42 4786
Chris@42 4787 haiku*)
Chris@42 4788 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@42 4789 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@42 4790 ;;
Chris@42 4791
Chris@42 4792 interix[[3-9]]*)
Chris@42 4793 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@42 4794 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@42 4795 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
Chris@42 4796 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
Chris@42 4797 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
Chris@42 4798 # Instead, shared libraries are loaded at an image base (0x10000000 by
Chris@42 4799 # default) and relocated if they conflict, which is a slow very memory
Chris@42 4800 # consuming and fragmenting process. To avoid this, we pick a random,
Chris@42 4801 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
Chris@42 4802 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
Chris@42 4803 _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@42 4804 _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@42 4805 ;;
Chris@42 4806
Chris@42 4807 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
Chris@42 4808 tmp_diet=no
Chris@42 4809 if test "$host_os" = linux-dietlibc; then
Chris@42 4810 case $cc_basename in
Chris@42 4811 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
Chris@42 4812 esac
Chris@42 4813 fi
Chris@42 4814 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
Chris@42 4815 && test "$tmp_diet" = no
Chris@42 4816 then
Chris@42 4817 tmp_addflag=' $pic_flag'
Chris@42 4818 tmp_sharedflag='-shared'
Chris@42 4819 case $cc_basename,$host_cpu in
Chris@42 4820 pgcc*) # Portland Group C compiler
Chris@42 4821 _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@42 4822 tmp_addflag=' $pic_flag'
Chris@42 4823 ;;
Chris@42 4824 pgf77* | pgf90* | pgf95* | pgfortran*)
Chris@42 4825 # Portland Group f77 and f90 compilers
Chris@42 4826 _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@42 4827 tmp_addflag=' $pic_flag -Mnomain' ;;
Chris@42 4828 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
Chris@42 4829 tmp_addflag=' -i_dynamic' ;;
Chris@42 4830 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
Chris@42 4831 tmp_addflag=' -i_dynamic -nofor_main' ;;
Chris@42 4832 ifc* | ifort*) # Intel Fortran compiler
Chris@42 4833 tmp_addflag=' -nofor_main' ;;
Chris@42 4834 lf95*) # Lahey Fortran 8.1
Chris@42 4835 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@42 4836 tmp_sharedflag='--shared' ;;
Chris@42 4837 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
Chris@42 4838 tmp_sharedflag='-qmkshrobj'
Chris@42 4839 tmp_addflag= ;;
Chris@42 4840 nvcc*) # Cuda Compiler Driver 2.2
Chris@42 4841 _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@42 4842 _LT_TAGVAR(compiler_needs_object, $1)=yes
Chris@42 4843 ;;
Chris@42 4844 esac
Chris@42 4845 case `$CC -V 2>&1 | sed 5q` in
Chris@42 4846 *Sun\ C*) # Sun C 5.9
Chris@42 4847 _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@42 4848 _LT_TAGVAR(compiler_needs_object, $1)=yes
Chris@42 4849 tmp_sharedflag='-G' ;;
Chris@42 4850 *Sun\ F*) # Sun Fortran 8.3
Chris@42 4851 tmp_sharedflag='-G' ;;
Chris@42 4852 esac
Chris@42 4853 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@42 4854
Chris@42 4855 if test "x$supports_anon_versioning" = xyes; then
Chris@42 4856 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
Chris@42 4857 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
Chris@42 4858 echo "local: *; };" >> $output_objdir/$libname.ver~
Chris@42 4859 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
Chris@42 4860 fi
Chris@42 4861
Chris@42 4862 case $cc_basename in
Chris@42 4863 xlf* | bgf* | bgxlf* | mpixlf*)
Chris@42 4864 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
Chris@42 4865 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
Chris@42 4866 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@42 4867 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
Chris@42 4868 if test "x$supports_anon_versioning" = xyes; then
Chris@42 4869 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
Chris@42 4870 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
Chris@42 4871 echo "local: *; };" >> $output_objdir/$libname.ver~
Chris@42 4872 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
Chris@42 4873 fi
Chris@42 4874 ;;
Chris@42 4875 esac
Chris@42 4876 else
Chris@42 4877 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 4878 fi
Chris@42 4879 ;;
Chris@42 4880
Chris@42 4881 netbsd* | netbsdelf*-gnu)
Chris@42 4882 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
Chris@42 4883 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
Chris@42 4884 wlarc=
Chris@42 4885 else
Chris@42 4886 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@42 4887 _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@42 4888 fi
Chris@42 4889 ;;
Chris@42 4890
Chris@42 4891 solaris*)
Chris@42 4892 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
Chris@42 4893 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 4894 cat <<_LT_EOF 1>&2
Chris@42 4895
Chris@42 4896 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
Chris@42 4897 *** create shared libraries on Solaris systems. Therefore, libtool
Chris@42 4898 *** is disabling shared libraries support. We urge you to upgrade GNU
Chris@42 4899 *** binutils to release 2.9.1 or newer. Another option is to modify
Chris@42 4900 *** your PATH or compiler configuration so that the native linker is
Chris@42 4901 *** used, and then restart.
Chris@42 4902
Chris@42 4903 _LT_EOF
Chris@42 4904 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
Chris@42 4905 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@42 4906 _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@42 4907 else
Chris@42 4908 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 4909 fi
Chris@42 4910 ;;
Chris@42 4911
Chris@42 4912 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
Chris@42 4913 case `$LD -v 2>&1` in
Chris@42 4914 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
Chris@42 4915 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 4916 cat <<_LT_EOF 1>&2
Chris@42 4917
Chris@42 4918 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
Chris@42 4919 *** reliably create shared libraries on SCO systems. Therefore, libtool
Chris@42 4920 *** is disabling shared libraries support. We urge you to upgrade GNU
Chris@42 4921 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
Chris@42 4922 *** your PATH or compiler configuration so that the native linker is
Chris@42 4923 *** used, and then restart.
Chris@42 4924
Chris@42 4925 _LT_EOF
Chris@42 4926 ;;
Chris@42 4927 *)
Chris@42 4928 # For security reasons, it is highly recommended that you always
Chris@42 4929 # use absolute paths for naming shared libraries, and exclude the
Chris@42 4930 # DT_RUNPATH tag from executables and libraries. But doing so
Chris@42 4931 # requires that you compile everything twice, which is a pain.
Chris@42 4932 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
Chris@42 4933 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@42 4934 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@42 4935 _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@42 4936 else
Chris@42 4937 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 4938 fi
Chris@42 4939 ;;
Chris@42 4940 esac
Chris@42 4941 ;;
Chris@42 4942
Chris@42 4943 sunos4*)
Chris@42 4944 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
Chris@42 4945 wlarc=
Chris@42 4946 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@42 4947 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@42 4948 ;;
Chris@42 4949
Chris@42 4950 *)
Chris@42 4951 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
Chris@42 4952 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@42 4953 _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@42 4954 else
Chris@42 4955 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 4956 fi
Chris@42 4957 ;;
Chris@42 4958 esac
Chris@42 4959
Chris@42 4960 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
Chris@42 4961 runpath_var=
Chris@42 4962 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@42 4963 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@42 4964 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@42 4965 fi
Chris@42 4966 else
Chris@42 4967 # PORTME fill in a description of your system's linker (not GNU ld)
Chris@42 4968 case $host_os in
Chris@42 4969 aix3*)
Chris@42 4970 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@42 4971 _LT_TAGVAR(always_export_symbols, $1)=yes
Chris@42 4972 _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@42 4973 # Note: this linker hardcodes the directories in LIBPATH if there
Chris@42 4974 # are no directories specified by -L.
Chris@42 4975 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@42 4976 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
Chris@42 4977 # Neither direct hardcoding nor static linking is supported with a
Chris@42 4978 # broken collect2.
Chris@42 4979 _LT_TAGVAR(hardcode_direct, $1)=unsupported
Chris@42 4980 fi
Chris@42 4981 ;;
Chris@42 4982
Chris@42 4983 aix[[4-9]]*)
Chris@42 4984 if test "$host_cpu" = ia64; then
Chris@42 4985 # On IA64, the linker does run time linking by default, so we don't
Chris@42 4986 # have to do anything special.
Chris@42 4987 aix_use_runtimelinking=no
Chris@42 4988 exp_sym_flag='-Bexport'
Chris@42 4989 no_entry_flag=""
Chris@42 4990 else
Chris@42 4991 # If we're using GNU nm, then we don't want the "-C" option.
Chris@42 4992 # -C means demangle to AIX nm, but means don't demangle with GNU nm
Chris@42 4993 # Also, AIX nm treats weak defined symbols like other global
Chris@42 4994 # defined symbols, whereas GNU nm marks them as "W".
Chris@42 4995 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
Chris@42 4996 _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@42 4997 else
Chris@42 4998 _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@42 4999 fi
Chris@42 5000 aix_use_runtimelinking=no
Chris@42 5001
Chris@42 5002 # Test if we are trying to use run time linking or normal
Chris@42 5003 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
Chris@42 5004 # need to do runtime linking.
Chris@42 5005 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
Chris@42 5006 for ld_flag in $LDFLAGS; do
Chris@42 5007 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
Chris@42 5008 aix_use_runtimelinking=yes
Chris@42 5009 break
Chris@42 5010 fi
Chris@42 5011 done
Chris@42 5012 ;;
Chris@42 5013 esac
Chris@42 5014
Chris@42 5015 exp_sym_flag='-bexport'
Chris@42 5016 no_entry_flag='-bnoentry'
Chris@42 5017 fi
Chris@42 5018
Chris@42 5019 # When large executables or shared objects are built, AIX ld can
Chris@42 5020 # have problems creating the table of contents. If linking a library
Chris@42 5021 # or program results in "error TOC overflow" add -mminimal-toc to
Chris@42 5022 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
Chris@42 5023 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
Chris@42 5024
Chris@42 5025 _LT_TAGVAR(archive_cmds, $1)=''
Chris@42 5026 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@42 5027 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@42 5028 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
Chris@42 5029 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@42 5030 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
Chris@42 5031
Chris@42 5032 if test "$GCC" = yes; then
Chris@42 5033 case $host_os in aix4.[[012]]|aix4.[[012]].*)
Chris@42 5034 # We only want to do this on AIX 4.2 and lower, the check
Chris@42 5035 # below for broken collect2 doesn't work under 4.3+
Chris@42 5036 collect2name=`${CC} -print-prog-name=collect2`
Chris@42 5037 if test -f "$collect2name" &&
Chris@42 5038 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
Chris@42 5039 then
Chris@42 5040 # We have reworked collect2
Chris@42 5041 :
Chris@42 5042 else
Chris@42 5043 # We have old collect2
Chris@42 5044 _LT_TAGVAR(hardcode_direct, $1)=unsupported
Chris@42 5045 # It fails to find uninstalled libraries when the uninstalled
Chris@42 5046 # path is not listed in the libpath. Setting hardcode_minus_L
Chris@42 5047 # to unsupported forces relinking
Chris@42 5048 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@42 5049 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@42 5050 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@42 5051 fi
Chris@42 5052 ;;
Chris@42 5053 esac
Chris@42 5054 shared_flag='-shared'
Chris@42 5055 if test "$aix_use_runtimelinking" = yes; then
Chris@42 5056 shared_flag="$shared_flag "'${wl}-G'
Chris@42 5057 fi
Chris@42 5058 _LT_TAGVAR(link_all_deplibs, $1)=no
Chris@42 5059 else
Chris@42 5060 # not using gcc
Chris@42 5061 if test "$host_cpu" = ia64; then
Chris@42 5062 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
Chris@42 5063 # chokes on -Wl,-G. The following line is correct:
Chris@42 5064 shared_flag='-G'
Chris@42 5065 else
Chris@42 5066 if test "$aix_use_runtimelinking" = yes; then
Chris@42 5067 shared_flag='${wl}-G'
Chris@42 5068 else
Chris@42 5069 shared_flag='${wl}-bM:SRE'
Chris@42 5070 fi
Chris@42 5071 fi
Chris@42 5072 fi
Chris@42 5073
Chris@42 5074 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
Chris@42 5075 # It seems that -bexpall does not export symbols beginning with
Chris@42 5076 # underscore (_), so it is better to generate a list of symbols to export.
Chris@42 5077 _LT_TAGVAR(always_export_symbols, $1)=yes
Chris@42 5078 if test "$aix_use_runtimelinking" = yes; then
Chris@42 5079 # Warning - without using the other runtime loading flags (-brtl),
Chris@42 5080 # -berok will link without error, but may produce a broken library.
Chris@42 5081 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
Chris@42 5082 # Determine the default libpath from the value encoded in an
Chris@42 5083 # empty executable.
Chris@42 5084 _LT_SYS_MODULE_PATH_AIX([$1])
Chris@42 5085 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
Chris@42 5086 _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@42 5087 else
Chris@42 5088 if test "$host_cpu" = ia64; then
Chris@42 5089 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
Chris@42 5090 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
Chris@42 5091 _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@42 5092 else
Chris@42 5093 # Determine the default libpath from the value encoded in an
Chris@42 5094 # empty executable.
Chris@42 5095 _LT_SYS_MODULE_PATH_AIX([$1])
Chris@42 5096 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
Chris@42 5097 # Warning - without using the other run time loading flags,
Chris@42 5098 # -berok will link without error, but may produce a broken library.
Chris@42 5099 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
Chris@42 5100 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
Chris@42 5101 if test "$with_gnu_ld" = yes; then
Chris@42 5102 # We only use this code for GNU lds that support --whole-archive.
Chris@42 5103 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
Chris@42 5104 else
Chris@42 5105 # Exported symbols can be pulled into shared objects from archives
Chris@42 5106 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
Chris@42 5107 fi
Chris@42 5108 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
Chris@42 5109 # This is similar to how AIX traditionally builds its shared libraries.
Chris@42 5110 _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@42 5111 fi
Chris@42 5112 fi
Chris@42 5113 ;;
Chris@42 5114
Chris@42 5115 amigaos*)
Chris@42 5116 case $host_cpu in
Chris@42 5117 powerpc)
Chris@42 5118 # see comment about AmigaOS4 .so support
Chris@42 5119 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@42 5120 _LT_TAGVAR(archive_expsym_cmds, $1)=''
Chris@42 5121 ;;
Chris@42 5122 m68k)
Chris@42 5123 _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@42 5124 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@42 5125 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@42 5126 ;;
Chris@42 5127 esac
Chris@42 5128 ;;
Chris@42 5129
Chris@42 5130 bsdi[[45]]*)
Chris@42 5131 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
Chris@42 5132 ;;
Chris@42 5133
Chris@42 5134 cygwin* | mingw* | pw32* | cegcc*)
Chris@42 5135 # When not using gcc, we currently assume that we are using
Chris@42 5136 # Microsoft Visual C++.
Chris@42 5137 # hardcode_libdir_flag_spec is actually meaningless, as there is
Chris@42 5138 # no search path for DLLs.
Chris@42 5139 case $cc_basename in
Chris@42 5140 cl*)
Chris@42 5141 # Native MSVC
Chris@42 5142 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
Chris@42 5143 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@42 5144 _LT_TAGVAR(always_export_symbols, $1)=yes
Chris@42 5145 _LT_TAGVAR(file_list_spec, $1)='@'
Chris@42 5146 # Tell ltmain to make .lib files, not .a files.
Chris@42 5147 libext=lib
Chris@42 5148 # Tell ltmain to make .dll files, not .so files.
Chris@42 5149 shrext_cmds=".dll"
Chris@42 5150 # FIXME: Setting linknames here is a bad hack.
Chris@42 5151 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
Chris@42 5152 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
Chris@42 5153 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
Chris@42 5154 else
Chris@42 5155 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
Chris@42 5156 fi~
Chris@42 5157 $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@42 5158 linknames='
Chris@42 5159 # The linker will not automatically build a static lib if we build a DLL.
Chris@42 5160 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
Chris@42 5161 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@42 5162 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
Chris@42 5163 _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@42 5164 # Don't use ranlib
Chris@42 5165 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
Chris@42 5166 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
Chris@42 5167 lt_tool_outputfile="@TOOL_OUTPUT@"~
Chris@42 5168 case $lt_outputfile in
Chris@42 5169 *.exe|*.EXE) ;;
Chris@42 5170 *)
Chris@42 5171 lt_outputfile="$lt_outputfile.exe"
Chris@42 5172 lt_tool_outputfile="$lt_tool_outputfile.exe"
Chris@42 5173 ;;
Chris@42 5174 esac~
Chris@42 5175 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
Chris@42 5176 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
Chris@42 5177 $RM "$lt_outputfile.manifest";
Chris@42 5178 fi'
Chris@42 5179 ;;
Chris@42 5180 *)
Chris@42 5181 # Assume MSVC wrapper
Chris@42 5182 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
Chris@42 5183 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@42 5184 # Tell ltmain to make .lib files, not .a files.
Chris@42 5185 libext=lib
Chris@42 5186 # Tell ltmain to make .dll files, not .so files.
Chris@42 5187 shrext_cmds=".dll"
Chris@42 5188 # FIXME: Setting linknames here is a bad hack.
Chris@42 5189 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
Chris@42 5190 # The linker will automatically build a .lib file if we build a DLL.
Chris@42 5191 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
Chris@42 5192 # FIXME: Should let the user specify the lib program.
Chris@42 5193 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
Chris@42 5194 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@42 5195 ;;
Chris@42 5196 esac
Chris@42 5197 ;;
Chris@42 5198
Chris@42 5199 darwin* | rhapsody*)
Chris@42 5200 _LT_DARWIN_LINKER_FEATURES($1)
Chris@42 5201 ;;
Chris@42 5202
Chris@42 5203 dgux*)
Chris@42 5204 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@42 5205 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@42 5206 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@42 5207 ;;
Chris@42 5208
Chris@42 5209 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
Chris@42 5210 # support. Future versions do this automatically, but an explicit c++rt0.o
Chris@42 5211 # does not break anything, and helps significantly (at the cost of a little
Chris@42 5212 # extra space).
Chris@42 5213 freebsd2.2*)
Chris@42 5214 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
Chris@42 5215 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@42 5216 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@42 5217 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@42 5218 ;;
Chris@42 5219
Chris@42 5220 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
Chris@42 5221 freebsd2.*)
Chris@42 5222 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
Chris@42 5223 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@42 5224 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@42 5225 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@42 5226 ;;
Chris@42 5227
Chris@42 5228 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
Chris@42 5229 freebsd* | dragonfly*)
Chris@42 5230 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
Chris@42 5231 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@42 5232 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@42 5233 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@42 5234 ;;
Chris@42 5235
Chris@42 5236 hpux9*)
Chris@42 5237 if test "$GCC" = yes; then
Chris@42 5238 _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@42 5239 else
Chris@42 5240 _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@42 5241 fi
Chris@42 5242 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
Chris@42 5243 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@42 5244 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@42 5245
Chris@42 5246 # hardcode_minus_L: Not really in the search PATH,
Chris@42 5247 # but as the default location of the library.
Chris@42 5248 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@42 5249 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
Chris@42 5250 ;;
Chris@42 5251
Chris@42 5252 hpux10*)
Chris@42 5253 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
Chris@42 5254 _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@42 5255 else
Chris@42 5256 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
Chris@42 5257 fi
Chris@42 5258 if test "$with_gnu_ld" = no; then
Chris@42 5259 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
Chris@42 5260 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@42 5261 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@42 5262 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@42 5263 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
Chris@42 5264 # hardcode_minus_L: Not really in the search PATH,
Chris@42 5265 # but as the default location of the library.
Chris@42 5266 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@42 5267 fi
Chris@42 5268 ;;
Chris@42 5269
Chris@42 5270 hpux11*)
Chris@42 5271 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
Chris@42 5272 case $host_cpu in
Chris@42 5273 hppa*64*)
Chris@42 5274 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@42 5275 ;;
Chris@42 5276 ia64*)
Chris@42 5277 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
Chris@42 5278 ;;
Chris@42 5279 *)
Chris@42 5280 _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@42 5281 ;;
Chris@42 5282 esac
Chris@42 5283 else
Chris@42 5284 case $host_cpu in
Chris@42 5285 hppa*64*)
Chris@42 5286 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@42 5287 ;;
Chris@42 5288 ia64*)
Chris@42 5289 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
Chris@42 5290 ;;
Chris@42 5291 *)
Chris@42 5292 m4_if($1, [], [
Chris@42 5293 # Older versions of the 11.00 compiler do not understand -b yet
Chris@42 5294 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
Chris@42 5295 _LT_LINKER_OPTION([if $CC understands -b],
Chris@42 5296 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
Chris@42 5297 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
Chris@42 5298 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
Chris@42 5299 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
Chris@42 5300 ;;
Chris@42 5301 esac
Chris@42 5302 fi
Chris@42 5303 if test "$with_gnu_ld" = no; then
Chris@42 5304 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
Chris@42 5305 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@42 5306
Chris@42 5307 case $host_cpu in
Chris@42 5308 hppa*64*|ia64*)
Chris@42 5309 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@42 5310 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@42 5311 ;;
Chris@42 5312 *)
Chris@42 5313 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@42 5314 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@42 5315 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
Chris@42 5316
Chris@42 5317 # hardcode_minus_L: Not really in the search PATH,
Chris@42 5318 # but as the default location of the library.
Chris@42 5319 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@42 5320 ;;
Chris@42 5321 esac
Chris@42 5322 fi
Chris@42 5323 ;;
Chris@42 5324
Chris@42 5325 irix5* | irix6* | nonstopux*)
Chris@42 5326 if test "$GCC" = yes; then
Chris@42 5327 _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@42 5328 # Try to use the -exported_symbol ld option, if it does not
Chris@42 5329 # work, assume that -exports_file does not work either and
Chris@42 5330 # implicitly export all symbols.
Chris@42 5331 # This should be the same for all languages, so no per-tag cache variable.
Chris@42 5332 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
Chris@42 5333 [lt_cv_irix_exported_symbol],
Chris@42 5334 [save_LDFLAGS="$LDFLAGS"
Chris@42 5335 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
Chris@42 5336 AC_LINK_IFELSE(
Chris@42 5337 [AC_LANG_SOURCE(
Chris@42 5338 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
Chris@42 5339 [C++], [[int foo (void) { return 0; }]],
Chris@42 5340 [Fortran 77], [[
Chris@42 5341 subroutine foo
Chris@42 5342 end]],
Chris@42 5343 [Fortran], [[
Chris@42 5344 subroutine foo
Chris@42 5345 end]])])],
Chris@42 5346 [lt_cv_irix_exported_symbol=yes],
Chris@42 5347 [lt_cv_irix_exported_symbol=no])
Chris@42 5348 LDFLAGS="$save_LDFLAGS"])
Chris@42 5349 if test "$lt_cv_irix_exported_symbol" = yes; then
Chris@42 5350 _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@42 5351 fi
Chris@42 5352 else
Chris@42 5353 _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@42 5354 _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@42 5355 fi
Chris@42 5356 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
Chris@42 5357 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@42 5358 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@42 5359 _LT_TAGVAR(inherit_rpath, $1)=yes
Chris@42 5360 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@42 5361 ;;
Chris@42 5362
Chris@42 5363 netbsd* | netbsdelf*-gnu)
Chris@42 5364 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
Chris@42 5365 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
Chris@42 5366 else
Chris@42 5367 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
Chris@42 5368 fi
Chris@42 5369 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@42 5370 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@42 5371 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@42 5372 ;;
Chris@42 5373
Chris@42 5374 newsos6)
Chris@42 5375 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@42 5376 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@42 5377 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@42 5378 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@42 5379 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@42 5380 ;;
Chris@42 5381
Chris@42 5382 *nto* | *qnx*)
Chris@42 5383 ;;
Chris@42 5384
Chris@42 5385 openbsd*)
Chris@42 5386 if test -f /usr/libexec/ld.so; then
Chris@42 5387 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@42 5388 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@42 5389 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@42 5390 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
Chris@42 5391 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
Chris@42 5392 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
Chris@42 5393 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
Chris@42 5394 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
Chris@42 5395 else
Chris@42 5396 case $host_os in
Chris@42 5397 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
Chris@42 5398 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
Chris@42 5399 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@42 5400 ;;
Chris@42 5401 *)
Chris@42 5402 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
Chris@42 5403 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
Chris@42 5404 ;;
Chris@42 5405 esac
Chris@42 5406 fi
Chris@42 5407 else
Chris@42 5408 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 5409 fi
Chris@42 5410 ;;
Chris@42 5411
Chris@42 5412 os2*)
Chris@42 5413 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@42 5414 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@42 5415 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@42 5416 _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@42 5417 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
Chris@42 5418 ;;
Chris@42 5419
Chris@42 5420 osf3*)
Chris@42 5421 if test "$GCC" = yes; then
Chris@42 5422 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
Chris@42 5423 _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@42 5424 else
Chris@42 5425 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
Chris@42 5426 _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@42 5427 fi
Chris@42 5428 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
Chris@42 5429 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@42 5430 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@42 5431 ;;
Chris@42 5432
Chris@42 5433 osf4* | osf5*) # as osf3* with the addition of -msym flag
Chris@42 5434 if test "$GCC" = yes; then
Chris@42 5435 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
Chris@42 5436 _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@42 5437 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@42 5438 else
Chris@42 5439 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
Chris@42 5440 _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@42 5441 _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@42 5442 $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@42 5443
Chris@42 5444 # Both c and cxx compiler support -rpath directly
Chris@42 5445 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
Chris@42 5446 fi
Chris@42 5447 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
Chris@42 5448 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@42 5449 ;;
Chris@42 5450
Chris@42 5451 solaris*)
Chris@42 5452 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
Chris@42 5453 if test "$GCC" = yes; then
Chris@42 5454 wlarc='${wl}'
Chris@42 5455 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@42 5456 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@42 5457 $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@42 5458 else
Chris@42 5459 case `$CC -V 2>&1` in
Chris@42 5460 *"Compilers 5.0"*)
Chris@42 5461 wlarc=''
Chris@42 5462 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@42 5463 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@42 5464 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
Chris@42 5465 ;;
Chris@42 5466 *)
Chris@42 5467 wlarc='${wl}'
Chris@42 5468 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@42 5469 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@42 5470 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
Chris@42 5471 ;;
Chris@42 5472 esac
Chris@42 5473 fi
Chris@42 5474 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@42 5475 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@42 5476 case $host_os in
Chris@42 5477 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
Chris@42 5478 *)
Chris@42 5479 # The compiler driver will combine and reorder linker options,
Chris@42 5480 # but understands `-z linker_flag'. GCC discards it without `$wl',
Chris@42 5481 # but is careful enough not to reorder.
Chris@42 5482 # Supported since Solaris 2.6 (maybe 2.5.1?)
Chris@42 5483 if test "$GCC" = yes; then
Chris@42 5484 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
Chris@42 5485 else
Chris@42 5486 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
Chris@42 5487 fi
Chris@42 5488 ;;
Chris@42 5489 esac
Chris@42 5490 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@42 5491 ;;
Chris@42 5492
Chris@42 5493 sunos4*)
Chris@42 5494 if test "x$host_vendor" = xsequent; then
Chris@42 5495 # Use $CC to link under sequent, because it throws in some extra .o
Chris@42 5496 # files that make .init and .fini sections work.
Chris@42 5497 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@42 5498 else
Chris@42 5499 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
Chris@42 5500 fi
Chris@42 5501 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@42 5502 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@42 5503 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@42 5504 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@42 5505 ;;
Chris@42 5506
Chris@42 5507 sysv4)
Chris@42 5508 case $host_vendor in
Chris@42 5509 sni)
Chris@42 5510 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@42 5511 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
Chris@42 5512 ;;
Chris@42 5513 siemens)
Chris@42 5514 ## LD is ld it makes a PLAMLIB
Chris@42 5515 ## CC just makes a GrossModule.
Chris@42 5516 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
Chris@42 5517 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
Chris@42 5518 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@42 5519 ;;
Chris@42 5520 motorola)
Chris@42 5521 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@42 5522 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
Chris@42 5523 ;;
Chris@42 5524 esac
Chris@42 5525 runpath_var='LD_RUN_PATH'
Chris@42 5526 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@42 5527 ;;
Chris@42 5528
Chris@42 5529 sysv4.3*)
Chris@42 5530 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@42 5531 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@42 5532 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
Chris@42 5533 ;;
Chris@42 5534
Chris@42 5535 sysv4*MP*)
Chris@42 5536 if test -d /usr/nec; then
Chris@42 5537 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@42 5538 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@42 5539 runpath_var=LD_RUN_PATH
Chris@42 5540 hardcode_runpath_var=yes
Chris@42 5541 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@42 5542 fi
Chris@42 5543 ;;
Chris@42 5544
Chris@42 5545 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
Chris@42 5546 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
Chris@42 5547 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@42 5548 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@42 5549 runpath_var='LD_RUN_PATH'
Chris@42 5550
Chris@42 5551 if test "$GCC" = yes; then
Chris@42 5552 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@42 5553 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@42 5554 else
Chris@42 5555 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@42 5556 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@42 5557 fi
Chris@42 5558 ;;
Chris@42 5559
Chris@42 5560 sysv5* | sco3.2v5* | sco5v6*)
Chris@42 5561 # Note: We can NOT use -z defs as we might desire, because we do not
Chris@42 5562 # link with -lc, and that would cause any symbols used from libc to
Chris@42 5563 # always be unresolved, which means just about no library would
Chris@42 5564 # ever link correctly. If we're not using GNU ld we use -z text
Chris@42 5565 # though, which does catch some bad symbols but isn't as heavy-handed
Chris@42 5566 # as -z defs.
Chris@42 5567 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
Chris@42 5568 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
Chris@42 5569 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@42 5570 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@42 5571 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
Chris@42 5572 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
Chris@42 5573 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@42 5574 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
Chris@42 5575 runpath_var='LD_RUN_PATH'
Chris@42 5576
Chris@42 5577 if test "$GCC" = yes; then
Chris@42 5578 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@42 5579 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@42 5580 else
Chris@42 5581 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@42 5582 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@42 5583 fi
Chris@42 5584 ;;
Chris@42 5585
Chris@42 5586 uts4*)
Chris@42 5587 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@42 5588 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@42 5589 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@42 5590 ;;
Chris@42 5591
Chris@42 5592 *)
Chris@42 5593 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 5594 ;;
Chris@42 5595 esac
Chris@42 5596
Chris@42 5597 if test x$host_vendor = xsni; then
Chris@42 5598 case $host in
Chris@42 5599 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
Chris@42 5600 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
Chris@42 5601 ;;
Chris@42 5602 esac
Chris@42 5603 fi
Chris@42 5604 fi
Chris@42 5605 ])
Chris@42 5606 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
Chris@42 5607 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
Chris@42 5608
Chris@42 5609 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
Chris@42 5610
Chris@42 5611 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
Chris@42 5612 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
Chris@42 5613 _LT_DECL([], [extract_expsyms_cmds], [2],
Chris@42 5614 [The commands to extract the exported symbol list from a shared archive])
Chris@42 5615
Chris@42 5616 #
Chris@42 5617 # Do we need to explicitly link libc?
Chris@42 5618 #
Chris@42 5619 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
Chris@42 5620 x|xyes)
Chris@42 5621 # Assume -lc should be added
Chris@42 5622 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
Chris@42 5623
Chris@42 5624 if test "$enable_shared" = yes && test "$GCC" = yes; then
Chris@42 5625 case $_LT_TAGVAR(archive_cmds, $1) in
Chris@42 5626 *'~'*)
Chris@42 5627 # FIXME: we may have to deal with multi-command sequences.
Chris@42 5628 ;;
Chris@42 5629 '$CC '*)
Chris@42 5630 # Test whether the compiler implicitly links with -lc since on some
Chris@42 5631 # systems, -lgcc has to come before -lc. If gcc already passes -lc
Chris@42 5632 # to ld, don't add -lc before -lgcc.
Chris@42 5633 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
Chris@42 5634 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
Chris@42 5635 [$RM conftest*
Chris@42 5636 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
Chris@42 5637
Chris@42 5638 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
Chris@42 5639 soname=conftest
Chris@42 5640 lib=conftest
Chris@42 5641 libobjs=conftest.$ac_objext
Chris@42 5642 deplibs=
Chris@42 5643 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
Chris@42 5644 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
Chris@42 5645 compiler_flags=-v
Chris@42 5646 linker_flags=-v
Chris@42 5647 verstring=
Chris@42 5648 output_objdir=.
Chris@42 5649 libname=conftest
Chris@42 5650 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
Chris@42 5651 _LT_TAGVAR(allow_undefined_flag, $1)=
Chris@42 5652 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
Chris@42 5653 then
Chris@42 5654 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@42 5655 else
Chris@42 5656 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
Chris@42 5657 fi
Chris@42 5658 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
Chris@42 5659 else
Chris@42 5660 cat conftest.err 1>&5
Chris@42 5661 fi
Chris@42 5662 $RM conftest*
Chris@42 5663 ])
Chris@42 5664 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
Chris@42 5665 ;;
Chris@42 5666 esac
Chris@42 5667 fi
Chris@42 5668 ;;
Chris@42 5669 esac
Chris@42 5670
Chris@42 5671 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
Chris@42 5672 [Whether or not to add -lc for building shared libraries])
Chris@42 5673 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
Chris@42 5674 [enable_shared_with_static_runtimes], [0],
Chris@42 5675 [Whether or not to disallow shared libs when runtime libs are static])
Chris@42 5676 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
Chris@42 5677 [Compiler flag to allow reflexive dlopens])
Chris@42 5678 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
Chris@42 5679 [Compiler flag to generate shared objects directly from archives])
Chris@42 5680 _LT_TAGDECL([], [compiler_needs_object], [1],
Chris@42 5681 [Whether the compiler copes with passing no objects directly])
Chris@42 5682 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
Chris@42 5683 [Create an old-style archive from a shared archive])
Chris@42 5684 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
Chris@42 5685 [Create a temporary old-style archive to link instead of a shared archive])
Chris@42 5686 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
Chris@42 5687 _LT_TAGDECL([], [archive_expsym_cmds], [2])
Chris@42 5688 _LT_TAGDECL([], [module_cmds], [2],
Chris@42 5689 [Commands used to build a loadable module if different from building
Chris@42 5690 a shared archive.])
Chris@42 5691 _LT_TAGDECL([], [module_expsym_cmds], [2])
Chris@42 5692 _LT_TAGDECL([], [with_gnu_ld], [1],
Chris@42 5693 [Whether we are building with GNU ld or not])
Chris@42 5694 _LT_TAGDECL([], [allow_undefined_flag], [1],
Chris@42 5695 [Flag that allows shared libraries with undefined symbols to be built])
Chris@42 5696 _LT_TAGDECL([], [no_undefined_flag], [1],
Chris@42 5697 [Flag that enforces no undefined symbols])
Chris@42 5698 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
Chris@42 5699 [Flag to hardcode $libdir into a binary during linking.
Chris@42 5700 This must work even if $libdir does not exist])
Chris@42 5701 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
Chris@42 5702 [Whether we need a single "-rpath" flag with a separated argument])
Chris@42 5703 _LT_TAGDECL([], [hardcode_direct], [0],
Chris@42 5704 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
Chris@42 5705 DIR into the resulting binary])
Chris@42 5706 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
Chris@42 5707 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
Chris@42 5708 DIR into the resulting binary and the resulting library dependency is
Chris@42 5709 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
Chris@42 5710 library is relocated])
Chris@42 5711 _LT_TAGDECL([], [hardcode_minus_L], [0],
Chris@42 5712 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
Chris@42 5713 into the resulting binary])
Chris@42 5714 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
Chris@42 5715 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
Chris@42 5716 into the resulting binary])
Chris@42 5717 _LT_TAGDECL([], [hardcode_automatic], [0],
Chris@42 5718 [Set to "yes" if building a shared library automatically hardcodes DIR
Chris@42 5719 into the library and all subsequent libraries and executables linked
Chris@42 5720 against it])
Chris@42 5721 _LT_TAGDECL([], [inherit_rpath], [0],
Chris@42 5722 [Set to yes if linker adds runtime paths of dependent libraries
Chris@42 5723 to runtime path list])
Chris@42 5724 _LT_TAGDECL([], [link_all_deplibs], [0],
Chris@42 5725 [Whether libtool must link a program against all its dependency libraries])
Chris@42 5726 _LT_TAGDECL([], [always_export_symbols], [0],
Chris@42 5727 [Set to "yes" if exported symbols are required])
Chris@42 5728 _LT_TAGDECL([], [export_symbols_cmds], [2],
Chris@42 5729 [The commands to list exported symbols])
Chris@42 5730 _LT_TAGDECL([], [exclude_expsyms], [1],
Chris@42 5731 [Symbols that should not be listed in the preloaded symbols])
Chris@42 5732 _LT_TAGDECL([], [include_expsyms], [1],
Chris@42 5733 [Symbols that must always be exported])
Chris@42 5734 _LT_TAGDECL([], [prelink_cmds], [2],
Chris@42 5735 [Commands necessary for linking programs (against libraries) with templates])
Chris@42 5736 _LT_TAGDECL([], [postlink_cmds], [2],
Chris@42 5737 [Commands necessary for finishing linking programs])
Chris@42 5738 _LT_TAGDECL([], [file_list_spec], [1],
Chris@42 5739 [Specify filename containing input files])
Chris@42 5740 dnl FIXME: Not yet implemented
Chris@42 5741 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
Chris@42 5742 dnl [Compiler flag to generate thread safe objects])
Chris@42 5743 ])# _LT_LINKER_SHLIBS
Chris@42 5744
Chris@42 5745
Chris@42 5746 # _LT_LANG_C_CONFIG([TAG])
Chris@42 5747 # ------------------------
Chris@42 5748 # Ensure that the configuration variables for a C compiler are suitably
Chris@42 5749 # defined. These variables are subsequently used by _LT_CONFIG to write
Chris@42 5750 # the compiler configuration to `libtool'.
Chris@42 5751 m4_defun([_LT_LANG_C_CONFIG],
Chris@42 5752 [m4_require([_LT_DECL_EGREP])dnl
Chris@42 5753 lt_save_CC="$CC"
Chris@42 5754 AC_LANG_PUSH(C)
Chris@42 5755
Chris@42 5756 # Source file extension for C test sources.
Chris@42 5757 ac_ext=c
Chris@42 5758
Chris@42 5759 # Object file extension for compiled C test sources.
Chris@42 5760 objext=o
Chris@42 5761 _LT_TAGVAR(objext, $1)=$objext
Chris@42 5762
Chris@42 5763 # Code to be used in simple compile tests
Chris@42 5764 lt_simple_compile_test_code="int some_variable = 0;"
Chris@42 5765
Chris@42 5766 # Code to be used in simple link tests
Chris@42 5767 lt_simple_link_test_code='int main(){return(0);}'
Chris@42 5768
Chris@42 5769 _LT_TAG_COMPILER
Chris@42 5770 # Save the default compiler, since it gets overwritten when the other
Chris@42 5771 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
Chris@42 5772 compiler_DEFAULT=$CC
Chris@42 5773
Chris@42 5774 # save warnings/boilerplate of simple test code
Chris@42 5775 _LT_COMPILER_BOILERPLATE
Chris@42 5776 _LT_LINKER_BOILERPLATE
Chris@42 5777
Chris@42 5778 ## CAVEAT EMPTOR:
Chris@42 5779 ## There is no encapsulation within the following macros, do not change
Chris@42 5780 ## the running order or otherwise move them around unless you know exactly
Chris@42 5781 ## what you are doing...
Chris@42 5782 if test -n "$compiler"; then
Chris@42 5783 _LT_COMPILER_NO_RTTI($1)
Chris@42 5784 _LT_COMPILER_PIC($1)
Chris@42 5785 _LT_COMPILER_C_O($1)
Chris@42 5786 _LT_COMPILER_FILE_LOCKS($1)
Chris@42 5787 _LT_LINKER_SHLIBS($1)
Chris@42 5788 _LT_SYS_DYNAMIC_LINKER($1)
Chris@42 5789 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@42 5790 LT_SYS_DLOPEN_SELF
Chris@42 5791 _LT_CMD_STRIPLIB
Chris@42 5792
Chris@42 5793 # Report which library types will actually be built
Chris@42 5794 AC_MSG_CHECKING([if libtool supports shared libraries])
Chris@42 5795 AC_MSG_RESULT([$can_build_shared])
Chris@42 5796
Chris@42 5797 AC_MSG_CHECKING([whether to build shared libraries])
Chris@42 5798 test "$can_build_shared" = "no" && enable_shared=no
Chris@42 5799
Chris@42 5800 # On AIX, shared libraries and static libraries use the same namespace, and
Chris@42 5801 # are all built from PIC.
Chris@42 5802 case $host_os in
Chris@42 5803 aix3*)
Chris@42 5804 test "$enable_shared" = yes && enable_static=no
Chris@42 5805 if test -n "$RANLIB"; then
Chris@42 5806 archive_cmds="$archive_cmds~\$RANLIB \$lib"
Chris@42 5807 postinstall_cmds='$RANLIB $lib'
Chris@42 5808 fi
Chris@42 5809 ;;
Chris@42 5810
Chris@42 5811 aix[[4-9]]*)
Chris@42 5812 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
Chris@42 5813 test "$enable_shared" = yes && enable_static=no
Chris@42 5814 fi
Chris@42 5815 ;;
Chris@42 5816 esac
Chris@42 5817 AC_MSG_RESULT([$enable_shared])
Chris@42 5818
Chris@42 5819 AC_MSG_CHECKING([whether to build static libraries])
Chris@42 5820 # Make sure either enable_shared or enable_static is yes.
Chris@42 5821 test "$enable_shared" = yes || enable_static=yes
Chris@42 5822 AC_MSG_RESULT([$enable_static])
Chris@42 5823
Chris@42 5824 _LT_CONFIG($1)
Chris@42 5825 fi
Chris@42 5826 AC_LANG_POP
Chris@42 5827 CC="$lt_save_CC"
Chris@42 5828 ])# _LT_LANG_C_CONFIG
Chris@42 5829
Chris@42 5830
Chris@42 5831 # _LT_LANG_CXX_CONFIG([TAG])
Chris@42 5832 # --------------------------
Chris@42 5833 # Ensure that the configuration variables for a C++ compiler are suitably
Chris@42 5834 # defined. These variables are subsequently used by _LT_CONFIG to write
Chris@42 5835 # the compiler configuration to `libtool'.
Chris@42 5836 m4_defun([_LT_LANG_CXX_CONFIG],
Chris@42 5837 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@42 5838 m4_require([_LT_DECL_EGREP])dnl
Chris@42 5839 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
Chris@42 5840 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
Chris@42 5841 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
Chris@42 5842 (test "X$CXX" != "Xg++"))) ; then
Chris@42 5843 AC_PROG_CXXCPP
Chris@42 5844 else
Chris@42 5845 _lt_caught_CXX_error=yes
Chris@42 5846 fi
Chris@42 5847
Chris@42 5848 AC_LANG_PUSH(C++)
Chris@42 5849 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@42 5850 _LT_TAGVAR(allow_undefined_flag, $1)=
Chris@42 5851 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@42 5852 _LT_TAGVAR(archive_expsym_cmds, $1)=
Chris@42 5853 _LT_TAGVAR(compiler_needs_object, $1)=no
Chris@42 5854 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@42 5855 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@42 5856 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@42 5857 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@42 5858 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@42 5859 _LT_TAGVAR(hardcode_minus_L, $1)=no
Chris@42 5860 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
Chris@42 5861 _LT_TAGVAR(hardcode_automatic, $1)=no
Chris@42 5862 _LT_TAGVAR(inherit_rpath, $1)=no
Chris@42 5863 _LT_TAGVAR(module_cmds, $1)=
Chris@42 5864 _LT_TAGVAR(module_expsym_cmds, $1)=
Chris@42 5865 _LT_TAGVAR(link_all_deplibs, $1)=unknown
Chris@42 5866 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@42 5867 _LT_TAGVAR(reload_flag, $1)=$reload_flag
Chris@42 5868 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
Chris@42 5869 _LT_TAGVAR(no_undefined_flag, $1)=
Chris@42 5870 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@42 5871 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
Chris@42 5872
Chris@42 5873 # Source file extension for C++ test sources.
Chris@42 5874 ac_ext=cpp
Chris@42 5875
Chris@42 5876 # Object file extension for compiled C++ test sources.
Chris@42 5877 objext=o
Chris@42 5878 _LT_TAGVAR(objext, $1)=$objext
Chris@42 5879
Chris@42 5880 # No sense in running all these tests if we already determined that
Chris@42 5881 # the CXX compiler isn't working. Some variables (like enable_shared)
Chris@42 5882 # are currently assumed to apply to all compilers on this platform,
Chris@42 5883 # and will be corrupted by setting them based on a non-working compiler.
Chris@42 5884 if test "$_lt_caught_CXX_error" != yes; then
Chris@42 5885 # Code to be used in simple compile tests
Chris@42 5886 lt_simple_compile_test_code="int some_variable = 0;"
Chris@42 5887
Chris@42 5888 # Code to be used in simple link tests
Chris@42 5889 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
Chris@42 5890
Chris@42 5891 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@42 5892 _LT_TAG_COMPILER
Chris@42 5893
Chris@42 5894 # save warnings/boilerplate of simple test code
Chris@42 5895 _LT_COMPILER_BOILERPLATE
Chris@42 5896 _LT_LINKER_BOILERPLATE
Chris@42 5897
Chris@42 5898 # Allow CC to be a program name with arguments.
Chris@42 5899 lt_save_CC=$CC
Chris@42 5900 lt_save_CFLAGS=$CFLAGS
Chris@42 5901 lt_save_LD=$LD
Chris@42 5902 lt_save_GCC=$GCC
Chris@42 5903 GCC=$GXX
Chris@42 5904 lt_save_with_gnu_ld=$with_gnu_ld
Chris@42 5905 lt_save_path_LD=$lt_cv_path_LD
Chris@42 5906 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
Chris@42 5907 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
Chris@42 5908 else
Chris@42 5909 $as_unset lt_cv_prog_gnu_ld
Chris@42 5910 fi
Chris@42 5911 if test -n "${lt_cv_path_LDCXX+set}"; then
Chris@42 5912 lt_cv_path_LD=$lt_cv_path_LDCXX
Chris@42 5913 else
Chris@42 5914 $as_unset lt_cv_path_LD
Chris@42 5915 fi
Chris@42 5916 test -z "${LDCXX+set}" || LD=$LDCXX
Chris@42 5917 CC=${CXX-"c++"}
Chris@42 5918 CFLAGS=$CXXFLAGS
Chris@42 5919 compiler=$CC
Chris@42 5920 _LT_TAGVAR(compiler, $1)=$CC
Chris@42 5921 _LT_CC_BASENAME([$compiler])
Chris@42 5922
Chris@42 5923 if test -n "$compiler"; then
Chris@42 5924 # We don't want -fno-exception when compiling C++ code, so set the
Chris@42 5925 # no_builtin_flag separately
Chris@42 5926 if test "$GXX" = yes; then
Chris@42 5927 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
Chris@42 5928 else
Chris@42 5929 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
Chris@42 5930 fi
Chris@42 5931
Chris@42 5932 if test "$GXX" = yes; then
Chris@42 5933 # Set up default GNU C++ configuration
Chris@42 5934
Chris@42 5935 LT_PATH_LD
Chris@42 5936
Chris@42 5937 # Check if GNU C++ uses GNU ld as the underlying linker, since the
Chris@42 5938 # archiving commands below assume that GNU ld is being used.
Chris@42 5939 if test "$with_gnu_ld" = yes; then
Chris@42 5940 _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@42 5941 _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@42 5942
Chris@42 5943 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@42 5944 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
Chris@42 5945
Chris@42 5946 # If archive_cmds runs LD, not CC, wlarc should be empty
Chris@42 5947 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
Chris@42 5948 # investigate it a little bit more. (MM)
Chris@42 5949 wlarc='${wl}'
Chris@42 5950
Chris@42 5951 # ancient GNU ld didn't support --whole-archive et. al.
Chris@42 5952 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
Chris@42 5953 $GREP 'no-whole-archive' > /dev/null; then
Chris@42 5954 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
Chris@42 5955 else
Chris@42 5956 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@42 5957 fi
Chris@42 5958 else
Chris@42 5959 with_gnu_ld=no
Chris@42 5960 wlarc=
Chris@42 5961
Chris@42 5962 # A generic and very simple default shared library creation
Chris@42 5963 # command for GNU C++ for the case where it uses the native
Chris@42 5964 # linker, instead of GNU ld. If possible, this setting should
Chris@42 5965 # overridden to take advantage of the native linker features on
Chris@42 5966 # the platform it is being used on.
Chris@42 5967 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
Chris@42 5968 fi
Chris@42 5969
Chris@42 5970 # Commands to make compiler produce verbose output that lists
Chris@42 5971 # what "hidden" libraries, object files and flags are used when
Chris@42 5972 # linking a shared library.
Chris@42 5973 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
Chris@42 5974
Chris@42 5975 else
Chris@42 5976 GXX=no
Chris@42 5977 with_gnu_ld=no
Chris@42 5978 wlarc=
Chris@42 5979 fi
Chris@42 5980
Chris@42 5981 # PORTME: fill in a description of your system's C++ link characteristics
Chris@42 5982 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
Chris@42 5983 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@42 5984 case $host_os in
Chris@42 5985 aix3*)
Chris@42 5986 # FIXME: insert proper C++ library support
Chris@42 5987 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 5988 ;;
Chris@42 5989 aix[[4-9]]*)
Chris@42 5990 if test "$host_cpu" = ia64; then
Chris@42 5991 # On IA64, the linker does run time linking by default, so we don't
Chris@42 5992 # have to do anything special.
Chris@42 5993 aix_use_runtimelinking=no
Chris@42 5994 exp_sym_flag='-Bexport'
Chris@42 5995 no_entry_flag=""
Chris@42 5996 else
Chris@42 5997 aix_use_runtimelinking=no
Chris@42 5998
Chris@42 5999 # Test if we are trying to use run time linking or normal
Chris@42 6000 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
Chris@42 6001 # need to do runtime linking.
Chris@42 6002 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
Chris@42 6003 for ld_flag in $LDFLAGS; do
Chris@42 6004 case $ld_flag in
Chris@42 6005 *-brtl*)
Chris@42 6006 aix_use_runtimelinking=yes
Chris@42 6007 break
Chris@42 6008 ;;
Chris@42 6009 esac
Chris@42 6010 done
Chris@42 6011 ;;
Chris@42 6012 esac
Chris@42 6013
Chris@42 6014 exp_sym_flag='-bexport'
Chris@42 6015 no_entry_flag='-bnoentry'
Chris@42 6016 fi
Chris@42 6017
Chris@42 6018 # When large executables or shared objects are built, AIX ld can
Chris@42 6019 # have problems creating the table of contents. If linking a library
Chris@42 6020 # or program results in "error TOC overflow" add -mminimal-toc to
Chris@42 6021 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
Chris@42 6022 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
Chris@42 6023
Chris@42 6024 _LT_TAGVAR(archive_cmds, $1)=''
Chris@42 6025 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@42 6026 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@42 6027 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
Chris@42 6028 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@42 6029 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
Chris@42 6030
Chris@42 6031 if test "$GXX" = yes; then
Chris@42 6032 case $host_os in aix4.[[012]]|aix4.[[012]].*)
Chris@42 6033 # We only want to do this on AIX 4.2 and lower, the check
Chris@42 6034 # below for broken collect2 doesn't work under 4.3+
Chris@42 6035 collect2name=`${CC} -print-prog-name=collect2`
Chris@42 6036 if test -f "$collect2name" &&
Chris@42 6037 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
Chris@42 6038 then
Chris@42 6039 # We have reworked collect2
Chris@42 6040 :
Chris@42 6041 else
Chris@42 6042 # We have old collect2
Chris@42 6043 _LT_TAGVAR(hardcode_direct, $1)=unsupported
Chris@42 6044 # It fails to find uninstalled libraries when the uninstalled
Chris@42 6045 # path is not listed in the libpath. Setting hardcode_minus_L
Chris@42 6046 # to unsupported forces relinking
Chris@42 6047 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@42 6048 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@42 6049 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@42 6050 fi
Chris@42 6051 esac
Chris@42 6052 shared_flag='-shared'
Chris@42 6053 if test "$aix_use_runtimelinking" = yes; then
Chris@42 6054 shared_flag="$shared_flag "'${wl}-G'
Chris@42 6055 fi
Chris@42 6056 else
Chris@42 6057 # not using gcc
Chris@42 6058 if test "$host_cpu" = ia64; then
Chris@42 6059 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
Chris@42 6060 # chokes on -Wl,-G. The following line is correct:
Chris@42 6061 shared_flag='-G'
Chris@42 6062 else
Chris@42 6063 if test "$aix_use_runtimelinking" = yes; then
Chris@42 6064 shared_flag='${wl}-G'
Chris@42 6065 else
Chris@42 6066 shared_flag='${wl}-bM:SRE'
Chris@42 6067 fi
Chris@42 6068 fi
Chris@42 6069 fi
Chris@42 6070
Chris@42 6071 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
Chris@42 6072 # It seems that -bexpall does not export symbols beginning with
Chris@42 6073 # underscore (_), so it is better to generate a list of symbols to
Chris@42 6074 # export.
Chris@42 6075 _LT_TAGVAR(always_export_symbols, $1)=yes
Chris@42 6076 if test "$aix_use_runtimelinking" = yes; then
Chris@42 6077 # Warning - without using the other runtime loading flags (-brtl),
Chris@42 6078 # -berok will link without error, but may produce a broken library.
Chris@42 6079 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
Chris@42 6080 # Determine the default libpath from the value encoded in an empty
Chris@42 6081 # executable.
Chris@42 6082 _LT_SYS_MODULE_PATH_AIX([$1])
Chris@42 6083 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
Chris@42 6084
Chris@42 6085 _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@42 6086 else
Chris@42 6087 if test "$host_cpu" = ia64; then
Chris@42 6088 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
Chris@42 6089 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
Chris@42 6090 _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@42 6091 else
Chris@42 6092 # Determine the default libpath from the value encoded in an
Chris@42 6093 # empty executable.
Chris@42 6094 _LT_SYS_MODULE_PATH_AIX([$1])
Chris@42 6095 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
Chris@42 6096 # Warning - without using the other run time loading flags,
Chris@42 6097 # -berok will link without error, but may produce a broken library.
Chris@42 6098 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
Chris@42 6099 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
Chris@42 6100 if test "$with_gnu_ld" = yes; then
Chris@42 6101 # We only use this code for GNU lds that support --whole-archive.
Chris@42 6102 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
Chris@42 6103 else
Chris@42 6104 # Exported symbols can be pulled into shared objects from archives
Chris@42 6105 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
Chris@42 6106 fi
Chris@42 6107 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
Chris@42 6108 # This is similar to how AIX traditionally builds its shared
Chris@42 6109 # libraries.
Chris@42 6110 _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@42 6111 fi
Chris@42 6112 fi
Chris@42 6113 ;;
Chris@42 6114
Chris@42 6115 beos*)
Chris@42 6116 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
Chris@42 6117 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@42 6118 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
Chris@42 6119 # support --undefined. This deserves some investigation. FIXME
Chris@42 6120 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@42 6121 else
Chris@42 6122 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 6123 fi
Chris@42 6124 ;;
Chris@42 6125
Chris@42 6126 chorus*)
Chris@42 6127 case $cc_basename in
Chris@42 6128 *)
Chris@42 6129 # FIXME: insert proper C++ library support
Chris@42 6130 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 6131 ;;
Chris@42 6132 esac
Chris@42 6133 ;;
Chris@42 6134
Chris@42 6135 cygwin* | mingw* | pw32* | cegcc*)
Chris@42 6136 case $GXX,$cc_basename in
Chris@42 6137 ,cl* | no,cl*)
Chris@42 6138 # Native MSVC
Chris@42 6139 # hardcode_libdir_flag_spec is actually meaningless, as there is
Chris@42 6140 # no search path for DLLs.
Chris@42 6141 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
Chris@42 6142 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@42 6143 _LT_TAGVAR(always_export_symbols, $1)=yes
Chris@42 6144 _LT_TAGVAR(file_list_spec, $1)='@'
Chris@42 6145 # Tell ltmain to make .lib files, not .a files.
Chris@42 6146 libext=lib
Chris@42 6147 # Tell ltmain to make .dll files, not .so files.
Chris@42 6148 shrext_cmds=".dll"
Chris@42 6149 # FIXME: Setting linknames here is a bad hack.
Chris@42 6150 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
Chris@42 6151 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
Chris@42 6152 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
Chris@42 6153 else
Chris@42 6154 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
Chris@42 6155 fi~
Chris@42 6156 $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@42 6157 linknames='
Chris@42 6158 # The linker will not automatically build a static lib if we build a DLL.
Chris@42 6159 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
Chris@42 6160 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@42 6161 # Don't use ranlib
Chris@42 6162 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
Chris@42 6163 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
Chris@42 6164 lt_tool_outputfile="@TOOL_OUTPUT@"~
Chris@42 6165 case $lt_outputfile in
Chris@42 6166 *.exe|*.EXE) ;;
Chris@42 6167 *)
Chris@42 6168 lt_outputfile="$lt_outputfile.exe"
Chris@42 6169 lt_tool_outputfile="$lt_tool_outputfile.exe"
Chris@42 6170 ;;
Chris@42 6171 esac~
Chris@42 6172 func_to_tool_file "$lt_outputfile"~
Chris@42 6173 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
Chris@42 6174 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
Chris@42 6175 $RM "$lt_outputfile.manifest";
Chris@42 6176 fi'
Chris@42 6177 ;;
Chris@42 6178 *)
Chris@42 6179 # g++
Chris@42 6180 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
Chris@42 6181 # as there is no search path for DLLs.
Chris@42 6182 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@42 6183 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
Chris@42 6184 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@42 6185 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@42 6186 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@42 6187
Chris@42 6188 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
Chris@42 6189 _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@42 6190 # If the export-symbols file already is a .def file (1st line
Chris@42 6191 # is EXPORTS), use it as is; otherwise, prepend...
Chris@42 6192 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
Chris@42 6193 cp $export_symbols $output_objdir/$soname.def;
Chris@42 6194 else
Chris@42 6195 echo EXPORTS > $output_objdir/$soname.def;
Chris@42 6196 cat $export_symbols >> $output_objdir/$soname.def;
Chris@42 6197 fi~
Chris@42 6198 $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@42 6199 else
Chris@42 6200 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 6201 fi
Chris@42 6202 ;;
Chris@42 6203 esac
Chris@42 6204 ;;
Chris@42 6205 darwin* | rhapsody*)
Chris@42 6206 _LT_DARWIN_LINKER_FEATURES($1)
Chris@42 6207 ;;
Chris@42 6208
Chris@42 6209 dgux*)
Chris@42 6210 case $cc_basename in
Chris@42 6211 ec++*)
Chris@42 6212 # FIXME: insert proper C++ library support
Chris@42 6213 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 6214 ;;
Chris@42 6215 ghcx*)
Chris@42 6216 # Green Hills C++ Compiler
Chris@42 6217 # FIXME: insert proper C++ library support
Chris@42 6218 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 6219 ;;
Chris@42 6220 *)
Chris@42 6221 # FIXME: insert proper C++ library support
Chris@42 6222 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 6223 ;;
Chris@42 6224 esac
Chris@42 6225 ;;
Chris@42 6226
Chris@42 6227 freebsd2.*)
Chris@42 6228 # C++ shared libraries reported to be fairly broken before
Chris@42 6229 # switch to ELF
Chris@42 6230 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 6231 ;;
Chris@42 6232
Chris@42 6233 freebsd-elf*)
Chris@42 6234 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@42 6235 ;;
Chris@42 6236
Chris@42 6237 freebsd* | dragonfly*)
Chris@42 6238 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
Chris@42 6239 # conventions
Chris@42 6240 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@42 6241 ;;
Chris@42 6242
Chris@42 6243 haiku*)
Chris@42 6244 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@42 6245 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@42 6246 ;;
Chris@42 6247
Chris@42 6248 hpux9*)
Chris@42 6249 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
Chris@42 6250 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@42 6251 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
Chris@42 6252 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@42 6253 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
Chris@42 6254 # but as the default
Chris@42 6255 # location of the library.
Chris@42 6256
Chris@42 6257 case $cc_basename in
Chris@42 6258 CC*)
Chris@42 6259 # FIXME: insert proper C++ library support
Chris@42 6260 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 6261 ;;
Chris@42 6262 aCC*)
Chris@42 6263 _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@42 6264 # Commands to make compiler produce verbose output that lists
Chris@42 6265 # what "hidden" libraries, object files and flags are used when
Chris@42 6266 # linking a shared library.
Chris@42 6267 #
Chris@42 6268 # There doesn't appear to be a way to prevent this compiler from
Chris@42 6269 # explicitly linking system object files so we need to strip them
Chris@42 6270 # from the output so that they don't get included in the library
Chris@42 6271 # dependencies.
Chris@42 6272 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@42 6273 ;;
Chris@42 6274 *)
Chris@42 6275 if test "$GXX" = yes; then
Chris@42 6276 _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@42 6277 else
Chris@42 6278 # FIXME: insert proper C++ library support
Chris@42 6279 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 6280 fi
Chris@42 6281 ;;
Chris@42 6282 esac
Chris@42 6283 ;;
Chris@42 6284
Chris@42 6285 hpux10*|hpux11*)
Chris@42 6286 if test $with_gnu_ld = no; then
Chris@42 6287 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
Chris@42 6288 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@42 6289
Chris@42 6290 case $host_cpu in
Chris@42 6291 hppa*64*|ia64*)
Chris@42 6292 ;;
Chris@42 6293 *)
Chris@42 6294 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
Chris@42 6295 ;;
Chris@42 6296 esac
Chris@42 6297 fi
Chris@42 6298 case $host_cpu in
Chris@42 6299 hppa*64*|ia64*)
Chris@42 6300 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@42 6301 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@42 6302 ;;
Chris@42 6303 *)
Chris@42 6304 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@42 6305 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@42 6306 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
Chris@42 6307 # but as the default
Chris@42 6308 # location of the library.
Chris@42 6309 ;;
Chris@42 6310 esac
Chris@42 6311
Chris@42 6312 case $cc_basename in
Chris@42 6313 CC*)
Chris@42 6314 # FIXME: insert proper C++ library support
Chris@42 6315 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 6316 ;;
Chris@42 6317 aCC*)
Chris@42 6318 case $host_cpu in
Chris@42 6319 hppa*64*)
Chris@42 6320 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@42 6321 ;;
Chris@42 6322 ia64*)
Chris@42 6323 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@42 6324 ;;
Chris@42 6325 *)
Chris@42 6326 _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@42 6327 ;;
Chris@42 6328 esac
Chris@42 6329 # Commands to make compiler produce verbose output that lists
Chris@42 6330 # what "hidden" libraries, object files and flags are used when
Chris@42 6331 # linking a shared library.
Chris@42 6332 #
Chris@42 6333 # There doesn't appear to be a way to prevent this compiler from
Chris@42 6334 # explicitly linking system object files so we need to strip them
Chris@42 6335 # from the output so that they don't get included in the library
Chris@42 6336 # dependencies.
Chris@42 6337 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@42 6338 ;;
Chris@42 6339 *)
Chris@42 6340 if test "$GXX" = yes; then
Chris@42 6341 if test $with_gnu_ld = no; then
Chris@42 6342 case $host_cpu in
Chris@42 6343 hppa*64*)
Chris@42 6344 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@42 6345 ;;
Chris@42 6346 ia64*)
Chris@42 6347 _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@42 6348 ;;
Chris@42 6349 *)
Chris@42 6350 _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@42 6351 ;;
Chris@42 6352 esac
Chris@42 6353 fi
Chris@42 6354 else
Chris@42 6355 # FIXME: insert proper C++ library support
Chris@42 6356 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 6357 fi
Chris@42 6358 ;;
Chris@42 6359 esac
Chris@42 6360 ;;
Chris@42 6361
Chris@42 6362 interix[[3-9]]*)
Chris@42 6363 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@42 6364 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@42 6365 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
Chris@42 6366 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
Chris@42 6367 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
Chris@42 6368 # Instead, shared libraries are loaded at an image base (0x10000000 by
Chris@42 6369 # default) and relocated if they conflict, which is a slow very memory
Chris@42 6370 # consuming and fragmenting process. To avoid this, we pick a random,
Chris@42 6371 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
Chris@42 6372 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
Chris@42 6373 _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@42 6374 _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@42 6375 ;;
Chris@42 6376 irix5* | irix6*)
Chris@42 6377 case $cc_basename in
Chris@42 6378 CC*)
Chris@42 6379 # SGI C++
Chris@42 6380 _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@42 6381
Chris@42 6382 # Archives containing C++ object files must be created using
Chris@42 6383 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
Chris@42 6384 # necessary to make sure instantiated templates are included
Chris@42 6385 # in the archive.
Chris@42 6386 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
Chris@42 6387 ;;
Chris@42 6388 *)
Chris@42 6389 if test "$GXX" = yes; then
Chris@42 6390 if test "$with_gnu_ld" = no; then
Chris@42 6391 _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@42 6392 else
Chris@42 6393 _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@42 6394 fi
Chris@42 6395 fi
Chris@42 6396 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@42 6397 ;;
Chris@42 6398 esac
Chris@42 6399 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@42 6400 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@42 6401 _LT_TAGVAR(inherit_rpath, $1)=yes
Chris@42 6402 ;;
Chris@42 6403
Chris@42 6404 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
Chris@42 6405 case $cc_basename in
Chris@42 6406 KCC*)
Chris@42 6407 # Kuck and Associates, Inc. (KAI) C++ Compiler
Chris@42 6408
Chris@42 6409 # KCC will only create a shared library if the output file
Chris@42 6410 # ends with ".so" (or ".sl" for HP-UX), so rename the library
Chris@42 6411 # to its proper name (with version) after linking.
Chris@42 6412 _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@42 6413 _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@42 6414 # Commands to make compiler produce verbose output that lists
Chris@42 6415 # what "hidden" libraries, object files and flags are used when
Chris@42 6416 # linking a shared library.
Chris@42 6417 #
Chris@42 6418 # There doesn't appear to be a way to prevent this compiler from
Chris@42 6419 # explicitly linking system object files so we need to strip them
Chris@42 6420 # from the output so that they don't get included in the library
Chris@42 6421 # dependencies.
Chris@42 6422 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@42 6423
Chris@42 6424 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
Chris@42 6425 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
Chris@42 6426
Chris@42 6427 # Archives containing C++ object files must be created using
Chris@42 6428 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
Chris@42 6429 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
Chris@42 6430 ;;
Chris@42 6431 icpc* | ecpc* )
Chris@42 6432 # Intel C++
Chris@42 6433 with_gnu_ld=yes
Chris@42 6434 # version 8.0 and above of icpc choke on multiply defined symbols
Chris@42 6435 # if we add $predep_objects and $postdep_objects, however 7.1 and
Chris@42 6436 # earlier do not add the objects themselves.
Chris@42 6437 case `$CC -V 2>&1` in
Chris@42 6438 *"Version 7."*)
Chris@42 6439 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@42 6440 _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@42 6441 ;;
Chris@42 6442 *) # Version 8.0 or newer
Chris@42 6443 tmp_idyn=
Chris@42 6444 case $host_cpu in
Chris@42 6445 ia64*) tmp_idyn=' -i_dynamic';;
Chris@42 6446 esac
Chris@42 6447 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@42 6448 _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@42 6449 ;;
Chris@42 6450 esac
Chris@42 6451 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@42 6452 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
Chris@42 6453 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
Chris@42 6454 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
Chris@42 6455 ;;
Chris@42 6456 pgCC* | pgcpp*)
Chris@42 6457 # Portland Group C++ compiler
Chris@42 6458 case `$CC -V` in
Chris@42 6459 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
Chris@42 6460 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
Chris@42 6461 rm -rf $tpldir~
Chris@42 6462 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
Chris@42 6463 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
Chris@42 6464 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
Chris@42 6465 rm -rf $tpldir~
Chris@42 6466 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
Chris@42 6467 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
Chris@42 6468 $RANLIB $oldlib'
Chris@42 6469 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
Chris@42 6470 rm -rf $tpldir~
Chris@42 6471 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
Chris@42 6472 $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@42 6473 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
Chris@42 6474 rm -rf $tpldir~
Chris@42 6475 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
Chris@42 6476 $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@42 6477 ;;
Chris@42 6478 *) # Version 6 and above use weak symbols
Chris@42 6479 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
Chris@42 6480 _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@42 6481 ;;
Chris@42 6482 esac
Chris@42 6483
Chris@42 6484 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
Chris@42 6485 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
Chris@42 6486 _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@42 6487 ;;
Chris@42 6488 cxx*)
Chris@42 6489 # Compaq C++
Chris@42 6490 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@42 6491 _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@42 6492
Chris@42 6493 runpath_var=LD_RUN_PATH
Chris@42 6494 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
Chris@42 6495 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@42 6496
Chris@42 6497 # Commands to make compiler produce verbose output that lists
Chris@42 6498 # what "hidden" libraries, object files and flags are used when
Chris@42 6499 # linking a shared library.
Chris@42 6500 #
Chris@42 6501 # There doesn't appear to be a way to prevent this compiler from
Chris@42 6502 # explicitly linking system object files so we need to strip them
Chris@42 6503 # from the output so that they don't get included in the library
Chris@42 6504 # dependencies.
Chris@42 6505 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@42 6506 ;;
Chris@42 6507 xl* | mpixl* | bgxl*)
Chris@42 6508 # IBM XL 8.0 on PPC, with GNU ld
Chris@42 6509 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@42 6510 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
Chris@42 6511 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@42 6512 if test "x$supports_anon_versioning" = xyes; then
Chris@42 6513 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
Chris@42 6514 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
Chris@42 6515 echo "local: *; };" >> $output_objdir/$libname.ver~
Chris@42 6516 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
Chris@42 6517 fi
Chris@42 6518 ;;
Chris@42 6519 *)
Chris@42 6520 case `$CC -V 2>&1 | sed 5q` in
Chris@42 6521 *Sun\ C*)
Chris@42 6522 # Sun C++ 5.9
Chris@42 6523 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
Chris@42 6524 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@42 6525 _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@42 6526 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@42 6527 _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@42 6528 _LT_TAGVAR(compiler_needs_object, $1)=yes
Chris@42 6529
Chris@42 6530 # Not sure whether something based on
Chris@42 6531 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
Chris@42 6532 # would be better.
Chris@42 6533 output_verbose_link_cmd='func_echo_all'
Chris@42 6534
Chris@42 6535 # Archives containing C++ object files must be created using
Chris@42 6536 # "CC -xar", where "CC" is the Sun C++ compiler. This is
Chris@42 6537 # necessary to make sure instantiated templates are included
Chris@42 6538 # in the archive.
Chris@42 6539 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
Chris@42 6540 ;;
Chris@42 6541 esac
Chris@42 6542 ;;
Chris@42 6543 esac
Chris@42 6544 ;;
Chris@42 6545
Chris@42 6546 lynxos*)
Chris@42 6547 # FIXME: insert proper C++ library support
Chris@42 6548 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 6549 ;;
Chris@42 6550
Chris@42 6551 m88k*)
Chris@42 6552 # FIXME: insert proper C++ library support
Chris@42 6553 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 6554 ;;
Chris@42 6555
Chris@42 6556 mvs*)
Chris@42 6557 case $cc_basename in
Chris@42 6558 cxx*)
Chris@42 6559 # FIXME: insert proper C++ library support
Chris@42 6560 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 6561 ;;
Chris@42 6562 *)
Chris@42 6563 # FIXME: insert proper C++ library support
Chris@42 6564 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 6565 ;;
Chris@42 6566 esac
Chris@42 6567 ;;
Chris@42 6568
Chris@42 6569 netbsd*)
Chris@42 6570 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
Chris@42 6571 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
Chris@42 6572 wlarc=
Chris@42 6573 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@42 6574 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@42 6575 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@42 6576 fi
Chris@42 6577 # Workaround some broken pre-1.5 toolchains
Chris@42 6578 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
Chris@42 6579 ;;
Chris@42 6580
Chris@42 6581 *nto* | *qnx*)
Chris@42 6582 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@42 6583 ;;
Chris@42 6584
Chris@42 6585 openbsd2*)
Chris@42 6586 # C++ shared libraries are fairly broken
Chris@42 6587 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 6588 ;;
Chris@42 6589
Chris@42 6590 openbsd*)
Chris@42 6591 if test -f /usr/libexec/ld.so; then
Chris@42 6592 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@42 6593 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@42 6594 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@42 6595 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
Chris@42 6596 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
Chris@42 6597 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
Chris@42 6598 _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@42 6599 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
Chris@42 6600 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
Chris@42 6601 fi
Chris@42 6602 output_verbose_link_cmd=func_echo_all
Chris@42 6603 else
Chris@42 6604 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 6605 fi
Chris@42 6606 ;;
Chris@42 6607
Chris@42 6608 osf3* | osf4* | osf5*)
Chris@42 6609 case $cc_basename in
Chris@42 6610 KCC*)
Chris@42 6611 # Kuck and Associates, Inc. (KAI) C++ Compiler
Chris@42 6612
Chris@42 6613 # KCC will only create a shared library if the output file
Chris@42 6614 # ends with ".so" (or ".sl" for HP-UX), so rename the library
Chris@42 6615 # to its proper name (with version) after linking.
Chris@42 6616 _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@42 6617
Chris@42 6618 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
Chris@42 6619 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@42 6620
Chris@42 6621 # Archives containing C++ object files must be created using
Chris@42 6622 # the KAI C++ compiler.
Chris@42 6623 case $host in
Chris@42 6624 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
Chris@42 6625 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
Chris@42 6626 esac
Chris@42 6627 ;;
Chris@42 6628 RCC*)
Chris@42 6629 # Rational C++ 2.4.1
Chris@42 6630 # FIXME: insert proper C++ library support
Chris@42 6631 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 6632 ;;
Chris@42 6633 cxx*)
Chris@42 6634 case $host in
Chris@42 6635 osf3*)
Chris@42 6636 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
Chris@42 6637 _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@42 6638 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@42 6639 ;;
Chris@42 6640 *)
Chris@42 6641 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
Chris@42 6642 _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@42 6643 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
Chris@42 6644 echo "-hidden">> $lib.exp~
Chris@42 6645 $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@42 6646 $RM $lib.exp'
Chris@42 6647 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
Chris@42 6648 ;;
Chris@42 6649 esac
Chris@42 6650
Chris@42 6651 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@42 6652
Chris@42 6653 # Commands to make compiler produce verbose output that lists
Chris@42 6654 # what "hidden" libraries, object files and flags are used when
Chris@42 6655 # linking a shared library.
Chris@42 6656 #
Chris@42 6657 # There doesn't appear to be a way to prevent this compiler from
Chris@42 6658 # explicitly linking system object files so we need to strip them
Chris@42 6659 # from the output so that they don't get included in the library
Chris@42 6660 # dependencies.
Chris@42 6661 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@42 6662 ;;
Chris@42 6663 *)
Chris@42 6664 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
Chris@42 6665 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
Chris@42 6666 case $host in
Chris@42 6667 osf3*)
Chris@42 6668 _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@42 6669 ;;
Chris@42 6670 *)
Chris@42 6671 _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@42 6672 ;;
Chris@42 6673 esac
Chris@42 6674
Chris@42 6675 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@42 6676 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@42 6677
Chris@42 6678 # Commands to make compiler produce verbose output that lists
Chris@42 6679 # what "hidden" libraries, object files and flags are used when
Chris@42 6680 # linking a shared library.
Chris@42 6681 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
Chris@42 6682
Chris@42 6683 else
Chris@42 6684 # FIXME: insert proper C++ library support
Chris@42 6685 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 6686 fi
Chris@42 6687 ;;
Chris@42 6688 esac
Chris@42 6689 ;;
Chris@42 6690
Chris@42 6691 psos*)
Chris@42 6692 # FIXME: insert proper C++ library support
Chris@42 6693 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 6694 ;;
Chris@42 6695
Chris@42 6696 sunos4*)
Chris@42 6697 case $cc_basename in
Chris@42 6698 CC*)
Chris@42 6699 # Sun C++ 4.x
Chris@42 6700 # FIXME: insert proper C++ library support
Chris@42 6701 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 6702 ;;
Chris@42 6703 lcc*)
Chris@42 6704 # Lucid
Chris@42 6705 # FIXME: insert proper C++ library support
Chris@42 6706 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 6707 ;;
Chris@42 6708 *)
Chris@42 6709 # FIXME: insert proper C++ library support
Chris@42 6710 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 6711 ;;
Chris@42 6712 esac
Chris@42 6713 ;;
Chris@42 6714
Chris@42 6715 solaris*)
Chris@42 6716 case $cc_basename in
Chris@42 6717 CC* | sunCC*)
Chris@42 6718 # Sun C++ 4.2, 5.x and Centerline C++
Chris@42 6719 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
Chris@42 6720 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
Chris@42 6721 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@42 6722 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@42 6723 $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@42 6724
Chris@42 6725 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@42 6726 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@42 6727 case $host_os in
Chris@42 6728 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
Chris@42 6729 *)
Chris@42 6730 # The compiler driver will combine and reorder linker options,
Chris@42 6731 # but understands `-z linker_flag'.
Chris@42 6732 # Supported since Solaris 2.6 (maybe 2.5.1?)
Chris@42 6733 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
Chris@42 6734 ;;
Chris@42 6735 esac
Chris@42 6736 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@42 6737
Chris@42 6738 output_verbose_link_cmd='func_echo_all'
Chris@42 6739
Chris@42 6740 # Archives containing C++ object files must be created using
Chris@42 6741 # "CC -xar", where "CC" is the Sun C++ compiler. This is
Chris@42 6742 # necessary to make sure instantiated templates are included
Chris@42 6743 # in the archive.
Chris@42 6744 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
Chris@42 6745 ;;
Chris@42 6746 gcx*)
Chris@42 6747 # Green Hills C++ Compiler
Chris@42 6748 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
Chris@42 6749
Chris@42 6750 # The C++ compiler must be used to create the archive.
Chris@42 6751 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
Chris@42 6752 ;;
Chris@42 6753 *)
Chris@42 6754 # GNU C++ compiler with Solaris linker
Chris@42 6755 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
Chris@42 6756 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
Chris@42 6757 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
Chris@42 6758 _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@42 6759 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@42 6760 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
Chris@42 6761
Chris@42 6762 # Commands to make compiler produce verbose output that lists
Chris@42 6763 # what "hidden" libraries, object files and flags are used when
Chris@42 6764 # linking a shared library.
Chris@42 6765 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
Chris@42 6766 else
Chris@42 6767 # g++ 2.7 appears to require `-G' NOT `-shared' on this
Chris@42 6768 # platform.
Chris@42 6769 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
Chris@42 6770 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@42 6771 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
Chris@42 6772
Chris@42 6773 # Commands to make compiler produce verbose output that lists
Chris@42 6774 # what "hidden" libraries, object files and flags are used when
Chris@42 6775 # linking a shared library.
Chris@42 6776 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
Chris@42 6777 fi
Chris@42 6778
Chris@42 6779 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
Chris@42 6780 case $host_os in
Chris@42 6781 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
Chris@42 6782 *)
Chris@42 6783 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
Chris@42 6784 ;;
Chris@42 6785 esac
Chris@42 6786 fi
Chris@42 6787 ;;
Chris@42 6788 esac
Chris@42 6789 ;;
Chris@42 6790
Chris@42 6791 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
Chris@42 6792 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
Chris@42 6793 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@42 6794 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@42 6795 runpath_var='LD_RUN_PATH'
Chris@42 6796
Chris@42 6797 case $cc_basename in
Chris@42 6798 CC*)
Chris@42 6799 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@42 6800 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@42 6801 ;;
Chris@42 6802 *)
Chris@42 6803 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@42 6804 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@42 6805 ;;
Chris@42 6806 esac
Chris@42 6807 ;;
Chris@42 6808
Chris@42 6809 sysv5* | sco3.2v5* | sco5v6*)
Chris@42 6810 # Note: We can NOT use -z defs as we might desire, because we do not
Chris@42 6811 # link with -lc, and that would cause any symbols used from libc to
Chris@42 6812 # always be unresolved, which means just about no library would
Chris@42 6813 # ever link correctly. If we're not using GNU ld we use -z text
Chris@42 6814 # though, which does catch some bad symbols but isn't as heavy-handed
Chris@42 6815 # as -z defs.
Chris@42 6816 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
Chris@42 6817 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
Chris@42 6818 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@42 6819 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@42 6820 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
Chris@42 6821 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
Chris@42 6822 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@42 6823 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
Chris@42 6824 runpath_var='LD_RUN_PATH'
Chris@42 6825
Chris@42 6826 case $cc_basename in
Chris@42 6827 CC*)
Chris@42 6828 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@42 6829 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@42 6830 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
Chris@42 6831 '"$_LT_TAGVAR(old_archive_cmds, $1)"
Chris@42 6832 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
Chris@42 6833 '"$_LT_TAGVAR(reload_cmds, $1)"
Chris@42 6834 ;;
Chris@42 6835 *)
Chris@42 6836 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@42 6837 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@42 6838 ;;
Chris@42 6839 esac
Chris@42 6840 ;;
Chris@42 6841
Chris@42 6842 tandem*)
Chris@42 6843 case $cc_basename in
Chris@42 6844 NCC*)
Chris@42 6845 # NonStop-UX NCC 3.20
Chris@42 6846 # FIXME: insert proper C++ library support
Chris@42 6847 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 6848 ;;
Chris@42 6849 *)
Chris@42 6850 # FIXME: insert proper C++ library support
Chris@42 6851 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 6852 ;;
Chris@42 6853 esac
Chris@42 6854 ;;
Chris@42 6855
Chris@42 6856 vxworks*)
Chris@42 6857 # FIXME: insert proper C++ library support
Chris@42 6858 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 6859 ;;
Chris@42 6860
Chris@42 6861 *)
Chris@42 6862 # FIXME: insert proper C++ library support
Chris@42 6863 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@42 6864 ;;
Chris@42 6865 esac
Chris@42 6866
Chris@42 6867 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
Chris@42 6868 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
Chris@42 6869
Chris@42 6870 _LT_TAGVAR(GCC, $1)="$GXX"
Chris@42 6871 _LT_TAGVAR(LD, $1)="$LD"
Chris@42 6872
Chris@42 6873 ## CAVEAT EMPTOR:
Chris@42 6874 ## There is no encapsulation within the following macros, do not change
Chris@42 6875 ## the running order or otherwise move them around unless you know exactly
Chris@42 6876 ## what you are doing...
Chris@42 6877 _LT_SYS_HIDDEN_LIBDEPS($1)
Chris@42 6878 _LT_COMPILER_PIC($1)
Chris@42 6879 _LT_COMPILER_C_O($1)
Chris@42 6880 _LT_COMPILER_FILE_LOCKS($1)
Chris@42 6881 _LT_LINKER_SHLIBS($1)
Chris@42 6882 _LT_SYS_DYNAMIC_LINKER($1)
Chris@42 6883 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@42 6884
Chris@42 6885 _LT_CONFIG($1)
Chris@42 6886 fi # test -n "$compiler"
Chris@42 6887
Chris@42 6888 CC=$lt_save_CC
Chris@42 6889 CFLAGS=$lt_save_CFLAGS
Chris@42 6890 LDCXX=$LD
Chris@42 6891 LD=$lt_save_LD
Chris@42 6892 GCC=$lt_save_GCC
Chris@42 6893 with_gnu_ld=$lt_save_with_gnu_ld
Chris@42 6894 lt_cv_path_LDCXX=$lt_cv_path_LD
Chris@42 6895 lt_cv_path_LD=$lt_save_path_LD
Chris@42 6896 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
Chris@42 6897 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
Chris@42 6898 fi # test "$_lt_caught_CXX_error" != yes
Chris@42 6899
Chris@42 6900 AC_LANG_POP
Chris@42 6901 ])# _LT_LANG_CXX_CONFIG
Chris@42 6902
Chris@42 6903
Chris@42 6904 # _LT_FUNC_STRIPNAME_CNF
Chris@42 6905 # ----------------------
Chris@42 6906 # func_stripname_cnf prefix suffix name
Chris@42 6907 # strip PREFIX and SUFFIX off of NAME.
Chris@42 6908 # PREFIX and SUFFIX must not contain globbing or regex special
Chris@42 6909 # characters, hashes, percent signs, but SUFFIX may contain a leading
Chris@42 6910 # dot (in which case that matches only a dot).
Chris@42 6911 #
Chris@42 6912 # This function is identical to the (non-XSI) version of func_stripname,
Chris@42 6913 # except this one can be used by m4 code that may be executed by configure,
Chris@42 6914 # rather than the libtool script.
Chris@42 6915 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
Chris@42 6916 AC_REQUIRE([_LT_DECL_SED])
Chris@42 6917 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
Chris@42 6918 func_stripname_cnf ()
Chris@42 6919 {
Chris@42 6920 case ${2} in
Chris@42 6921 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
Chris@42 6922 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
Chris@42 6923 esac
Chris@42 6924 } # func_stripname_cnf
Chris@42 6925 ])# _LT_FUNC_STRIPNAME_CNF
Chris@42 6926
Chris@42 6927 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
Chris@42 6928 # ---------------------------------
Chris@42 6929 # Figure out "hidden" library dependencies from verbose
Chris@42 6930 # compiler output when linking a shared library.
Chris@42 6931 # Parse the compiler output and extract the necessary
Chris@42 6932 # objects, libraries and library flags.
Chris@42 6933 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
Chris@42 6934 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@42 6935 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
Chris@42 6936 # Dependencies to place before and after the object being linked:
Chris@42 6937 _LT_TAGVAR(predep_objects, $1)=
Chris@42 6938 _LT_TAGVAR(postdep_objects, $1)=
Chris@42 6939 _LT_TAGVAR(predeps, $1)=
Chris@42 6940 _LT_TAGVAR(postdeps, $1)=
Chris@42 6941 _LT_TAGVAR(compiler_lib_search_path, $1)=
Chris@42 6942
Chris@42 6943 dnl we can't use the lt_simple_compile_test_code here,
Chris@42 6944 dnl because it contains code intended for an executable,
Chris@42 6945 dnl not a library. It's possible we should let each
Chris@42 6946 dnl tag define a new lt_????_link_test_code variable,
Chris@42 6947 dnl but it's only used here...
Chris@42 6948 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
Chris@42 6949 int a;
Chris@42 6950 void foo (void) { a = 0; }
Chris@42 6951 _LT_EOF
Chris@42 6952 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
Chris@42 6953 class Foo
Chris@42 6954 {
Chris@42 6955 public:
Chris@42 6956 Foo (void) { a = 0; }
Chris@42 6957 private:
Chris@42 6958 int a;
Chris@42 6959 };
Chris@42 6960 _LT_EOF
Chris@42 6961 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
Chris@42 6962 subroutine foo
Chris@42 6963 implicit none
Chris@42 6964 integer*4 a
Chris@42 6965 a=0
Chris@42 6966 return
Chris@42 6967 end
Chris@42 6968 _LT_EOF
Chris@42 6969 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
Chris@42 6970 subroutine foo
Chris@42 6971 implicit none
Chris@42 6972 integer a
Chris@42 6973 a=0
Chris@42 6974 return
Chris@42 6975 end
Chris@42 6976 _LT_EOF
Chris@42 6977 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
Chris@42 6978 public class foo {
Chris@42 6979 private int a;
Chris@42 6980 public void bar (void) {
Chris@42 6981 a = 0;
Chris@42 6982 }
Chris@42 6983 };
Chris@42 6984 _LT_EOF
Chris@42 6985 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
Chris@42 6986 package foo
Chris@42 6987 func foo() {
Chris@42 6988 }
Chris@42 6989 _LT_EOF
Chris@42 6990 ])
Chris@42 6991
Chris@42 6992 _lt_libdeps_save_CFLAGS=$CFLAGS
Chris@42 6993 case "$CC $CFLAGS " in #(
Chris@42 6994 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
Chris@42 6995 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
Chris@42 6996 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
Chris@42 6997 esac
Chris@42 6998
Chris@42 6999 dnl Parse the compiler output and extract the necessary
Chris@42 7000 dnl objects, libraries and library flags.
Chris@42 7001 if AC_TRY_EVAL(ac_compile); then
Chris@42 7002 # Parse the compiler output and extract the necessary
Chris@42 7003 # objects, libraries and library flags.
Chris@42 7004
Chris@42 7005 # Sentinel used to keep track of whether or not we are before
Chris@42 7006 # the conftest object file.
Chris@42 7007 pre_test_object_deps_done=no
Chris@42 7008
Chris@42 7009 for p in `eval "$output_verbose_link_cmd"`; do
Chris@42 7010 case ${prev}${p} in
Chris@42 7011
Chris@42 7012 -L* | -R* | -l*)
Chris@42 7013 # Some compilers place space between "-{L,R}" and the path.
Chris@42 7014 # Remove the space.
Chris@42 7015 if test $p = "-L" ||
Chris@42 7016 test $p = "-R"; then
Chris@42 7017 prev=$p
Chris@42 7018 continue
Chris@42 7019 fi
Chris@42 7020
Chris@42 7021 # Expand the sysroot to ease extracting the directories later.
Chris@42 7022 if test -z "$prev"; then
Chris@42 7023 case $p in
Chris@42 7024 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
Chris@42 7025 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
Chris@42 7026 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
Chris@42 7027 esac
Chris@42 7028 fi
Chris@42 7029 case $p in
Chris@42 7030 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
Chris@42 7031 esac
Chris@42 7032 if test "$pre_test_object_deps_done" = no; then
Chris@42 7033 case ${prev} in
Chris@42 7034 -L | -R)
Chris@42 7035 # Internal compiler library paths should come after those
Chris@42 7036 # provided the user. The postdeps already come after the
Chris@42 7037 # user supplied libs so there is no need to process them.
Chris@42 7038 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
Chris@42 7039 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
Chris@42 7040 else
Chris@42 7041 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
Chris@42 7042 fi
Chris@42 7043 ;;
Chris@42 7044 # The "-l" case would never come before the object being
Chris@42 7045 # linked, so don't bother handling this case.
Chris@42 7046 esac
Chris@42 7047 else
Chris@42 7048 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
Chris@42 7049 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
Chris@42 7050 else
Chris@42 7051 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
Chris@42 7052 fi
Chris@42 7053 fi
Chris@42 7054 prev=
Chris@42 7055 ;;
Chris@42 7056
Chris@42 7057 *.lto.$objext) ;; # Ignore GCC LTO objects
Chris@42 7058 *.$objext)
Chris@42 7059 # This assumes that the test object file only shows up
Chris@42 7060 # once in the compiler output.
Chris@42 7061 if test "$p" = "conftest.$objext"; then
Chris@42 7062 pre_test_object_deps_done=yes
Chris@42 7063 continue
Chris@42 7064 fi
Chris@42 7065
Chris@42 7066 if test "$pre_test_object_deps_done" = no; then
Chris@42 7067 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
Chris@42 7068 _LT_TAGVAR(predep_objects, $1)="$p"
Chris@42 7069 else
Chris@42 7070 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
Chris@42 7071 fi
Chris@42 7072 else
Chris@42 7073 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
Chris@42 7074 _LT_TAGVAR(postdep_objects, $1)="$p"
Chris@42 7075 else
Chris@42 7076 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
Chris@42 7077 fi
Chris@42 7078 fi
Chris@42 7079 ;;
Chris@42 7080
Chris@42 7081 *) ;; # Ignore the rest.
Chris@42 7082
Chris@42 7083 esac
Chris@42 7084 done
Chris@42 7085
Chris@42 7086 # Clean up.
Chris@42 7087 rm -f a.out a.exe
Chris@42 7088 else
Chris@42 7089 echo "libtool.m4: error: problem compiling $1 test program"
Chris@42 7090 fi
Chris@42 7091
Chris@42 7092 $RM -f confest.$objext
Chris@42 7093 CFLAGS=$_lt_libdeps_save_CFLAGS
Chris@42 7094
Chris@42 7095 # PORTME: override above test on systems where it is broken
Chris@42 7096 m4_if([$1], [CXX],
Chris@42 7097 [case $host_os in
Chris@42 7098 interix[[3-9]]*)
Chris@42 7099 # Interix 3.5 installs completely hosed .la files for C++, so rather than
Chris@42 7100 # hack all around it, let's just trust "g++" to DTRT.
Chris@42 7101 _LT_TAGVAR(predep_objects,$1)=
Chris@42 7102 _LT_TAGVAR(postdep_objects,$1)=
Chris@42 7103 _LT_TAGVAR(postdeps,$1)=
Chris@42 7104 ;;
Chris@42 7105
Chris@42 7106 linux*)
Chris@42 7107 case `$CC -V 2>&1 | sed 5q` in
Chris@42 7108 *Sun\ C*)
Chris@42 7109 # Sun C++ 5.9
Chris@42 7110
Chris@42 7111 # The more standards-conforming stlport4 library is
Chris@42 7112 # incompatible with the Cstd library. Avoid specifying
Chris@42 7113 # it if it's in CXXFLAGS. Ignore libCrun as
Chris@42 7114 # -library=stlport4 depends on it.
Chris@42 7115 case " $CXX $CXXFLAGS " in
Chris@42 7116 *" -library=stlport4 "*)
Chris@42 7117 solaris_use_stlport4=yes
Chris@42 7118 ;;
Chris@42 7119 esac
Chris@42 7120
Chris@42 7121 if test "$solaris_use_stlport4" != yes; then
Chris@42 7122 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
Chris@42 7123 fi
Chris@42 7124 ;;
Chris@42 7125 esac
Chris@42 7126 ;;
Chris@42 7127
Chris@42 7128 solaris*)
Chris@42 7129 case $cc_basename in
Chris@42 7130 CC* | sunCC*)
Chris@42 7131 # The more standards-conforming stlport4 library is
Chris@42 7132 # incompatible with the Cstd library. Avoid specifying
Chris@42 7133 # it if it's in CXXFLAGS. Ignore libCrun as
Chris@42 7134 # -library=stlport4 depends on it.
Chris@42 7135 case " $CXX $CXXFLAGS " in
Chris@42 7136 *" -library=stlport4 "*)
Chris@42 7137 solaris_use_stlport4=yes
Chris@42 7138 ;;
Chris@42 7139 esac
Chris@42 7140
Chris@42 7141 # Adding this requires a known-good setup of shared libraries for
Chris@42 7142 # Sun compiler versions before 5.6, else PIC objects from an old
Chris@42 7143 # archive will be linked into the output, leading to subtle bugs.
Chris@42 7144 if test "$solaris_use_stlport4" != yes; then
Chris@42 7145 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
Chris@42 7146 fi
Chris@42 7147 ;;
Chris@42 7148 esac
Chris@42 7149 ;;
Chris@42 7150 esac
Chris@42 7151 ])
Chris@42 7152
Chris@42 7153 case " $_LT_TAGVAR(postdeps, $1) " in
Chris@42 7154 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
Chris@42 7155 esac
Chris@42 7156 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
Chris@42 7157 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
Chris@42 7158 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
Chris@42 7159 fi
Chris@42 7160 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
Chris@42 7161 [The directories searched by this compiler when creating a shared library])
Chris@42 7162 _LT_TAGDECL([], [predep_objects], [1],
Chris@42 7163 [Dependencies to place before and after the objects being linked to
Chris@42 7164 create a shared library])
Chris@42 7165 _LT_TAGDECL([], [postdep_objects], [1])
Chris@42 7166 _LT_TAGDECL([], [predeps], [1])
Chris@42 7167 _LT_TAGDECL([], [postdeps], [1])
Chris@42 7168 _LT_TAGDECL([], [compiler_lib_search_path], [1],
Chris@42 7169 [The library search path used internally by the compiler when linking
Chris@42 7170 a shared library])
Chris@42 7171 ])# _LT_SYS_HIDDEN_LIBDEPS
Chris@42 7172
Chris@42 7173
Chris@42 7174 # _LT_LANG_F77_CONFIG([TAG])
Chris@42 7175 # --------------------------
Chris@42 7176 # Ensure that the configuration variables for a Fortran 77 compiler are
Chris@42 7177 # suitably defined. These variables are subsequently used by _LT_CONFIG
Chris@42 7178 # to write the compiler configuration to `libtool'.
Chris@42 7179 m4_defun([_LT_LANG_F77_CONFIG],
Chris@42 7180 [AC_LANG_PUSH(Fortran 77)
Chris@42 7181 if test -z "$F77" || test "X$F77" = "Xno"; then
Chris@42 7182 _lt_disable_F77=yes
Chris@42 7183 fi
Chris@42 7184
Chris@42 7185 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@42 7186 _LT_TAGVAR(allow_undefined_flag, $1)=
Chris@42 7187 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@42 7188 _LT_TAGVAR(archive_expsym_cmds, $1)=
Chris@42 7189 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@42 7190 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@42 7191 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@42 7192 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@42 7193 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@42 7194 _LT_TAGVAR(hardcode_minus_L, $1)=no
Chris@42 7195 _LT_TAGVAR(hardcode_automatic, $1)=no
Chris@42 7196 _LT_TAGVAR(inherit_rpath, $1)=no
Chris@42 7197 _LT_TAGVAR(module_cmds, $1)=
Chris@42 7198 _LT_TAGVAR(module_expsym_cmds, $1)=
Chris@42 7199 _LT_TAGVAR(link_all_deplibs, $1)=unknown
Chris@42 7200 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@42 7201 _LT_TAGVAR(reload_flag, $1)=$reload_flag
Chris@42 7202 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
Chris@42 7203 _LT_TAGVAR(no_undefined_flag, $1)=
Chris@42 7204 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@42 7205 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
Chris@42 7206
Chris@42 7207 # Source file extension for f77 test sources.
Chris@42 7208 ac_ext=f
Chris@42 7209
Chris@42 7210 # Object file extension for compiled f77 test sources.
Chris@42 7211 objext=o
Chris@42 7212 _LT_TAGVAR(objext, $1)=$objext
Chris@42 7213
Chris@42 7214 # No sense in running all these tests if we already determined that
Chris@42 7215 # the F77 compiler isn't working. Some variables (like enable_shared)
Chris@42 7216 # are currently assumed to apply to all compilers on this platform,
Chris@42 7217 # and will be corrupted by setting them based on a non-working compiler.
Chris@42 7218 if test "$_lt_disable_F77" != yes; then
Chris@42 7219 # Code to be used in simple compile tests
Chris@42 7220 lt_simple_compile_test_code="\
Chris@42 7221 subroutine t
Chris@42 7222 return
Chris@42 7223 end
Chris@42 7224 "
Chris@42 7225
Chris@42 7226 # Code to be used in simple link tests
Chris@42 7227 lt_simple_link_test_code="\
Chris@42 7228 program t
Chris@42 7229 end
Chris@42 7230 "
Chris@42 7231
Chris@42 7232 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@42 7233 _LT_TAG_COMPILER
Chris@42 7234
Chris@42 7235 # save warnings/boilerplate of simple test code
Chris@42 7236 _LT_COMPILER_BOILERPLATE
Chris@42 7237 _LT_LINKER_BOILERPLATE
Chris@42 7238
Chris@42 7239 # Allow CC to be a program name with arguments.
Chris@42 7240 lt_save_CC="$CC"
Chris@42 7241 lt_save_GCC=$GCC
Chris@42 7242 lt_save_CFLAGS=$CFLAGS
Chris@42 7243 CC=${F77-"f77"}
Chris@42 7244 CFLAGS=$FFLAGS
Chris@42 7245 compiler=$CC
Chris@42 7246 _LT_TAGVAR(compiler, $1)=$CC
Chris@42 7247 _LT_CC_BASENAME([$compiler])
Chris@42 7248 GCC=$G77
Chris@42 7249 if test -n "$compiler"; then
Chris@42 7250 AC_MSG_CHECKING([if libtool supports shared libraries])
Chris@42 7251 AC_MSG_RESULT([$can_build_shared])
Chris@42 7252
Chris@42 7253 AC_MSG_CHECKING([whether to build shared libraries])
Chris@42 7254 test "$can_build_shared" = "no" && enable_shared=no
Chris@42 7255
Chris@42 7256 # On AIX, shared libraries and static libraries use the same namespace, and
Chris@42 7257 # are all built from PIC.
Chris@42 7258 case $host_os in
Chris@42 7259 aix3*)
Chris@42 7260 test "$enable_shared" = yes && enable_static=no
Chris@42 7261 if test -n "$RANLIB"; then
Chris@42 7262 archive_cmds="$archive_cmds~\$RANLIB \$lib"
Chris@42 7263 postinstall_cmds='$RANLIB $lib'
Chris@42 7264 fi
Chris@42 7265 ;;
Chris@42 7266 aix[[4-9]]*)
Chris@42 7267 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
Chris@42 7268 test "$enable_shared" = yes && enable_static=no
Chris@42 7269 fi
Chris@42 7270 ;;
Chris@42 7271 esac
Chris@42 7272 AC_MSG_RESULT([$enable_shared])
Chris@42 7273
Chris@42 7274 AC_MSG_CHECKING([whether to build static libraries])
Chris@42 7275 # Make sure either enable_shared or enable_static is yes.
Chris@42 7276 test "$enable_shared" = yes || enable_static=yes
Chris@42 7277 AC_MSG_RESULT([$enable_static])
Chris@42 7278
Chris@42 7279 _LT_TAGVAR(GCC, $1)="$G77"
Chris@42 7280 _LT_TAGVAR(LD, $1)="$LD"
Chris@42 7281
Chris@42 7282 ## CAVEAT EMPTOR:
Chris@42 7283 ## There is no encapsulation within the following macros, do not change
Chris@42 7284 ## the running order or otherwise move them around unless you know exactly
Chris@42 7285 ## what you are doing...
Chris@42 7286 _LT_COMPILER_PIC($1)
Chris@42 7287 _LT_COMPILER_C_O($1)
Chris@42 7288 _LT_COMPILER_FILE_LOCKS($1)
Chris@42 7289 _LT_LINKER_SHLIBS($1)
Chris@42 7290 _LT_SYS_DYNAMIC_LINKER($1)
Chris@42 7291 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@42 7292
Chris@42 7293 _LT_CONFIG($1)
Chris@42 7294 fi # test -n "$compiler"
Chris@42 7295
Chris@42 7296 GCC=$lt_save_GCC
Chris@42 7297 CC="$lt_save_CC"
Chris@42 7298 CFLAGS="$lt_save_CFLAGS"
Chris@42 7299 fi # test "$_lt_disable_F77" != yes
Chris@42 7300
Chris@42 7301 AC_LANG_POP
Chris@42 7302 ])# _LT_LANG_F77_CONFIG
Chris@42 7303
Chris@42 7304
Chris@42 7305 # _LT_LANG_FC_CONFIG([TAG])
Chris@42 7306 # -------------------------
Chris@42 7307 # Ensure that the configuration variables for a Fortran compiler are
Chris@42 7308 # suitably defined. These variables are subsequently used by _LT_CONFIG
Chris@42 7309 # to write the compiler configuration to `libtool'.
Chris@42 7310 m4_defun([_LT_LANG_FC_CONFIG],
Chris@42 7311 [AC_LANG_PUSH(Fortran)
Chris@42 7312
Chris@42 7313 if test -z "$FC" || test "X$FC" = "Xno"; then
Chris@42 7314 _lt_disable_FC=yes
Chris@42 7315 fi
Chris@42 7316
Chris@42 7317 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@42 7318 _LT_TAGVAR(allow_undefined_flag, $1)=
Chris@42 7319 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@42 7320 _LT_TAGVAR(archive_expsym_cmds, $1)=
Chris@42 7321 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@42 7322 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@42 7323 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@42 7324 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@42 7325 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@42 7326 _LT_TAGVAR(hardcode_minus_L, $1)=no
Chris@42 7327 _LT_TAGVAR(hardcode_automatic, $1)=no
Chris@42 7328 _LT_TAGVAR(inherit_rpath, $1)=no
Chris@42 7329 _LT_TAGVAR(module_cmds, $1)=
Chris@42 7330 _LT_TAGVAR(module_expsym_cmds, $1)=
Chris@42 7331 _LT_TAGVAR(link_all_deplibs, $1)=unknown
Chris@42 7332 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@42 7333 _LT_TAGVAR(reload_flag, $1)=$reload_flag
Chris@42 7334 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
Chris@42 7335 _LT_TAGVAR(no_undefined_flag, $1)=
Chris@42 7336 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@42 7337 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
Chris@42 7338
Chris@42 7339 # Source file extension for fc test sources.
Chris@42 7340 ac_ext=${ac_fc_srcext-f}
Chris@42 7341
Chris@42 7342 # Object file extension for compiled fc test sources.
Chris@42 7343 objext=o
Chris@42 7344 _LT_TAGVAR(objext, $1)=$objext
Chris@42 7345
Chris@42 7346 # No sense in running all these tests if we already determined that
Chris@42 7347 # the FC compiler isn't working. Some variables (like enable_shared)
Chris@42 7348 # are currently assumed to apply to all compilers on this platform,
Chris@42 7349 # and will be corrupted by setting them based on a non-working compiler.
Chris@42 7350 if test "$_lt_disable_FC" != yes; then
Chris@42 7351 # Code to be used in simple compile tests
Chris@42 7352 lt_simple_compile_test_code="\
Chris@42 7353 subroutine t
Chris@42 7354 return
Chris@42 7355 end
Chris@42 7356 "
Chris@42 7357
Chris@42 7358 # Code to be used in simple link tests
Chris@42 7359 lt_simple_link_test_code="\
Chris@42 7360 program t
Chris@42 7361 end
Chris@42 7362 "
Chris@42 7363
Chris@42 7364 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@42 7365 _LT_TAG_COMPILER
Chris@42 7366
Chris@42 7367 # save warnings/boilerplate of simple test code
Chris@42 7368 _LT_COMPILER_BOILERPLATE
Chris@42 7369 _LT_LINKER_BOILERPLATE
Chris@42 7370
Chris@42 7371 # Allow CC to be a program name with arguments.
Chris@42 7372 lt_save_CC="$CC"
Chris@42 7373 lt_save_GCC=$GCC
Chris@42 7374 lt_save_CFLAGS=$CFLAGS
Chris@42 7375 CC=${FC-"f95"}
Chris@42 7376 CFLAGS=$FCFLAGS
Chris@42 7377 compiler=$CC
Chris@42 7378 GCC=$ac_cv_fc_compiler_gnu
Chris@42 7379
Chris@42 7380 _LT_TAGVAR(compiler, $1)=$CC
Chris@42 7381 _LT_CC_BASENAME([$compiler])
Chris@42 7382
Chris@42 7383 if test -n "$compiler"; then
Chris@42 7384 AC_MSG_CHECKING([if libtool supports shared libraries])
Chris@42 7385 AC_MSG_RESULT([$can_build_shared])
Chris@42 7386
Chris@42 7387 AC_MSG_CHECKING([whether to build shared libraries])
Chris@42 7388 test "$can_build_shared" = "no" && enable_shared=no
Chris@42 7389
Chris@42 7390 # On AIX, shared libraries and static libraries use the same namespace, and
Chris@42 7391 # are all built from PIC.
Chris@42 7392 case $host_os in
Chris@42 7393 aix3*)
Chris@42 7394 test "$enable_shared" = yes && enable_static=no
Chris@42 7395 if test -n "$RANLIB"; then
Chris@42 7396 archive_cmds="$archive_cmds~\$RANLIB \$lib"
Chris@42 7397 postinstall_cmds='$RANLIB $lib'
Chris@42 7398 fi
Chris@42 7399 ;;
Chris@42 7400 aix[[4-9]]*)
Chris@42 7401 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
Chris@42 7402 test "$enable_shared" = yes && enable_static=no
Chris@42 7403 fi
Chris@42 7404 ;;
Chris@42 7405 esac
Chris@42 7406 AC_MSG_RESULT([$enable_shared])
Chris@42 7407
Chris@42 7408 AC_MSG_CHECKING([whether to build static libraries])
Chris@42 7409 # Make sure either enable_shared or enable_static is yes.
Chris@42 7410 test "$enable_shared" = yes || enable_static=yes
Chris@42 7411 AC_MSG_RESULT([$enable_static])
Chris@42 7412
Chris@42 7413 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
Chris@42 7414 _LT_TAGVAR(LD, $1)="$LD"
Chris@42 7415
Chris@42 7416 ## CAVEAT EMPTOR:
Chris@42 7417 ## There is no encapsulation within the following macros, do not change
Chris@42 7418 ## the running order or otherwise move them around unless you know exactly
Chris@42 7419 ## what you are doing...
Chris@42 7420 _LT_SYS_HIDDEN_LIBDEPS($1)
Chris@42 7421 _LT_COMPILER_PIC($1)
Chris@42 7422 _LT_COMPILER_C_O($1)
Chris@42 7423 _LT_COMPILER_FILE_LOCKS($1)
Chris@42 7424 _LT_LINKER_SHLIBS($1)
Chris@42 7425 _LT_SYS_DYNAMIC_LINKER($1)
Chris@42 7426 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@42 7427
Chris@42 7428 _LT_CONFIG($1)
Chris@42 7429 fi # test -n "$compiler"
Chris@42 7430
Chris@42 7431 GCC=$lt_save_GCC
Chris@42 7432 CC=$lt_save_CC
Chris@42 7433 CFLAGS=$lt_save_CFLAGS
Chris@42 7434 fi # test "$_lt_disable_FC" != yes
Chris@42 7435
Chris@42 7436 AC_LANG_POP
Chris@42 7437 ])# _LT_LANG_FC_CONFIG
Chris@42 7438
Chris@42 7439
Chris@42 7440 # _LT_LANG_GCJ_CONFIG([TAG])
Chris@42 7441 # --------------------------
Chris@42 7442 # Ensure that the configuration variables for the GNU Java Compiler compiler
Chris@42 7443 # are suitably defined. These variables are subsequently used by _LT_CONFIG
Chris@42 7444 # to write the compiler configuration to `libtool'.
Chris@42 7445 m4_defun([_LT_LANG_GCJ_CONFIG],
Chris@42 7446 [AC_REQUIRE([LT_PROG_GCJ])dnl
Chris@42 7447 AC_LANG_SAVE
Chris@42 7448
Chris@42 7449 # Source file extension for Java test sources.
Chris@42 7450 ac_ext=java
Chris@42 7451
Chris@42 7452 # Object file extension for compiled Java test sources.
Chris@42 7453 objext=o
Chris@42 7454 _LT_TAGVAR(objext, $1)=$objext
Chris@42 7455
Chris@42 7456 # Code to be used in simple compile tests
Chris@42 7457 lt_simple_compile_test_code="class foo {}"
Chris@42 7458
Chris@42 7459 # Code to be used in simple link tests
Chris@42 7460 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
Chris@42 7461
Chris@42 7462 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@42 7463 _LT_TAG_COMPILER
Chris@42 7464
Chris@42 7465 # save warnings/boilerplate of simple test code
Chris@42 7466 _LT_COMPILER_BOILERPLATE
Chris@42 7467 _LT_LINKER_BOILERPLATE
Chris@42 7468
Chris@42 7469 # Allow CC to be a program name with arguments.
Chris@42 7470 lt_save_CC=$CC
Chris@42 7471 lt_save_CFLAGS=$CFLAGS
Chris@42 7472 lt_save_GCC=$GCC
Chris@42 7473 GCC=yes
Chris@42 7474 CC=${GCJ-"gcj"}
Chris@42 7475 CFLAGS=$GCJFLAGS
Chris@42 7476 compiler=$CC
Chris@42 7477 _LT_TAGVAR(compiler, $1)=$CC
Chris@42 7478 _LT_TAGVAR(LD, $1)="$LD"
Chris@42 7479 _LT_CC_BASENAME([$compiler])
Chris@42 7480
Chris@42 7481 # GCJ did not exist at the time GCC didn't implicitly link libc in.
Chris@42 7482 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@42 7483
Chris@42 7484 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@42 7485 _LT_TAGVAR(reload_flag, $1)=$reload_flag
Chris@42 7486 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
Chris@42 7487
Chris@42 7488 ## CAVEAT EMPTOR:
Chris@42 7489 ## There is no encapsulation within the following macros, do not change
Chris@42 7490 ## the running order or otherwise move them around unless you know exactly
Chris@42 7491 ## what you are doing...
Chris@42 7492 if test -n "$compiler"; then
Chris@42 7493 _LT_COMPILER_NO_RTTI($1)
Chris@42 7494 _LT_COMPILER_PIC($1)
Chris@42 7495 _LT_COMPILER_C_O($1)
Chris@42 7496 _LT_COMPILER_FILE_LOCKS($1)
Chris@42 7497 _LT_LINKER_SHLIBS($1)
Chris@42 7498 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@42 7499
Chris@42 7500 _LT_CONFIG($1)
Chris@42 7501 fi
Chris@42 7502
Chris@42 7503 AC_LANG_RESTORE
Chris@42 7504
Chris@42 7505 GCC=$lt_save_GCC
Chris@42 7506 CC=$lt_save_CC
Chris@42 7507 CFLAGS=$lt_save_CFLAGS
Chris@42 7508 ])# _LT_LANG_GCJ_CONFIG
Chris@42 7509
Chris@42 7510
Chris@42 7511 # _LT_LANG_GO_CONFIG([TAG])
Chris@42 7512 # --------------------------
Chris@42 7513 # Ensure that the configuration variables for the GNU Go compiler
Chris@42 7514 # are suitably defined. These variables are subsequently used by _LT_CONFIG
Chris@42 7515 # to write the compiler configuration to `libtool'.
Chris@42 7516 m4_defun([_LT_LANG_GO_CONFIG],
Chris@42 7517 [AC_REQUIRE([LT_PROG_GO])dnl
Chris@42 7518 AC_LANG_SAVE
Chris@42 7519
Chris@42 7520 # Source file extension for Go test sources.
Chris@42 7521 ac_ext=go
Chris@42 7522
Chris@42 7523 # Object file extension for compiled Go test sources.
Chris@42 7524 objext=o
Chris@42 7525 _LT_TAGVAR(objext, $1)=$objext
Chris@42 7526
Chris@42 7527 # Code to be used in simple compile tests
Chris@42 7528 lt_simple_compile_test_code="package main; func main() { }"
Chris@42 7529
Chris@42 7530 # Code to be used in simple link tests
Chris@42 7531 lt_simple_link_test_code='package main; func main() { }'
Chris@42 7532
Chris@42 7533 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@42 7534 _LT_TAG_COMPILER
Chris@42 7535
Chris@42 7536 # save warnings/boilerplate of simple test code
Chris@42 7537 _LT_COMPILER_BOILERPLATE
Chris@42 7538 _LT_LINKER_BOILERPLATE
Chris@42 7539
Chris@42 7540 # Allow CC to be a program name with arguments.
Chris@42 7541 lt_save_CC=$CC
Chris@42 7542 lt_save_CFLAGS=$CFLAGS
Chris@42 7543 lt_save_GCC=$GCC
Chris@42 7544 GCC=yes
Chris@42 7545 CC=${GOC-"gccgo"}
Chris@42 7546 CFLAGS=$GOFLAGS
Chris@42 7547 compiler=$CC
Chris@42 7548 _LT_TAGVAR(compiler, $1)=$CC
Chris@42 7549 _LT_TAGVAR(LD, $1)="$LD"
Chris@42 7550 _LT_CC_BASENAME([$compiler])
Chris@42 7551
Chris@42 7552 # Go did not exist at the time GCC didn't implicitly link libc in.
Chris@42 7553 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@42 7554
Chris@42 7555 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@42 7556 _LT_TAGVAR(reload_flag, $1)=$reload_flag
Chris@42 7557 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
Chris@42 7558
Chris@42 7559 ## CAVEAT EMPTOR:
Chris@42 7560 ## There is no encapsulation within the following macros, do not change
Chris@42 7561 ## the running order or otherwise move them around unless you know exactly
Chris@42 7562 ## what you are doing...
Chris@42 7563 if test -n "$compiler"; then
Chris@42 7564 _LT_COMPILER_NO_RTTI($1)
Chris@42 7565 _LT_COMPILER_PIC($1)
Chris@42 7566 _LT_COMPILER_C_O($1)
Chris@42 7567 _LT_COMPILER_FILE_LOCKS($1)
Chris@42 7568 _LT_LINKER_SHLIBS($1)
Chris@42 7569 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@42 7570
Chris@42 7571 _LT_CONFIG($1)
Chris@42 7572 fi
Chris@42 7573
Chris@42 7574 AC_LANG_RESTORE
Chris@42 7575
Chris@42 7576 GCC=$lt_save_GCC
Chris@42 7577 CC=$lt_save_CC
Chris@42 7578 CFLAGS=$lt_save_CFLAGS
Chris@42 7579 ])# _LT_LANG_GO_CONFIG
Chris@42 7580
Chris@42 7581
Chris@42 7582 # _LT_LANG_RC_CONFIG([TAG])
Chris@42 7583 # -------------------------
Chris@42 7584 # Ensure that the configuration variables for the Windows resource compiler
Chris@42 7585 # are suitably defined. These variables are subsequently used by _LT_CONFIG
Chris@42 7586 # to write the compiler configuration to `libtool'.
Chris@42 7587 m4_defun([_LT_LANG_RC_CONFIG],
Chris@42 7588 [AC_REQUIRE([LT_PROG_RC])dnl
Chris@42 7589 AC_LANG_SAVE
Chris@42 7590
Chris@42 7591 # Source file extension for RC test sources.
Chris@42 7592 ac_ext=rc
Chris@42 7593
Chris@42 7594 # Object file extension for compiled RC test sources.
Chris@42 7595 objext=o
Chris@42 7596 _LT_TAGVAR(objext, $1)=$objext
Chris@42 7597
Chris@42 7598 # Code to be used in simple compile tests
Chris@42 7599 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
Chris@42 7600
Chris@42 7601 # Code to be used in simple link tests
Chris@42 7602 lt_simple_link_test_code="$lt_simple_compile_test_code"
Chris@42 7603
Chris@42 7604 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@42 7605 _LT_TAG_COMPILER
Chris@42 7606
Chris@42 7607 # save warnings/boilerplate of simple test code
Chris@42 7608 _LT_COMPILER_BOILERPLATE
Chris@42 7609 _LT_LINKER_BOILERPLATE
Chris@42 7610
Chris@42 7611 # Allow CC to be a program name with arguments.
Chris@42 7612 lt_save_CC="$CC"
Chris@42 7613 lt_save_CFLAGS=$CFLAGS
Chris@42 7614 lt_save_GCC=$GCC
Chris@42 7615 GCC=
Chris@42 7616 CC=${RC-"windres"}
Chris@42 7617 CFLAGS=
Chris@42 7618 compiler=$CC
Chris@42 7619 _LT_TAGVAR(compiler, $1)=$CC
Chris@42 7620 _LT_CC_BASENAME([$compiler])
Chris@42 7621 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
Chris@42 7622
Chris@42 7623 if test -n "$compiler"; then
Chris@42 7624 :
Chris@42 7625 _LT_CONFIG($1)
Chris@42 7626 fi
Chris@42 7627
Chris@42 7628 GCC=$lt_save_GCC
Chris@42 7629 AC_LANG_RESTORE
Chris@42 7630 CC=$lt_save_CC
Chris@42 7631 CFLAGS=$lt_save_CFLAGS
Chris@42 7632 ])# _LT_LANG_RC_CONFIG
Chris@42 7633
Chris@42 7634
Chris@42 7635 # LT_PROG_GCJ
Chris@42 7636 # -----------
Chris@42 7637 AC_DEFUN([LT_PROG_GCJ],
Chris@42 7638 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
Chris@42 7639 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
Chris@42 7640 [AC_CHECK_TOOL(GCJ, gcj,)
Chris@42 7641 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
Chris@42 7642 AC_SUBST(GCJFLAGS)])])[]dnl
Chris@42 7643 ])
Chris@42 7644
Chris@42 7645 # Old name:
Chris@42 7646 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
Chris@42 7647 dnl aclocal-1.4 backwards compatibility:
Chris@42 7648 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
Chris@42 7649
Chris@42 7650
Chris@42 7651 # LT_PROG_GO
Chris@42 7652 # ----------
Chris@42 7653 AC_DEFUN([LT_PROG_GO],
Chris@42 7654 [AC_CHECK_TOOL(GOC, gccgo,)
Chris@42 7655 ])
Chris@42 7656
Chris@42 7657
Chris@42 7658 # LT_PROG_RC
Chris@42 7659 # ----------
Chris@42 7660 AC_DEFUN([LT_PROG_RC],
Chris@42 7661 [AC_CHECK_TOOL(RC, windres,)
Chris@42 7662 ])
Chris@42 7663
Chris@42 7664 # Old name:
Chris@42 7665 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
Chris@42 7666 dnl aclocal-1.4 backwards compatibility:
Chris@42 7667 dnl AC_DEFUN([LT_AC_PROG_RC], [])
Chris@42 7668
Chris@42 7669
Chris@42 7670 # _LT_DECL_EGREP
Chris@42 7671 # --------------
Chris@42 7672 # If we don't have a new enough Autoconf to choose the best grep
Chris@42 7673 # available, choose the one first in the user's PATH.
Chris@42 7674 m4_defun([_LT_DECL_EGREP],
Chris@42 7675 [AC_REQUIRE([AC_PROG_EGREP])dnl
Chris@42 7676 AC_REQUIRE([AC_PROG_FGREP])dnl
Chris@42 7677 test -z "$GREP" && GREP=grep
Chris@42 7678 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
Chris@42 7679 _LT_DECL([], [EGREP], [1], [An ERE matcher])
Chris@42 7680 _LT_DECL([], [FGREP], [1], [A literal string matcher])
Chris@42 7681 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
Chris@42 7682 AC_SUBST([GREP])
Chris@42 7683 ])
Chris@42 7684
Chris@42 7685
Chris@42 7686 # _LT_DECL_OBJDUMP
Chris@42 7687 # --------------
Chris@42 7688 # If we don't have a new enough Autoconf to choose the best objdump
Chris@42 7689 # available, choose the one first in the user's PATH.
Chris@42 7690 m4_defun([_LT_DECL_OBJDUMP],
Chris@42 7691 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
Chris@42 7692 test -z "$OBJDUMP" && OBJDUMP=objdump
Chris@42 7693 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
Chris@42 7694 AC_SUBST([OBJDUMP])
Chris@42 7695 ])
Chris@42 7696
Chris@42 7697 # _LT_DECL_DLLTOOL
Chris@42 7698 # ----------------
Chris@42 7699 # Ensure DLLTOOL variable is set.
Chris@42 7700 m4_defun([_LT_DECL_DLLTOOL],
Chris@42 7701 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
Chris@42 7702 test -z "$DLLTOOL" && DLLTOOL=dlltool
Chris@42 7703 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
Chris@42 7704 AC_SUBST([DLLTOOL])
Chris@42 7705 ])
Chris@42 7706
Chris@42 7707 # _LT_DECL_SED
Chris@42 7708 # ------------
Chris@42 7709 # Check for a fully-functional sed program, that truncates
Chris@42 7710 # as few characters as possible. Prefer GNU sed if found.
Chris@42 7711 m4_defun([_LT_DECL_SED],
Chris@42 7712 [AC_PROG_SED
Chris@42 7713 test -z "$SED" && SED=sed
Chris@42 7714 Xsed="$SED -e 1s/^X//"
Chris@42 7715 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
Chris@42 7716 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
Chris@42 7717 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
Chris@42 7718 ])# _LT_DECL_SED
Chris@42 7719
Chris@42 7720 m4_ifndef([AC_PROG_SED], [
Chris@42 7721 ############################################################
Chris@42 7722 # NOTE: This macro has been submitted for inclusion into #
Chris@42 7723 # GNU Autoconf as AC_PROG_SED. When it is available in #
Chris@42 7724 # a released version of Autoconf we should remove this #
Chris@42 7725 # macro and use it instead. #
Chris@42 7726 ############################################################
Chris@42 7727
Chris@42 7728 m4_defun([AC_PROG_SED],
Chris@42 7729 [AC_MSG_CHECKING([for a sed that does not truncate output])
Chris@42 7730 AC_CACHE_VAL(lt_cv_path_SED,
Chris@42 7731 [# Loop through the user's path and test for sed and gsed.
Chris@42 7732 # Then use that list of sed's as ones to test for truncation.
Chris@42 7733 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Chris@42 7734 for as_dir in $PATH
Chris@42 7735 do
Chris@42 7736 IFS=$as_save_IFS
Chris@42 7737 test -z "$as_dir" && as_dir=.
Chris@42 7738 for lt_ac_prog in sed gsed; do
Chris@42 7739 for ac_exec_ext in '' $ac_executable_extensions; do
Chris@42 7740 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
Chris@42 7741 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
Chris@42 7742 fi
Chris@42 7743 done
Chris@42 7744 done
Chris@42 7745 done
Chris@42 7746 IFS=$as_save_IFS
Chris@42 7747 lt_ac_max=0
Chris@42 7748 lt_ac_count=0
Chris@42 7749 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
Chris@42 7750 # along with /bin/sed that truncates output.
Chris@42 7751 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
Chris@42 7752 test ! -f $lt_ac_sed && continue
Chris@42 7753 cat /dev/null > conftest.in
Chris@42 7754 lt_ac_count=0
Chris@42 7755 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
Chris@42 7756 # Check for GNU sed and select it if it is found.
Chris@42 7757 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
Chris@42 7758 lt_cv_path_SED=$lt_ac_sed
Chris@42 7759 break
Chris@42 7760 fi
Chris@42 7761 while true; do
Chris@42 7762 cat conftest.in conftest.in >conftest.tmp
Chris@42 7763 mv conftest.tmp conftest.in
Chris@42 7764 cp conftest.in conftest.nl
Chris@42 7765 echo >>conftest.nl
Chris@42 7766 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
Chris@42 7767 cmp -s conftest.out conftest.nl || break
Chris@42 7768 # 10000 chars as input seems more than enough
Chris@42 7769 test $lt_ac_count -gt 10 && break
Chris@42 7770 lt_ac_count=`expr $lt_ac_count + 1`
Chris@42 7771 if test $lt_ac_count -gt $lt_ac_max; then
Chris@42 7772 lt_ac_max=$lt_ac_count
Chris@42 7773 lt_cv_path_SED=$lt_ac_sed
Chris@42 7774 fi
Chris@42 7775 done
Chris@42 7776 done
Chris@42 7777 ])
Chris@42 7778 SED=$lt_cv_path_SED
Chris@42 7779 AC_SUBST([SED])
Chris@42 7780 AC_MSG_RESULT([$SED])
Chris@42 7781 ])#AC_PROG_SED
Chris@42 7782 ])#m4_ifndef
Chris@42 7783
Chris@42 7784 # Old name:
Chris@42 7785 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
Chris@42 7786 dnl aclocal-1.4 backwards compatibility:
Chris@42 7787 dnl AC_DEFUN([LT_AC_PROG_SED], [])
Chris@42 7788
Chris@42 7789
Chris@42 7790 # _LT_CHECK_SHELL_FEATURES
Chris@42 7791 # ------------------------
Chris@42 7792 # Find out whether the shell is Bourne or XSI compatible,
Chris@42 7793 # or has some other useful features.
Chris@42 7794 m4_defun([_LT_CHECK_SHELL_FEATURES],
Chris@42 7795 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
Chris@42 7796 # Try some XSI features
Chris@42 7797 xsi_shell=no
Chris@42 7798 ( _lt_dummy="a/b/c"
Chris@42 7799 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
Chris@42 7800 = c,a/b,b/c, \
Chris@42 7801 && eval 'test $(( 1 + 1 )) -eq 2 \
Chris@42 7802 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
Chris@42 7803 && xsi_shell=yes
Chris@42 7804 AC_MSG_RESULT([$xsi_shell])
Chris@42 7805 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
Chris@42 7806
Chris@42 7807 AC_MSG_CHECKING([whether the shell understands "+="])
Chris@42 7808 lt_shell_append=no
Chris@42 7809 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
Chris@42 7810 >/dev/null 2>&1 \
Chris@42 7811 && lt_shell_append=yes
Chris@42 7812 AC_MSG_RESULT([$lt_shell_append])
Chris@42 7813 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
Chris@42 7814
Chris@42 7815 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
Chris@42 7816 lt_unset=unset
Chris@42 7817 else
Chris@42 7818 lt_unset=false
Chris@42 7819 fi
Chris@42 7820 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
Chris@42 7821
Chris@42 7822 # test EBCDIC or ASCII
Chris@42 7823 case `echo X|tr X '\101'` in
Chris@42 7824 A) # ASCII based system
Chris@42 7825 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
Chris@42 7826 lt_SP2NL='tr \040 \012'
Chris@42 7827 lt_NL2SP='tr \015\012 \040\040'
Chris@42 7828 ;;
Chris@42 7829 *) # EBCDIC based system
Chris@42 7830 lt_SP2NL='tr \100 \n'
Chris@42 7831 lt_NL2SP='tr \r\n \100\100'
Chris@42 7832 ;;
Chris@42 7833 esac
Chris@42 7834 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
Chris@42 7835 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
Chris@42 7836 ])# _LT_CHECK_SHELL_FEATURES
Chris@42 7837
Chris@42 7838
Chris@42 7839 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
Chris@42 7840 # ------------------------------------------------------
Chris@42 7841 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
Chris@42 7842 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
Chris@42 7843 m4_defun([_LT_PROG_FUNCTION_REPLACE],
Chris@42 7844 [dnl {
Chris@42 7845 sed -e '/^$1 ()$/,/^} # $1 /c\
Chris@42 7846 $1 ()\
Chris@42 7847 {\
Chris@42 7848 m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
Chris@42 7849 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
Chris@42 7850 && mv -f "$cfgfile.tmp" "$cfgfile" \
Chris@42 7851 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
Chris@42 7852 test 0 -eq $? || _lt_function_replace_fail=:
Chris@42 7853 ])
Chris@42 7854
Chris@42 7855
Chris@42 7856 # _LT_PROG_REPLACE_SHELLFNS
Chris@42 7857 # -------------------------
Chris@42 7858 # Replace existing portable implementations of several shell functions with
Chris@42 7859 # equivalent extended shell implementations where those features are available..
Chris@42 7860 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
Chris@42 7861 [if test x"$xsi_shell" = xyes; then
Chris@42 7862 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
Chris@42 7863 case ${1} in
Chris@42 7864 */*) func_dirname_result="${1%/*}${2}" ;;
Chris@42 7865 * ) func_dirname_result="${3}" ;;
Chris@42 7866 esac])
Chris@42 7867
Chris@42 7868 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
Chris@42 7869 func_basename_result="${1##*/}"])
Chris@42 7870
Chris@42 7871 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
Chris@42 7872 case ${1} in
Chris@42 7873 */*) func_dirname_result="${1%/*}${2}" ;;
Chris@42 7874 * ) func_dirname_result="${3}" ;;
Chris@42 7875 esac
Chris@42 7876 func_basename_result="${1##*/}"])
Chris@42 7877
Chris@42 7878 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
Chris@42 7879 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
Chris@42 7880 # positional parameters, so assign one to ordinary parameter first.
Chris@42 7881 func_stripname_result=${3}
Chris@42 7882 func_stripname_result=${func_stripname_result#"${1}"}
Chris@42 7883 func_stripname_result=${func_stripname_result%"${2}"}])
Chris@42 7884
Chris@42 7885 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
Chris@42 7886 func_split_long_opt_name=${1%%=*}
Chris@42 7887 func_split_long_opt_arg=${1#*=}])
Chris@42 7888
Chris@42 7889 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
Chris@42 7890 func_split_short_opt_arg=${1#??}
Chris@42 7891 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
Chris@42 7892
Chris@42 7893 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
Chris@42 7894 case ${1} in
Chris@42 7895 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
Chris@42 7896 *) func_lo2o_result=${1} ;;
Chris@42 7897 esac])
Chris@42 7898
Chris@42 7899 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
Chris@42 7900
Chris@42 7901 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
Chris@42 7902
Chris@42 7903 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
Chris@42 7904 fi
Chris@42 7905
Chris@42 7906 if test x"$lt_shell_append" = xyes; then
Chris@42 7907 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
Chris@42 7908
Chris@42 7909 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
Chris@42 7910 func_quote_for_eval "${2}"
Chris@42 7911 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
Chris@42 7912 eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
Chris@42 7913
Chris@42 7914 # Save a `func_append' function call where possible by direct use of '+='
Chris@42 7915 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
Chris@42 7916 && mv -f "$cfgfile.tmp" "$cfgfile" \
Chris@42 7917 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
Chris@42 7918 test 0 -eq $? || _lt_function_replace_fail=:
Chris@42 7919 else
Chris@42 7920 # Save a `func_append' function call even when '+=' is not available
Chris@42 7921 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
Chris@42 7922 && mv -f "$cfgfile.tmp" "$cfgfile" \
Chris@42 7923 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
Chris@42 7924 test 0 -eq $? || _lt_function_replace_fail=:
Chris@42 7925 fi
Chris@42 7926
Chris@42 7927 if test x"$_lt_function_replace_fail" = x":"; then
Chris@42 7928 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
Chris@42 7929 fi
Chris@42 7930 ])
Chris@42 7931
Chris@42 7932 # _LT_PATH_CONVERSION_FUNCTIONS
Chris@42 7933 # -----------------------------
Chris@42 7934 # Determine which file name conversion functions should be used by
Chris@42 7935 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
Chris@42 7936 # for certain cross-compile configurations and native mingw.
Chris@42 7937 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
Chris@42 7938 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@42 7939 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
Chris@42 7940 AC_MSG_CHECKING([how to convert $build file names to $host format])
Chris@42 7941 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
Chris@42 7942 [case $host in
Chris@42 7943 *-*-mingw* )
Chris@42 7944 case $build in
Chris@42 7945 *-*-mingw* ) # actually msys
Chris@42 7946 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
Chris@42 7947 ;;
Chris@42 7948 *-*-cygwin* )
Chris@42 7949 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
Chris@42 7950 ;;
Chris@42 7951 * ) # otherwise, assume *nix
Chris@42 7952 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
Chris@42 7953 ;;
Chris@42 7954 esac
Chris@42 7955 ;;
Chris@42 7956 *-*-cygwin* )
Chris@42 7957 case $build in
Chris@42 7958 *-*-mingw* ) # actually msys
Chris@42 7959 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
Chris@42 7960 ;;
Chris@42 7961 *-*-cygwin* )
Chris@42 7962 lt_cv_to_host_file_cmd=func_convert_file_noop
Chris@42 7963 ;;
Chris@42 7964 * ) # otherwise, assume *nix
Chris@42 7965 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
Chris@42 7966 ;;
Chris@42 7967 esac
Chris@42 7968 ;;
Chris@42 7969 * ) # unhandled hosts (and "normal" native builds)
Chris@42 7970 lt_cv_to_host_file_cmd=func_convert_file_noop
Chris@42 7971 ;;
Chris@42 7972 esac
Chris@42 7973 ])
Chris@42 7974 to_host_file_cmd=$lt_cv_to_host_file_cmd
Chris@42 7975 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
Chris@42 7976 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
Chris@42 7977 [0], [convert $build file names to $host format])dnl
Chris@42 7978
Chris@42 7979 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
Chris@42 7980 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
Chris@42 7981 [#assume ordinary cross tools, or native build.
Chris@42 7982 lt_cv_to_tool_file_cmd=func_convert_file_noop
Chris@42 7983 case $host in
Chris@42 7984 *-*-mingw* )
Chris@42 7985 case $build in
Chris@42 7986 *-*-mingw* ) # actually msys
Chris@42 7987 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
Chris@42 7988 ;;
Chris@42 7989 esac
Chris@42 7990 ;;
Chris@42 7991 esac
Chris@42 7992 ])
Chris@42 7993 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
Chris@42 7994 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
Chris@42 7995 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
Chris@42 7996 [0], [convert $build files to toolchain format])dnl
Chris@42 7997 ])# _LT_PATH_CONVERSION_FUNCTIONS