annotate src/libsamplerate-0.1.9/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 481f5f8c5634
children
rev   line source
Chris@41 1 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
Chris@41 2 #
Chris@41 3 # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
Chris@41 4 # Written by Gordon Matzigkeit, 1996
Chris@41 5 #
Chris@41 6 # This file is free software; the Free Software Foundation gives
Chris@41 7 # unlimited permission to copy and/or distribute it, with or without
Chris@41 8 # modifications, as long as this notice is preserved.
Chris@41 9
Chris@41 10 m4_define([_LT_COPYING], [dnl
Chris@41 11 # Copyright (C) 2014 Free Software Foundation, Inc.
Chris@41 12 # This is free software; see the source for copying conditions. There is NO
Chris@41 13 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Chris@41 14
Chris@41 15 # GNU Libtool is free software; you can redistribute it and/or modify
Chris@41 16 # it under the terms of the GNU General Public License as published by
Chris@41 17 # the Free Software Foundation; either version 2 of of the License, or
Chris@41 18 # (at your option) any later version.
Chris@41 19 #
Chris@41 20 # As a special exception to the GNU General Public License, if you
Chris@41 21 # distribute this file as part of a program or library that is built
Chris@41 22 # using GNU Libtool, you may include this file under the same
Chris@41 23 # distribution terms that you use for the rest of that program.
Chris@41 24 #
Chris@41 25 # GNU Libtool is distributed in the hope that it will be useful, but
Chris@41 26 # WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@41 27 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@41 28 # GNU General Public License for more details.
Chris@41 29 #
Chris@41 30 # You should have received a copy of the GNU General Public License
Chris@41 31 # along with this program. If not, see <http://www.gnu.org/licenses/>.
Chris@41 32 ])
Chris@41 33
Chris@41 34 # serial 58 LT_INIT
Chris@41 35
Chris@41 36
Chris@41 37 # LT_PREREQ(VERSION)
Chris@41 38 # ------------------
Chris@41 39 # Complain and exit if this libtool version is less that VERSION.
Chris@41 40 m4_defun([LT_PREREQ],
Chris@41 41 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
Chris@41 42 [m4_default([$3],
Chris@41 43 [m4_fatal([Libtool version $1 or higher is required],
Chris@41 44 63)])],
Chris@41 45 [$2])])
Chris@41 46
Chris@41 47
Chris@41 48 # _LT_CHECK_BUILDDIR
Chris@41 49 # ------------------
Chris@41 50 # Complain if the absolute build directory name contains unusual characters
Chris@41 51 m4_defun([_LT_CHECK_BUILDDIR],
Chris@41 52 [case `pwd` in
Chris@41 53 *\ * | *\ *)
Chris@41 54 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
Chris@41 55 esac
Chris@41 56 ])
Chris@41 57
Chris@41 58
Chris@41 59 # LT_INIT([OPTIONS])
Chris@41 60 # ------------------
Chris@41 61 AC_DEFUN([LT_INIT],
Chris@41 62 [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
Chris@41 63 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
Chris@41 64 AC_BEFORE([$0], [LT_LANG])dnl
Chris@41 65 AC_BEFORE([$0], [LT_OUTPUT])dnl
Chris@41 66 AC_BEFORE([$0], [LTDL_INIT])dnl
Chris@41 67 m4_require([_LT_CHECK_BUILDDIR])dnl
Chris@41 68
Chris@41 69 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
Chris@41 70 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
Chris@41 71 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
Chris@41 72 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
Chris@41 73 dnl unless we require an AC_DEFUNed macro:
Chris@41 74 AC_REQUIRE([LTOPTIONS_VERSION])dnl
Chris@41 75 AC_REQUIRE([LTSUGAR_VERSION])dnl
Chris@41 76 AC_REQUIRE([LTVERSION_VERSION])dnl
Chris@41 77 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
Chris@41 78 m4_require([_LT_PROG_LTMAIN])dnl
Chris@41 79
Chris@41 80 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
Chris@41 81
Chris@41 82 dnl Parse OPTIONS
Chris@41 83 _LT_SET_OPTIONS([$0], [$1])
Chris@41 84
Chris@41 85 # This can be used to rebuild libtool when needed
Chris@41 86 LIBTOOL_DEPS=$ltmain
Chris@41 87
Chris@41 88 # Always use our own libtool.
Chris@41 89 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
Chris@41 90 AC_SUBST(LIBTOOL)dnl
Chris@41 91
Chris@41 92 _LT_SETUP
Chris@41 93
Chris@41 94 # Only expand once:
Chris@41 95 m4_define([LT_INIT])
Chris@41 96 ])# LT_INIT
Chris@41 97
Chris@41 98 # Old names:
Chris@41 99 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
Chris@41 100 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
Chris@41 101 dnl aclocal-1.4 backwards compatibility:
Chris@41 102 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
Chris@41 103 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
Chris@41 104
Chris@41 105
Chris@41 106 # _LT_PREPARE_CC_BASENAME
Chris@41 107 # -----------------------
Chris@41 108 m4_defun([_LT_PREPARE_CC_BASENAME], [
Chris@41 109 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
Chris@41 110 func_cc_basename ()
Chris@41 111 {
Chris@41 112 for cc_temp in @S|@*""; do
Chris@41 113 case $cc_temp in
Chris@41 114 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
Chris@41 115 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
Chris@41 116 \-*) ;;
Chris@41 117 *) break;;
Chris@41 118 esac
Chris@41 119 done
Chris@41 120 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
Chris@41 121 }
Chris@41 122 ])# _LT_PREPARE_CC_BASENAME
Chris@41 123
Chris@41 124
Chris@41 125 # _LT_CC_BASENAME(CC)
Chris@41 126 # -------------------
Chris@41 127 # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
Chris@41 128 # but that macro is also expanded into generated libtool script, which
Chris@41 129 # arranges for $SED and $ECHO to be set by different means.
Chris@41 130 m4_defun([_LT_CC_BASENAME],
Chris@41 131 [m4_require([_LT_PREPARE_CC_BASENAME])dnl
Chris@41 132 AC_REQUIRE([_LT_DECL_SED])dnl
Chris@41 133 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
Chris@41 134 func_cc_basename $1
Chris@41 135 cc_basename=$func_cc_basename_result
Chris@41 136 ])
Chris@41 137
Chris@41 138
Chris@41 139 # _LT_FILEUTILS_DEFAULTS
Chris@41 140 # ----------------------
Chris@41 141 # It is okay to use these file commands and assume they have been set
Chris@41 142 # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
Chris@41 143 m4_defun([_LT_FILEUTILS_DEFAULTS],
Chris@41 144 [: ${CP="cp -f"}
Chris@41 145 : ${MV="mv -f"}
Chris@41 146 : ${RM="rm -f"}
Chris@41 147 ])# _LT_FILEUTILS_DEFAULTS
Chris@41 148
Chris@41 149
Chris@41 150 # _LT_SETUP
Chris@41 151 # ---------
Chris@41 152 m4_defun([_LT_SETUP],
Chris@41 153 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@41 154 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
Chris@41 155 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
Chris@41 156 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
Chris@41 157
Chris@41 158 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
Chris@41 159 dnl
Chris@41 160 _LT_DECL([], [host_alias], [0], [The host system])dnl
Chris@41 161 _LT_DECL([], [host], [0])dnl
Chris@41 162 _LT_DECL([], [host_os], [0])dnl
Chris@41 163 dnl
Chris@41 164 _LT_DECL([], [build_alias], [0], [The build system])dnl
Chris@41 165 _LT_DECL([], [build], [0])dnl
Chris@41 166 _LT_DECL([], [build_os], [0])dnl
Chris@41 167 dnl
Chris@41 168 AC_REQUIRE([AC_PROG_CC])dnl
Chris@41 169 AC_REQUIRE([LT_PATH_LD])dnl
Chris@41 170 AC_REQUIRE([LT_PATH_NM])dnl
Chris@41 171 dnl
Chris@41 172 AC_REQUIRE([AC_PROG_LN_S])dnl
Chris@41 173 test -z "$LN_S" && LN_S="ln -s"
Chris@41 174 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
Chris@41 175 dnl
Chris@41 176 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
Chris@41 177 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
Chris@41 178 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
Chris@41 179 dnl
Chris@41 180 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@41 181 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
Chris@41 182 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
Chris@41 183 m4_require([_LT_CMD_RELOAD])dnl
Chris@41 184 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
Chris@41 185 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
Chris@41 186 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
Chris@41 187 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
Chris@41 188 m4_require([_LT_WITH_SYSROOT])dnl
Chris@41 189 m4_require([_LT_CMD_TRUNCATE])dnl
Chris@41 190
Chris@41 191 _LT_CONFIG_LIBTOOL_INIT([
Chris@41 192 # See if we are running on zsh, and set the options that allow our
Chris@41 193 # commands through without removal of \ escapes INIT.
Chris@41 194 if test -n "\${ZSH_VERSION+set}"; then
Chris@41 195 setopt NO_GLOB_SUBST
Chris@41 196 fi
Chris@41 197 ])
Chris@41 198 if test -n "${ZSH_VERSION+set}"; then
Chris@41 199 setopt NO_GLOB_SUBST
Chris@41 200 fi
Chris@41 201
Chris@41 202 _LT_CHECK_OBJDIR
Chris@41 203
Chris@41 204 m4_require([_LT_TAG_COMPILER])dnl
Chris@41 205
Chris@41 206 case $host_os in
Chris@41 207 aix3*)
Chris@41 208 # AIX sometimes has problems with the GCC collect2 program. For some
Chris@41 209 # reason, if we set the COLLECT_NAMES environment variable, the problems
Chris@41 210 # vanish in a puff of smoke.
Chris@41 211 if test set != "${COLLECT_NAMES+set}"; then
Chris@41 212 COLLECT_NAMES=
Chris@41 213 export COLLECT_NAMES
Chris@41 214 fi
Chris@41 215 ;;
Chris@41 216 esac
Chris@41 217
Chris@41 218 # Global variables:
Chris@41 219 ofile=libtool
Chris@41 220 can_build_shared=yes
Chris@41 221
Chris@41 222 # All known linkers require a '.a' archive for static linking (except MSVC,
Chris@41 223 # which needs '.lib').
Chris@41 224 libext=a
Chris@41 225
Chris@41 226 with_gnu_ld=$lt_cv_prog_gnu_ld
Chris@41 227
Chris@41 228 old_CC=$CC
Chris@41 229 old_CFLAGS=$CFLAGS
Chris@41 230
Chris@41 231 # Set sane defaults for various variables
Chris@41 232 test -z "$CC" && CC=cc
Chris@41 233 test -z "$LTCC" && LTCC=$CC
Chris@41 234 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
Chris@41 235 test -z "$LD" && LD=ld
Chris@41 236 test -z "$ac_objext" && ac_objext=o
Chris@41 237
Chris@41 238 _LT_CC_BASENAME([$compiler])
Chris@41 239
Chris@41 240 # Only perform the check for file, if the check method requires it
Chris@41 241 test -z "$MAGIC_CMD" && MAGIC_CMD=file
Chris@41 242 case $deplibs_check_method in
Chris@41 243 file_magic*)
Chris@41 244 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
Chris@41 245 _LT_PATH_MAGIC
Chris@41 246 fi
Chris@41 247 ;;
Chris@41 248 esac
Chris@41 249
Chris@41 250 # Use C for the default configuration in the libtool script
Chris@41 251 LT_SUPPORTED_TAG([CC])
Chris@41 252 _LT_LANG_C_CONFIG
Chris@41 253 _LT_LANG_DEFAULT_CONFIG
Chris@41 254 _LT_CONFIG_COMMANDS
Chris@41 255 ])# _LT_SETUP
Chris@41 256
Chris@41 257
Chris@41 258 # _LT_PREPARE_SED_QUOTE_VARS
Chris@41 259 # --------------------------
Chris@41 260 # Define a few sed substitution that help us do robust quoting.
Chris@41 261 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
Chris@41 262 [# Backslashify metacharacters that are still active within
Chris@41 263 # double-quoted strings.
Chris@41 264 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
Chris@41 265
Chris@41 266 # Same as above, but do not quote variable references.
Chris@41 267 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
Chris@41 268
Chris@41 269 # Sed substitution to delay expansion of an escaped shell variable in a
Chris@41 270 # double_quote_subst'ed string.
Chris@41 271 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
Chris@41 272
Chris@41 273 # Sed substitution to delay expansion of an escaped single quote.
Chris@41 274 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
Chris@41 275
Chris@41 276 # Sed substitution to avoid accidental globbing in evaled expressions
Chris@41 277 no_glob_subst='s/\*/\\\*/g'
Chris@41 278 ])
Chris@41 279
Chris@41 280 # _LT_PROG_LTMAIN
Chris@41 281 # ---------------
Chris@41 282 # Note that this code is called both from 'configure', and 'config.status'
Chris@41 283 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
Chris@41 284 # 'config.status' has no value for ac_aux_dir unless we are using Automake,
Chris@41 285 # so we pass a copy along to make sure it has a sensible value anyway.
Chris@41 286 m4_defun([_LT_PROG_LTMAIN],
Chris@41 287 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
Chris@41 288 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
Chris@41 289 ltmain=$ac_aux_dir/ltmain.sh
Chris@41 290 ])# _LT_PROG_LTMAIN
Chris@41 291
Chris@41 292
Chris@41 293 ## ------------------------------------- ##
Chris@41 294 ## Accumulate code for creating libtool. ##
Chris@41 295 ## ------------------------------------- ##
Chris@41 296
Chris@41 297 # So that we can recreate a full libtool script including additional
Chris@41 298 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
Chris@41 299 # in macros and then make a single call at the end using the 'libtool'
Chris@41 300 # label.
Chris@41 301
Chris@41 302
Chris@41 303 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
Chris@41 304 # ----------------------------------------
Chris@41 305 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
Chris@41 306 m4_define([_LT_CONFIG_LIBTOOL_INIT],
Chris@41 307 [m4_ifval([$1],
Chris@41 308 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
Chris@41 309 [$1
Chris@41 310 ])])])
Chris@41 311
Chris@41 312 # Initialize.
Chris@41 313 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
Chris@41 314
Chris@41 315
Chris@41 316 # _LT_CONFIG_LIBTOOL([COMMANDS])
Chris@41 317 # ------------------------------
Chris@41 318 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
Chris@41 319 m4_define([_LT_CONFIG_LIBTOOL],
Chris@41 320 [m4_ifval([$1],
Chris@41 321 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
Chris@41 322 [$1
Chris@41 323 ])])])
Chris@41 324
Chris@41 325 # Initialize.
Chris@41 326 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
Chris@41 327
Chris@41 328
Chris@41 329 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
Chris@41 330 # -----------------------------------------------------
Chris@41 331 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
Chris@41 332 [_LT_CONFIG_LIBTOOL([$1])
Chris@41 333 _LT_CONFIG_LIBTOOL_INIT([$2])
Chris@41 334 ])
Chris@41 335
Chris@41 336
Chris@41 337 # _LT_FORMAT_COMMENT([COMMENT])
Chris@41 338 # -----------------------------
Chris@41 339 # Add leading comment marks to the start of each line, and a trailing
Chris@41 340 # full-stop to the whole comment if one is not present already.
Chris@41 341 m4_define([_LT_FORMAT_COMMENT],
Chris@41 342 [m4_ifval([$1], [
Chris@41 343 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
Chris@41 344 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
Chris@41 345 )])
Chris@41 346
Chris@41 347
Chris@41 348
Chris@41 349 ## ------------------------ ##
Chris@41 350 ## FIXME: Eliminate VARNAME ##
Chris@41 351 ## ------------------------ ##
Chris@41 352
Chris@41 353
Chris@41 354 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
Chris@41 355 # -------------------------------------------------------------------
Chris@41 356 # CONFIGNAME is the name given to the value in the libtool script.
Chris@41 357 # VARNAME is the (base) name used in the configure script.
Chris@41 358 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
Chris@41 359 # VARNAME. Any other value will be used directly.
Chris@41 360 m4_define([_LT_DECL],
Chris@41 361 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
Chris@41 362 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
Chris@41 363 [m4_ifval([$1], [$1], [$2])])
Chris@41 364 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
Chris@41 365 m4_ifval([$4],
Chris@41 366 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
Chris@41 367 lt_dict_add_subkey([lt_decl_dict], [$2],
Chris@41 368 [tagged?], [m4_ifval([$5], [yes], [no])])])
Chris@41 369 ])
Chris@41 370
Chris@41 371
Chris@41 372 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
Chris@41 373 # --------------------------------------------------------
Chris@41 374 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
Chris@41 375
Chris@41 376
Chris@41 377 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
Chris@41 378 # ------------------------------------------------
Chris@41 379 m4_define([lt_decl_tag_varnames],
Chris@41 380 [_lt_decl_filter([tagged?], [yes], $@)])
Chris@41 381
Chris@41 382
Chris@41 383 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
Chris@41 384 # ---------------------------------------------------------
Chris@41 385 m4_define([_lt_decl_filter],
Chris@41 386 [m4_case([$#],
Chris@41 387 [0], [m4_fatal([$0: too few arguments: $#])],
Chris@41 388 [1], [m4_fatal([$0: too few arguments: $#: $1])],
Chris@41 389 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
Chris@41 390 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
Chris@41 391 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
Chris@41 392 ])
Chris@41 393
Chris@41 394
Chris@41 395 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
Chris@41 396 # --------------------------------------------------
Chris@41 397 m4_define([lt_decl_quote_varnames],
Chris@41 398 [_lt_decl_filter([value], [1], $@)])
Chris@41 399
Chris@41 400
Chris@41 401 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
Chris@41 402 # ---------------------------------------------------
Chris@41 403 m4_define([lt_decl_dquote_varnames],
Chris@41 404 [_lt_decl_filter([value], [2], $@)])
Chris@41 405
Chris@41 406
Chris@41 407 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
Chris@41 408 # ---------------------------------------------------
Chris@41 409 m4_define([lt_decl_varnames_tagged],
Chris@41 410 [m4_assert([$# <= 2])dnl
Chris@41 411 _$0(m4_quote(m4_default([$1], [[, ]])),
Chris@41 412 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
Chris@41 413 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
Chris@41 414 m4_define([_lt_decl_varnames_tagged],
Chris@41 415 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
Chris@41 416
Chris@41 417
Chris@41 418 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
Chris@41 419 # ------------------------------------------------
Chris@41 420 m4_define([lt_decl_all_varnames],
Chris@41 421 [_$0(m4_quote(m4_default([$1], [[, ]])),
Chris@41 422 m4_if([$2], [],
Chris@41 423 m4_quote(lt_decl_varnames),
Chris@41 424 m4_quote(m4_shift($@))))[]dnl
Chris@41 425 ])
Chris@41 426 m4_define([_lt_decl_all_varnames],
Chris@41 427 [lt_join($@, lt_decl_varnames_tagged([$1],
Chris@41 428 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
Chris@41 429 ])
Chris@41 430
Chris@41 431
Chris@41 432 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
Chris@41 433 # ------------------------------------
Chris@41 434 # Quote a variable value, and forward it to 'config.status' so that its
Chris@41 435 # declaration there will have the same value as in 'configure'. VARNAME
Chris@41 436 # must have a single quote delimited value for this to work.
Chris@41 437 m4_define([_LT_CONFIG_STATUS_DECLARE],
Chris@41 438 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
Chris@41 439
Chris@41 440
Chris@41 441 # _LT_CONFIG_STATUS_DECLARATIONS
Chris@41 442 # ------------------------------
Chris@41 443 # We delimit libtool config variables with single quotes, so when
Chris@41 444 # we write them to config.status, we have to be sure to quote all
Chris@41 445 # embedded single quotes properly. In configure, this macro expands
Chris@41 446 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
Chris@41 447 #
Chris@41 448 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
Chris@41 449 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
Chris@41 450 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
Chris@41 451 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
Chris@41 452
Chris@41 453
Chris@41 454 # _LT_LIBTOOL_TAGS
Chris@41 455 # ----------------
Chris@41 456 # Output comment and list of tags supported by the script
Chris@41 457 m4_defun([_LT_LIBTOOL_TAGS],
Chris@41 458 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
Chris@41 459 available_tags='_LT_TAGS'dnl
Chris@41 460 ])
Chris@41 461
Chris@41 462
Chris@41 463 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
Chris@41 464 # -----------------------------------
Chris@41 465 # Extract the dictionary values for VARNAME (optionally with TAG) and
Chris@41 466 # expand to a commented shell variable setting:
Chris@41 467 #
Chris@41 468 # # Some comment about what VAR is for.
Chris@41 469 # visible_name=$lt_internal_name
Chris@41 470 m4_define([_LT_LIBTOOL_DECLARE],
Chris@41 471 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
Chris@41 472 [description])))[]dnl
Chris@41 473 m4_pushdef([_libtool_name],
Chris@41 474 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
Chris@41 475 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
Chris@41 476 [0], [_libtool_name=[$]$1],
Chris@41 477 [1], [_libtool_name=$lt_[]$1],
Chris@41 478 [2], [_libtool_name=$lt_[]$1],
Chris@41 479 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
Chris@41 480 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
Chris@41 481 ])
Chris@41 482
Chris@41 483
Chris@41 484 # _LT_LIBTOOL_CONFIG_VARS
Chris@41 485 # -----------------------
Chris@41 486 # Produce commented declarations of non-tagged libtool config variables
Chris@41 487 # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
Chris@41 488 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
Chris@41 489 # section) are produced by _LT_LIBTOOL_TAG_VARS.
Chris@41 490 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
Chris@41 491 [m4_foreach([_lt_var],
Chris@41 492 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
Chris@41 493 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
Chris@41 494
Chris@41 495
Chris@41 496 # _LT_LIBTOOL_TAG_VARS(TAG)
Chris@41 497 # -------------------------
Chris@41 498 m4_define([_LT_LIBTOOL_TAG_VARS],
Chris@41 499 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
Chris@41 500 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
Chris@41 501
Chris@41 502
Chris@41 503 # _LT_TAGVAR(VARNAME, [TAGNAME])
Chris@41 504 # ------------------------------
Chris@41 505 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
Chris@41 506
Chris@41 507
Chris@41 508 # _LT_CONFIG_COMMANDS
Chris@41 509 # -------------------
Chris@41 510 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
Chris@41 511 # variables for single and double quote escaping we saved from calls
Chris@41 512 # to _LT_DECL, we can put quote escaped variables declarations
Chris@41 513 # into 'config.status', and then the shell code to quote escape them in
Chris@41 514 # for loops in 'config.status'. Finally, any additional code accumulated
Chris@41 515 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
Chris@41 516 m4_defun([_LT_CONFIG_COMMANDS],
Chris@41 517 [AC_PROVIDE_IFELSE([LT_OUTPUT],
Chris@41 518 dnl If the libtool generation code has been placed in $CONFIG_LT,
Chris@41 519 dnl instead of duplicating it all over again into config.status,
Chris@41 520 dnl then we will have config.status run $CONFIG_LT later, so it
Chris@41 521 dnl needs to know what name is stored there:
Chris@41 522 [AC_CONFIG_COMMANDS([libtool],
Chris@41 523 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
Chris@41 524 dnl If the libtool generation code is destined for config.status,
Chris@41 525 dnl expand the accumulated commands and init code now:
Chris@41 526 [AC_CONFIG_COMMANDS([libtool],
Chris@41 527 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
Chris@41 528 ])#_LT_CONFIG_COMMANDS
Chris@41 529
Chris@41 530
Chris@41 531 # Initialize.
Chris@41 532 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
Chris@41 533 [
Chris@41 534
Chris@41 535 # The HP-UX ksh and POSIX shell print the target directory to stdout
Chris@41 536 # if CDPATH is set.
Chris@41 537 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
Chris@41 538
Chris@41 539 sed_quote_subst='$sed_quote_subst'
Chris@41 540 double_quote_subst='$double_quote_subst'
Chris@41 541 delay_variable_subst='$delay_variable_subst'
Chris@41 542 _LT_CONFIG_STATUS_DECLARATIONS
Chris@41 543 LTCC='$LTCC'
Chris@41 544 LTCFLAGS='$LTCFLAGS'
Chris@41 545 compiler='$compiler_DEFAULT'
Chris@41 546
Chris@41 547 # A function that is used when there is no print builtin or printf.
Chris@41 548 func_fallback_echo ()
Chris@41 549 {
Chris@41 550 eval 'cat <<_LTECHO_EOF
Chris@41 551 \$[]1
Chris@41 552 _LTECHO_EOF'
Chris@41 553 }
Chris@41 554
Chris@41 555 # Quote evaled strings.
Chris@41 556 for var in lt_decl_all_varnames([[ \
Chris@41 557 ]], lt_decl_quote_varnames); do
Chris@41 558 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
Chris@41 559 *[[\\\\\\\`\\"\\\$]]*)
Chris@41 560 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
Chris@41 561 ;;
Chris@41 562 *)
Chris@41 563 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
Chris@41 564 ;;
Chris@41 565 esac
Chris@41 566 done
Chris@41 567
Chris@41 568 # Double-quote double-evaled strings.
Chris@41 569 for var in lt_decl_all_varnames([[ \
Chris@41 570 ]], lt_decl_dquote_varnames); do
Chris@41 571 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
Chris@41 572 *[[\\\\\\\`\\"\\\$]]*)
Chris@41 573 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
Chris@41 574 ;;
Chris@41 575 *)
Chris@41 576 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
Chris@41 577 ;;
Chris@41 578 esac
Chris@41 579 done
Chris@41 580
Chris@41 581 _LT_OUTPUT_LIBTOOL_INIT
Chris@41 582 ])
Chris@41 583
Chris@41 584 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
Chris@41 585 # ------------------------------------
Chris@41 586 # Generate a child script FILE with all initialization necessary to
Chris@41 587 # reuse the environment learned by the parent script, and make the
Chris@41 588 # file executable. If COMMENT is supplied, it is inserted after the
Chris@41 589 # '#!' sequence but before initialization text begins. After this
Chris@41 590 # macro, additional text can be appended to FILE to form the body of
Chris@41 591 # the child script. The macro ends with non-zero status if the
Chris@41 592 # file could not be fully written (such as if the disk is full).
Chris@41 593 m4_ifdef([AS_INIT_GENERATED],
Chris@41 594 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
Chris@41 595 [m4_defun([_LT_GENERATED_FILE_INIT],
Chris@41 596 [m4_require([AS_PREPARE])]dnl
Chris@41 597 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
Chris@41 598 [lt_write_fail=0
Chris@41 599 cat >$1 <<_ASEOF || lt_write_fail=1
Chris@41 600 #! $SHELL
Chris@41 601 # Generated by $as_me.
Chris@41 602 $2
Chris@41 603 SHELL=\${CONFIG_SHELL-$SHELL}
Chris@41 604 export SHELL
Chris@41 605 _ASEOF
Chris@41 606 cat >>$1 <<\_ASEOF || lt_write_fail=1
Chris@41 607 AS_SHELL_SANITIZE
Chris@41 608 _AS_PREPARE
Chris@41 609 exec AS_MESSAGE_FD>&1
Chris@41 610 _ASEOF
Chris@41 611 test 0 = "$lt_write_fail" && chmod +x $1[]dnl
Chris@41 612 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
Chris@41 613
Chris@41 614 # LT_OUTPUT
Chris@41 615 # ---------
Chris@41 616 # This macro allows early generation of the libtool script (before
Chris@41 617 # AC_OUTPUT is called), incase it is used in configure for compilation
Chris@41 618 # tests.
Chris@41 619 AC_DEFUN([LT_OUTPUT],
Chris@41 620 [: ${CONFIG_LT=./config.lt}
Chris@41 621 AC_MSG_NOTICE([creating $CONFIG_LT])
Chris@41 622 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
Chris@41 623 [# Run this file to recreate a libtool stub with the current configuration.])
Chris@41 624
Chris@41 625 cat >>"$CONFIG_LT" <<\_LTEOF
Chris@41 626 lt_cl_silent=false
Chris@41 627 exec AS_MESSAGE_LOG_FD>>config.log
Chris@41 628 {
Chris@41 629 echo
Chris@41 630 AS_BOX([Running $as_me.])
Chris@41 631 } >&AS_MESSAGE_LOG_FD
Chris@41 632
Chris@41 633 lt_cl_help="\
Chris@41 634 '$as_me' creates a local libtool stub from the current configuration,
Chris@41 635 for use in further configure time tests before the real libtool is
Chris@41 636 generated.
Chris@41 637
Chris@41 638 Usage: $[0] [[OPTIONS]]
Chris@41 639
Chris@41 640 -h, --help print this help, then exit
Chris@41 641 -V, --version print version number, then exit
Chris@41 642 -q, --quiet do not print progress messages
Chris@41 643 -d, --debug don't remove temporary files
Chris@41 644
Chris@41 645 Report bugs to <bug-libtool@gnu.org>."
Chris@41 646
Chris@41 647 lt_cl_version="\
Chris@41 648 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
Chris@41 649 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
Chris@41 650 configured by $[0], generated by m4_PACKAGE_STRING.
Chris@41 651
Chris@41 652 Copyright (C) 2011 Free Software Foundation, Inc.
Chris@41 653 This config.lt script is free software; the Free Software Foundation
Chris@41 654 gives unlimited permision to copy, distribute and modify it."
Chris@41 655
Chris@41 656 while test 0 != $[#]
Chris@41 657 do
Chris@41 658 case $[1] in
Chris@41 659 --version | --v* | -V )
Chris@41 660 echo "$lt_cl_version"; exit 0 ;;
Chris@41 661 --help | --h* | -h )
Chris@41 662 echo "$lt_cl_help"; exit 0 ;;
Chris@41 663 --debug | --d* | -d )
Chris@41 664 debug=: ;;
Chris@41 665 --quiet | --q* | --silent | --s* | -q )
Chris@41 666 lt_cl_silent=: ;;
Chris@41 667
Chris@41 668 -*) AC_MSG_ERROR([unrecognized option: $[1]
Chris@41 669 Try '$[0] --help' for more information.]) ;;
Chris@41 670
Chris@41 671 *) AC_MSG_ERROR([unrecognized argument: $[1]
Chris@41 672 Try '$[0] --help' for more information.]) ;;
Chris@41 673 esac
Chris@41 674 shift
Chris@41 675 done
Chris@41 676
Chris@41 677 if $lt_cl_silent; then
Chris@41 678 exec AS_MESSAGE_FD>/dev/null
Chris@41 679 fi
Chris@41 680 _LTEOF
Chris@41 681
Chris@41 682 cat >>"$CONFIG_LT" <<_LTEOF
Chris@41 683 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
Chris@41 684 _LTEOF
Chris@41 685
Chris@41 686 cat >>"$CONFIG_LT" <<\_LTEOF
Chris@41 687 AC_MSG_NOTICE([creating $ofile])
Chris@41 688 _LT_OUTPUT_LIBTOOL_COMMANDS
Chris@41 689 AS_EXIT(0)
Chris@41 690 _LTEOF
Chris@41 691 chmod +x "$CONFIG_LT"
Chris@41 692
Chris@41 693 # configure is writing to config.log, but config.lt does its own redirection,
Chris@41 694 # appending to config.log, which fails on DOS, as config.log is still kept
Chris@41 695 # open by configure. Here we exec the FD to /dev/null, effectively closing
Chris@41 696 # config.log, so it can be properly (re)opened and appended to by config.lt.
Chris@41 697 lt_cl_success=:
Chris@41 698 test yes = "$silent" &&
Chris@41 699 lt_config_lt_args="$lt_config_lt_args --quiet"
Chris@41 700 exec AS_MESSAGE_LOG_FD>/dev/null
Chris@41 701 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
Chris@41 702 exec AS_MESSAGE_LOG_FD>>config.log
Chris@41 703 $lt_cl_success || AS_EXIT(1)
Chris@41 704 ])# LT_OUTPUT
Chris@41 705
Chris@41 706
Chris@41 707 # _LT_CONFIG(TAG)
Chris@41 708 # ---------------
Chris@41 709 # If TAG is the built-in tag, create an initial libtool script with a
Chris@41 710 # default configuration from the untagged config vars. Otherwise add code
Chris@41 711 # to config.status for appending the configuration named by TAG from the
Chris@41 712 # matching tagged config vars.
Chris@41 713 m4_defun([_LT_CONFIG],
Chris@41 714 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@41 715 _LT_CONFIG_SAVE_COMMANDS([
Chris@41 716 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
Chris@41 717 m4_if(_LT_TAG, [C], [
Chris@41 718 # See if we are running on zsh, and set the options that allow our
Chris@41 719 # commands through without removal of \ escapes.
Chris@41 720 if test -n "${ZSH_VERSION+set}"; then
Chris@41 721 setopt NO_GLOB_SUBST
Chris@41 722 fi
Chris@41 723
Chris@41 724 cfgfile=${ofile}T
Chris@41 725 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
Chris@41 726 $RM "$cfgfile"
Chris@41 727
Chris@41 728 cat <<_LT_EOF >> "$cfgfile"
Chris@41 729 #! $SHELL
Chris@41 730 # Generated automatically by $as_me ($PACKAGE) $VERSION
Chris@41 731 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
Chris@41 732
Chris@41 733 # Provide generalized library-building support services.
Chris@41 734 # Written by Gordon Matzigkeit, 1996
Chris@41 735
Chris@41 736 _LT_COPYING
Chris@41 737 _LT_LIBTOOL_TAGS
Chris@41 738
Chris@41 739 # Configured defaults for sys_lib_dlsearch_path munging.
Chris@41 740 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
Chris@41 741
Chris@41 742 # ### BEGIN LIBTOOL CONFIG
Chris@41 743 _LT_LIBTOOL_CONFIG_VARS
Chris@41 744 _LT_LIBTOOL_TAG_VARS
Chris@41 745 # ### END LIBTOOL CONFIG
Chris@41 746
Chris@41 747 _LT_EOF
Chris@41 748
Chris@41 749 cat <<'_LT_EOF' >> "$cfgfile"
Chris@41 750
Chris@41 751 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
Chris@41 752
Chris@41 753 _LT_PREPARE_MUNGE_PATH_LIST
Chris@41 754 _LT_PREPARE_CC_BASENAME
Chris@41 755
Chris@41 756 # ### END FUNCTIONS SHARED WITH CONFIGURE
Chris@41 757
Chris@41 758 _LT_EOF
Chris@41 759
Chris@41 760 case $host_os in
Chris@41 761 aix3*)
Chris@41 762 cat <<\_LT_EOF >> "$cfgfile"
Chris@41 763 # AIX sometimes has problems with the GCC collect2 program. For some
Chris@41 764 # reason, if we set the COLLECT_NAMES environment variable, the problems
Chris@41 765 # vanish in a puff of smoke.
Chris@41 766 if test set != "${COLLECT_NAMES+set}"; then
Chris@41 767 COLLECT_NAMES=
Chris@41 768 export COLLECT_NAMES
Chris@41 769 fi
Chris@41 770 _LT_EOF
Chris@41 771 ;;
Chris@41 772 esac
Chris@41 773
Chris@41 774 _LT_PROG_LTMAIN
Chris@41 775
Chris@41 776 # We use sed instead of cat because bash on DJGPP gets confused if
Chris@41 777 # if finds mixed CR/LF and LF-only lines. Since sed operates in
Chris@41 778 # text mode, it properly converts lines to CR/LF. This bash problem
Chris@41 779 # is reportedly fixed, but why not run on old versions too?
Chris@41 780 sed '$q' "$ltmain" >> "$cfgfile" \
Chris@41 781 || (rm -f "$cfgfile"; exit 1)
Chris@41 782
Chris@41 783 mv -f "$cfgfile" "$ofile" ||
Chris@41 784 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
Chris@41 785 chmod +x "$ofile"
Chris@41 786 ],
Chris@41 787 [cat <<_LT_EOF >> "$ofile"
Chris@41 788
Chris@41 789 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
Chris@41 790 dnl in a comment (ie after a #).
Chris@41 791 # ### BEGIN LIBTOOL TAG CONFIG: $1
Chris@41 792 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
Chris@41 793 # ### END LIBTOOL TAG CONFIG: $1
Chris@41 794 _LT_EOF
Chris@41 795 ])dnl /m4_if
Chris@41 796 ],
Chris@41 797 [m4_if([$1], [], [
Chris@41 798 PACKAGE='$PACKAGE'
Chris@41 799 VERSION='$VERSION'
Chris@41 800 RM='$RM'
Chris@41 801 ofile='$ofile'], [])
Chris@41 802 ])dnl /_LT_CONFIG_SAVE_COMMANDS
Chris@41 803 ])# _LT_CONFIG
Chris@41 804
Chris@41 805
Chris@41 806 # LT_SUPPORTED_TAG(TAG)
Chris@41 807 # ---------------------
Chris@41 808 # Trace this macro to discover what tags are supported by the libtool
Chris@41 809 # --tag option, using:
Chris@41 810 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
Chris@41 811 AC_DEFUN([LT_SUPPORTED_TAG], [])
Chris@41 812
Chris@41 813
Chris@41 814 # C support is built-in for now
Chris@41 815 m4_define([_LT_LANG_C_enabled], [])
Chris@41 816 m4_define([_LT_TAGS], [])
Chris@41 817
Chris@41 818
Chris@41 819 # LT_LANG(LANG)
Chris@41 820 # -------------
Chris@41 821 # Enable libtool support for the given language if not already enabled.
Chris@41 822 AC_DEFUN([LT_LANG],
Chris@41 823 [AC_BEFORE([$0], [LT_OUTPUT])dnl
Chris@41 824 m4_case([$1],
Chris@41 825 [C], [_LT_LANG(C)],
Chris@41 826 [C++], [_LT_LANG(CXX)],
Chris@41 827 [Go], [_LT_LANG(GO)],
Chris@41 828 [Java], [_LT_LANG(GCJ)],
Chris@41 829 [Fortran 77], [_LT_LANG(F77)],
Chris@41 830 [Fortran], [_LT_LANG(FC)],
Chris@41 831 [Windows Resource], [_LT_LANG(RC)],
Chris@41 832 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
Chris@41 833 [_LT_LANG($1)],
Chris@41 834 [m4_fatal([$0: unsupported language: "$1"])])])dnl
Chris@41 835 ])# LT_LANG
Chris@41 836
Chris@41 837
Chris@41 838 # _LT_LANG(LANGNAME)
Chris@41 839 # ------------------
Chris@41 840 m4_defun([_LT_LANG],
Chris@41 841 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
Chris@41 842 [LT_SUPPORTED_TAG([$1])dnl
Chris@41 843 m4_append([_LT_TAGS], [$1 ])dnl
Chris@41 844 m4_define([_LT_LANG_]$1[_enabled], [])dnl
Chris@41 845 _LT_LANG_$1_CONFIG($1)])dnl
Chris@41 846 ])# _LT_LANG
Chris@41 847
Chris@41 848
Chris@41 849 m4_ifndef([AC_PROG_GO], [
Chris@41 850 ############################################################
Chris@41 851 # NOTE: This macro has been submitted for inclusion into #
Chris@41 852 # GNU Autoconf as AC_PROG_GO. When it is available in #
Chris@41 853 # a released version of Autoconf we should remove this #
Chris@41 854 # macro and use it instead. #
Chris@41 855 ############################################################
Chris@41 856 m4_defun([AC_PROG_GO],
Chris@41 857 [AC_LANG_PUSH(Go)dnl
Chris@41 858 AC_ARG_VAR([GOC], [Go compiler command])dnl
Chris@41 859 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
Chris@41 860 _AC_ARG_VAR_LDFLAGS()dnl
Chris@41 861 AC_CHECK_TOOL(GOC, gccgo)
Chris@41 862 if test -z "$GOC"; then
Chris@41 863 if test -n "$ac_tool_prefix"; then
Chris@41 864 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
Chris@41 865 fi
Chris@41 866 fi
Chris@41 867 if test -z "$GOC"; then
Chris@41 868 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
Chris@41 869 fi
Chris@41 870 ])#m4_defun
Chris@41 871 ])#m4_ifndef
Chris@41 872
Chris@41 873
Chris@41 874 # _LT_LANG_DEFAULT_CONFIG
Chris@41 875 # -----------------------
Chris@41 876 m4_defun([_LT_LANG_DEFAULT_CONFIG],
Chris@41 877 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
Chris@41 878 [LT_LANG(CXX)],
Chris@41 879 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
Chris@41 880
Chris@41 881 AC_PROVIDE_IFELSE([AC_PROG_F77],
Chris@41 882 [LT_LANG(F77)],
Chris@41 883 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
Chris@41 884
Chris@41 885 AC_PROVIDE_IFELSE([AC_PROG_FC],
Chris@41 886 [LT_LANG(FC)],
Chris@41 887 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
Chris@41 888
Chris@41 889 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
Chris@41 890 dnl pulling things in needlessly.
Chris@41 891 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
Chris@41 892 [LT_LANG(GCJ)],
Chris@41 893 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
Chris@41 894 [LT_LANG(GCJ)],
Chris@41 895 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
Chris@41 896 [LT_LANG(GCJ)],
Chris@41 897 [m4_ifdef([AC_PROG_GCJ],
Chris@41 898 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
Chris@41 899 m4_ifdef([A][M_PROG_GCJ],
Chris@41 900 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
Chris@41 901 m4_ifdef([LT_PROG_GCJ],
Chris@41 902 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
Chris@41 903
Chris@41 904 AC_PROVIDE_IFELSE([AC_PROG_GO],
Chris@41 905 [LT_LANG(GO)],
Chris@41 906 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
Chris@41 907
Chris@41 908 AC_PROVIDE_IFELSE([LT_PROG_RC],
Chris@41 909 [LT_LANG(RC)],
Chris@41 910 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
Chris@41 911 ])# _LT_LANG_DEFAULT_CONFIG
Chris@41 912
Chris@41 913 # Obsolete macros:
Chris@41 914 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
Chris@41 915 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
Chris@41 916 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
Chris@41 917 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
Chris@41 918 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
Chris@41 919 dnl aclocal-1.4 backwards compatibility:
Chris@41 920 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
Chris@41 921 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
Chris@41 922 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
Chris@41 923 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
Chris@41 924 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
Chris@41 925
Chris@41 926
Chris@41 927 # _LT_TAG_COMPILER
Chris@41 928 # ----------------
Chris@41 929 m4_defun([_LT_TAG_COMPILER],
Chris@41 930 [AC_REQUIRE([AC_PROG_CC])dnl
Chris@41 931
Chris@41 932 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
Chris@41 933 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
Chris@41 934 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
Chris@41 935 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
Chris@41 936
Chris@41 937 # If no C compiler was specified, use CC.
Chris@41 938 LTCC=${LTCC-"$CC"}
Chris@41 939
Chris@41 940 # If no C compiler flags were specified, use CFLAGS.
Chris@41 941 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
Chris@41 942
Chris@41 943 # Allow CC to be a program name with arguments.
Chris@41 944 compiler=$CC
Chris@41 945 ])# _LT_TAG_COMPILER
Chris@41 946
Chris@41 947
Chris@41 948 # _LT_COMPILER_BOILERPLATE
Chris@41 949 # ------------------------
Chris@41 950 # Check for compiler boilerplate output or warnings with
Chris@41 951 # the simple compiler test code.
Chris@41 952 m4_defun([_LT_COMPILER_BOILERPLATE],
Chris@41 953 [m4_require([_LT_DECL_SED])dnl
Chris@41 954 ac_outfile=conftest.$ac_objext
Chris@41 955 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
Chris@41 956 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
Chris@41 957 _lt_compiler_boilerplate=`cat conftest.err`
Chris@41 958 $RM conftest*
Chris@41 959 ])# _LT_COMPILER_BOILERPLATE
Chris@41 960
Chris@41 961
Chris@41 962 # _LT_LINKER_BOILERPLATE
Chris@41 963 # ----------------------
Chris@41 964 # Check for linker boilerplate output or warnings with
Chris@41 965 # the simple link test code.
Chris@41 966 m4_defun([_LT_LINKER_BOILERPLATE],
Chris@41 967 [m4_require([_LT_DECL_SED])dnl
Chris@41 968 ac_outfile=conftest.$ac_objext
Chris@41 969 echo "$lt_simple_link_test_code" >conftest.$ac_ext
Chris@41 970 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
Chris@41 971 _lt_linker_boilerplate=`cat conftest.err`
Chris@41 972 $RM -r conftest*
Chris@41 973 ])# _LT_LINKER_BOILERPLATE
Chris@41 974
Chris@41 975 # _LT_REQUIRED_DARWIN_CHECKS
Chris@41 976 # -------------------------
Chris@41 977 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
Chris@41 978 case $host_os in
Chris@41 979 rhapsody* | darwin*)
Chris@41 980 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
Chris@41 981 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
Chris@41 982 AC_CHECK_TOOL([LIPO], [lipo], [:])
Chris@41 983 AC_CHECK_TOOL([OTOOL], [otool], [:])
Chris@41 984 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
Chris@41 985 _LT_DECL([], [DSYMUTIL], [1],
Chris@41 986 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
Chris@41 987 _LT_DECL([], [NMEDIT], [1],
Chris@41 988 [Tool to change global to local symbols on Mac OS X])
Chris@41 989 _LT_DECL([], [LIPO], [1],
Chris@41 990 [Tool to manipulate fat objects and archives on Mac OS X])
Chris@41 991 _LT_DECL([], [OTOOL], [1],
Chris@41 992 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
Chris@41 993 _LT_DECL([], [OTOOL64], [1],
Chris@41 994 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
Chris@41 995
Chris@41 996 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
Chris@41 997 [lt_cv_apple_cc_single_mod=no
Chris@41 998 if test -z "$LT_MULTI_MODULE"; then
Chris@41 999 # By default we will add the -single_module flag. You can override
Chris@41 1000 # by either setting the environment variable LT_MULTI_MODULE
Chris@41 1001 # non-empty at configure time, or by adding -multi_module to the
Chris@41 1002 # link flags.
Chris@41 1003 rm -rf libconftest.dylib*
Chris@41 1004 echo "int foo(void){return 1;}" > conftest.c
Chris@41 1005 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
Chris@41 1006 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
Chris@41 1007 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
Chris@41 1008 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
Chris@41 1009 _lt_result=$?
Chris@41 1010 # If there is a non-empty error log, and "single_module"
Chris@41 1011 # appears in it, assume the flag caused a linker warning
Chris@41 1012 if test -s conftest.err && $GREP single_module conftest.err; then
Chris@41 1013 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@41 1014 # Otherwise, if the output was created with a 0 exit code from
Chris@41 1015 # the compiler, it worked.
Chris@41 1016 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
Chris@41 1017 lt_cv_apple_cc_single_mod=yes
Chris@41 1018 else
Chris@41 1019 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@41 1020 fi
Chris@41 1021 rm -rf libconftest.dylib*
Chris@41 1022 rm -f conftest.*
Chris@41 1023 fi])
Chris@41 1024
Chris@41 1025 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
Chris@41 1026 [lt_cv_ld_exported_symbols_list],
Chris@41 1027 [lt_cv_ld_exported_symbols_list=no
Chris@41 1028 save_LDFLAGS=$LDFLAGS
Chris@41 1029 echo "_main" > conftest.sym
Chris@41 1030 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
Chris@41 1031 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
Chris@41 1032 [lt_cv_ld_exported_symbols_list=yes],
Chris@41 1033 [lt_cv_ld_exported_symbols_list=no])
Chris@41 1034 LDFLAGS=$save_LDFLAGS
Chris@41 1035 ])
Chris@41 1036
Chris@41 1037 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
Chris@41 1038 [lt_cv_ld_force_load=no
Chris@41 1039 cat > conftest.c << _LT_EOF
Chris@41 1040 int forced_loaded() { return 2;}
Chris@41 1041 _LT_EOF
Chris@41 1042 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
Chris@41 1043 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
Chris@41 1044 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
Chris@41 1045 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
Chris@41 1046 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
Chris@41 1047 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
Chris@41 1048 cat > conftest.c << _LT_EOF
Chris@41 1049 int main() { return 0;}
Chris@41 1050 _LT_EOF
Chris@41 1051 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
Chris@41 1052 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
Chris@41 1053 _lt_result=$?
Chris@41 1054 if test -s conftest.err && $GREP force_load conftest.err; then
Chris@41 1055 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@41 1056 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
Chris@41 1057 lt_cv_ld_force_load=yes
Chris@41 1058 else
Chris@41 1059 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@41 1060 fi
Chris@41 1061 rm -f conftest.err libconftest.a conftest conftest.c
Chris@41 1062 rm -rf conftest.dSYM
Chris@41 1063 ])
Chris@41 1064 case $host_os in
Chris@41 1065 rhapsody* | darwin1.[[012]])
Chris@41 1066 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
Chris@41 1067 darwin1.*)
Chris@41 1068 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
Chris@41 1069 darwin*) # darwin 5.x on
Chris@41 1070 # if running on 10.5 or later, the deployment target defaults
Chris@41 1071 # to the OS version, if on x86, and 10.4, the deployment
Chris@41 1072 # target defaults to 10.4. Don't you love it?
Chris@41 1073 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
Chris@41 1074 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
Chris@41 1075 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
Chris@41 1076 10.[[012]][[,.]]*)
Chris@41 1077 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
Chris@41 1078 10.*)
Chris@41 1079 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
Chris@41 1080 esac
Chris@41 1081 ;;
Chris@41 1082 esac
Chris@41 1083 if test yes = "$lt_cv_apple_cc_single_mod"; then
Chris@41 1084 _lt_dar_single_mod='$single_module'
Chris@41 1085 fi
Chris@41 1086 if test yes = "$lt_cv_ld_exported_symbols_list"; then
Chris@41 1087 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
Chris@41 1088 else
Chris@41 1089 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
Chris@41 1090 fi
Chris@41 1091 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
Chris@41 1092 _lt_dsymutil='~$DSYMUTIL $lib || :'
Chris@41 1093 else
Chris@41 1094 _lt_dsymutil=
Chris@41 1095 fi
Chris@41 1096 ;;
Chris@41 1097 esac
Chris@41 1098 ])
Chris@41 1099
Chris@41 1100
Chris@41 1101 # _LT_DARWIN_LINKER_FEATURES([TAG])
Chris@41 1102 # ---------------------------------
Chris@41 1103 # Checks for linker and compiler features on darwin
Chris@41 1104 m4_defun([_LT_DARWIN_LINKER_FEATURES],
Chris@41 1105 [
Chris@41 1106 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
Chris@41 1107 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@41 1108 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@41 1109 _LT_TAGVAR(hardcode_automatic, $1)=yes
Chris@41 1110 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
Chris@41 1111 if test yes = "$lt_cv_ld_force_load"; then
Chris@41 1112 _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@41 1113 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
Chris@41 1114 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
Chris@41 1115 else
Chris@41 1116 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
Chris@41 1117 fi
Chris@41 1118 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@41 1119 _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
Chris@41 1120 case $cc_basename in
Chris@41 1121 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
Chris@41 1122 *) _lt_dar_can_shared=$GCC ;;
Chris@41 1123 esac
Chris@41 1124 if test yes = "$_lt_dar_can_shared"; then
Chris@41 1125 output_verbose_link_cmd=func_echo_all
Chris@41 1126 _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@41 1127 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
Chris@41 1128 _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@41 1129 _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@41 1130 m4_if([$1], [CXX],
Chris@41 1131 [ if test yes != "$lt_cv_apple_cc_single_mod"; then
Chris@41 1132 _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@41 1133 _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@41 1134 fi
Chris@41 1135 ],[])
Chris@41 1136 else
Chris@41 1137 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 1138 fi
Chris@41 1139 ])
Chris@41 1140
Chris@41 1141 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
Chris@41 1142 # ----------------------------------
Chris@41 1143 # Links a minimal program and checks the executable
Chris@41 1144 # for the system default hardcoded library path. In most cases,
Chris@41 1145 # this is /usr/lib:/lib, but when the MPI compilers are used
Chris@41 1146 # the location of the communication and MPI libs are included too.
Chris@41 1147 # If we don't find anything, use the default library path according
Chris@41 1148 # to the aix ld manual.
Chris@41 1149 # Store the results from the different compilers for each TAGNAME.
Chris@41 1150 # Allow to override them for all tags through lt_cv_aix_libpath.
Chris@41 1151 m4_defun([_LT_SYS_MODULE_PATH_AIX],
Chris@41 1152 [m4_require([_LT_DECL_SED])dnl
Chris@41 1153 if test set = "${lt_cv_aix_libpath+set}"; then
Chris@41 1154 aix_libpath=$lt_cv_aix_libpath
Chris@41 1155 else
Chris@41 1156 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
Chris@41 1157 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
Chris@41 1158 lt_aix_libpath_sed='[
Chris@41 1159 /Import File Strings/,/^$/ {
Chris@41 1160 /^0/ {
Chris@41 1161 s/^0 *\([^ ]*\) *$/\1/
Chris@41 1162 p
Chris@41 1163 }
Chris@41 1164 }]'
Chris@41 1165 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
Chris@41 1166 # Check for a 64-bit object if we didn't find anything.
Chris@41 1167 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
Chris@41 1168 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
Chris@41 1169 fi],[])
Chris@41 1170 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
Chris@41 1171 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
Chris@41 1172 fi
Chris@41 1173 ])
Chris@41 1174 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
Chris@41 1175 fi
Chris@41 1176 ])# _LT_SYS_MODULE_PATH_AIX
Chris@41 1177
Chris@41 1178
Chris@41 1179 # _LT_SHELL_INIT(ARG)
Chris@41 1180 # -------------------
Chris@41 1181 m4_define([_LT_SHELL_INIT],
Chris@41 1182 [m4_divert_text([M4SH-INIT], [$1
Chris@41 1183 ])])# _LT_SHELL_INIT
Chris@41 1184
Chris@41 1185
Chris@41 1186
Chris@41 1187 # _LT_PROG_ECHO_BACKSLASH
Chris@41 1188 # -----------------------
Chris@41 1189 # Find how we can fake an echo command that does not interpret backslash.
Chris@41 1190 # In particular, with Autoconf 2.60 or later we add some code to the start
Chris@41 1191 # of the generated configure script that will find a shell with a builtin
Chris@41 1192 # printf (that we can use as an echo command).
Chris@41 1193 m4_defun([_LT_PROG_ECHO_BACKSLASH],
Chris@41 1194 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
Chris@41 1195 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
Chris@41 1196 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
Chris@41 1197
Chris@41 1198 AC_MSG_CHECKING([how to print strings])
Chris@41 1199 # Test print first, because it will be a builtin if present.
Chris@41 1200 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
Chris@41 1201 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
Chris@41 1202 ECHO='print -r --'
Chris@41 1203 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
Chris@41 1204 ECHO='printf %s\n'
Chris@41 1205 else
Chris@41 1206 # Use this function as a fallback that always works.
Chris@41 1207 func_fallback_echo ()
Chris@41 1208 {
Chris@41 1209 eval 'cat <<_LTECHO_EOF
Chris@41 1210 $[]1
Chris@41 1211 _LTECHO_EOF'
Chris@41 1212 }
Chris@41 1213 ECHO='func_fallback_echo'
Chris@41 1214 fi
Chris@41 1215
Chris@41 1216 # func_echo_all arg...
Chris@41 1217 # Invoke $ECHO with all args, space-separated.
Chris@41 1218 func_echo_all ()
Chris@41 1219 {
Chris@41 1220 $ECHO "$*"
Chris@41 1221 }
Chris@41 1222
Chris@41 1223 case $ECHO in
Chris@41 1224 printf*) AC_MSG_RESULT([printf]) ;;
Chris@41 1225 print*) AC_MSG_RESULT([print -r]) ;;
Chris@41 1226 *) AC_MSG_RESULT([cat]) ;;
Chris@41 1227 esac
Chris@41 1228
Chris@41 1229 m4_ifdef([_AS_DETECT_SUGGESTED],
Chris@41 1230 [_AS_DETECT_SUGGESTED([
Chris@41 1231 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
Chris@41 1232 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
Chris@41 1233 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
Chris@41 1234 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
Chris@41 1235 PATH=/empty FPATH=/empty; export PATH FPATH
Chris@41 1236 test "X`printf %s $ECHO`" = "X$ECHO" \
Chris@41 1237 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
Chris@41 1238
Chris@41 1239 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
Chris@41 1240 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
Chris@41 1241 ])# _LT_PROG_ECHO_BACKSLASH
Chris@41 1242
Chris@41 1243
Chris@41 1244 # _LT_WITH_SYSROOT
Chris@41 1245 # ----------------
Chris@41 1246 AC_DEFUN([_LT_WITH_SYSROOT],
Chris@41 1247 [AC_MSG_CHECKING([for sysroot])
Chris@41 1248 AC_ARG_WITH([sysroot],
Chris@41 1249 [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
Chris@41 1250 [Search for dependent libraries within DIR (or the compiler's sysroot
Chris@41 1251 if not specified).])],
Chris@41 1252 [], [with_sysroot=no])
Chris@41 1253
Chris@41 1254 dnl lt_sysroot will always be passed unquoted. We quote it here
Chris@41 1255 dnl in case the user passed a directory name.
Chris@41 1256 lt_sysroot=
Chris@41 1257 case $with_sysroot in #(
Chris@41 1258 yes)
Chris@41 1259 if test yes = "$GCC"; then
Chris@41 1260 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
Chris@41 1261 fi
Chris@41 1262 ;; #(
Chris@41 1263 /*)
Chris@41 1264 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
Chris@41 1265 ;; #(
Chris@41 1266 no|'')
Chris@41 1267 ;; #(
Chris@41 1268 *)
Chris@41 1269 AC_MSG_RESULT([$with_sysroot])
Chris@41 1270 AC_MSG_ERROR([The sysroot must be an absolute path.])
Chris@41 1271 ;;
Chris@41 1272 esac
Chris@41 1273
Chris@41 1274 AC_MSG_RESULT([${lt_sysroot:-no}])
Chris@41 1275 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
Chris@41 1276 [dependent libraries, and where our libraries should be installed.])])
Chris@41 1277
Chris@41 1278 # _LT_ENABLE_LOCK
Chris@41 1279 # ---------------
Chris@41 1280 m4_defun([_LT_ENABLE_LOCK],
Chris@41 1281 [AC_ARG_ENABLE([libtool-lock],
Chris@41 1282 [AS_HELP_STRING([--disable-libtool-lock],
Chris@41 1283 [avoid locking (might break parallel builds)])])
Chris@41 1284 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
Chris@41 1285
Chris@41 1286 # Some flags need to be propagated to the compiler or linker for good
Chris@41 1287 # libtool support.
Chris@41 1288 case $host in
Chris@41 1289 ia64-*-hpux*)
Chris@41 1290 # Find out what ABI is being produced by ac_compile, and set mode
Chris@41 1291 # options accordingly.
Chris@41 1292 echo 'int i;' > conftest.$ac_ext
Chris@41 1293 if AC_TRY_EVAL(ac_compile); then
Chris@41 1294 case `/usr/bin/file conftest.$ac_objext` in
Chris@41 1295 *ELF-32*)
Chris@41 1296 HPUX_IA64_MODE=32
Chris@41 1297 ;;
Chris@41 1298 *ELF-64*)
Chris@41 1299 HPUX_IA64_MODE=64
Chris@41 1300 ;;
Chris@41 1301 esac
Chris@41 1302 fi
Chris@41 1303 rm -rf conftest*
Chris@41 1304 ;;
Chris@41 1305 *-*-irix6*)
Chris@41 1306 # Find out what ABI is being produced by ac_compile, and set linker
Chris@41 1307 # options accordingly.
Chris@41 1308 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
Chris@41 1309 if AC_TRY_EVAL(ac_compile); then
Chris@41 1310 if test yes = "$lt_cv_prog_gnu_ld"; then
Chris@41 1311 case `/usr/bin/file conftest.$ac_objext` in
Chris@41 1312 *32-bit*)
Chris@41 1313 LD="${LD-ld} -melf32bsmip"
Chris@41 1314 ;;
Chris@41 1315 *N32*)
Chris@41 1316 LD="${LD-ld} -melf32bmipn32"
Chris@41 1317 ;;
Chris@41 1318 *64-bit*)
Chris@41 1319 LD="${LD-ld} -melf64bmip"
Chris@41 1320 ;;
Chris@41 1321 esac
Chris@41 1322 else
Chris@41 1323 case `/usr/bin/file conftest.$ac_objext` in
Chris@41 1324 *32-bit*)
Chris@41 1325 LD="${LD-ld} -32"
Chris@41 1326 ;;
Chris@41 1327 *N32*)
Chris@41 1328 LD="${LD-ld} -n32"
Chris@41 1329 ;;
Chris@41 1330 *64-bit*)
Chris@41 1331 LD="${LD-ld} -64"
Chris@41 1332 ;;
Chris@41 1333 esac
Chris@41 1334 fi
Chris@41 1335 fi
Chris@41 1336 rm -rf conftest*
Chris@41 1337 ;;
Chris@41 1338
Chris@41 1339 mips64*-*linux*)
Chris@41 1340 # Find out what ABI is being produced by ac_compile, and set linker
Chris@41 1341 # options accordingly.
Chris@41 1342 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
Chris@41 1343 if AC_TRY_EVAL(ac_compile); then
Chris@41 1344 emul=elf
Chris@41 1345 case `/usr/bin/file conftest.$ac_objext` in
Chris@41 1346 *32-bit*)
Chris@41 1347 emul="${emul}32"
Chris@41 1348 ;;
Chris@41 1349 *64-bit*)
Chris@41 1350 emul="${emul}64"
Chris@41 1351 ;;
Chris@41 1352 esac
Chris@41 1353 case `/usr/bin/file conftest.$ac_objext` in
Chris@41 1354 *MSB*)
Chris@41 1355 emul="${emul}btsmip"
Chris@41 1356 ;;
Chris@41 1357 *LSB*)
Chris@41 1358 emul="${emul}ltsmip"
Chris@41 1359 ;;
Chris@41 1360 esac
Chris@41 1361 case `/usr/bin/file conftest.$ac_objext` in
Chris@41 1362 *N32*)
Chris@41 1363 emul="${emul}n32"
Chris@41 1364 ;;
Chris@41 1365 esac
Chris@41 1366 LD="${LD-ld} -m $emul"
Chris@41 1367 fi
Chris@41 1368 rm -rf conftest*
Chris@41 1369 ;;
Chris@41 1370
Chris@41 1371 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
Chris@41 1372 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
Chris@41 1373 # Find out what ABI is being produced by ac_compile, and set linker
Chris@41 1374 # options accordingly. Note that the listed cases only cover the
Chris@41 1375 # situations where additional linker options are needed (such as when
Chris@41 1376 # doing 32-bit compilation for a host where ld defaults to 64-bit, or
Chris@41 1377 # vice versa); the common cases where no linker options are needed do
Chris@41 1378 # not appear in the list.
Chris@41 1379 echo 'int i;' > conftest.$ac_ext
Chris@41 1380 if AC_TRY_EVAL(ac_compile); then
Chris@41 1381 case `/usr/bin/file conftest.o` in
Chris@41 1382 *32-bit*)
Chris@41 1383 case $host in
Chris@41 1384 x86_64-*kfreebsd*-gnu)
Chris@41 1385 LD="${LD-ld} -m elf_i386_fbsd"
Chris@41 1386 ;;
Chris@41 1387 x86_64-*linux*)
Chris@41 1388 case `/usr/bin/file conftest.o` in
Chris@41 1389 *x86-64*)
Chris@41 1390 LD="${LD-ld} -m elf32_x86_64"
Chris@41 1391 ;;
Chris@41 1392 *)
Chris@41 1393 LD="${LD-ld} -m elf_i386"
Chris@41 1394 ;;
Chris@41 1395 esac
Chris@41 1396 ;;
Chris@41 1397 powerpc64le-*linux*)
Chris@41 1398 LD="${LD-ld} -m elf32lppclinux"
Chris@41 1399 ;;
Chris@41 1400 powerpc64-*linux*)
Chris@41 1401 LD="${LD-ld} -m elf32ppclinux"
Chris@41 1402 ;;
Chris@41 1403 s390x-*linux*)
Chris@41 1404 LD="${LD-ld} -m elf_s390"
Chris@41 1405 ;;
Chris@41 1406 sparc64-*linux*)
Chris@41 1407 LD="${LD-ld} -m elf32_sparc"
Chris@41 1408 ;;
Chris@41 1409 esac
Chris@41 1410 ;;
Chris@41 1411 *64-bit*)
Chris@41 1412 case $host in
Chris@41 1413 x86_64-*kfreebsd*-gnu)
Chris@41 1414 LD="${LD-ld} -m elf_x86_64_fbsd"
Chris@41 1415 ;;
Chris@41 1416 x86_64-*linux*)
Chris@41 1417 LD="${LD-ld} -m elf_x86_64"
Chris@41 1418 ;;
Chris@41 1419 powerpcle-*linux*)
Chris@41 1420 LD="${LD-ld} -m elf64lppc"
Chris@41 1421 ;;
Chris@41 1422 powerpc-*linux*)
Chris@41 1423 LD="${LD-ld} -m elf64ppc"
Chris@41 1424 ;;
Chris@41 1425 s390*-*linux*|s390*-*tpf*)
Chris@41 1426 LD="${LD-ld} -m elf64_s390"
Chris@41 1427 ;;
Chris@41 1428 sparc*-*linux*)
Chris@41 1429 LD="${LD-ld} -m elf64_sparc"
Chris@41 1430 ;;
Chris@41 1431 esac
Chris@41 1432 ;;
Chris@41 1433 esac
Chris@41 1434 fi
Chris@41 1435 rm -rf conftest*
Chris@41 1436 ;;
Chris@41 1437
Chris@41 1438 *-*-sco3.2v5*)
Chris@41 1439 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
Chris@41 1440 SAVE_CFLAGS=$CFLAGS
Chris@41 1441 CFLAGS="$CFLAGS -belf"
Chris@41 1442 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
Chris@41 1443 [AC_LANG_PUSH(C)
Chris@41 1444 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
Chris@41 1445 AC_LANG_POP])
Chris@41 1446 if test yes != "$lt_cv_cc_needs_belf"; then
Chris@41 1447 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
Chris@41 1448 CFLAGS=$SAVE_CFLAGS
Chris@41 1449 fi
Chris@41 1450 ;;
Chris@41 1451 *-*solaris*)
Chris@41 1452 # Find out what ABI is being produced by ac_compile, and set linker
Chris@41 1453 # options accordingly.
Chris@41 1454 echo 'int i;' > conftest.$ac_ext
Chris@41 1455 if AC_TRY_EVAL(ac_compile); then
Chris@41 1456 case `/usr/bin/file conftest.o` in
Chris@41 1457 *64-bit*)
Chris@41 1458 case $lt_cv_prog_gnu_ld in
Chris@41 1459 yes*)
Chris@41 1460 case $host in
Chris@41 1461 i?86-*-solaris*|x86_64-*-solaris*)
Chris@41 1462 LD="${LD-ld} -m elf_x86_64"
Chris@41 1463 ;;
Chris@41 1464 sparc*-*-solaris*)
Chris@41 1465 LD="${LD-ld} -m elf64_sparc"
Chris@41 1466 ;;
Chris@41 1467 esac
Chris@41 1468 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
Chris@41 1469 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
Chris@41 1470 LD=${LD-ld}_sol2
Chris@41 1471 fi
Chris@41 1472 ;;
Chris@41 1473 *)
Chris@41 1474 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
Chris@41 1475 LD="${LD-ld} -64"
Chris@41 1476 fi
Chris@41 1477 ;;
Chris@41 1478 esac
Chris@41 1479 ;;
Chris@41 1480 esac
Chris@41 1481 fi
Chris@41 1482 rm -rf conftest*
Chris@41 1483 ;;
Chris@41 1484 esac
Chris@41 1485
Chris@41 1486 need_locks=$enable_libtool_lock
Chris@41 1487 ])# _LT_ENABLE_LOCK
Chris@41 1488
Chris@41 1489
Chris@41 1490 # _LT_PROG_AR
Chris@41 1491 # -----------
Chris@41 1492 m4_defun([_LT_PROG_AR],
Chris@41 1493 [AC_CHECK_TOOLS(AR, [ar], false)
Chris@41 1494 : ${AR=ar}
Chris@41 1495 : ${AR_FLAGS=cru}
Chris@41 1496 _LT_DECL([], [AR], [1], [The archiver])
Chris@41 1497 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
Chris@41 1498
Chris@41 1499 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
Chris@41 1500 [lt_cv_ar_at_file=no
Chris@41 1501 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
Chris@41 1502 [echo conftest.$ac_objext > conftest.lst
Chris@41 1503 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
Chris@41 1504 AC_TRY_EVAL([lt_ar_try])
Chris@41 1505 if test 0 -eq "$ac_status"; then
Chris@41 1506 # Ensure the archiver fails upon bogus file names.
Chris@41 1507 rm -f conftest.$ac_objext libconftest.a
Chris@41 1508 AC_TRY_EVAL([lt_ar_try])
Chris@41 1509 if test 0 -ne "$ac_status"; then
Chris@41 1510 lt_cv_ar_at_file=@
Chris@41 1511 fi
Chris@41 1512 fi
Chris@41 1513 rm -f conftest.* libconftest.a
Chris@41 1514 ])
Chris@41 1515 ])
Chris@41 1516
Chris@41 1517 if test no = "$lt_cv_ar_at_file"; then
Chris@41 1518 archiver_list_spec=
Chris@41 1519 else
Chris@41 1520 archiver_list_spec=$lt_cv_ar_at_file
Chris@41 1521 fi
Chris@41 1522 _LT_DECL([], [archiver_list_spec], [1],
Chris@41 1523 [How to feed a file listing to the archiver])
Chris@41 1524 ])# _LT_PROG_AR
Chris@41 1525
Chris@41 1526
Chris@41 1527 # _LT_CMD_OLD_ARCHIVE
Chris@41 1528 # -------------------
Chris@41 1529 m4_defun([_LT_CMD_OLD_ARCHIVE],
Chris@41 1530 [_LT_PROG_AR
Chris@41 1531
Chris@41 1532 AC_CHECK_TOOL(STRIP, strip, :)
Chris@41 1533 test -z "$STRIP" && STRIP=:
Chris@41 1534 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
Chris@41 1535
Chris@41 1536 AC_CHECK_TOOL(RANLIB, ranlib, :)
Chris@41 1537 test -z "$RANLIB" && RANLIB=:
Chris@41 1538 _LT_DECL([], [RANLIB], [1],
Chris@41 1539 [Commands used to install an old-style archive])
Chris@41 1540
Chris@41 1541 # Determine commands to create old-style static archives.
Chris@41 1542 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
Chris@41 1543 old_postinstall_cmds='chmod 644 $oldlib'
Chris@41 1544 old_postuninstall_cmds=
Chris@41 1545
Chris@41 1546 if test -n "$RANLIB"; then
Chris@41 1547 case $host_os in
Chris@41 1548 bitrig* | openbsd*)
Chris@41 1549 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
Chris@41 1550 ;;
Chris@41 1551 *)
Chris@41 1552 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
Chris@41 1553 ;;
Chris@41 1554 esac
Chris@41 1555 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
Chris@41 1556 fi
Chris@41 1557
Chris@41 1558 case $host_os in
Chris@41 1559 darwin*)
Chris@41 1560 lock_old_archive_extraction=yes ;;
Chris@41 1561 *)
Chris@41 1562 lock_old_archive_extraction=no ;;
Chris@41 1563 esac
Chris@41 1564 _LT_DECL([], [old_postinstall_cmds], [2])
Chris@41 1565 _LT_DECL([], [old_postuninstall_cmds], [2])
Chris@41 1566 _LT_TAGDECL([], [old_archive_cmds], [2],
Chris@41 1567 [Commands used to build an old-style archive])
Chris@41 1568 _LT_DECL([], [lock_old_archive_extraction], [0],
Chris@41 1569 [Whether to use a lock for old archive extraction])
Chris@41 1570 ])# _LT_CMD_OLD_ARCHIVE
Chris@41 1571
Chris@41 1572
Chris@41 1573 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
Chris@41 1574 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
Chris@41 1575 # ----------------------------------------------------------------
Chris@41 1576 # Check whether the given compiler option works
Chris@41 1577 AC_DEFUN([_LT_COMPILER_OPTION],
Chris@41 1578 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@41 1579 m4_require([_LT_DECL_SED])dnl
Chris@41 1580 AC_CACHE_CHECK([$1], [$2],
Chris@41 1581 [$2=no
Chris@41 1582 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
Chris@41 1583 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
Chris@41 1584 lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
Chris@41 1585 # Insert the option either (1) after the last *FLAGS variable, or
Chris@41 1586 # (2) before a word containing "conftest.", or (3) at the end.
Chris@41 1587 # Note that $ac_compile itself does not contain backslashes and begins
Chris@41 1588 # with a dollar sign (not a hyphen), so the echo should work correctly.
Chris@41 1589 # The option is referenced via a variable to avoid confusing sed.
Chris@41 1590 lt_compile=`echo "$ac_compile" | $SED \
Chris@41 1591 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
Chris@41 1592 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
Chris@41 1593 -e 's:$: $lt_compiler_flag:'`
Chris@41 1594 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
Chris@41 1595 (eval "$lt_compile" 2>conftest.err)
Chris@41 1596 ac_status=$?
Chris@41 1597 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@41 1598 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
Chris@41 1599 if (exit $ac_status) && test -s "$ac_outfile"; then
Chris@41 1600 # The compiler can only warn and ignore the option if not recognized
Chris@41 1601 # So say no if there are warnings other than the usual output.
Chris@41 1602 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
Chris@41 1603 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
Chris@41 1604 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
Chris@41 1605 $2=yes
Chris@41 1606 fi
Chris@41 1607 fi
Chris@41 1608 $RM conftest*
Chris@41 1609 ])
Chris@41 1610
Chris@41 1611 if test yes = "[$]$2"; then
Chris@41 1612 m4_if([$5], , :, [$5])
Chris@41 1613 else
Chris@41 1614 m4_if([$6], , :, [$6])
Chris@41 1615 fi
Chris@41 1616 ])# _LT_COMPILER_OPTION
Chris@41 1617
Chris@41 1618 # Old name:
Chris@41 1619 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
Chris@41 1620 dnl aclocal-1.4 backwards compatibility:
Chris@41 1621 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
Chris@41 1622
Chris@41 1623
Chris@41 1624 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
Chris@41 1625 # [ACTION-SUCCESS], [ACTION-FAILURE])
Chris@41 1626 # ----------------------------------------------------
Chris@41 1627 # Check whether the given linker option works
Chris@41 1628 AC_DEFUN([_LT_LINKER_OPTION],
Chris@41 1629 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@41 1630 m4_require([_LT_DECL_SED])dnl
Chris@41 1631 AC_CACHE_CHECK([$1], [$2],
Chris@41 1632 [$2=no
Chris@41 1633 save_LDFLAGS=$LDFLAGS
Chris@41 1634 LDFLAGS="$LDFLAGS $3"
Chris@41 1635 echo "$lt_simple_link_test_code" > conftest.$ac_ext
Chris@41 1636 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
Chris@41 1637 # The linker can only warn and ignore the option if not recognized
Chris@41 1638 # So say no if there are warnings
Chris@41 1639 if test -s conftest.err; then
Chris@41 1640 # Append any errors to the config.log.
Chris@41 1641 cat conftest.err 1>&AS_MESSAGE_LOG_FD
Chris@41 1642 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
Chris@41 1643 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
Chris@41 1644 if diff conftest.exp conftest.er2 >/dev/null; then
Chris@41 1645 $2=yes
Chris@41 1646 fi
Chris@41 1647 else
Chris@41 1648 $2=yes
Chris@41 1649 fi
Chris@41 1650 fi
Chris@41 1651 $RM -r conftest*
Chris@41 1652 LDFLAGS=$save_LDFLAGS
Chris@41 1653 ])
Chris@41 1654
Chris@41 1655 if test yes = "[$]$2"; then
Chris@41 1656 m4_if([$4], , :, [$4])
Chris@41 1657 else
Chris@41 1658 m4_if([$5], , :, [$5])
Chris@41 1659 fi
Chris@41 1660 ])# _LT_LINKER_OPTION
Chris@41 1661
Chris@41 1662 # Old name:
Chris@41 1663 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
Chris@41 1664 dnl aclocal-1.4 backwards compatibility:
Chris@41 1665 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
Chris@41 1666
Chris@41 1667
Chris@41 1668 # LT_CMD_MAX_LEN
Chris@41 1669 #---------------
Chris@41 1670 AC_DEFUN([LT_CMD_MAX_LEN],
Chris@41 1671 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@41 1672 # find the maximum length of command line arguments
Chris@41 1673 AC_MSG_CHECKING([the maximum length of command line arguments])
Chris@41 1674 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
Chris@41 1675 i=0
Chris@41 1676 teststring=ABCD
Chris@41 1677
Chris@41 1678 case $build_os in
Chris@41 1679 msdosdjgpp*)
Chris@41 1680 # On DJGPP, this test can blow up pretty badly due to problems in libc
Chris@41 1681 # (any single argument exceeding 2000 bytes causes a buffer overrun
Chris@41 1682 # during glob expansion). Even if it were fixed, the result of this
Chris@41 1683 # check would be larger than it should be.
Chris@41 1684 lt_cv_sys_max_cmd_len=12288; # 12K is about right
Chris@41 1685 ;;
Chris@41 1686
Chris@41 1687 gnu*)
Chris@41 1688 # Under GNU Hurd, this test is not required because there is
Chris@41 1689 # no limit to the length of command line arguments.
Chris@41 1690 # Libtool will interpret -1 as no limit whatsoever
Chris@41 1691 lt_cv_sys_max_cmd_len=-1;
Chris@41 1692 ;;
Chris@41 1693
Chris@41 1694 cygwin* | mingw* | cegcc*)
Chris@41 1695 # On Win9x/ME, this test blows up -- it succeeds, but takes
Chris@41 1696 # about 5 minutes as the teststring grows exponentially.
Chris@41 1697 # Worse, since 9x/ME are not pre-emptively multitasking,
Chris@41 1698 # you end up with a "frozen" computer, even though with patience
Chris@41 1699 # the test eventually succeeds (with a max line length of 256k).
Chris@41 1700 # Instead, let's just punt: use the minimum linelength reported by
Chris@41 1701 # all of the supported platforms: 8192 (on NT/2K/XP).
Chris@41 1702 lt_cv_sys_max_cmd_len=8192;
Chris@41 1703 ;;
Chris@41 1704
Chris@41 1705 mint*)
Chris@41 1706 # On MiNT this can take a long time and run out of memory.
Chris@41 1707 lt_cv_sys_max_cmd_len=8192;
Chris@41 1708 ;;
Chris@41 1709
Chris@41 1710 amigaos*)
Chris@41 1711 # On AmigaOS with pdksh, this test takes hours, literally.
Chris@41 1712 # So we just punt and use a minimum line length of 8192.
Chris@41 1713 lt_cv_sys_max_cmd_len=8192;
Chris@41 1714 ;;
Chris@41 1715
Chris@41 1716 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
Chris@41 1717 # This has been around since 386BSD, at least. Likely further.
Chris@41 1718 if test -x /sbin/sysctl; then
Chris@41 1719 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
Chris@41 1720 elif test -x /usr/sbin/sysctl; then
Chris@41 1721 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
Chris@41 1722 else
Chris@41 1723 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
Chris@41 1724 fi
Chris@41 1725 # And add a safety zone
Chris@41 1726 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
Chris@41 1727 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
Chris@41 1728 ;;
Chris@41 1729
Chris@41 1730 interix*)
Chris@41 1731 # We know the value 262144 and hardcode it with a safety zone (like BSD)
Chris@41 1732 lt_cv_sys_max_cmd_len=196608
Chris@41 1733 ;;
Chris@41 1734
Chris@41 1735 os2*)
Chris@41 1736 # The test takes a long time on OS/2.
Chris@41 1737 lt_cv_sys_max_cmd_len=8192
Chris@41 1738 ;;
Chris@41 1739
Chris@41 1740 osf*)
Chris@41 1741 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
Chris@41 1742 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
Chris@41 1743 # nice to cause kernel panics so lets avoid the loop below.
Chris@41 1744 # First set a reasonable default.
Chris@41 1745 lt_cv_sys_max_cmd_len=16384
Chris@41 1746 #
Chris@41 1747 if test -x /sbin/sysconfig; then
Chris@41 1748 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
Chris@41 1749 *1*) lt_cv_sys_max_cmd_len=-1 ;;
Chris@41 1750 esac
Chris@41 1751 fi
Chris@41 1752 ;;
Chris@41 1753 sco3.2v5*)
Chris@41 1754 lt_cv_sys_max_cmd_len=102400
Chris@41 1755 ;;
Chris@41 1756 sysv5* | sco5v6* | sysv4.2uw2*)
Chris@41 1757 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
Chris@41 1758 if test -n "$kargmax"; then
Chris@41 1759 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
Chris@41 1760 else
Chris@41 1761 lt_cv_sys_max_cmd_len=32768
Chris@41 1762 fi
Chris@41 1763 ;;
Chris@41 1764 *)
Chris@41 1765 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
Chris@41 1766 if test -n "$lt_cv_sys_max_cmd_len" && \
Chris@41 1767 test undefined != "$lt_cv_sys_max_cmd_len"; then
Chris@41 1768 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
Chris@41 1769 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
Chris@41 1770 else
Chris@41 1771 # Make teststring a little bigger before we do anything with it.
Chris@41 1772 # a 1K string should be a reasonable start.
Chris@41 1773 for i in 1 2 3 4 5 6 7 8; do
Chris@41 1774 teststring=$teststring$teststring
Chris@41 1775 done
Chris@41 1776 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
Chris@41 1777 # If test is not a shell built-in, we'll probably end up computing a
Chris@41 1778 # maximum length that is only half of the actual maximum length, but
Chris@41 1779 # we can't tell.
Chris@41 1780 while { test X`env echo "$teststring$teststring" 2>/dev/null` \
Chris@41 1781 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
Chris@41 1782 test 17 != "$i" # 1/2 MB should be enough
Chris@41 1783 do
Chris@41 1784 i=`expr $i + 1`
Chris@41 1785 teststring=$teststring$teststring
Chris@41 1786 done
Chris@41 1787 # Only check the string length outside the loop.
Chris@41 1788 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
Chris@41 1789 teststring=
Chris@41 1790 # Add a significant safety factor because C++ compilers can tack on
Chris@41 1791 # massive amounts of additional arguments before passing them to the
Chris@41 1792 # linker. It appears as though 1/2 is a usable value.
Chris@41 1793 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
Chris@41 1794 fi
Chris@41 1795 ;;
Chris@41 1796 esac
Chris@41 1797 ])
Chris@41 1798 if test -n "$lt_cv_sys_max_cmd_len"; then
Chris@41 1799 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
Chris@41 1800 else
Chris@41 1801 AC_MSG_RESULT(none)
Chris@41 1802 fi
Chris@41 1803 max_cmd_len=$lt_cv_sys_max_cmd_len
Chris@41 1804 _LT_DECL([], [max_cmd_len], [0],
Chris@41 1805 [What is the maximum length of a command?])
Chris@41 1806 ])# LT_CMD_MAX_LEN
Chris@41 1807
Chris@41 1808 # Old name:
Chris@41 1809 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
Chris@41 1810 dnl aclocal-1.4 backwards compatibility:
Chris@41 1811 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
Chris@41 1812
Chris@41 1813
Chris@41 1814 # _LT_HEADER_DLFCN
Chris@41 1815 # ----------------
Chris@41 1816 m4_defun([_LT_HEADER_DLFCN],
Chris@41 1817 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
Chris@41 1818 ])# _LT_HEADER_DLFCN
Chris@41 1819
Chris@41 1820
Chris@41 1821 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
Chris@41 1822 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
Chris@41 1823 # ----------------------------------------------------------------
Chris@41 1824 m4_defun([_LT_TRY_DLOPEN_SELF],
Chris@41 1825 [m4_require([_LT_HEADER_DLFCN])dnl
Chris@41 1826 if test yes = "$cross_compiling"; then :
Chris@41 1827 [$4]
Chris@41 1828 else
Chris@41 1829 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
Chris@41 1830 lt_status=$lt_dlunknown
Chris@41 1831 cat > conftest.$ac_ext <<_LT_EOF
Chris@41 1832 [#line $LINENO "configure"
Chris@41 1833 #include "confdefs.h"
Chris@41 1834
Chris@41 1835 #if HAVE_DLFCN_H
Chris@41 1836 #include <dlfcn.h>
Chris@41 1837 #endif
Chris@41 1838
Chris@41 1839 #include <stdio.h>
Chris@41 1840
Chris@41 1841 #ifdef RTLD_GLOBAL
Chris@41 1842 # define LT_DLGLOBAL RTLD_GLOBAL
Chris@41 1843 #else
Chris@41 1844 # ifdef DL_GLOBAL
Chris@41 1845 # define LT_DLGLOBAL DL_GLOBAL
Chris@41 1846 # else
Chris@41 1847 # define LT_DLGLOBAL 0
Chris@41 1848 # endif
Chris@41 1849 #endif
Chris@41 1850
Chris@41 1851 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
Chris@41 1852 find out it does not work in some platform. */
Chris@41 1853 #ifndef LT_DLLAZY_OR_NOW
Chris@41 1854 # ifdef RTLD_LAZY
Chris@41 1855 # define LT_DLLAZY_OR_NOW RTLD_LAZY
Chris@41 1856 # else
Chris@41 1857 # ifdef DL_LAZY
Chris@41 1858 # define LT_DLLAZY_OR_NOW DL_LAZY
Chris@41 1859 # else
Chris@41 1860 # ifdef RTLD_NOW
Chris@41 1861 # define LT_DLLAZY_OR_NOW RTLD_NOW
Chris@41 1862 # else
Chris@41 1863 # ifdef DL_NOW
Chris@41 1864 # define LT_DLLAZY_OR_NOW DL_NOW
Chris@41 1865 # else
Chris@41 1866 # define LT_DLLAZY_OR_NOW 0
Chris@41 1867 # endif
Chris@41 1868 # endif
Chris@41 1869 # endif
Chris@41 1870 # endif
Chris@41 1871 #endif
Chris@41 1872
Chris@41 1873 /* When -fvisibility=hidden is used, assume the code has been annotated
Chris@41 1874 correspondingly for the symbols needed. */
Chris@41 1875 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
Chris@41 1876 int fnord () __attribute__((visibility("default")));
Chris@41 1877 #endif
Chris@41 1878
Chris@41 1879 int fnord () { return 42; }
Chris@41 1880 int main ()
Chris@41 1881 {
Chris@41 1882 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
Chris@41 1883 int status = $lt_dlunknown;
Chris@41 1884
Chris@41 1885 if (self)
Chris@41 1886 {
Chris@41 1887 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
Chris@41 1888 else
Chris@41 1889 {
Chris@41 1890 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
Chris@41 1891 else puts (dlerror ());
Chris@41 1892 }
Chris@41 1893 /* dlclose (self); */
Chris@41 1894 }
Chris@41 1895 else
Chris@41 1896 puts (dlerror ());
Chris@41 1897
Chris@41 1898 return status;
Chris@41 1899 }]
Chris@41 1900 _LT_EOF
Chris@41 1901 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
Chris@41 1902 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
Chris@41 1903 lt_status=$?
Chris@41 1904 case x$lt_status in
Chris@41 1905 x$lt_dlno_uscore) $1 ;;
Chris@41 1906 x$lt_dlneed_uscore) $2 ;;
Chris@41 1907 x$lt_dlunknown|x*) $3 ;;
Chris@41 1908 esac
Chris@41 1909 else :
Chris@41 1910 # compilation failed
Chris@41 1911 $3
Chris@41 1912 fi
Chris@41 1913 fi
Chris@41 1914 rm -fr conftest*
Chris@41 1915 ])# _LT_TRY_DLOPEN_SELF
Chris@41 1916
Chris@41 1917
Chris@41 1918 # LT_SYS_DLOPEN_SELF
Chris@41 1919 # ------------------
Chris@41 1920 AC_DEFUN([LT_SYS_DLOPEN_SELF],
Chris@41 1921 [m4_require([_LT_HEADER_DLFCN])dnl
Chris@41 1922 if test yes != "$enable_dlopen"; then
Chris@41 1923 enable_dlopen=unknown
Chris@41 1924 enable_dlopen_self=unknown
Chris@41 1925 enable_dlopen_self_static=unknown
Chris@41 1926 else
Chris@41 1927 lt_cv_dlopen=no
Chris@41 1928 lt_cv_dlopen_libs=
Chris@41 1929
Chris@41 1930 case $host_os in
Chris@41 1931 beos*)
Chris@41 1932 lt_cv_dlopen=load_add_on
Chris@41 1933 lt_cv_dlopen_libs=
Chris@41 1934 lt_cv_dlopen_self=yes
Chris@41 1935 ;;
Chris@41 1936
Chris@41 1937 mingw* | pw32* | cegcc*)
Chris@41 1938 lt_cv_dlopen=LoadLibrary
Chris@41 1939 lt_cv_dlopen_libs=
Chris@41 1940 ;;
Chris@41 1941
Chris@41 1942 cygwin*)
Chris@41 1943 lt_cv_dlopen=dlopen
Chris@41 1944 lt_cv_dlopen_libs=
Chris@41 1945 ;;
Chris@41 1946
Chris@41 1947 darwin*)
Chris@41 1948 # if libdl is installed we need to link against it
Chris@41 1949 AC_CHECK_LIB([dl], [dlopen],
Chris@41 1950 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
Chris@41 1951 lt_cv_dlopen=dyld
Chris@41 1952 lt_cv_dlopen_libs=
Chris@41 1953 lt_cv_dlopen_self=yes
Chris@41 1954 ])
Chris@41 1955 ;;
Chris@41 1956
Chris@41 1957 tpf*)
Chris@41 1958 # Don't try to run any link tests for TPF. We know it's impossible
Chris@41 1959 # because TPF is a cross-compiler, and we know how we open DSOs.
Chris@41 1960 lt_cv_dlopen=dlopen
Chris@41 1961 lt_cv_dlopen_libs=
Chris@41 1962 lt_cv_dlopen_self=no
Chris@41 1963 ;;
Chris@41 1964
Chris@41 1965 *)
Chris@41 1966 AC_CHECK_FUNC([shl_load],
Chris@41 1967 [lt_cv_dlopen=shl_load],
Chris@41 1968 [AC_CHECK_LIB([dld], [shl_load],
Chris@41 1969 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
Chris@41 1970 [AC_CHECK_FUNC([dlopen],
Chris@41 1971 [lt_cv_dlopen=dlopen],
Chris@41 1972 [AC_CHECK_LIB([dl], [dlopen],
Chris@41 1973 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
Chris@41 1974 [AC_CHECK_LIB([svld], [dlopen],
Chris@41 1975 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
Chris@41 1976 [AC_CHECK_LIB([dld], [dld_link],
Chris@41 1977 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
Chris@41 1978 ])
Chris@41 1979 ])
Chris@41 1980 ])
Chris@41 1981 ])
Chris@41 1982 ])
Chris@41 1983 ;;
Chris@41 1984 esac
Chris@41 1985
Chris@41 1986 if test no = "$lt_cv_dlopen"; then
Chris@41 1987 enable_dlopen=no
Chris@41 1988 else
Chris@41 1989 enable_dlopen=yes
Chris@41 1990 fi
Chris@41 1991
Chris@41 1992 case $lt_cv_dlopen in
Chris@41 1993 dlopen)
Chris@41 1994 save_CPPFLAGS=$CPPFLAGS
Chris@41 1995 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
Chris@41 1996
Chris@41 1997 save_LDFLAGS=$LDFLAGS
Chris@41 1998 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
Chris@41 1999
Chris@41 2000 save_LIBS=$LIBS
Chris@41 2001 LIBS="$lt_cv_dlopen_libs $LIBS"
Chris@41 2002
Chris@41 2003 AC_CACHE_CHECK([whether a program can dlopen itself],
Chris@41 2004 lt_cv_dlopen_self, [dnl
Chris@41 2005 _LT_TRY_DLOPEN_SELF(
Chris@41 2006 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
Chris@41 2007 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
Chris@41 2008 ])
Chris@41 2009
Chris@41 2010 if test yes = "$lt_cv_dlopen_self"; then
Chris@41 2011 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
Chris@41 2012 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
Chris@41 2013 lt_cv_dlopen_self_static, [dnl
Chris@41 2014 _LT_TRY_DLOPEN_SELF(
Chris@41 2015 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
Chris@41 2016 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
Chris@41 2017 ])
Chris@41 2018 fi
Chris@41 2019
Chris@41 2020 CPPFLAGS=$save_CPPFLAGS
Chris@41 2021 LDFLAGS=$save_LDFLAGS
Chris@41 2022 LIBS=$save_LIBS
Chris@41 2023 ;;
Chris@41 2024 esac
Chris@41 2025
Chris@41 2026 case $lt_cv_dlopen_self in
Chris@41 2027 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
Chris@41 2028 *) enable_dlopen_self=unknown ;;
Chris@41 2029 esac
Chris@41 2030
Chris@41 2031 case $lt_cv_dlopen_self_static in
Chris@41 2032 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
Chris@41 2033 *) enable_dlopen_self_static=unknown ;;
Chris@41 2034 esac
Chris@41 2035 fi
Chris@41 2036 _LT_DECL([dlopen_support], [enable_dlopen], [0],
Chris@41 2037 [Whether dlopen is supported])
Chris@41 2038 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
Chris@41 2039 [Whether dlopen of programs is supported])
Chris@41 2040 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
Chris@41 2041 [Whether dlopen of statically linked programs is supported])
Chris@41 2042 ])# LT_SYS_DLOPEN_SELF
Chris@41 2043
Chris@41 2044 # Old name:
Chris@41 2045 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
Chris@41 2046 dnl aclocal-1.4 backwards compatibility:
Chris@41 2047 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
Chris@41 2048
Chris@41 2049
Chris@41 2050 # _LT_COMPILER_C_O([TAGNAME])
Chris@41 2051 # ---------------------------
Chris@41 2052 # Check to see if options -c and -o are simultaneously supported by compiler.
Chris@41 2053 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
Chris@41 2054 m4_defun([_LT_COMPILER_C_O],
Chris@41 2055 [m4_require([_LT_DECL_SED])dnl
Chris@41 2056 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@41 2057 m4_require([_LT_TAG_COMPILER])dnl
Chris@41 2058 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
Chris@41 2059 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
Chris@41 2060 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
Chris@41 2061 $RM -r conftest 2>/dev/null
Chris@41 2062 mkdir conftest
Chris@41 2063 cd conftest
Chris@41 2064 mkdir out
Chris@41 2065 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
Chris@41 2066
Chris@41 2067 lt_compiler_flag="-o out/conftest2.$ac_objext"
Chris@41 2068 # Insert the option either (1) after the last *FLAGS variable, or
Chris@41 2069 # (2) before a word containing "conftest.", or (3) at the end.
Chris@41 2070 # Note that $ac_compile itself does not contain backslashes and begins
Chris@41 2071 # with a dollar sign (not a hyphen), so the echo should work correctly.
Chris@41 2072 lt_compile=`echo "$ac_compile" | $SED \
Chris@41 2073 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
Chris@41 2074 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
Chris@41 2075 -e 's:$: $lt_compiler_flag:'`
Chris@41 2076 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
Chris@41 2077 (eval "$lt_compile" 2>out/conftest.err)
Chris@41 2078 ac_status=$?
Chris@41 2079 cat out/conftest.err >&AS_MESSAGE_LOG_FD
Chris@41 2080 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
Chris@41 2081 if (exit $ac_status) && test -s out/conftest2.$ac_objext
Chris@41 2082 then
Chris@41 2083 # The compiler can only warn and ignore the option if not recognized
Chris@41 2084 # So say no if there are warnings
Chris@41 2085 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
Chris@41 2086 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
Chris@41 2087 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
Chris@41 2088 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
Chris@41 2089 fi
Chris@41 2090 fi
Chris@41 2091 chmod u+w . 2>&AS_MESSAGE_LOG_FD
Chris@41 2092 $RM conftest*
Chris@41 2093 # SGI C++ compiler will create directory out/ii_files/ for
Chris@41 2094 # template instantiation
Chris@41 2095 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
Chris@41 2096 $RM out/* && rmdir out
Chris@41 2097 cd ..
Chris@41 2098 $RM -r conftest
Chris@41 2099 $RM conftest*
Chris@41 2100 ])
Chris@41 2101 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
Chris@41 2102 [Does compiler simultaneously support -c and -o options?])
Chris@41 2103 ])# _LT_COMPILER_C_O
Chris@41 2104
Chris@41 2105
Chris@41 2106 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
Chris@41 2107 # ----------------------------------
Chris@41 2108 # Check to see if we can do hard links to lock some files if needed
Chris@41 2109 m4_defun([_LT_COMPILER_FILE_LOCKS],
Chris@41 2110 [m4_require([_LT_ENABLE_LOCK])dnl
Chris@41 2111 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@41 2112 _LT_COMPILER_C_O([$1])
Chris@41 2113
Chris@41 2114 hard_links=nottested
Chris@41 2115 if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
Chris@41 2116 # do not overwrite the value of need_locks provided by the user
Chris@41 2117 AC_MSG_CHECKING([if we can lock with hard links])
Chris@41 2118 hard_links=yes
Chris@41 2119 $RM conftest*
Chris@41 2120 ln conftest.a conftest.b 2>/dev/null && hard_links=no
Chris@41 2121 touch conftest.a
Chris@41 2122 ln conftest.a conftest.b 2>&5 || hard_links=no
Chris@41 2123 ln conftest.a conftest.b 2>/dev/null && hard_links=no
Chris@41 2124 AC_MSG_RESULT([$hard_links])
Chris@41 2125 if test no = "$hard_links"; then
Chris@41 2126 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
Chris@41 2127 need_locks=warn
Chris@41 2128 fi
Chris@41 2129 else
Chris@41 2130 need_locks=no
Chris@41 2131 fi
Chris@41 2132 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
Chris@41 2133 ])# _LT_COMPILER_FILE_LOCKS
Chris@41 2134
Chris@41 2135
Chris@41 2136 # _LT_CHECK_OBJDIR
Chris@41 2137 # ----------------
Chris@41 2138 m4_defun([_LT_CHECK_OBJDIR],
Chris@41 2139 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
Chris@41 2140 [rm -f .libs 2>/dev/null
Chris@41 2141 mkdir .libs 2>/dev/null
Chris@41 2142 if test -d .libs; then
Chris@41 2143 lt_cv_objdir=.libs
Chris@41 2144 else
Chris@41 2145 # MS-DOS does not allow filenames that begin with a dot.
Chris@41 2146 lt_cv_objdir=_libs
Chris@41 2147 fi
Chris@41 2148 rmdir .libs 2>/dev/null])
Chris@41 2149 objdir=$lt_cv_objdir
Chris@41 2150 _LT_DECL([], [objdir], [0],
Chris@41 2151 [The name of the directory that contains temporary libtool files])dnl
Chris@41 2152 m4_pattern_allow([LT_OBJDIR])dnl
Chris@41 2153 AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
Chris@41 2154 [Define to the sub-directory where libtool stores uninstalled libraries.])
Chris@41 2155 ])# _LT_CHECK_OBJDIR
Chris@41 2156
Chris@41 2157
Chris@41 2158 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
Chris@41 2159 # --------------------------------------
Chris@41 2160 # Check hardcoding attributes.
Chris@41 2161 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
Chris@41 2162 [AC_MSG_CHECKING([how to hardcode library paths into programs])
Chris@41 2163 _LT_TAGVAR(hardcode_action, $1)=
Chris@41 2164 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
Chris@41 2165 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
Chris@41 2166 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
Chris@41 2167
Chris@41 2168 # We can hardcode non-existent directories.
Chris@41 2169 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
Chris@41 2170 # If the only mechanism to avoid hardcoding is shlibpath_var, we
Chris@41 2171 # have to relink, otherwise we might link with an installed library
Chris@41 2172 # when we should be linking with a yet-to-be-installed one
Chris@41 2173 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
Chris@41 2174 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
Chris@41 2175 # Linking always hardcodes the temporary library directory.
Chris@41 2176 _LT_TAGVAR(hardcode_action, $1)=relink
Chris@41 2177 else
Chris@41 2178 # We can link without hardcoding, and we can hardcode nonexisting dirs.
Chris@41 2179 _LT_TAGVAR(hardcode_action, $1)=immediate
Chris@41 2180 fi
Chris@41 2181 else
Chris@41 2182 # We cannot hardcode anything, or else we can only hardcode existing
Chris@41 2183 # directories.
Chris@41 2184 _LT_TAGVAR(hardcode_action, $1)=unsupported
Chris@41 2185 fi
Chris@41 2186 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
Chris@41 2187
Chris@41 2188 if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
Chris@41 2189 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
Chris@41 2190 # Fast installation is not supported
Chris@41 2191 enable_fast_install=no
Chris@41 2192 elif test yes = "$shlibpath_overrides_runpath" ||
Chris@41 2193 test no = "$enable_shared"; then
Chris@41 2194 # Fast installation is not necessary
Chris@41 2195 enable_fast_install=needless
Chris@41 2196 fi
Chris@41 2197 _LT_TAGDECL([], [hardcode_action], [0],
Chris@41 2198 [How to hardcode a shared library path into an executable])
Chris@41 2199 ])# _LT_LINKER_HARDCODE_LIBPATH
Chris@41 2200
Chris@41 2201
Chris@41 2202 # _LT_CMD_STRIPLIB
Chris@41 2203 # ----------------
Chris@41 2204 m4_defun([_LT_CMD_STRIPLIB],
Chris@41 2205 [m4_require([_LT_DECL_EGREP])
Chris@41 2206 striplib=
Chris@41 2207 old_striplib=
Chris@41 2208 AC_MSG_CHECKING([whether stripping libraries is possible])
Chris@41 2209 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
Chris@41 2210 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
Chris@41 2211 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
Chris@41 2212 AC_MSG_RESULT([yes])
Chris@41 2213 else
Chris@41 2214 # FIXME - insert some real tests, host_os isn't really good enough
Chris@41 2215 case $host_os in
Chris@41 2216 darwin*)
Chris@41 2217 if test -n "$STRIP"; then
Chris@41 2218 striplib="$STRIP -x"
Chris@41 2219 old_striplib="$STRIP -S"
Chris@41 2220 AC_MSG_RESULT([yes])
Chris@41 2221 else
Chris@41 2222 AC_MSG_RESULT([no])
Chris@41 2223 fi
Chris@41 2224 ;;
Chris@41 2225 *)
Chris@41 2226 AC_MSG_RESULT([no])
Chris@41 2227 ;;
Chris@41 2228 esac
Chris@41 2229 fi
Chris@41 2230 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
Chris@41 2231 _LT_DECL([], [striplib], [1])
Chris@41 2232 ])# _LT_CMD_STRIPLIB
Chris@41 2233
Chris@41 2234
Chris@41 2235 # _LT_PREPARE_MUNGE_PATH_LIST
Chris@41 2236 # ---------------------------
Chris@41 2237 # Make sure func_munge_path_list() is defined correctly.
Chris@41 2238 m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
Chris@41 2239 [[# func_munge_path_list VARIABLE PATH
Chris@41 2240 # -----------------------------------
Chris@41 2241 # VARIABLE is name of variable containing _space_ separated list of
Chris@41 2242 # directories to be munged by the contents of PATH, which is string
Chris@41 2243 # having a format:
Chris@41 2244 # "DIR[:DIR]:"
Chris@41 2245 # string "DIR[ DIR]" will be prepended to VARIABLE
Chris@41 2246 # ":DIR[:DIR]"
Chris@41 2247 # string "DIR[ DIR]" will be appended to VARIABLE
Chris@41 2248 # "DIRP[:DIRP]::[DIRA:]DIRA"
Chris@41 2249 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
Chris@41 2250 # "DIRA[ DIRA]" will be appended to VARIABLE
Chris@41 2251 # "DIR[:DIR]"
Chris@41 2252 # VARIABLE will be replaced by "DIR[ DIR]"
Chris@41 2253 func_munge_path_list ()
Chris@41 2254 {
Chris@41 2255 case x@S|@2 in
Chris@41 2256 x)
Chris@41 2257 ;;
Chris@41 2258 *:)
Chris@41 2259 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
Chris@41 2260 ;;
Chris@41 2261 x:*)
Chris@41 2262 eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
Chris@41 2263 ;;
Chris@41 2264 *::*)
Chris@41 2265 eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
Chris@41 2266 eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
Chris@41 2267 ;;
Chris@41 2268 *)
Chris@41 2269 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
Chris@41 2270 ;;
Chris@41 2271 esac
Chris@41 2272 }
Chris@41 2273 ]])# _LT_PREPARE_PATH_LIST
Chris@41 2274
Chris@41 2275
Chris@41 2276 # _LT_SYS_DYNAMIC_LINKER([TAG])
Chris@41 2277 # -----------------------------
Chris@41 2278 # PORTME Fill in your ld.so characteristics
Chris@41 2279 m4_defun([_LT_SYS_DYNAMIC_LINKER],
Chris@41 2280 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@41 2281 m4_require([_LT_DECL_EGREP])dnl
Chris@41 2282 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@41 2283 m4_require([_LT_DECL_OBJDUMP])dnl
Chris@41 2284 m4_require([_LT_DECL_SED])dnl
Chris@41 2285 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
Chris@41 2286 m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
Chris@41 2287 AC_MSG_CHECKING([dynamic linker characteristics])
Chris@41 2288 m4_if([$1],
Chris@41 2289 [], [
Chris@41 2290 if test yes = "$GCC"; then
Chris@41 2291 case $host_os in
Chris@41 2292 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
Chris@41 2293 *) lt_awk_arg='/^libraries:/' ;;
Chris@41 2294 esac
Chris@41 2295 case $host_os in
Chris@41 2296 mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
Chris@41 2297 *) lt_sed_strip_eq='s|=/|/|g' ;;
Chris@41 2298 esac
Chris@41 2299 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
Chris@41 2300 case $lt_search_path_spec in
Chris@41 2301 *\;*)
Chris@41 2302 # if the path contains ";" then we assume it to be the separator
Chris@41 2303 # otherwise default to the standard path separator (i.e. ":") - it is
Chris@41 2304 # assumed that no part of a normal pathname contains ";" but that should
Chris@41 2305 # okay in the real world where ";" in dirpaths is itself problematic.
Chris@41 2306 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
Chris@41 2307 ;;
Chris@41 2308 *)
Chris@41 2309 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
Chris@41 2310 ;;
Chris@41 2311 esac
Chris@41 2312 # Ok, now we have the path, separated by spaces, we can step through it
Chris@41 2313 # and add multilib dir if necessary...
Chris@41 2314 lt_tmp_lt_search_path_spec=
Chris@41 2315 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
Chris@41 2316 # ...but if some path component already ends with the multilib dir we assume
Chris@41 2317 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
Chris@41 2318 case "$lt_multi_os_dir; $lt_search_path_spec " in
Chris@41 2319 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
Chris@41 2320 lt_multi_os_dir=
Chris@41 2321 ;;
Chris@41 2322 esac
Chris@41 2323 for lt_sys_path in $lt_search_path_spec; do
Chris@41 2324 if test -d "$lt_sys_path$lt_multi_os_dir"; then
Chris@41 2325 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
Chris@41 2326 elif test -n "$lt_multi_os_dir"; then
Chris@41 2327 test -d "$lt_sys_path" && \
Chris@41 2328 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
Chris@41 2329 fi
Chris@41 2330 done
Chris@41 2331 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
Chris@41 2332 BEGIN {RS = " "; FS = "/|\n";} {
Chris@41 2333 lt_foo = "";
Chris@41 2334 lt_count = 0;
Chris@41 2335 for (lt_i = NF; lt_i > 0; lt_i--) {
Chris@41 2336 if ($lt_i != "" && $lt_i != ".") {
Chris@41 2337 if ($lt_i == "..") {
Chris@41 2338 lt_count++;
Chris@41 2339 } else {
Chris@41 2340 if (lt_count == 0) {
Chris@41 2341 lt_foo = "/" $lt_i lt_foo;
Chris@41 2342 } else {
Chris@41 2343 lt_count--;
Chris@41 2344 }
Chris@41 2345 }
Chris@41 2346 }
Chris@41 2347 }
Chris@41 2348 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
Chris@41 2349 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
Chris@41 2350 }'`
Chris@41 2351 # AWK program above erroneously prepends '/' to C:/dos/paths
Chris@41 2352 # for these hosts.
Chris@41 2353 case $host_os in
Chris@41 2354 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
Chris@41 2355 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
Chris@41 2356 esac
Chris@41 2357 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
Chris@41 2358 else
Chris@41 2359 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
Chris@41 2360 fi])
Chris@41 2361 library_names_spec=
Chris@41 2362 libname_spec='lib$name'
Chris@41 2363 soname_spec=
Chris@41 2364 shrext_cmds=.so
Chris@41 2365 postinstall_cmds=
Chris@41 2366 postuninstall_cmds=
Chris@41 2367 finish_cmds=
Chris@41 2368 finish_eval=
Chris@41 2369 shlibpath_var=
Chris@41 2370 shlibpath_overrides_runpath=unknown
Chris@41 2371 version_type=none
Chris@41 2372 dynamic_linker="$host_os ld.so"
Chris@41 2373 sys_lib_dlsearch_path_spec="/lib /usr/lib"
Chris@41 2374 need_lib_prefix=unknown
Chris@41 2375 hardcode_into_libs=no
Chris@41 2376
Chris@41 2377 # when you set need_version to no, make sure it does not cause -set_version
Chris@41 2378 # flags to be left without arguments
Chris@41 2379 need_version=unknown
Chris@41 2380
Chris@41 2381 AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
Chris@41 2382 [User-defined run-time library search path.])
Chris@41 2383
Chris@41 2384 case $host_os in
Chris@41 2385 aix3*)
Chris@41 2386 version_type=linux # correct to gnu/linux during the next big refactor
Chris@41 2387 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
Chris@41 2388 shlibpath_var=LIBPATH
Chris@41 2389
Chris@41 2390 # AIX 3 has no versioning support, so we append a major version to the name.
Chris@41 2391 soname_spec='$libname$release$shared_ext$major'
Chris@41 2392 ;;
Chris@41 2393
Chris@41 2394 aix[[4-9]]*)
Chris@41 2395 version_type=linux # correct to gnu/linux during the next big refactor
Chris@41 2396 need_lib_prefix=no
Chris@41 2397 need_version=no
Chris@41 2398 hardcode_into_libs=yes
Chris@41 2399 if test ia64 = "$host_cpu"; then
Chris@41 2400 # AIX 5 supports IA64
Chris@41 2401 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
Chris@41 2402 shlibpath_var=LD_LIBRARY_PATH
Chris@41 2403 else
Chris@41 2404 # With GCC up to 2.95.x, collect2 would create an import file
Chris@41 2405 # for dependence libraries. The import file would start with
Chris@41 2406 # the line '#! .'. This would cause the generated library to
Chris@41 2407 # depend on '.', always an invalid library. This was fixed in
Chris@41 2408 # development snapshots of GCC prior to 3.0.
Chris@41 2409 case $host_os in
Chris@41 2410 aix4 | aix4.[[01]] | aix4.[[01]].*)
Chris@41 2411 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
Chris@41 2412 echo ' yes '
Chris@41 2413 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
Chris@41 2414 :
Chris@41 2415 else
Chris@41 2416 can_build_shared=no
Chris@41 2417 fi
Chris@41 2418 ;;
Chris@41 2419 esac
Chris@41 2420 # Using Import Files as archive members, it is possible to support
Chris@41 2421 # filename-based versioning of shared library archives on AIX. While
Chris@41 2422 # this would work for both with and without runtime linking, it will
Chris@41 2423 # prevent static linking of such archives. So we do filename-based
Chris@41 2424 # shared library versioning with .so extension only, which is used
Chris@41 2425 # when both runtime linking and shared linking is enabled.
Chris@41 2426 # Unfortunately, runtime linking may impact performance, so we do
Chris@41 2427 # not want this to be the default eventually. Also, we use the
Chris@41 2428 # versioned .so libs for executables only if there is the -brtl
Chris@41 2429 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
Chris@41 2430 # To allow for filename-based versioning support, we need to create
Chris@41 2431 # libNAME.so.V as an archive file, containing:
Chris@41 2432 # *) an Import File, referring to the versioned filename of the
Chris@41 2433 # archive as well as the shared archive member, telling the
Chris@41 2434 # bitwidth (32 or 64) of that shared object, and providing the
Chris@41 2435 # list of exported symbols of that shared object, eventually
Chris@41 2436 # decorated with the 'weak' keyword
Chris@41 2437 # *) the shared object with the F_LOADONLY flag set, to really avoid
Chris@41 2438 # it being seen by the linker.
Chris@41 2439 # At run time we better use the real file rather than another symlink,
Chris@41 2440 # but for link time we create the symlink libNAME.so -> libNAME.so.V
Chris@41 2441
Chris@41 2442 case $with_aix_soname,$aix_use_runtimelinking in
Chris@41 2443 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
Chris@41 2444 # soname into executable. Probably we can add versioning support to
Chris@41 2445 # collect2, so additional links can be useful in future.
Chris@41 2446 aix,yes) # traditional libtool
Chris@41 2447 dynamic_linker='AIX unversionable lib.so'
Chris@41 2448 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
Chris@41 2449 # instead of lib<name>.a to let people know that these are not
Chris@41 2450 # typical AIX shared libraries.
Chris@41 2451 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@41 2452 ;;
Chris@41 2453 aix,no) # traditional AIX only
Chris@41 2454 dynamic_linker='AIX lib.a[(]lib.so.V[)]'
Chris@41 2455 # We preserve .a as extension for shared libraries through AIX4.2
Chris@41 2456 # and later when we are not doing run time linking.
Chris@41 2457 library_names_spec='$libname$release.a $libname.a'
Chris@41 2458 soname_spec='$libname$release$shared_ext$major'
Chris@41 2459 ;;
Chris@41 2460 svr4,*) # full svr4 only
Chris@41 2461 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
Chris@41 2462 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
Chris@41 2463 # We do not specify a path in Import Files, so LIBPATH fires.
Chris@41 2464 shlibpath_overrides_runpath=yes
Chris@41 2465 ;;
Chris@41 2466 *,yes) # both, prefer svr4
Chris@41 2467 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
Chris@41 2468 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
Chris@41 2469 # unpreferred sharedlib libNAME.a needs extra handling
Chris@41 2470 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
Chris@41 2471 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
Chris@41 2472 # We do not specify a path in Import Files, so LIBPATH fires.
Chris@41 2473 shlibpath_overrides_runpath=yes
Chris@41 2474 ;;
Chris@41 2475 *,no) # both, prefer aix
Chris@41 2476 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
Chris@41 2477 library_names_spec='$libname$release.a $libname.a'
Chris@41 2478 soname_spec='$libname$release$shared_ext$major'
Chris@41 2479 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
Chris@41 2480 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
Chris@41 2481 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
Chris@41 2482 ;;
Chris@41 2483 esac
Chris@41 2484 shlibpath_var=LIBPATH
Chris@41 2485 fi
Chris@41 2486 ;;
Chris@41 2487
Chris@41 2488 amigaos*)
Chris@41 2489 case $host_cpu in
Chris@41 2490 powerpc)
Chris@41 2491 # Since July 2007 AmigaOS4 officially supports .so libraries.
Chris@41 2492 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
Chris@41 2493 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@41 2494 ;;
Chris@41 2495 m68k)
Chris@41 2496 library_names_spec='$libname.ixlibrary $libname.a'
Chris@41 2497 # Create ${libname}_ixlibrary.a entries in /sys/libs.
Chris@41 2498 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $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@41 2499 ;;
Chris@41 2500 esac
Chris@41 2501 ;;
Chris@41 2502
Chris@41 2503 beos*)
Chris@41 2504 library_names_spec='$libname$shared_ext'
Chris@41 2505 dynamic_linker="$host_os ld.so"
Chris@41 2506 shlibpath_var=LIBRARY_PATH
Chris@41 2507 ;;
Chris@41 2508
Chris@41 2509 bsdi[[45]]*)
Chris@41 2510 version_type=linux # correct to gnu/linux during the next big refactor
Chris@41 2511 need_version=no
Chris@41 2512 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@41 2513 soname_spec='$libname$release$shared_ext$major'
Chris@41 2514 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
Chris@41 2515 shlibpath_var=LD_LIBRARY_PATH
Chris@41 2516 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
Chris@41 2517 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
Chris@41 2518 # the default ld.so.conf also contains /usr/contrib/lib and
Chris@41 2519 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
Chris@41 2520 # libtool to hard-code these into programs
Chris@41 2521 ;;
Chris@41 2522
Chris@41 2523 cygwin* | mingw* | pw32* | cegcc*)
Chris@41 2524 version_type=windows
Chris@41 2525 shrext_cmds=.dll
Chris@41 2526 need_version=no
Chris@41 2527 need_lib_prefix=no
Chris@41 2528
Chris@41 2529 case $GCC,$cc_basename in
Chris@41 2530 yes,*)
Chris@41 2531 # gcc
Chris@41 2532 library_names_spec='$libname.dll.a'
Chris@41 2533 # DLL is installed to $(libdir)/../bin by postinstall_cmds
Chris@41 2534 postinstall_cmds='base_file=`basename \$file`~
Chris@41 2535 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
Chris@41 2536 dldir=$destdir/`dirname \$dlpath`~
Chris@41 2537 test -d \$dldir || mkdir -p \$dldir~
Chris@41 2538 $install_prog $dir/$dlname \$dldir/$dlname~
Chris@41 2539 chmod a+x \$dldir/$dlname~
Chris@41 2540 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
Chris@41 2541 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
Chris@41 2542 fi'
Chris@41 2543 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
Chris@41 2544 dlpath=$dir/\$dldll~
Chris@41 2545 $RM \$dlpath'
Chris@41 2546 shlibpath_overrides_runpath=yes
Chris@41 2547
Chris@41 2548 case $host_os in
Chris@41 2549 cygwin*)
Chris@41 2550 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
Chris@41 2551 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
Chris@41 2552 m4_if([$1], [],[
Chris@41 2553 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
Chris@41 2554 ;;
Chris@41 2555 mingw* | cegcc*)
Chris@41 2556 # MinGW DLLs use traditional 'lib' prefix
Chris@41 2557 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
Chris@41 2558 ;;
Chris@41 2559 pw32*)
Chris@41 2560 # pw32 DLLs use 'pw' prefix rather than 'lib'
Chris@41 2561 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
Chris@41 2562 ;;
Chris@41 2563 esac
Chris@41 2564 dynamic_linker='Win32 ld.exe'
Chris@41 2565 ;;
Chris@41 2566
Chris@41 2567 *,cl*)
Chris@41 2568 # Native MSVC
Chris@41 2569 libname_spec='$name'
Chris@41 2570 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
Chris@41 2571 library_names_spec='$libname.dll.lib'
Chris@41 2572
Chris@41 2573 case $build_os in
Chris@41 2574 mingw*)
Chris@41 2575 sys_lib_search_path_spec=
Chris@41 2576 lt_save_ifs=$IFS
Chris@41 2577 IFS=';'
Chris@41 2578 for lt_path in $LIB
Chris@41 2579 do
Chris@41 2580 IFS=$lt_save_ifs
Chris@41 2581 # Let DOS variable expansion print the short 8.3 style file name.
Chris@41 2582 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
Chris@41 2583 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
Chris@41 2584 done
Chris@41 2585 IFS=$lt_save_ifs
Chris@41 2586 # Convert to MSYS style.
Chris@41 2587 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@41 2588 ;;
Chris@41 2589 cygwin*)
Chris@41 2590 # Convert to unix form, then to dos form, then back to unix form
Chris@41 2591 # but this time dos style (no spaces!) so that the unix form looks
Chris@41 2592 # like /cygdrive/c/PROGRA~1:/cygdr...
Chris@41 2593 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
Chris@41 2594 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
Chris@41 2595 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
Chris@41 2596 ;;
Chris@41 2597 *)
Chris@41 2598 sys_lib_search_path_spec=$LIB
Chris@41 2599 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
Chris@41 2600 # It is most probably a Windows format PATH.
Chris@41 2601 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
Chris@41 2602 else
Chris@41 2603 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
Chris@41 2604 fi
Chris@41 2605 # FIXME: find the short name or the path components, as spaces are
Chris@41 2606 # common. (e.g. "Program Files" -> "PROGRA~1")
Chris@41 2607 ;;
Chris@41 2608 esac
Chris@41 2609
Chris@41 2610 # DLL is installed to $(libdir)/../bin by postinstall_cmds
Chris@41 2611 postinstall_cmds='base_file=`basename \$file`~
Chris@41 2612 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
Chris@41 2613 dldir=$destdir/`dirname \$dlpath`~
Chris@41 2614 test -d \$dldir || mkdir -p \$dldir~
Chris@41 2615 $install_prog $dir/$dlname \$dldir/$dlname'
Chris@41 2616 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
Chris@41 2617 dlpath=$dir/\$dldll~
Chris@41 2618 $RM \$dlpath'
Chris@41 2619 shlibpath_overrides_runpath=yes
Chris@41 2620 dynamic_linker='Win32 link.exe'
Chris@41 2621 ;;
Chris@41 2622
Chris@41 2623 *)
Chris@41 2624 # Assume MSVC wrapper
Chris@41 2625 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
Chris@41 2626 dynamic_linker='Win32 ld.exe'
Chris@41 2627 ;;
Chris@41 2628 esac
Chris@41 2629 # FIXME: first we should search . and the directory the executable is in
Chris@41 2630 shlibpath_var=PATH
Chris@41 2631 ;;
Chris@41 2632
Chris@41 2633 darwin* | rhapsody*)
Chris@41 2634 dynamic_linker="$host_os dyld"
Chris@41 2635 version_type=darwin
Chris@41 2636 need_lib_prefix=no
Chris@41 2637 need_version=no
Chris@41 2638 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
Chris@41 2639 soname_spec='$libname$release$major$shared_ext'
Chris@41 2640 shlibpath_overrides_runpath=yes
Chris@41 2641 shlibpath_var=DYLD_LIBRARY_PATH
Chris@41 2642 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
Chris@41 2643 m4_if([$1], [],[
Chris@41 2644 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
Chris@41 2645 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
Chris@41 2646 ;;
Chris@41 2647
Chris@41 2648 dgux*)
Chris@41 2649 version_type=linux # correct to gnu/linux during the next big refactor
Chris@41 2650 need_lib_prefix=no
Chris@41 2651 need_version=no
Chris@41 2652 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@41 2653 soname_spec='$libname$release$shared_ext$major'
Chris@41 2654 shlibpath_var=LD_LIBRARY_PATH
Chris@41 2655 ;;
Chris@41 2656
Chris@41 2657 freebsd* | dragonfly*)
Chris@41 2658 # DragonFly does not have aout. When/if they implement a new
Chris@41 2659 # versioning mechanism, adjust this.
Chris@41 2660 if test -x /usr/bin/objformat; then
Chris@41 2661 objformat=`/usr/bin/objformat`
Chris@41 2662 else
Chris@41 2663 case $host_os in
Chris@41 2664 freebsd[[23]].*) objformat=aout ;;
Chris@41 2665 *) objformat=elf ;;
Chris@41 2666 esac
Chris@41 2667 fi
Chris@41 2668 version_type=freebsd-$objformat
Chris@41 2669 case $version_type in
Chris@41 2670 freebsd-elf*)
Chris@41 2671 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@41 2672 soname_spec='$libname$release$shared_ext$major'
Chris@41 2673 need_version=no
Chris@41 2674 need_lib_prefix=no
Chris@41 2675 ;;
Chris@41 2676 freebsd-*)
Chris@41 2677 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
Chris@41 2678 need_version=yes
Chris@41 2679 ;;
Chris@41 2680 esac
Chris@41 2681 shlibpath_var=LD_LIBRARY_PATH
Chris@41 2682 case $host_os in
Chris@41 2683 freebsd2.*)
Chris@41 2684 shlibpath_overrides_runpath=yes
Chris@41 2685 ;;
Chris@41 2686 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
Chris@41 2687 shlibpath_overrides_runpath=yes
Chris@41 2688 hardcode_into_libs=yes
Chris@41 2689 ;;
Chris@41 2690 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
Chris@41 2691 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
Chris@41 2692 shlibpath_overrides_runpath=no
Chris@41 2693 hardcode_into_libs=yes
Chris@41 2694 ;;
Chris@41 2695 *) # from 4.6 on, and DragonFly
Chris@41 2696 shlibpath_overrides_runpath=yes
Chris@41 2697 hardcode_into_libs=yes
Chris@41 2698 ;;
Chris@41 2699 esac
Chris@41 2700 ;;
Chris@41 2701
Chris@41 2702 haiku*)
Chris@41 2703 version_type=linux # correct to gnu/linux during the next big refactor
Chris@41 2704 need_lib_prefix=no
Chris@41 2705 need_version=no
Chris@41 2706 dynamic_linker="$host_os runtime_loader"
Chris@41 2707 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@41 2708 soname_spec='$libname$release$shared_ext$major'
Chris@41 2709 shlibpath_var=LIBRARY_PATH
Chris@41 2710 shlibpath_overrides_runpath=no
Chris@41 2711 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
Chris@41 2712 hardcode_into_libs=yes
Chris@41 2713 ;;
Chris@41 2714
Chris@41 2715 hpux9* | hpux10* | hpux11*)
Chris@41 2716 # Give a soname corresponding to the major version so that dld.sl refuses to
Chris@41 2717 # link against other versions.
Chris@41 2718 version_type=sunos
Chris@41 2719 need_lib_prefix=no
Chris@41 2720 need_version=no
Chris@41 2721 case $host_cpu in
Chris@41 2722 ia64*)
Chris@41 2723 shrext_cmds='.so'
Chris@41 2724 hardcode_into_libs=yes
Chris@41 2725 dynamic_linker="$host_os dld.so"
Chris@41 2726 shlibpath_var=LD_LIBRARY_PATH
Chris@41 2727 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
Chris@41 2728 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@41 2729 soname_spec='$libname$release$shared_ext$major'
Chris@41 2730 if test 32 = "$HPUX_IA64_MODE"; then
Chris@41 2731 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
Chris@41 2732 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
Chris@41 2733 else
Chris@41 2734 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
Chris@41 2735 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
Chris@41 2736 fi
Chris@41 2737 ;;
Chris@41 2738 hppa*64*)
Chris@41 2739 shrext_cmds='.sl'
Chris@41 2740 hardcode_into_libs=yes
Chris@41 2741 dynamic_linker="$host_os dld.sl"
Chris@41 2742 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
Chris@41 2743 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
Chris@41 2744 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@41 2745 soname_spec='$libname$release$shared_ext$major'
Chris@41 2746 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
Chris@41 2747 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
Chris@41 2748 ;;
Chris@41 2749 *)
Chris@41 2750 shrext_cmds='.sl'
Chris@41 2751 dynamic_linker="$host_os dld.sl"
Chris@41 2752 shlibpath_var=SHLIB_PATH
Chris@41 2753 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
Chris@41 2754 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@41 2755 soname_spec='$libname$release$shared_ext$major'
Chris@41 2756 ;;
Chris@41 2757 esac
Chris@41 2758 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
Chris@41 2759 postinstall_cmds='chmod 555 $lib'
Chris@41 2760 # or fails outright, so override atomically:
Chris@41 2761 install_override_mode=555
Chris@41 2762 ;;
Chris@41 2763
Chris@41 2764 interix[[3-9]]*)
Chris@41 2765 version_type=linux # correct to gnu/linux during the next big refactor
Chris@41 2766 need_lib_prefix=no
Chris@41 2767 need_version=no
Chris@41 2768 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@41 2769 soname_spec='$libname$release$shared_ext$major'
Chris@41 2770 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
Chris@41 2771 shlibpath_var=LD_LIBRARY_PATH
Chris@41 2772 shlibpath_overrides_runpath=no
Chris@41 2773 hardcode_into_libs=yes
Chris@41 2774 ;;
Chris@41 2775
Chris@41 2776 irix5* | irix6* | nonstopux*)
Chris@41 2777 case $host_os in
Chris@41 2778 nonstopux*) version_type=nonstopux ;;
Chris@41 2779 *)
Chris@41 2780 if test yes = "$lt_cv_prog_gnu_ld"; then
Chris@41 2781 version_type=linux # correct to gnu/linux during the next big refactor
Chris@41 2782 else
Chris@41 2783 version_type=irix
Chris@41 2784 fi ;;
Chris@41 2785 esac
Chris@41 2786 need_lib_prefix=no
Chris@41 2787 need_version=no
Chris@41 2788 soname_spec='$libname$release$shared_ext$major'
Chris@41 2789 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
Chris@41 2790 case $host_os in
Chris@41 2791 irix5* | nonstopux*)
Chris@41 2792 libsuff= shlibsuff=
Chris@41 2793 ;;
Chris@41 2794 *)
Chris@41 2795 case $LD in # libtool.m4 will add one of these switches to LD
Chris@41 2796 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
Chris@41 2797 libsuff= shlibsuff= libmagic=32-bit;;
Chris@41 2798 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
Chris@41 2799 libsuff=32 shlibsuff=N32 libmagic=N32;;
Chris@41 2800 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
Chris@41 2801 libsuff=64 shlibsuff=64 libmagic=64-bit;;
Chris@41 2802 *) libsuff= shlibsuff= libmagic=never-match;;
Chris@41 2803 esac
Chris@41 2804 ;;
Chris@41 2805 esac
Chris@41 2806 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
Chris@41 2807 shlibpath_overrides_runpath=no
Chris@41 2808 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
Chris@41 2809 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
Chris@41 2810 hardcode_into_libs=yes
Chris@41 2811 ;;
Chris@41 2812
Chris@41 2813 # No shared lib support for Linux oldld, aout, or coff.
Chris@41 2814 linux*oldld* | linux*aout* | linux*coff*)
Chris@41 2815 dynamic_linker=no
Chris@41 2816 ;;
Chris@41 2817
Chris@41 2818 linux*android*)
Chris@41 2819 version_type=none # Android doesn't support versioned libraries.
Chris@41 2820 need_lib_prefix=no
Chris@41 2821 need_version=no
Chris@41 2822 library_names_spec='$libname$release$shared_ext'
Chris@41 2823 soname_spec='$libname$release$shared_ext'
Chris@41 2824 finish_cmds=
Chris@41 2825 shlibpath_var=LD_LIBRARY_PATH
Chris@41 2826 shlibpath_overrides_runpath=yes
Chris@41 2827
Chris@41 2828 # This implies no fast_install, which is unacceptable.
Chris@41 2829 # Some rework will be needed to allow for fast_install
Chris@41 2830 # before this can be enabled.
Chris@41 2831 hardcode_into_libs=yes
Chris@41 2832
Chris@41 2833 dynamic_linker='Android linker'
Chris@41 2834 # Don't embed -rpath directories since the linker doesn't support them.
Chris@41 2835 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@41 2836 ;;
Chris@41 2837
Chris@41 2838 # This must be glibc/ELF.
Chris@41 2839 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
Chris@41 2840 version_type=linux # correct to gnu/linux during the next big refactor
Chris@41 2841 need_lib_prefix=no
Chris@41 2842 need_version=no
Chris@41 2843 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@41 2844 soname_spec='$libname$release$shared_ext$major'
Chris@41 2845 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
Chris@41 2846 shlibpath_var=LD_LIBRARY_PATH
Chris@41 2847 shlibpath_overrides_runpath=no
Chris@41 2848
Chris@41 2849 # Some binutils ld are patched to set DT_RUNPATH
Chris@41 2850 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
Chris@41 2851 [lt_cv_shlibpath_overrides_runpath=no
Chris@41 2852 save_LDFLAGS=$LDFLAGS
Chris@41 2853 save_libdir=$libdir
Chris@41 2854 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
Chris@41 2855 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
Chris@41 2856 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
Chris@41 2857 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
Chris@41 2858 [lt_cv_shlibpath_overrides_runpath=yes])])
Chris@41 2859 LDFLAGS=$save_LDFLAGS
Chris@41 2860 libdir=$save_libdir
Chris@41 2861 ])
Chris@41 2862 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
Chris@41 2863
Chris@41 2864 # This implies no fast_install, which is unacceptable.
Chris@41 2865 # Some rework will be needed to allow for fast_install
Chris@41 2866 # before this can be enabled.
Chris@41 2867 hardcode_into_libs=yes
Chris@41 2868
Chris@41 2869 # Ideally, we could use ldconfig to report *all* directores which are
Chris@41 2870 # searched for libraries, however this is still not possible. Aside from not
Chris@41 2871 # being certain /sbin/ldconfig is available, command
Chris@41 2872 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
Chris@41 2873 # even though it is searched at run-time. Try to do the best guess by
Chris@41 2874 # appending ld.so.conf contents (and includes) to the search path.
Chris@41 2875 if test -f /etc/ld.so.conf; then
Chris@41 2876 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@41 2877 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
Chris@41 2878 fi
Chris@41 2879
Chris@41 2880 # We used to test for /lib/ld.so.1 and disable shared libraries on
Chris@41 2881 # powerpc, because MkLinux only supported shared libraries with the
Chris@41 2882 # GNU dynamic linker. Since this was broken with cross compilers,
Chris@41 2883 # most powerpc-linux boxes support dynamic linking these days and
Chris@41 2884 # people can always --disable-shared, the test was removed, and we
Chris@41 2885 # assume the GNU/Linux dynamic linker is in use.
Chris@41 2886 dynamic_linker='GNU/Linux ld.so'
Chris@41 2887 ;;
Chris@41 2888
Chris@41 2889 netbsdelf*-gnu)
Chris@41 2890 version_type=linux
Chris@41 2891 need_lib_prefix=no
Chris@41 2892 need_version=no
Chris@41 2893 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
Chris@41 2894 soname_spec='${libname}${release}${shared_ext}$major'
Chris@41 2895 shlibpath_var=LD_LIBRARY_PATH
Chris@41 2896 shlibpath_overrides_runpath=no
Chris@41 2897 hardcode_into_libs=yes
Chris@41 2898 dynamic_linker='NetBSD ld.elf_so'
Chris@41 2899 ;;
Chris@41 2900
Chris@41 2901 netbsd*)
Chris@41 2902 version_type=sunos
Chris@41 2903 need_lib_prefix=no
Chris@41 2904 need_version=no
Chris@41 2905 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
Chris@41 2906 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
Chris@41 2907 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
Chris@41 2908 dynamic_linker='NetBSD (a.out) ld.so'
Chris@41 2909 else
Chris@41 2910 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@41 2911 soname_spec='$libname$release$shared_ext$major'
Chris@41 2912 dynamic_linker='NetBSD ld.elf_so'
Chris@41 2913 fi
Chris@41 2914 shlibpath_var=LD_LIBRARY_PATH
Chris@41 2915 shlibpath_overrides_runpath=yes
Chris@41 2916 hardcode_into_libs=yes
Chris@41 2917 ;;
Chris@41 2918
Chris@41 2919 newsos6)
Chris@41 2920 version_type=linux # correct to gnu/linux during the next big refactor
Chris@41 2921 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@41 2922 shlibpath_var=LD_LIBRARY_PATH
Chris@41 2923 shlibpath_overrides_runpath=yes
Chris@41 2924 ;;
Chris@41 2925
Chris@41 2926 *nto* | *qnx*)
Chris@41 2927 version_type=qnx
Chris@41 2928 need_lib_prefix=no
Chris@41 2929 need_version=no
Chris@41 2930 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@41 2931 soname_spec='$libname$release$shared_ext$major'
Chris@41 2932 shlibpath_var=LD_LIBRARY_PATH
Chris@41 2933 shlibpath_overrides_runpath=no
Chris@41 2934 hardcode_into_libs=yes
Chris@41 2935 dynamic_linker='ldqnx.so'
Chris@41 2936 ;;
Chris@41 2937
Chris@41 2938 openbsd* | bitrig*)
Chris@41 2939 version_type=sunos
Chris@41 2940 sys_lib_dlsearch_path_spec=/usr/lib
Chris@41 2941 need_lib_prefix=no
Chris@41 2942 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
Chris@41 2943 need_version=no
Chris@41 2944 else
Chris@41 2945 need_version=yes
Chris@41 2946 fi
Chris@41 2947 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
Chris@41 2948 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
Chris@41 2949 shlibpath_var=LD_LIBRARY_PATH
Chris@41 2950 shlibpath_overrides_runpath=yes
Chris@41 2951 ;;
Chris@41 2952
Chris@41 2953 os2*)
Chris@41 2954 libname_spec='$name'
Chris@41 2955 version_type=windows
Chris@41 2956 shrext_cmds=.dll
Chris@41 2957 need_version=no
Chris@41 2958 need_lib_prefix=no
Chris@41 2959 # OS/2 can only load a DLL with a base name of 8 characters or less.
Chris@41 2960 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
Chris@41 2961 v=$($ECHO $release$versuffix | tr -d .-);
Chris@41 2962 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
Chris@41 2963 $ECHO $n$v`$shared_ext'
Chris@41 2964 library_names_spec='${libname}_dll.$libext'
Chris@41 2965 dynamic_linker='OS/2 ld.exe'
Chris@41 2966 shlibpath_var=BEGINLIBPATH
Chris@41 2967 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
Chris@41 2968 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
Chris@41 2969 postinstall_cmds='base_file=`basename \$file`~
Chris@41 2970 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
Chris@41 2971 dldir=$destdir/`dirname \$dlpath`~
Chris@41 2972 test -d \$dldir || mkdir -p \$dldir~
Chris@41 2973 $install_prog $dir/$dlname \$dldir/$dlname~
Chris@41 2974 chmod a+x \$dldir/$dlname~
Chris@41 2975 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
Chris@41 2976 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
Chris@41 2977 fi'
Chris@41 2978 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
Chris@41 2979 dlpath=$dir/\$dldll~
Chris@41 2980 $RM \$dlpath'
Chris@41 2981 ;;
Chris@41 2982
Chris@41 2983 osf3* | osf4* | osf5*)
Chris@41 2984 version_type=osf
Chris@41 2985 need_lib_prefix=no
Chris@41 2986 need_version=no
Chris@41 2987 soname_spec='$libname$release$shared_ext$major'
Chris@41 2988 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@41 2989 shlibpath_var=LD_LIBRARY_PATH
Chris@41 2990 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
Chris@41 2991 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
Chris@41 2992 ;;
Chris@41 2993
Chris@41 2994 rdos*)
Chris@41 2995 dynamic_linker=no
Chris@41 2996 ;;
Chris@41 2997
Chris@41 2998 solaris*)
Chris@41 2999 version_type=linux # correct to gnu/linux during the next big refactor
Chris@41 3000 need_lib_prefix=no
Chris@41 3001 need_version=no
Chris@41 3002 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@41 3003 soname_spec='$libname$release$shared_ext$major'
Chris@41 3004 shlibpath_var=LD_LIBRARY_PATH
Chris@41 3005 shlibpath_overrides_runpath=yes
Chris@41 3006 hardcode_into_libs=yes
Chris@41 3007 # ldd complains unless libraries are executable
Chris@41 3008 postinstall_cmds='chmod +x $lib'
Chris@41 3009 ;;
Chris@41 3010
Chris@41 3011 sunos4*)
Chris@41 3012 version_type=sunos
Chris@41 3013 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
Chris@41 3014 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
Chris@41 3015 shlibpath_var=LD_LIBRARY_PATH
Chris@41 3016 shlibpath_overrides_runpath=yes
Chris@41 3017 if test yes = "$with_gnu_ld"; then
Chris@41 3018 need_lib_prefix=no
Chris@41 3019 fi
Chris@41 3020 need_version=yes
Chris@41 3021 ;;
Chris@41 3022
Chris@41 3023 sysv4 | sysv4.3*)
Chris@41 3024 version_type=linux # correct to gnu/linux during the next big refactor
Chris@41 3025 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@41 3026 soname_spec='$libname$release$shared_ext$major'
Chris@41 3027 shlibpath_var=LD_LIBRARY_PATH
Chris@41 3028 case $host_vendor in
Chris@41 3029 sni)
Chris@41 3030 shlibpath_overrides_runpath=no
Chris@41 3031 need_lib_prefix=no
Chris@41 3032 runpath_var=LD_RUN_PATH
Chris@41 3033 ;;
Chris@41 3034 siemens)
Chris@41 3035 need_lib_prefix=no
Chris@41 3036 ;;
Chris@41 3037 motorola)
Chris@41 3038 need_lib_prefix=no
Chris@41 3039 need_version=no
Chris@41 3040 shlibpath_overrides_runpath=no
Chris@41 3041 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
Chris@41 3042 ;;
Chris@41 3043 esac
Chris@41 3044 ;;
Chris@41 3045
Chris@41 3046 sysv4*MP*)
Chris@41 3047 if test -d /usr/nec; then
Chris@41 3048 version_type=linux # correct to gnu/linux during the next big refactor
Chris@41 3049 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
Chris@41 3050 soname_spec='$libname$shared_ext.$major'
Chris@41 3051 shlibpath_var=LD_LIBRARY_PATH
Chris@41 3052 fi
Chris@41 3053 ;;
Chris@41 3054
Chris@41 3055 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
Chris@41 3056 version_type=sco
Chris@41 3057 need_lib_prefix=no
Chris@41 3058 need_version=no
Chris@41 3059 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
Chris@41 3060 soname_spec='$libname$release$shared_ext$major'
Chris@41 3061 shlibpath_var=LD_LIBRARY_PATH
Chris@41 3062 shlibpath_overrides_runpath=yes
Chris@41 3063 hardcode_into_libs=yes
Chris@41 3064 if test yes = "$with_gnu_ld"; then
Chris@41 3065 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
Chris@41 3066 else
Chris@41 3067 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
Chris@41 3068 case $host_os in
Chris@41 3069 sco3.2v5*)
Chris@41 3070 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
Chris@41 3071 ;;
Chris@41 3072 esac
Chris@41 3073 fi
Chris@41 3074 sys_lib_dlsearch_path_spec='/usr/lib'
Chris@41 3075 ;;
Chris@41 3076
Chris@41 3077 tpf*)
Chris@41 3078 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
Chris@41 3079 version_type=linux # correct to gnu/linux during the next big refactor
Chris@41 3080 need_lib_prefix=no
Chris@41 3081 need_version=no
Chris@41 3082 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@41 3083 shlibpath_var=LD_LIBRARY_PATH
Chris@41 3084 shlibpath_overrides_runpath=no
Chris@41 3085 hardcode_into_libs=yes
Chris@41 3086 ;;
Chris@41 3087
Chris@41 3088 uts4*)
Chris@41 3089 version_type=linux # correct to gnu/linux during the next big refactor
Chris@41 3090 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@41 3091 soname_spec='$libname$release$shared_ext$major'
Chris@41 3092 shlibpath_var=LD_LIBRARY_PATH
Chris@41 3093 ;;
Chris@41 3094
Chris@41 3095 *)
Chris@41 3096 dynamic_linker=no
Chris@41 3097 ;;
Chris@41 3098 esac
Chris@41 3099 AC_MSG_RESULT([$dynamic_linker])
Chris@41 3100 test no = "$dynamic_linker" && can_build_shared=no
Chris@41 3101
Chris@41 3102 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
Chris@41 3103 if test yes = "$GCC"; then
Chris@41 3104 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
Chris@41 3105 fi
Chris@41 3106
Chris@41 3107 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
Chris@41 3108 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
Chris@41 3109 fi
Chris@41 3110
Chris@41 3111 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
Chris@41 3112 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
Chris@41 3113 fi
Chris@41 3114
Chris@41 3115 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
Chris@41 3116 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
Chris@41 3117
Chris@41 3118 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
Chris@41 3119 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
Chris@41 3120
Chris@41 3121 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
Chris@41 3122 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
Chris@41 3123
Chris@41 3124 _LT_DECL([], [variables_saved_for_relink], [1],
Chris@41 3125 [Variables whose values should be saved in libtool wrapper scripts and
Chris@41 3126 restored at link time])
Chris@41 3127 _LT_DECL([], [need_lib_prefix], [0],
Chris@41 3128 [Do we need the "lib" prefix for modules?])
Chris@41 3129 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
Chris@41 3130 _LT_DECL([], [version_type], [0], [Library versioning type])
Chris@41 3131 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
Chris@41 3132 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
Chris@41 3133 _LT_DECL([], [shlibpath_overrides_runpath], [0],
Chris@41 3134 [Is shlibpath searched before the hard-coded library search path?])
Chris@41 3135 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
Chris@41 3136 _LT_DECL([], [library_names_spec], [1],
Chris@41 3137 [[List of archive names. First name is the real one, the rest are links.
Chris@41 3138 The last name is the one that the linker finds with -lNAME]])
Chris@41 3139 _LT_DECL([], [soname_spec], [1],
Chris@41 3140 [[The coded name of the library, if different from the real name]])
Chris@41 3141 _LT_DECL([], [install_override_mode], [1],
Chris@41 3142 [Permission mode override for installation of shared libraries])
Chris@41 3143 _LT_DECL([], [postinstall_cmds], [2],
Chris@41 3144 [Command to use after installation of a shared archive])
Chris@41 3145 _LT_DECL([], [postuninstall_cmds], [2],
Chris@41 3146 [Command to use after uninstallation of a shared archive])
Chris@41 3147 _LT_DECL([], [finish_cmds], [2],
Chris@41 3148 [Commands used to finish a libtool library installation in a directory])
Chris@41 3149 _LT_DECL([], [finish_eval], [1],
Chris@41 3150 [[As "finish_cmds", except a single script fragment to be evaled but
Chris@41 3151 not shown]])
Chris@41 3152 _LT_DECL([], [hardcode_into_libs], [0],
Chris@41 3153 [Whether we should hardcode library paths into libraries])
Chris@41 3154 _LT_DECL([], [sys_lib_search_path_spec], [2],
Chris@41 3155 [Compile-time system search path for libraries])
Chris@41 3156 _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
Chris@41 3157 [Detected run-time system search path for libraries])
Chris@41 3158 _LT_DECL([], [configure_time_lt_sys_library_path], [2],
Chris@41 3159 [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
Chris@41 3160 ])# _LT_SYS_DYNAMIC_LINKER
Chris@41 3161
Chris@41 3162
Chris@41 3163 # _LT_PATH_TOOL_PREFIX(TOOL)
Chris@41 3164 # --------------------------
Chris@41 3165 # find a file program that can recognize shared library
Chris@41 3166 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
Chris@41 3167 [m4_require([_LT_DECL_EGREP])dnl
Chris@41 3168 AC_MSG_CHECKING([for $1])
Chris@41 3169 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
Chris@41 3170 [case $MAGIC_CMD in
Chris@41 3171 [[\\/*] | ?:[\\/]*])
Chris@41 3172 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
Chris@41 3173 ;;
Chris@41 3174 *)
Chris@41 3175 lt_save_MAGIC_CMD=$MAGIC_CMD
Chris@41 3176 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
Chris@41 3177 dnl $ac_dummy forces splitting on constant user-supplied paths.
Chris@41 3178 dnl POSIX.2 word splitting is done only on the output of word expansions,
Chris@41 3179 dnl not every word. This closes a longstanding sh security hole.
Chris@41 3180 ac_dummy="m4_if([$2], , $PATH, [$2])"
Chris@41 3181 for ac_dir in $ac_dummy; do
Chris@41 3182 IFS=$lt_save_ifs
Chris@41 3183 test -z "$ac_dir" && ac_dir=.
Chris@41 3184 if test -f "$ac_dir/$1"; then
Chris@41 3185 lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
Chris@41 3186 if test -n "$file_magic_test_file"; then
Chris@41 3187 case $deplibs_check_method in
Chris@41 3188 "file_magic "*)
Chris@41 3189 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
Chris@41 3190 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
Chris@41 3191 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
Chris@41 3192 $EGREP "$file_magic_regex" > /dev/null; then
Chris@41 3193 :
Chris@41 3194 else
Chris@41 3195 cat <<_LT_EOF 1>&2
Chris@41 3196
Chris@41 3197 *** Warning: the command libtool uses to detect shared libraries,
Chris@41 3198 *** $file_magic_cmd, produces output that libtool cannot recognize.
Chris@41 3199 *** The result is that libtool may fail to recognize shared libraries
Chris@41 3200 *** as such. This will affect the creation of libtool libraries that
Chris@41 3201 *** depend on shared libraries, but programs linked with such libtool
Chris@41 3202 *** libraries will work regardless of this problem. Nevertheless, you
Chris@41 3203 *** may want to report the problem to your system manager and/or to
Chris@41 3204 *** bug-libtool@gnu.org
Chris@41 3205
Chris@41 3206 _LT_EOF
Chris@41 3207 fi ;;
Chris@41 3208 esac
Chris@41 3209 fi
Chris@41 3210 break
Chris@41 3211 fi
Chris@41 3212 done
Chris@41 3213 IFS=$lt_save_ifs
Chris@41 3214 MAGIC_CMD=$lt_save_MAGIC_CMD
Chris@41 3215 ;;
Chris@41 3216 esac])
Chris@41 3217 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
Chris@41 3218 if test -n "$MAGIC_CMD"; then
Chris@41 3219 AC_MSG_RESULT($MAGIC_CMD)
Chris@41 3220 else
Chris@41 3221 AC_MSG_RESULT(no)
Chris@41 3222 fi
Chris@41 3223 _LT_DECL([], [MAGIC_CMD], [0],
Chris@41 3224 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
Chris@41 3225 ])# _LT_PATH_TOOL_PREFIX
Chris@41 3226
Chris@41 3227 # Old name:
Chris@41 3228 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
Chris@41 3229 dnl aclocal-1.4 backwards compatibility:
Chris@41 3230 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
Chris@41 3231
Chris@41 3232
Chris@41 3233 # _LT_PATH_MAGIC
Chris@41 3234 # --------------
Chris@41 3235 # find a file program that can recognize a shared library
Chris@41 3236 m4_defun([_LT_PATH_MAGIC],
Chris@41 3237 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
Chris@41 3238 if test -z "$lt_cv_path_MAGIC_CMD"; then
Chris@41 3239 if test -n "$ac_tool_prefix"; then
Chris@41 3240 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
Chris@41 3241 else
Chris@41 3242 MAGIC_CMD=:
Chris@41 3243 fi
Chris@41 3244 fi
Chris@41 3245 ])# _LT_PATH_MAGIC
Chris@41 3246
Chris@41 3247
Chris@41 3248 # LT_PATH_LD
Chris@41 3249 # ----------
Chris@41 3250 # find the pathname to the GNU or non-GNU linker
Chris@41 3251 AC_DEFUN([LT_PATH_LD],
Chris@41 3252 [AC_REQUIRE([AC_PROG_CC])dnl
Chris@41 3253 AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@41 3254 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
Chris@41 3255 m4_require([_LT_DECL_SED])dnl
Chris@41 3256 m4_require([_LT_DECL_EGREP])dnl
Chris@41 3257 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
Chris@41 3258
Chris@41 3259 AC_ARG_WITH([gnu-ld],
Chris@41 3260 [AS_HELP_STRING([--with-gnu-ld],
Chris@41 3261 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
Chris@41 3262 [test no = "$withval" || with_gnu_ld=yes],
Chris@41 3263 [with_gnu_ld=no])dnl
Chris@41 3264
Chris@41 3265 ac_prog=ld
Chris@41 3266 if test yes = "$GCC"; then
Chris@41 3267 # Check if gcc -print-prog-name=ld gives a path.
Chris@41 3268 AC_MSG_CHECKING([for ld used by $CC])
Chris@41 3269 case $host in
Chris@41 3270 *-*-mingw*)
Chris@41 3271 # gcc leaves a trailing carriage return, which upsets mingw
Chris@41 3272 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
Chris@41 3273 *)
Chris@41 3274 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
Chris@41 3275 esac
Chris@41 3276 case $ac_prog in
Chris@41 3277 # Accept absolute paths.
Chris@41 3278 [[\\/]]* | ?:[[\\/]]*)
Chris@41 3279 re_direlt='/[[^/]][[^/]]*/\.\./'
Chris@41 3280 # Canonicalize the pathname of ld
Chris@41 3281 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
Chris@41 3282 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
Chris@41 3283 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
Chris@41 3284 done
Chris@41 3285 test -z "$LD" && LD=$ac_prog
Chris@41 3286 ;;
Chris@41 3287 "")
Chris@41 3288 # If it fails, then pretend we aren't using GCC.
Chris@41 3289 ac_prog=ld
Chris@41 3290 ;;
Chris@41 3291 *)
Chris@41 3292 # If it is relative, then search for the first ld in PATH.
Chris@41 3293 with_gnu_ld=unknown
Chris@41 3294 ;;
Chris@41 3295 esac
Chris@41 3296 elif test yes = "$with_gnu_ld"; then
Chris@41 3297 AC_MSG_CHECKING([for GNU ld])
Chris@41 3298 else
Chris@41 3299 AC_MSG_CHECKING([for non-GNU ld])
Chris@41 3300 fi
Chris@41 3301 AC_CACHE_VAL(lt_cv_path_LD,
Chris@41 3302 [if test -z "$LD"; then
Chris@41 3303 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
Chris@41 3304 for ac_dir in $PATH; do
Chris@41 3305 IFS=$lt_save_ifs
Chris@41 3306 test -z "$ac_dir" && ac_dir=.
Chris@41 3307 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
Chris@41 3308 lt_cv_path_LD=$ac_dir/$ac_prog
Chris@41 3309 # Check to see if the program is GNU ld. I'd rather use --version,
Chris@41 3310 # but apparently some variants of GNU ld only accept -v.
Chris@41 3311 # Break only if it was the GNU/non-GNU ld that we prefer.
Chris@41 3312 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
Chris@41 3313 *GNU* | *'with BFD'*)
Chris@41 3314 test no != "$with_gnu_ld" && break
Chris@41 3315 ;;
Chris@41 3316 *)
Chris@41 3317 test yes != "$with_gnu_ld" && break
Chris@41 3318 ;;
Chris@41 3319 esac
Chris@41 3320 fi
Chris@41 3321 done
Chris@41 3322 IFS=$lt_save_ifs
Chris@41 3323 else
Chris@41 3324 lt_cv_path_LD=$LD # Let the user override the test with a path.
Chris@41 3325 fi])
Chris@41 3326 LD=$lt_cv_path_LD
Chris@41 3327 if test -n "$LD"; then
Chris@41 3328 AC_MSG_RESULT($LD)
Chris@41 3329 else
Chris@41 3330 AC_MSG_RESULT(no)
Chris@41 3331 fi
Chris@41 3332 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
Chris@41 3333 _LT_PATH_LD_GNU
Chris@41 3334 AC_SUBST([LD])
Chris@41 3335
Chris@41 3336 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
Chris@41 3337 ])# LT_PATH_LD
Chris@41 3338
Chris@41 3339 # Old names:
Chris@41 3340 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
Chris@41 3341 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
Chris@41 3342 dnl aclocal-1.4 backwards compatibility:
Chris@41 3343 dnl AC_DEFUN([AM_PROG_LD], [])
Chris@41 3344 dnl AC_DEFUN([AC_PROG_LD], [])
Chris@41 3345
Chris@41 3346
Chris@41 3347 # _LT_PATH_LD_GNU
Chris@41 3348 #- --------------
Chris@41 3349 m4_defun([_LT_PATH_LD_GNU],
Chris@41 3350 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
Chris@41 3351 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
Chris@41 3352 case `$LD -v 2>&1 </dev/null` in
Chris@41 3353 *GNU* | *'with BFD'*)
Chris@41 3354 lt_cv_prog_gnu_ld=yes
Chris@41 3355 ;;
Chris@41 3356 *)
Chris@41 3357 lt_cv_prog_gnu_ld=no
Chris@41 3358 ;;
Chris@41 3359 esac])
Chris@41 3360 with_gnu_ld=$lt_cv_prog_gnu_ld
Chris@41 3361 ])# _LT_PATH_LD_GNU
Chris@41 3362
Chris@41 3363
Chris@41 3364 # _LT_CMD_RELOAD
Chris@41 3365 # --------------
Chris@41 3366 # find reload flag for linker
Chris@41 3367 # -- PORTME Some linkers may need a different reload flag.
Chris@41 3368 m4_defun([_LT_CMD_RELOAD],
Chris@41 3369 [AC_CACHE_CHECK([for $LD option to reload object files],
Chris@41 3370 lt_cv_ld_reload_flag,
Chris@41 3371 [lt_cv_ld_reload_flag='-r'])
Chris@41 3372 reload_flag=$lt_cv_ld_reload_flag
Chris@41 3373 case $reload_flag in
Chris@41 3374 "" | " "*) ;;
Chris@41 3375 *) reload_flag=" $reload_flag" ;;
Chris@41 3376 esac
Chris@41 3377 reload_cmds='$LD$reload_flag -o $output$reload_objs'
Chris@41 3378 case $host_os in
Chris@41 3379 cygwin* | mingw* | pw32* | cegcc*)
Chris@41 3380 if test yes != "$GCC"; then
Chris@41 3381 reload_cmds=false
Chris@41 3382 fi
Chris@41 3383 ;;
Chris@41 3384 darwin*)
Chris@41 3385 if test yes = "$GCC"; then
Chris@41 3386 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
Chris@41 3387 else
Chris@41 3388 reload_cmds='$LD$reload_flag -o $output$reload_objs'
Chris@41 3389 fi
Chris@41 3390 ;;
Chris@41 3391 esac
Chris@41 3392 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
Chris@41 3393 _LT_TAGDECL([], [reload_cmds], [2])dnl
Chris@41 3394 ])# _LT_CMD_RELOAD
Chris@41 3395
Chris@41 3396
Chris@41 3397 # _LT_PATH_DD
Chris@41 3398 # -----------
Chris@41 3399 # find a working dd
Chris@41 3400 m4_defun([_LT_PATH_DD],
Chris@41 3401 [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
Chris@41 3402 [printf 0123456789abcdef0123456789abcdef >conftest.i
Chris@41 3403 cat conftest.i conftest.i >conftest2.i
Chris@41 3404 : ${lt_DD:=$DD}
Chris@41 3405 AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
Chris@41 3406 [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
Chris@41 3407 cmp -s conftest.i conftest.out \
Chris@41 3408 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
Chris@41 3409 fi])
Chris@41 3410 rm -f conftest.i conftest2.i conftest.out])
Chris@41 3411 ])# _LT_PATH_DD
Chris@41 3412
Chris@41 3413
Chris@41 3414 # _LT_CMD_TRUNCATE
Chris@41 3415 # ----------------
Chris@41 3416 # find command to truncate a binary pipe
Chris@41 3417 m4_defun([_LT_CMD_TRUNCATE],
Chris@41 3418 [m4_require([_LT_PATH_DD])
Chris@41 3419 AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
Chris@41 3420 [printf 0123456789abcdef0123456789abcdef >conftest.i
Chris@41 3421 cat conftest.i conftest.i >conftest2.i
Chris@41 3422 lt_cv_truncate_bin=
Chris@41 3423 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
Chris@41 3424 cmp -s conftest.i conftest.out \
Chris@41 3425 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
Chris@41 3426 fi
Chris@41 3427 rm -f conftest.i conftest2.i conftest.out
Chris@41 3428 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
Chris@41 3429 _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
Chris@41 3430 [Command to truncate a binary pipe])
Chris@41 3431 ])# _LT_CMD_TRUNCATE
Chris@41 3432
Chris@41 3433
Chris@41 3434 # _LT_CHECK_MAGIC_METHOD
Chris@41 3435 # ----------------------
Chris@41 3436 # how to check for library dependencies
Chris@41 3437 # -- PORTME fill in with the dynamic library characteristics
Chris@41 3438 m4_defun([_LT_CHECK_MAGIC_METHOD],
Chris@41 3439 [m4_require([_LT_DECL_EGREP])
Chris@41 3440 m4_require([_LT_DECL_OBJDUMP])
Chris@41 3441 AC_CACHE_CHECK([how to recognize dependent libraries],
Chris@41 3442 lt_cv_deplibs_check_method,
Chris@41 3443 [lt_cv_file_magic_cmd='$MAGIC_CMD'
Chris@41 3444 lt_cv_file_magic_test_file=
Chris@41 3445 lt_cv_deplibs_check_method='unknown'
Chris@41 3446 # Need to set the preceding variable on all platforms that support
Chris@41 3447 # interlibrary dependencies.
Chris@41 3448 # 'none' -- dependencies not supported.
Chris@41 3449 # 'unknown' -- same as none, but documents that we really don't know.
Chris@41 3450 # 'pass_all' -- all dependencies passed with no checks.
Chris@41 3451 # 'test_compile' -- check by making test program.
Chris@41 3452 # 'file_magic [[regex]]' -- check by looking for files in library path
Chris@41 3453 # that responds to the $file_magic_cmd with a given extended regex.
Chris@41 3454 # If you have 'file' or equivalent on your system and you're not sure
Chris@41 3455 # whether 'pass_all' will *always* work, you probably want this one.
Chris@41 3456
Chris@41 3457 case $host_os in
Chris@41 3458 aix[[4-9]]*)
Chris@41 3459 lt_cv_deplibs_check_method=pass_all
Chris@41 3460 ;;
Chris@41 3461
Chris@41 3462 beos*)
Chris@41 3463 lt_cv_deplibs_check_method=pass_all
Chris@41 3464 ;;
Chris@41 3465
Chris@41 3466 bsdi[[45]]*)
Chris@41 3467 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
Chris@41 3468 lt_cv_file_magic_cmd='/usr/bin/file -L'
Chris@41 3469 lt_cv_file_magic_test_file=/shlib/libc.so
Chris@41 3470 ;;
Chris@41 3471
Chris@41 3472 cygwin*)
Chris@41 3473 # func_win32_libid is a shell function defined in ltmain.sh
Chris@41 3474 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
Chris@41 3475 lt_cv_file_magic_cmd='func_win32_libid'
Chris@41 3476 ;;
Chris@41 3477
Chris@41 3478 mingw* | pw32*)
Chris@41 3479 # Base MSYS/MinGW do not provide the 'file' command needed by
Chris@41 3480 # func_win32_libid shell function, so use a weaker test based on 'objdump',
Chris@41 3481 # unless we find 'file', for example because we are cross-compiling.
Chris@41 3482 if ( file / ) >/dev/null 2>&1; then
Chris@41 3483 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
Chris@41 3484 lt_cv_file_magic_cmd='func_win32_libid'
Chris@41 3485 else
Chris@41 3486 # Keep this pattern in sync with the one in func_win32_libid.
Chris@41 3487 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
Chris@41 3488 lt_cv_file_magic_cmd='$OBJDUMP -f'
Chris@41 3489 fi
Chris@41 3490 ;;
Chris@41 3491
Chris@41 3492 cegcc*)
Chris@41 3493 # use the weaker test based on 'objdump'. See mingw*.
Chris@41 3494 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
Chris@41 3495 lt_cv_file_magic_cmd='$OBJDUMP -f'
Chris@41 3496 ;;
Chris@41 3497
Chris@41 3498 darwin* | rhapsody*)
Chris@41 3499 lt_cv_deplibs_check_method=pass_all
Chris@41 3500 ;;
Chris@41 3501
Chris@41 3502 freebsd* | dragonfly*)
Chris@41 3503 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
Chris@41 3504 case $host_cpu in
Chris@41 3505 i*86 )
Chris@41 3506 # Not sure whether the presence of OpenBSD here was a mistake.
Chris@41 3507 # Let's accept both of them until this is cleared up.
Chris@41 3508 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
Chris@41 3509 lt_cv_file_magic_cmd=/usr/bin/file
Chris@41 3510 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
Chris@41 3511 ;;
Chris@41 3512 esac
Chris@41 3513 else
Chris@41 3514 lt_cv_deplibs_check_method=pass_all
Chris@41 3515 fi
Chris@41 3516 ;;
Chris@41 3517
Chris@41 3518 haiku*)
Chris@41 3519 lt_cv_deplibs_check_method=pass_all
Chris@41 3520 ;;
Chris@41 3521
Chris@41 3522 hpux10.20* | hpux11*)
Chris@41 3523 lt_cv_file_magic_cmd=/usr/bin/file
Chris@41 3524 case $host_cpu in
Chris@41 3525 ia64*)
Chris@41 3526 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
Chris@41 3527 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
Chris@41 3528 ;;
Chris@41 3529 hppa*64*)
Chris@41 3530 [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@41 3531 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
Chris@41 3532 ;;
Chris@41 3533 *)
Chris@41 3534 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
Chris@41 3535 lt_cv_file_magic_test_file=/usr/lib/libc.sl
Chris@41 3536 ;;
Chris@41 3537 esac
Chris@41 3538 ;;
Chris@41 3539
Chris@41 3540 interix[[3-9]]*)
Chris@41 3541 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
Chris@41 3542 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
Chris@41 3543 ;;
Chris@41 3544
Chris@41 3545 irix5* | irix6* | nonstopux*)
Chris@41 3546 case $LD in
Chris@41 3547 *-32|*"-32 ") libmagic=32-bit;;
Chris@41 3548 *-n32|*"-n32 ") libmagic=N32;;
Chris@41 3549 *-64|*"-64 ") libmagic=64-bit;;
Chris@41 3550 *) libmagic=never-match;;
Chris@41 3551 esac
Chris@41 3552 lt_cv_deplibs_check_method=pass_all
Chris@41 3553 ;;
Chris@41 3554
Chris@41 3555 # This must be glibc/ELF.
Chris@41 3556 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
Chris@41 3557 lt_cv_deplibs_check_method=pass_all
Chris@41 3558 ;;
Chris@41 3559
Chris@41 3560 netbsd* | netbsdelf*-gnu)
Chris@41 3561 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
Chris@41 3562 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
Chris@41 3563 else
Chris@41 3564 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
Chris@41 3565 fi
Chris@41 3566 ;;
Chris@41 3567
Chris@41 3568 newos6*)
Chris@41 3569 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
Chris@41 3570 lt_cv_file_magic_cmd=/usr/bin/file
Chris@41 3571 lt_cv_file_magic_test_file=/usr/lib/libnls.so
Chris@41 3572 ;;
Chris@41 3573
Chris@41 3574 *nto* | *qnx*)
Chris@41 3575 lt_cv_deplibs_check_method=pass_all
Chris@41 3576 ;;
Chris@41 3577
Chris@41 3578 openbsd* | bitrig*)
Chris@41 3579 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
Chris@41 3580 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
Chris@41 3581 else
Chris@41 3582 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
Chris@41 3583 fi
Chris@41 3584 ;;
Chris@41 3585
Chris@41 3586 osf3* | osf4* | osf5*)
Chris@41 3587 lt_cv_deplibs_check_method=pass_all
Chris@41 3588 ;;
Chris@41 3589
Chris@41 3590 rdos*)
Chris@41 3591 lt_cv_deplibs_check_method=pass_all
Chris@41 3592 ;;
Chris@41 3593
Chris@41 3594 solaris*)
Chris@41 3595 lt_cv_deplibs_check_method=pass_all
Chris@41 3596 ;;
Chris@41 3597
Chris@41 3598 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
Chris@41 3599 lt_cv_deplibs_check_method=pass_all
Chris@41 3600 ;;
Chris@41 3601
Chris@41 3602 sysv4 | sysv4.3*)
Chris@41 3603 case $host_vendor in
Chris@41 3604 motorola)
Chris@41 3605 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@41 3606 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
Chris@41 3607 ;;
Chris@41 3608 ncr)
Chris@41 3609 lt_cv_deplibs_check_method=pass_all
Chris@41 3610 ;;
Chris@41 3611 sequent)
Chris@41 3612 lt_cv_file_magic_cmd='/bin/file'
Chris@41 3613 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
Chris@41 3614 ;;
Chris@41 3615 sni)
Chris@41 3616 lt_cv_file_magic_cmd='/bin/file'
Chris@41 3617 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
Chris@41 3618 lt_cv_file_magic_test_file=/lib/libc.so
Chris@41 3619 ;;
Chris@41 3620 siemens)
Chris@41 3621 lt_cv_deplibs_check_method=pass_all
Chris@41 3622 ;;
Chris@41 3623 pc)
Chris@41 3624 lt_cv_deplibs_check_method=pass_all
Chris@41 3625 ;;
Chris@41 3626 esac
Chris@41 3627 ;;
Chris@41 3628
Chris@41 3629 tpf*)
Chris@41 3630 lt_cv_deplibs_check_method=pass_all
Chris@41 3631 ;;
Chris@41 3632 os2*)
Chris@41 3633 lt_cv_deplibs_check_method=pass_all
Chris@41 3634 ;;
Chris@41 3635 esac
Chris@41 3636 ])
Chris@41 3637
Chris@41 3638 file_magic_glob=
Chris@41 3639 want_nocaseglob=no
Chris@41 3640 if test "$build" = "$host"; then
Chris@41 3641 case $host_os in
Chris@41 3642 mingw* | pw32*)
Chris@41 3643 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
Chris@41 3644 want_nocaseglob=yes
Chris@41 3645 else
Chris@41 3646 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
Chris@41 3647 fi
Chris@41 3648 ;;
Chris@41 3649 esac
Chris@41 3650 fi
Chris@41 3651
Chris@41 3652 file_magic_cmd=$lt_cv_file_magic_cmd
Chris@41 3653 deplibs_check_method=$lt_cv_deplibs_check_method
Chris@41 3654 test -z "$deplibs_check_method" && deplibs_check_method=unknown
Chris@41 3655
Chris@41 3656 _LT_DECL([], [deplibs_check_method], [1],
Chris@41 3657 [Method to check whether dependent libraries are shared objects])
Chris@41 3658 _LT_DECL([], [file_magic_cmd], [1],
Chris@41 3659 [Command to use when deplibs_check_method = "file_magic"])
Chris@41 3660 _LT_DECL([], [file_magic_glob], [1],
Chris@41 3661 [How to find potential files when deplibs_check_method = "file_magic"])
Chris@41 3662 _LT_DECL([], [want_nocaseglob], [1],
Chris@41 3663 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
Chris@41 3664 ])# _LT_CHECK_MAGIC_METHOD
Chris@41 3665
Chris@41 3666
Chris@41 3667 # LT_PATH_NM
Chris@41 3668 # ----------
Chris@41 3669 # find the pathname to a BSD- or MS-compatible name lister
Chris@41 3670 AC_DEFUN([LT_PATH_NM],
Chris@41 3671 [AC_REQUIRE([AC_PROG_CC])dnl
Chris@41 3672 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
Chris@41 3673 [if test -n "$NM"; then
Chris@41 3674 # Let the user override the test.
Chris@41 3675 lt_cv_path_NM=$NM
Chris@41 3676 else
Chris@41 3677 lt_nm_to_check=${ac_tool_prefix}nm
Chris@41 3678 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
Chris@41 3679 lt_nm_to_check="$lt_nm_to_check nm"
Chris@41 3680 fi
Chris@41 3681 for lt_tmp_nm in $lt_nm_to_check; do
Chris@41 3682 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
Chris@41 3683 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
Chris@41 3684 IFS=$lt_save_ifs
Chris@41 3685 test -z "$ac_dir" && ac_dir=.
Chris@41 3686 tmp_nm=$ac_dir/$lt_tmp_nm
Chris@41 3687 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
Chris@41 3688 # Check to see if the nm accepts a BSD-compat flag.
Chris@41 3689 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
Chris@41 3690 # nm: unknown option "B" ignored
Chris@41 3691 # Tru64's nm complains that /dev/null is an invalid object file
Chris@41 3692 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
Chris@41 3693 case $build_os in
Chris@41 3694 mingw*) lt_bad_file=conftest.nm/nofile ;;
Chris@41 3695 *) lt_bad_file=/dev/null ;;
Chris@41 3696 esac
Chris@41 3697 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
Chris@41 3698 *$lt_bad_file* | *'Invalid file or object type'*)
Chris@41 3699 lt_cv_path_NM="$tmp_nm -B"
Chris@41 3700 break 2
Chris@41 3701 ;;
Chris@41 3702 *)
Chris@41 3703 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
Chris@41 3704 */dev/null*)
Chris@41 3705 lt_cv_path_NM="$tmp_nm -p"
Chris@41 3706 break 2
Chris@41 3707 ;;
Chris@41 3708 *)
Chris@41 3709 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
Chris@41 3710 continue # so that we can try to find one that supports BSD flags
Chris@41 3711 ;;
Chris@41 3712 esac
Chris@41 3713 ;;
Chris@41 3714 esac
Chris@41 3715 fi
Chris@41 3716 done
Chris@41 3717 IFS=$lt_save_ifs
Chris@41 3718 done
Chris@41 3719 : ${lt_cv_path_NM=no}
Chris@41 3720 fi])
Chris@41 3721 if test no != "$lt_cv_path_NM"; then
Chris@41 3722 NM=$lt_cv_path_NM
Chris@41 3723 else
Chris@41 3724 # Didn't find any BSD compatible name lister, look for dumpbin.
Chris@41 3725 if test -n "$DUMPBIN"; then :
Chris@41 3726 # Let the user override the test.
Chris@41 3727 else
Chris@41 3728 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
Chris@41 3729 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
Chris@41 3730 *COFF*)
Chris@41 3731 DUMPBIN="$DUMPBIN -symbols -headers"
Chris@41 3732 ;;
Chris@41 3733 *)
Chris@41 3734 DUMPBIN=:
Chris@41 3735 ;;
Chris@41 3736 esac
Chris@41 3737 fi
Chris@41 3738 AC_SUBST([DUMPBIN])
Chris@41 3739 if test : != "$DUMPBIN"; then
Chris@41 3740 NM=$DUMPBIN
Chris@41 3741 fi
Chris@41 3742 fi
Chris@41 3743 test -z "$NM" && NM=nm
Chris@41 3744 AC_SUBST([NM])
Chris@41 3745 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
Chris@41 3746
Chris@41 3747 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
Chris@41 3748 [lt_cv_nm_interface="BSD nm"
Chris@41 3749 echo "int some_variable = 0;" > conftest.$ac_ext
Chris@41 3750 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
Chris@41 3751 (eval "$ac_compile" 2>conftest.err)
Chris@41 3752 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@41 3753 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
Chris@41 3754 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
Chris@41 3755 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@41 3756 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
Chris@41 3757 cat conftest.out >&AS_MESSAGE_LOG_FD
Chris@41 3758 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
Chris@41 3759 lt_cv_nm_interface="MS dumpbin"
Chris@41 3760 fi
Chris@41 3761 rm -f conftest*])
Chris@41 3762 ])# LT_PATH_NM
Chris@41 3763
Chris@41 3764 # Old names:
Chris@41 3765 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
Chris@41 3766 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
Chris@41 3767 dnl aclocal-1.4 backwards compatibility:
Chris@41 3768 dnl AC_DEFUN([AM_PROG_NM], [])
Chris@41 3769 dnl AC_DEFUN([AC_PROG_NM], [])
Chris@41 3770
Chris@41 3771 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
Chris@41 3772 # --------------------------------
Chris@41 3773 # how to determine the name of the shared library
Chris@41 3774 # associated with a specific link library.
Chris@41 3775 # -- PORTME fill in with the dynamic library characteristics
Chris@41 3776 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
Chris@41 3777 [m4_require([_LT_DECL_EGREP])
Chris@41 3778 m4_require([_LT_DECL_OBJDUMP])
Chris@41 3779 m4_require([_LT_DECL_DLLTOOL])
Chris@41 3780 AC_CACHE_CHECK([how to associate runtime and link libraries],
Chris@41 3781 lt_cv_sharedlib_from_linklib_cmd,
Chris@41 3782 [lt_cv_sharedlib_from_linklib_cmd='unknown'
Chris@41 3783
Chris@41 3784 case $host_os in
Chris@41 3785 cygwin* | mingw* | pw32* | cegcc*)
Chris@41 3786 # two different shell functions defined in ltmain.sh;
Chris@41 3787 # decide which one to use based on capabilities of $DLLTOOL
Chris@41 3788 case `$DLLTOOL --help 2>&1` in
Chris@41 3789 *--identify-strict*)
Chris@41 3790 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
Chris@41 3791 ;;
Chris@41 3792 *)
Chris@41 3793 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
Chris@41 3794 ;;
Chris@41 3795 esac
Chris@41 3796 ;;
Chris@41 3797 *)
Chris@41 3798 # fallback: assume linklib IS sharedlib
Chris@41 3799 lt_cv_sharedlib_from_linklib_cmd=$ECHO
Chris@41 3800 ;;
Chris@41 3801 esac
Chris@41 3802 ])
Chris@41 3803 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
Chris@41 3804 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
Chris@41 3805
Chris@41 3806 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
Chris@41 3807 [Command to associate shared and link libraries])
Chris@41 3808 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
Chris@41 3809
Chris@41 3810
Chris@41 3811 # _LT_PATH_MANIFEST_TOOL
Chris@41 3812 # ----------------------
Chris@41 3813 # locate the manifest tool
Chris@41 3814 m4_defun([_LT_PATH_MANIFEST_TOOL],
Chris@41 3815 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
Chris@41 3816 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
Chris@41 3817 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
Chris@41 3818 [lt_cv_path_mainfest_tool=no
Chris@41 3819 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
Chris@41 3820 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
Chris@41 3821 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@41 3822 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
Chris@41 3823 lt_cv_path_mainfest_tool=yes
Chris@41 3824 fi
Chris@41 3825 rm -f conftest*])
Chris@41 3826 if test yes != "$lt_cv_path_mainfest_tool"; then
Chris@41 3827 MANIFEST_TOOL=:
Chris@41 3828 fi
Chris@41 3829 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
Chris@41 3830 ])# _LT_PATH_MANIFEST_TOOL
Chris@41 3831
Chris@41 3832
Chris@41 3833 # _LT_DLL_DEF_P([FILE])
Chris@41 3834 # ---------------------
Chris@41 3835 # True iff FILE is a Windows DLL '.def' file.
Chris@41 3836 # Keep in sync with func_dll_def_p in the libtool script
Chris@41 3837 AC_DEFUN([_LT_DLL_DEF_P],
Chris@41 3838 [dnl
Chris@41 3839 test DEF = "`$SED -n dnl
Chris@41 3840 -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
Chris@41 3841 -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
Chris@41 3842 -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
Chris@41 3843 -e q dnl Only consider the first "real" line
Chris@41 3844 $1`" dnl
Chris@41 3845 ])# _LT_DLL_DEF_P
Chris@41 3846
Chris@41 3847
Chris@41 3848 # LT_LIB_M
Chris@41 3849 # --------
Chris@41 3850 # check for math library
Chris@41 3851 AC_DEFUN([LT_LIB_M],
Chris@41 3852 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@41 3853 LIBM=
Chris@41 3854 case $host in
Chris@41 3855 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
Chris@41 3856 # These system don't have libm, or don't need it
Chris@41 3857 ;;
Chris@41 3858 *-ncr-sysv4.3*)
Chris@41 3859 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
Chris@41 3860 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
Chris@41 3861 ;;
Chris@41 3862 *)
Chris@41 3863 AC_CHECK_LIB(m, cos, LIBM=-lm)
Chris@41 3864 ;;
Chris@41 3865 esac
Chris@41 3866 AC_SUBST([LIBM])
Chris@41 3867 ])# LT_LIB_M
Chris@41 3868
Chris@41 3869 # Old name:
Chris@41 3870 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
Chris@41 3871 dnl aclocal-1.4 backwards compatibility:
Chris@41 3872 dnl AC_DEFUN([AC_CHECK_LIBM], [])
Chris@41 3873
Chris@41 3874
Chris@41 3875 # _LT_COMPILER_NO_RTTI([TAGNAME])
Chris@41 3876 # -------------------------------
Chris@41 3877 m4_defun([_LT_COMPILER_NO_RTTI],
Chris@41 3878 [m4_require([_LT_TAG_COMPILER])dnl
Chris@41 3879
Chris@41 3880 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
Chris@41 3881
Chris@41 3882 if test yes = "$GCC"; then
Chris@41 3883 case $cc_basename in
Chris@41 3884 nvcc*)
Chris@41 3885 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
Chris@41 3886 *)
Chris@41 3887 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
Chris@41 3888 esac
Chris@41 3889
Chris@41 3890 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
Chris@41 3891 lt_cv_prog_compiler_rtti_exceptions,
Chris@41 3892 [-fno-rtti -fno-exceptions], [],
Chris@41 3893 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
Chris@41 3894 fi
Chris@41 3895 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
Chris@41 3896 [Compiler flag to turn off builtin functions])
Chris@41 3897 ])# _LT_COMPILER_NO_RTTI
Chris@41 3898
Chris@41 3899
Chris@41 3900 # _LT_CMD_GLOBAL_SYMBOLS
Chris@41 3901 # ----------------------
Chris@41 3902 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
Chris@41 3903 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@41 3904 AC_REQUIRE([AC_PROG_CC])dnl
Chris@41 3905 AC_REQUIRE([AC_PROG_AWK])dnl
Chris@41 3906 AC_REQUIRE([LT_PATH_NM])dnl
Chris@41 3907 AC_REQUIRE([LT_PATH_LD])dnl
Chris@41 3908 m4_require([_LT_DECL_SED])dnl
Chris@41 3909 m4_require([_LT_DECL_EGREP])dnl
Chris@41 3910 m4_require([_LT_TAG_COMPILER])dnl
Chris@41 3911
Chris@41 3912 # Check for command to grab the raw symbol name followed by C symbol from nm.
Chris@41 3913 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
Chris@41 3914 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
Chris@41 3915 [
Chris@41 3916 # These are sane defaults that work on at least a few old systems.
Chris@41 3917 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
Chris@41 3918
Chris@41 3919 # Character class describing NM global symbol codes.
Chris@41 3920 symcode='[[BCDEGRST]]'
Chris@41 3921
Chris@41 3922 # Regexp to match symbols that can be accessed directly from C.
Chris@41 3923 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
Chris@41 3924
Chris@41 3925 # Define system-specific variables.
Chris@41 3926 case $host_os in
Chris@41 3927 aix*)
Chris@41 3928 symcode='[[BCDT]]'
Chris@41 3929 ;;
Chris@41 3930 cygwin* | mingw* | pw32* | cegcc*)
Chris@41 3931 symcode='[[ABCDGISTW]]'
Chris@41 3932 ;;
Chris@41 3933 hpux*)
Chris@41 3934 if test ia64 = "$host_cpu"; then
Chris@41 3935 symcode='[[ABCDEGRST]]'
Chris@41 3936 fi
Chris@41 3937 ;;
Chris@41 3938 irix* | nonstopux*)
Chris@41 3939 symcode='[[BCDEGRST]]'
Chris@41 3940 ;;
Chris@41 3941 osf*)
Chris@41 3942 symcode='[[BCDEGQRST]]'
Chris@41 3943 ;;
Chris@41 3944 solaris*)
Chris@41 3945 symcode='[[BDRT]]'
Chris@41 3946 ;;
Chris@41 3947 sco3.2v5*)
Chris@41 3948 symcode='[[DT]]'
Chris@41 3949 ;;
Chris@41 3950 sysv4.2uw2*)
Chris@41 3951 symcode='[[DT]]'
Chris@41 3952 ;;
Chris@41 3953 sysv5* | sco5v6* | unixware* | OpenUNIX*)
Chris@41 3954 symcode='[[ABDT]]'
Chris@41 3955 ;;
Chris@41 3956 sysv4)
Chris@41 3957 symcode='[[DFNSTU]]'
Chris@41 3958 ;;
Chris@41 3959 esac
Chris@41 3960
Chris@41 3961 # If we're using GNU nm, then use its standard symbol codes.
Chris@41 3962 case `$NM -V 2>&1` in
Chris@41 3963 *GNU* | *'with BFD'*)
Chris@41 3964 symcode='[[ABCDGIRSTW]]' ;;
Chris@41 3965 esac
Chris@41 3966
Chris@41 3967 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
Chris@41 3968 # Gets list of data symbols to import.
Chris@41 3969 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
Chris@41 3970 # Adjust the below global symbol transforms to fixup imported variables.
Chris@41 3971 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
Chris@41 3972 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
Chris@41 3973 lt_c_name_lib_hook="\
Chris@41 3974 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
Chris@41 3975 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
Chris@41 3976 else
Chris@41 3977 # Disable hooks by default.
Chris@41 3978 lt_cv_sys_global_symbol_to_import=
Chris@41 3979 lt_cdecl_hook=
Chris@41 3980 lt_c_name_hook=
Chris@41 3981 lt_c_name_lib_hook=
Chris@41 3982 fi
Chris@41 3983
Chris@41 3984 # Transform an extracted symbol line into a proper C declaration.
Chris@41 3985 # Some systems (esp. on ia64) link data and code symbols differently,
Chris@41 3986 # so use this general approach.
Chris@41 3987 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
Chris@41 3988 $lt_cdecl_hook\
Chris@41 3989 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
Chris@41 3990 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
Chris@41 3991
Chris@41 3992 # Transform an extracted symbol line into symbol name and symbol address
Chris@41 3993 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
Chris@41 3994 $lt_c_name_hook\
Chris@41 3995 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
Chris@41 3996 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
Chris@41 3997
Chris@41 3998 # Transform an extracted symbol line into symbol name with lib prefix and
Chris@41 3999 # symbol address.
Chris@41 4000 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
Chris@41 4001 $lt_c_name_lib_hook\
Chris@41 4002 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
Chris@41 4003 " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
Chris@41 4004 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
Chris@41 4005
Chris@41 4006 # Handle CRLF in mingw tool chain
Chris@41 4007 opt_cr=
Chris@41 4008 case $build_os in
Chris@41 4009 mingw*)
Chris@41 4010 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
Chris@41 4011 ;;
Chris@41 4012 esac
Chris@41 4013
Chris@41 4014 # Try without a prefix underscore, then with it.
Chris@41 4015 for ac_symprfx in "" "_"; do
Chris@41 4016
Chris@41 4017 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
Chris@41 4018 symxfrm="\\1 $ac_symprfx\\2 \\2"
Chris@41 4019
Chris@41 4020 # Write the raw and C identifiers.
Chris@41 4021 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
Chris@41 4022 # Fake it for dumpbin and say T for any non-static function,
Chris@41 4023 # D for any global variable and I for any imported variable.
Chris@41 4024 # Also find C++ and __fastcall symbols from MSVC++,
Chris@41 4025 # which start with @ or ?.
Chris@41 4026 lt_cv_sys_global_symbol_pipe="$AWK ['"\
Chris@41 4027 " {last_section=section; section=\$ 3};"\
Chris@41 4028 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
Chris@41 4029 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
Chris@41 4030 " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
Chris@41 4031 " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
Chris@41 4032 " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
Chris@41 4033 " \$ 0!~/External *\|/{next};"\
Chris@41 4034 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
Chris@41 4035 " {if(hide[section]) next};"\
Chris@41 4036 " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
Chris@41 4037 " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
Chris@41 4038 " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
Chris@41 4039 " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
Chris@41 4040 " ' prfx=^$ac_symprfx]"
Chris@41 4041 else
Chris@41 4042 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
Chris@41 4043 fi
Chris@41 4044 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
Chris@41 4045
Chris@41 4046 # Check to see that the pipe works correctly.
Chris@41 4047 pipe_works=no
Chris@41 4048
Chris@41 4049 rm -f conftest*
Chris@41 4050 cat > conftest.$ac_ext <<_LT_EOF
Chris@41 4051 #ifdef __cplusplus
Chris@41 4052 extern "C" {
Chris@41 4053 #endif
Chris@41 4054 char nm_test_var;
Chris@41 4055 void nm_test_func(void);
Chris@41 4056 void nm_test_func(void){}
Chris@41 4057 #ifdef __cplusplus
Chris@41 4058 }
Chris@41 4059 #endif
Chris@41 4060 int main(){nm_test_var='a';nm_test_func();return(0);}
Chris@41 4061 _LT_EOF
Chris@41 4062
Chris@41 4063 if AC_TRY_EVAL(ac_compile); then
Chris@41 4064 # Now try to grab the symbols.
Chris@41 4065 nlist=conftest.nm
Chris@41 4066 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
Chris@41 4067 # Try sorting and uniquifying the output.
Chris@41 4068 if sort "$nlist" | uniq > "$nlist"T; then
Chris@41 4069 mv -f "$nlist"T "$nlist"
Chris@41 4070 else
Chris@41 4071 rm -f "$nlist"T
Chris@41 4072 fi
Chris@41 4073
Chris@41 4074 # Make sure that we snagged all the symbols we need.
Chris@41 4075 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
Chris@41 4076 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
Chris@41 4077 cat <<_LT_EOF > conftest.$ac_ext
Chris@41 4078 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
Chris@41 4079 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
Chris@41 4080 /* DATA imports from DLLs on WIN32 can't be const, because runtime
Chris@41 4081 relocations are performed -- see ld's documentation on pseudo-relocs. */
Chris@41 4082 # define LT@&t@_DLSYM_CONST
Chris@41 4083 #elif defined __osf__
Chris@41 4084 /* This system does not cope well with relocations in const data. */
Chris@41 4085 # define LT@&t@_DLSYM_CONST
Chris@41 4086 #else
Chris@41 4087 # define LT@&t@_DLSYM_CONST const
Chris@41 4088 #endif
Chris@41 4089
Chris@41 4090 #ifdef __cplusplus
Chris@41 4091 extern "C" {
Chris@41 4092 #endif
Chris@41 4093
Chris@41 4094 _LT_EOF
Chris@41 4095 # Now generate the symbol file.
Chris@41 4096 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
Chris@41 4097
Chris@41 4098 cat <<_LT_EOF >> conftest.$ac_ext
Chris@41 4099
Chris@41 4100 /* The mapping between symbol names and symbols. */
Chris@41 4101 LT@&t@_DLSYM_CONST struct {
Chris@41 4102 const char *name;
Chris@41 4103 void *address;
Chris@41 4104 }
Chris@41 4105 lt__PROGRAM__LTX_preloaded_symbols[[]] =
Chris@41 4106 {
Chris@41 4107 { "@PROGRAM@", (void *) 0 },
Chris@41 4108 _LT_EOF
Chris@41 4109 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
Chris@41 4110 cat <<\_LT_EOF >> conftest.$ac_ext
Chris@41 4111 {0, (void *) 0}
Chris@41 4112 };
Chris@41 4113
Chris@41 4114 /* This works around a problem in FreeBSD linker */
Chris@41 4115 #ifdef FREEBSD_WORKAROUND
Chris@41 4116 static const void *lt_preloaded_setup() {
Chris@41 4117 return lt__PROGRAM__LTX_preloaded_symbols;
Chris@41 4118 }
Chris@41 4119 #endif
Chris@41 4120
Chris@41 4121 #ifdef __cplusplus
Chris@41 4122 }
Chris@41 4123 #endif
Chris@41 4124 _LT_EOF
Chris@41 4125 # Now try linking the two files.
Chris@41 4126 mv conftest.$ac_objext conftstm.$ac_objext
Chris@41 4127 lt_globsym_save_LIBS=$LIBS
Chris@41 4128 lt_globsym_save_CFLAGS=$CFLAGS
Chris@41 4129 LIBS=conftstm.$ac_objext
Chris@41 4130 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
Chris@41 4131 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
Chris@41 4132 pipe_works=yes
Chris@41 4133 fi
Chris@41 4134 LIBS=$lt_globsym_save_LIBS
Chris@41 4135 CFLAGS=$lt_globsym_save_CFLAGS
Chris@41 4136 else
Chris@41 4137 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
Chris@41 4138 fi
Chris@41 4139 else
Chris@41 4140 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
Chris@41 4141 fi
Chris@41 4142 else
Chris@41 4143 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
Chris@41 4144 fi
Chris@41 4145 else
Chris@41 4146 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
Chris@41 4147 cat conftest.$ac_ext >&5
Chris@41 4148 fi
Chris@41 4149 rm -rf conftest* conftst*
Chris@41 4150
Chris@41 4151 # Do not use the global_symbol_pipe unless it works.
Chris@41 4152 if test yes = "$pipe_works"; then
Chris@41 4153 break
Chris@41 4154 else
Chris@41 4155 lt_cv_sys_global_symbol_pipe=
Chris@41 4156 fi
Chris@41 4157 done
Chris@41 4158 ])
Chris@41 4159 if test -z "$lt_cv_sys_global_symbol_pipe"; then
Chris@41 4160 lt_cv_sys_global_symbol_to_cdecl=
Chris@41 4161 fi
Chris@41 4162 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
Chris@41 4163 AC_MSG_RESULT(failed)
Chris@41 4164 else
Chris@41 4165 AC_MSG_RESULT(ok)
Chris@41 4166 fi
Chris@41 4167
Chris@41 4168 # Response file support.
Chris@41 4169 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
Chris@41 4170 nm_file_list_spec='@'
Chris@41 4171 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
Chris@41 4172 nm_file_list_spec='@'
Chris@41 4173 fi
Chris@41 4174
Chris@41 4175 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
Chris@41 4176 [Take the output of nm and produce a listing of raw symbols and C names])
Chris@41 4177 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
Chris@41 4178 [Transform the output of nm in a proper C declaration])
Chris@41 4179 _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
Chris@41 4180 [Transform the output of nm into a list of symbols to manually relocate])
Chris@41 4181 _LT_DECL([global_symbol_to_c_name_address],
Chris@41 4182 [lt_cv_sys_global_symbol_to_c_name_address], [1],
Chris@41 4183 [Transform the output of nm in a C name address pair])
Chris@41 4184 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
Chris@41 4185 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
Chris@41 4186 [Transform the output of nm in a C name address pair when lib prefix is needed])
Chris@41 4187 _LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
Chris@41 4188 [The name lister interface])
Chris@41 4189 _LT_DECL([], [nm_file_list_spec], [1],
Chris@41 4190 [Specify filename containing input files for $NM])
Chris@41 4191 ]) # _LT_CMD_GLOBAL_SYMBOLS
Chris@41 4192
Chris@41 4193
Chris@41 4194 # _LT_COMPILER_PIC([TAGNAME])
Chris@41 4195 # ---------------------------
Chris@41 4196 m4_defun([_LT_COMPILER_PIC],
Chris@41 4197 [m4_require([_LT_TAG_COMPILER])dnl
Chris@41 4198 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
Chris@41 4199 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@41 4200 _LT_TAGVAR(lt_prog_compiler_static, $1)=
Chris@41 4201
Chris@41 4202 m4_if([$1], [CXX], [
Chris@41 4203 # C++ specific cases for pic, static, wl, etc.
Chris@41 4204 if test yes = "$GXX"; then
Chris@41 4205 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@41 4206 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@41 4207
Chris@41 4208 case $host_os in
Chris@41 4209 aix*)
Chris@41 4210 # All AIX code is PIC.
Chris@41 4211 if test ia64 = "$host_cpu"; then
Chris@41 4212 # AIX 5 now supports IA64 processor
Chris@41 4213 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@41 4214 fi
Chris@41 4215 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@41 4216 ;;
Chris@41 4217
Chris@41 4218 amigaos*)
Chris@41 4219 case $host_cpu in
Chris@41 4220 powerpc)
Chris@41 4221 # see comment about AmigaOS4 .so support
Chris@41 4222 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@41 4223 ;;
Chris@41 4224 m68k)
Chris@41 4225 # FIXME: we need at least 68020 code to build shared libraries, but
Chris@41 4226 # adding the '-m68020' flag to GCC prevents building anything better,
Chris@41 4227 # like '-m68040'.
Chris@41 4228 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
Chris@41 4229 ;;
Chris@41 4230 esac
Chris@41 4231 ;;
Chris@41 4232
Chris@41 4233 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
Chris@41 4234 # PIC is the default for these OSes.
Chris@41 4235 ;;
Chris@41 4236 mingw* | cygwin* | os2* | pw32* | cegcc*)
Chris@41 4237 # This hack is so that the source file can tell whether it is being
Chris@41 4238 # built for inclusion in a dll (and should export symbols for example).
Chris@41 4239 # Although the cygwin gcc ignores -fPIC, still need this for old-style
Chris@41 4240 # (--disable-auto-import) libraries
Chris@41 4241 m4_if([$1], [GCJ], [],
Chris@41 4242 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
Chris@41 4243 case $host_os in
Chris@41 4244 os2*)
Chris@41 4245 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
Chris@41 4246 ;;
Chris@41 4247 esac
Chris@41 4248 ;;
Chris@41 4249 darwin* | rhapsody*)
Chris@41 4250 # PIC is the default on this platform
Chris@41 4251 # Common symbols not allowed in MH_DYLIB files
Chris@41 4252 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
Chris@41 4253 ;;
Chris@41 4254 *djgpp*)
Chris@41 4255 # DJGPP does not support shared libraries at all
Chris@41 4256 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@41 4257 ;;
Chris@41 4258 haiku*)
Chris@41 4259 # PIC is the default for Haiku.
Chris@41 4260 # The "-static" flag exists, but is broken.
Chris@41 4261 _LT_TAGVAR(lt_prog_compiler_static, $1)=
Chris@41 4262 ;;
Chris@41 4263 interix[[3-9]]*)
Chris@41 4264 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
Chris@41 4265 # Instead, we relocate shared libraries at runtime.
Chris@41 4266 ;;
Chris@41 4267 sysv4*MP*)
Chris@41 4268 if test -d /usr/nec; then
Chris@41 4269 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
Chris@41 4270 fi
Chris@41 4271 ;;
Chris@41 4272 hpux*)
Chris@41 4273 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
Chris@41 4274 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
Chris@41 4275 # sets the default TLS model and affects inlining.
Chris@41 4276 case $host_cpu in
Chris@41 4277 hppa*64*)
Chris@41 4278 ;;
Chris@41 4279 *)
Chris@41 4280 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@41 4281 ;;
Chris@41 4282 esac
Chris@41 4283 ;;
Chris@41 4284 *qnx* | *nto*)
Chris@41 4285 # QNX uses GNU C++, but need to define -shared option too, otherwise
Chris@41 4286 # it will coredump.
Chris@41 4287 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
Chris@41 4288 ;;
Chris@41 4289 *)
Chris@41 4290 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@41 4291 ;;
Chris@41 4292 esac
Chris@41 4293 else
Chris@41 4294 case $host_os in
Chris@41 4295 aix[[4-9]]*)
Chris@41 4296 # All AIX code is PIC.
Chris@41 4297 if test ia64 = "$host_cpu"; then
Chris@41 4298 # AIX 5 now supports IA64 processor
Chris@41 4299 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@41 4300 else
Chris@41 4301 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
Chris@41 4302 fi
Chris@41 4303 ;;
Chris@41 4304 chorus*)
Chris@41 4305 case $cc_basename in
Chris@41 4306 cxch68*)
Chris@41 4307 # Green Hills C++ Compiler
Chris@41 4308 # _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@41 4309 ;;
Chris@41 4310 esac
Chris@41 4311 ;;
Chris@41 4312 mingw* | cygwin* | os2* | pw32* | cegcc*)
Chris@41 4313 # This hack is so that the source file can tell whether it is being
Chris@41 4314 # built for inclusion in a dll (and should export symbols for example).
Chris@41 4315 m4_if([$1], [GCJ], [],
Chris@41 4316 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
Chris@41 4317 ;;
Chris@41 4318 dgux*)
Chris@41 4319 case $cc_basename in
Chris@41 4320 ec++*)
Chris@41 4321 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@41 4322 ;;
Chris@41 4323 ghcx*)
Chris@41 4324 # Green Hills C++ Compiler
Chris@41 4325 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@41 4326 ;;
Chris@41 4327 *)
Chris@41 4328 ;;
Chris@41 4329 esac
Chris@41 4330 ;;
Chris@41 4331 freebsd* | dragonfly*)
Chris@41 4332 # FreeBSD uses GNU C++
Chris@41 4333 ;;
Chris@41 4334 hpux9* | hpux10* | hpux11*)
Chris@41 4335 case $cc_basename in
Chris@41 4336 CC*)
Chris@41 4337 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@41 4338 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
Chris@41 4339 if test ia64 != "$host_cpu"; then
Chris@41 4340 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
Chris@41 4341 fi
Chris@41 4342 ;;
Chris@41 4343 aCC*)
Chris@41 4344 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@41 4345 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
Chris@41 4346 case $host_cpu in
Chris@41 4347 hppa*64*|ia64*)
Chris@41 4348 # +Z the default
Chris@41 4349 ;;
Chris@41 4350 *)
Chris@41 4351 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
Chris@41 4352 ;;
Chris@41 4353 esac
Chris@41 4354 ;;
Chris@41 4355 *)
Chris@41 4356 ;;
Chris@41 4357 esac
Chris@41 4358 ;;
Chris@41 4359 interix*)
Chris@41 4360 # This is c89, which is MS Visual C++ (no shared libs)
Chris@41 4361 # Anyone wants to do a port?
Chris@41 4362 ;;
Chris@41 4363 irix5* | irix6* | nonstopux*)
Chris@41 4364 case $cc_basename in
Chris@41 4365 CC*)
Chris@41 4366 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@41 4367 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@41 4368 # CC pic flag -KPIC is the default.
Chris@41 4369 ;;
Chris@41 4370 *)
Chris@41 4371 ;;
Chris@41 4372 esac
Chris@41 4373 ;;
Chris@41 4374 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
Chris@41 4375 case $cc_basename in
Chris@41 4376 KCC*)
Chris@41 4377 # KAI C++ Compiler
Chris@41 4378 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
Chris@41 4379 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@41 4380 ;;
Chris@41 4381 ecpc* )
Chris@41 4382 # old Intel C++ for x86_64, which still supported -KPIC.
Chris@41 4383 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@41 4384 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@41 4385 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@41 4386 ;;
Chris@41 4387 icpc* )
Chris@41 4388 # Intel C++, used to be incompatible with GCC.
Chris@41 4389 # ICC 10 doesn't accept -KPIC any more.
Chris@41 4390 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@41 4391 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@41 4392 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@41 4393 ;;
Chris@41 4394 pgCC* | pgcpp*)
Chris@41 4395 # Portland Group C++ compiler
Chris@41 4396 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@41 4397 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
Chris@41 4398 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@41 4399 ;;
Chris@41 4400 cxx*)
Chris@41 4401 # Compaq C++
Chris@41 4402 # Make sure the PIC flag is empty. It appears that all Alpha
Chris@41 4403 # Linux and Compaq Tru64 Unix objects are PIC.
Chris@41 4404 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@41 4405 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@41 4406 ;;
Chris@41 4407 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
Chris@41 4408 # IBM XL 8.0, 9.0 on PPC and BlueGene
Chris@41 4409 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@41 4410 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
Chris@41 4411 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
Chris@41 4412 ;;
Chris@41 4413 *)
Chris@41 4414 case `$CC -V 2>&1 | sed 5q` in
Chris@41 4415 *Sun\ C*)
Chris@41 4416 # Sun C++ 5.9
Chris@41 4417 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@41 4418 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@41 4419 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
Chris@41 4420 ;;
Chris@41 4421 esac
Chris@41 4422 ;;
Chris@41 4423 esac
Chris@41 4424 ;;
Chris@41 4425 lynxos*)
Chris@41 4426 ;;
Chris@41 4427 m88k*)
Chris@41 4428 ;;
Chris@41 4429 mvs*)
Chris@41 4430 case $cc_basename in
Chris@41 4431 cxx*)
Chris@41 4432 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
Chris@41 4433 ;;
Chris@41 4434 *)
Chris@41 4435 ;;
Chris@41 4436 esac
Chris@41 4437 ;;
Chris@41 4438 netbsd* | netbsdelf*-gnu)
Chris@41 4439 ;;
Chris@41 4440 *qnx* | *nto*)
Chris@41 4441 # QNX uses GNU C++, but need to define -shared option too, otherwise
Chris@41 4442 # it will coredump.
Chris@41 4443 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
Chris@41 4444 ;;
Chris@41 4445 osf3* | osf4* | osf5*)
Chris@41 4446 case $cc_basename in
Chris@41 4447 KCC*)
Chris@41 4448 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
Chris@41 4449 ;;
Chris@41 4450 RCC*)
Chris@41 4451 # Rational C++ 2.4.1
Chris@41 4452 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@41 4453 ;;
Chris@41 4454 cxx*)
Chris@41 4455 # Digital/Compaq C++
Chris@41 4456 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@41 4457 # Make sure the PIC flag is empty. It appears that all Alpha
Chris@41 4458 # Linux and Compaq Tru64 Unix objects are PIC.
Chris@41 4459 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@41 4460 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@41 4461 ;;
Chris@41 4462 *)
Chris@41 4463 ;;
Chris@41 4464 esac
Chris@41 4465 ;;
Chris@41 4466 psos*)
Chris@41 4467 ;;
Chris@41 4468 solaris*)
Chris@41 4469 case $cc_basename in
Chris@41 4470 CC* | sunCC*)
Chris@41 4471 # Sun C++ 4.2, 5.x and Centerline C++
Chris@41 4472 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@41 4473 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@41 4474 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
Chris@41 4475 ;;
Chris@41 4476 gcx*)
Chris@41 4477 # Green Hills C++ Compiler
Chris@41 4478 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
Chris@41 4479 ;;
Chris@41 4480 *)
Chris@41 4481 ;;
Chris@41 4482 esac
Chris@41 4483 ;;
Chris@41 4484 sunos4*)
Chris@41 4485 case $cc_basename in
Chris@41 4486 CC*)
Chris@41 4487 # Sun C++ 4.x
Chris@41 4488 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@41 4489 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@41 4490 ;;
Chris@41 4491 lcc*)
Chris@41 4492 # Lucid
Chris@41 4493 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@41 4494 ;;
Chris@41 4495 *)
Chris@41 4496 ;;
Chris@41 4497 esac
Chris@41 4498 ;;
Chris@41 4499 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
Chris@41 4500 case $cc_basename in
Chris@41 4501 CC*)
Chris@41 4502 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@41 4503 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@41 4504 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@41 4505 ;;
Chris@41 4506 esac
Chris@41 4507 ;;
Chris@41 4508 tandem*)
Chris@41 4509 case $cc_basename in
Chris@41 4510 NCC*)
Chris@41 4511 # NonStop-UX NCC 3.20
Chris@41 4512 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@41 4513 ;;
Chris@41 4514 *)
Chris@41 4515 ;;
Chris@41 4516 esac
Chris@41 4517 ;;
Chris@41 4518 vxworks*)
Chris@41 4519 ;;
Chris@41 4520 *)
Chris@41 4521 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
Chris@41 4522 ;;
Chris@41 4523 esac
Chris@41 4524 fi
Chris@41 4525 ],
Chris@41 4526 [
Chris@41 4527 if test yes = "$GCC"; then
Chris@41 4528 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@41 4529 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@41 4530
Chris@41 4531 case $host_os in
Chris@41 4532 aix*)
Chris@41 4533 # All AIX code is PIC.
Chris@41 4534 if test ia64 = "$host_cpu"; then
Chris@41 4535 # AIX 5 now supports IA64 processor
Chris@41 4536 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@41 4537 fi
Chris@41 4538 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@41 4539 ;;
Chris@41 4540
Chris@41 4541 amigaos*)
Chris@41 4542 case $host_cpu in
Chris@41 4543 powerpc)
Chris@41 4544 # see comment about AmigaOS4 .so support
Chris@41 4545 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@41 4546 ;;
Chris@41 4547 m68k)
Chris@41 4548 # FIXME: we need at least 68020 code to build shared libraries, but
Chris@41 4549 # adding the '-m68020' flag to GCC prevents building anything better,
Chris@41 4550 # like '-m68040'.
Chris@41 4551 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
Chris@41 4552 ;;
Chris@41 4553 esac
Chris@41 4554 ;;
Chris@41 4555
Chris@41 4556 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
Chris@41 4557 # PIC is the default for these OSes.
Chris@41 4558 ;;
Chris@41 4559
Chris@41 4560 mingw* | cygwin* | pw32* | os2* | cegcc*)
Chris@41 4561 # This hack is so that the source file can tell whether it is being
Chris@41 4562 # built for inclusion in a dll (and should export symbols for example).
Chris@41 4563 # Although the cygwin gcc ignores -fPIC, still need this for old-style
Chris@41 4564 # (--disable-auto-import) libraries
Chris@41 4565 m4_if([$1], [GCJ], [],
Chris@41 4566 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
Chris@41 4567 case $host_os in
Chris@41 4568 os2*)
Chris@41 4569 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
Chris@41 4570 ;;
Chris@41 4571 esac
Chris@41 4572 ;;
Chris@41 4573
Chris@41 4574 darwin* | rhapsody*)
Chris@41 4575 # PIC is the default on this platform
Chris@41 4576 # Common symbols not allowed in MH_DYLIB files
Chris@41 4577 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
Chris@41 4578 ;;
Chris@41 4579
Chris@41 4580 haiku*)
Chris@41 4581 # PIC is the default for Haiku.
Chris@41 4582 # The "-static" flag exists, but is broken.
Chris@41 4583 _LT_TAGVAR(lt_prog_compiler_static, $1)=
Chris@41 4584 ;;
Chris@41 4585
Chris@41 4586 hpux*)
Chris@41 4587 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
Chris@41 4588 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
Chris@41 4589 # sets the default TLS model and affects inlining.
Chris@41 4590 case $host_cpu in
Chris@41 4591 hppa*64*)
Chris@41 4592 # +Z the default
Chris@41 4593 ;;
Chris@41 4594 *)
Chris@41 4595 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@41 4596 ;;
Chris@41 4597 esac
Chris@41 4598 ;;
Chris@41 4599
Chris@41 4600 interix[[3-9]]*)
Chris@41 4601 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
Chris@41 4602 # Instead, we relocate shared libraries at runtime.
Chris@41 4603 ;;
Chris@41 4604
Chris@41 4605 msdosdjgpp*)
Chris@41 4606 # Just because we use GCC doesn't mean we suddenly get shared libraries
Chris@41 4607 # on systems that don't support them.
Chris@41 4608 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
Chris@41 4609 enable_shared=no
Chris@41 4610 ;;
Chris@41 4611
Chris@41 4612 *nto* | *qnx*)
Chris@41 4613 # QNX uses GNU C++, but need to define -shared option too, otherwise
Chris@41 4614 # it will coredump.
Chris@41 4615 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
Chris@41 4616 ;;
Chris@41 4617
Chris@41 4618 sysv4*MP*)
Chris@41 4619 if test -d /usr/nec; then
Chris@41 4620 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
Chris@41 4621 fi
Chris@41 4622 ;;
Chris@41 4623
Chris@41 4624 *)
Chris@41 4625 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@41 4626 ;;
Chris@41 4627 esac
Chris@41 4628
Chris@41 4629 case $cc_basename in
Chris@41 4630 nvcc*) # Cuda Compiler Driver 2.2
Chris@41 4631 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
Chris@41 4632 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
Chris@41 4633 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
Chris@41 4634 fi
Chris@41 4635 ;;
Chris@41 4636 esac
Chris@41 4637 else
Chris@41 4638 # PORTME Check for flag to pass linker flags through the system compiler.
Chris@41 4639 case $host_os in
Chris@41 4640 aix*)
Chris@41 4641 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@41 4642 if test ia64 = "$host_cpu"; then
Chris@41 4643 # AIX 5 now supports IA64 processor
Chris@41 4644 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@41 4645 else
Chris@41 4646 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
Chris@41 4647 fi
Chris@41 4648 ;;
Chris@41 4649
Chris@41 4650 darwin* | rhapsody*)
Chris@41 4651 # PIC is the default on this platform
Chris@41 4652 # Common symbols not allowed in MH_DYLIB files
Chris@41 4653 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
Chris@41 4654 case $cc_basename in
Chris@41 4655 nagfor*)
Chris@41 4656 # NAG Fortran compiler
Chris@41 4657 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
Chris@41 4658 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
Chris@41 4659 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@41 4660 ;;
Chris@41 4661 esac
Chris@41 4662 ;;
Chris@41 4663
Chris@41 4664 mingw* | cygwin* | pw32* | os2* | cegcc*)
Chris@41 4665 # This hack is so that the source file can tell whether it is being
Chris@41 4666 # built for inclusion in a dll (and should export symbols for example).
Chris@41 4667 m4_if([$1], [GCJ], [],
Chris@41 4668 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
Chris@41 4669 case $host_os in
Chris@41 4670 os2*)
Chris@41 4671 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
Chris@41 4672 ;;
Chris@41 4673 esac
Chris@41 4674 ;;
Chris@41 4675
Chris@41 4676 hpux9* | hpux10* | hpux11*)
Chris@41 4677 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@41 4678 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
Chris@41 4679 # not for PA HP-UX.
Chris@41 4680 case $host_cpu in
Chris@41 4681 hppa*64*|ia64*)
Chris@41 4682 # +Z the default
Chris@41 4683 ;;
Chris@41 4684 *)
Chris@41 4685 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
Chris@41 4686 ;;
Chris@41 4687 esac
Chris@41 4688 # Is there a better lt_prog_compiler_static that works with the bundled CC?
Chris@41 4689 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
Chris@41 4690 ;;
Chris@41 4691
Chris@41 4692 irix5* | irix6* | nonstopux*)
Chris@41 4693 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@41 4694 # PIC (with -KPIC) is the default.
Chris@41 4695 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@41 4696 ;;
Chris@41 4697
Chris@41 4698 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
Chris@41 4699 case $cc_basename in
Chris@41 4700 # old Intel for x86_64, which still supported -KPIC.
Chris@41 4701 ecc*)
Chris@41 4702 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@41 4703 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@41 4704 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@41 4705 ;;
Chris@41 4706 # icc used to be incompatible with GCC.
Chris@41 4707 # ICC 10 doesn't accept -KPIC any more.
Chris@41 4708 icc* | ifort*)
Chris@41 4709 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@41 4710 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@41 4711 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@41 4712 ;;
Chris@41 4713 # Lahey Fortran 8.1.
Chris@41 4714 lf95*)
Chris@41 4715 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@41 4716 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
Chris@41 4717 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
Chris@41 4718 ;;
Chris@41 4719 nagfor*)
Chris@41 4720 # NAG Fortran compiler
Chris@41 4721 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
Chris@41 4722 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
Chris@41 4723 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@41 4724 ;;
Chris@41 4725 tcc*)
Chris@41 4726 # Fabrice Bellard et al's Tiny C Compiler
Chris@41 4727 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@41 4728 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@41 4729 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@41 4730 ;;
Chris@41 4731 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
Chris@41 4732 # Portland Group compilers (*not* the Pentium gcc compiler,
Chris@41 4733 # which looks to be a dead project)
Chris@41 4734 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@41 4735 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
Chris@41 4736 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@41 4737 ;;
Chris@41 4738 ccc*)
Chris@41 4739 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@41 4740 # All Alpha code is PIC.
Chris@41 4741 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@41 4742 ;;
Chris@41 4743 xl* | bgxl* | bgf* | mpixl*)
Chris@41 4744 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
Chris@41 4745 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@41 4746 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
Chris@41 4747 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
Chris@41 4748 ;;
Chris@41 4749 *)
Chris@41 4750 case `$CC -V 2>&1 | sed 5q` in
Chris@41 4751 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
Chris@41 4752 # Sun Fortran 8.3 passes all unrecognized flags to the linker
Chris@41 4753 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@41 4754 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@41 4755 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
Chris@41 4756 ;;
Chris@41 4757 *Sun\ F* | *Sun*Fortran*)
Chris@41 4758 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@41 4759 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@41 4760 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
Chris@41 4761 ;;
Chris@41 4762 *Sun\ C*)
Chris@41 4763 # Sun C 5.9
Chris@41 4764 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@41 4765 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@41 4766 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@41 4767 ;;
Chris@41 4768 *Intel*\ [[CF]]*Compiler*)
Chris@41 4769 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@41 4770 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@41 4771 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@41 4772 ;;
Chris@41 4773 *Portland\ Group*)
Chris@41 4774 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@41 4775 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
Chris@41 4776 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@41 4777 ;;
Chris@41 4778 esac
Chris@41 4779 ;;
Chris@41 4780 esac
Chris@41 4781 ;;
Chris@41 4782
Chris@41 4783 newsos6)
Chris@41 4784 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@41 4785 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@41 4786 ;;
Chris@41 4787
Chris@41 4788 *nto* | *qnx*)
Chris@41 4789 # QNX uses GNU C++, but need to define -shared option too, otherwise
Chris@41 4790 # it will coredump.
Chris@41 4791 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
Chris@41 4792 ;;
Chris@41 4793
Chris@41 4794 osf3* | osf4* | osf5*)
Chris@41 4795 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@41 4796 # All OSF/1 code is PIC.
Chris@41 4797 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@41 4798 ;;
Chris@41 4799
Chris@41 4800 rdos*)
Chris@41 4801 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@41 4802 ;;
Chris@41 4803
Chris@41 4804 solaris*)
Chris@41 4805 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@41 4806 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@41 4807 case $cc_basename in
Chris@41 4808 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
Chris@41 4809 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
Chris@41 4810 *)
Chris@41 4811 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
Chris@41 4812 esac
Chris@41 4813 ;;
Chris@41 4814
Chris@41 4815 sunos4*)
Chris@41 4816 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
Chris@41 4817 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
Chris@41 4818 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@41 4819 ;;
Chris@41 4820
Chris@41 4821 sysv4 | sysv4.2uw2* | sysv4.3*)
Chris@41 4822 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@41 4823 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@41 4824 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@41 4825 ;;
Chris@41 4826
Chris@41 4827 sysv4*MP*)
Chris@41 4828 if test -d /usr/nec; then
Chris@41 4829 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
Chris@41 4830 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@41 4831 fi
Chris@41 4832 ;;
Chris@41 4833
Chris@41 4834 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
Chris@41 4835 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@41 4836 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@41 4837 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@41 4838 ;;
Chris@41 4839
Chris@41 4840 unicos*)
Chris@41 4841 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@41 4842 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
Chris@41 4843 ;;
Chris@41 4844
Chris@41 4845 uts4*)
Chris@41 4846 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@41 4847 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@41 4848 ;;
Chris@41 4849
Chris@41 4850 *)
Chris@41 4851 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
Chris@41 4852 ;;
Chris@41 4853 esac
Chris@41 4854 fi
Chris@41 4855 ])
Chris@41 4856 case $host_os in
Chris@41 4857 # For platforms that do not support PIC, -DPIC is meaningless:
Chris@41 4858 *djgpp*)
Chris@41 4859 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@41 4860 ;;
Chris@41 4861 *)
Chris@41 4862 _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@41 4863 ;;
Chris@41 4864 esac
Chris@41 4865
Chris@41 4866 AC_CACHE_CHECK([for $compiler option to produce PIC],
Chris@41 4867 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
Chris@41 4868 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
Chris@41 4869 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
Chris@41 4870
Chris@41 4871 #
Chris@41 4872 # Check to make sure the PIC flag actually works.
Chris@41 4873 #
Chris@41 4874 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
Chris@41 4875 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
Chris@41 4876 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
Chris@41 4877 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
Chris@41 4878 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
Chris@41 4879 "" | " "*) ;;
Chris@41 4880 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
Chris@41 4881 esac],
Chris@41 4882 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@41 4883 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
Chris@41 4884 fi
Chris@41 4885 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
Chris@41 4886 [Additional compiler flags for building library objects])
Chris@41 4887
Chris@41 4888 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
Chris@41 4889 [How to pass a linker flag through the compiler])
Chris@41 4890 #
Chris@41 4891 # Check to make sure the static flag actually works.
Chris@41 4892 #
Chris@41 4893 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
Chris@41 4894 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
Chris@41 4895 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
Chris@41 4896 $lt_tmp_static_flag,
Chris@41 4897 [],
Chris@41 4898 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
Chris@41 4899 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
Chris@41 4900 [Compiler flag to prevent dynamic linking])
Chris@41 4901 ])# _LT_COMPILER_PIC
Chris@41 4902
Chris@41 4903
Chris@41 4904 # _LT_LINKER_SHLIBS([TAGNAME])
Chris@41 4905 # ----------------------------
Chris@41 4906 # See if the linker supports building shared libraries.
Chris@41 4907 m4_defun([_LT_LINKER_SHLIBS],
Chris@41 4908 [AC_REQUIRE([LT_PATH_LD])dnl
Chris@41 4909 AC_REQUIRE([LT_PATH_NM])dnl
Chris@41 4910 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
Chris@41 4911 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@41 4912 m4_require([_LT_DECL_EGREP])dnl
Chris@41 4913 m4_require([_LT_DECL_SED])dnl
Chris@41 4914 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
Chris@41 4915 m4_require([_LT_TAG_COMPILER])dnl
Chris@41 4916 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
Chris@41 4917 m4_if([$1], [CXX], [
Chris@41 4918 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
Chris@41 4919 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
Chris@41 4920 case $host_os in
Chris@41 4921 aix[[4-9]]*)
Chris@41 4922 # If we're using GNU nm, then we don't want the "-C" option.
Chris@41 4923 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
Chris@41 4924 # Without the "-l" option, or with the "-B" option, AIX nm treats
Chris@41 4925 # weak defined symbols like other global defined symbols, whereas
Chris@41 4926 # GNU nm marks them as "W".
Chris@41 4927 # While the 'weak' keyword is ignored in the Export File, we need
Chris@41 4928 # it in the Import File for the 'aix-soname' feature, so we have
Chris@41 4929 # to replace the "-B" option with "-P" for AIX nm.
Chris@41 4930 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
Chris@41 4931 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
Chris@41 4932 else
Chris@41 4933 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
Chris@41 4934 fi
Chris@41 4935 ;;
Chris@41 4936 pw32*)
Chris@41 4937 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
Chris@41 4938 ;;
Chris@41 4939 cygwin* | mingw* | cegcc*)
Chris@41 4940 case $cc_basename in
Chris@41 4941 cl*)
Chris@41 4942 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
Chris@41 4943 ;;
Chris@41 4944 *)
Chris@41 4945 _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@41 4946 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
Chris@41 4947 ;;
Chris@41 4948 esac
Chris@41 4949 ;;
Chris@41 4950 linux* | k*bsd*-gnu | gnu*)
Chris@41 4951 _LT_TAGVAR(link_all_deplibs, $1)=no
Chris@41 4952 ;;
Chris@41 4953 *)
Chris@41 4954 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
Chris@41 4955 ;;
Chris@41 4956 esac
Chris@41 4957 ], [
Chris@41 4958 runpath_var=
Chris@41 4959 _LT_TAGVAR(allow_undefined_flag, $1)=
Chris@41 4960 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@41 4961 _LT_TAGVAR(archive_cmds, $1)=
Chris@41 4962 _LT_TAGVAR(archive_expsym_cmds, $1)=
Chris@41 4963 _LT_TAGVAR(compiler_needs_object, $1)=no
Chris@41 4964 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
Chris@41 4965 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@41 4966 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
Chris@41 4967 _LT_TAGVAR(hardcode_automatic, $1)=no
Chris@41 4968 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@41 4969 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@41 4970 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@41 4971 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@41 4972 _LT_TAGVAR(hardcode_minus_L, $1)=no
Chris@41 4973 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
Chris@41 4974 _LT_TAGVAR(inherit_rpath, $1)=no
Chris@41 4975 _LT_TAGVAR(link_all_deplibs, $1)=unknown
Chris@41 4976 _LT_TAGVAR(module_cmds, $1)=
Chris@41 4977 _LT_TAGVAR(module_expsym_cmds, $1)=
Chris@41 4978 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
Chris@41 4979 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
Chris@41 4980 _LT_TAGVAR(thread_safe_flag_spec, $1)=
Chris@41 4981 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@41 4982 # include_expsyms should be a list of space-separated symbols to be *always*
Chris@41 4983 # included in the symbol list
Chris@41 4984 _LT_TAGVAR(include_expsyms, $1)=
Chris@41 4985 # exclude_expsyms can be an extended regexp of symbols to exclude
Chris@41 4986 # it will be wrapped by ' (' and ')$', so one must not match beginning or
Chris@41 4987 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
Chris@41 4988 # as well as any symbol that contains 'd'.
Chris@41 4989 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
Chris@41 4990 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
Chris@41 4991 # platforms (ab)use it in PIC code, but their linkers get confused if
Chris@41 4992 # the symbol is explicitly referenced. Since portable code cannot
Chris@41 4993 # rely on this symbol name, it's probably fine to never include it in
Chris@41 4994 # preloaded symbol tables.
Chris@41 4995 # Exclude shared library initialization/finalization symbols.
Chris@41 4996 dnl Note also adjust exclude_expsyms for C++ above.
Chris@41 4997 extract_expsyms_cmds=
Chris@41 4998
Chris@41 4999 case $host_os in
Chris@41 5000 cygwin* | mingw* | pw32* | cegcc*)
Chris@41 5001 # FIXME: the MSVC++ port hasn't been tested in a loooong time
Chris@41 5002 # When not using gcc, we currently assume that we are using
Chris@41 5003 # Microsoft Visual C++.
Chris@41 5004 if test yes != "$GCC"; then
Chris@41 5005 with_gnu_ld=no
Chris@41 5006 fi
Chris@41 5007 ;;
Chris@41 5008 interix*)
Chris@41 5009 # we just hope/assume this is gcc and not c89 (= MSVC++)
Chris@41 5010 with_gnu_ld=yes
Chris@41 5011 ;;
Chris@41 5012 openbsd* | bitrig*)
Chris@41 5013 with_gnu_ld=no
Chris@41 5014 ;;
Chris@41 5015 linux* | k*bsd*-gnu | gnu*)
Chris@41 5016 _LT_TAGVAR(link_all_deplibs, $1)=no
Chris@41 5017 ;;
Chris@41 5018 esac
Chris@41 5019
Chris@41 5020 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@41 5021
Chris@41 5022 # On some targets, GNU ld is compatible enough with the native linker
Chris@41 5023 # that we're better off using the native interface for both.
Chris@41 5024 lt_use_gnu_ld_interface=no
Chris@41 5025 if test yes = "$with_gnu_ld"; then
Chris@41 5026 case $host_os in
Chris@41 5027 aix*)
Chris@41 5028 # The AIX port of GNU ld has always aspired to compatibility
Chris@41 5029 # with the native linker. However, as the warning in the GNU ld
Chris@41 5030 # block says, versions before 2.19.5* couldn't really create working
Chris@41 5031 # shared libraries, regardless of the interface used.
Chris@41 5032 case `$LD -v 2>&1` in
Chris@41 5033 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
Chris@41 5034 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
Chris@41 5035 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
Chris@41 5036 *)
Chris@41 5037 lt_use_gnu_ld_interface=yes
Chris@41 5038 ;;
Chris@41 5039 esac
Chris@41 5040 ;;
Chris@41 5041 *)
Chris@41 5042 lt_use_gnu_ld_interface=yes
Chris@41 5043 ;;
Chris@41 5044 esac
Chris@41 5045 fi
Chris@41 5046
Chris@41 5047 if test yes = "$lt_use_gnu_ld_interface"; then
Chris@41 5048 # If archive_cmds runs LD, not CC, wlarc should be empty
Chris@41 5049 wlarc='$wl'
Chris@41 5050
Chris@41 5051 # Set some defaults for GNU ld with shared library support. These
Chris@41 5052 # are reset later if shared libraries are not supported. Putting them
Chris@41 5053 # here allows them to be overridden if necessary.
Chris@41 5054 runpath_var=LD_RUN_PATH
Chris@41 5055 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@41 5056 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
Chris@41 5057 # ancient GNU ld didn't support --whole-archive et. al.
Chris@41 5058 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
Chris@41 5059 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
Chris@41 5060 else
Chris@41 5061 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@41 5062 fi
Chris@41 5063 supports_anon_versioning=no
Chris@41 5064 case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
Chris@41 5065 *GNU\ gold*) supports_anon_versioning=yes ;;
Chris@41 5066 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
Chris@41 5067 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
Chris@41 5068 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
Chris@41 5069 *\ 2.11.*) ;; # other 2.11 versions
Chris@41 5070 *) supports_anon_versioning=yes ;;
Chris@41 5071 esac
Chris@41 5072
Chris@41 5073 # See if GNU ld supports shared libraries.
Chris@41 5074 case $host_os in
Chris@41 5075 aix[[3-9]]*)
Chris@41 5076 # On AIX/PPC, the GNU linker is very broken
Chris@41 5077 if test ia64 != "$host_cpu"; then
Chris@41 5078 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 5079 cat <<_LT_EOF 1>&2
Chris@41 5080
Chris@41 5081 *** Warning: the GNU linker, at least up to release 2.19, is reported
Chris@41 5082 *** to be unable to reliably create shared libraries on AIX.
Chris@41 5083 *** Therefore, libtool is disabling shared libraries support. If you
Chris@41 5084 *** really care for shared libraries, you may want to install binutils
Chris@41 5085 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
Chris@41 5086 *** You will then need to restart the configuration process.
Chris@41 5087
Chris@41 5088 _LT_EOF
Chris@41 5089 fi
Chris@41 5090 ;;
Chris@41 5091
Chris@41 5092 amigaos*)
Chris@41 5093 case $host_cpu in
Chris@41 5094 powerpc)
Chris@41 5095 # see comment about AmigaOS4 .so support
Chris@41 5096 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@41 5097 _LT_TAGVAR(archive_expsym_cmds, $1)=''
Chris@41 5098 ;;
Chris@41 5099 m68k)
Chris@41 5100 _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@41 5101 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@41 5102 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@41 5103 ;;
Chris@41 5104 esac
Chris@41 5105 ;;
Chris@41 5106
Chris@41 5107 beos*)
Chris@41 5108 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
Chris@41 5109 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@41 5110 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
Chris@41 5111 # support --undefined. This deserves some investigation. FIXME
Chris@41 5112 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@41 5113 else
Chris@41 5114 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 5115 fi
Chris@41 5116 ;;
Chris@41 5117
Chris@41 5118 cygwin* | mingw* | pw32* | cegcc*)
Chris@41 5119 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
Chris@41 5120 # as there is no search path for DLLs.
Chris@41 5121 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@41 5122 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
Chris@41 5123 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@41 5124 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@41 5125 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@41 5126 _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@41 5127 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
Chris@41 5128
Chris@41 5129 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
Chris@41 5130 _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@41 5131 # If the export-symbols file already is a .def file, use it as
Chris@41 5132 # is; otherwise, prepend EXPORTS...
Chris@41 5133 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
Chris@41 5134 cp $export_symbols $output_objdir/$soname.def;
Chris@41 5135 else
Chris@41 5136 echo EXPORTS > $output_objdir/$soname.def;
Chris@41 5137 cat $export_symbols >> $output_objdir/$soname.def;
Chris@41 5138 fi~
Chris@41 5139 $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@41 5140 else
Chris@41 5141 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 5142 fi
Chris@41 5143 ;;
Chris@41 5144
Chris@41 5145 haiku*)
Chris@41 5146 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@41 5147 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@41 5148 ;;
Chris@41 5149
Chris@41 5150 os2*)
Chris@41 5151 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@41 5152 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@41 5153 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@41 5154 shrext_cmds=.dll
Chris@41 5155 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
Chris@41 5156 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
Chris@41 5157 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
Chris@41 5158 $ECHO EXPORTS >> $output_objdir/$libname.def~
Chris@41 5159 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
Chris@41 5160 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
Chris@41 5161 emximp -o $lib $output_objdir/$libname.def'
Chris@41 5162 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
Chris@41 5163 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
Chris@41 5164 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
Chris@41 5165 $ECHO EXPORTS >> $output_objdir/$libname.def~
Chris@41 5166 prefix_cmds="$SED"~
Chris@41 5167 if test EXPORTS = "`$SED 1q $export_symbols`"; then
Chris@41 5168 prefix_cmds="$prefix_cmds -e 1d";
Chris@41 5169 fi~
Chris@41 5170 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
Chris@41 5171 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
Chris@41 5172 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
Chris@41 5173 emximp -o $lib $output_objdir/$libname.def'
Chris@41 5174 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
Chris@41 5175 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@41 5176 ;;
Chris@41 5177
Chris@41 5178 interix[[3-9]]*)
Chris@41 5179 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@41 5180 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@41 5181 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@41 5182 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@41 5183 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
Chris@41 5184 # Instead, shared libraries are loaded at an image base (0x10000000 by
Chris@41 5185 # default) and relocated if they conflict, which is a slow very memory
Chris@41 5186 # consuming and fragmenting process. To avoid this, we pick a random,
Chris@41 5187 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
Chris@41 5188 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
Chris@41 5189 _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@41 5190 _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@41 5191 ;;
Chris@41 5192
Chris@41 5193 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
Chris@41 5194 tmp_diet=no
Chris@41 5195 if test linux-dietlibc = "$host_os"; then
Chris@41 5196 case $cc_basename in
Chris@41 5197 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
Chris@41 5198 esac
Chris@41 5199 fi
Chris@41 5200 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
Chris@41 5201 && test no = "$tmp_diet"
Chris@41 5202 then
Chris@41 5203 tmp_addflag=' $pic_flag'
Chris@41 5204 tmp_sharedflag='-shared'
Chris@41 5205 case $cc_basename,$host_cpu in
Chris@41 5206 pgcc*) # Portland Group C compiler
Chris@41 5207 _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@41 5208 tmp_addflag=' $pic_flag'
Chris@41 5209 ;;
Chris@41 5210 pgf77* | pgf90* | pgf95* | pgfortran*)
Chris@41 5211 # Portland Group f77 and f90 compilers
Chris@41 5212 _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@41 5213 tmp_addflag=' $pic_flag -Mnomain' ;;
Chris@41 5214 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
Chris@41 5215 tmp_addflag=' -i_dynamic' ;;
Chris@41 5216 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
Chris@41 5217 tmp_addflag=' -i_dynamic -nofor_main' ;;
Chris@41 5218 ifc* | ifort*) # Intel Fortran compiler
Chris@41 5219 tmp_addflag=' -nofor_main' ;;
Chris@41 5220 lf95*) # Lahey Fortran 8.1
Chris@41 5221 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@41 5222 tmp_sharedflag='--shared' ;;
Chris@41 5223 nagfor*) # NAGFOR 5.3
Chris@41 5224 tmp_sharedflag='-Wl,-shared' ;;
Chris@41 5225 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
Chris@41 5226 tmp_sharedflag='-qmkshrobj'
Chris@41 5227 tmp_addflag= ;;
Chris@41 5228 nvcc*) # Cuda Compiler Driver 2.2
Chris@41 5229 _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@41 5230 _LT_TAGVAR(compiler_needs_object, $1)=yes
Chris@41 5231 ;;
Chris@41 5232 esac
Chris@41 5233 case `$CC -V 2>&1 | sed 5q` in
Chris@41 5234 *Sun\ C*) # Sun C 5.9
Chris@41 5235 _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@41 5236 _LT_TAGVAR(compiler_needs_object, $1)=yes
Chris@41 5237 tmp_sharedflag='-G' ;;
Chris@41 5238 *Sun\ F*) # Sun Fortran 8.3
Chris@41 5239 tmp_sharedflag='-G' ;;
Chris@41 5240 esac
Chris@41 5241 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@41 5242
Chris@41 5243 if test yes = "$supports_anon_versioning"; then
Chris@41 5244 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
Chris@41 5245 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
Chris@41 5246 echo "local: *; };" >> $output_objdir/$libname.ver~
Chris@41 5247 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
Chris@41 5248 fi
Chris@41 5249
Chris@41 5250 case $cc_basename in
Chris@41 5251 tcc*)
Chris@41 5252 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
Chris@41 5253 ;;
Chris@41 5254 xlf* | bgf* | bgxlf* | mpixlf*)
Chris@41 5255 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
Chris@41 5256 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
Chris@41 5257 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@41 5258 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
Chris@41 5259 if test yes = "$supports_anon_versioning"; then
Chris@41 5260 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
Chris@41 5261 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
Chris@41 5262 echo "local: *; };" >> $output_objdir/$libname.ver~
Chris@41 5263 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
Chris@41 5264 fi
Chris@41 5265 ;;
Chris@41 5266 esac
Chris@41 5267 else
Chris@41 5268 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 5269 fi
Chris@41 5270 ;;
Chris@41 5271
Chris@41 5272 netbsd* | netbsdelf*-gnu)
Chris@41 5273 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
Chris@41 5274 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
Chris@41 5275 wlarc=
Chris@41 5276 else
Chris@41 5277 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@41 5278 _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@41 5279 fi
Chris@41 5280 ;;
Chris@41 5281
Chris@41 5282 solaris*)
Chris@41 5283 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
Chris@41 5284 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 5285 cat <<_LT_EOF 1>&2
Chris@41 5286
Chris@41 5287 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
Chris@41 5288 *** create shared libraries on Solaris systems. Therefore, libtool
Chris@41 5289 *** is disabling shared libraries support. We urge you to upgrade GNU
Chris@41 5290 *** binutils to release 2.9.1 or newer. Another option is to modify
Chris@41 5291 *** your PATH or compiler configuration so that the native linker is
Chris@41 5292 *** used, and then restart.
Chris@41 5293
Chris@41 5294 _LT_EOF
Chris@41 5295 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
Chris@41 5296 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@41 5297 _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@41 5298 else
Chris@41 5299 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 5300 fi
Chris@41 5301 ;;
Chris@41 5302
Chris@41 5303 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
Chris@41 5304 case `$LD -v 2>&1` in
Chris@41 5305 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
Chris@41 5306 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 5307 cat <<_LT_EOF 1>&2
Chris@41 5308
Chris@41 5309 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
Chris@41 5310 *** reliably create shared libraries on SCO systems. Therefore, libtool
Chris@41 5311 *** is disabling shared libraries support. We urge you to upgrade GNU
Chris@41 5312 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
Chris@41 5313 *** your PATH or compiler configuration so that the native linker is
Chris@41 5314 *** used, and then restart.
Chris@41 5315
Chris@41 5316 _LT_EOF
Chris@41 5317 ;;
Chris@41 5318 *)
Chris@41 5319 # For security reasons, it is highly recommended that you always
Chris@41 5320 # use absolute paths for naming shared libraries, and exclude the
Chris@41 5321 # DT_RUNPATH tag from executables and libraries. But doing so
Chris@41 5322 # requires that you compile everything twice, which is a pain.
Chris@41 5323 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
Chris@41 5324 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@41 5325 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@41 5326 _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@41 5327 else
Chris@41 5328 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 5329 fi
Chris@41 5330 ;;
Chris@41 5331 esac
Chris@41 5332 ;;
Chris@41 5333
Chris@41 5334 sunos4*)
Chris@41 5335 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
Chris@41 5336 wlarc=
Chris@41 5337 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@41 5338 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@41 5339 ;;
Chris@41 5340
Chris@41 5341 *)
Chris@41 5342 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
Chris@41 5343 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@41 5344 _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@41 5345 else
Chris@41 5346 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 5347 fi
Chris@41 5348 ;;
Chris@41 5349 esac
Chris@41 5350
Chris@41 5351 if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
Chris@41 5352 runpath_var=
Chris@41 5353 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@41 5354 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@41 5355 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@41 5356 fi
Chris@41 5357 else
Chris@41 5358 # PORTME fill in a description of your system's linker (not GNU ld)
Chris@41 5359 case $host_os in
Chris@41 5360 aix3*)
Chris@41 5361 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@41 5362 _LT_TAGVAR(always_export_symbols, $1)=yes
Chris@41 5363 _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@41 5364 # Note: this linker hardcodes the directories in LIBPATH if there
Chris@41 5365 # are no directories specified by -L.
Chris@41 5366 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@41 5367 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
Chris@41 5368 # Neither direct hardcoding nor static linking is supported with a
Chris@41 5369 # broken collect2.
Chris@41 5370 _LT_TAGVAR(hardcode_direct, $1)=unsupported
Chris@41 5371 fi
Chris@41 5372 ;;
Chris@41 5373
Chris@41 5374 aix[[4-9]]*)
Chris@41 5375 if test ia64 = "$host_cpu"; then
Chris@41 5376 # On IA64, the linker does run time linking by default, so we don't
Chris@41 5377 # have to do anything special.
Chris@41 5378 aix_use_runtimelinking=no
Chris@41 5379 exp_sym_flag='-Bexport'
Chris@41 5380 no_entry_flag=
Chris@41 5381 else
Chris@41 5382 # If we're using GNU nm, then we don't want the "-C" option.
Chris@41 5383 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
Chris@41 5384 # Without the "-l" option, or with the "-B" option, AIX nm treats
Chris@41 5385 # weak defined symbols like other global defined symbols, whereas
Chris@41 5386 # GNU nm marks them as "W".
Chris@41 5387 # While the 'weak' keyword is ignored in the Export File, we need
Chris@41 5388 # it in the Import File for the 'aix-soname' feature, so we have
Chris@41 5389 # to replace the "-B" option with "-P" for AIX nm.
Chris@41 5390 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
Chris@41 5391 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
Chris@41 5392 else
Chris@41 5393 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
Chris@41 5394 fi
Chris@41 5395 aix_use_runtimelinking=no
Chris@41 5396
Chris@41 5397 # Test if we are trying to use run time linking or normal
Chris@41 5398 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
Chris@41 5399 # have runtime linking enabled, and use it for executables.
Chris@41 5400 # For shared libraries, we enable/disable runtime linking
Chris@41 5401 # depending on the kind of the shared library created -
Chris@41 5402 # when "with_aix_soname,aix_use_runtimelinking" is:
Chris@41 5403 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
Chris@41 5404 # "aix,yes" lib.so shared, rtl:yes, for executables
Chris@41 5405 # lib.a static archive
Chris@41 5406 # "both,no" lib.so.V(shr.o) shared, rtl:yes
Chris@41 5407 # lib.a(lib.so.V) shared, rtl:no, for executables
Chris@41 5408 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
Chris@41 5409 # lib.a(lib.so.V) shared, rtl:no
Chris@41 5410 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
Chris@41 5411 # lib.a static archive
Chris@41 5412 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
Chris@41 5413 for ld_flag in $LDFLAGS; do
Chris@41 5414 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
Chris@41 5415 aix_use_runtimelinking=yes
Chris@41 5416 break
Chris@41 5417 fi
Chris@41 5418 done
Chris@41 5419 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
Chris@41 5420 # With aix-soname=svr4, we create the lib.so.V shared archives only,
Chris@41 5421 # so we don't have lib.a shared libs to link our executables.
Chris@41 5422 # We have to force runtime linking in this case.
Chris@41 5423 aix_use_runtimelinking=yes
Chris@41 5424 LDFLAGS="$LDFLAGS -Wl,-brtl"
Chris@41 5425 fi
Chris@41 5426 ;;
Chris@41 5427 esac
Chris@41 5428
Chris@41 5429 exp_sym_flag='-bexport'
Chris@41 5430 no_entry_flag='-bnoentry'
Chris@41 5431 fi
Chris@41 5432
Chris@41 5433 # When large executables or shared objects are built, AIX ld can
Chris@41 5434 # have problems creating the table of contents. If linking a library
Chris@41 5435 # or program results in "error TOC overflow" add -mminimal-toc to
Chris@41 5436 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
Chris@41 5437 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
Chris@41 5438
Chris@41 5439 _LT_TAGVAR(archive_cmds, $1)=''
Chris@41 5440 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@41 5441 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@41 5442 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
Chris@41 5443 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@41 5444 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
Chris@41 5445 case $with_aix_soname,$aix_use_runtimelinking in
Chris@41 5446 aix,*) ;; # traditional, no import file
Chris@41 5447 svr4,* | *,yes) # use import file
Chris@41 5448 # The Import File defines what to hardcode.
Chris@41 5449 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@41 5450 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@41 5451 ;;
Chris@41 5452 esac
Chris@41 5453
Chris@41 5454 if test yes = "$GCC"; then
Chris@41 5455 case $host_os in aix4.[[012]]|aix4.[[012]].*)
Chris@41 5456 # We only want to do this on AIX 4.2 and lower, the check
Chris@41 5457 # below for broken collect2 doesn't work under 4.3+
Chris@41 5458 collect2name=`$CC -print-prog-name=collect2`
Chris@41 5459 if test -f "$collect2name" &&
Chris@41 5460 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
Chris@41 5461 then
Chris@41 5462 # We have reworked collect2
Chris@41 5463 :
Chris@41 5464 else
Chris@41 5465 # We have old collect2
Chris@41 5466 _LT_TAGVAR(hardcode_direct, $1)=unsupported
Chris@41 5467 # It fails to find uninstalled libraries when the uninstalled
Chris@41 5468 # path is not listed in the libpath. Setting hardcode_minus_L
Chris@41 5469 # to unsupported forces relinking
Chris@41 5470 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@41 5471 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@41 5472 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@41 5473 fi
Chris@41 5474 ;;
Chris@41 5475 esac
Chris@41 5476 shared_flag='-shared'
Chris@41 5477 if test yes = "$aix_use_runtimelinking"; then
Chris@41 5478 shared_flag="$shared_flag "'$wl-G'
Chris@41 5479 fi
Chris@41 5480 # Need to ensure runtime linking is disabled for the traditional
Chris@41 5481 # shared library, or the linker may eventually find shared libraries
Chris@41 5482 # /with/ Import File - we do not want to mix them.
Chris@41 5483 shared_flag_aix='-shared'
Chris@41 5484 shared_flag_svr4='-shared $wl-G'
Chris@41 5485 else
Chris@41 5486 # not using gcc
Chris@41 5487 if test ia64 = "$host_cpu"; then
Chris@41 5488 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
Chris@41 5489 # chokes on -Wl,-G. The following line is correct:
Chris@41 5490 shared_flag='-G'
Chris@41 5491 else
Chris@41 5492 if test yes = "$aix_use_runtimelinking"; then
Chris@41 5493 shared_flag='$wl-G'
Chris@41 5494 else
Chris@41 5495 shared_flag='$wl-bM:SRE'
Chris@41 5496 fi
Chris@41 5497 shared_flag_aix='$wl-bM:SRE'
Chris@41 5498 shared_flag_svr4='$wl-G'
Chris@41 5499 fi
Chris@41 5500 fi
Chris@41 5501
Chris@41 5502 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
Chris@41 5503 # It seems that -bexpall does not export symbols beginning with
Chris@41 5504 # underscore (_), so it is better to generate a list of symbols to export.
Chris@41 5505 _LT_TAGVAR(always_export_symbols, $1)=yes
Chris@41 5506 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
Chris@41 5507 # Warning - without using the other runtime loading flags (-brtl),
Chris@41 5508 # -berok will link without error, but may produce a broken library.
Chris@41 5509 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
Chris@41 5510 # Determine the default libpath from the value encoded in an
Chris@41 5511 # empty executable.
Chris@41 5512 _LT_SYS_MODULE_PATH_AIX([$1])
Chris@41 5513 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
Chris@41 5514 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
Chris@41 5515 else
Chris@41 5516 if test ia64 = "$host_cpu"; then
Chris@41 5517 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
Chris@41 5518 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
Chris@41 5519 _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@41 5520 else
Chris@41 5521 # Determine the default libpath from the value encoded in an
Chris@41 5522 # empty executable.
Chris@41 5523 _LT_SYS_MODULE_PATH_AIX([$1])
Chris@41 5524 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
Chris@41 5525 # Warning - without using the other run time loading flags,
Chris@41 5526 # -berok will link without error, but may produce a broken library.
Chris@41 5527 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
Chris@41 5528 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
Chris@41 5529 if test yes = "$with_gnu_ld"; then
Chris@41 5530 # We only use this code for GNU lds that support --whole-archive.
Chris@41 5531 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
Chris@41 5532 else
Chris@41 5533 # Exported symbols can be pulled into shared objects from archives
Chris@41 5534 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
Chris@41 5535 fi
Chris@41 5536 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
Chris@41 5537 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
Chris@41 5538 # -brtl affects multiple linker settings, -berok does not and is overridden later
Chris@41 5539 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
Chris@41 5540 if test svr4 != "$with_aix_soname"; then
Chris@41 5541 # This is similar to how AIX traditionally builds its shared libraries.
Chris@41 5542 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
Chris@41 5543 fi
Chris@41 5544 if test aix != "$with_aix_soname"; then
Chris@41 5545 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
Chris@41 5546 else
Chris@41 5547 # used by -dlpreopen to get the symbols
Chris@41 5548 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
Chris@41 5549 fi
Chris@41 5550 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
Chris@41 5551 fi
Chris@41 5552 fi
Chris@41 5553 ;;
Chris@41 5554
Chris@41 5555 amigaos*)
Chris@41 5556 case $host_cpu in
Chris@41 5557 powerpc)
Chris@41 5558 # see comment about AmigaOS4 .so support
Chris@41 5559 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@41 5560 _LT_TAGVAR(archive_expsym_cmds, $1)=''
Chris@41 5561 ;;
Chris@41 5562 m68k)
Chris@41 5563 _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@41 5564 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@41 5565 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@41 5566 ;;
Chris@41 5567 esac
Chris@41 5568 ;;
Chris@41 5569
Chris@41 5570 bsdi[[45]]*)
Chris@41 5571 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
Chris@41 5572 ;;
Chris@41 5573
Chris@41 5574 cygwin* | mingw* | pw32* | cegcc*)
Chris@41 5575 # When not using gcc, we currently assume that we are using
Chris@41 5576 # Microsoft Visual C++.
Chris@41 5577 # hardcode_libdir_flag_spec is actually meaningless, as there is
Chris@41 5578 # no search path for DLLs.
Chris@41 5579 case $cc_basename in
Chris@41 5580 cl*)
Chris@41 5581 # Native MSVC
Chris@41 5582 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
Chris@41 5583 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@41 5584 _LT_TAGVAR(always_export_symbols, $1)=yes
Chris@41 5585 _LT_TAGVAR(file_list_spec, $1)='@'
Chris@41 5586 # Tell ltmain to make .lib files, not .a files.
Chris@41 5587 libext=lib
Chris@41 5588 # Tell ltmain to make .dll files, not .so files.
Chris@41 5589 shrext_cmds=.dll
Chris@41 5590 # FIXME: Setting linknames here is a bad hack.
Chris@41 5591 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
Chris@41 5592 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
Chris@41 5593 cp "$export_symbols" "$output_objdir/$soname.def";
Chris@41 5594 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
Chris@41 5595 else
Chris@41 5596 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
Chris@41 5597 fi~
Chris@41 5598 $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@41 5599 linknames='
Chris@41 5600 # The linker will not automatically build a static lib if we build a DLL.
Chris@41 5601 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
Chris@41 5602 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@41 5603 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
Chris@41 5604 _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@41 5605 # Don't use ranlib
Chris@41 5606 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
Chris@41 5607 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
Chris@41 5608 lt_tool_outputfile="@TOOL_OUTPUT@"~
Chris@41 5609 case $lt_outputfile in
Chris@41 5610 *.exe|*.EXE) ;;
Chris@41 5611 *)
Chris@41 5612 lt_outputfile=$lt_outputfile.exe
Chris@41 5613 lt_tool_outputfile=$lt_tool_outputfile.exe
Chris@41 5614 ;;
Chris@41 5615 esac~
Chris@41 5616 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
Chris@41 5617 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
Chris@41 5618 $RM "$lt_outputfile.manifest";
Chris@41 5619 fi'
Chris@41 5620 ;;
Chris@41 5621 *)
Chris@41 5622 # Assume MSVC wrapper
Chris@41 5623 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
Chris@41 5624 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@41 5625 # Tell ltmain to make .lib files, not .a files.
Chris@41 5626 libext=lib
Chris@41 5627 # Tell ltmain to make .dll files, not .so files.
Chris@41 5628 shrext_cmds=.dll
Chris@41 5629 # FIXME: Setting linknames here is a bad hack.
Chris@41 5630 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
Chris@41 5631 # The linker will automatically build a .lib file if we build a DLL.
Chris@41 5632 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
Chris@41 5633 # FIXME: Should let the user specify the lib program.
Chris@41 5634 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
Chris@41 5635 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@41 5636 ;;
Chris@41 5637 esac
Chris@41 5638 ;;
Chris@41 5639
Chris@41 5640 darwin* | rhapsody*)
Chris@41 5641 _LT_DARWIN_LINKER_FEATURES($1)
Chris@41 5642 ;;
Chris@41 5643
Chris@41 5644 dgux*)
Chris@41 5645 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@41 5646 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@41 5647 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@41 5648 ;;
Chris@41 5649
Chris@41 5650 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
Chris@41 5651 # support. Future versions do this automatically, but an explicit c++rt0.o
Chris@41 5652 # does not break anything, and helps significantly (at the cost of a little
Chris@41 5653 # extra space).
Chris@41 5654 freebsd2.2*)
Chris@41 5655 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
Chris@41 5656 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@41 5657 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@41 5658 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@41 5659 ;;
Chris@41 5660
Chris@41 5661 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
Chris@41 5662 freebsd2.*)
Chris@41 5663 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
Chris@41 5664 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@41 5665 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@41 5666 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@41 5667 ;;
Chris@41 5668
Chris@41 5669 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
Chris@41 5670 freebsd* | dragonfly*)
Chris@41 5671 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
Chris@41 5672 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@41 5673 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@41 5674 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@41 5675 ;;
Chris@41 5676
Chris@41 5677 hpux9*)
Chris@41 5678 if test yes = "$GCC"; then
Chris@41 5679 _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
Chris@41 5680 else
Chris@41 5681 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
Chris@41 5682 fi
Chris@41 5683 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
Chris@41 5684 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@41 5685 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@41 5686
Chris@41 5687 # hardcode_minus_L: Not really in the search PATH,
Chris@41 5688 # but as the default location of the library.
Chris@41 5689 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@41 5690 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@41 5691 ;;
Chris@41 5692
Chris@41 5693 hpux10*)
Chris@41 5694 if test yes,no = "$GCC,$with_gnu_ld"; then
Chris@41 5695 _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@41 5696 else
Chris@41 5697 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
Chris@41 5698 fi
Chris@41 5699 if test no = "$with_gnu_ld"; then
Chris@41 5700 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
Chris@41 5701 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@41 5702 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@41 5703 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@41 5704 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@41 5705 # hardcode_minus_L: Not really in the search PATH,
Chris@41 5706 # but as the default location of the library.
Chris@41 5707 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@41 5708 fi
Chris@41 5709 ;;
Chris@41 5710
Chris@41 5711 hpux11*)
Chris@41 5712 if test yes,no = "$GCC,$with_gnu_ld"; then
Chris@41 5713 case $host_cpu in
Chris@41 5714 hppa*64*)
Chris@41 5715 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@41 5716 ;;
Chris@41 5717 ia64*)
Chris@41 5718 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
Chris@41 5719 ;;
Chris@41 5720 *)
Chris@41 5721 _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@41 5722 ;;
Chris@41 5723 esac
Chris@41 5724 else
Chris@41 5725 case $host_cpu in
Chris@41 5726 hppa*64*)
Chris@41 5727 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@41 5728 ;;
Chris@41 5729 ia64*)
Chris@41 5730 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
Chris@41 5731 ;;
Chris@41 5732 *)
Chris@41 5733 m4_if($1, [], [
Chris@41 5734 # Older versions of the 11.00 compiler do not understand -b yet
Chris@41 5735 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
Chris@41 5736 _LT_LINKER_OPTION([if $CC understands -b],
Chris@41 5737 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
Chris@41 5738 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
Chris@41 5739 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
Chris@41 5740 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
Chris@41 5741 ;;
Chris@41 5742 esac
Chris@41 5743 fi
Chris@41 5744 if test no = "$with_gnu_ld"; then
Chris@41 5745 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
Chris@41 5746 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@41 5747
Chris@41 5748 case $host_cpu in
Chris@41 5749 hppa*64*|ia64*)
Chris@41 5750 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@41 5751 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@41 5752 ;;
Chris@41 5753 *)
Chris@41 5754 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@41 5755 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@41 5756 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@41 5757
Chris@41 5758 # hardcode_minus_L: Not really in the search PATH,
Chris@41 5759 # but as the default location of the library.
Chris@41 5760 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@41 5761 ;;
Chris@41 5762 esac
Chris@41 5763 fi
Chris@41 5764 ;;
Chris@41 5765
Chris@41 5766 irix5* | irix6* | nonstopux*)
Chris@41 5767 if test yes = "$GCC"; then
Chris@41 5768 _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@41 5769 # Try to use the -exported_symbol ld option, if it does not
Chris@41 5770 # work, assume that -exports_file does not work either and
Chris@41 5771 # implicitly export all symbols.
Chris@41 5772 # This should be the same for all languages, so no per-tag cache variable.
Chris@41 5773 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
Chris@41 5774 [lt_cv_irix_exported_symbol],
Chris@41 5775 [save_LDFLAGS=$LDFLAGS
Chris@41 5776 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
Chris@41 5777 AC_LINK_IFELSE(
Chris@41 5778 [AC_LANG_SOURCE(
Chris@41 5779 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
Chris@41 5780 [C++], [[int foo (void) { return 0; }]],
Chris@41 5781 [Fortran 77], [[
Chris@41 5782 subroutine foo
Chris@41 5783 end]],
Chris@41 5784 [Fortran], [[
Chris@41 5785 subroutine foo
Chris@41 5786 end]])])],
Chris@41 5787 [lt_cv_irix_exported_symbol=yes],
Chris@41 5788 [lt_cv_irix_exported_symbol=no])
Chris@41 5789 LDFLAGS=$save_LDFLAGS])
Chris@41 5790 if test yes = "$lt_cv_irix_exported_symbol"; then
Chris@41 5791 _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@41 5792 fi
Chris@41 5793 _LT_TAGVAR(link_all_deplibs, $1)=no
Chris@41 5794 else
Chris@41 5795 _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@41 5796 _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@41 5797 fi
Chris@41 5798 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
Chris@41 5799 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@41 5800 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@41 5801 _LT_TAGVAR(inherit_rpath, $1)=yes
Chris@41 5802 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@41 5803 ;;
Chris@41 5804
Chris@41 5805 linux*)
Chris@41 5806 case $cc_basename in
Chris@41 5807 tcc*)
Chris@41 5808 # Fabrice Bellard et al's Tiny C Compiler
Chris@41 5809 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@41 5810 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
Chris@41 5811 ;;
Chris@41 5812 esac
Chris@41 5813 ;;
Chris@41 5814
Chris@41 5815 netbsd* | netbsdelf*-gnu)
Chris@41 5816 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
Chris@41 5817 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
Chris@41 5818 else
Chris@41 5819 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
Chris@41 5820 fi
Chris@41 5821 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@41 5822 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@41 5823 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@41 5824 ;;
Chris@41 5825
Chris@41 5826 newsos6)
Chris@41 5827 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@41 5828 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@41 5829 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@41 5830 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@41 5831 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@41 5832 ;;
Chris@41 5833
Chris@41 5834 *nto* | *qnx*)
Chris@41 5835 ;;
Chris@41 5836
Chris@41 5837 openbsd* | bitrig*)
Chris@41 5838 if test -f /usr/libexec/ld.so; then
Chris@41 5839 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@41 5840 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@41 5841 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@41 5842 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
Chris@41 5843 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
Chris@41 5844 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
Chris@41 5845 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@41 5846 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@41 5847 else
Chris@41 5848 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
Chris@41 5849 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@41 5850 fi
Chris@41 5851 else
Chris@41 5852 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 5853 fi
Chris@41 5854 ;;
Chris@41 5855
Chris@41 5856 os2*)
Chris@41 5857 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@41 5858 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@41 5859 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@41 5860 shrext_cmds=.dll
Chris@41 5861 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
Chris@41 5862 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
Chris@41 5863 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
Chris@41 5864 $ECHO EXPORTS >> $output_objdir/$libname.def~
Chris@41 5865 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
Chris@41 5866 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
Chris@41 5867 emximp -o $lib $output_objdir/$libname.def'
Chris@41 5868 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
Chris@41 5869 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
Chris@41 5870 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
Chris@41 5871 $ECHO EXPORTS >> $output_objdir/$libname.def~
Chris@41 5872 prefix_cmds="$SED"~
Chris@41 5873 if test EXPORTS = "`$SED 1q $export_symbols`"; then
Chris@41 5874 prefix_cmds="$prefix_cmds -e 1d";
Chris@41 5875 fi~
Chris@41 5876 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
Chris@41 5877 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
Chris@41 5878 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
Chris@41 5879 emximp -o $lib $output_objdir/$libname.def'
Chris@41 5880 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
Chris@41 5881 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@41 5882 ;;
Chris@41 5883
Chris@41 5884 osf3*)
Chris@41 5885 if test yes = "$GCC"; then
Chris@41 5886 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
Chris@41 5887 _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@41 5888 else
Chris@41 5889 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
Chris@41 5890 _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@41 5891 fi
Chris@41 5892 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
Chris@41 5893 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@41 5894 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@41 5895 ;;
Chris@41 5896
Chris@41 5897 osf4* | osf5*) # as osf3* with the addition of -msym flag
Chris@41 5898 if test yes = "$GCC"; then
Chris@41 5899 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
Chris@41 5900 _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@41 5901 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@41 5902 else
Chris@41 5903 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
Chris@41 5904 _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@41 5905 _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@41 5906 $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@41 5907
Chris@41 5908 # Both c and cxx compiler support -rpath directly
Chris@41 5909 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
Chris@41 5910 fi
Chris@41 5911 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
Chris@41 5912 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@41 5913 ;;
Chris@41 5914
Chris@41 5915 solaris*)
Chris@41 5916 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
Chris@41 5917 if test yes = "$GCC"; then
Chris@41 5918 wlarc='$wl'
Chris@41 5919 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@41 5920 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@41 5921 $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@41 5922 else
Chris@41 5923 case `$CC -V 2>&1` in
Chris@41 5924 *"Compilers 5.0"*)
Chris@41 5925 wlarc=''
Chris@41 5926 _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@41 5927 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@41 5928 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
Chris@41 5929 ;;
Chris@41 5930 *)
Chris@41 5931 wlarc='$wl'
Chris@41 5932 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@41 5933 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@41 5934 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
Chris@41 5935 ;;
Chris@41 5936 esac
Chris@41 5937 fi
Chris@41 5938 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@41 5939 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@41 5940 case $host_os in
Chris@41 5941 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
Chris@41 5942 *)
Chris@41 5943 # The compiler driver will combine and reorder linker options,
Chris@41 5944 # but understands '-z linker_flag'. GCC discards it without '$wl',
Chris@41 5945 # but is careful enough not to reorder.
Chris@41 5946 # Supported since Solaris 2.6 (maybe 2.5.1?)
Chris@41 5947 if test yes = "$GCC"; then
Chris@41 5948 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
Chris@41 5949 else
Chris@41 5950 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
Chris@41 5951 fi
Chris@41 5952 ;;
Chris@41 5953 esac
Chris@41 5954 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@41 5955 ;;
Chris@41 5956
Chris@41 5957 sunos4*)
Chris@41 5958 if test sequent = "$host_vendor"; then
Chris@41 5959 # Use $CC to link under sequent, because it throws in some extra .o
Chris@41 5960 # files that make .init and .fini sections work.
Chris@41 5961 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@41 5962 else
Chris@41 5963 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
Chris@41 5964 fi
Chris@41 5965 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@41 5966 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@41 5967 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@41 5968 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@41 5969 ;;
Chris@41 5970
Chris@41 5971 sysv4)
Chris@41 5972 case $host_vendor in
Chris@41 5973 sni)
Chris@41 5974 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@41 5975 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
Chris@41 5976 ;;
Chris@41 5977 siemens)
Chris@41 5978 ## LD is ld it makes a PLAMLIB
Chris@41 5979 ## CC just makes a GrossModule.
Chris@41 5980 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
Chris@41 5981 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
Chris@41 5982 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@41 5983 ;;
Chris@41 5984 motorola)
Chris@41 5985 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@41 5986 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
Chris@41 5987 ;;
Chris@41 5988 esac
Chris@41 5989 runpath_var='LD_RUN_PATH'
Chris@41 5990 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@41 5991 ;;
Chris@41 5992
Chris@41 5993 sysv4.3*)
Chris@41 5994 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@41 5995 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@41 5996 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
Chris@41 5997 ;;
Chris@41 5998
Chris@41 5999 sysv4*MP*)
Chris@41 6000 if test -d /usr/nec; then
Chris@41 6001 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@41 6002 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@41 6003 runpath_var=LD_RUN_PATH
Chris@41 6004 hardcode_runpath_var=yes
Chris@41 6005 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@41 6006 fi
Chris@41 6007 ;;
Chris@41 6008
Chris@41 6009 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
Chris@41 6010 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
Chris@41 6011 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@41 6012 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@41 6013 runpath_var='LD_RUN_PATH'
Chris@41 6014
Chris@41 6015 if test yes = "$GCC"; then
Chris@41 6016 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@41 6017 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@41 6018 else
Chris@41 6019 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@41 6020 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@41 6021 fi
Chris@41 6022 ;;
Chris@41 6023
Chris@41 6024 sysv5* | sco3.2v5* | sco5v6*)
Chris@41 6025 # Note: We CANNOT use -z defs as we might desire, because we do not
Chris@41 6026 # link with -lc, and that would cause any symbols used from libc to
Chris@41 6027 # always be unresolved, which means just about no library would
Chris@41 6028 # ever link correctly. If we're not using GNU ld we use -z text
Chris@41 6029 # though, which does catch some bad symbols but isn't as heavy-handed
Chris@41 6030 # as -z defs.
Chris@41 6031 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
Chris@41 6032 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
Chris@41 6033 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@41 6034 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@41 6035 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
Chris@41 6036 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
Chris@41 6037 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@41 6038 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
Chris@41 6039 runpath_var='LD_RUN_PATH'
Chris@41 6040
Chris@41 6041 if test yes = "$GCC"; then
Chris@41 6042 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@41 6043 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@41 6044 else
Chris@41 6045 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@41 6046 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@41 6047 fi
Chris@41 6048 ;;
Chris@41 6049
Chris@41 6050 uts4*)
Chris@41 6051 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@41 6052 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@41 6053 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@41 6054 ;;
Chris@41 6055
Chris@41 6056 *)
Chris@41 6057 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 6058 ;;
Chris@41 6059 esac
Chris@41 6060
Chris@41 6061 if test sni = "$host_vendor"; then
Chris@41 6062 case $host in
Chris@41 6063 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
Chris@41 6064 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
Chris@41 6065 ;;
Chris@41 6066 esac
Chris@41 6067 fi
Chris@41 6068 fi
Chris@41 6069 ])
Chris@41 6070 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
Chris@41 6071 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
Chris@41 6072
Chris@41 6073 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
Chris@41 6074
Chris@41 6075 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
Chris@41 6076 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
Chris@41 6077 _LT_DECL([], [extract_expsyms_cmds], [2],
Chris@41 6078 [The commands to extract the exported symbol list from a shared archive])
Chris@41 6079
Chris@41 6080 #
Chris@41 6081 # Do we need to explicitly link libc?
Chris@41 6082 #
Chris@41 6083 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
Chris@41 6084 x|xyes)
Chris@41 6085 # Assume -lc should be added
Chris@41 6086 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
Chris@41 6087
Chris@41 6088 if test yes,yes = "$GCC,$enable_shared"; then
Chris@41 6089 case $_LT_TAGVAR(archive_cmds, $1) in
Chris@41 6090 *'~'*)
Chris@41 6091 # FIXME: we may have to deal with multi-command sequences.
Chris@41 6092 ;;
Chris@41 6093 '$CC '*)
Chris@41 6094 # Test whether the compiler implicitly links with -lc since on some
Chris@41 6095 # systems, -lgcc has to come before -lc. If gcc already passes -lc
Chris@41 6096 # to ld, don't add -lc before -lgcc.
Chris@41 6097 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
Chris@41 6098 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
Chris@41 6099 [$RM conftest*
Chris@41 6100 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
Chris@41 6101
Chris@41 6102 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
Chris@41 6103 soname=conftest
Chris@41 6104 lib=conftest
Chris@41 6105 libobjs=conftest.$ac_objext
Chris@41 6106 deplibs=
Chris@41 6107 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
Chris@41 6108 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
Chris@41 6109 compiler_flags=-v
Chris@41 6110 linker_flags=-v
Chris@41 6111 verstring=
Chris@41 6112 output_objdir=.
Chris@41 6113 libname=conftest
Chris@41 6114 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
Chris@41 6115 _LT_TAGVAR(allow_undefined_flag, $1)=
Chris@41 6116 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
Chris@41 6117 then
Chris@41 6118 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@41 6119 else
Chris@41 6120 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
Chris@41 6121 fi
Chris@41 6122 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
Chris@41 6123 else
Chris@41 6124 cat conftest.err 1>&5
Chris@41 6125 fi
Chris@41 6126 $RM conftest*
Chris@41 6127 ])
Chris@41 6128 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
Chris@41 6129 ;;
Chris@41 6130 esac
Chris@41 6131 fi
Chris@41 6132 ;;
Chris@41 6133 esac
Chris@41 6134
Chris@41 6135 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
Chris@41 6136 [Whether or not to add -lc for building shared libraries])
Chris@41 6137 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
Chris@41 6138 [enable_shared_with_static_runtimes], [0],
Chris@41 6139 [Whether or not to disallow shared libs when runtime libs are static])
Chris@41 6140 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
Chris@41 6141 [Compiler flag to allow reflexive dlopens])
Chris@41 6142 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
Chris@41 6143 [Compiler flag to generate shared objects directly from archives])
Chris@41 6144 _LT_TAGDECL([], [compiler_needs_object], [1],
Chris@41 6145 [Whether the compiler copes with passing no objects directly])
Chris@41 6146 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
Chris@41 6147 [Create an old-style archive from a shared archive])
Chris@41 6148 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
Chris@41 6149 [Create a temporary old-style archive to link instead of a shared archive])
Chris@41 6150 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
Chris@41 6151 _LT_TAGDECL([], [archive_expsym_cmds], [2])
Chris@41 6152 _LT_TAGDECL([], [module_cmds], [2],
Chris@41 6153 [Commands used to build a loadable module if different from building
Chris@41 6154 a shared archive.])
Chris@41 6155 _LT_TAGDECL([], [module_expsym_cmds], [2])
Chris@41 6156 _LT_TAGDECL([], [with_gnu_ld], [1],
Chris@41 6157 [Whether we are building with GNU ld or not])
Chris@41 6158 _LT_TAGDECL([], [allow_undefined_flag], [1],
Chris@41 6159 [Flag that allows shared libraries with undefined symbols to be built])
Chris@41 6160 _LT_TAGDECL([], [no_undefined_flag], [1],
Chris@41 6161 [Flag that enforces no undefined symbols])
Chris@41 6162 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
Chris@41 6163 [Flag to hardcode $libdir into a binary during linking.
Chris@41 6164 This must work even if $libdir does not exist])
Chris@41 6165 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
Chris@41 6166 [Whether we need a single "-rpath" flag with a separated argument])
Chris@41 6167 _LT_TAGDECL([], [hardcode_direct], [0],
Chris@41 6168 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
Chris@41 6169 DIR into the resulting binary])
Chris@41 6170 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
Chris@41 6171 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
Chris@41 6172 DIR into the resulting binary and the resulting library dependency is
Chris@41 6173 "absolute", i.e impossible to change by setting $shlibpath_var if the
Chris@41 6174 library is relocated])
Chris@41 6175 _LT_TAGDECL([], [hardcode_minus_L], [0],
Chris@41 6176 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
Chris@41 6177 into the resulting binary])
Chris@41 6178 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
Chris@41 6179 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
Chris@41 6180 into the resulting binary])
Chris@41 6181 _LT_TAGDECL([], [hardcode_automatic], [0],
Chris@41 6182 [Set to "yes" if building a shared library automatically hardcodes DIR
Chris@41 6183 into the library and all subsequent libraries and executables linked
Chris@41 6184 against it])
Chris@41 6185 _LT_TAGDECL([], [inherit_rpath], [0],
Chris@41 6186 [Set to yes if linker adds runtime paths of dependent libraries
Chris@41 6187 to runtime path list])
Chris@41 6188 _LT_TAGDECL([], [link_all_deplibs], [0],
Chris@41 6189 [Whether libtool must link a program against all its dependency libraries])
Chris@41 6190 _LT_TAGDECL([], [always_export_symbols], [0],
Chris@41 6191 [Set to "yes" if exported symbols are required])
Chris@41 6192 _LT_TAGDECL([], [export_symbols_cmds], [2],
Chris@41 6193 [The commands to list exported symbols])
Chris@41 6194 _LT_TAGDECL([], [exclude_expsyms], [1],
Chris@41 6195 [Symbols that should not be listed in the preloaded symbols])
Chris@41 6196 _LT_TAGDECL([], [include_expsyms], [1],
Chris@41 6197 [Symbols that must always be exported])
Chris@41 6198 _LT_TAGDECL([], [prelink_cmds], [2],
Chris@41 6199 [Commands necessary for linking programs (against libraries) with templates])
Chris@41 6200 _LT_TAGDECL([], [postlink_cmds], [2],
Chris@41 6201 [Commands necessary for finishing linking programs])
Chris@41 6202 _LT_TAGDECL([], [file_list_spec], [1],
Chris@41 6203 [Specify filename containing input files])
Chris@41 6204 dnl FIXME: Not yet implemented
Chris@41 6205 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
Chris@41 6206 dnl [Compiler flag to generate thread safe objects])
Chris@41 6207 ])# _LT_LINKER_SHLIBS
Chris@41 6208
Chris@41 6209
Chris@41 6210 # _LT_LANG_C_CONFIG([TAG])
Chris@41 6211 # ------------------------
Chris@41 6212 # Ensure that the configuration variables for a C compiler are suitably
Chris@41 6213 # defined. These variables are subsequently used by _LT_CONFIG to write
Chris@41 6214 # the compiler configuration to 'libtool'.
Chris@41 6215 m4_defun([_LT_LANG_C_CONFIG],
Chris@41 6216 [m4_require([_LT_DECL_EGREP])dnl
Chris@41 6217 lt_save_CC=$CC
Chris@41 6218 AC_LANG_PUSH(C)
Chris@41 6219
Chris@41 6220 # Source file extension for C test sources.
Chris@41 6221 ac_ext=c
Chris@41 6222
Chris@41 6223 # Object file extension for compiled C test sources.
Chris@41 6224 objext=o
Chris@41 6225 _LT_TAGVAR(objext, $1)=$objext
Chris@41 6226
Chris@41 6227 # Code to be used in simple compile tests
Chris@41 6228 lt_simple_compile_test_code="int some_variable = 0;"
Chris@41 6229
Chris@41 6230 # Code to be used in simple link tests
Chris@41 6231 lt_simple_link_test_code='int main(){return(0);}'
Chris@41 6232
Chris@41 6233 _LT_TAG_COMPILER
Chris@41 6234 # Save the default compiler, since it gets overwritten when the other
Chris@41 6235 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
Chris@41 6236 compiler_DEFAULT=$CC
Chris@41 6237
Chris@41 6238 # save warnings/boilerplate of simple test code
Chris@41 6239 _LT_COMPILER_BOILERPLATE
Chris@41 6240 _LT_LINKER_BOILERPLATE
Chris@41 6241
Chris@41 6242 ## CAVEAT EMPTOR:
Chris@41 6243 ## There is no encapsulation within the following macros, do not change
Chris@41 6244 ## the running order or otherwise move them around unless you know exactly
Chris@41 6245 ## what you are doing...
Chris@41 6246 if test -n "$compiler"; then
Chris@41 6247 _LT_COMPILER_NO_RTTI($1)
Chris@41 6248 _LT_COMPILER_PIC($1)
Chris@41 6249 _LT_COMPILER_C_O($1)
Chris@41 6250 _LT_COMPILER_FILE_LOCKS($1)
Chris@41 6251 _LT_LINKER_SHLIBS($1)
Chris@41 6252 _LT_SYS_DYNAMIC_LINKER($1)
Chris@41 6253 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@41 6254 LT_SYS_DLOPEN_SELF
Chris@41 6255 _LT_CMD_STRIPLIB
Chris@41 6256
Chris@41 6257 # Report what library types will actually be built
Chris@41 6258 AC_MSG_CHECKING([if libtool supports shared libraries])
Chris@41 6259 AC_MSG_RESULT([$can_build_shared])
Chris@41 6260
Chris@41 6261 AC_MSG_CHECKING([whether to build shared libraries])
Chris@41 6262 test no = "$can_build_shared" && enable_shared=no
Chris@41 6263
Chris@41 6264 # On AIX, shared libraries and static libraries use the same namespace, and
Chris@41 6265 # are all built from PIC.
Chris@41 6266 case $host_os in
Chris@41 6267 aix3*)
Chris@41 6268 test yes = "$enable_shared" && enable_static=no
Chris@41 6269 if test -n "$RANLIB"; then
Chris@41 6270 archive_cmds="$archive_cmds~\$RANLIB \$lib"
Chris@41 6271 postinstall_cmds='$RANLIB $lib'
Chris@41 6272 fi
Chris@41 6273 ;;
Chris@41 6274
Chris@41 6275 aix[[4-9]]*)
Chris@41 6276 if test ia64 != "$host_cpu"; then
Chris@41 6277 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
Chris@41 6278 yes,aix,yes) ;; # shared object as lib.so file only
Chris@41 6279 yes,svr4,*) ;; # shared object as lib.so archive member only
Chris@41 6280 yes,*) enable_static=no ;; # shared object in lib.a archive as well
Chris@41 6281 esac
Chris@41 6282 fi
Chris@41 6283 ;;
Chris@41 6284 esac
Chris@41 6285 AC_MSG_RESULT([$enable_shared])
Chris@41 6286
Chris@41 6287 AC_MSG_CHECKING([whether to build static libraries])
Chris@41 6288 # Make sure either enable_shared or enable_static is yes.
Chris@41 6289 test yes = "$enable_shared" || enable_static=yes
Chris@41 6290 AC_MSG_RESULT([$enable_static])
Chris@41 6291
Chris@41 6292 _LT_CONFIG($1)
Chris@41 6293 fi
Chris@41 6294 AC_LANG_POP
Chris@41 6295 CC=$lt_save_CC
Chris@41 6296 ])# _LT_LANG_C_CONFIG
Chris@41 6297
Chris@41 6298
Chris@41 6299 # _LT_LANG_CXX_CONFIG([TAG])
Chris@41 6300 # --------------------------
Chris@41 6301 # Ensure that the configuration variables for a C++ compiler are suitably
Chris@41 6302 # defined. These variables are subsequently used by _LT_CONFIG to write
Chris@41 6303 # the compiler configuration to 'libtool'.
Chris@41 6304 m4_defun([_LT_LANG_CXX_CONFIG],
Chris@41 6305 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@41 6306 m4_require([_LT_DECL_EGREP])dnl
Chris@41 6307 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
Chris@41 6308 if test -n "$CXX" && ( test no != "$CXX" &&
Chris@41 6309 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
Chris@41 6310 (test g++ != "$CXX"))); then
Chris@41 6311 AC_PROG_CXXCPP
Chris@41 6312 else
Chris@41 6313 _lt_caught_CXX_error=yes
Chris@41 6314 fi
Chris@41 6315
Chris@41 6316 AC_LANG_PUSH(C++)
Chris@41 6317 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@41 6318 _LT_TAGVAR(allow_undefined_flag, $1)=
Chris@41 6319 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@41 6320 _LT_TAGVAR(archive_expsym_cmds, $1)=
Chris@41 6321 _LT_TAGVAR(compiler_needs_object, $1)=no
Chris@41 6322 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@41 6323 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@41 6324 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@41 6325 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@41 6326 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@41 6327 _LT_TAGVAR(hardcode_minus_L, $1)=no
Chris@41 6328 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
Chris@41 6329 _LT_TAGVAR(hardcode_automatic, $1)=no
Chris@41 6330 _LT_TAGVAR(inherit_rpath, $1)=no
Chris@41 6331 _LT_TAGVAR(module_cmds, $1)=
Chris@41 6332 _LT_TAGVAR(module_expsym_cmds, $1)=
Chris@41 6333 _LT_TAGVAR(link_all_deplibs, $1)=unknown
Chris@41 6334 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@41 6335 _LT_TAGVAR(reload_flag, $1)=$reload_flag
Chris@41 6336 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
Chris@41 6337 _LT_TAGVAR(no_undefined_flag, $1)=
Chris@41 6338 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@41 6339 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
Chris@41 6340
Chris@41 6341 # Source file extension for C++ test sources.
Chris@41 6342 ac_ext=cpp
Chris@41 6343
Chris@41 6344 # Object file extension for compiled C++ test sources.
Chris@41 6345 objext=o
Chris@41 6346 _LT_TAGVAR(objext, $1)=$objext
Chris@41 6347
Chris@41 6348 # No sense in running all these tests if we already determined that
Chris@41 6349 # the CXX compiler isn't working. Some variables (like enable_shared)
Chris@41 6350 # are currently assumed to apply to all compilers on this platform,
Chris@41 6351 # and will be corrupted by setting them based on a non-working compiler.
Chris@41 6352 if test yes != "$_lt_caught_CXX_error"; then
Chris@41 6353 # Code to be used in simple compile tests
Chris@41 6354 lt_simple_compile_test_code="int some_variable = 0;"
Chris@41 6355
Chris@41 6356 # Code to be used in simple link tests
Chris@41 6357 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
Chris@41 6358
Chris@41 6359 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@41 6360 _LT_TAG_COMPILER
Chris@41 6361
Chris@41 6362 # save warnings/boilerplate of simple test code
Chris@41 6363 _LT_COMPILER_BOILERPLATE
Chris@41 6364 _LT_LINKER_BOILERPLATE
Chris@41 6365
Chris@41 6366 # Allow CC to be a program name with arguments.
Chris@41 6367 lt_save_CC=$CC
Chris@41 6368 lt_save_CFLAGS=$CFLAGS
Chris@41 6369 lt_save_LD=$LD
Chris@41 6370 lt_save_GCC=$GCC
Chris@41 6371 GCC=$GXX
Chris@41 6372 lt_save_with_gnu_ld=$with_gnu_ld
Chris@41 6373 lt_save_path_LD=$lt_cv_path_LD
Chris@41 6374 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
Chris@41 6375 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
Chris@41 6376 else
Chris@41 6377 $as_unset lt_cv_prog_gnu_ld
Chris@41 6378 fi
Chris@41 6379 if test -n "${lt_cv_path_LDCXX+set}"; then
Chris@41 6380 lt_cv_path_LD=$lt_cv_path_LDCXX
Chris@41 6381 else
Chris@41 6382 $as_unset lt_cv_path_LD
Chris@41 6383 fi
Chris@41 6384 test -z "${LDCXX+set}" || LD=$LDCXX
Chris@41 6385 CC=${CXX-"c++"}
Chris@41 6386 CFLAGS=$CXXFLAGS
Chris@41 6387 compiler=$CC
Chris@41 6388 _LT_TAGVAR(compiler, $1)=$CC
Chris@41 6389 _LT_CC_BASENAME([$compiler])
Chris@41 6390
Chris@41 6391 if test -n "$compiler"; then
Chris@41 6392 # We don't want -fno-exception when compiling C++ code, so set the
Chris@41 6393 # no_builtin_flag separately
Chris@41 6394 if test yes = "$GXX"; then
Chris@41 6395 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
Chris@41 6396 else
Chris@41 6397 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
Chris@41 6398 fi
Chris@41 6399
Chris@41 6400 if test yes = "$GXX"; then
Chris@41 6401 # Set up default GNU C++ configuration
Chris@41 6402
Chris@41 6403 LT_PATH_LD
Chris@41 6404
Chris@41 6405 # Check if GNU C++ uses GNU ld as the underlying linker, since the
Chris@41 6406 # archiving commands below assume that GNU ld is being used.
Chris@41 6407 if test yes = "$with_gnu_ld"; then
Chris@41 6408 _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@41 6409 _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@41 6410
Chris@41 6411 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@41 6412 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
Chris@41 6413
Chris@41 6414 # If archive_cmds runs LD, not CC, wlarc should be empty
Chris@41 6415 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
Chris@41 6416 # investigate it a little bit more. (MM)
Chris@41 6417 wlarc='$wl'
Chris@41 6418
Chris@41 6419 # ancient GNU ld didn't support --whole-archive et. al.
Chris@41 6420 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
Chris@41 6421 $GREP 'no-whole-archive' > /dev/null; then
Chris@41 6422 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
Chris@41 6423 else
Chris@41 6424 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@41 6425 fi
Chris@41 6426 else
Chris@41 6427 with_gnu_ld=no
Chris@41 6428 wlarc=
Chris@41 6429
Chris@41 6430 # A generic and very simple default shared library creation
Chris@41 6431 # command for GNU C++ for the case where it uses the native
Chris@41 6432 # linker, instead of GNU ld. If possible, this setting should
Chris@41 6433 # overridden to take advantage of the native linker features on
Chris@41 6434 # the platform it is being used on.
Chris@41 6435 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
Chris@41 6436 fi
Chris@41 6437
Chris@41 6438 # Commands to make compiler produce verbose output that lists
Chris@41 6439 # what "hidden" libraries, object files and flags are used when
Chris@41 6440 # linking a shared library.
Chris@41 6441 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
Chris@41 6442
Chris@41 6443 else
Chris@41 6444 GXX=no
Chris@41 6445 with_gnu_ld=no
Chris@41 6446 wlarc=
Chris@41 6447 fi
Chris@41 6448
Chris@41 6449 # PORTME: fill in a description of your system's C++ link characteristics
Chris@41 6450 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
Chris@41 6451 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@41 6452 case $host_os in
Chris@41 6453 aix3*)
Chris@41 6454 # FIXME: insert proper C++ library support
Chris@41 6455 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 6456 ;;
Chris@41 6457 aix[[4-9]]*)
Chris@41 6458 if test ia64 = "$host_cpu"; then
Chris@41 6459 # On IA64, the linker does run time linking by default, so we don't
Chris@41 6460 # have to do anything special.
Chris@41 6461 aix_use_runtimelinking=no
Chris@41 6462 exp_sym_flag='-Bexport'
Chris@41 6463 no_entry_flag=
Chris@41 6464 else
Chris@41 6465 aix_use_runtimelinking=no
Chris@41 6466
Chris@41 6467 # Test if we are trying to use run time linking or normal
Chris@41 6468 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
Chris@41 6469 # have runtime linking enabled, and use it for executables.
Chris@41 6470 # For shared libraries, we enable/disable runtime linking
Chris@41 6471 # depending on the kind of the shared library created -
Chris@41 6472 # when "with_aix_soname,aix_use_runtimelinking" is:
Chris@41 6473 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
Chris@41 6474 # "aix,yes" lib.so shared, rtl:yes, for executables
Chris@41 6475 # lib.a static archive
Chris@41 6476 # "both,no" lib.so.V(shr.o) shared, rtl:yes
Chris@41 6477 # lib.a(lib.so.V) shared, rtl:no, for executables
Chris@41 6478 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
Chris@41 6479 # lib.a(lib.so.V) shared, rtl:no
Chris@41 6480 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
Chris@41 6481 # lib.a static archive
Chris@41 6482 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
Chris@41 6483 for ld_flag in $LDFLAGS; do
Chris@41 6484 case $ld_flag in
Chris@41 6485 *-brtl*)
Chris@41 6486 aix_use_runtimelinking=yes
Chris@41 6487 break
Chris@41 6488 ;;
Chris@41 6489 esac
Chris@41 6490 done
Chris@41 6491 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
Chris@41 6492 # With aix-soname=svr4, we create the lib.so.V shared archives only,
Chris@41 6493 # so we don't have lib.a shared libs to link our executables.
Chris@41 6494 # We have to force runtime linking in this case.
Chris@41 6495 aix_use_runtimelinking=yes
Chris@41 6496 LDFLAGS="$LDFLAGS -Wl,-brtl"
Chris@41 6497 fi
Chris@41 6498 ;;
Chris@41 6499 esac
Chris@41 6500
Chris@41 6501 exp_sym_flag='-bexport'
Chris@41 6502 no_entry_flag='-bnoentry'
Chris@41 6503 fi
Chris@41 6504
Chris@41 6505 # When large executables or shared objects are built, AIX ld can
Chris@41 6506 # have problems creating the table of contents. If linking a library
Chris@41 6507 # or program results in "error TOC overflow" add -mminimal-toc to
Chris@41 6508 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
Chris@41 6509 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
Chris@41 6510
Chris@41 6511 _LT_TAGVAR(archive_cmds, $1)=''
Chris@41 6512 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@41 6513 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@41 6514 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
Chris@41 6515 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@41 6516 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
Chris@41 6517 case $with_aix_soname,$aix_use_runtimelinking in
Chris@41 6518 aix,*) ;; # no import file
Chris@41 6519 svr4,* | *,yes) # use import file
Chris@41 6520 # The Import File defines what to hardcode.
Chris@41 6521 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@41 6522 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@41 6523 ;;
Chris@41 6524 esac
Chris@41 6525
Chris@41 6526 if test yes = "$GXX"; then
Chris@41 6527 case $host_os in aix4.[[012]]|aix4.[[012]].*)
Chris@41 6528 # We only want to do this on AIX 4.2 and lower, the check
Chris@41 6529 # below for broken collect2 doesn't work under 4.3+
Chris@41 6530 collect2name=`$CC -print-prog-name=collect2`
Chris@41 6531 if test -f "$collect2name" &&
Chris@41 6532 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
Chris@41 6533 then
Chris@41 6534 # We have reworked collect2
Chris@41 6535 :
Chris@41 6536 else
Chris@41 6537 # We have old collect2
Chris@41 6538 _LT_TAGVAR(hardcode_direct, $1)=unsupported
Chris@41 6539 # It fails to find uninstalled libraries when the uninstalled
Chris@41 6540 # path is not listed in the libpath. Setting hardcode_minus_L
Chris@41 6541 # to unsupported forces relinking
Chris@41 6542 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@41 6543 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@41 6544 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@41 6545 fi
Chris@41 6546 esac
Chris@41 6547 shared_flag='-shared'
Chris@41 6548 if test yes = "$aix_use_runtimelinking"; then
Chris@41 6549 shared_flag=$shared_flag' $wl-G'
Chris@41 6550 fi
Chris@41 6551 # Need to ensure runtime linking is disabled for the traditional
Chris@41 6552 # shared library, or the linker may eventually find shared libraries
Chris@41 6553 # /with/ Import File - we do not want to mix them.
Chris@41 6554 shared_flag_aix='-shared'
Chris@41 6555 shared_flag_svr4='-shared $wl-G'
Chris@41 6556 else
Chris@41 6557 # not using gcc
Chris@41 6558 if test ia64 = "$host_cpu"; then
Chris@41 6559 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
Chris@41 6560 # chokes on -Wl,-G. The following line is correct:
Chris@41 6561 shared_flag='-G'
Chris@41 6562 else
Chris@41 6563 if test yes = "$aix_use_runtimelinking"; then
Chris@41 6564 shared_flag='$wl-G'
Chris@41 6565 else
Chris@41 6566 shared_flag='$wl-bM:SRE'
Chris@41 6567 fi
Chris@41 6568 shared_flag_aix='$wl-bM:SRE'
Chris@41 6569 shared_flag_svr4='$wl-G'
Chris@41 6570 fi
Chris@41 6571 fi
Chris@41 6572
Chris@41 6573 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
Chris@41 6574 # It seems that -bexpall does not export symbols beginning with
Chris@41 6575 # underscore (_), so it is better to generate a list of symbols to
Chris@41 6576 # export.
Chris@41 6577 _LT_TAGVAR(always_export_symbols, $1)=yes
Chris@41 6578 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
Chris@41 6579 # Warning - without using the other runtime loading flags (-brtl),
Chris@41 6580 # -berok will link without error, but may produce a broken library.
Chris@41 6581 # The "-G" linker flag allows undefined symbols.
Chris@41 6582 _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
Chris@41 6583 # Determine the default libpath from the value encoded in an empty
Chris@41 6584 # executable.
Chris@41 6585 _LT_SYS_MODULE_PATH_AIX([$1])
Chris@41 6586 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
Chris@41 6587
Chris@41 6588 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
Chris@41 6589 else
Chris@41 6590 if test ia64 = "$host_cpu"; then
Chris@41 6591 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
Chris@41 6592 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
Chris@41 6593 _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@41 6594 else
Chris@41 6595 # Determine the default libpath from the value encoded in an
Chris@41 6596 # empty executable.
Chris@41 6597 _LT_SYS_MODULE_PATH_AIX([$1])
Chris@41 6598 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
Chris@41 6599 # Warning - without using the other run time loading flags,
Chris@41 6600 # -berok will link without error, but may produce a broken library.
Chris@41 6601 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
Chris@41 6602 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
Chris@41 6603 if test yes = "$with_gnu_ld"; then
Chris@41 6604 # We only use this code for GNU lds that support --whole-archive.
Chris@41 6605 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
Chris@41 6606 else
Chris@41 6607 # Exported symbols can be pulled into shared objects from archives
Chris@41 6608 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
Chris@41 6609 fi
Chris@41 6610 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
Chris@41 6611 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
Chris@41 6612 # -brtl affects multiple linker settings, -berok does not and is overridden later
Chris@41 6613 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
Chris@41 6614 if test svr4 != "$with_aix_soname"; then
Chris@41 6615 # This is similar to how AIX traditionally builds its shared
Chris@41 6616 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
Chris@41 6617 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
Chris@41 6618 fi
Chris@41 6619 if test aix != "$with_aix_soname"; then
Chris@41 6620 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
Chris@41 6621 else
Chris@41 6622 # used by -dlpreopen to get the symbols
Chris@41 6623 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
Chris@41 6624 fi
Chris@41 6625 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
Chris@41 6626 fi
Chris@41 6627 fi
Chris@41 6628 ;;
Chris@41 6629
Chris@41 6630 beos*)
Chris@41 6631 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
Chris@41 6632 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@41 6633 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
Chris@41 6634 # support --undefined. This deserves some investigation. FIXME
Chris@41 6635 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@41 6636 else
Chris@41 6637 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 6638 fi
Chris@41 6639 ;;
Chris@41 6640
Chris@41 6641 chorus*)
Chris@41 6642 case $cc_basename in
Chris@41 6643 *)
Chris@41 6644 # FIXME: insert proper C++ library support
Chris@41 6645 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 6646 ;;
Chris@41 6647 esac
Chris@41 6648 ;;
Chris@41 6649
Chris@41 6650 cygwin* | mingw* | pw32* | cegcc*)
Chris@41 6651 case $GXX,$cc_basename in
Chris@41 6652 ,cl* | no,cl*)
Chris@41 6653 # Native MSVC
Chris@41 6654 # hardcode_libdir_flag_spec is actually meaningless, as there is
Chris@41 6655 # no search path for DLLs.
Chris@41 6656 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
Chris@41 6657 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@41 6658 _LT_TAGVAR(always_export_symbols, $1)=yes
Chris@41 6659 _LT_TAGVAR(file_list_spec, $1)='@'
Chris@41 6660 # Tell ltmain to make .lib files, not .a files.
Chris@41 6661 libext=lib
Chris@41 6662 # Tell ltmain to make .dll files, not .so files.
Chris@41 6663 shrext_cmds=.dll
Chris@41 6664 # FIXME: Setting linknames here is a bad hack.
Chris@41 6665 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
Chris@41 6666 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
Chris@41 6667 cp "$export_symbols" "$output_objdir/$soname.def";
Chris@41 6668 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
Chris@41 6669 else
Chris@41 6670 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
Chris@41 6671 fi~
Chris@41 6672 $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@41 6673 linknames='
Chris@41 6674 # The linker will not automatically build a static lib if we build a DLL.
Chris@41 6675 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
Chris@41 6676 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@41 6677 # Don't use ranlib
Chris@41 6678 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
Chris@41 6679 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
Chris@41 6680 lt_tool_outputfile="@TOOL_OUTPUT@"~
Chris@41 6681 case $lt_outputfile in
Chris@41 6682 *.exe|*.EXE) ;;
Chris@41 6683 *)
Chris@41 6684 lt_outputfile=$lt_outputfile.exe
Chris@41 6685 lt_tool_outputfile=$lt_tool_outputfile.exe
Chris@41 6686 ;;
Chris@41 6687 esac~
Chris@41 6688 func_to_tool_file "$lt_outputfile"~
Chris@41 6689 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
Chris@41 6690 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
Chris@41 6691 $RM "$lt_outputfile.manifest";
Chris@41 6692 fi'
Chris@41 6693 ;;
Chris@41 6694 *)
Chris@41 6695 # g++
Chris@41 6696 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
Chris@41 6697 # as there is no search path for DLLs.
Chris@41 6698 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@41 6699 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
Chris@41 6700 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@41 6701 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@41 6702 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@41 6703
Chris@41 6704 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
Chris@41 6705 _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@41 6706 # If the export-symbols file already is a .def file, use it as
Chris@41 6707 # is; otherwise, prepend EXPORTS...
Chris@41 6708 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
Chris@41 6709 cp $export_symbols $output_objdir/$soname.def;
Chris@41 6710 else
Chris@41 6711 echo EXPORTS > $output_objdir/$soname.def;
Chris@41 6712 cat $export_symbols >> $output_objdir/$soname.def;
Chris@41 6713 fi~
Chris@41 6714 $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@41 6715 else
Chris@41 6716 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 6717 fi
Chris@41 6718 ;;
Chris@41 6719 esac
Chris@41 6720 ;;
Chris@41 6721 darwin* | rhapsody*)
Chris@41 6722 _LT_DARWIN_LINKER_FEATURES($1)
Chris@41 6723 ;;
Chris@41 6724
Chris@41 6725 os2*)
Chris@41 6726 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@41 6727 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@41 6728 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@41 6729 shrext_cmds=.dll
Chris@41 6730 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
Chris@41 6731 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
Chris@41 6732 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
Chris@41 6733 $ECHO EXPORTS >> $output_objdir/$libname.def~
Chris@41 6734 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
Chris@41 6735 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
Chris@41 6736 emximp -o $lib $output_objdir/$libname.def'
Chris@41 6737 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
Chris@41 6738 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
Chris@41 6739 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
Chris@41 6740 $ECHO EXPORTS >> $output_objdir/$libname.def~
Chris@41 6741 prefix_cmds="$SED"~
Chris@41 6742 if test EXPORTS = "`$SED 1q $export_symbols`"; then
Chris@41 6743 prefix_cmds="$prefix_cmds -e 1d";
Chris@41 6744 fi~
Chris@41 6745 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
Chris@41 6746 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
Chris@41 6747 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
Chris@41 6748 emximp -o $lib $output_objdir/$libname.def'
Chris@41 6749 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
Chris@41 6750 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@41 6751 ;;
Chris@41 6752
Chris@41 6753 dgux*)
Chris@41 6754 case $cc_basename in
Chris@41 6755 ec++*)
Chris@41 6756 # FIXME: insert proper C++ library support
Chris@41 6757 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 6758 ;;
Chris@41 6759 ghcx*)
Chris@41 6760 # Green Hills C++ Compiler
Chris@41 6761 # FIXME: insert proper C++ library support
Chris@41 6762 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 6763 ;;
Chris@41 6764 *)
Chris@41 6765 # FIXME: insert proper C++ library support
Chris@41 6766 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 6767 ;;
Chris@41 6768 esac
Chris@41 6769 ;;
Chris@41 6770
Chris@41 6771 freebsd2.*)
Chris@41 6772 # C++ shared libraries reported to be fairly broken before
Chris@41 6773 # switch to ELF
Chris@41 6774 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 6775 ;;
Chris@41 6776
Chris@41 6777 freebsd-elf*)
Chris@41 6778 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@41 6779 ;;
Chris@41 6780
Chris@41 6781 freebsd* | dragonfly*)
Chris@41 6782 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
Chris@41 6783 # conventions
Chris@41 6784 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@41 6785 ;;
Chris@41 6786
Chris@41 6787 haiku*)
Chris@41 6788 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@41 6789 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@41 6790 ;;
Chris@41 6791
Chris@41 6792 hpux9*)
Chris@41 6793 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
Chris@41 6794 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@41 6795 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@41 6796 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@41 6797 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
Chris@41 6798 # but as the default
Chris@41 6799 # location of the library.
Chris@41 6800
Chris@41 6801 case $cc_basename in
Chris@41 6802 CC*)
Chris@41 6803 # FIXME: insert proper C++ library support
Chris@41 6804 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 6805 ;;
Chris@41 6806 aCC*)
Chris@41 6807 _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
Chris@41 6808 # Commands to make compiler produce verbose output that lists
Chris@41 6809 # what "hidden" libraries, object files and flags are used when
Chris@41 6810 # linking a shared library.
Chris@41 6811 #
Chris@41 6812 # There doesn't appear to be a way to prevent this compiler from
Chris@41 6813 # explicitly linking system object files so we need to strip them
Chris@41 6814 # from the output so that they don't get included in the library
Chris@41 6815 # dependencies.
Chris@41 6816 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@41 6817 ;;
Chris@41 6818 *)
Chris@41 6819 if test yes = "$GXX"; then
Chris@41 6820 _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
Chris@41 6821 else
Chris@41 6822 # FIXME: insert proper C++ library support
Chris@41 6823 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 6824 fi
Chris@41 6825 ;;
Chris@41 6826 esac
Chris@41 6827 ;;
Chris@41 6828
Chris@41 6829 hpux10*|hpux11*)
Chris@41 6830 if test no = "$with_gnu_ld"; then
Chris@41 6831 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
Chris@41 6832 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@41 6833
Chris@41 6834 case $host_cpu in
Chris@41 6835 hppa*64*|ia64*)
Chris@41 6836 ;;
Chris@41 6837 *)
Chris@41 6838 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@41 6839 ;;
Chris@41 6840 esac
Chris@41 6841 fi
Chris@41 6842 case $host_cpu in
Chris@41 6843 hppa*64*|ia64*)
Chris@41 6844 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@41 6845 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@41 6846 ;;
Chris@41 6847 *)
Chris@41 6848 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@41 6849 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@41 6850 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
Chris@41 6851 # but as the default
Chris@41 6852 # location of the library.
Chris@41 6853 ;;
Chris@41 6854 esac
Chris@41 6855
Chris@41 6856 case $cc_basename in
Chris@41 6857 CC*)
Chris@41 6858 # FIXME: insert proper C++ library support
Chris@41 6859 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 6860 ;;
Chris@41 6861 aCC*)
Chris@41 6862 case $host_cpu in
Chris@41 6863 hppa*64*)
Chris@41 6864 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@41 6865 ;;
Chris@41 6866 ia64*)
Chris@41 6867 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@41 6868 ;;
Chris@41 6869 *)
Chris@41 6870 _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@41 6871 ;;
Chris@41 6872 esac
Chris@41 6873 # Commands to make compiler produce verbose output that lists
Chris@41 6874 # what "hidden" libraries, object files and flags are used when
Chris@41 6875 # linking a shared library.
Chris@41 6876 #
Chris@41 6877 # There doesn't appear to be a way to prevent this compiler from
Chris@41 6878 # explicitly linking system object files so we need to strip them
Chris@41 6879 # from the output so that they don't get included in the library
Chris@41 6880 # dependencies.
Chris@41 6881 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@41 6882 ;;
Chris@41 6883 *)
Chris@41 6884 if test yes = "$GXX"; then
Chris@41 6885 if test no = "$with_gnu_ld"; then
Chris@41 6886 case $host_cpu in
Chris@41 6887 hppa*64*)
Chris@41 6888 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@41 6889 ;;
Chris@41 6890 ia64*)
Chris@41 6891 _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@41 6892 ;;
Chris@41 6893 *)
Chris@41 6894 _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@41 6895 ;;
Chris@41 6896 esac
Chris@41 6897 fi
Chris@41 6898 else
Chris@41 6899 # FIXME: insert proper C++ library support
Chris@41 6900 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 6901 fi
Chris@41 6902 ;;
Chris@41 6903 esac
Chris@41 6904 ;;
Chris@41 6905
Chris@41 6906 interix[[3-9]]*)
Chris@41 6907 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@41 6908 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@41 6909 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@41 6910 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@41 6911 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
Chris@41 6912 # Instead, shared libraries are loaded at an image base (0x10000000 by
Chris@41 6913 # default) and relocated if they conflict, which is a slow very memory
Chris@41 6914 # consuming and fragmenting process. To avoid this, we pick a random,
Chris@41 6915 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
Chris@41 6916 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
Chris@41 6917 _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@41 6918 _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@41 6919 ;;
Chris@41 6920 irix5* | irix6*)
Chris@41 6921 case $cc_basename in
Chris@41 6922 CC*)
Chris@41 6923 # SGI C++
Chris@41 6924 _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@41 6925
Chris@41 6926 # Archives containing C++ object files must be created using
Chris@41 6927 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
Chris@41 6928 # necessary to make sure instantiated templates are included
Chris@41 6929 # in the archive.
Chris@41 6930 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
Chris@41 6931 ;;
Chris@41 6932 *)
Chris@41 6933 if test yes = "$GXX"; then
Chris@41 6934 if test no = "$with_gnu_ld"; then
Chris@41 6935 _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@41 6936 else
Chris@41 6937 _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@41 6938 fi
Chris@41 6939 fi
Chris@41 6940 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@41 6941 ;;
Chris@41 6942 esac
Chris@41 6943 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@41 6944 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@41 6945 _LT_TAGVAR(inherit_rpath, $1)=yes
Chris@41 6946 ;;
Chris@41 6947
Chris@41 6948 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
Chris@41 6949 case $cc_basename in
Chris@41 6950 KCC*)
Chris@41 6951 # Kuck and Associates, Inc. (KAI) C++ Compiler
Chris@41 6952
Chris@41 6953 # KCC will only create a shared library if the output file
Chris@41 6954 # ends with ".so" (or ".sl" for HP-UX), so rename the library
Chris@41 6955 # to its proper name (with version) after linking.
Chris@41 6956 _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@41 6957 _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@41 6958 # Commands to make compiler produce verbose output that lists
Chris@41 6959 # what "hidden" libraries, object files and flags are used when
Chris@41 6960 # linking a shared library.
Chris@41 6961 #
Chris@41 6962 # There doesn't appear to be a way to prevent this compiler from
Chris@41 6963 # explicitly linking system object files so we need to strip them
Chris@41 6964 # from the output so that they don't get included in the library
Chris@41 6965 # dependencies.
Chris@41 6966 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@41 6967
Chris@41 6968 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@41 6969 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
Chris@41 6970
Chris@41 6971 # Archives containing C++ object files must be created using
Chris@41 6972 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
Chris@41 6973 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
Chris@41 6974 ;;
Chris@41 6975 icpc* | ecpc* )
Chris@41 6976 # Intel C++
Chris@41 6977 with_gnu_ld=yes
Chris@41 6978 # version 8.0 and above of icpc choke on multiply defined symbols
Chris@41 6979 # if we add $predep_objects and $postdep_objects, however 7.1 and
Chris@41 6980 # earlier do not add the objects themselves.
Chris@41 6981 case `$CC -V 2>&1` in
Chris@41 6982 *"Version 7."*)
Chris@41 6983 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@41 6984 _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@41 6985 ;;
Chris@41 6986 *) # Version 8.0 or newer
Chris@41 6987 tmp_idyn=
Chris@41 6988 case $host_cpu in
Chris@41 6989 ia64*) tmp_idyn=' -i_dynamic';;
Chris@41 6990 esac
Chris@41 6991 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@41 6992 _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@41 6993 ;;
Chris@41 6994 esac
Chris@41 6995 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@41 6996 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@41 6997 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
Chris@41 6998 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
Chris@41 6999 ;;
Chris@41 7000 pgCC* | pgcpp*)
Chris@41 7001 # Portland Group C++ compiler
Chris@41 7002 case `$CC -V` in
Chris@41 7003 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
Chris@41 7004 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
Chris@41 7005 rm -rf $tpldir~
Chris@41 7006 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
Chris@41 7007 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
Chris@41 7008 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
Chris@41 7009 rm -rf $tpldir~
Chris@41 7010 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
Chris@41 7011 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
Chris@41 7012 $RANLIB $oldlib'
Chris@41 7013 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
Chris@41 7014 rm -rf $tpldir~
Chris@41 7015 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
Chris@41 7016 $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@41 7017 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
Chris@41 7018 rm -rf $tpldir~
Chris@41 7019 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
Chris@41 7020 $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@41 7021 ;;
Chris@41 7022 *) # Version 6 and above use weak symbols
Chris@41 7023 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@41 7024 _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@41 7025 ;;
Chris@41 7026 esac
Chris@41 7027
Chris@41 7028 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
Chris@41 7029 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
Chris@41 7030 _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@41 7031 ;;
Chris@41 7032 cxx*)
Chris@41 7033 # Compaq C++
Chris@41 7034 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@41 7035 _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@41 7036
Chris@41 7037 runpath_var=LD_RUN_PATH
Chris@41 7038 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
Chris@41 7039 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@41 7040
Chris@41 7041 # Commands to make compiler produce verbose output that lists
Chris@41 7042 # what "hidden" libraries, object files and flags are used when
Chris@41 7043 # linking a shared library.
Chris@41 7044 #
Chris@41 7045 # There doesn't appear to be a way to prevent this compiler from
Chris@41 7046 # explicitly linking system object files so we need to strip them
Chris@41 7047 # from the output so that they don't get included in the library
Chris@41 7048 # dependencies.
Chris@41 7049 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@41 7050 ;;
Chris@41 7051 xl* | mpixl* | bgxl*)
Chris@41 7052 # IBM XL 8.0 on PPC, with GNU ld
Chris@41 7053 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@41 7054 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
Chris@41 7055 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@41 7056 if test yes = "$supports_anon_versioning"; then
Chris@41 7057 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
Chris@41 7058 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
Chris@41 7059 echo "local: *; };" >> $output_objdir/$libname.ver~
Chris@41 7060 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
Chris@41 7061 fi
Chris@41 7062 ;;
Chris@41 7063 *)
Chris@41 7064 case `$CC -V 2>&1 | sed 5q` in
Chris@41 7065 *Sun\ C*)
Chris@41 7066 # Sun C++ 5.9
Chris@41 7067 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
Chris@41 7068 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@41 7069 _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@41 7070 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@41 7071 _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@41 7072 _LT_TAGVAR(compiler_needs_object, $1)=yes
Chris@41 7073
Chris@41 7074 # Not sure whether something based on
Chris@41 7075 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
Chris@41 7076 # would be better.
Chris@41 7077 output_verbose_link_cmd='func_echo_all'
Chris@41 7078
Chris@41 7079 # Archives containing C++ object files must be created using
Chris@41 7080 # "CC -xar", where "CC" is the Sun C++ compiler. This is
Chris@41 7081 # necessary to make sure instantiated templates are included
Chris@41 7082 # in the archive.
Chris@41 7083 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
Chris@41 7084 ;;
Chris@41 7085 esac
Chris@41 7086 ;;
Chris@41 7087 esac
Chris@41 7088 ;;
Chris@41 7089
Chris@41 7090 lynxos*)
Chris@41 7091 # FIXME: insert proper C++ library support
Chris@41 7092 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 7093 ;;
Chris@41 7094
Chris@41 7095 m88k*)
Chris@41 7096 # FIXME: insert proper C++ library support
Chris@41 7097 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 7098 ;;
Chris@41 7099
Chris@41 7100 mvs*)
Chris@41 7101 case $cc_basename in
Chris@41 7102 cxx*)
Chris@41 7103 # FIXME: insert proper C++ library support
Chris@41 7104 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 7105 ;;
Chris@41 7106 *)
Chris@41 7107 # FIXME: insert proper C++ library support
Chris@41 7108 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 7109 ;;
Chris@41 7110 esac
Chris@41 7111 ;;
Chris@41 7112
Chris@41 7113 netbsd*)
Chris@41 7114 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
Chris@41 7115 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
Chris@41 7116 wlarc=
Chris@41 7117 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@41 7118 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@41 7119 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@41 7120 fi
Chris@41 7121 # Workaround some broken pre-1.5 toolchains
Chris@41 7122 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
Chris@41 7123 ;;
Chris@41 7124
Chris@41 7125 *nto* | *qnx*)
Chris@41 7126 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@41 7127 ;;
Chris@41 7128
Chris@41 7129 openbsd* | bitrig*)
Chris@41 7130 if test -f /usr/libexec/ld.so; then
Chris@41 7131 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@41 7132 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@41 7133 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@41 7134 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
Chris@41 7135 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@41 7136 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
Chris@41 7137 _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@41 7138 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@41 7139 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
Chris@41 7140 fi
Chris@41 7141 output_verbose_link_cmd=func_echo_all
Chris@41 7142 else
Chris@41 7143 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 7144 fi
Chris@41 7145 ;;
Chris@41 7146
Chris@41 7147 osf3* | osf4* | osf5*)
Chris@41 7148 case $cc_basename in
Chris@41 7149 KCC*)
Chris@41 7150 # Kuck and Associates, Inc. (KAI) C++ Compiler
Chris@41 7151
Chris@41 7152 # KCC will only create a shared library if the output file
Chris@41 7153 # ends with ".so" (or ".sl" for HP-UX), so rename the library
Chris@41 7154 # to its proper name (with version) after linking.
Chris@41 7155 _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@41 7156
Chris@41 7157 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@41 7158 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@41 7159
Chris@41 7160 # Archives containing C++ object files must be created using
Chris@41 7161 # the KAI C++ compiler.
Chris@41 7162 case $host in
Chris@41 7163 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
Chris@41 7164 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
Chris@41 7165 esac
Chris@41 7166 ;;
Chris@41 7167 RCC*)
Chris@41 7168 # Rational C++ 2.4.1
Chris@41 7169 # FIXME: insert proper C++ library support
Chris@41 7170 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 7171 ;;
Chris@41 7172 cxx*)
Chris@41 7173 case $host in
Chris@41 7174 osf3*)
Chris@41 7175 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
Chris@41 7176 _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@41 7177 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@41 7178 ;;
Chris@41 7179 *)
Chris@41 7180 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
Chris@41 7181 _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@41 7182 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
Chris@41 7183 echo "-hidden">> $lib.exp~
Chris@41 7184 $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@41 7185 $RM $lib.exp'
Chris@41 7186 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
Chris@41 7187 ;;
Chris@41 7188 esac
Chris@41 7189
Chris@41 7190 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@41 7191
Chris@41 7192 # Commands to make compiler produce verbose output that lists
Chris@41 7193 # what "hidden" libraries, object files and flags are used when
Chris@41 7194 # linking a shared library.
Chris@41 7195 #
Chris@41 7196 # There doesn't appear to be a way to prevent this compiler from
Chris@41 7197 # explicitly linking system object files so we need to strip them
Chris@41 7198 # from the output so that they don't get included in the library
Chris@41 7199 # dependencies.
Chris@41 7200 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@41 7201 ;;
Chris@41 7202 *)
Chris@41 7203 if test yes,no = "$GXX,$with_gnu_ld"; then
Chris@41 7204 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
Chris@41 7205 case $host in
Chris@41 7206 osf3*)
Chris@41 7207 _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@41 7208 ;;
Chris@41 7209 *)
Chris@41 7210 _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@41 7211 ;;
Chris@41 7212 esac
Chris@41 7213
Chris@41 7214 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@41 7215 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@41 7216
Chris@41 7217 # Commands to make compiler produce verbose output that lists
Chris@41 7218 # what "hidden" libraries, object files and flags are used when
Chris@41 7219 # linking a shared library.
Chris@41 7220 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
Chris@41 7221
Chris@41 7222 else
Chris@41 7223 # FIXME: insert proper C++ library support
Chris@41 7224 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 7225 fi
Chris@41 7226 ;;
Chris@41 7227 esac
Chris@41 7228 ;;
Chris@41 7229
Chris@41 7230 psos*)
Chris@41 7231 # FIXME: insert proper C++ library support
Chris@41 7232 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 7233 ;;
Chris@41 7234
Chris@41 7235 sunos4*)
Chris@41 7236 case $cc_basename in
Chris@41 7237 CC*)
Chris@41 7238 # Sun C++ 4.x
Chris@41 7239 # FIXME: insert proper C++ library support
Chris@41 7240 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 7241 ;;
Chris@41 7242 lcc*)
Chris@41 7243 # Lucid
Chris@41 7244 # FIXME: insert proper C++ library support
Chris@41 7245 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 7246 ;;
Chris@41 7247 *)
Chris@41 7248 # FIXME: insert proper C++ library support
Chris@41 7249 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 7250 ;;
Chris@41 7251 esac
Chris@41 7252 ;;
Chris@41 7253
Chris@41 7254 solaris*)
Chris@41 7255 case $cc_basename in
Chris@41 7256 CC* | sunCC*)
Chris@41 7257 # Sun C++ 4.2, 5.x and Centerline C++
Chris@41 7258 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
Chris@41 7259 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
Chris@41 7260 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@41 7261 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@41 7262 $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@41 7263
Chris@41 7264 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@41 7265 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@41 7266 case $host_os in
Chris@41 7267 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
Chris@41 7268 *)
Chris@41 7269 # The compiler driver will combine and reorder linker options,
Chris@41 7270 # but understands '-z linker_flag'.
Chris@41 7271 # Supported since Solaris 2.6 (maybe 2.5.1?)
Chris@41 7272 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
Chris@41 7273 ;;
Chris@41 7274 esac
Chris@41 7275 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@41 7276
Chris@41 7277 output_verbose_link_cmd='func_echo_all'
Chris@41 7278
Chris@41 7279 # Archives containing C++ object files must be created using
Chris@41 7280 # "CC -xar", where "CC" is the Sun C++ compiler. This is
Chris@41 7281 # necessary to make sure instantiated templates are included
Chris@41 7282 # in the archive.
Chris@41 7283 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
Chris@41 7284 ;;
Chris@41 7285 gcx*)
Chris@41 7286 # Green Hills C++ Compiler
Chris@41 7287 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
Chris@41 7288
Chris@41 7289 # The C++ compiler must be used to create the archive.
Chris@41 7290 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
Chris@41 7291 ;;
Chris@41 7292 *)
Chris@41 7293 # GNU C++ compiler with Solaris linker
Chris@41 7294 if test yes,no = "$GXX,$with_gnu_ld"; then
Chris@41 7295 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
Chris@41 7296 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
Chris@41 7297 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
Chris@41 7298 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@41 7299 $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
Chris@41 7300
Chris@41 7301 # Commands to make compiler produce verbose output that lists
Chris@41 7302 # what "hidden" libraries, object files and flags are used when
Chris@41 7303 # linking a shared library.
Chris@41 7304 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
Chris@41 7305 else
Chris@41 7306 # g++ 2.7 appears to require '-G' NOT '-shared' on this
Chris@41 7307 # platform.
Chris@41 7308 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
Chris@41 7309 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@41 7310 $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
Chris@41 7311
Chris@41 7312 # Commands to make compiler produce verbose output that lists
Chris@41 7313 # what "hidden" libraries, object files and flags are used when
Chris@41 7314 # linking a shared library.
Chris@41 7315 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
Chris@41 7316 fi
Chris@41 7317
Chris@41 7318 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
Chris@41 7319 case $host_os in
Chris@41 7320 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
Chris@41 7321 *)
Chris@41 7322 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
Chris@41 7323 ;;
Chris@41 7324 esac
Chris@41 7325 fi
Chris@41 7326 ;;
Chris@41 7327 esac
Chris@41 7328 ;;
Chris@41 7329
Chris@41 7330 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
Chris@41 7331 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
Chris@41 7332 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@41 7333 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@41 7334 runpath_var='LD_RUN_PATH'
Chris@41 7335
Chris@41 7336 case $cc_basename in
Chris@41 7337 CC*)
Chris@41 7338 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@41 7339 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@41 7340 ;;
Chris@41 7341 *)
Chris@41 7342 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@41 7343 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@41 7344 ;;
Chris@41 7345 esac
Chris@41 7346 ;;
Chris@41 7347
Chris@41 7348 sysv5* | sco3.2v5* | sco5v6*)
Chris@41 7349 # Note: We CANNOT use -z defs as we might desire, because we do not
Chris@41 7350 # link with -lc, and that would cause any symbols used from libc to
Chris@41 7351 # always be unresolved, which means just about no library would
Chris@41 7352 # ever link correctly. If we're not using GNU ld we use -z text
Chris@41 7353 # though, which does catch some bad symbols but isn't as heavy-handed
Chris@41 7354 # as -z defs.
Chris@41 7355 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
Chris@41 7356 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
Chris@41 7357 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@41 7358 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@41 7359 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
Chris@41 7360 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
Chris@41 7361 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@41 7362 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
Chris@41 7363 runpath_var='LD_RUN_PATH'
Chris@41 7364
Chris@41 7365 case $cc_basename in
Chris@41 7366 CC*)
Chris@41 7367 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@41 7368 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@41 7369 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
Chris@41 7370 '"$_LT_TAGVAR(old_archive_cmds, $1)"
Chris@41 7371 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
Chris@41 7372 '"$_LT_TAGVAR(reload_cmds, $1)"
Chris@41 7373 ;;
Chris@41 7374 *)
Chris@41 7375 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@41 7376 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@41 7377 ;;
Chris@41 7378 esac
Chris@41 7379 ;;
Chris@41 7380
Chris@41 7381 tandem*)
Chris@41 7382 case $cc_basename in
Chris@41 7383 NCC*)
Chris@41 7384 # NonStop-UX NCC 3.20
Chris@41 7385 # FIXME: insert proper C++ library support
Chris@41 7386 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 7387 ;;
Chris@41 7388 *)
Chris@41 7389 # FIXME: insert proper C++ library support
Chris@41 7390 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 7391 ;;
Chris@41 7392 esac
Chris@41 7393 ;;
Chris@41 7394
Chris@41 7395 vxworks*)
Chris@41 7396 # FIXME: insert proper C++ library support
Chris@41 7397 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 7398 ;;
Chris@41 7399
Chris@41 7400 *)
Chris@41 7401 # FIXME: insert proper C++ library support
Chris@41 7402 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@41 7403 ;;
Chris@41 7404 esac
Chris@41 7405
Chris@41 7406 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
Chris@41 7407 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
Chris@41 7408
Chris@41 7409 _LT_TAGVAR(GCC, $1)=$GXX
Chris@41 7410 _LT_TAGVAR(LD, $1)=$LD
Chris@41 7411
Chris@41 7412 ## CAVEAT EMPTOR:
Chris@41 7413 ## There is no encapsulation within the following macros, do not change
Chris@41 7414 ## the running order or otherwise move them around unless you know exactly
Chris@41 7415 ## what you are doing...
Chris@41 7416 _LT_SYS_HIDDEN_LIBDEPS($1)
Chris@41 7417 _LT_COMPILER_PIC($1)
Chris@41 7418 _LT_COMPILER_C_O($1)
Chris@41 7419 _LT_COMPILER_FILE_LOCKS($1)
Chris@41 7420 _LT_LINKER_SHLIBS($1)
Chris@41 7421 _LT_SYS_DYNAMIC_LINKER($1)
Chris@41 7422 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@41 7423
Chris@41 7424 _LT_CONFIG($1)
Chris@41 7425 fi # test -n "$compiler"
Chris@41 7426
Chris@41 7427 CC=$lt_save_CC
Chris@41 7428 CFLAGS=$lt_save_CFLAGS
Chris@41 7429 LDCXX=$LD
Chris@41 7430 LD=$lt_save_LD
Chris@41 7431 GCC=$lt_save_GCC
Chris@41 7432 with_gnu_ld=$lt_save_with_gnu_ld
Chris@41 7433 lt_cv_path_LDCXX=$lt_cv_path_LD
Chris@41 7434 lt_cv_path_LD=$lt_save_path_LD
Chris@41 7435 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
Chris@41 7436 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
Chris@41 7437 fi # test yes != "$_lt_caught_CXX_error"
Chris@41 7438
Chris@41 7439 AC_LANG_POP
Chris@41 7440 ])# _LT_LANG_CXX_CONFIG
Chris@41 7441
Chris@41 7442
Chris@41 7443 # _LT_FUNC_STRIPNAME_CNF
Chris@41 7444 # ----------------------
Chris@41 7445 # func_stripname_cnf prefix suffix name
Chris@41 7446 # strip PREFIX and SUFFIX off of NAME.
Chris@41 7447 # PREFIX and SUFFIX must not contain globbing or regex special
Chris@41 7448 # characters, hashes, percent signs, but SUFFIX may contain a leading
Chris@41 7449 # dot (in which case that matches only a dot).
Chris@41 7450 #
Chris@41 7451 # This function is identical to the (non-XSI) version of func_stripname,
Chris@41 7452 # except this one can be used by m4 code that may be executed by configure,
Chris@41 7453 # rather than the libtool script.
Chris@41 7454 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
Chris@41 7455 AC_REQUIRE([_LT_DECL_SED])
Chris@41 7456 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
Chris@41 7457 func_stripname_cnf ()
Chris@41 7458 {
Chris@41 7459 case @S|@2 in
Chris@41 7460 .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
Chris@41 7461 *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
Chris@41 7462 esac
Chris@41 7463 } # func_stripname_cnf
Chris@41 7464 ])# _LT_FUNC_STRIPNAME_CNF
Chris@41 7465
Chris@41 7466
Chris@41 7467 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
Chris@41 7468 # ---------------------------------
Chris@41 7469 # Figure out "hidden" library dependencies from verbose
Chris@41 7470 # compiler output when linking a shared library.
Chris@41 7471 # Parse the compiler output and extract the necessary
Chris@41 7472 # objects, libraries and library flags.
Chris@41 7473 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
Chris@41 7474 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@41 7475 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
Chris@41 7476 # Dependencies to place before and after the object being linked:
Chris@41 7477 _LT_TAGVAR(predep_objects, $1)=
Chris@41 7478 _LT_TAGVAR(postdep_objects, $1)=
Chris@41 7479 _LT_TAGVAR(predeps, $1)=
Chris@41 7480 _LT_TAGVAR(postdeps, $1)=
Chris@41 7481 _LT_TAGVAR(compiler_lib_search_path, $1)=
Chris@41 7482
Chris@41 7483 dnl we can't use the lt_simple_compile_test_code here,
Chris@41 7484 dnl because it contains code intended for an executable,
Chris@41 7485 dnl not a library. It's possible we should let each
Chris@41 7486 dnl tag define a new lt_????_link_test_code variable,
Chris@41 7487 dnl but it's only used here...
Chris@41 7488 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
Chris@41 7489 int a;
Chris@41 7490 void foo (void) { a = 0; }
Chris@41 7491 _LT_EOF
Chris@41 7492 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
Chris@41 7493 class Foo
Chris@41 7494 {
Chris@41 7495 public:
Chris@41 7496 Foo (void) { a = 0; }
Chris@41 7497 private:
Chris@41 7498 int a;
Chris@41 7499 };
Chris@41 7500 _LT_EOF
Chris@41 7501 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
Chris@41 7502 subroutine foo
Chris@41 7503 implicit none
Chris@41 7504 integer*4 a
Chris@41 7505 a=0
Chris@41 7506 return
Chris@41 7507 end
Chris@41 7508 _LT_EOF
Chris@41 7509 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
Chris@41 7510 subroutine foo
Chris@41 7511 implicit none
Chris@41 7512 integer a
Chris@41 7513 a=0
Chris@41 7514 return
Chris@41 7515 end
Chris@41 7516 _LT_EOF
Chris@41 7517 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
Chris@41 7518 public class foo {
Chris@41 7519 private int a;
Chris@41 7520 public void bar (void) {
Chris@41 7521 a = 0;
Chris@41 7522 }
Chris@41 7523 };
Chris@41 7524 _LT_EOF
Chris@41 7525 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
Chris@41 7526 package foo
Chris@41 7527 func foo() {
Chris@41 7528 }
Chris@41 7529 _LT_EOF
Chris@41 7530 ])
Chris@41 7531
Chris@41 7532 _lt_libdeps_save_CFLAGS=$CFLAGS
Chris@41 7533 case "$CC $CFLAGS " in #(
Chris@41 7534 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
Chris@41 7535 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
Chris@41 7536 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
Chris@41 7537 esac
Chris@41 7538
Chris@41 7539 dnl Parse the compiler output and extract the necessary
Chris@41 7540 dnl objects, libraries and library flags.
Chris@41 7541 if AC_TRY_EVAL(ac_compile); then
Chris@41 7542 # Parse the compiler output and extract the necessary
Chris@41 7543 # objects, libraries and library flags.
Chris@41 7544
Chris@41 7545 # Sentinel used to keep track of whether or not we are before
Chris@41 7546 # the conftest object file.
Chris@41 7547 pre_test_object_deps_done=no
Chris@41 7548
Chris@41 7549 for p in `eval "$output_verbose_link_cmd"`; do
Chris@41 7550 case $prev$p in
Chris@41 7551
Chris@41 7552 -L* | -R* | -l*)
Chris@41 7553 # Some compilers place space between "-{L,R}" and the path.
Chris@41 7554 # Remove the space.
Chris@41 7555 if test x-L = "$p" ||
Chris@41 7556 test x-R = "$p"; then
Chris@41 7557 prev=$p
Chris@41 7558 continue
Chris@41 7559 fi
Chris@41 7560
Chris@41 7561 # Expand the sysroot to ease extracting the directories later.
Chris@41 7562 if test -z "$prev"; then
Chris@41 7563 case $p in
Chris@41 7564 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
Chris@41 7565 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
Chris@41 7566 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
Chris@41 7567 esac
Chris@41 7568 fi
Chris@41 7569 case $p in
Chris@41 7570 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
Chris@41 7571 esac
Chris@41 7572 if test no = "$pre_test_object_deps_done"; then
Chris@41 7573 case $prev in
Chris@41 7574 -L | -R)
Chris@41 7575 # Internal compiler library paths should come after those
Chris@41 7576 # provided the user. The postdeps already come after the
Chris@41 7577 # user supplied libs so there is no need to process them.
Chris@41 7578 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
Chris@41 7579 _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
Chris@41 7580 else
Chris@41 7581 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
Chris@41 7582 fi
Chris@41 7583 ;;
Chris@41 7584 # The "-l" case would never come before the object being
Chris@41 7585 # linked, so don't bother handling this case.
Chris@41 7586 esac
Chris@41 7587 else
Chris@41 7588 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
Chris@41 7589 _LT_TAGVAR(postdeps, $1)=$prev$p
Chris@41 7590 else
Chris@41 7591 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
Chris@41 7592 fi
Chris@41 7593 fi
Chris@41 7594 prev=
Chris@41 7595 ;;
Chris@41 7596
Chris@41 7597 *.lto.$objext) ;; # Ignore GCC LTO objects
Chris@41 7598 *.$objext)
Chris@41 7599 # This assumes that the test object file only shows up
Chris@41 7600 # once in the compiler output.
Chris@41 7601 if test "$p" = "conftest.$objext"; then
Chris@41 7602 pre_test_object_deps_done=yes
Chris@41 7603 continue
Chris@41 7604 fi
Chris@41 7605
Chris@41 7606 if test no = "$pre_test_object_deps_done"; then
Chris@41 7607 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
Chris@41 7608 _LT_TAGVAR(predep_objects, $1)=$p
Chris@41 7609 else
Chris@41 7610 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
Chris@41 7611 fi
Chris@41 7612 else
Chris@41 7613 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
Chris@41 7614 _LT_TAGVAR(postdep_objects, $1)=$p
Chris@41 7615 else
Chris@41 7616 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
Chris@41 7617 fi
Chris@41 7618 fi
Chris@41 7619 ;;
Chris@41 7620
Chris@41 7621 *) ;; # Ignore the rest.
Chris@41 7622
Chris@41 7623 esac
Chris@41 7624 done
Chris@41 7625
Chris@41 7626 # Clean up.
Chris@41 7627 rm -f a.out a.exe
Chris@41 7628 else
Chris@41 7629 echo "libtool.m4: error: problem compiling $1 test program"
Chris@41 7630 fi
Chris@41 7631
Chris@41 7632 $RM -f confest.$objext
Chris@41 7633 CFLAGS=$_lt_libdeps_save_CFLAGS
Chris@41 7634
Chris@41 7635 # PORTME: override above test on systems where it is broken
Chris@41 7636 m4_if([$1], [CXX],
Chris@41 7637 [case $host_os in
Chris@41 7638 interix[[3-9]]*)
Chris@41 7639 # Interix 3.5 installs completely hosed .la files for C++, so rather than
Chris@41 7640 # hack all around it, let's just trust "g++" to DTRT.
Chris@41 7641 _LT_TAGVAR(predep_objects,$1)=
Chris@41 7642 _LT_TAGVAR(postdep_objects,$1)=
Chris@41 7643 _LT_TAGVAR(postdeps,$1)=
Chris@41 7644 ;;
Chris@41 7645 esac
Chris@41 7646 ])
Chris@41 7647
Chris@41 7648 case " $_LT_TAGVAR(postdeps, $1) " in
Chris@41 7649 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
Chris@41 7650 esac
Chris@41 7651 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
Chris@41 7652 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
Chris@41 7653 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
Chris@41 7654 fi
Chris@41 7655 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
Chris@41 7656 [The directories searched by this compiler when creating a shared library])
Chris@41 7657 _LT_TAGDECL([], [predep_objects], [1],
Chris@41 7658 [Dependencies to place before and after the objects being linked to
Chris@41 7659 create a shared library])
Chris@41 7660 _LT_TAGDECL([], [postdep_objects], [1])
Chris@41 7661 _LT_TAGDECL([], [predeps], [1])
Chris@41 7662 _LT_TAGDECL([], [postdeps], [1])
Chris@41 7663 _LT_TAGDECL([], [compiler_lib_search_path], [1],
Chris@41 7664 [The library search path used internally by the compiler when linking
Chris@41 7665 a shared library])
Chris@41 7666 ])# _LT_SYS_HIDDEN_LIBDEPS
Chris@41 7667
Chris@41 7668
Chris@41 7669 # _LT_LANG_F77_CONFIG([TAG])
Chris@41 7670 # --------------------------
Chris@41 7671 # Ensure that the configuration variables for a Fortran 77 compiler are
Chris@41 7672 # suitably defined. These variables are subsequently used by _LT_CONFIG
Chris@41 7673 # to write the compiler configuration to 'libtool'.
Chris@41 7674 m4_defun([_LT_LANG_F77_CONFIG],
Chris@41 7675 [AC_LANG_PUSH(Fortran 77)
Chris@41 7676 if test -z "$F77" || test no = "$F77"; then
Chris@41 7677 _lt_disable_F77=yes
Chris@41 7678 fi
Chris@41 7679
Chris@41 7680 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@41 7681 _LT_TAGVAR(allow_undefined_flag, $1)=
Chris@41 7682 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@41 7683 _LT_TAGVAR(archive_expsym_cmds, $1)=
Chris@41 7684 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@41 7685 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@41 7686 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@41 7687 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@41 7688 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@41 7689 _LT_TAGVAR(hardcode_minus_L, $1)=no
Chris@41 7690 _LT_TAGVAR(hardcode_automatic, $1)=no
Chris@41 7691 _LT_TAGVAR(inherit_rpath, $1)=no
Chris@41 7692 _LT_TAGVAR(module_cmds, $1)=
Chris@41 7693 _LT_TAGVAR(module_expsym_cmds, $1)=
Chris@41 7694 _LT_TAGVAR(link_all_deplibs, $1)=unknown
Chris@41 7695 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@41 7696 _LT_TAGVAR(reload_flag, $1)=$reload_flag
Chris@41 7697 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
Chris@41 7698 _LT_TAGVAR(no_undefined_flag, $1)=
Chris@41 7699 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@41 7700 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
Chris@41 7701
Chris@41 7702 # Source file extension for f77 test sources.
Chris@41 7703 ac_ext=f
Chris@41 7704
Chris@41 7705 # Object file extension for compiled f77 test sources.
Chris@41 7706 objext=o
Chris@41 7707 _LT_TAGVAR(objext, $1)=$objext
Chris@41 7708
Chris@41 7709 # No sense in running all these tests if we already determined that
Chris@41 7710 # the F77 compiler isn't working. Some variables (like enable_shared)
Chris@41 7711 # are currently assumed to apply to all compilers on this platform,
Chris@41 7712 # and will be corrupted by setting them based on a non-working compiler.
Chris@41 7713 if test yes != "$_lt_disable_F77"; then
Chris@41 7714 # Code to be used in simple compile tests
Chris@41 7715 lt_simple_compile_test_code="\
Chris@41 7716 subroutine t
Chris@41 7717 return
Chris@41 7718 end
Chris@41 7719 "
Chris@41 7720
Chris@41 7721 # Code to be used in simple link tests
Chris@41 7722 lt_simple_link_test_code="\
Chris@41 7723 program t
Chris@41 7724 end
Chris@41 7725 "
Chris@41 7726
Chris@41 7727 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@41 7728 _LT_TAG_COMPILER
Chris@41 7729
Chris@41 7730 # save warnings/boilerplate of simple test code
Chris@41 7731 _LT_COMPILER_BOILERPLATE
Chris@41 7732 _LT_LINKER_BOILERPLATE
Chris@41 7733
Chris@41 7734 # Allow CC to be a program name with arguments.
Chris@41 7735 lt_save_CC=$CC
Chris@41 7736 lt_save_GCC=$GCC
Chris@41 7737 lt_save_CFLAGS=$CFLAGS
Chris@41 7738 CC=${F77-"f77"}
Chris@41 7739 CFLAGS=$FFLAGS
Chris@41 7740 compiler=$CC
Chris@41 7741 _LT_TAGVAR(compiler, $1)=$CC
Chris@41 7742 _LT_CC_BASENAME([$compiler])
Chris@41 7743 GCC=$G77
Chris@41 7744 if test -n "$compiler"; then
Chris@41 7745 AC_MSG_CHECKING([if libtool supports shared libraries])
Chris@41 7746 AC_MSG_RESULT([$can_build_shared])
Chris@41 7747
Chris@41 7748 AC_MSG_CHECKING([whether to build shared libraries])
Chris@41 7749 test no = "$can_build_shared" && enable_shared=no
Chris@41 7750
Chris@41 7751 # On AIX, shared libraries and static libraries use the same namespace, and
Chris@41 7752 # are all built from PIC.
Chris@41 7753 case $host_os in
Chris@41 7754 aix3*)
Chris@41 7755 test yes = "$enable_shared" && enable_static=no
Chris@41 7756 if test -n "$RANLIB"; then
Chris@41 7757 archive_cmds="$archive_cmds~\$RANLIB \$lib"
Chris@41 7758 postinstall_cmds='$RANLIB $lib'
Chris@41 7759 fi
Chris@41 7760 ;;
Chris@41 7761 aix[[4-9]]*)
Chris@41 7762 if test ia64 != "$host_cpu"; then
Chris@41 7763 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
Chris@41 7764 yes,aix,yes) ;; # shared object as lib.so file only
Chris@41 7765 yes,svr4,*) ;; # shared object as lib.so archive member only
Chris@41 7766 yes,*) enable_static=no ;; # shared object in lib.a archive as well
Chris@41 7767 esac
Chris@41 7768 fi
Chris@41 7769 ;;
Chris@41 7770 esac
Chris@41 7771 AC_MSG_RESULT([$enable_shared])
Chris@41 7772
Chris@41 7773 AC_MSG_CHECKING([whether to build static libraries])
Chris@41 7774 # Make sure either enable_shared or enable_static is yes.
Chris@41 7775 test yes = "$enable_shared" || enable_static=yes
Chris@41 7776 AC_MSG_RESULT([$enable_static])
Chris@41 7777
Chris@41 7778 _LT_TAGVAR(GCC, $1)=$G77
Chris@41 7779 _LT_TAGVAR(LD, $1)=$LD
Chris@41 7780
Chris@41 7781 ## CAVEAT EMPTOR:
Chris@41 7782 ## There is no encapsulation within the following macros, do not change
Chris@41 7783 ## the running order or otherwise move them around unless you know exactly
Chris@41 7784 ## what you are doing...
Chris@41 7785 _LT_COMPILER_PIC($1)
Chris@41 7786 _LT_COMPILER_C_O($1)
Chris@41 7787 _LT_COMPILER_FILE_LOCKS($1)
Chris@41 7788 _LT_LINKER_SHLIBS($1)
Chris@41 7789 _LT_SYS_DYNAMIC_LINKER($1)
Chris@41 7790 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@41 7791
Chris@41 7792 _LT_CONFIG($1)
Chris@41 7793 fi # test -n "$compiler"
Chris@41 7794
Chris@41 7795 GCC=$lt_save_GCC
Chris@41 7796 CC=$lt_save_CC
Chris@41 7797 CFLAGS=$lt_save_CFLAGS
Chris@41 7798 fi # test yes != "$_lt_disable_F77"
Chris@41 7799
Chris@41 7800 AC_LANG_POP
Chris@41 7801 ])# _LT_LANG_F77_CONFIG
Chris@41 7802
Chris@41 7803
Chris@41 7804 # _LT_LANG_FC_CONFIG([TAG])
Chris@41 7805 # -------------------------
Chris@41 7806 # Ensure that the configuration variables for a Fortran compiler are
Chris@41 7807 # suitably defined. These variables are subsequently used by _LT_CONFIG
Chris@41 7808 # to write the compiler configuration to 'libtool'.
Chris@41 7809 m4_defun([_LT_LANG_FC_CONFIG],
Chris@41 7810 [AC_LANG_PUSH(Fortran)
Chris@41 7811
Chris@41 7812 if test -z "$FC" || test no = "$FC"; then
Chris@41 7813 _lt_disable_FC=yes
Chris@41 7814 fi
Chris@41 7815
Chris@41 7816 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@41 7817 _LT_TAGVAR(allow_undefined_flag, $1)=
Chris@41 7818 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@41 7819 _LT_TAGVAR(archive_expsym_cmds, $1)=
Chris@41 7820 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@41 7821 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@41 7822 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@41 7823 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@41 7824 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@41 7825 _LT_TAGVAR(hardcode_minus_L, $1)=no
Chris@41 7826 _LT_TAGVAR(hardcode_automatic, $1)=no
Chris@41 7827 _LT_TAGVAR(inherit_rpath, $1)=no
Chris@41 7828 _LT_TAGVAR(module_cmds, $1)=
Chris@41 7829 _LT_TAGVAR(module_expsym_cmds, $1)=
Chris@41 7830 _LT_TAGVAR(link_all_deplibs, $1)=unknown
Chris@41 7831 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@41 7832 _LT_TAGVAR(reload_flag, $1)=$reload_flag
Chris@41 7833 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
Chris@41 7834 _LT_TAGVAR(no_undefined_flag, $1)=
Chris@41 7835 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@41 7836 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
Chris@41 7837
Chris@41 7838 # Source file extension for fc test sources.
Chris@41 7839 ac_ext=${ac_fc_srcext-f}
Chris@41 7840
Chris@41 7841 # Object file extension for compiled fc test sources.
Chris@41 7842 objext=o
Chris@41 7843 _LT_TAGVAR(objext, $1)=$objext
Chris@41 7844
Chris@41 7845 # No sense in running all these tests if we already determined that
Chris@41 7846 # the FC compiler isn't working. Some variables (like enable_shared)
Chris@41 7847 # are currently assumed to apply to all compilers on this platform,
Chris@41 7848 # and will be corrupted by setting them based on a non-working compiler.
Chris@41 7849 if test yes != "$_lt_disable_FC"; then
Chris@41 7850 # Code to be used in simple compile tests
Chris@41 7851 lt_simple_compile_test_code="\
Chris@41 7852 subroutine t
Chris@41 7853 return
Chris@41 7854 end
Chris@41 7855 "
Chris@41 7856
Chris@41 7857 # Code to be used in simple link tests
Chris@41 7858 lt_simple_link_test_code="\
Chris@41 7859 program t
Chris@41 7860 end
Chris@41 7861 "
Chris@41 7862
Chris@41 7863 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@41 7864 _LT_TAG_COMPILER
Chris@41 7865
Chris@41 7866 # save warnings/boilerplate of simple test code
Chris@41 7867 _LT_COMPILER_BOILERPLATE
Chris@41 7868 _LT_LINKER_BOILERPLATE
Chris@41 7869
Chris@41 7870 # Allow CC to be a program name with arguments.
Chris@41 7871 lt_save_CC=$CC
Chris@41 7872 lt_save_GCC=$GCC
Chris@41 7873 lt_save_CFLAGS=$CFLAGS
Chris@41 7874 CC=${FC-"f95"}
Chris@41 7875 CFLAGS=$FCFLAGS
Chris@41 7876 compiler=$CC
Chris@41 7877 GCC=$ac_cv_fc_compiler_gnu
Chris@41 7878
Chris@41 7879 _LT_TAGVAR(compiler, $1)=$CC
Chris@41 7880 _LT_CC_BASENAME([$compiler])
Chris@41 7881
Chris@41 7882 if test -n "$compiler"; then
Chris@41 7883 AC_MSG_CHECKING([if libtool supports shared libraries])
Chris@41 7884 AC_MSG_RESULT([$can_build_shared])
Chris@41 7885
Chris@41 7886 AC_MSG_CHECKING([whether to build shared libraries])
Chris@41 7887 test no = "$can_build_shared" && enable_shared=no
Chris@41 7888
Chris@41 7889 # On AIX, shared libraries and static libraries use the same namespace, and
Chris@41 7890 # are all built from PIC.
Chris@41 7891 case $host_os in
Chris@41 7892 aix3*)
Chris@41 7893 test yes = "$enable_shared" && enable_static=no
Chris@41 7894 if test -n "$RANLIB"; then
Chris@41 7895 archive_cmds="$archive_cmds~\$RANLIB \$lib"
Chris@41 7896 postinstall_cmds='$RANLIB $lib'
Chris@41 7897 fi
Chris@41 7898 ;;
Chris@41 7899 aix[[4-9]]*)
Chris@41 7900 if test ia64 != "$host_cpu"; then
Chris@41 7901 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
Chris@41 7902 yes,aix,yes) ;; # shared object as lib.so file only
Chris@41 7903 yes,svr4,*) ;; # shared object as lib.so archive member only
Chris@41 7904 yes,*) enable_static=no ;; # shared object in lib.a archive as well
Chris@41 7905 esac
Chris@41 7906 fi
Chris@41 7907 ;;
Chris@41 7908 esac
Chris@41 7909 AC_MSG_RESULT([$enable_shared])
Chris@41 7910
Chris@41 7911 AC_MSG_CHECKING([whether to build static libraries])
Chris@41 7912 # Make sure either enable_shared or enable_static is yes.
Chris@41 7913 test yes = "$enable_shared" || enable_static=yes
Chris@41 7914 AC_MSG_RESULT([$enable_static])
Chris@41 7915
Chris@41 7916 _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
Chris@41 7917 _LT_TAGVAR(LD, $1)=$LD
Chris@41 7918
Chris@41 7919 ## CAVEAT EMPTOR:
Chris@41 7920 ## There is no encapsulation within the following macros, do not change
Chris@41 7921 ## the running order or otherwise move them around unless you know exactly
Chris@41 7922 ## what you are doing...
Chris@41 7923 _LT_SYS_HIDDEN_LIBDEPS($1)
Chris@41 7924 _LT_COMPILER_PIC($1)
Chris@41 7925 _LT_COMPILER_C_O($1)
Chris@41 7926 _LT_COMPILER_FILE_LOCKS($1)
Chris@41 7927 _LT_LINKER_SHLIBS($1)
Chris@41 7928 _LT_SYS_DYNAMIC_LINKER($1)
Chris@41 7929 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@41 7930
Chris@41 7931 _LT_CONFIG($1)
Chris@41 7932 fi # test -n "$compiler"
Chris@41 7933
Chris@41 7934 GCC=$lt_save_GCC
Chris@41 7935 CC=$lt_save_CC
Chris@41 7936 CFLAGS=$lt_save_CFLAGS
Chris@41 7937 fi # test yes != "$_lt_disable_FC"
Chris@41 7938
Chris@41 7939 AC_LANG_POP
Chris@41 7940 ])# _LT_LANG_FC_CONFIG
Chris@41 7941
Chris@41 7942
Chris@41 7943 # _LT_LANG_GCJ_CONFIG([TAG])
Chris@41 7944 # --------------------------
Chris@41 7945 # Ensure that the configuration variables for the GNU Java Compiler compiler
Chris@41 7946 # are suitably defined. These variables are subsequently used by _LT_CONFIG
Chris@41 7947 # to write the compiler configuration to 'libtool'.
Chris@41 7948 m4_defun([_LT_LANG_GCJ_CONFIG],
Chris@41 7949 [AC_REQUIRE([LT_PROG_GCJ])dnl
Chris@41 7950 AC_LANG_SAVE
Chris@41 7951
Chris@41 7952 # Source file extension for Java test sources.
Chris@41 7953 ac_ext=java
Chris@41 7954
Chris@41 7955 # Object file extension for compiled Java test sources.
Chris@41 7956 objext=o
Chris@41 7957 _LT_TAGVAR(objext, $1)=$objext
Chris@41 7958
Chris@41 7959 # Code to be used in simple compile tests
Chris@41 7960 lt_simple_compile_test_code="class foo {}"
Chris@41 7961
Chris@41 7962 # Code to be used in simple link tests
Chris@41 7963 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
Chris@41 7964
Chris@41 7965 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@41 7966 _LT_TAG_COMPILER
Chris@41 7967
Chris@41 7968 # save warnings/boilerplate of simple test code
Chris@41 7969 _LT_COMPILER_BOILERPLATE
Chris@41 7970 _LT_LINKER_BOILERPLATE
Chris@41 7971
Chris@41 7972 # Allow CC to be a program name with arguments.
Chris@41 7973 lt_save_CC=$CC
Chris@41 7974 lt_save_CFLAGS=$CFLAGS
Chris@41 7975 lt_save_GCC=$GCC
Chris@41 7976 GCC=yes
Chris@41 7977 CC=${GCJ-"gcj"}
Chris@41 7978 CFLAGS=$GCJFLAGS
Chris@41 7979 compiler=$CC
Chris@41 7980 _LT_TAGVAR(compiler, $1)=$CC
Chris@41 7981 _LT_TAGVAR(LD, $1)=$LD
Chris@41 7982 _LT_CC_BASENAME([$compiler])
Chris@41 7983
Chris@41 7984 # GCJ did not exist at the time GCC didn't implicitly link libc in.
Chris@41 7985 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@41 7986
Chris@41 7987 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@41 7988 _LT_TAGVAR(reload_flag, $1)=$reload_flag
Chris@41 7989 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
Chris@41 7990
Chris@41 7991 ## CAVEAT EMPTOR:
Chris@41 7992 ## There is no encapsulation within the following macros, do not change
Chris@41 7993 ## the running order or otherwise move them around unless you know exactly
Chris@41 7994 ## what you are doing...
Chris@41 7995 if test -n "$compiler"; then
Chris@41 7996 _LT_COMPILER_NO_RTTI($1)
Chris@41 7997 _LT_COMPILER_PIC($1)
Chris@41 7998 _LT_COMPILER_C_O($1)
Chris@41 7999 _LT_COMPILER_FILE_LOCKS($1)
Chris@41 8000 _LT_LINKER_SHLIBS($1)
Chris@41 8001 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@41 8002
Chris@41 8003 _LT_CONFIG($1)
Chris@41 8004 fi
Chris@41 8005
Chris@41 8006 AC_LANG_RESTORE
Chris@41 8007
Chris@41 8008 GCC=$lt_save_GCC
Chris@41 8009 CC=$lt_save_CC
Chris@41 8010 CFLAGS=$lt_save_CFLAGS
Chris@41 8011 ])# _LT_LANG_GCJ_CONFIG
Chris@41 8012
Chris@41 8013
Chris@41 8014 # _LT_LANG_GO_CONFIG([TAG])
Chris@41 8015 # --------------------------
Chris@41 8016 # Ensure that the configuration variables for the GNU Go compiler
Chris@41 8017 # are suitably defined. These variables are subsequently used by _LT_CONFIG
Chris@41 8018 # to write the compiler configuration to 'libtool'.
Chris@41 8019 m4_defun([_LT_LANG_GO_CONFIG],
Chris@41 8020 [AC_REQUIRE([LT_PROG_GO])dnl
Chris@41 8021 AC_LANG_SAVE
Chris@41 8022
Chris@41 8023 # Source file extension for Go test sources.
Chris@41 8024 ac_ext=go
Chris@41 8025
Chris@41 8026 # Object file extension for compiled Go test sources.
Chris@41 8027 objext=o
Chris@41 8028 _LT_TAGVAR(objext, $1)=$objext
Chris@41 8029
Chris@41 8030 # Code to be used in simple compile tests
Chris@41 8031 lt_simple_compile_test_code="package main; func main() { }"
Chris@41 8032
Chris@41 8033 # Code to be used in simple link tests
Chris@41 8034 lt_simple_link_test_code='package main; func main() { }'
Chris@41 8035
Chris@41 8036 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@41 8037 _LT_TAG_COMPILER
Chris@41 8038
Chris@41 8039 # save warnings/boilerplate of simple test code
Chris@41 8040 _LT_COMPILER_BOILERPLATE
Chris@41 8041 _LT_LINKER_BOILERPLATE
Chris@41 8042
Chris@41 8043 # Allow CC to be a program name with arguments.
Chris@41 8044 lt_save_CC=$CC
Chris@41 8045 lt_save_CFLAGS=$CFLAGS
Chris@41 8046 lt_save_GCC=$GCC
Chris@41 8047 GCC=yes
Chris@41 8048 CC=${GOC-"gccgo"}
Chris@41 8049 CFLAGS=$GOFLAGS
Chris@41 8050 compiler=$CC
Chris@41 8051 _LT_TAGVAR(compiler, $1)=$CC
Chris@41 8052 _LT_TAGVAR(LD, $1)=$LD
Chris@41 8053 _LT_CC_BASENAME([$compiler])
Chris@41 8054
Chris@41 8055 # Go did not exist at the time GCC didn't implicitly link libc in.
Chris@41 8056 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@41 8057
Chris@41 8058 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@41 8059 _LT_TAGVAR(reload_flag, $1)=$reload_flag
Chris@41 8060 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
Chris@41 8061
Chris@41 8062 ## CAVEAT EMPTOR:
Chris@41 8063 ## There is no encapsulation within the following macros, do not change
Chris@41 8064 ## the running order or otherwise move them around unless you know exactly
Chris@41 8065 ## what you are doing...
Chris@41 8066 if test -n "$compiler"; then
Chris@41 8067 _LT_COMPILER_NO_RTTI($1)
Chris@41 8068 _LT_COMPILER_PIC($1)
Chris@41 8069 _LT_COMPILER_C_O($1)
Chris@41 8070 _LT_COMPILER_FILE_LOCKS($1)
Chris@41 8071 _LT_LINKER_SHLIBS($1)
Chris@41 8072 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@41 8073
Chris@41 8074 _LT_CONFIG($1)
Chris@41 8075 fi
Chris@41 8076
Chris@41 8077 AC_LANG_RESTORE
Chris@41 8078
Chris@41 8079 GCC=$lt_save_GCC
Chris@41 8080 CC=$lt_save_CC
Chris@41 8081 CFLAGS=$lt_save_CFLAGS
Chris@41 8082 ])# _LT_LANG_GO_CONFIG
Chris@41 8083
Chris@41 8084
Chris@41 8085 # _LT_LANG_RC_CONFIG([TAG])
Chris@41 8086 # -------------------------
Chris@41 8087 # Ensure that the configuration variables for the Windows resource compiler
Chris@41 8088 # are suitably defined. These variables are subsequently used by _LT_CONFIG
Chris@41 8089 # to write the compiler configuration to 'libtool'.
Chris@41 8090 m4_defun([_LT_LANG_RC_CONFIG],
Chris@41 8091 [AC_REQUIRE([LT_PROG_RC])dnl
Chris@41 8092 AC_LANG_SAVE
Chris@41 8093
Chris@41 8094 # Source file extension for RC test sources.
Chris@41 8095 ac_ext=rc
Chris@41 8096
Chris@41 8097 # Object file extension for compiled RC test sources.
Chris@41 8098 objext=o
Chris@41 8099 _LT_TAGVAR(objext, $1)=$objext
Chris@41 8100
Chris@41 8101 # Code to be used in simple compile tests
Chris@41 8102 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
Chris@41 8103
Chris@41 8104 # Code to be used in simple link tests
Chris@41 8105 lt_simple_link_test_code=$lt_simple_compile_test_code
Chris@41 8106
Chris@41 8107 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@41 8108 _LT_TAG_COMPILER
Chris@41 8109
Chris@41 8110 # save warnings/boilerplate of simple test code
Chris@41 8111 _LT_COMPILER_BOILERPLATE
Chris@41 8112 _LT_LINKER_BOILERPLATE
Chris@41 8113
Chris@41 8114 # Allow CC to be a program name with arguments.
Chris@41 8115 lt_save_CC=$CC
Chris@41 8116 lt_save_CFLAGS=$CFLAGS
Chris@41 8117 lt_save_GCC=$GCC
Chris@41 8118 GCC=
Chris@41 8119 CC=${RC-"windres"}
Chris@41 8120 CFLAGS=
Chris@41 8121 compiler=$CC
Chris@41 8122 _LT_TAGVAR(compiler, $1)=$CC
Chris@41 8123 _LT_CC_BASENAME([$compiler])
Chris@41 8124 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
Chris@41 8125
Chris@41 8126 if test -n "$compiler"; then
Chris@41 8127 :
Chris@41 8128 _LT_CONFIG($1)
Chris@41 8129 fi
Chris@41 8130
Chris@41 8131 GCC=$lt_save_GCC
Chris@41 8132 AC_LANG_RESTORE
Chris@41 8133 CC=$lt_save_CC
Chris@41 8134 CFLAGS=$lt_save_CFLAGS
Chris@41 8135 ])# _LT_LANG_RC_CONFIG
Chris@41 8136
Chris@41 8137
Chris@41 8138 # LT_PROG_GCJ
Chris@41 8139 # -----------
Chris@41 8140 AC_DEFUN([LT_PROG_GCJ],
Chris@41 8141 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
Chris@41 8142 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
Chris@41 8143 [AC_CHECK_TOOL(GCJ, gcj,)
Chris@41 8144 test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
Chris@41 8145 AC_SUBST(GCJFLAGS)])])[]dnl
Chris@41 8146 ])
Chris@41 8147
Chris@41 8148 # Old name:
Chris@41 8149 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
Chris@41 8150 dnl aclocal-1.4 backwards compatibility:
Chris@41 8151 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
Chris@41 8152
Chris@41 8153
Chris@41 8154 # LT_PROG_GO
Chris@41 8155 # ----------
Chris@41 8156 AC_DEFUN([LT_PROG_GO],
Chris@41 8157 [AC_CHECK_TOOL(GOC, gccgo,)
Chris@41 8158 ])
Chris@41 8159
Chris@41 8160
Chris@41 8161 # LT_PROG_RC
Chris@41 8162 # ----------
Chris@41 8163 AC_DEFUN([LT_PROG_RC],
Chris@41 8164 [AC_CHECK_TOOL(RC, windres,)
Chris@41 8165 ])
Chris@41 8166
Chris@41 8167 # Old name:
Chris@41 8168 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
Chris@41 8169 dnl aclocal-1.4 backwards compatibility:
Chris@41 8170 dnl AC_DEFUN([LT_AC_PROG_RC], [])
Chris@41 8171
Chris@41 8172
Chris@41 8173 # _LT_DECL_EGREP
Chris@41 8174 # --------------
Chris@41 8175 # If we don't have a new enough Autoconf to choose the best grep
Chris@41 8176 # available, choose the one first in the user's PATH.
Chris@41 8177 m4_defun([_LT_DECL_EGREP],
Chris@41 8178 [AC_REQUIRE([AC_PROG_EGREP])dnl
Chris@41 8179 AC_REQUIRE([AC_PROG_FGREP])dnl
Chris@41 8180 test -z "$GREP" && GREP=grep
Chris@41 8181 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
Chris@41 8182 _LT_DECL([], [EGREP], [1], [An ERE matcher])
Chris@41 8183 _LT_DECL([], [FGREP], [1], [A literal string matcher])
Chris@41 8184 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
Chris@41 8185 AC_SUBST([GREP])
Chris@41 8186 ])
Chris@41 8187
Chris@41 8188
Chris@41 8189 # _LT_DECL_OBJDUMP
Chris@41 8190 # --------------
Chris@41 8191 # If we don't have a new enough Autoconf to choose the best objdump
Chris@41 8192 # available, choose the one first in the user's PATH.
Chris@41 8193 m4_defun([_LT_DECL_OBJDUMP],
Chris@41 8194 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
Chris@41 8195 test -z "$OBJDUMP" && OBJDUMP=objdump
Chris@41 8196 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
Chris@41 8197 AC_SUBST([OBJDUMP])
Chris@41 8198 ])
Chris@41 8199
Chris@41 8200 # _LT_DECL_DLLTOOL
Chris@41 8201 # ----------------
Chris@41 8202 # Ensure DLLTOOL variable is set.
Chris@41 8203 m4_defun([_LT_DECL_DLLTOOL],
Chris@41 8204 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
Chris@41 8205 test -z "$DLLTOOL" && DLLTOOL=dlltool
Chris@41 8206 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
Chris@41 8207 AC_SUBST([DLLTOOL])
Chris@41 8208 ])
Chris@41 8209
Chris@41 8210 # _LT_DECL_SED
Chris@41 8211 # ------------
Chris@41 8212 # Check for a fully-functional sed program, that truncates
Chris@41 8213 # as few characters as possible. Prefer GNU sed if found.
Chris@41 8214 m4_defun([_LT_DECL_SED],
Chris@41 8215 [AC_PROG_SED
Chris@41 8216 test -z "$SED" && SED=sed
Chris@41 8217 Xsed="$SED -e 1s/^X//"
Chris@41 8218 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
Chris@41 8219 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
Chris@41 8220 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
Chris@41 8221 ])# _LT_DECL_SED
Chris@41 8222
Chris@41 8223 m4_ifndef([AC_PROG_SED], [
Chris@41 8224 ############################################################
Chris@41 8225 # NOTE: This macro has been submitted for inclusion into #
Chris@41 8226 # GNU Autoconf as AC_PROG_SED. When it is available in #
Chris@41 8227 # a released version of Autoconf we should remove this #
Chris@41 8228 # macro and use it instead. #
Chris@41 8229 ############################################################
Chris@41 8230
Chris@41 8231 m4_defun([AC_PROG_SED],
Chris@41 8232 [AC_MSG_CHECKING([for a sed that does not truncate output])
Chris@41 8233 AC_CACHE_VAL(lt_cv_path_SED,
Chris@41 8234 [# Loop through the user's path and test for sed and gsed.
Chris@41 8235 # Then use that list of sed's as ones to test for truncation.
Chris@41 8236 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Chris@41 8237 for as_dir in $PATH
Chris@41 8238 do
Chris@41 8239 IFS=$as_save_IFS
Chris@41 8240 test -z "$as_dir" && as_dir=.
Chris@41 8241 for lt_ac_prog in sed gsed; do
Chris@41 8242 for ac_exec_ext in '' $ac_executable_extensions; do
Chris@41 8243 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
Chris@41 8244 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
Chris@41 8245 fi
Chris@41 8246 done
Chris@41 8247 done
Chris@41 8248 done
Chris@41 8249 IFS=$as_save_IFS
Chris@41 8250 lt_ac_max=0
Chris@41 8251 lt_ac_count=0
Chris@41 8252 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
Chris@41 8253 # along with /bin/sed that truncates output.
Chris@41 8254 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
Chris@41 8255 test ! -f "$lt_ac_sed" && continue
Chris@41 8256 cat /dev/null > conftest.in
Chris@41 8257 lt_ac_count=0
Chris@41 8258 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
Chris@41 8259 # Check for GNU sed and select it if it is found.
Chris@41 8260 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
Chris@41 8261 lt_cv_path_SED=$lt_ac_sed
Chris@41 8262 break
Chris@41 8263 fi
Chris@41 8264 while true; do
Chris@41 8265 cat conftest.in conftest.in >conftest.tmp
Chris@41 8266 mv conftest.tmp conftest.in
Chris@41 8267 cp conftest.in conftest.nl
Chris@41 8268 echo >>conftest.nl
Chris@41 8269 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
Chris@41 8270 cmp -s conftest.out conftest.nl || break
Chris@41 8271 # 10000 chars as input seems more than enough
Chris@41 8272 test 10 -lt "$lt_ac_count" && break
Chris@41 8273 lt_ac_count=`expr $lt_ac_count + 1`
Chris@41 8274 if test "$lt_ac_count" -gt "$lt_ac_max"; then
Chris@41 8275 lt_ac_max=$lt_ac_count
Chris@41 8276 lt_cv_path_SED=$lt_ac_sed
Chris@41 8277 fi
Chris@41 8278 done
Chris@41 8279 done
Chris@41 8280 ])
Chris@41 8281 SED=$lt_cv_path_SED
Chris@41 8282 AC_SUBST([SED])
Chris@41 8283 AC_MSG_RESULT([$SED])
Chris@41 8284 ])#AC_PROG_SED
Chris@41 8285 ])#m4_ifndef
Chris@41 8286
Chris@41 8287 # Old name:
Chris@41 8288 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
Chris@41 8289 dnl aclocal-1.4 backwards compatibility:
Chris@41 8290 dnl AC_DEFUN([LT_AC_PROG_SED], [])
Chris@41 8291
Chris@41 8292
Chris@41 8293 # _LT_CHECK_SHELL_FEATURES
Chris@41 8294 # ------------------------
Chris@41 8295 # Find out whether the shell is Bourne or XSI compatible,
Chris@41 8296 # or has some other useful features.
Chris@41 8297 m4_defun([_LT_CHECK_SHELL_FEATURES],
Chris@41 8298 [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
Chris@41 8299 lt_unset=unset
Chris@41 8300 else
Chris@41 8301 lt_unset=false
Chris@41 8302 fi
Chris@41 8303 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
Chris@41 8304
Chris@41 8305 # test EBCDIC or ASCII
Chris@41 8306 case `echo X|tr X '\101'` in
Chris@41 8307 A) # ASCII based system
Chris@41 8308 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
Chris@41 8309 lt_SP2NL='tr \040 \012'
Chris@41 8310 lt_NL2SP='tr \015\012 \040\040'
Chris@41 8311 ;;
Chris@41 8312 *) # EBCDIC based system
Chris@41 8313 lt_SP2NL='tr \100 \n'
Chris@41 8314 lt_NL2SP='tr \r\n \100\100'
Chris@41 8315 ;;
Chris@41 8316 esac
Chris@41 8317 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
Chris@41 8318 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
Chris@41 8319 ])# _LT_CHECK_SHELL_FEATURES
Chris@41 8320
Chris@41 8321
Chris@41 8322 # _LT_PATH_CONVERSION_FUNCTIONS
Chris@41 8323 # -----------------------------
Chris@41 8324 # Determine what file name conversion functions should be used by
Chris@41 8325 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
Chris@41 8326 # for certain cross-compile configurations and native mingw.
Chris@41 8327 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
Chris@41 8328 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@41 8329 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
Chris@41 8330 AC_MSG_CHECKING([how to convert $build file names to $host format])
Chris@41 8331 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
Chris@41 8332 [case $host in
Chris@41 8333 *-*-mingw* )
Chris@41 8334 case $build in
Chris@41 8335 *-*-mingw* ) # actually msys
Chris@41 8336 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
Chris@41 8337 ;;
Chris@41 8338 *-*-cygwin* )
Chris@41 8339 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
Chris@41 8340 ;;
Chris@41 8341 * ) # otherwise, assume *nix
Chris@41 8342 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
Chris@41 8343 ;;
Chris@41 8344 esac
Chris@41 8345 ;;
Chris@41 8346 *-*-cygwin* )
Chris@41 8347 case $build in
Chris@41 8348 *-*-mingw* ) # actually msys
Chris@41 8349 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
Chris@41 8350 ;;
Chris@41 8351 *-*-cygwin* )
Chris@41 8352 lt_cv_to_host_file_cmd=func_convert_file_noop
Chris@41 8353 ;;
Chris@41 8354 * ) # otherwise, assume *nix
Chris@41 8355 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
Chris@41 8356 ;;
Chris@41 8357 esac
Chris@41 8358 ;;
Chris@41 8359 * ) # unhandled hosts (and "normal" native builds)
Chris@41 8360 lt_cv_to_host_file_cmd=func_convert_file_noop
Chris@41 8361 ;;
Chris@41 8362 esac
Chris@41 8363 ])
Chris@41 8364 to_host_file_cmd=$lt_cv_to_host_file_cmd
Chris@41 8365 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
Chris@41 8366 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
Chris@41 8367 [0], [convert $build file names to $host format])dnl
Chris@41 8368
Chris@41 8369 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
Chris@41 8370 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
Chris@41 8371 [#assume ordinary cross tools, or native build.
Chris@41 8372 lt_cv_to_tool_file_cmd=func_convert_file_noop
Chris@41 8373 case $host in
Chris@41 8374 *-*-mingw* )
Chris@41 8375 case $build in
Chris@41 8376 *-*-mingw* ) # actually msys
Chris@41 8377 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
Chris@41 8378 ;;
Chris@41 8379 esac
Chris@41 8380 ;;
Chris@41 8381 esac
Chris@41 8382 ])
Chris@41 8383 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
Chris@41 8384 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
Chris@41 8385 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
Chris@41 8386 [0], [convert $build files to toolchain format])dnl
Chris@41 8387 ])# _LT_PATH_CONVERSION_FUNCTIONS