annotate src/opus-1.3/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 7aeed7906520
children
rev   line source
Chris@69 1 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
Chris@69 2 #
Chris@69 3 # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
Chris@69 4 # Written by Gordon Matzigkeit, 1996
Chris@69 5 #
Chris@69 6 # This file is free software; the Free Software Foundation gives
Chris@69 7 # unlimited permission to copy and/or distribute it, with or without
Chris@69 8 # modifications, as long as this notice is preserved.
Chris@69 9
Chris@69 10 m4_define([_LT_COPYING], [dnl
Chris@69 11 # Copyright (C) 2014 Free Software Foundation, Inc.
Chris@69 12 # This is free software; see the source for copying conditions. There is NO
Chris@69 13 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Chris@69 14
Chris@69 15 # GNU Libtool is free software; you can redistribute it and/or modify
Chris@69 16 # it under the terms of the GNU General Public License as published by
Chris@69 17 # the Free Software Foundation; either version 2 of of the License, or
Chris@69 18 # (at your option) any later version.
Chris@69 19 #
Chris@69 20 # As a special exception to the GNU General Public License, if you
Chris@69 21 # distribute this file as part of a program or library that is built
Chris@69 22 # using GNU Libtool, you may include this file under the same
Chris@69 23 # distribution terms that you use for the rest of that program.
Chris@69 24 #
Chris@69 25 # GNU Libtool is distributed in the hope that it will be useful, but
Chris@69 26 # WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@69 27 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@69 28 # GNU General Public License for more details.
Chris@69 29 #
Chris@69 30 # You should have received a copy of the GNU General Public License
Chris@69 31 # along with this program. If not, see <http://www.gnu.org/licenses/>.
Chris@69 32 ])
Chris@69 33
Chris@69 34 # serial 58 LT_INIT
Chris@69 35
Chris@69 36
Chris@69 37 # LT_PREREQ(VERSION)
Chris@69 38 # ------------------
Chris@69 39 # Complain and exit if this libtool version is less that VERSION.
Chris@69 40 m4_defun([LT_PREREQ],
Chris@69 41 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
Chris@69 42 [m4_default([$3],
Chris@69 43 [m4_fatal([Libtool version $1 or higher is required],
Chris@69 44 63)])],
Chris@69 45 [$2])])
Chris@69 46
Chris@69 47
Chris@69 48 # _LT_CHECK_BUILDDIR
Chris@69 49 # ------------------
Chris@69 50 # Complain if the absolute build directory name contains unusual characters
Chris@69 51 m4_defun([_LT_CHECK_BUILDDIR],
Chris@69 52 [case `pwd` in
Chris@69 53 *\ * | *\ *)
Chris@69 54 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
Chris@69 55 esac
Chris@69 56 ])
Chris@69 57
Chris@69 58
Chris@69 59 # LT_INIT([OPTIONS])
Chris@69 60 # ------------------
Chris@69 61 AC_DEFUN([LT_INIT],
Chris@69 62 [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
Chris@69 63 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
Chris@69 64 AC_BEFORE([$0], [LT_LANG])dnl
Chris@69 65 AC_BEFORE([$0], [LT_OUTPUT])dnl
Chris@69 66 AC_BEFORE([$0], [LTDL_INIT])dnl
Chris@69 67 m4_require([_LT_CHECK_BUILDDIR])dnl
Chris@69 68
Chris@69 69 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
Chris@69 70 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
Chris@69 71 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
Chris@69 72 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
Chris@69 73 dnl unless we require an AC_DEFUNed macro:
Chris@69 74 AC_REQUIRE([LTOPTIONS_VERSION])dnl
Chris@69 75 AC_REQUIRE([LTSUGAR_VERSION])dnl
Chris@69 76 AC_REQUIRE([LTVERSION_VERSION])dnl
Chris@69 77 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
Chris@69 78 m4_require([_LT_PROG_LTMAIN])dnl
Chris@69 79
Chris@69 80 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
Chris@69 81
Chris@69 82 dnl Parse OPTIONS
Chris@69 83 _LT_SET_OPTIONS([$0], [$1])
Chris@69 84
Chris@69 85 # This can be used to rebuild libtool when needed
Chris@69 86 LIBTOOL_DEPS=$ltmain
Chris@69 87
Chris@69 88 # Always use our own libtool.
Chris@69 89 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
Chris@69 90 AC_SUBST(LIBTOOL)dnl
Chris@69 91
Chris@69 92 _LT_SETUP
Chris@69 93
Chris@69 94 # Only expand once:
Chris@69 95 m4_define([LT_INIT])
Chris@69 96 ])# LT_INIT
Chris@69 97
Chris@69 98 # Old names:
Chris@69 99 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
Chris@69 100 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
Chris@69 101 dnl aclocal-1.4 backwards compatibility:
Chris@69 102 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
Chris@69 103 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
Chris@69 104
Chris@69 105
Chris@69 106 # _LT_PREPARE_CC_BASENAME
Chris@69 107 # -----------------------
Chris@69 108 m4_defun([_LT_PREPARE_CC_BASENAME], [
Chris@69 109 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
Chris@69 110 func_cc_basename ()
Chris@69 111 {
Chris@69 112 for cc_temp in @S|@*""; do
Chris@69 113 case $cc_temp in
Chris@69 114 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
Chris@69 115 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
Chris@69 116 \-*) ;;
Chris@69 117 *) break;;
Chris@69 118 esac
Chris@69 119 done
Chris@69 120 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
Chris@69 121 }
Chris@69 122 ])# _LT_PREPARE_CC_BASENAME
Chris@69 123
Chris@69 124
Chris@69 125 # _LT_CC_BASENAME(CC)
Chris@69 126 # -------------------
Chris@69 127 # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
Chris@69 128 # but that macro is also expanded into generated libtool script, which
Chris@69 129 # arranges for $SED and $ECHO to be set by different means.
Chris@69 130 m4_defun([_LT_CC_BASENAME],
Chris@69 131 [m4_require([_LT_PREPARE_CC_BASENAME])dnl
Chris@69 132 AC_REQUIRE([_LT_DECL_SED])dnl
Chris@69 133 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
Chris@69 134 func_cc_basename $1
Chris@69 135 cc_basename=$func_cc_basename_result
Chris@69 136 ])
Chris@69 137
Chris@69 138
Chris@69 139 # _LT_FILEUTILS_DEFAULTS
Chris@69 140 # ----------------------
Chris@69 141 # It is okay to use these file commands and assume they have been set
Chris@69 142 # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
Chris@69 143 m4_defun([_LT_FILEUTILS_DEFAULTS],
Chris@69 144 [: ${CP="cp -f"}
Chris@69 145 : ${MV="mv -f"}
Chris@69 146 : ${RM="rm -f"}
Chris@69 147 ])# _LT_FILEUTILS_DEFAULTS
Chris@69 148
Chris@69 149
Chris@69 150 # _LT_SETUP
Chris@69 151 # ---------
Chris@69 152 m4_defun([_LT_SETUP],
Chris@69 153 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@69 154 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
Chris@69 155 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
Chris@69 156 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
Chris@69 157
Chris@69 158 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
Chris@69 159 dnl
Chris@69 160 _LT_DECL([], [host_alias], [0], [The host system])dnl
Chris@69 161 _LT_DECL([], [host], [0])dnl
Chris@69 162 _LT_DECL([], [host_os], [0])dnl
Chris@69 163 dnl
Chris@69 164 _LT_DECL([], [build_alias], [0], [The build system])dnl
Chris@69 165 _LT_DECL([], [build], [0])dnl
Chris@69 166 _LT_DECL([], [build_os], [0])dnl
Chris@69 167 dnl
Chris@69 168 AC_REQUIRE([AC_PROG_CC])dnl
Chris@69 169 AC_REQUIRE([LT_PATH_LD])dnl
Chris@69 170 AC_REQUIRE([LT_PATH_NM])dnl
Chris@69 171 dnl
Chris@69 172 AC_REQUIRE([AC_PROG_LN_S])dnl
Chris@69 173 test -z "$LN_S" && LN_S="ln -s"
Chris@69 174 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
Chris@69 175 dnl
Chris@69 176 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
Chris@69 177 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
Chris@69 178 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
Chris@69 179 dnl
Chris@69 180 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@69 181 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
Chris@69 182 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
Chris@69 183 m4_require([_LT_CMD_RELOAD])dnl
Chris@69 184 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
Chris@69 185 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
Chris@69 186 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
Chris@69 187 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
Chris@69 188 m4_require([_LT_WITH_SYSROOT])dnl
Chris@69 189 m4_require([_LT_CMD_TRUNCATE])dnl
Chris@69 190
Chris@69 191 _LT_CONFIG_LIBTOOL_INIT([
Chris@69 192 # See if we are running on zsh, and set the options that allow our
Chris@69 193 # commands through without removal of \ escapes INIT.
Chris@69 194 if test -n "\${ZSH_VERSION+set}"; then
Chris@69 195 setopt NO_GLOB_SUBST
Chris@69 196 fi
Chris@69 197 ])
Chris@69 198 if test -n "${ZSH_VERSION+set}"; then
Chris@69 199 setopt NO_GLOB_SUBST
Chris@69 200 fi
Chris@69 201
Chris@69 202 _LT_CHECK_OBJDIR
Chris@69 203
Chris@69 204 m4_require([_LT_TAG_COMPILER])dnl
Chris@69 205
Chris@69 206 case $host_os in
Chris@69 207 aix3*)
Chris@69 208 # AIX sometimes has problems with the GCC collect2 program. For some
Chris@69 209 # reason, if we set the COLLECT_NAMES environment variable, the problems
Chris@69 210 # vanish in a puff of smoke.
Chris@69 211 if test set != "${COLLECT_NAMES+set}"; then
Chris@69 212 COLLECT_NAMES=
Chris@69 213 export COLLECT_NAMES
Chris@69 214 fi
Chris@69 215 ;;
Chris@69 216 esac
Chris@69 217
Chris@69 218 # Global variables:
Chris@69 219 ofile=libtool
Chris@69 220 can_build_shared=yes
Chris@69 221
Chris@69 222 # All known linkers require a '.a' archive for static linking (except MSVC,
Chris@69 223 # which needs '.lib').
Chris@69 224 libext=a
Chris@69 225
Chris@69 226 with_gnu_ld=$lt_cv_prog_gnu_ld
Chris@69 227
Chris@69 228 old_CC=$CC
Chris@69 229 old_CFLAGS=$CFLAGS
Chris@69 230
Chris@69 231 # Set sane defaults for various variables
Chris@69 232 test -z "$CC" && CC=cc
Chris@69 233 test -z "$LTCC" && LTCC=$CC
Chris@69 234 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
Chris@69 235 test -z "$LD" && LD=ld
Chris@69 236 test -z "$ac_objext" && ac_objext=o
Chris@69 237
Chris@69 238 _LT_CC_BASENAME([$compiler])
Chris@69 239
Chris@69 240 # Only perform the check for file, if the check method requires it
Chris@69 241 test -z "$MAGIC_CMD" && MAGIC_CMD=file
Chris@69 242 case $deplibs_check_method in
Chris@69 243 file_magic*)
Chris@69 244 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
Chris@69 245 _LT_PATH_MAGIC
Chris@69 246 fi
Chris@69 247 ;;
Chris@69 248 esac
Chris@69 249
Chris@69 250 # Use C for the default configuration in the libtool script
Chris@69 251 LT_SUPPORTED_TAG([CC])
Chris@69 252 _LT_LANG_C_CONFIG
Chris@69 253 _LT_LANG_DEFAULT_CONFIG
Chris@69 254 _LT_CONFIG_COMMANDS
Chris@69 255 ])# _LT_SETUP
Chris@69 256
Chris@69 257
Chris@69 258 # _LT_PREPARE_SED_QUOTE_VARS
Chris@69 259 # --------------------------
Chris@69 260 # Define a few sed substitution that help us do robust quoting.
Chris@69 261 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
Chris@69 262 [# Backslashify metacharacters that are still active within
Chris@69 263 # double-quoted strings.
Chris@69 264 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
Chris@69 265
Chris@69 266 # Same as above, but do not quote variable references.
Chris@69 267 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
Chris@69 268
Chris@69 269 # Sed substitution to delay expansion of an escaped shell variable in a
Chris@69 270 # double_quote_subst'ed string.
Chris@69 271 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
Chris@69 272
Chris@69 273 # Sed substitution to delay expansion of an escaped single quote.
Chris@69 274 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
Chris@69 275
Chris@69 276 # Sed substitution to avoid accidental globbing in evaled expressions
Chris@69 277 no_glob_subst='s/\*/\\\*/g'
Chris@69 278 ])
Chris@69 279
Chris@69 280 # _LT_PROG_LTMAIN
Chris@69 281 # ---------------
Chris@69 282 # Note that this code is called both from 'configure', and 'config.status'
Chris@69 283 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
Chris@69 284 # 'config.status' has no value for ac_aux_dir unless we are using Automake,
Chris@69 285 # so we pass a copy along to make sure it has a sensible value anyway.
Chris@69 286 m4_defun([_LT_PROG_LTMAIN],
Chris@69 287 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
Chris@69 288 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
Chris@69 289 ltmain=$ac_aux_dir/ltmain.sh
Chris@69 290 ])# _LT_PROG_LTMAIN
Chris@69 291
Chris@69 292
Chris@69 293 ## ------------------------------------- ##
Chris@69 294 ## Accumulate code for creating libtool. ##
Chris@69 295 ## ------------------------------------- ##
Chris@69 296
Chris@69 297 # So that we can recreate a full libtool script including additional
Chris@69 298 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
Chris@69 299 # in macros and then make a single call at the end using the 'libtool'
Chris@69 300 # label.
Chris@69 301
Chris@69 302
Chris@69 303 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
Chris@69 304 # ----------------------------------------
Chris@69 305 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
Chris@69 306 m4_define([_LT_CONFIG_LIBTOOL_INIT],
Chris@69 307 [m4_ifval([$1],
Chris@69 308 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
Chris@69 309 [$1
Chris@69 310 ])])])
Chris@69 311
Chris@69 312 # Initialize.
Chris@69 313 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
Chris@69 314
Chris@69 315
Chris@69 316 # _LT_CONFIG_LIBTOOL([COMMANDS])
Chris@69 317 # ------------------------------
Chris@69 318 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
Chris@69 319 m4_define([_LT_CONFIG_LIBTOOL],
Chris@69 320 [m4_ifval([$1],
Chris@69 321 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
Chris@69 322 [$1
Chris@69 323 ])])])
Chris@69 324
Chris@69 325 # Initialize.
Chris@69 326 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
Chris@69 327
Chris@69 328
Chris@69 329 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
Chris@69 330 # -----------------------------------------------------
Chris@69 331 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
Chris@69 332 [_LT_CONFIG_LIBTOOL([$1])
Chris@69 333 _LT_CONFIG_LIBTOOL_INIT([$2])
Chris@69 334 ])
Chris@69 335
Chris@69 336
Chris@69 337 # _LT_FORMAT_COMMENT([COMMENT])
Chris@69 338 # -----------------------------
Chris@69 339 # Add leading comment marks to the start of each line, and a trailing
Chris@69 340 # full-stop to the whole comment if one is not present already.
Chris@69 341 m4_define([_LT_FORMAT_COMMENT],
Chris@69 342 [m4_ifval([$1], [
Chris@69 343 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
Chris@69 344 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
Chris@69 345 )])
Chris@69 346
Chris@69 347
Chris@69 348
Chris@69 349 ## ------------------------ ##
Chris@69 350 ## FIXME: Eliminate VARNAME ##
Chris@69 351 ## ------------------------ ##
Chris@69 352
Chris@69 353
Chris@69 354 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
Chris@69 355 # -------------------------------------------------------------------
Chris@69 356 # CONFIGNAME is the name given to the value in the libtool script.
Chris@69 357 # VARNAME is the (base) name used in the configure script.
Chris@69 358 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
Chris@69 359 # VARNAME. Any other value will be used directly.
Chris@69 360 m4_define([_LT_DECL],
Chris@69 361 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
Chris@69 362 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
Chris@69 363 [m4_ifval([$1], [$1], [$2])])
Chris@69 364 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
Chris@69 365 m4_ifval([$4],
Chris@69 366 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
Chris@69 367 lt_dict_add_subkey([lt_decl_dict], [$2],
Chris@69 368 [tagged?], [m4_ifval([$5], [yes], [no])])])
Chris@69 369 ])
Chris@69 370
Chris@69 371
Chris@69 372 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
Chris@69 373 # --------------------------------------------------------
Chris@69 374 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
Chris@69 375
Chris@69 376
Chris@69 377 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
Chris@69 378 # ------------------------------------------------
Chris@69 379 m4_define([lt_decl_tag_varnames],
Chris@69 380 [_lt_decl_filter([tagged?], [yes], $@)])
Chris@69 381
Chris@69 382
Chris@69 383 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
Chris@69 384 # ---------------------------------------------------------
Chris@69 385 m4_define([_lt_decl_filter],
Chris@69 386 [m4_case([$#],
Chris@69 387 [0], [m4_fatal([$0: too few arguments: $#])],
Chris@69 388 [1], [m4_fatal([$0: too few arguments: $#: $1])],
Chris@69 389 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
Chris@69 390 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
Chris@69 391 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
Chris@69 392 ])
Chris@69 393
Chris@69 394
Chris@69 395 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
Chris@69 396 # --------------------------------------------------
Chris@69 397 m4_define([lt_decl_quote_varnames],
Chris@69 398 [_lt_decl_filter([value], [1], $@)])
Chris@69 399
Chris@69 400
Chris@69 401 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
Chris@69 402 # ---------------------------------------------------
Chris@69 403 m4_define([lt_decl_dquote_varnames],
Chris@69 404 [_lt_decl_filter([value], [2], $@)])
Chris@69 405
Chris@69 406
Chris@69 407 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
Chris@69 408 # ---------------------------------------------------
Chris@69 409 m4_define([lt_decl_varnames_tagged],
Chris@69 410 [m4_assert([$# <= 2])dnl
Chris@69 411 _$0(m4_quote(m4_default([$1], [[, ]])),
Chris@69 412 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
Chris@69 413 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
Chris@69 414 m4_define([_lt_decl_varnames_tagged],
Chris@69 415 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
Chris@69 416
Chris@69 417
Chris@69 418 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
Chris@69 419 # ------------------------------------------------
Chris@69 420 m4_define([lt_decl_all_varnames],
Chris@69 421 [_$0(m4_quote(m4_default([$1], [[, ]])),
Chris@69 422 m4_if([$2], [],
Chris@69 423 m4_quote(lt_decl_varnames),
Chris@69 424 m4_quote(m4_shift($@))))[]dnl
Chris@69 425 ])
Chris@69 426 m4_define([_lt_decl_all_varnames],
Chris@69 427 [lt_join($@, lt_decl_varnames_tagged([$1],
Chris@69 428 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
Chris@69 429 ])
Chris@69 430
Chris@69 431
Chris@69 432 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
Chris@69 433 # ------------------------------------
Chris@69 434 # Quote a variable value, and forward it to 'config.status' so that its
Chris@69 435 # declaration there will have the same value as in 'configure'. VARNAME
Chris@69 436 # must have a single quote delimited value for this to work.
Chris@69 437 m4_define([_LT_CONFIG_STATUS_DECLARE],
Chris@69 438 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
Chris@69 439
Chris@69 440
Chris@69 441 # _LT_CONFIG_STATUS_DECLARATIONS
Chris@69 442 # ------------------------------
Chris@69 443 # We delimit libtool config variables with single quotes, so when
Chris@69 444 # we write them to config.status, we have to be sure to quote all
Chris@69 445 # embedded single quotes properly. In configure, this macro expands
Chris@69 446 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
Chris@69 447 #
Chris@69 448 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
Chris@69 449 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
Chris@69 450 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
Chris@69 451 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
Chris@69 452
Chris@69 453
Chris@69 454 # _LT_LIBTOOL_TAGS
Chris@69 455 # ----------------
Chris@69 456 # Output comment and list of tags supported by the script
Chris@69 457 m4_defun([_LT_LIBTOOL_TAGS],
Chris@69 458 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
Chris@69 459 available_tags='_LT_TAGS'dnl
Chris@69 460 ])
Chris@69 461
Chris@69 462
Chris@69 463 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
Chris@69 464 # -----------------------------------
Chris@69 465 # Extract the dictionary values for VARNAME (optionally with TAG) and
Chris@69 466 # expand to a commented shell variable setting:
Chris@69 467 #
Chris@69 468 # # Some comment about what VAR is for.
Chris@69 469 # visible_name=$lt_internal_name
Chris@69 470 m4_define([_LT_LIBTOOL_DECLARE],
Chris@69 471 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
Chris@69 472 [description])))[]dnl
Chris@69 473 m4_pushdef([_libtool_name],
Chris@69 474 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
Chris@69 475 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
Chris@69 476 [0], [_libtool_name=[$]$1],
Chris@69 477 [1], [_libtool_name=$lt_[]$1],
Chris@69 478 [2], [_libtool_name=$lt_[]$1],
Chris@69 479 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
Chris@69 480 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
Chris@69 481 ])
Chris@69 482
Chris@69 483
Chris@69 484 # _LT_LIBTOOL_CONFIG_VARS
Chris@69 485 # -----------------------
Chris@69 486 # Produce commented declarations of non-tagged libtool config variables
Chris@69 487 # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
Chris@69 488 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
Chris@69 489 # section) are produced by _LT_LIBTOOL_TAG_VARS.
Chris@69 490 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
Chris@69 491 [m4_foreach([_lt_var],
Chris@69 492 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
Chris@69 493 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
Chris@69 494
Chris@69 495
Chris@69 496 # _LT_LIBTOOL_TAG_VARS(TAG)
Chris@69 497 # -------------------------
Chris@69 498 m4_define([_LT_LIBTOOL_TAG_VARS],
Chris@69 499 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
Chris@69 500 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
Chris@69 501
Chris@69 502
Chris@69 503 # _LT_TAGVAR(VARNAME, [TAGNAME])
Chris@69 504 # ------------------------------
Chris@69 505 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
Chris@69 506
Chris@69 507
Chris@69 508 # _LT_CONFIG_COMMANDS
Chris@69 509 # -------------------
Chris@69 510 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
Chris@69 511 # variables for single and double quote escaping we saved from calls
Chris@69 512 # to _LT_DECL, we can put quote escaped variables declarations
Chris@69 513 # into 'config.status', and then the shell code to quote escape them in
Chris@69 514 # for loops in 'config.status'. Finally, any additional code accumulated
Chris@69 515 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
Chris@69 516 m4_defun([_LT_CONFIG_COMMANDS],
Chris@69 517 [AC_PROVIDE_IFELSE([LT_OUTPUT],
Chris@69 518 dnl If the libtool generation code has been placed in $CONFIG_LT,
Chris@69 519 dnl instead of duplicating it all over again into config.status,
Chris@69 520 dnl then we will have config.status run $CONFIG_LT later, so it
Chris@69 521 dnl needs to know what name is stored there:
Chris@69 522 [AC_CONFIG_COMMANDS([libtool],
Chris@69 523 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
Chris@69 524 dnl If the libtool generation code is destined for config.status,
Chris@69 525 dnl expand the accumulated commands and init code now:
Chris@69 526 [AC_CONFIG_COMMANDS([libtool],
Chris@69 527 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
Chris@69 528 ])#_LT_CONFIG_COMMANDS
Chris@69 529
Chris@69 530
Chris@69 531 # Initialize.
Chris@69 532 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
Chris@69 533 [
Chris@69 534
Chris@69 535 # The HP-UX ksh and POSIX shell print the target directory to stdout
Chris@69 536 # if CDPATH is set.
Chris@69 537 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
Chris@69 538
Chris@69 539 sed_quote_subst='$sed_quote_subst'
Chris@69 540 double_quote_subst='$double_quote_subst'
Chris@69 541 delay_variable_subst='$delay_variable_subst'
Chris@69 542 _LT_CONFIG_STATUS_DECLARATIONS
Chris@69 543 LTCC='$LTCC'
Chris@69 544 LTCFLAGS='$LTCFLAGS'
Chris@69 545 compiler='$compiler_DEFAULT'
Chris@69 546
Chris@69 547 # A function that is used when there is no print builtin or printf.
Chris@69 548 func_fallback_echo ()
Chris@69 549 {
Chris@69 550 eval 'cat <<_LTECHO_EOF
Chris@69 551 \$[]1
Chris@69 552 _LTECHO_EOF'
Chris@69 553 }
Chris@69 554
Chris@69 555 # Quote evaled strings.
Chris@69 556 for var in lt_decl_all_varnames([[ \
Chris@69 557 ]], lt_decl_quote_varnames); do
Chris@69 558 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
Chris@69 559 *[[\\\\\\\`\\"\\\$]]*)
Chris@69 560 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
Chris@69 561 ;;
Chris@69 562 *)
Chris@69 563 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
Chris@69 564 ;;
Chris@69 565 esac
Chris@69 566 done
Chris@69 567
Chris@69 568 # Double-quote double-evaled strings.
Chris@69 569 for var in lt_decl_all_varnames([[ \
Chris@69 570 ]], lt_decl_dquote_varnames); do
Chris@69 571 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
Chris@69 572 *[[\\\\\\\`\\"\\\$]]*)
Chris@69 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@69 574 ;;
Chris@69 575 *)
Chris@69 576 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
Chris@69 577 ;;
Chris@69 578 esac
Chris@69 579 done
Chris@69 580
Chris@69 581 _LT_OUTPUT_LIBTOOL_INIT
Chris@69 582 ])
Chris@69 583
Chris@69 584 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
Chris@69 585 # ------------------------------------
Chris@69 586 # Generate a child script FILE with all initialization necessary to
Chris@69 587 # reuse the environment learned by the parent script, and make the
Chris@69 588 # file executable. If COMMENT is supplied, it is inserted after the
Chris@69 589 # '#!' sequence but before initialization text begins. After this
Chris@69 590 # macro, additional text can be appended to FILE to form the body of
Chris@69 591 # the child script. The macro ends with non-zero status if the
Chris@69 592 # file could not be fully written (such as if the disk is full).
Chris@69 593 m4_ifdef([AS_INIT_GENERATED],
Chris@69 594 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
Chris@69 595 [m4_defun([_LT_GENERATED_FILE_INIT],
Chris@69 596 [m4_require([AS_PREPARE])]dnl
Chris@69 597 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
Chris@69 598 [lt_write_fail=0
Chris@69 599 cat >$1 <<_ASEOF || lt_write_fail=1
Chris@69 600 #! $SHELL
Chris@69 601 # Generated by $as_me.
Chris@69 602 $2
Chris@69 603 SHELL=\${CONFIG_SHELL-$SHELL}
Chris@69 604 export SHELL
Chris@69 605 _ASEOF
Chris@69 606 cat >>$1 <<\_ASEOF || lt_write_fail=1
Chris@69 607 AS_SHELL_SANITIZE
Chris@69 608 _AS_PREPARE
Chris@69 609 exec AS_MESSAGE_FD>&1
Chris@69 610 _ASEOF
Chris@69 611 test 0 = "$lt_write_fail" && chmod +x $1[]dnl
Chris@69 612 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
Chris@69 613
Chris@69 614 # LT_OUTPUT
Chris@69 615 # ---------
Chris@69 616 # This macro allows early generation of the libtool script (before
Chris@69 617 # AC_OUTPUT is called), incase it is used in configure for compilation
Chris@69 618 # tests.
Chris@69 619 AC_DEFUN([LT_OUTPUT],
Chris@69 620 [: ${CONFIG_LT=./config.lt}
Chris@69 621 AC_MSG_NOTICE([creating $CONFIG_LT])
Chris@69 622 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
Chris@69 623 [# Run this file to recreate a libtool stub with the current configuration.])
Chris@69 624
Chris@69 625 cat >>"$CONFIG_LT" <<\_LTEOF
Chris@69 626 lt_cl_silent=false
Chris@69 627 exec AS_MESSAGE_LOG_FD>>config.log
Chris@69 628 {
Chris@69 629 echo
Chris@69 630 AS_BOX([Running $as_me.])
Chris@69 631 } >&AS_MESSAGE_LOG_FD
Chris@69 632
Chris@69 633 lt_cl_help="\
Chris@69 634 '$as_me' creates a local libtool stub from the current configuration,
Chris@69 635 for use in further configure time tests before the real libtool is
Chris@69 636 generated.
Chris@69 637
Chris@69 638 Usage: $[0] [[OPTIONS]]
Chris@69 639
Chris@69 640 -h, --help print this help, then exit
Chris@69 641 -V, --version print version number, then exit
Chris@69 642 -q, --quiet do not print progress messages
Chris@69 643 -d, --debug don't remove temporary files
Chris@69 644
Chris@69 645 Report bugs to <bug-libtool@gnu.org>."
Chris@69 646
Chris@69 647 lt_cl_version="\
Chris@69 648 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
Chris@69 649 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
Chris@69 650 configured by $[0], generated by m4_PACKAGE_STRING.
Chris@69 651
Chris@69 652 Copyright (C) 2011 Free Software Foundation, Inc.
Chris@69 653 This config.lt script is free software; the Free Software Foundation
Chris@69 654 gives unlimited permision to copy, distribute and modify it."
Chris@69 655
Chris@69 656 while test 0 != $[#]
Chris@69 657 do
Chris@69 658 case $[1] in
Chris@69 659 --version | --v* | -V )
Chris@69 660 echo "$lt_cl_version"; exit 0 ;;
Chris@69 661 --help | --h* | -h )
Chris@69 662 echo "$lt_cl_help"; exit 0 ;;
Chris@69 663 --debug | --d* | -d )
Chris@69 664 debug=: ;;
Chris@69 665 --quiet | --q* | --silent | --s* | -q )
Chris@69 666 lt_cl_silent=: ;;
Chris@69 667
Chris@69 668 -*) AC_MSG_ERROR([unrecognized option: $[1]
Chris@69 669 Try '$[0] --help' for more information.]) ;;
Chris@69 670
Chris@69 671 *) AC_MSG_ERROR([unrecognized argument: $[1]
Chris@69 672 Try '$[0] --help' for more information.]) ;;
Chris@69 673 esac
Chris@69 674 shift
Chris@69 675 done
Chris@69 676
Chris@69 677 if $lt_cl_silent; then
Chris@69 678 exec AS_MESSAGE_FD>/dev/null
Chris@69 679 fi
Chris@69 680 _LTEOF
Chris@69 681
Chris@69 682 cat >>"$CONFIG_LT" <<_LTEOF
Chris@69 683 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
Chris@69 684 _LTEOF
Chris@69 685
Chris@69 686 cat >>"$CONFIG_LT" <<\_LTEOF
Chris@69 687 AC_MSG_NOTICE([creating $ofile])
Chris@69 688 _LT_OUTPUT_LIBTOOL_COMMANDS
Chris@69 689 AS_EXIT(0)
Chris@69 690 _LTEOF
Chris@69 691 chmod +x "$CONFIG_LT"
Chris@69 692
Chris@69 693 # configure is writing to config.log, but config.lt does its own redirection,
Chris@69 694 # appending to config.log, which fails on DOS, as config.log is still kept
Chris@69 695 # open by configure. Here we exec the FD to /dev/null, effectively closing
Chris@69 696 # config.log, so it can be properly (re)opened and appended to by config.lt.
Chris@69 697 lt_cl_success=:
Chris@69 698 test yes = "$silent" &&
Chris@69 699 lt_config_lt_args="$lt_config_lt_args --quiet"
Chris@69 700 exec AS_MESSAGE_LOG_FD>/dev/null
Chris@69 701 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
Chris@69 702 exec AS_MESSAGE_LOG_FD>>config.log
Chris@69 703 $lt_cl_success || AS_EXIT(1)
Chris@69 704 ])# LT_OUTPUT
Chris@69 705
Chris@69 706
Chris@69 707 # _LT_CONFIG(TAG)
Chris@69 708 # ---------------
Chris@69 709 # If TAG is the built-in tag, create an initial libtool script with a
Chris@69 710 # default configuration from the untagged config vars. Otherwise add code
Chris@69 711 # to config.status for appending the configuration named by TAG from the
Chris@69 712 # matching tagged config vars.
Chris@69 713 m4_defun([_LT_CONFIG],
Chris@69 714 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@69 715 _LT_CONFIG_SAVE_COMMANDS([
Chris@69 716 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
Chris@69 717 m4_if(_LT_TAG, [C], [
Chris@69 718 # See if we are running on zsh, and set the options that allow our
Chris@69 719 # commands through without removal of \ escapes.
Chris@69 720 if test -n "${ZSH_VERSION+set}"; then
Chris@69 721 setopt NO_GLOB_SUBST
Chris@69 722 fi
Chris@69 723
Chris@69 724 cfgfile=${ofile}T
Chris@69 725 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
Chris@69 726 $RM "$cfgfile"
Chris@69 727
Chris@69 728 cat <<_LT_EOF >> "$cfgfile"
Chris@69 729 #! $SHELL
Chris@69 730 # Generated automatically by $as_me ($PACKAGE) $VERSION
Chris@69 731 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
Chris@69 732 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
Chris@69 733
Chris@69 734 # Provide generalized library-building support services.
Chris@69 735 # Written by Gordon Matzigkeit, 1996
Chris@69 736
Chris@69 737 _LT_COPYING
Chris@69 738 _LT_LIBTOOL_TAGS
Chris@69 739
Chris@69 740 # Configured defaults for sys_lib_dlsearch_path munging.
Chris@69 741 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
Chris@69 742
Chris@69 743 # ### BEGIN LIBTOOL CONFIG
Chris@69 744 _LT_LIBTOOL_CONFIG_VARS
Chris@69 745 _LT_LIBTOOL_TAG_VARS
Chris@69 746 # ### END LIBTOOL CONFIG
Chris@69 747
Chris@69 748 _LT_EOF
Chris@69 749
Chris@69 750 cat <<'_LT_EOF' >> "$cfgfile"
Chris@69 751
Chris@69 752 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
Chris@69 753
Chris@69 754 _LT_PREPARE_MUNGE_PATH_LIST
Chris@69 755 _LT_PREPARE_CC_BASENAME
Chris@69 756
Chris@69 757 # ### END FUNCTIONS SHARED WITH CONFIGURE
Chris@69 758
Chris@69 759 _LT_EOF
Chris@69 760
Chris@69 761 case $host_os in
Chris@69 762 aix3*)
Chris@69 763 cat <<\_LT_EOF >> "$cfgfile"
Chris@69 764 # AIX sometimes has problems with the GCC collect2 program. For some
Chris@69 765 # reason, if we set the COLLECT_NAMES environment variable, the problems
Chris@69 766 # vanish in a puff of smoke.
Chris@69 767 if test set != "${COLLECT_NAMES+set}"; then
Chris@69 768 COLLECT_NAMES=
Chris@69 769 export COLLECT_NAMES
Chris@69 770 fi
Chris@69 771 _LT_EOF
Chris@69 772 ;;
Chris@69 773 esac
Chris@69 774
Chris@69 775 _LT_PROG_LTMAIN
Chris@69 776
Chris@69 777 # We use sed instead of cat because bash on DJGPP gets confused if
Chris@69 778 # if finds mixed CR/LF and LF-only lines. Since sed operates in
Chris@69 779 # text mode, it properly converts lines to CR/LF. This bash problem
Chris@69 780 # is reportedly fixed, but why not run on old versions too?
Chris@69 781 sed '$q' "$ltmain" >> "$cfgfile" \
Chris@69 782 || (rm -f "$cfgfile"; exit 1)
Chris@69 783
Chris@69 784 mv -f "$cfgfile" "$ofile" ||
Chris@69 785 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
Chris@69 786 chmod +x "$ofile"
Chris@69 787 ],
Chris@69 788 [cat <<_LT_EOF >> "$ofile"
Chris@69 789
Chris@69 790 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
Chris@69 791 dnl in a comment (ie after a #).
Chris@69 792 # ### BEGIN LIBTOOL TAG CONFIG: $1
Chris@69 793 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
Chris@69 794 # ### END LIBTOOL TAG CONFIG: $1
Chris@69 795 _LT_EOF
Chris@69 796 ])dnl /m4_if
Chris@69 797 ],
Chris@69 798 [m4_if([$1], [], [
Chris@69 799 PACKAGE='$PACKAGE'
Chris@69 800 VERSION='$VERSION'
Chris@69 801 RM='$RM'
Chris@69 802 ofile='$ofile'], [])
Chris@69 803 ])dnl /_LT_CONFIG_SAVE_COMMANDS
Chris@69 804 ])# _LT_CONFIG
Chris@69 805
Chris@69 806
Chris@69 807 # LT_SUPPORTED_TAG(TAG)
Chris@69 808 # ---------------------
Chris@69 809 # Trace this macro to discover what tags are supported by the libtool
Chris@69 810 # --tag option, using:
Chris@69 811 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
Chris@69 812 AC_DEFUN([LT_SUPPORTED_TAG], [])
Chris@69 813
Chris@69 814
Chris@69 815 # C support is built-in for now
Chris@69 816 m4_define([_LT_LANG_C_enabled], [])
Chris@69 817 m4_define([_LT_TAGS], [])
Chris@69 818
Chris@69 819
Chris@69 820 # LT_LANG(LANG)
Chris@69 821 # -------------
Chris@69 822 # Enable libtool support for the given language if not already enabled.
Chris@69 823 AC_DEFUN([LT_LANG],
Chris@69 824 [AC_BEFORE([$0], [LT_OUTPUT])dnl
Chris@69 825 m4_case([$1],
Chris@69 826 [C], [_LT_LANG(C)],
Chris@69 827 [C++], [_LT_LANG(CXX)],
Chris@69 828 [Go], [_LT_LANG(GO)],
Chris@69 829 [Java], [_LT_LANG(GCJ)],
Chris@69 830 [Fortran 77], [_LT_LANG(F77)],
Chris@69 831 [Fortran], [_LT_LANG(FC)],
Chris@69 832 [Windows Resource], [_LT_LANG(RC)],
Chris@69 833 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
Chris@69 834 [_LT_LANG($1)],
Chris@69 835 [m4_fatal([$0: unsupported language: "$1"])])])dnl
Chris@69 836 ])# LT_LANG
Chris@69 837
Chris@69 838
Chris@69 839 # _LT_LANG(LANGNAME)
Chris@69 840 # ------------------
Chris@69 841 m4_defun([_LT_LANG],
Chris@69 842 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
Chris@69 843 [LT_SUPPORTED_TAG([$1])dnl
Chris@69 844 m4_append([_LT_TAGS], [$1 ])dnl
Chris@69 845 m4_define([_LT_LANG_]$1[_enabled], [])dnl
Chris@69 846 _LT_LANG_$1_CONFIG($1)])dnl
Chris@69 847 ])# _LT_LANG
Chris@69 848
Chris@69 849
Chris@69 850 m4_ifndef([AC_PROG_GO], [
Chris@69 851 ############################################################
Chris@69 852 # NOTE: This macro has been submitted for inclusion into #
Chris@69 853 # GNU Autoconf as AC_PROG_GO. When it is available in #
Chris@69 854 # a released version of Autoconf we should remove this #
Chris@69 855 # macro and use it instead. #
Chris@69 856 ############################################################
Chris@69 857 m4_defun([AC_PROG_GO],
Chris@69 858 [AC_LANG_PUSH(Go)dnl
Chris@69 859 AC_ARG_VAR([GOC], [Go compiler command])dnl
Chris@69 860 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
Chris@69 861 _AC_ARG_VAR_LDFLAGS()dnl
Chris@69 862 AC_CHECK_TOOL(GOC, gccgo)
Chris@69 863 if test -z "$GOC"; then
Chris@69 864 if test -n "$ac_tool_prefix"; then
Chris@69 865 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
Chris@69 866 fi
Chris@69 867 fi
Chris@69 868 if test -z "$GOC"; then
Chris@69 869 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
Chris@69 870 fi
Chris@69 871 ])#m4_defun
Chris@69 872 ])#m4_ifndef
Chris@69 873
Chris@69 874
Chris@69 875 # _LT_LANG_DEFAULT_CONFIG
Chris@69 876 # -----------------------
Chris@69 877 m4_defun([_LT_LANG_DEFAULT_CONFIG],
Chris@69 878 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
Chris@69 879 [LT_LANG(CXX)],
Chris@69 880 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
Chris@69 881
Chris@69 882 AC_PROVIDE_IFELSE([AC_PROG_F77],
Chris@69 883 [LT_LANG(F77)],
Chris@69 884 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
Chris@69 885
Chris@69 886 AC_PROVIDE_IFELSE([AC_PROG_FC],
Chris@69 887 [LT_LANG(FC)],
Chris@69 888 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
Chris@69 889
Chris@69 890 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
Chris@69 891 dnl pulling things in needlessly.
Chris@69 892 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
Chris@69 893 [LT_LANG(GCJ)],
Chris@69 894 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
Chris@69 895 [LT_LANG(GCJ)],
Chris@69 896 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
Chris@69 897 [LT_LANG(GCJ)],
Chris@69 898 [m4_ifdef([AC_PROG_GCJ],
Chris@69 899 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
Chris@69 900 m4_ifdef([A][M_PROG_GCJ],
Chris@69 901 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
Chris@69 902 m4_ifdef([LT_PROG_GCJ],
Chris@69 903 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
Chris@69 904
Chris@69 905 AC_PROVIDE_IFELSE([AC_PROG_GO],
Chris@69 906 [LT_LANG(GO)],
Chris@69 907 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
Chris@69 908
Chris@69 909 AC_PROVIDE_IFELSE([LT_PROG_RC],
Chris@69 910 [LT_LANG(RC)],
Chris@69 911 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
Chris@69 912 ])# _LT_LANG_DEFAULT_CONFIG
Chris@69 913
Chris@69 914 # Obsolete macros:
Chris@69 915 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
Chris@69 916 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
Chris@69 917 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
Chris@69 918 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
Chris@69 919 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
Chris@69 920 dnl aclocal-1.4 backwards compatibility:
Chris@69 921 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
Chris@69 922 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
Chris@69 923 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
Chris@69 924 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
Chris@69 925 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
Chris@69 926
Chris@69 927
Chris@69 928 # _LT_TAG_COMPILER
Chris@69 929 # ----------------
Chris@69 930 m4_defun([_LT_TAG_COMPILER],
Chris@69 931 [AC_REQUIRE([AC_PROG_CC])dnl
Chris@69 932
Chris@69 933 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
Chris@69 934 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
Chris@69 935 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
Chris@69 936 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
Chris@69 937
Chris@69 938 # If no C compiler was specified, use CC.
Chris@69 939 LTCC=${LTCC-"$CC"}
Chris@69 940
Chris@69 941 # If no C compiler flags were specified, use CFLAGS.
Chris@69 942 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
Chris@69 943
Chris@69 944 # Allow CC to be a program name with arguments.
Chris@69 945 compiler=$CC
Chris@69 946 ])# _LT_TAG_COMPILER
Chris@69 947
Chris@69 948
Chris@69 949 # _LT_COMPILER_BOILERPLATE
Chris@69 950 # ------------------------
Chris@69 951 # Check for compiler boilerplate output or warnings with
Chris@69 952 # the simple compiler test code.
Chris@69 953 m4_defun([_LT_COMPILER_BOILERPLATE],
Chris@69 954 [m4_require([_LT_DECL_SED])dnl
Chris@69 955 ac_outfile=conftest.$ac_objext
Chris@69 956 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
Chris@69 957 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
Chris@69 958 _lt_compiler_boilerplate=`cat conftest.err`
Chris@69 959 $RM conftest*
Chris@69 960 ])# _LT_COMPILER_BOILERPLATE
Chris@69 961
Chris@69 962
Chris@69 963 # _LT_LINKER_BOILERPLATE
Chris@69 964 # ----------------------
Chris@69 965 # Check for linker boilerplate output or warnings with
Chris@69 966 # the simple link test code.
Chris@69 967 m4_defun([_LT_LINKER_BOILERPLATE],
Chris@69 968 [m4_require([_LT_DECL_SED])dnl
Chris@69 969 ac_outfile=conftest.$ac_objext
Chris@69 970 echo "$lt_simple_link_test_code" >conftest.$ac_ext
Chris@69 971 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
Chris@69 972 _lt_linker_boilerplate=`cat conftest.err`
Chris@69 973 $RM -r conftest*
Chris@69 974 ])# _LT_LINKER_BOILERPLATE
Chris@69 975
Chris@69 976 # _LT_REQUIRED_DARWIN_CHECKS
Chris@69 977 # -------------------------
Chris@69 978 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
Chris@69 979 case $host_os in
Chris@69 980 rhapsody* | darwin*)
Chris@69 981 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
Chris@69 982 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
Chris@69 983 AC_CHECK_TOOL([LIPO], [lipo], [:])
Chris@69 984 AC_CHECK_TOOL([OTOOL], [otool], [:])
Chris@69 985 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
Chris@69 986 _LT_DECL([], [DSYMUTIL], [1],
Chris@69 987 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
Chris@69 988 _LT_DECL([], [NMEDIT], [1],
Chris@69 989 [Tool to change global to local symbols on Mac OS X])
Chris@69 990 _LT_DECL([], [LIPO], [1],
Chris@69 991 [Tool to manipulate fat objects and archives on Mac OS X])
Chris@69 992 _LT_DECL([], [OTOOL], [1],
Chris@69 993 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
Chris@69 994 _LT_DECL([], [OTOOL64], [1],
Chris@69 995 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
Chris@69 996
Chris@69 997 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
Chris@69 998 [lt_cv_apple_cc_single_mod=no
Chris@69 999 if test -z "$LT_MULTI_MODULE"; then
Chris@69 1000 # By default we will add the -single_module flag. You can override
Chris@69 1001 # by either setting the environment variable LT_MULTI_MODULE
Chris@69 1002 # non-empty at configure time, or by adding -multi_module to the
Chris@69 1003 # link flags.
Chris@69 1004 rm -rf libconftest.dylib*
Chris@69 1005 echo "int foo(void){return 1;}" > conftest.c
Chris@69 1006 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
Chris@69 1007 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
Chris@69 1008 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
Chris@69 1009 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
Chris@69 1010 _lt_result=$?
Chris@69 1011 # If there is a non-empty error log, and "single_module"
Chris@69 1012 # appears in it, assume the flag caused a linker warning
Chris@69 1013 if test -s conftest.err && $GREP single_module conftest.err; then
Chris@69 1014 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@69 1015 # Otherwise, if the output was created with a 0 exit code from
Chris@69 1016 # the compiler, it worked.
Chris@69 1017 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
Chris@69 1018 lt_cv_apple_cc_single_mod=yes
Chris@69 1019 else
Chris@69 1020 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@69 1021 fi
Chris@69 1022 rm -rf libconftest.dylib*
Chris@69 1023 rm -f conftest.*
Chris@69 1024 fi])
Chris@69 1025
Chris@69 1026 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
Chris@69 1027 [lt_cv_ld_exported_symbols_list],
Chris@69 1028 [lt_cv_ld_exported_symbols_list=no
Chris@69 1029 save_LDFLAGS=$LDFLAGS
Chris@69 1030 echo "_main" > conftest.sym
Chris@69 1031 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
Chris@69 1032 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
Chris@69 1033 [lt_cv_ld_exported_symbols_list=yes],
Chris@69 1034 [lt_cv_ld_exported_symbols_list=no])
Chris@69 1035 LDFLAGS=$save_LDFLAGS
Chris@69 1036 ])
Chris@69 1037
Chris@69 1038 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
Chris@69 1039 [lt_cv_ld_force_load=no
Chris@69 1040 cat > conftest.c << _LT_EOF
Chris@69 1041 int forced_loaded() { return 2;}
Chris@69 1042 _LT_EOF
Chris@69 1043 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
Chris@69 1044 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
Chris@69 1045 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
Chris@69 1046 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
Chris@69 1047 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
Chris@69 1048 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
Chris@69 1049 cat > conftest.c << _LT_EOF
Chris@69 1050 int main() { return 0;}
Chris@69 1051 _LT_EOF
Chris@69 1052 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
Chris@69 1053 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
Chris@69 1054 _lt_result=$?
Chris@69 1055 if test -s conftest.err && $GREP force_load conftest.err; then
Chris@69 1056 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@69 1057 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
Chris@69 1058 lt_cv_ld_force_load=yes
Chris@69 1059 else
Chris@69 1060 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@69 1061 fi
Chris@69 1062 rm -f conftest.err libconftest.a conftest conftest.c
Chris@69 1063 rm -rf conftest.dSYM
Chris@69 1064 ])
Chris@69 1065 case $host_os in
Chris@69 1066 rhapsody* | darwin1.[[012]])
Chris@69 1067 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
Chris@69 1068 darwin1.*)
Chris@69 1069 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
Chris@69 1070 darwin*) # darwin 5.x on
Chris@69 1071 # if running on 10.5 or later, the deployment target defaults
Chris@69 1072 # to the OS version, if on x86, and 10.4, the deployment
Chris@69 1073 # target defaults to 10.4. Don't you love it?
Chris@69 1074 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
Chris@69 1075 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
Chris@69 1076 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
Chris@69 1077 10.[[012]][[,.]]*)
Chris@69 1078 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
Chris@69 1079 10.*)
Chris@69 1080 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
Chris@69 1081 esac
Chris@69 1082 ;;
Chris@69 1083 esac
Chris@69 1084 if test yes = "$lt_cv_apple_cc_single_mod"; then
Chris@69 1085 _lt_dar_single_mod='$single_module'
Chris@69 1086 fi
Chris@69 1087 if test yes = "$lt_cv_ld_exported_symbols_list"; then
Chris@69 1088 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
Chris@69 1089 else
Chris@69 1090 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
Chris@69 1091 fi
Chris@69 1092 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
Chris@69 1093 _lt_dsymutil='~$DSYMUTIL $lib || :'
Chris@69 1094 else
Chris@69 1095 _lt_dsymutil=
Chris@69 1096 fi
Chris@69 1097 ;;
Chris@69 1098 esac
Chris@69 1099 ])
Chris@69 1100
Chris@69 1101
Chris@69 1102 # _LT_DARWIN_LINKER_FEATURES([TAG])
Chris@69 1103 # ---------------------------------
Chris@69 1104 # Checks for linker and compiler features on darwin
Chris@69 1105 m4_defun([_LT_DARWIN_LINKER_FEATURES],
Chris@69 1106 [
Chris@69 1107 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
Chris@69 1108 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@69 1109 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@69 1110 _LT_TAGVAR(hardcode_automatic, $1)=yes
Chris@69 1111 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
Chris@69 1112 if test yes = "$lt_cv_ld_force_load"; then
Chris@69 1113 _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@69 1114 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
Chris@69 1115 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
Chris@69 1116 else
Chris@69 1117 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
Chris@69 1118 fi
Chris@69 1119 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@69 1120 _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
Chris@69 1121 case $cc_basename in
Chris@69 1122 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
Chris@69 1123 *) _lt_dar_can_shared=$GCC ;;
Chris@69 1124 esac
Chris@69 1125 if test yes = "$_lt_dar_can_shared"; then
Chris@69 1126 output_verbose_link_cmd=func_echo_all
Chris@69 1127 _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@69 1128 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
Chris@69 1129 _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@69 1130 _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@69 1131 m4_if([$1], [CXX],
Chris@69 1132 [ if test yes != "$lt_cv_apple_cc_single_mod"; then
Chris@69 1133 _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@69 1134 _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@69 1135 fi
Chris@69 1136 ],[])
Chris@69 1137 else
Chris@69 1138 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 1139 fi
Chris@69 1140 ])
Chris@69 1141
Chris@69 1142 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
Chris@69 1143 # ----------------------------------
Chris@69 1144 # Links a minimal program and checks the executable
Chris@69 1145 # for the system default hardcoded library path. In most cases,
Chris@69 1146 # this is /usr/lib:/lib, but when the MPI compilers are used
Chris@69 1147 # the location of the communication and MPI libs are included too.
Chris@69 1148 # If we don't find anything, use the default library path according
Chris@69 1149 # to the aix ld manual.
Chris@69 1150 # Store the results from the different compilers for each TAGNAME.
Chris@69 1151 # Allow to override them for all tags through lt_cv_aix_libpath.
Chris@69 1152 m4_defun([_LT_SYS_MODULE_PATH_AIX],
Chris@69 1153 [m4_require([_LT_DECL_SED])dnl
Chris@69 1154 if test set = "${lt_cv_aix_libpath+set}"; then
Chris@69 1155 aix_libpath=$lt_cv_aix_libpath
Chris@69 1156 else
Chris@69 1157 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
Chris@69 1158 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
Chris@69 1159 lt_aix_libpath_sed='[
Chris@69 1160 /Import File Strings/,/^$/ {
Chris@69 1161 /^0/ {
Chris@69 1162 s/^0 *\([^ ]*\) *$/\1/
Chris@69 1163 p
Chris@69 1164 }
Chris@69 1165 }]'
Chris@69 1166 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
Chris@69 1167 # Check for a 64-bit object if we didn't find anything.
Chris@69 1168 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
Chris@69 1169 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
Chris@69 1170 fi],[])
Chris@69 1171 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
Chris@69 1172 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
Chris@69 1173 fi
Chris@69 1174 ])
Chris@69 1175 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
Chris@69 1176 fi
Chris@69 1177 ])# _LT_SYS_MODULE_PATH_AIX
Chris@69 1178
Chris@69 1179
Chris@69 1180 # _LT_SHELL_INIT(ARG)
Chris@69 1181 # -------------------
Chris@69 1182 m4_define([_LT_SHELL_INIT],
Chris@69 1183 [m4_divert_text([M4SH-INIT], [$1
Chris@69 1184 ])])# _LT_SHELL_INIT
Chris@69 1185
Chris@69 1186
Chris@69 1187
Chris@69 1188 # _LT_PROG_ECHO_BACKSLASH
Chris@69 1189 # -----------------------
Chris@69 1190 # Find how we can fake an echo command that does not interpret backslash.
Chris@69 1191 # In particular, with Autoconf 2.60 or later we add some code to the start
Chris@69 1192 # of the generated configure script that will find a shell with a builtin
Chris@69 1193 # printf (that we can use as an echo command).
Chris@69 1194 m4_defun([_LT_PROG_ECHO_BACKSLASH],
Chris@69 1195 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
Chris@69 1196 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
Chris@69 1197 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
Chris@69 1198
Chris@69 1199 AC_MSG_CHECKING([how to print strings])
Chris@69 1200 # Test print first, because it will be a builtin if present.
Chris@69 1201 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
Chris@69 1202 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
Chris@69 1203 ECHO='print -r --'
Chris@69 1204 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
Chris@69 1205 ECHO='printf %s\n'
Chris@69 1206 else
Chris@69 1207 # Use this function as a fallback that always works.
Chris@69 1208 func_fallback_echo ()
Chris@69 1209 {
Chris@69 1210 eval 'cat <<_LTECHO_EOF
Chris@69 1211 $[]1
Chris@69 1212 _LTECHO_EOF'
Chris@69 1213 }
Chris@69 1214 ECHO='func_fallback_echo'
Chris@69 1215 fi
Chris@69 1216
Chris@69 1217 # func_echo_all arg...
Chris@69 1218 # Invoke $ECHO with all args, space-separated.
Chris@69 1219 func_echo_all ()
Chris@69 1220 {
Chris@69 1221 $ECHO "$*"
Chris@69 1222 }
Chris@69 1223
Chris@69 1224 case $ECHO in
Chris@69 1225 printf*) AC_MSG_RESULT([printf]) ;;
Chris@69 1226 print*) AC_MSG_RESULT([print -r]) ;;
Chris@69 1227 *) AC_MSG_RESULT([cat]) ;;
Chris@69 1228 esac
Chris@69 1229
Chris@69 1230 m4_ifdef([_AS_DETECT_SUGGESTED],
Chris@69 1231 [_AS_DETECT_SUGGESTED([
Chris@69 1232 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
Chris@69 1233 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
Chris@69 1234 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
Chris@69 1235 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
Chris@69 1236 PATH=/empty FPATH=/empty; export PATH FPATH
Chris@69 1237 test "X`printf %s $ECHO`" = "X$ECHO" \
Chris@69 1238 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
Chris@69 1239
Chris@69 1240 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
Chris@69 1241 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
Chris@69 1242 ])# _LT_PROG_ECHO_BACKSLASH
Chris@69 1243
Chris@69 1244
Chris@69 1245 # _LT_WITH_SYSROOT
Chris@69 1246 # ----------------
Chris@69 1247 AC_DEFUN([_LT_WITH_SYSROOT],
Chris@69 1248 [AC_MSG_CHECKING([for sysroot])
Chris@69 1249 AC_ARG_WITH([sysroot],
Chris@69 1250 [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
Chris@69 1251 [Search for dependent libraries within DIR (or the compiler's sysroot
Chris@69 1252 if not specified).])],
Chris@69 1253 [], [with_sysroot=no])
Chris@69 1254
Chris@69 1255 dnl lt_sysroot will always be passed unquoted. We quote it here
Chris@69 1256 dnl in case the user passed a directory name.
Chris@69 1257 lt_sysroot=
Chris@69 1258 case $with_sysroot in #(
Chris@69 1259 yes)
Chris@69 1260 if test yes = "$GCC"; then
Chris@69 1261 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
Chris@69 1262 fi
Chris@69 1263 ;; #(
Chris@69 1264 /*)
Chris@69 1265 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
Chris@69 1266 ;; #(
Chris@69 1267 no|'')
Chris@69 1268 ;; #(
Chris@69 1269 *)
Chris@69 1270 AC_MSG_RESULT([$with_sysroot])
Chris@69 1271 AC_MSG_ERROR([The sysroot must be an absolute path.])
Chris@69 1272 ;;
Chris@69 1273 esac
Chris@69 1274
Chris@69 1275 AC_MSG_RESULT([${lt_sysroot:-no}])
Chris@69 1276 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
Chris@69 1277 [dependent libraries, and where our libraries should be installed.])])
Chris@69 1278
Chris@69 1279 # _LT_ENABLE_LOCK
Chris@69 1280 # ---------------
Chris@69 1281 m4_defun([_LT_ENABLE_LOCK],
Chris@69 1282 [AC_ARG_ENABLE([libtool-lock],
Chris@69 1283 [AS_HELP_STRING([--disable-libtool-lock],
Chris@69 1284 [avoid locking (might break parallel builds)])])
Chris@69 1285 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
Chris@69 1286
Chris@69 1287 # Some flags need to be propagated to the compiler or linker for good
Chris@69 1288 # libtool support.
Chris@69 1289 case $host in
Chris@69 1290 ia64-*-hpux*)
Chris@69 1291 # Find out what ABI is being produced by ac_compile, and set mode
Chris@69 1292 # options accordingly.
Chris@69 1293 echo 'int i;' > conftest.$ac_ext
Chris@69 1294 if AC_TRY_EVAL(ac_compile); then
Chris@69 1295 case `/usr/bin/file conftest.$ac_objext` in
Chris@69 1296 *ELF-32*)
Chris@69 1297 HPUX_IA64_MODE=32
Chris@69 1298 ;;
Chris@69 1299 *ELF-64*)
Chris@69 1300 HPUX_IA64_MODE=64
Chris@69 1301 ;;
Chris@69 1302 esac
Chris@69 1303 fi
Chris@69 1304 rm -rf conftest*
Chris@69 1305 ;;
Chris@69 1306 *-*-irix6*)
Chris@69 1307 # Find out what ABI is being produced by ac_compile, and set linker
Chris@69 1308 # options accordingly.
Chris@69 1309 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
Chris@69 1310 if AC_TRY_EVAL(ac_compile); then
Chris@69 1311 if test yes = "$lt_cv_prog_gnu_ld"; then
Chris@69 1312 case `/usr/bin/file conftest.$ac_objext` in
Chris@69 1313 *32-bit*)
Chris@69 1314 LD="${LD-ld} -melf32bsmip"
Chris@69 1315 ;;
Chris@69 1316 *N32*)
Chris@69 1317 LD="${LD-ld} -melf32bmipn32"
Chris@69 1318 ;;
Chris@69 1319 *64-bit*)
Chris@69 1320 LD="${LD-ld} -melf64bmip"
Chris@69 1321 ;;
Chris@69 1322 esac
Chris@69 1323 else
Chris@69 1324 case `/usr/bin/file conftest.$ac_objext` in
Chris@69 1325 *32-bit*)
Chris@69 1326 LD="${LD-ld} -32"
Chris@69 1327 ;;
Chris@69 1328 *N32*)
Chris@69 1329 LD="${LD-ld} -n32"
Chris@69 1330 ;;
Chris@69 1331 *64-bit*)
Chris@69 1332 LD="${LD-ld} -64"
Chris@69 1333 ;;
Chris@69 1334 esac
Chris@69 1335 fi
Chris@69 1336 fi
Chris@69 1337 rm -rf conftest*
Chris@69 1338 ;;
Chris@69 1339
Chris@69 1340 mips64*-*linux*)
Chris@69 1341 # Find out what ABI is being produced by ac_compile, and set linker
Chris@69 1342 # options accordingly.
Chris@69 1343 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
Chris@69 1344 if AC_TRY_EVAL(ac_compile); then
Chris@69 1345 emul=elf
Chris@69 1346 case `/usr/bin/file conftest.$ac_objext` in
Chris@69 1347 *32-bit*)
Chris@69 1348 emul="${emul}32"
Chris@69 1349 ;;
Chris@69 1350 *64-bit*)
Chris@69 1351 emul="${emul}64"
Chris@69 1352 ;;
Chris@69 1353 esac
Chris@69 1354 case `/usr/bin/file conftest.$ac_objext` in
Chris@69 1355 *MSB*)
Chris@69 1356 emul="${emul}btsmip"
Chris@69 1357 ;;
Chris@69 1358 *LSB*)
Chris@69 1359 emul="${emul}ltsmip"
Chris@69 1360 ;;
Chris@69 1361 esac
Chris@69 1362 case `/usr/bin/file conftest.$ac_objext` in
Chris@69 1363 *N32*)
Chris@69 1364 emul="${emul}n32"
Chris@69 1365 ;;
Chris@69 1366 esac
Chris@69 1367 LD="${LD-ld} -m $emul"
Chris@69 1368 fi
Chris@69 1369 rm -rf conftest*
Chris@69 1370 ;;
Chris@69 1371
Chris@69 1372 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
Chris@69 1373 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
Chris@69 1374 # Find out what ABI is being produced by ac_compile, and set linker
Chris@69 1375 # options accordingly. Note that the listed cases only cover the
Chris@69 1376 # situations where additional linker options are needed (such as when
Chris@69 1377 # doing 32-bit compilation for a host where ld defaults to 64-bit, or
Chris@69 1378 # vice versa); the common cases where no linker options are needed do
Chris@69 1379 # not appear in the list.
Chris@69 1380 echo 'int i;' > conftest.$ac_ext
Chris@69 1381 if AC_TRY_EVAL(ac_compile); then
Chris@69 1382 case `/usr/bin/file conftest.o` in
Chris@69 1383 *32-bit*)
Chris@69 1384 case $host in
Chris@69 1385 x86_64-*kfreebsd*-gnu)
Chris@69 1386 LD="${LD-ld} -m elf_i386_fbsd"
Chris@69 1387 ;;
Chris@69 1388 x86_64-*linux*)
Chris@69 1389 case `/usr/bin/file conftest.o` in
Chris@69 1390 *x86-64*)
Chris@69 1391 LD="${LD-ld} -m elf32_x86_64"
Chris@69 1392 ;;
Chris@69 1393 *)
Chris@69 1394 LD="${LD-ld} -m elf_i386"
Chris@69 1395 ;;
Chris@69 1396 esac
Chris@69 1397 ;;
Chris@69 1398 powerpc64le-*linux*)
Chris@69 1399 LD="${LD-ld} -m elf32lppclinux"
Chris@69 1400 ;;
Chris@69 1401 powerpc64-*linux*)
Chris@69 1402 LD="${LD-ld} -m elf32ppclinux"
Chris@69 1403 ;;
Chris@69 1404 s390x-*linux*)
Chris@69 1405 LD="${LD-ld} -m elf_s390"
Chris@69 1406 ;;
Chris@69 1407 sparc64-*linux*)
Chris@69 1408 LD="${LD-ld} -m elf32_sparc"
Chris@69 1409 ;;
Chris@69 1410 esac
Chris@69 1411 ;;
Chris@69 1412 *64-bit*)
Chris@69 1413 case $host in
Chris@69 1414 x86_64-*kfreebsd*-gnu)
Chris@69 1415 LD="${LD-ld} -m elf_x86_64_fbsd"
Chris@69 1416 ;;
Chris@69 1417 x86_64-*linux*)
Chris@69 1418 LD="${LD-ld} -m elf_x86_64"
Chris@69 1419 ;;
Chris@69 1420 powerpcle-*linux*)
Chris@69 1421 LD="${LD-ld} -m elf64lppc"
Chris@69 1422 ;;
Chris@69 1423 powerpc-*linux*)
Chris@69 1424 LD="${LD-ld} -m elf64ppc"
Chris@69 1425 ;;
Chris@69 1426 s390*-*linux*|s390*-*tpf*)
Chris@69 1427 LD="${LD-ld} -m elf64_s390"
Chris@69 1428 ;;
Chris@69 1429 sparc*-*linux*)
Chris@69 1430 LD="${LD-ld} -m elf64_sparc"
Chris@69 1431 ;;
Chris@69 1432 esac
Chris@69 1433 ;;
Chris@69 1434 esac
Chris@69 1435 fi
Chris@69 1436 rm -rf conftest*
Chris@69 1437 ;;
Chris@69 1438
Chris@69 1439 *-*-sco3.2v5*)
Chris@69 1440 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
Chris@69 1441 SAVE_CFLAGS=$CFLAGS
Chris@69 1442 CFLAGS="$CFLAGS -belf"
Chris@69 1443 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
Chris@69 1444 [AC_LANG_PUSH(C)
Chris@69 1445 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
Chris@69 1446 AC_LANG_POP])
Chris@69 1447 if test yes != "$lt_cv_cc_needs_belf"; then
Chris@69 1448 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
Chris@69 1449 CFLAGS=$SAVE_CFLAGS
Chris@69 1450 fi
Chris@69 1451 ;;
Chris@69 1452 *-*solaris*)
Chris@69 1453 # Find out what ABI is being produced by ac_compile, and set linker
Chris@69 1454 # options accordingly.
Chris@69 1455 echo 'int i;' > conftest.$ac_ext
Chris@69 1456 if AC_TRY_EVAL(ac_compile); then
Chris@69 1457 case `/usr/bin/file conftest.o` in
Chris@69 1458 *64-bit*)
Chris@69 1459 case $lt_cv_prog_gnu_ld in
Chris@69 1460 yes*)
Chris@69 1461 case $host in
Chris@69 1462 i?86-*-solaris*|x86_64-*-solaris*)
Chris@69 1463 LD="${LD-ld} -m elf_x86_64"
Chris@69 1464 ;;
Chris@69 1465 sparc*-*-solaris*)
Chris@69 1466 LD="${LD-ld} -m elf64_sparc"
Chris@69 1467 ;;
Chris@69 1468 esac
Chris@69 1469 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
Chris@69 1470 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
Chris@69 1471 LD=${LD-ld}_sol2
Chris@69 1472 fi
Chris@69 1473 ;;
Chris@69 1474 *)
Chris@69 1475 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
Chris@69 1476 LD="${LD-ld} -64"
Chris@69 1477 fi
Chris@69 1478 ;;
Chris@69 1479 esac
Chris@69 1480 ;;
Chris@69 1481 esac
Chris@69 1482 fi
Chris@69 1483 rm -rf conftest*
Chris@69 1484 ;;
Chris@69 1485 esac
Chris@69 1486
Chris@69 1487 need_locks=$enable_libtool_lock
Chris@69 1488 ])# _LT_ENABLE_LOCK
Chris@69 1489
Chris@69 1490
Chris@69 1491 # _LT_PROG_AR
Chris@69 1492 # -----------
Chris@69 1493 m4_defun([_LT_PROG_AR],
Chris@69 1494 [AC_CHECK_TOOLS(AR, [ar], false)
Chris@69 1495 : ${AR=ar}
Chris@69 1496 : ${AR_FLAGS=cru}
Chris@69 1497 _LT_DECL([], [AR], [1], [The archiver])
Chris@69 1498 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
Chris@69 1499
Chris@69 1500 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
Chris@69 1501 [lt_cv_ar_at_file=no
Chris@69 1502 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
Chris@69 1503 [echo conftest.$ac_objext > conftest.lst
Chris@69 1504 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
Chris@69 1505 AC_TRY_EVAL([lt_ar_try])
Chris@69 1506 if test 0 -eq "$ac_status"; then
Chris@69 1507 # Ensure the archiver fails upon bogus file names.
Chris@69 1508 rm -f conftest.$ac_objext libconftest.a
Chris@69 1509 AC_TRY_EVAL([lt_ar_try])
Chris@69 1510 if test 0 -ne "$ac_status"; then
Chris@69 1511 lt_cv_ar_at_file=@
Chris@69 1512 fi
Chris@69 1513 fi
Chris@69 1514 rm -f conftest.* libconftest.a
Chris@69 1515 ])
Chris@69 1516 ])
Chris@69 1517
Chris@69 1518 if test no = "$lt_cv_ar_at_file"; then
Chris@69 1519 archiver_list_spec=
Chris@69 1520 else
Chris@69 1521 archiver_list_spec=$lt_cv_ar_at_file
Chris@69 1522 fi
Chris@69 1523 _LT_DECL([], [archiver_list_spec], [1],
Chris@69 1524 [How to feed a file listing to the archiver])
Chris@69 1525 ])# _LT_PROG_AR
Chris@69 1526
Chris@69 1527
Chris@69 1528 # _LT_CMD_OLD_ARCHIVE
Chris@69 1529 # -------------------
Chris@69 1530 m4_defun([_LT_CMD_OLD_ARCHIVE],
Chris@69 1531 [_LT_PROG_AR
Chris@69 1532
Chris@69 1533 AC_CHECK_TOOL(STRIP, strip, :)
Chris@69 1534 test -z "$STRIP" && STRIP=:
Chris@69 1535 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
Chris@69 1536
Chris@69 1537 AC_CHECK_TOOL(RANLIB, ranlib, :)
Chris@69 1538 test -z "$RANLIB" && RANLIB=:
Chris@69 1539 _LT_DECL([], [RANLIB], [1],
Chris@69 1540 [Commands used to install an old-style archive])
Chris@69 1541
Chris@69 1542 # Determine commands to create old-style static archives.
Chris@69 1543 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
Chris@69 1544 old_postinstall_cmds='chmod 644 $oldlib'
Chris@69 1545 old_postuninstall_cmds=
Chris@69 1546
Chris@69 1547 if test -n "$RANLIB"; then
Chris@69 1548 case $host_os in
Chris@69 1549 bitrig* | openbsd*)
Chris@69 1550 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
Chris@69 1551 ;;
Chris@69 1552 *)
Chris@69 1553 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
Chris@69 1554 ;;
Chris@69 1555 esac
Chris@69 1556 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
Chris@69 1557 fi
Chris@69 1558
Chris@69 1559 case $host_os in
Chris@69 1560 darwin*)
Chris@69 1561 lock_old_archive_extraction=yes ;;
Chris@69 1562 *)
Chris@69 1563 lock_old_archive_extraction=no ;;
Chris@69 1564 esac
Chris@69 1565 _LT_DECL([], [old_postinstall_cmds], [2])
Chris@69 1566 _LT_DECL([], [old_postuninstall_cmds], [2])
Chris@69 1567 _LT_TAGDECL([], [old_archive_cmds], [2],
Chris@69 1568 [Commands used to build an old-style archive])
Chris@69 1569 _LT_DECL([], [lock_old_archive_extraction], [0],
Chris@69 1570 [Whether to use a lock for old archive extraction])
Chris@69 1571 ])# _LT_CMD_OLD_ARCHIVE
Chris@69 1572
Chris@69 1573
Chris@69 1574 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
Chris@69 1575 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
Chris@69 1576 # ----------------------------------------------------------------
Chris@69 1577 # Check whether the given compiler option works
Chris@69 1578 AC_DEFUN([_LT_COMPILER_OPTION],
Chris@69 1579 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@69 1580 m4_require([_LT_DECL_SED])dnl
Chris@69 1581 AC_CACHE_CHECK([$1], [$2],
Chris@69 1582 [$2=no
Chris@69 1583 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
Chris@69 1584 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
Chris@69 1585 lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
Chris@69 1586 # Insert the option either (1) after the last *FLAGS variable, or
Chris@69 1587 # (2) before a word containing "conftest.", or (3) at the end.
Chris@69 1588 # Note that $ac_compile itself does not contain backslashes and begins
Chris@69 1589 # with a dollar sign (not a hyphen), so the echo should work correctly.
Chris@69 1590 # The option is referenced via a variable to avoid confusing sed.
Chris@69 1591 lt_compile=`echo "$ac_compile" | $SED \
Chris@69 1592 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
Chris@69 1593 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
Chris@69 1594 -e 's:$: $lt_compiler_flag:'`
Chris@69 1595 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
Chris@69 1596 (eval "$lt_compile" 2>conftest.err)
Chris@69 1597 ac_status=$?
Chris@69 1598 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@69 1599 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
Chris@69 1600 if (exit $ac_status) && test -s "$ac_outfile"; then
Chris@69 1601 # The compiler can only warn and ignore the option if not recognized
Chris@69 1602 # So say no if there are warnings other than the usual output.
Chris@69 1603 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
Chris@69 1604 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
Chris@69 1605 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
Chris@69 1606 $2=yes
Chris@69 1607 fi
Chris@69 1608 fi
Chris@69 1609 $RM conftest*
Chris@69 1610 ])
Chris@69 1611
Chris@69 1612 if test yes = "[$]$2"; then
Chris@69 1613 m4_if([$5], , :, [$5])
Chris@69 1614 else
Chris@69 1615 m4_if([$6], , :, [$6])
Chris@69 1616 fi
Chris@69 1617 ])# _LT_COMPILER_OPTION
Chris@69 1618
Chris@69 1619 # Old name:
Chris@69 1620 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
Chris@69 1621 dnl aclocal-1.4 backwards compatibility:
Chris@69 1622 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
Chris@69 1623
Chris@69 1624
Chris@69 1625 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
Chris@69 1626 # [ACTION-SUCCESS], [ACTION-FAILURE])
Chris@69 1627 # ----------------------------------------------------
Chris@69 1628 # Check whether the given linker option works
Chris@69 1629 AC_DEFUN([_LT_LINKER_OPTION],
Chris@69 1630 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@69 1631 m4_require([_LT_DECL_SED])dnl
Chris@69 1632 AC_CACHE_CHECK([$1], [$2],
Chris@69 1633 [$2=no
Chris@69 1634 save_LDFLAGS=$LDFLAGS
Chris@69 1635 LDFLAGS="$LDFLAGS $3"
Chris@69 1636 echo "$lt_simple_link_test_code" > conftest.$ac_ext
Chris@69 1637 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
Chris@69 1638 # The linker can only warn and ignore the option if not recognized
Chris@69 1639 # So say no if there are warnings
Chris@69 1640 if test -s conftest.err; then
Chris@69 1641 # Append any errors to the config.log.
Chris@69 1642 cat conftest.err 1>&AS_MESSAGE_LOG_FD
Chris@69 1643 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
Chris@69 1644 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
Chris@69 1645 if diff conftest.exp conftest.er2 >/dev/null; then
Chris@69 1646 $2=yes
Chris@69 1647 fi
Chris@69 1648 else
Chris@69 1649 $2=yes
Chris@69 1650 fi
Chris@69 1651 fi
Chris@69 1652 $RM -r conftest*
Chris@69 1653 LDFLAGS=$save_LDFLAGS
Chris@69 1654 ])
Chris@69 1655
Chris@69 1656 if test yes = "[$]$2"; then
Chris@69 1657 m4_if([$4], , :, [$4])
Chris@69 1658 else
Chris@69 1659 m4_if([$5], , :, [$5])
Chris@69 1660 fi
Chris@69 1661 ])# _LT_LINKER_OPTION
Chris@69 1662
Chris@69 1663 # Old name:
Chris@69 1664 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
Chris@69 1665 dnl aclocal-1.4 backwards compatibility:
Chris@69 1666 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
Chris@69 1667
Chris@69 1668
Chris@69 1669 # LT_CMD_MAX_LEN
Chris@69 1670 #---------------
Chris@69 1671 AC_DEFUN([LT_CMD_MAX_LEN],
Chris@69 1672 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@69 1673 # find the maximum length of command line arguments
Chris@69 1674 AC_MSG_CHECKING([the maximum length of command line arguments])
Chris@69 1675 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
Chris@69 1676 i=0
Chris@69 1677 teststring=ABCD
Chris@69 1678
Chris@69 1679 case $build_os in
Chris@69 1680 msdosdjgpp*)
Chris@69 1681 # On DJGPP, this test can blow up pretty badly due to problems in libc
Chris@69 1682 # (any single argument exceeding 2000 bytes causes a buffer overrun
Chris@69 1683 # during glob expansion). Even if it were fixed, the result of this
Chris@69 1684 # check would be larger than it should be.
Chris@69 1685 lt_cv_sys_max_cmd_len=12288; # 12K is about right
Chris@69 1686 ;;
Chris@69 1687
Chris@69 1688 gnu*)
Chris@69 1689 # Under GNU Hurd, this test is not required because there is
Chris@69 1690 # no limit to the length of command line arguments.
Chris@69 1691 # Libtool will interpret -1 as no limit whatsoever
Chris@69 1692 lt_cv_sys_max_cmd_len=-1;
Chris@69 1693 ;;
Chris@69 1694
Chris@69 1695 cygwin* | mingw* | cegcc*)
Chris@69 1696 # On Win9x/ME, this test blows up -- it succeeds, but takes
Chris@69 1697 # about 5 minutes as the teststring grows exponentially.
Chris@69 1698 # Worse, since 9x/ME are not pre-emptively multitasking,
Chris@69 1699 # you end up with a "frozen" computer, even though with patience
Chris@69 1700 # the test eventually succeeds (with a max line length of 256k).
Chris@69 1701 # Instead, let's just punt: use the minimum linelength reported by
Chris@69 1702 # all of the supported platforms: 8192 (on NT/2K/XP).
Chris@69 1703 lt_cv_sys_max_cmd_len=8192;
Chris@69 1704 ;;
Chris@69 1705
Chris@69 1706 mint*)
Chris@69 1707 # On MiNT this can take a long time and run out of memory.
Chris@69 1708 lt_cv_sys_max_cmd_len=8192;
Chris@69 1709 ;;
Chris@69 1710
Chris@69 1711 amigaos*)
Chris@69 1712 # On AmigaOS with pdksh, this test takes hours, literally.
Chris@69 1713 # So we just punt and use a minimum line length of 8192.
Chris@69 1714 lt_cv_sys_max_cmd_len=8192;
Chris@69 1715 ;;
Chris@69 1716
Chris@69 1717 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
Chris@69 1718 # This has been around since 386BSD, at least. Likely further.
Chris@69 1719 if test -x /sbin/sysctl; then
Chris@69 1720 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
Chris@69 1721 elif test -x /usr/sbin/sysctl; then
Chris@69 1722 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
Chris@69 1723 else
Chris@69 1724 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
Chris@69 1725 fi
Chris@69 1726 # And add a safety zone
Chris@69 1727 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
Chris@69 1728 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
Chris@69 1729 ;;
Chris@69 1730
Chris@69 1731 interix*)
Chris@69 1732 # We know the value 262144 and hardcode it with a safety zone (like BSD)
Chris@69 1733 lt_cv_sys_max_cmd_len=196608
Chris@69 1734 ;;
Chris@69 1735
Chris@69 1736 os2*)
Chris@69 1737 # The test takes a long time on OS/2.
Chris@69 1738 lt_cv_sys_max_cmd_len=8192
Chris@69 1739 ;;
Chris@69 1740
Chris@69 1741 osf*)
Chris@69 1742 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
Chris@69 1743 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
Chris@69 1744 # nice to cause kernel panics so lets avoid the loop below.
Chris@69 1745 # First set a reasonable default.
Chris@69 1746 lt_cv_sys_max_cmd_len=16384
Chris@69 1747 #
Chris@69 1748 if test -x /sbin/sysconfig; then
Chris@69 1749 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
Chris@69 1750 *1*) lt_cv_sys_max_cmd_len=-1 ;;
Chris@69 1751 esac
Chris@69 1752 fi
Chris@69 1753 ;;
Chris@69 1754 sco3.2v5*)
Chris@69 1755 lt_cv_sys_max_cmd_len=102400
Chris@69 1756 ;;
Chris@69 1757 sysv5* | sco5v6* | sysv4.2uw2*)
Chris@69 1758 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
Chris@69 1759 if test -n "$kargmax"; then
Chris@69 1760 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
Chris@69 1761 else
Chris@69 1762 lt_cv_sys_max_cmd_len=32768
Chris@69 1763 fi
Chris@69 1764 ;;
Chris@69 1765 *)
Chris@69 1766 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
Chris@69 1767 if test -n "$lt_cv_sys_max_cmd_len" && \
Chris@69 1768 test undefined != "$lt_cv_sys_max_cmd_len"; then
Chris@69 1769 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
Chris@69 1770 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
Chris@69 1771 else
Chris@69 1772 # Make teststring a little bigger before we do anything with it.
Chris@69 1773 # a 1K string should be a reasonable start.
Chris@69 1774 for i in 1 2 3 4 5 6 7 8; do
Chris@69 1775 teststring=$teststring$teststring
Chris@69 1776 done
Chris@69 1777 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
Chris@69 1778 # If test is not a shell built-in, we'll probably end up computing a
Chris@69 1779 # maximum length that is only half of the actual maximum length, but
Chris@69 1780 # we can't tell.
Chris@69 1781 while { test X`env echo "$teststring$teststring" 2>/dev/null` \
Chris@69 1782 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
Chris@69 1783 test 17 != "$i" # 1/2 MB should be enough
Chris@69 1784 do
Chris@69 1785 i=`expr $i + 1`
Chris@69 1786 teststring=$teststring$teststring
Chris@69 1787 done
Chris@69 1788 # Only check the string length outside the loop.
Chris@69 1789 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
Chris@69 1790 teststring=
Chris@69 1791 # Add a significant safety factor because C++ compilers can tack on
Chris@69 1792 # massive amounts of additional arguments before passing them to the
Chris@69 1793 # linker. It appears as though 1/2 is a usable value.
Chris@69 1794 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
Chris@69 1795 fi
Chris@69 1796 ;;
Chris@69 1797 esac
Chris@69 1798 ])
Chris@69 1799 if test -n "$lt_cv_sys_max_cmd_len"; then
Chris@69 1800 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
Chris@69 1801 else
Chris@69 1802 AC_MSG_RESULT(none)
Chris@69 1803 fi
Chris@69 1804 max_cmd_len=$lt_cv_sys_max_cmd_len
Chris@69 1805 _LT_DECL([], [max_cmd_len], [0],
Chris@69 1806 [What is the maximum length of a command?])
Chris@69 1807 ])# LT_CMD_MAX_LEN
Chris@69 1808
Chris@69 1809 # Old name:
Chris@69 1810 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
Chris@69 1811 dnl aclocal-1.4 backwards compatibility:
Chris@69 1812 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
Chris@69 1813
Chris@69 1814
Chris@69 1815 # _LT_HEADER_DLFCN
Chris@69 1816 # ----------------
Chris@69 1817 m4_defun([_LT_HEADER_DLFCN],
Chris@69 1818 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
Chris@69 1819 ])# _LT_HEADER_DLFCN
Chris@69 1820
Chris@69 1821
Chris@69 1822 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
Chris@69 1823 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
Chris@69 1824 # ----------------------------------------------------------------
Chris@69 1825 m4_defun([_LT_TRY_DLOPEN_SELF],
Chris@69 1826 [m4_require([_LT_HEADER_DLFCN])dnl
Chris@69 1827 if test yes = "$cross_compiling"; then :
Chris@69 1828 [$4]
Chris@69 1829 else
Chris@69 1830 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
Chris@69 1831 lt_status=$lt_dlunknown
Chris@69 1832 cat > conftest.$ac_ext <<_LT_EOF
Chris@69 1833 [#line $LINENO "configure"
Chris@69 1834 #include "confdefs.h"
Chris@69 1835
Chris@69 1836 #if HAVE_DLFCN_H
Chris@69 1837 #include <dlfcn.h>
Chris@69 1838 #endif
Chris@69 1839
Chris@69 1840 #include <stdio.h>
Chris@69 1841
Chris@69 1842 #ifdef RTLD_GLOBAL
Chris@69 1843 # define LT_DLGLOBAL RTLD_GLOBAL
Chris@69 1844 #else
Chris@69 1845 # ifdef DL_GLOBAL
Chris@69 1846 # define LT_DLGLOBAL DL_GLOBAL
Chris@69 1847 # else
Chris@69 1848 # define LT_DLGLOBAL 0
Chris@69 1849 # endif
Chris@69 1850 #endif
Chris@69 1851
Chris@69 1852 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
Chris@69 1853 find out it does not work in some platform. */
Chris@69 1854 #ifndef LT_DLLAZY_OR_NOW
Chris@69 1855 # ifdef RTLD_LAZY
Chris@69 1856 # define LT_DLLAZY_OR_NOW RTLD_LAZY
Chris@69 1857 # else
Chris@69 1858 # ifdef DL_LAZY
Chris@69 1859 # define LT_DLLAZY_OR_NOW DL_LAZY
Chris@69 1860 # else
Chris@69 1861 # ifdef RTLD_NOW
Chris@69 1862 # define LT_DLLAZY_OR_NOW RTLD_NOW
Chris@69 1863 # else
Chris@69 1864 # ifdef DL_NOW
Chris@69 1865 # define LT_DLLAZY_OR_NOW DL_NOW
Chris@69 1866 # else
Chris@69 1867 # define LT_DLLAZY_OR_NOW 0
Chris@69 1868 # endif
Chris@69 1869 # endif
Chris@69 1870 # endif
Chris@69 1871 # endif
Chris@69 1872 #endif
Chris@69 1873
Chris@69 1874 /* When -fvisibility=hidden is used, assume the code has been annotated
Chris@69 1875 correspondingly for the symbols needed. */
Chris@69 1876 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
Chris@69 1877 int fnord () __attribute__((visibility("default")));
Chris@69 1878 #endif
Chris@69 1879
Chris@69 1880 int fnord () { return 42; }
Chris@69 1881 int main ()
Chris@69 1882 {
Chris@69 1883 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
Chris@69 1884 int status = $lt_dlunknown;
Chris@69 1885
Chris@69 1886 if (self)
Chris@69 1887 {
Chris@69 1888 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
Chris@69 1889 else
Chris@69 1890 {
Chris@69 1891 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
Chris@69 1892 else puts (dlerror ());
Chris@69 1893 }
Chris@69 1894 /* dlclose (self); */
Chris@69 1895 }
Chris@69 1896 else
Chris@69 1897 puts (dlerror ());
Chris@69 1898
Chris@69 1899 return status;
Chris@69 1900 }]
Chris@69 1901 _LT_EOF
Chris@69 1902 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
Chris@69 1903 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
Chris@69 1904 lt_status=$?
Chris@69 1905 case x$lt_status in
Chris@69 1906 x$lt_dlno_uscore) $1 ;;
Chris@69 1907 x$lt_dlneed_uscore) $2 ;;
Chris@69 1908 x$lt_dlunknown|x*) $3 ;;
Chris@69 1909 esac
Chris@69 1910 else :
Chris@69 1911 # compilation failed
Chris@69 1912 $3
Chris@69 1913 fi
Chris@69 1914 fi
Chris@69 1915 rm -fr conftest*
Chris@69 1916 ])# _LT_TRY_DLOPEN_SELF
Chris@69 1917
Chris@69 1918
Chris@69 1919 # LT_SYS_DLOPEN_SELF
Chris@69 1920 # ------------------
Chris@69 1921 AC_DEFUN([LT_SYS_DLOPEN_SELF],
Chris@69 1922 [m4_require([_LT_HEADER_DLFCN])dnl
Chris@69 1923 if test yes != "$enable_dlopen"; then
Chris@69 1924 enable_dlopen=unknown
Chris@69 1925 enable_dlopen_self=unknown
Chris@69 1926 enable_dlopen_self_static=unknown
Chris@69 1927 else
Chris@69 1928 lt_cv_dlopen=no
Chris@69 1929 lt_cv_dlopen_libs=
Chris@69 1930
Chris@69 1931 case $host_os in
Chris@69 1932 beos*)
Chris@69 1933 lt_cv_dlopen=load_add_on
Chris@69 1934 lt_cv_dlopen_libs=
Chris@69 1935 lt_cv_dlopen_self=yes
Chris@69 1936 ;;
Chris@69 1937
Chris@69 1938 mingw* | pw32* | cegcc*)
Chris@69 1939 lt_cv_dlopen=LoadLibrary
Chris@69 1940 lt_cv_dlopen_libs=
Chris@69 1941 ;;
Chris@69 1942
Chris@69 1943 cygwin*)
Chris@69 1944 lt_cv_dlopen=dlopen
Chris@69 1945 lt_cv_dlopen_libs=
Chris@69 1946 ;;
Chris@69 1947
Chris@69 1948 darwin*)
Chris@69 1949 # if libdl is installed we need to link against it
Chris@69 1950 AC_CHECK_LIB([dl], [dlopen],
Chris@69 1951 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
Chris@69 1952 lt_cv_dlopen=dyld
Chris@69 1953 lt_cv_dlopen_libs=
Chris@69 1954 lt_cv_dlopen_self=yes
Chris@69 1955 ])
Chris@69 1956 ;;
Chris@69 1957
Chris@69 1958 tpf*)
Chris@69 1959 # Don't try to run any link tests for TPF. We know it's impossible
Chris@69 1960 # because TPF is a cross-compiler, and we know how we open DSOs.
Chris@69 1961 lt_cv_dlopen=dlopen
Chris@69 1962 lt_cv_dlopen_libs=
Chris@69 1963 lt_cv_dlopen_self=no
Chris@69 1964 ;;
Chris@69 1965
Chris@69 1966 *)
Chris@69 1967 AC_CHECK_FUNC([shl_load],
Chris@69 1968 [lt_cv_dlopen=shl_load],
Chris@69 1969 [AC_CHECK_LIB([dld], [shl_load],
Chris@69 1970 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
Chris@69 1971 [AC_CHECK_FUNC([dlopen],
Chris@69 1972 [lt_cv_dlopen=dlopen],
Chris@69 1973 [AC_CHECK_LIB([dl], [dlopen],
Chris@69 1974 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
Chris@69 1975 [AC_CHECK_LIB([svld], [dlopen],
Chris@69 1976 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
Chris@69 1977 [AC_CHECK_LIB([dld], [dld_link],
Chris@69 1978 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
Chris@69 1979 ])
Chris@69 1980 ])
Chris@69 1981 ])
Chris@69 1982 ])
Chris@69 1983 ])
Chris@69 1984 ;;
Chris@69 1985 esac
Chris@69 1986
Chris@69 1987 if test no = "$lt_cv_dlopen"; then
Chris@69 1988 enable_dlopen=no
Chris@69 1989 else
Chris@69 1990 enable_dlopen=yes
Chris@69 1991 fi
Chris@69 1992
Chris@69 1993 case $lt_cv_dlopen in
Chris@69 1994 dlopen)
Chris@69 1995 save_CPPFLAGS=$CPPFLAGS
Chris@69 1996 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
Chris@69 1997
Chris@69 1998 save_LDFLAGS=$LDFLAGS
Chris@69 1999 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
Chris@69 2000
Chris@69 2001 save_LIBS=$LIBS
Chris@69 2002 LIBS="$lt_cv_dlopen_libs $LIBS"
Chris@69 2003
Chris@69 2004 AC_CACHE_CHECK([whether a program can dlopen itself],
Chris@69 2005 lt_cv_dlopen_self, [dnl
Chris@69 2006 _LT_TRY_DLOPEN_SELF(
Chris@69 2007 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
Chris@69 2008 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
Chris@69 2009 ])
Chris@69 2010
Chris@69 2011 if test yes = "$lt_cv_dlopen_self"; then
Chris@69 2012 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
Chris@69 2013 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
Chris@69 2014 lt_cv_dlopen_self_static, [dnl
Chris@69 2015 _LT_TRY_DLOPEN_SELF(
Chris@69 2016 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
Chris@69 2017 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
Chris@69 2018 ])
Chris@69 2019 fi
Chris@69 2020
Chris@69 2021 CPPFLAGS=$save_CPPFLAGS
Chris@69 2022 LDFLAGS=$save_LDFLAGS
Chris@69 2023 LIBS=$save_LIBS
Chris@69 2024 ;;
Chris@69 2025 esac
Chris@69 2026
Chris@69 2027 case $lt_cv_dlopen_self in
Chris@69 2028 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
Chris@69 2029 *) enable_dlopen_self=unknown ;;
Chris@69 2030 esac
Chris@69 2031
Chris@69 2032 case $lt_cv_dlopen_self_static in
Chris@69 2033 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
Chris@69 2034 *) enable_dlopen_self_static=unknown ;;
Chris@69 2035 esac
Chris@69 2036 fi
Chris@69 2037 _LT_DECL([dlopen_support], [enable_dlopen], [0],
Chris@69 2038 [Whether dlopen is supported])
Chris@69 2039 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
Chris@69 2040 [Whether dlopen of programs is supported])
Chris@69 2041 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
Chris@69 2042 [Whether dlopen of statically linked programs is supported])
Chris@69 2043 ])# LT_SYS_DLOPEN_SELF
Chris@69 2044
Chris@69 2045 # Old name:
Chris@69 2046 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
Chris@69 2047 dnl aclocal-1.4 backwards compatibility:
Chris@69 2048 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
Chris@69 2049
Chris@69 2050
Chris@69 2051 # _LT_COMPILER_C_O([TAGNAME])
Chris@69 2052 # ---------------------------
Chris@69 2053 # Check to see if options -c and -o are simultaneously supported by compiler.
Chris@69 2054 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
Chris@69 2055 m4_defun([_LT_COMPILER_C_O],
Chris@69 2056 [m4_require([_LT_DECL_SED])dnl
Chris@69 2057 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@69 2058 m4_require([_LT_TAG_COMPILER])dnl
Chris@69 2059 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
Chris@69 2060 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
Chris@69 2061 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
Chris@69 2062 $RM -r conftest 2>/dev/null
Chris@69 2063 mkdir conftest
Chris@69 2064 cd conftest
Chris@69 2065 mkdir out
Chris@69 2066 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
Chris@69 2067
Chris@69 2068 lt_compiler_flag="-o out/conftest2.$ac_objext"
Chris@69 2069 # Insert the option either (1) after the last *FLAGS variable, or
Chris@69 2070 # (2) before a word containing "conftest.", or (3) at the end.
Chris@69 2071 # Note that $ac_compile itself does not contain backslashes and begins
Chris@69 2072 # with a dollar sign (not a hyphen), so the echo should work correctly.
Chris@69 2073 lt_compile=`echo "$ac_compile" | $SED \
Chris@69 2074 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
Chris@69 2075 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
Chris@69 2076 -e 's:$: $lt_compiler_flag:'`
Chris@69 2077 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
Chris@69 2078 (eval "$lt_compile" 2>out/conftest.err)
Chris@69 2079 ac_status=$?
Chris@69 2080 cat out/conftest.err >&AS_MESSAGE_LOG_FD
Chris@69 2081 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
Chris@69 2082 if (exit $ac_status) && test -s out/conftest2.$ac_objext
Chris@69 2083 then
Chris@69 2084 # The compiler can only warn and ignore the option if not recognized
Chris@69 2085 # So say no if there are warnings
Chris@69 2086 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
Chris@69 2087 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
Chris@69 2088 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
Chris@69 2089 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
Chris@69 2090 fi
Chris@69 2091 fi
Chris@69 2092 chmod u+w . 2>&AS_MESSAGE_LOG_FD
Chris@69 2093 $RM conftest*
Chris@69 2094 # SGI C++ compiler will create directory out/ii_files/ for
Chris@69 2095 # template instantiation
Chris@69 2096 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
Chris@69 2097 $RM out/* && rmdir out
Chris@69 2098 cd ..
Chris@69 2099 $RM -r conftest
Chris@69 2100 $RM conftest*
Chris@69 2101 ])
Chris@69 2102 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
Chris@69 2103 [Does compiler simultaneously support -c and -o options?])
Chris@69 2104 ])# _LT_COMPILER_C_O
Chris@69 2105
Chris@69 2106
Chris@69 2107 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
Chris@69 2108 # ----------------------------------
Chris@69 2109 # Check to see if we can do hard links to lock some files if needed
Chris@69 2110 m4_defun([_LT_COMPILER_FILE_LOCKS],
Chris@69 2111 [m4_require([_LT_ENABLE_LOCK])dnl
Chris@69 2112 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@69 2113 _LT_COMPILER_C_O([$1])
Chris@69 2114
Chris@69 2115 hard_links=nottested
Chris@69 2116 if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
Chris@69 2117 # do not overwrite the value of need_locks provided by the user
Chris@69 2118 AC_MSG_CHECKING([if we can lock with hard links])
Chris@69 2119 hard_links=yes
Chris@69 2120 $RM conftest*
Chris@69 2121 ln conftest.a conftest.b 2>/dev/null && hard_links=no
Chris@69 2122 touch conftest.a
Chris@69 2123 ln conftest.a conftest.b 2>&5 || hard_links=no
Chris@69 2124 ln conftest.a conftest.b 2>/dev/null && hard_links=no
Chris@69 2125 AC_MSG_RESULT([$hard_links])
Chris@69 2126 if test no = "$hard_links"; then
Chris@69 2127 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
Chris@69 2128 need_locks=warn
Chris@69 2129 fi
Chris@69 2130 else
Chris@69 2131 need_locks=no
Chris@69 2132 fi
Chris@69 2133 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
Chris@69 2134 ])# _LT_COMPILER_FILE_LOCKS
Chris@69 2135
Chris@69 2136
Chris@69 2137 # _LT_CHECK_OBJDIR
Chris@69 2138 # ----------------
Chris@69 2139 m4_defun([_LT_CHECK_OBJDIR],
Chris@69 2140 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
Chris@69 2141 [rm -f .libs 2>/dev/null
Chris@69 2142 mkdir .libs 2>/dev/null
Chris@69 2143 if test -d .libs; then
Chris@69 2144 lt_cv_objdir=.libs
Chris@69 2145 else
Chris@69 2146 # MS-DOS does not allow filenames that begin with a dot.
Chris@69 2147 lt_cv_objdir=_libs
Chris@69 2148 fi
Chris@69 2149 rmdir .libs 2>/dev/null])
Chris@69 2150 objdir=$lt_cv_objdir
Chris@69 2151 _LT_DECL([], [objdir], [0],
Chris@69 2152 [The name of the directory that contains temporary libtool files])dnl
Chris@69 2153 m4_pattern_allow([LT_OBJDIR])dnl
Chris@69 2154 AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
Chris@69 2155 [Define to the sub-directory where libtool stores uninstalled libraries.])
Chris@69 2156 ])# _LT_CHECK_OBJDIR
Chris@69 2157
Chris@69 2158
Chris@69 2159 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
Chris@69 2160 # --------------------------------------
Chris@69 2161 # Check hardcoding attributes.
Chris@69 2162 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
Chris@69 2163 [AC_MSG_CHECKING([how to hardcode library paths into programs])
Chris@69 2164 _LT_TAGVAR(hardcode_action, $1)=
Chris@69 2165 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
Chris@69 2166 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
Chris@69 2167 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
Chris@69 2168
Chris@69 2169 # We can hardcode non-existent directories.
Chris@69 2170 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
Chris@69 2171 # If the only mechanism to avoid hardcoding is shlibpath_var, we
Chris@69 2172 # have to relink, otherwise we might link with an installed library
Chris@69 2173 # when we should be linking with a yet-to-be-installed one
Chris@69 2174 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
Chris@69 2175 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
Chris@69 2176 # Linking always hardcodes the temporary library directory.
Chris@69 2177 _LT_TAGVAR(hardcode_action, $1)=relink
Chris@69 2178 else
Chris@69 2179 # We can link without hardcoding, and we can hardcode nonexisting dirs.
Chris@69 2180 _LT_TAGVAR(hardcode_action, $1)=immediate
Chris@69 2181 fi
Chris@69 2182 else
Chris@69 2183 # We cannot hardcode anything, or else we can only hardcode existing
Chris@69 2184 # directories.
Chris@69 2185 _LT_TAGVAR(hardcode_action, $1)=unsupported
Chris@69 2186 fi
Chris@69 2187 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
Chris@69 2188
Chris@69 2189 if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
Chris@69 2190 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
Chris@69 2191 # Fast installation is not supported
Chris@69 2192 enable_fast_install=no
Chris@69 2193 elif test yes = "$shlibpath_overrides_runpath" ||
Chris@69 2194 test no = "$enable_shared"; then
Chris@69 2195 # Fast installation is not necessary
Chris@69 2196 enable_fast_install=needless
Chris@69 2197 fi
Chris@69 2198 _LT_TAGDECL([], [hardcode_action], [0],
Chris@69 2199 [How to hardcode a shared library path into an executable])
Chris@69 2200 ])# _LT_LINKER_HARDCODE_LIBPATH
Chris@69 2201
Chris@69 2202
Chris@69 2203 # _LT_CMD_STRIPLIB
Chris@69 2204 # ----------------
Chris@69 2205 m4_defun([_LT_CMD_STRIPLIB],
Chris@69 2206 [m4_require([_LT_DECL_EGREP])
Chris@69 2207 striplib=
Chris@69 2208 old_striplib=
Chris@69 2209 AC_MSG_CHECKING([whether stripping libraries is possible])
Chris@69 2210 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
Chris@69 2211 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
Chris@69 2212 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
Chris@69 2213 AC_MSG_RESULT([yes])
Chris@69 2214 else
Chris@69 2215 # FIXME - insert some real tests, host_os isn't really good enough
Chris@69 2216 case $host_os in
Chris@69 2217 darwin*)
Chris@69 2218 if test -n "$STRIP"; then
Chris@69 2219 striplib="$STRIP -x"
Chris@69 2220 old_striplib="$STRIP -S"
Chris@69 2221 AC_MSG_RESULT([yes])
Chris@69 2222 else
Chris@69 2223 AC_MSG_RESULT([no])
Chris@69 2224 fi
Chris@69 2225 ;;
Chris@69 2226 *)
Chris@69 2227 AC_MSG_RESULT([no])
Chris@69 2228 ;;
Chris@69 2229 esac
Chris@69 2230 fi
Chris@69 2231 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
Chris@69 2232 _LT_DECL([], [striplib], [1])
Chris@69 2233 ])# _LT_CMD_STRIPLIB
Chris@69 2234
Chris@69 2235
Chris@69 2236 # _LT_PREPARE_MUNGE_PATH_LIST
Chris@69 2237 # ---------------------------
Chris@69 2238 # Make sure func_munge_path_list() is defined correctly.
Chris@69 2239 m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
Chris@69 2240 [[# func_munge_path_list VARIABLE PATH
Chris@69 2241 # -----------------------------------
Chris@69 2242 # VARIABLE is name of variable containing _space_ separated list of
Chris@69 2243 # directories to be munged by the contents of PATH, which is string
Chris@69 2244 # having a format:
Chris@69 2245 # "DIR[:DIR]:"
Chris@69 2246 # string "DIR[ DIR]" will be prepended to VARIABLE
Chris@69 2247 # ":DIR[:DIR]"
Chris@69 2248 # string "DIR[ DIR]" will be appended to VARIABLE
Chris@69 2249 # "DIRP[:DIRP]::[DIRA:]DIRA"
Chris@69 2250 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
Chris@69 2251 # "DIRA[ DIRA]" will be appended to VARIABLE
Chris@69 2252 # "DIR[:DIR]"
Chris@69 2253 # VARIABLE will be replaced by "DIR[ DIR]"
Chris@69 2254 func_munge_path_list ()
Chris@69 2255 {
Chris@69 2256 case x@S|@2 in
Chris@69 2257 x)
Chris@69 2258 ;;
Chris@69 2259 *:)
Chris@69 2260 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
Chris@69 2261 ;;
Chris@69 2262 x:*)
Chris@69 2263 eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
Chris@69 2264 ;;
Chris@69 2265 *::*)
Chris@69 2266 eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
Chris@69 2267 eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
Chris@69 2268 ;;
Chris@69 2269 *)
Chris@69 2270 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
Chris@69 2271 ;;
Chris@69 2272 esac
Chris@69 2273 }
Chris@69 2274 ]])# _LT_PREPARE_PATH_LIST
Chris@69 2275
Chris@69 2276
Chris@69 2277 # _LT_SYS_DYNAMIC_LINKER([TAG])
Chris@69 2278 # -----------------------------
Chris@69 2279 # PORTME Fill in your ld.so characteristics
Chris@69 2280 m4_defun([_LT_SYS_DYNAMIC_LINKER],
Chris@69 2281 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@69 2282 m4_require([_LT_DECL_EGREP])dnl
Chris@69 2283 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@69 2284 m4_require([_LT_DECL_OBJDUMP])dnl
Chris@69 2285 m4_require([_LT_DECL_SED])dnl
Chris@69 2286 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
Chris@69 2287 m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
Chris@69 2288 AC_MSG_CHECKING([dynamic linker characteristics])
Chris@69 2289 m4_if([$1],
Chris@69 2290 [], [
Chris@69 2291 if test yes = "$GCC"; then
Chris@69 2292 case $host_os in
Chris@69 2293 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
Chris@69 2294 *) lt_awk_arg='/^libraries:/' ;;
Chris@69 2295 esac
Chris@69 2296 case $host_os in
Chris@69 2297 mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
Chris@69 2298 *) lt_sed_strip_eq='s|=/|/|g' ;;
Chris@69 2299 esac
Chris@69 2300 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
Chris@69 2301 case $lt_search_path_spec in
Chris@69 2302 *\;*)
Chris@69 2303 # if the path contains ";" then we assume it to be the separator
Chris@69 2304 # otherwise default to the standard path separator (i.e. ":") - it is
Chris@69 2305 # assumed that no part of a normal pathname contains ";" but that should
Chris@69 2306 # okay in the real world where ";" in dirpaths is itself problematic.
Chris@69 2307 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
Chris@69 2308 ;;
Chris@69 2309 *)
Chris@69 2310 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
Chris@69 2311 ;;
Chris@69 2312 esac
Chris@69 2313 # Ok, now we have the path, separated by spaces, we can step through it
Chris@69 2314 # and add multilib dir if necessary...
Chris@69 2315 lt_tmp_lt_search_path_spec=
Chris@69 2316 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
Chris@69 2317 # ...but if some path component already ends with the multilib dir we assume
Chris@69 2318 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
Chris@69 2319 case "$lt_multi_os_dir; $lt_search_path_spec " in
Chris@69 2320 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
Chris@69 2321 lt_multi_os_dir=
Chris@69 2322 ;;
Chris@69 2323 esac
Chris@69 2324 for lt_sys_path in $lt_search_path_spec; do
Chris@69 2325 if test -d "$lt_sys_path$lt_multi_os_dir"; then
Chris@69 2326 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
Chris@69 2327 elif test -n "$lt_multi_os_dir"; then
Chris@69 2328 test -d "$lt_sys_path" && \
Chris@69 2329 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
Chris@69 2330 fi
Chris@69 2331 done
Chris@69 2332 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
Chris@69 2333 BEGIN {RS = " "; FS = "/|\n";} {
Chris@69 2334 lt_foo = "";
Chris@69 2335 lt_count = 0;
Chris@69 2336 for (lt_i = NF; lt_i > 0; lt_i--) {
Chris@69 2337 if ($lt_i != "" && $lt_i != ".") {
Chris@69 2338 if ($lt_i == "..") {
Chris@69 2339 lt_count++;
Chris@69 2340 } else {
Chris@69 2341 if (lt_count == 0) {
Chris@69 2342 lt_foo = "/" $lt_i lt_foo;
Chris@69 2343 } else {
Chris@69 2344 lt_count--;
Chris@69 2345 }
Chris@69 2346 }
Chris@69 2347 }
Chris@69 2348 }
Chris@69 2349 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
Chris@69 2350 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
Chris@69 2351 }'`
Chris@69 2352 # AWK program above erroneously prepends '/' to C:/dos/paths
Chris@69 2353 # for these hosts.
Chris@69 2354 case $host_os in
Chris@69 2355 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
Chris@69 2356 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
Chris@69 2357 esac
Chris@69 2358 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
Chris@69 2359 else
Chris@69 2360 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
Chris@69 2361 fi])
Chris@69 2362 library_names_spec=
Chris@69 2363 libname_spec='lib$name'
Chris@69 2364 soname_spec=
Chris@69 2365 shrext_cmds=.so
Chris@69 2366 postinstall_cmds=
Chris@69 2367 postuninstall_cmds=
Chris@69 2368 finish_cmds=
Chris@69 2369 finish_eval=
Chris@69 2370 shlibpath_var=
Chris@69 2371 shlibpath_overrides_runpath=unknown
Chris@69 2372 version_type=none
Chris@69 2373 dynamic_linker="$host_os ld.so"
Chris@69 2374 sys_lib_dlsearch_path_spec="/lib /usr/lib"
Chris@69 2375 need_lib_prefix=unknown
Chris@69 2376 hardcode_into_libs=no
Chris@69 2377
Chris@69 2378 # when you set need_version to no, make sure it does not cause -set_version
Chris@69 2379 # flags to be left without arguments
Chris@69 2380 need_version=unknown
Chris@69 2381
Chris@69 2382 AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
Chris@69 2383 [User-defined run-time library search path.])
Chris@69 2384
Chris@69 2385 case $host_os in
Chris@69 2386 aix3*)
Chris@69 2387 version_type=linux # correct to gnu/linux during the next big refactor
Chris@69 2388 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
Chris@69 2389 shlibpath_var=LIBPATH
Chris@69 2390
Chris@69 2391 # AIX 3 has no versioning support, so we append a major version to the name.
Chris@69 2392 soname_spec='$libname$release$shared_ext$major'
Chris@69 2393 ;;
Chris@69 2394
Chris@69 2395 aix[[4-9]]*)
Chris@69 2396 version_type=linux # correct to gnu/linux during the next big refactor
Chris@69 2397 need_lib_prefix=no
Chris@69 2398 need_version=no
Chris@69 2399 hardcode_into_libs=yes
Chris@69 2400 if test ia64 = "$host_cpu"; then
Chris@69 2401 # AIX 5 supports IA64
Chris@69 2402 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
Chris@69 2403 shlibpath_var=LD_LIBRARY_PATH
Chris@69 2404 else
Chris@69 2405 # With GCC up to 2.95.x, collect2 would create an import file
Chris@69 2406 # for dependence libraries. The import file would start with
Chris@69 2407 # the line '#! .'. This would cause the generated library to
Chris@69 2408 # depend on '.', always an invalid library. This was fixed in
Chris@69 2409 # development snapshots of GCC prior to 3.0.
Chris@69 2410 case $host_os in
Chris@69 2411 aix4 | aix4.[[01]] | aix4.[[01]].*)
Chris@69 2412 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
Chris@69 2413 echo ' yes '
Chris@69 2414 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
Chris@69 2415 :
Chris@69 2416 else
Chris@69 2417 can_build_shared=no
Chris@69 2418 fi
Chris@69 2419 ;;
Chris@69 2420 esac
Chris@69 2421 # Using Import Files as archive members, it is possible to support
Chris@69 2422 # filename-based versioning of shared library archives on AIX. While
Chris@69 2423 # this would work for both with and without runtime linking, it will
Chris@69 2424 # prevent static linking of such archives. So we do filename-based
Chris@69 2425 # shared library versioning with .so extension only, which is used
Chris@69 2426 # when both runtime linking and shared linking is enabled.
Chris@69 2427 # Unfortunately, runtime linking may impact performance, so we do
Chris@69 2428 # not want this to be the default eventually. Also, we use the
Chris@69 2429 # versioned .so libs for executables only if there is the -brtl
Chris@69 2430 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
Chris@69 2431 # To allow for filename-based versioning support, we need to create
Chris@69 2432 # libNAME.so.V as an archive file, containing:
Chris@69 2433 # *) an Import File, referring to the versioned filename of the
Chris@69 2434 # archive as well as the shared archive member, telling the
Chris@69 2435 # bitwidth (32 or 64) of that shared object, and providing the
Chris@69 2436 # list of exported symbols of that shared object, eventually
Chris@69 2437 # decorated with the 'weak' keyword
Chris@69 2438 # *) the shared object with the F_LOADONLY flag set, to really avoid
Chris@69 2439 # it being seen by the linker.
Chris@69 2440 # At run time we better use the real file rather than another symlink,
Chris@69 2441 # but for link time we create the symlink libNAME.so -> libNAME.so.V
Chris@69 2442
Chris@69 2443 case $with_aix_soname,$aix_use_runtimelinking in
Chris@69 2444 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
Chris@69 2445 # soname into executable. Probably we can add versioning support to
Chris@69 2446 # collect2, so additional links can be useful in future.
Chris@69 2447 aix,yes) # traditional libtool
Chris@69 2448 dynamic_linker='AIX unversionable lib.so'
Chris@69 2449 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
Chris@69 2450 # instead of lib<name>.a to let people know that these are not
Chris@69 2451 # typical AIX shared libraries.
Chris@69 2452 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@69 2453 ;;
Chris@69 2454 aix,no) # traditional AIX only
Chris@69 2455 dynamic_linker='AIX lib.a[(]lib.so.V[)]'
Chris@69 2456 # We preserve .a as extension for shared libraries through AIX4.2
Chris@69 2457 # and later when we are not doing run time linking.
Chris@69 2458 library_names_spec='$libname$release.a $libname.a'
Chris@69 2459 soname_spec='$libname$release$shared_ext$major'
Chris@69 2460 ;;
Chris@69 2461 svr4,*) # full svr4 only
Chris@69 2462 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
Chris@69 2463 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
Chris@69 2464 # We do not specify a path in Import Files, so LIBPATH fires.
Chris@69 2465 shlibpath_overrides_runpath=yes
Chris@69 2466 ;;
Chris@69 2467 *,yes) # both, prefer svr4
Chris@69 2468 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
Chris@69 2469 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
Chris@69 2470 # unpreferred sharedlib libNAME.a needs extra handling
Chris@69 2471 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@69 2472 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@69 2473 # We do not specify a path in Import Files, so LIBPATH fires.
Chris@69 2474 shlibpath_overrides_runpath=yes
Chris@69 2475 ;;
Chris@69 2476 *,no) # both, prefer aix
Chris@69 2477 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
Chris@69 2478 library_names_spec='$libname$release.a $libname.a'
Chris@69 2479 soname_spec='$libname$release$shared_ext$major'
Chris@69 2480 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
Chris@69 2481 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@69 2482 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@69 2483 ;;
Chris@69 2484 esac
Chris@69 2485 shlibpath_var=LIBPATH
Chris@69 2486 fi
Chris@69 2487 ;;
Chris@69 2488
Chris@69 2489 amigaos*)
Chris@69 2490 case $host_cpu in
Chris@69 2491 powerpc)
Chris@69 2492 # Since July 2007 AmigaOS4 officially supports .so libraries.
Chris@69 2493 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
Chris@69 2494 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@69 2495 ;;
Chris@69 2496 m68k)
Chris@69 2497 library_names_spec='$libname.ixlibrary $libname.a'
Chris@69 2498 # Create ${libname}_ixlibrary.a entries in /sys/libs.
Chris@69 2499 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@69 2500 ;;
Chris@69 2501 esac
Chris@69 2502 ;;
Chris@69 2503
Chris@69 2504 beos*)
Chris@69 2505 library_names_spec='$libname$shared_ext'
Chris@69 2506 dynamic_linker="$host_os ld.so"
Chris@69 2507 shlibpath_var=LIBRARY_PATH
Chris@69 2508 ;;
Chris@69 2509
Chris@69 2510 bsdi[[45]]*)
Chris@69 2511 version_type=linux # correct to gnu/linux during the next big refactor
Chris@69 2512 need_version=no
Chris@69 2513 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@69 2514 soname_spec='$libname$release$shared_ext$major'
Chris@69 2515 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
Chris@69 2516 shlibpath_var=LD_LIBRARY_PATH
Chris@69 2517 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
Chris@69 2518 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
Chris@69 2519 # the default ld.so.conf also contains /usr/contrib/lib and
Chris@69 2520 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
Chris@69 2521 # libtool to hard-code these into programs
Chris@69 2522 ;;
Chris@69 2523
Chris@69 2524 cygwin* | mingw* | pw32* | cegcc*)
Chris@69 2525 version_type=windows
Chris@69 2526 shrext_cmds=.dll
Chris@69 2527 need_version=no
Chris@69 2528 need_lib_prefix=no
Chris@69 2529
Chris@69 2530 case $GCC,$cc_basename in
Chris@69 2531 yes,*)
Chris@69 2532 # gcc
Chris@69 2533 library_names_spec='$libname.dll.a'
Chris@69 2534 # DLL is installed to $(libdir)/../bin by postinstall_cmds
Chris@69 2535 postinstall_cmds='base_file=`basename \$file`~
Chris@69 2536 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
Chris@69 2537 dldir=$destdir/`dirname \$dlpath`~
Chris@69 2538 test -d \$dldir || mkdir -p \$dldir~
Chris@69 2539 $install_prog $dir/$dlname \$dldir/$dlname~
Chris@69 2540 chmod a+x \$dldir/$dlname~
Chris@69 2541 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
Chris@69 2542 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
Chris@69 2543 fi'
Chris@69 2544 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
Chris@69 2545 dlpath=$dir/\$dldll~
Chris@69 2546 $RM \$dlpath'
Chris@69 2547 shlibpath_overrides_runpath=yes
Chris@69 2548
Chris@69 2549 case $host_os in
Chris@69 2550 cygwin*)
Chris@69 2551 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
Chris@69 2552 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
Chris@69 2553 m4_if([$1], [],[
Chris@69 2554 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
Chris@69 2555 ;;
Chris@69 2556 mingw* | cegcc*)
Chris@69 2557 # MinGW DLLs use traditional 'lib' prefix
Chris@69 2558 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
Chris@69 2559 ;;
Chris@69 2560 pw32*)
Chris@69 2561 # pw32 DLLs use 'pw' prefix rather than 'lib'
Chris@69 2562 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
Chris@69 2563 ;;
Chris@69 2564 esac
Chris@69 2565 dynamic_linker='Win32 ld.exe'
Chris@69 2566 ;;
Chris@69 2567
Chris@69 2568 *,cl*)
Chris@69 2569 # Native MSVC
Chris@69 2570 libname_spec='$name'
Chris@69 2571 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
Chris@69 2572 library_names_spec='$libname.dll.lib'
Chris@69 2573
Chris@69 2574 case $build_os in
Chris@69 2575 mingw*)
Chris@69 2576 sys_lib_search_path_spec=
Chris@69 2577 lt_save_ifs=$IFS
Chris@69 2578 IFS=';'
Chris@69 2579 for lt_path in $LIB
Chris@69 2580 do
Chris@69 2581 IFS=$lt_save_ifs
Chris@69 2582 # Let DOS variable expansion print the short 8.3 style file name.
Chris@69 2583 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
Chris@69 2584 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
Chris@69 2585 done
Chris@69 2586 IFS=$lt_save_ifs
Chris@69 2587 # Convert to MSYS style.
Chris@69 2588 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@69 2589 ;;
Chris@69 2590 cygwin*)
Chris@69 2591 # Convert to unix form, then to dos form, then back to unix form
Chris@69 2592 # but this time dos style (no spaces!) so that the unix form looks
Chris@69 2593 # like /cygdrive/c/PROGRA~1:/cygdr...
Chris@69 2594 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
Chris@69 2595 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
Chris@69 2596 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
Chris@69 2597 ;;
Chris@69 2598 *)
Chris@69 2599 sys_lib_search_path_spec=$LIB
Chris@69 2600 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
Chris@69 2601 # It is most probably a Windows format PATH.
Chris@69 2602 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
Chris@69 2603 else
Chris@69 2604 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
Chris@69 2605 fi
Chris@69 2606 # FIXME: find the short name or the path components, as spaces are
Chris@69 2607 # common. (e.g. "Program Files" -> "PROGRA~1")
Chris@69 2608 ;;
Chris@69 2609 esac
Chris@69 2610
Chris@69 2611 # DLL is installed to $(libdir)/../bin by postinstall_cmds
Chris@69 2612 postinstall_cmds='base_file=`basename \$file`~
Chris@69 2613 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
Chris@69 2614 dldir=$destdir/`dirname \$dlpath`~
Chris@69 2615 test -d \$dldir || mkdir -p \$dldir~
Chris@69 2616 $install_prog $dir/$dlname \$dldir/$dlname'
Chris@69 2617 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
Chris@69 2618 dlpath=$dir/\$dldll~
Chris@69 2619 $RM \$dlpath'
Chris@69 2620 shlibpath_overrides_runpath=yes
Chris@69 2621 dynamic_linker='Win32 link.exe'
Chris@69 2622 ;;
Chris@69 2623
Chris@69 2624 *)
Chris@69 2625 # Assume MSVC wrapper
Chris@69 2626 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
Chris@69 2627 dynamic_linker='Win32 ld.exe'
Chris@69 2628 ;;
Chris@69 2629 esac
Chris@69 2630 # FIXME: first we should search . and the directory the executable is in
Chris@69 2631 shlibpath_var=PATH
Chris@69 2632 ;;
Chris@69 2633
Chris@69 2634 darwin* | rhapsody*)
Chris@69 2635 dynamic_linker="$host_os dyld"
Chris@69 2636 version_type=darwin
Chris@69 2637 need_lib_prefix=no
Chris@69 2638 need_version=no
Chris@69 2639 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
Chris@69 2640 soname_spec='$libname$release$major$shared_ext'
Chris@69 2641 shlibpath_overrides_runpath=yes
Chris@69 2642 shlibpath_var=DYLD_LIBRARY_PATH
Chris@69 2643 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
Chris@69 2644 m4_if([$1], [],[
Chris@69 2645 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
Chris@69 2646 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
Chris@69 2647 ;;
Chris@69 2648
Chris@69 2649 dgux*)
Chris@69 2650 version_type=linux # correct to gnu/linux during the next big refactor
Chris@69 2651 need_lib_prefix=no
Chris@69 2652 need_version=no
Chris@69 2653 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@69 2654 soname_spec='$libname$release$shared_ext$major'
Chris@69 2655 shlibpath_var=LD_LIBRARY_PATH
Chris@69 2656 ;;
Chris@69 2657
Chris@69 2658 freebsd* | dragonfly*)
Chris@69 2659 # DragonFly does not have aout. When/if they implement a new
Chris@69 2660 # versioning mechanism, adjust this.
Chris@69 2661 if test -x /usr/bin/objformat; then
Chris@69 2662 objformat=`/usr/bin/objformat`
Chris@69 2663 else
Chris@69 2664 case $host_os in
Chris@69 2665 freebsd[[23]].*) objformat=aout ;;
Chris@69 2666 *) objformat=elf ;;
Chris@69 2667 esac
Chris@69 2668 fi
Chris@69 2669 version_type=freebsd-$objformat
Chris@69 2670 case $version_type in
Chris@69 2671 freebsd-elf*)
Chris@69 2672 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@69 2673 soname_spec='$libname$release$shared_ext$major'
Chris@69 2674 need_version=no
Chris@69 2675 need_lib_prefix=no
Chris@69 2676 ;;
Chris@69 2677 freebsd-*)
Chris@69 2678 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
Chris@69 2679 need_version=yes
Chris@69 2680 ;;
Chris@69 2681 esac
Chris@69 2682 shlibpath_var=LD_LIBRARY_PATH
Chris@69 2683 case $host_os in
Chris@69 2684 freebsd2.*)
Chris@69 2685 shlibpath_overrides_runpath=yes
Chris@69 2686 ;;
Chris@69 2687 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
Chris@69 2688 shlibpath_overrides_runpath=yes
Chris@69 2689 hardcode_into_libs=yes
Chris@69 2690 ;;
Chris@69 2691 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
Chris@69 2692 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
Chris@69 2693 shlibpath_overrides_runpath=no
Chris@69 2694 hardcode_into_libs=yes
Chris@69 2695 ;;
Chris@69 2696 *) # from 4.6 on, and DragonFly
Chris@69 2697 shlibpath_overrides_runpath=yes
Chris@69 2698 hardcode_into_libs=yes
Chris@69 2699 ;;
Chris@69 2700 esac
Chris@69 2701 ;;
Chris@69 2702
Chris@69 2703 haiku*)
Chris@69 2704 version_type=linux # correct to gnu/linux during the next big refactor
Chris@69 2705 need_lib_prefix=no
Chris@69 2706 need_version=no
Chris@69 2707 dynamic_linker="$host_os runtime_loader"
Chris@69 2708 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@69 2709 soname_spec='$libname$release$shared_ext$major'
Chris@69 2710 shlibpath_var=LIBRARY_PATH
Chris@69 2711 shlibpath_overrides_runpath=no
Chris@69 2712 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
Chris@69 2713 hardcode_into_libs=yes
Chris@69 2714 ;;
Chris@69 2715
Chris@69 2716 hpux9* | hpux10* | hpux11*)
Chris@69 2717 # Give a soname corresponding to the major version so that dld.sl refuses to
Chris@69 2718 # link against other versions.
Chris@69 2719 version_type=sunos
Chris@69 2720 need_lib_prefix=no
Chris@69 2721 need_version=no
Chris@69 2722 case $host_cpu in
Chris@69 2723 ia64*)
Chris@69 2724 shrext_cmds='.so'
Chris@69 2725 hardcode_into_libs=yes
Chris@69 2726 dynamic_linker="$host_os dld.so"
Chris@69 2727 shlibpath_var=LD_LIBRARY_PATH
Chris@69 2728 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
Chris@69 2729 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@69 2730 soname_spec='$libname$release$shared_ext$major'
Chris@69 2731 if test 32 = "$HPUX_IA64_MODE"; then
Chris@69 2732 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
Chris@69 2733 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
Chris@69 2734 else
Chris@69 2735 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
Chris@69 2736 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
Chris@69 2737 fi
Chris@69 2738 ;;
Chris@69 2739 hppa*64*)
Chris@69 2740 shrext_cmds='.sl'
Chris@69 2741 hardcode_into_libs=yes
Chris@69 2742 dynamic_linker="$host_os dld.sl"
Chris@69 2743 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
Chris@69 2744 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
Chris@69 2745 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@69 2746 soname_spec='$libname$release$shared_ext$major'
Chris@69 2747 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
Chris@69 2748 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
Chris@69 2749 ;;
Chris@69 2750 *)
Chris@69 2751 shrext_cmds='.sl'
Chris@69 2752 dynamic_linker="$host_os dld.sl"
Chris@69 2753 shlibpath_var=SHLIB_PATH
Chris@69 2754 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
Chris@69 2755 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@69 2756 soname_spec='$libname$release$shared_ext$major'
Chris@69 2757 ;;
Chris@69 2758 esac
Chris@69 2759 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
Chris@69 2760 postinstall_cmds='chmod 555 $lib'
Chris@69 2761 # or fails outright, so override atomically:
Chris@69 2762 install_override_mode=555
Chris@69 2763 ;;
Chris@69 2764
Chris@69 2765 interix[[3-9]]*)
Chris@69 2766 version_type=linux # correct to gnu/linux during the next big refactor
Chris@69 2767 need_lib_prefix=no
Chris@69 2768 need_version=no
Chris@69 2769 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@69 2770 soname_spec='$libname$release$shared_ext$major'
Chris@69 2771 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
Chris@69 2772 shlibpath_var=LD_LIBRARY_PATH
Chris@69 2773 shlibpath_overrides_runpath=no
Chris@69 2774 hardcode_into_libs=yes
Chris@69 2775 ;;
Chris@69 2776
Chris@69 2777 irix5* | irix6* | nonstopux*)
Chris@69 2778 case $host_os in
Chris@69 2779 nonstopux*) version_type=nonstopux ;;
Chris@69 2780 *)
Chris@69 2781 if test yes = "$lt_cv_prog_gnu_ld"; then
Chris@69 2782 version_type=linux # correct to gnu/linux during the next big refactor
Chris@69 2783 else
Chris@69 2784 version_type=irix
Chris@69 2785 fi ;;
Chris@69 2786 esac
Chris@69 2787 need_lib_prefix=no
Chris@69 2788 need_version=no
Chris@69 2789 soname_spec='$libname$release$shared_ext$major'
Chris@69 2790 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
Chris@69 2791 case $host_os in
Chris@69 2792 irix5* | nonstopux*)
Chris@69 2793 libsuff= shlibsuff=
Chris@69 2794 ;;
Chris@69 2795 *)
Chris@69 2796 case $LD in # libtool.m4 will add one of these switches to LD
Chris@69 2797 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
Chris@69 2798 libsuff= shlibsuff= libmagic=32-bit;;
Chris@69 2799 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
Chris@69 2800 libsuff=32 shlibsuff=N32 libmagic=N32;;
Chris@69 2801 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
Chris@69 2802 libsuff=64 shlibsuff=64 libmagic=64-bit;;
Chris@69 2803 *) libsuff= shlibsuff= libmagic=never-match;;
Chris@69 2804 esac
Chris@69 2805 ;;
Chris@69 2806 esac
Chris@69 2807 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
Chris@69 2808 shlibpath_overrides_runpath=no
Chris@69 2809 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
Chris@69 2810 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
Chris@69 2811 hardcode_into_libs=yes
Chris@69 2812 ;;
Chris@69 2813
Chris@69 2814 # No shared lib support for Linux oldld, aout, or coff.
Chris@69 2815 linux*oldld* | linux*aout* | linux*coff*)
Chris@69 2816 dynamic_linker=no
Chris@69 2817 ;;
Chris@69 2818
Chris@69 2819 linux*android*)
Chris@69 2820 version_type=none # Android doesn't support versioned libraries.
Chris@69 2821 need_lib_prefix=no
Chris@69 2822 need_version=no
Chris@69 2823 library_names_spec='$libname$release$shared_ext'
Chris@69 2824 soname_spec='$libname$release$shared_ext'
Chris@69 2825 finish_cmds=
Chris@69 2826 shlibpath_var=LD_LIBRARY_PATH
Chris@69 2827 shlibpath_overrides_runpath=yes
Chris@69 2828
Chris@69 2829 # This implies no fast_install, which is unacceptable.
Chris@69 2830 # Some rework will be needed to allow for fast_install
Chris@69 2831 # before this can be enabled.
Chris@69 2832 hardcode_into_libs=yes
Chris@69 2833
Chris@69 2834 dynamic_linker='Android linker'
Chris@69 2835 # Don't embed -rpath directories since the linker doesn't support them.
Chris@69 2836 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@69 2837 ;;
Chris@69 2838
Chris@69 2839 # This must be glibc/ELF.
Chris@69 2840 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
Chris@69 2841 version_type=linux # correct to gnu/linux during the next big refactor
Chris@69 2842 need_lib_prefix=no
Chris@69 2843 need_version=no
Chris@69 2844 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@69 2845 soname_spec='$libname$release$shared_ext$major'
Chris@69 2846 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
Chris@69 2847 shlibpath_var=LD_LIBRARY_PATH
Chris@69 2848 shlibpath_overrides_runpath=no
Chris@69 2849
Chris@69 2850 # Some binutils ld are patched to set DT_RUNPATH
Chris@69 2851 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
Chris@69 2852 [lt_cv_shlibpath_overrides_runpath=no
Chris@69 2853 save_LDFLAGS=$LDFLAGS
Chris@69 2854 save_libdir=$libdir
Chris@69 2855 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
Chris@69 2856 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
Chris@69 2857 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
Chris@69 2858 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
Chris@69 2859 [lt_cv_shlibpath_overrides_runpath=yes])])
Chris@69 2860 LDFLAGS=$save_LDFLAGS
Chris@69 2861 libdir=$save_libdir
Chris@69 2862 ])
Chris@69 2863 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
Chris@69 2864
Chris@69 2865 # This implies no fast_install, which is unacceptable.
Chris@69 2866 # Some rework will be needed to allow for fast_install
Chris@69 2867 # before this can be enabled.
Chris@69 2868 hardcode_into_libs=yes
Chris@69 2869
Chris@69 2870 # Add ABI-specific directories to the system library path.
Chris@69 2871 sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
Chris@69 2872
Chris@69 2873 # Ideally, we could use ldconfig to report *all* directores which are
Chris@69 2874 # searched for libraries, however this is still not possible. Aside from not
Chris@69 2875 # being certain /sbin/ldconfig is available, command
Chris@69 2876 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
Chris@69 2877 # even though it is searched at run-time. Try to do the best guess by
Chris@69 2878 # appending ld.so.conf contents (and includes) to the search path.
Chris@69 2879 if test -f /etc/ld.so.conf; then
Chris@69 2880 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@69 2881 sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
Chris@69 2882 fi
Chris@69 2883
Chris@69 2884 # We used to test for /lib/ld.so.1 and disable shared libraries on
Chris@69 2885 # powerpc, because MkLinux only supported shared libraries with the
Chris@69 2886 # GNU dynamic linker. Since this was broken with cross compilers,
Chris@69 2887 # most powerpc-linux boxes support dynamic linking these days and
Chris@69 2888 # people can always --disable-shared, the test was removed, and we
Chris@69 2889 # assume the GNU/Linux dynamic linker is in use.
Chris@69 2890 dynamic_linker='GNU/Linux ld.so'
Chris@69 2891 ;;
Chris@69 2892
Chris@69 2893 netbsd*)
Chris@69 2894 version_type=sunos
Chris@69 2895 need_lib_prefix=no
Chris@69 2896 need_version=no
Chris@69 2897 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
Chris@69 2898 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
Chris@69 2899 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
Chris@69 2900 dynamic_linker='NetBSD (a.out) ld.so'
Chris@69 2901 else
Chris@69 2902 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@69 2903 soname_spec='$libname$release$shared_ext$major'
Chris@69 2904 dynamic_linker='NetBSD ld.elf_so'
Chris@69 2905 fi
Chris@69 2906 shlibpath_var=LD_LIBRARY_PATH
Chris@69 2907 shlibpath_overrides_runpath=yes
Chris@69 2908 hardcode_into_libs=yes
Chris@69 2909 ;;
Chris@69 2910
Chris@69 2911 newsos6)
Chris@69 2912 version_type=linux # correct to gnu/linux during the next big refactor
Chris@69 2913 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@69 2914 shlibpath_var=LD_LIBRARY_PATH
Chris@69 2915 shlibpath_overrides_runpath=yes
Chris@69 2916 ;;
Chris@69 2917
Chris@69 2918 *nto* | *qnx*)
Chris@69 2919 version_type=qnx
Chris@69 2920 need_lib_prefix=no
Chris@69 2921 need_version=no
Chris@69 2922 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@69 2923 soname_spec='$libname$release$shared_ext$major'
Chris@69 2924 shlibpath_var=LD_LIBRARY_PATH
Chris@69 2925 shlibpath_overrides_runpath=no
Chris@69 2926 hardcode_into_libs=yes
Chris@69 2927 dynamic_linker='ldqnx.so'
Chris@69 2928 ;;
Chris@69 2929
Chris@69 2930 openbsd* | bitrig*)
Chris@69 2931 version_type=sunos
Chris@69 2932 sys_lib_dlsearch_path_spec=/usr/lib
Chris@69 2933 need_lib_prefix=no
Chris@69 2934 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
Chris@69 2935 need_version=no
Chris@69 2936 else
Chris@69 2937 need_version=yes
Chris@69 2938 fi
Chris@69 2939 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
Chris@69 2940 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
Chris@69 2941 shlibpath_var=LD_LIBRARY_PATH
Chris@69 2942 shlibpath_overrides_runpath=yes
Chris@69 2943 ;;
Chris@69 2944
Chris@69 2945 os2*)
Chris@69 2946 libname_spec='$name'
Chris@69 2947 version_type=windows
Chris@69 2948 shrext_cmds=.dll
Chris@69 2949 need_version=no
Chris@69 2950 need_lib_prefix=no
Chris@69 2951 # OS/2 can only load a DLL with a base name of 8 characters or less.
Chris@69 2952 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
Chris@69 2953 v=$($ECHO $release$versuffix | tr -d .-);
Chris@69 2954 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
Chris@69 2955 $ECHO $n$v`$shared_ext'
Chris@69 2956 library_names_spec='${libname}_dll.$libext'
Chris@69 2957 dynamic_linker='OS/2 ld.exe'
Chris@69 2958 shlibpath_var=BEGINLIBPATH
Chris@69 2959 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
Chris@69 2960 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
Chris@69 2961 postinstall_cmds='base_file=`basename \$file`~
Chris@69 2962 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
Chris@69 2963 dldir=$destdir/`dirname \$dlpath`~
Chris@69 2964 test -d \$dldir || mkdir -p \$dldir~
Chris@69 2965 $install_prog $dir/$dlname \$dldir/$dlname~
Chris@69 2966 chmod a+x \$dldir/$dlname~
Chris@69 2967 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
Chris@69 2968 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
Chris@69 2969 fi'
Chris@69 2970 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
Chris@69 2971 dlpath=$dir/\$dldll~
Chris@69 2972 $RM \$dlpath'
Chris@69 2973 ;;
Chris@69 2974
Chris@69 2975 osf3* | osf4* | osf5*)
Chris@69 2976 version_type=osf
Chris@69 2977 need_lib_prefix=no
Chris@69 2978 need_version=no
Chris@69 2979 soname_spec='$libname$release$shared_ext$major'
Chris@69 2980 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@69 2981 shlibpath_var=LD_LIBRARY_PATH
Chris@69 2982 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
Chris@69 2983 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
Chris@69 2984 ;;
Chris@69 2985
Chris@69 2986 rdos*)
Chris@69 2987 dynamic_linker=no
Chris@69 2988 ;;
Chris@69 2989
Chris@69 2990 solaris*)
Chris@69 2991 version_type=linux # correct to gnu/linux during the next big refactor
Chris@69 2992 need_lib_prefix=no
Chris@69 2993 need_version=no
Chris@69 2994 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@69 2995 soname_spec='$libname$release$shared_ext$major'
Chris@69 2996 shlibpath_var=LD_LIBRARY_PATH
Chris@69 2997 shlibpath_overrides_runpath=yes
Chris@69 2998 hardcode_into_libs=yes
Chris@69 2999 # ldd complains unless libraries are executable
Chris@69 3000 postinstall_cmds='chmod +x $lib'
Chris@69 3001 ;;
Chris@69 3002
Chris@69 3003 sunos4*)
Chris@69 3004 version_type=sunos
Chris@69 3005 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
Chris@69 3006 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
Chris@69 3007 shlibpath_var=LD_LIBRARY_PATH
Chris@69 3008 shlibpath_overrides_runpath=yes
Chris@69 3009 if test yes = "$with_gnu_ld"; then
Chris@69 3010 need_lib_prefix=no
Chris@69 3011 fi
Chris@69 3012 need_version=yes
Chris@69 3013 ;;
Chris@69 3014
Chris@69 3015 sysv4 | sysv4.3*)
Chris@69 3016 version_type=linux # correct to gnu/linux during the next big refactor
Chris@69 3017 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@69 3018 soname_spec='$libname$release$shared_ext$major'
Chris@69 3019 shlibpath_var=LD_LIBRARY_PATH
Chris@69 3020 case $host_vendor in
Chris@69 3021 sni)
Chris@69 3022 shlibpath_overrides_runpath=no
Chris@69 3023 need_lib_prefix=no
Chris@69 3024 runpath_var=LD_RUN_PATH
Chris@69 3025 ;;
Chris@69 3026 siemens)
Chris@69 3027 need_lib_prefix=no
Chris@69 3028 ;;
Chris@69 3029 motorola)
Chris@69 3030 need_lib_prefix=no
Chris@69 3031 need_version=no
Chris@69 3032 shlibpath_overrides_runpath=no
Chris@69 3033 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
Chris@69 3034 ;;
Chris@69 3035 esac
Chris@69 3036 ;;
Chris@69 3037
Chris@69 3038 sysv4*MP*)
Chris@69 3039 if test -d /usr/nec; then
Chris@69 3040 version_type=linux # correct to gnu/linux during the next big refactor
Chris@69 3041 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
Chris@69 3042 soname_spec='$libname$shared_ext.$major'
Chris@69 3043 shlibpath_var=LD_LIBRARY_PATH
Chris@69 3044 fi
Chris@69 3045 ;;
Chris@69 3046
Chris@69 3047 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
Chris@69 3048 version_type=sco
Chris@69 3049 need_lib_prefix=no
Chris@69 3050 need_version=no
Chris@69 3051 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
Chris@69 3052 soname_spec='$libname$release$shared_ext$major'
Chris@69 3053 shlibpath_var=LD_LIBRARY_PATH
Chris@69 3054 shlibpath_overrides_runpath=yes
Chris@69 3055 hardcode_into_libs=yes
Chris@69 3056 if test yes = "$with_gnu_ld"; then
Chris@69 3057 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
Chris@69 3058 else
Chris@69 3059 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
Chris@69 3060 case $host_os in
Chris@69 3061 sco3.2v5*)
Chris@69 3062 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
Chris@69 3063 ;;
Chris@69 3064 esac
Chris@69 3065 fi
Chris@69 3066 sys_lib_dlsearch_path_spec='/usr/lib'
Chris@69 3067 ;;
Chris@69 3068
Chris@69 3069 tpf*)
Chris@69 3070 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
Chris@69 3071 version_type=linux # correct to gnu/linux during the next big refactor
Chris@69 3072 need_lib_prefix=no
Chris@69 3073 need_version=no
Chris@69 3074 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@69 3075 shlibpath_var=LD_LIBRARY_PATH
Chris@69 3076 shlibpath_overrides_runpath=no
Chris@69 3077 hardcode_into_libs=yes
Chris@69 3078 ;;
Chris@69 3079
Chris@69 3080 uts4*)
Chris@69 3081 version_type=linux # correct to gnu/linux during the next big refactor
Chris@69 3082 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@69 3083 soname_spec='$libname$release$shared_ext$major'
Chris@69 3084 shlibpath_var=LD_LIBRARY_PATH
Chris@69 3085 ;;
Chris@69 3086
Chris@69 3087 *)
Chris@69 3088 dynamic_linker=no
Chris@69 3089 ;;
Chris@69 3090 esac
Chris@69 3091 AC_MSG_RESULT([$dynamic_linker])
Chris@69 3092 test no = "$dynamic_linker" && can_build_shared=no
Chris@69 3093
Chris@69 3094 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
Chris@69 3095 if test yes = "$GCC"; then
Chris@69 3096 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
Chris@69 3097 fi
Chris@69 3098
Chris@69 3099 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
Chris@69 3100 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
Chris@69 3101 fi
Chris@69 3102
Chris@69 3103 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
Chris@69 3104 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
Chris@69 3105 fi
Chris@69 3106
Chris@69 3107 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
Chris@69 3108 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
Chris@69 3109
Chris@69 3110 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
Chris@69 3111 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
Chris@69 3112
Chris@69 3113 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
Chris@69 3114 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
Chris@69 3115
Chris@69 3116 _LT_DECL([], [variables_saved_for_relink], [1],
Chris@69 3117 [Variables whose values should be saved in libtool wrapper scripts and
Chris@69 3118 restored at link time])
Chris@69 3119 _LT_DECL([], [need_lib_prefix], [0],
Chris@69 3120 [Do we need the "lib" prefix for modules?])
Chris@69 3121 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
Chris@69 3122 _LT_DECL([], [version_type], [0], [Library versioning type])
Chris@69 3123 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
Chris@69 3124 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
Chris@69 3125 _LT_DECL([], [shlibpath_overrides_runpath], [0],
Chris@69 3126 [Is shlibpath searched before the hard-coded library search path?])
Chris@69 3127 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
Chris@69 3128 _LT_DECL([], [library_names_spec], [1],
Chris@69 3129 [[List of archive names. First name is the real one, the rest are links.
Chris@69 3130 The last name is the one that the linker finds with -lNAME]])
Chris@69 3131 _LT_DECL([], [soname_spec], [1],
Chris@69 3132 [[The coded name of the library, if different from the real name]])
Chris@69 3133 _LT_DECL([], [install_override_mode], [1],
Chris@69 3134 [Permission mode override for installation of shared libraries])
Chris@69 3135 _LT_DECL([], [postinstall_cmds], [2],
Chris@69 3136 [Command to use after installation of a shared archive])
Chris@69 3137 _LT_DECL([], [postuninstall_cmds], [2],
Chris@69 3138 [Command to use after uninstallation of a shared archive])
Chris@69 3139 _LT_DECL([], [finish_cmds], [2],
Chris@69 3140 [Commands used to finish a libtool library installation in a directory])
Chris@69 3141 _LT_DECL([], [finish_eval], [1],
Chris@69 3142 [[As "finish_cmds", except a single script fragment to be evaled but
Chris@69 3143 not shown]])
Chris@69 3144 _LT_DECL([], [hardcode_into_libs], [0],
Chris@69 3145 [Whether we should hardcode library paths into libraries])
Chris@69 3146 _LT_DECL([], [sys_lib_search_path_spec], [2],
Chris@69 3147 [Compile-time system search path for libraries])
Chris@69 3148 _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
Chris@69 3149 [Detected run-time system search path for libraries])
Chris@69 3150 _LT_DECL([], [configure_time_lt_sys_library_path], [2],
Chris@69 3151 [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
Chris@69 3152 ])# _LT_SYS_DYNAMIC_LINKER
Chris@69 3153
Chris@69 3154
Chris@69 3155 # _LT_PATH_TOOL_PREFIX(TOOL)
Chris@69 3156 # --------------------------
Chris@69 3157 # find a file program that can recognize shared library
Chris@69 3158 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
Chris@69 3159 [m4_require([_LT_DECL_EGREP])dnl
Chris@69 3160 AC_MSG_CHECKING([for $1])
Chris@69 3161 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
Chris@69 3162 [case $MAGIC_CMD in
Chris@69 3163 [[\\/*] | ?:[\\/]*])
Chris@69 3164 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
Chris@69 3165 ;;
Chris@69 3166 *)
Chris@69 3167 lt_save_MAGIC_CMD=$MAGIC_CMD
Chris@69 3168 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
Chris@69 3169 dnl $ac_dummy forces splitting on constant user-supplied paths.
Chris@69 3170 dnl POSIX.2 word splitting is done only on the output of word expansions,
Chris@69 3171 dnl not every word. This closes a longstanding sh security hole.
Chris@69 3172 ac_dummy="m4_if([$2], , $PATH, [$2])"
Chris@69 3173 for ac_dir in $ac_dummy; do
Chris@69 3174 IFS=$lt_save_ifs
Chris@69 3175 test -z "$ac_dir" && ac_dir=.
Chris@69 3176 if test -f "$ac_dir/$1"; then
Chris@69 3177 lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
Chris@69 3178 if test -n "$file_magic_test_file"; then
Chris@69 3179 case $deplibs_check_method in
Chris@69 3180 "file_magic "*)
Chris@69 3181 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
Chris@69 3182 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
Chris@69 3183 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
Chris@69 3184 $EGREP "$file_magic_regex" > /dev/null; then
Chris@69 3185 :
Chris@69 3186 else
Chris@69 3187 cat <<_LT_EOF 1>&2
Chris@69 3188
Chris@69 3189 *** Warning: the command libtool uses to detect shared libraries,
Chris@69 3190 *** $file_magic_cmd, produces output that libtool cannot recognize.
Chris@69 3191 *** The result is that libtool may fail to recognize shared libraries
Chris@69 3192 *** as such. This will affect the creation of libtool libraries that
Chris@69 3193 *** depend on shared libraries, but programs linked with such libtool
Chris@69 3194 *** libraries will work regardless of this problem. Nevertheless, you
Chris@69 3195 *** may want to report the problem to your system manager and/or to
Chris@69 3196 *** bug-libtool@gnu.org
Chris@69 3197
Chris@69 3198 _LT_EOF
Chris@69 3199 fi ;;
Chris@69 3200 esac
Chris@69 3201 fi
Chris@69 3202 break
Chris@69 3203 fi
Chris@69 3204 done
Chris@69 3205 IFS=$lt_save_ifs
Chris@69 3206 MAGIC_CMD=$lt_save_MAGIC_CMD
Chris@69 3207 ;;
Chris@69 3208 esac])
Chris@69 3209 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
Chris@69 3210 if test -n "$MAGIC_CMD"; then
Chris@69 3211 AC_MSG_RESULT($MAGIC_CMD)
Chris@69 3212 else
Chris@69 3213 AC_MSG_RESULT(no)
Chris@69 3214 fi
Chris@69 3215 _LT_DECL([], [MAGIC_CMD], [0],
Chris@69 3216 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
Chris@69 3217 ])# _LT_PATH_TOOL_PREFIX
Chris@69 3218
Chris@69 3219 # Old name:
Chris@69 3220 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
Chris@69 3221 dnl aclocal-1.4 backwards compatibility:
Chris@69 3222 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
Chris@69 3223
Chris@69 3224
Chris@69 3225 # _LT_PATH_MAGIC
Chris@69 3226 # --------------
Chris@69 3227 # find a file program that can recognize a shared library
Chris@69 3228 m4_defun([_LT_PATH_MAGIC],
Chris@69 3229 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
Chris@69 3230 if test -z "$lt_cv_path_MAGIC_CMD"; then
Chris@69 3231 if test -n "$ac_tool_prefix"; then
Chris@69 3232 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
Chris@69 3233 else
Chris@69 3234 MAGIC_CMD=:
Chris@69 3235 fi
Chris@69 3236 fi
Chris@69 3237 ])# _LT_PATH_MAGIC
Chris@69 3238
Chris@69 3239
Chris@69 3240 # LT_PATH_LD
Chris@69 3241 # ----------
Chris@69 3242 # find the pathname to the GNU or non-GNU linker
Chris@69 3243 AC_DEFUN([LT_PATH_LD],
Chris@69 3244 [AC_REQUIRE([AC_PROG_CC])dnl
Chris@69 3245 AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@69 3246 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
Chris@69 3247 m4_require([_LT_DECL_SED])dnl
Chris@69 3248 m4_require([_LT_DECL_EGREP])dnl
Chris@69 3249 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
Chris@69 3250
Chris@69 3251 AC_ARG_WITH([gnu-ld],
Chris@69 3252 [AS_HELP_STRING([--with-gnu-ld],
Chris@69 3253 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
Chris@69 3254 [test no = "$withval" || with_gnu_ld=yes],
Chris@69 3255 [with_gnu_ld=no])dnl
Chris@69 3256
Chris@69 3257 ac_prog=ld
Chris@69 3258 if test yes = "$GCC"; then
Chris@69 3259 # Check if gcc -print-prog-name=ld gives a path.
Chris@69 3260 AC_MSG_CHECKING([for ld used by $CC])
Chris@69 3261 case $host in
Chris@69 3262 *-*-mingw*)
Chris@69 3263 # gcc leaves a trailing carriage return, which upsets mingw
Chris@69 3264 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
Chris@69 3265 *)
Chris@69 3266 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
Chris@69 3267 esac
Chris@69 3268 case $ac_prog in
Chris@69 3269 # Accept absolute paths.
Chris@69 3270 [[\\/]]* | ?:[[\\/]]*)
Chris@69 3271 re_direlt='/[[^/]][[^/]]*/\.\./'
Chris@69 3272 # Canonicalize the pathname of ld
Chris@69 3273 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
Chris@69 3274 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
Chris@69 3275 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
Chris@69 3276 done
Chris@69 3277 test -z "$LD" && LD=$ac_prog
Chris@69 3278 ;;
Chris@69 3279 "")
Chris@69 3280 # If it fails, then pretend we aren't using GCC.
Chris@69 3281 ac_prog=ld
Chris@69 3282 ;;
Chris@69 3283 *)
Chris@69 3284 # If it is relative, then search for the first ld in PATH.
Chris@69 3285 with_gnu_ld=unknown
Chris@69 3286 ;;
Chris@69 3287 esac
Chris@69 3288 elif test yes = "$with_gnu_ld"; then
Chris@69 3289 AC_MSG_CHECKING([for GNU ld])
Chris@69 3290 else
Chris@69 3291 AC_MSG_CHECKING([for non-GNU ld])
Chris@69 3292 fi
Chris@69 3293 AC_CACHE_VAL(lt_cv_path_LD,
Chris@69 3294 [if test -z "$LD"; then
Chris@69 3295 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
Chris@69 3296 for ac_dir in $PATH; do
Chris@69 3297 IFS=$lt_save_ifs
Chris@69 3298 test -z "$ac_dir" && ac_dir=.
Chris@69 3299 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
Chris@69 3300 lt_cv_path_LD=$ac_dir/$ac_prog
Chris@69 3301 # Check to see if the program is GNU ld. I'd rather use --version,
Chris@69 3302 # but apparently some variants of GNU ld only accept -v.
Chris@69 3303 # Break only if it was the GNU/non-GNU ld that we prefer.
Chris@69 3304 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
Chris@69 3305 *GNU* | *'with BFD'*)
Chris@69 3306 test no != "$with_gnu_ld" && break
Chris@69 3307 ;;
Chris@69 3308 *)
Chris@69 3309 test yes != "$with_gnu_ld" && break
Chris@69 3310 ;;
Chris@69 3311 esac
Chris@69 3312 fi
Chris@69 3313 done
Chris@69 3314 IFS=$lt_save_ifs
Chris@69 3315 else
Chris@69 3316 lt_cv_path_LD=$LD # Let the user override the test with a path.
Chris@69 3317 fi])
Chris@69 3318 LD=$lt_cv_path_LD
Chris@69 3319 if test -n "$LD"; then
Chris@69 3320 AC_MSG_RESULT($LD)
Chris@69 3321 else
Chris@69 3322 AC_MSG_RESULT(no)
Chris@69 3323 fi
Chris@69 3324 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
Chris@69 3325 _LT_PATH_LD_GNU
Chris@69 3326 AC_SUBST([LD])
Chris@69 3327
Chris@69 3328 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
Chris@69 3329 ])# LT_PATH_LD
Chris@69 3330
Chris@69 3331 # Old names:
Chris@69 3332 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
Chris@69 3333 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
Chris@69 3334 dnl aclocal-1.4 backwards compatibility:
Chris@69 3335 dnl AC_DEFUN([AM_PROG_LD], [])
Chris@69 3336 dnl AC_DEFUN([AC_PROG_LD], [])
Chris@69 3337
Chris@69 3338
Chris@69 3339 # _LT_PATH_LD_GNU
Chris@69 3340 #- --------------
Chris@69 3341 m4_defun([_LT_PATH_LD_GNU],
Chris@69 3342 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
Chris@69 3343 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
Chris@69 3344 case `$LD -v 2>&1 </dev/null` in
Chris@69 3345 *GNU* | *'with BFD'*)
Chris@69 3346 lt_cv_prog_gnu_ld=yes
Chris@69 3347 ;;
Chris@69 3348 *)
Chris@69 3349 lt_cv_prog_gnu_ld=no
Chris@69 3350 ;;
Chris@69 3351 esac])
Chris@69 3352 with_gnu_ld=$lt_cv_prog_gnu_ld
Chris@69 3353 ])# _LT_PATH_LD_GNU
Chris@69 3354
Chris@69 3355
Chris@69 3356 # _LT_CMD_RELOAD
Chris@69 3357 # --------------
Chris@69 3358 # find reload flag for linker
Chris@69 3359 # -- PORTME Some linkers may need a different reload flag.
Chris@69 3360 m4_defun([_LT_CMD_RELOAD],
Chris@69 3361 [AC_CACHE_CHECK([for $LD option to reload object files],
Chris@69 3362 lt_cv_ld_reload_flag,
Chris@69 3363 [lt_cv_ld_reload_flag='-r'])
Chris@69 3364 reload_flag=$lt_cv_ld_reload_flag
Chris@69 3365 case $reload_flag in
Chris@69 3366 "" | " "*) ;;
Chris@69 3367 *) reload_flag=" $reload_flag" ;;
Chris@69 3368 esac
Chris@69 3369 reload_cmds='$LD$reload_flag -o $output$reload_objs'
Chris@69 3370 case $host_os in
Chris@69 3371 cygwin* | mingw* | pw32* | cegcc*)
Chris@69 3372 if test yes != "$GCC"; then
Chris@69 3373 reload_cmds=false
Chris@69 3374 fi
Chris@69 3375 ;;
Chris@69 3376 darwin*)
Chris@69 3377 if test yes = "$GCC"; then
Chris@69 3378 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
Chris@69 3379 else
Chris@69 3380 reload_cmds='$LD$reload_flag -o $output$reload_objs'
Chris@69 3381 fi
Chris@69 3382 ;;
Chris@69 3383 esac
Chris@69 3384 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
Chris@69 3385 _LT_TAGDECL([], [reload_cmds], [2])dnl
Chris@69 3386 ])# _LT_CMD_RELOAD
Chris@69 3387
Chris@69 3388
Chris@69 3389 # _LT_PATH_DD
Chris@69 3390 # -----------
Chris@69 3391 # find a working dd
Chris@69 3392 m4_defun([_LT_PATH_DD],
Chris@69 3393 [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
Chris@69 3394 [printf 0123456789abcdef0123456789abcdef >conftest.i
Chris@69 3395 cat conftest.i conftest.i >conftest2.i
Chris@69 3396 : ${lt_DD:=$DD}
Chris@69 3397 AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
Chris@69 3398 [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
Chris@69 3399 cmp -s conftest.i conftest.out \
Chris@69 3400 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
Chris@69 3401 fi])
Chris@69 3402 rm -f conftest.i conftest2.i conftest.out])
Chris@69 3403 ])# _LT_PATH_DD
Chris@69 3404
Chris@69 3405
Chris@69 3406 # _LT_CMD_TRUNCATE
Chris@69 3407 # ----------------
Chris@69 3408 # find command to truncate a binary pipe
Chris@69 3409 m4_defun([_LT_CMD_TRUNCATE],
Chris@69 3410 [m4_require([_LT_PATH_DD])
Chris@69 3411 AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
Chris@69 3412 [printf 0123456789abcdef0123456789abcdef >conftest.i
Chris@69 3413 cat conftest.i conftest.i >conftest2.i
Chris@69 3414 lt_cv_truncate_bin=
Chris@69 3415 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
Chris@69 3416 cmp -s conftest.i conftest.out \
Chris@69 3417 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
Chris@69 3418 fi
Chris@69 3419 rm -f conftest.i conftest2.i conftest.out
Chris@69 3420 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
Chris@69 3421 _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
Chris@69 3422 [Command to truncate a binary pipe])
Chris@69 3423 ])# _LT_CMD_TRUNCATE
Chris@69 3424
Chris@69 3425
Chris@69 3426 # _LT_CHECK_MAGIC_METHOD
Chris@69 3427 # ----------------------
Chris@69 3428 # how to check for library dependencies
Chris@69 3429 # -- PORTME fill in with the dynamic library characteristics
Chris@69 3430 m4_defun([_LT_CHECK_MAGIC_METHOD],
Chris@69 3431 [m4_require([_LT_DECL_EGREP])
Chris@69 3432 m4_require([_LT_DECL_OBJDUMP])
Chris@69 3433 AC_CACHE_CHECK([how to recognize dependent libraries],
Chris@69 3434 lt_cv_deplibs_check_method,
Chris@69 3435 [lt_cv_file_magic_cmd='$MAGIC_CMD'
Chris@69 3436 lt_cv_file_magic_test_file=
Chris@69 3437 lt_cv_deplibs_check_method='unknown'
Chris@69 3438 # Need to set the preceding variable on all platforms that support
Chris@69 3439 # interlibrary dependencies.
Chris@69 3440 # 'none' -- dependencies not supported.
Chris@69 3441 # 'unknown' -- same as none, but documents that we really don't know.
Chris@69 3442 # 'pass_all' -- all dependencies passed with no checks.
Chris@69 3443 # 'test_compile' -- check by making test program.
Chris@69 3444 # 'file_magic [[regex]]' -- check by looking for files in library path
Chris@69 3445 # that responds to the $file_magic_cmd with a given extended regex.
Chris@69 3446 # If you have 'file' or equivalent on your system and you're not sure
Chris@69 3447 # whether 'pass_all' will *always* work, you probably want this one.
Chris@69 3448
Chris@69 3449 case $host_os in
Chris@69 3450 aix[[4-9]]*)
Chris@69 3451 lt_cv_deplibs_check_method=pass_all
Chris@69 3452 ;;
Chris@69 3453
Chris@69 3454 beos*)
Chris@69 3455 lt_cv_deplibs_check_method=pass_all
Chris@69 3456 ;;
Chris@69 3457
Chris@69 3458 bsdi[[45]]*)
Chris@69 3459 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
Chris@69 3460 lt_cv_file_magic_cmd='/usr/bin/file -L'
Chris@69 3461 lt_cv_file_magic_test_file=/shlib/libc.so
Chris@69 3462 ;;
Chris@69 3463
Chris@69 3464 cygwin*)
Chris@69 3465 # func_win32_libid is a shell function defined in ltmain.sh
Chris@69 3466 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
Chris@69 3467 lt_cv_file_magic_cmd='func_win32_libid'
Chris@69 3468 ;;
Chris@69 3469
Chris@69 3470 mingw* | pw32*)
Chris@69 3471 # Base MSYS/MinGW do not provide the 'file' command needed by
Chris@69 3472 # func_win32_libid shell function, so use a weaker test based on 'objdump',
Chris@69 3473 # unless we find 'file', for example because we are cross-compiling.
Chris@69 3474 if ( file / ) >/dev/null 2>&1; then
Chris@69 3475 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
Chris@69 3476 lt_cv_file_magic_cmd='func_win32_libid'
Chris@69 3477 else
Chris@69 3478 # Keep this pattern in sync with the one in func_win32_libid.
Chris@69 3479 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
Chris@69 3480 lt_cv_file_magic_cmd='$OBJDUMP -f'
Chris@69 3481 fi
Chris@69 3482 ;;
Chris@69 3483
Chris@69 3484 cegcc*)
Chris@69 3485 # use the weaker test based on 'objdump'. See mingw*.
Chris@69 3486 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
Chris@69 3487 lt_cv_file_magic_cmd='$OBJDUMP -f'
Chris@69 3488 ;;
Chris@69 3489
Chris@69 3490 darwin* | rhapsody*)
Chris@69 3491 lt_cv_deplibs_check_method=pass_all
Chris@69 3492 ;;
Chris@69 3493
Chris@69 3494 freebsd* | dragonfly*)
Chris@69 3495 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
Chris@69 3496 case $host_cpu in
Chris@69 3497 i*86 )
Chris@69 3498 # Not sure whether the presence of OpenBSD here was a mistake.
Chris@69 3499 # Let's accept both of them until this is cleared up.
Chris@69 3500 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
Chris@69 3501 lt_cv_file_magic_cmd=/usr/bin/file
Chris@69 3502 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
Chris@69 3503 ;;
Chris@69 3504 esac
Chris@69 3505 else
Chris@69 3506 lt_cv_deplibs_check_method=pass_all
Chris@69 3507 fi
Chris@69 3508 ;;
Chris@69 3509
Chris@69 3510 haiku*)
Chris@69 3511 lt_cv_deplibs_check_method=pass_all
Chris@69 3512 ;;
Chris@69 3513
Chris@69 3514 hpux10.20* | hpux11*)
Chris@69 3515 lt_cv_file_magic_cmd=/usr/bin/file
Chris@69 3516 case $host_cpu in
Chris@69 3517 ia64*)
Chris@69 3518 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
Chris@69 3519 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
Chris@69 3520 ;;
Chris@69 3521 hppa*64*)
Chris@69 3522 [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@69 3523 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
Chris@69 3524 ;;
Chris@69 3525 *)
Chris@69 3526 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
Chris@69 3527 lt_cv_file_magic_test_file=/usr/lib/libc.sl
Chris@69 3528 ;;
Chris@69 3529 esac
Chris@69 3530 ;;
Chris@69 3531
Chris@69 3532 interix[[3-9]]*)
Chris@69 3533 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
Chris@69 3534 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
Chris@69 3535 ;;
Chris@69 3536
Chris@69 3537 irix5* | irix6* | nonstopux*)
Chris@69 3538 case $LD in
Chris@69 3539 *-32|*"-32 ") libmagic=32-bit;;
Chris@69 3540 *-n32|*"-n32 ") libmagic=N32;;
Chris@69 3541 *-64|*"-64 ") libmagic=64-bit;;
Chris@69 3542 *) libmagic=never-match;;
Chris@69 3543 esac
Chris@69 3544 lt_cv_deplibs_check_method=pass_all
Chris@69 3545 ;;
Chris@69 3546
Chris@69 3547 # This must be glibc/ELF.
Chris@69 3548 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
Chris@69 3549 lt_cv_deplibs_check_method=pass_all
Chris@69 3550 ;;
Chris@69 3551
Chris@69 3552 netbsd*)
Chris@69 3553 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
Chris@69 3554 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
Chris@69 3555 else
Chris@69 3556 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
Chris@69 3557 fi
Chris@69 3558 ;;
Chris@69 3559
Chris@69 3560 newos6*)
Chris@69 3561 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
Chris@69 3562 lt_cv_file_magic_cmd=/usr/bin/file
Chris@69 3563 lt_cv_file_magic_test_file=/usr/lib/libnls.so
Chris@69 3564 ;;
Chris@69 3565
Chris@69 3566 *nto* | *qnx*)
Chris@69 3567 lt_cv_deplibs_check_method=pass_all
Chris@69 3568 ;;
Chris@69 3569
Chris@69 3570 openbsd* | bitrig*)
Chris@69 3571 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
Chris@69 3572 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
Chris@69 3573 else
Chris@69 3574 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
Chris@69 3575 fi
Chris@69 3576 ;;
Chris@69 3577
Chris@69 3578 osf3* | osf4* | osf5*)
Chris@69 3579 lt_cv_deplibs_check_method=pass_all
Chris@69 3580 ;;
Chris@69 3581
Chris@69 3582 rdos*)
Chris@69 3583 lt_cv_deplibs_check_method=pass_all
Chris@69 3584 ;;
Chris@69 3585
Chris@69 3586 solaris*)
Chris@69 3587 lt_cv_deplibs_check_method=pass_all
Chris@69 3588 ;;
Chris@69 3589
Chris@69 3590 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
Chris@69 3591 lt_cv_deplibs_check_method=pass_all
Chris@69 3592 ;;
Chris@69 3593
Chris@69 3594 sysv4 | sysv4.3*)
Chris@69 3595 case $host_vendor in
Chris@69 3596 motorola)
Chris@69 3597 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@69 3598 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
Chris@69 3599 ;;
Chris@69 3600 ncr)
Chris@69 3601 lt_cv_deplibs_check_method=pass_all
Chris@69 3602 ;;
Chris@69 3603 sequent)
Chris@69 3604 lt_cv_file_magic_cmd='/bin/file'
Chris@69 3605 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
Chris@69 3606 ;;
Chris@69 3607 sni)
Chris@69 3608 lt_cv_file_magic_cmd='/bin/file'
Chris@69 3609 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
Chris@69 3610 lt_cv_file_magic_test_file=/lib/libc.so
Chris@69 3611 ;;
Chris@69 3612 siemens)
Chris@69 3613 lt_cv_deplibs_check_method=pass_all
Chris@69 3614 ;;
Chris@69 3615 pc)
Chris@69 3616 lt_cv_deplibs_check_method=pass_all
Chris@69 3617 ;;
Chris@69 3618 esac
Chris@69 3619 ;;
Chris@69 3620
Chris@69 3621 tpf*)
Chris@69 3622 lt_cv_deplibs_check_method=pass_all
Chris@69 3623 ;;
Chris@69 3624 os2*)
Chris@69 3625 lt_cv_deplibs_check_method=pass_all
Chris@69 3626 ;;
Chris@69 3627 esac
Chris@69 3628 ])
Chris@69 3629
Chris@69 3630 file_magic_glob=
Chris@69 3631 want_nocaseglob=no
Chris@69 3632 if test "$build" = "$host"; then
Chris@69 3633 case $host_os in
Chris@69 3634 mingw* | pw32*)
Chris@69 3635 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
Chris@69 3636 want_nocaseglob=yes
Chris@69 3637 else
Chris@69 3638 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
Chris@69 3639 fi
Chris@69 3640 ;;
Chris@69 3641 esac
Chris@69 3642 fi
Chris@69 3643
Chris@69 3644 file_magic_cmd=$lt_cv_file_magic_cmd
Chris@69 3645 deplibs_check_method=$lt_cv_deplibs_check_method
Chris@69 3646 test -z "$deplibs_check_method" && deplibs_check_method=unknown
Chris@69 3647
Chris@69 3648 _LT_DECL([], [deplibs_check_method], [1],
Chris@69 3649 [Method to check whether dependent libraries are shared objects])
Chris@69 3650 _LT_DECL([], [file_magic_cmd], [1],
Chris@69 3651 [Command to use when deplibs_check_method = "file_magic"])
Chris@69 3652 _LT_DECL([], [file_magic_glob], [1],
Chris@69 3653 [How to find potential files when deplibs_check_method = "file_magic"])
Chris@69 3654 _LT_DECL([], [want_nocaseglob], [1],
Chris@69 3655 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
Chris@69 3656 ])# _LT_CHECK_MAGIC_METHOD
Chris@69 3657
Chris@69 3658
Chris@69 3659 # LT_PATH_NM
Chris@69 3660 # ----------
Chris@69 3661 # find the pathname to a BSD- or MS-compatible name lister
Chris@69 3662 AC_DEFUN([LT_PATH_NM],
Chris@69 3663 [AC_REQUIRE([AC_PROG_CC])dnl
Chris@69 3664 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
Chris@69 3665 [if test -n "$NM"; then
Chris@69 3666 # Let the user override the test.
Chris@69 3667 lt_cv_path_NM=$NM
Chris@69 3668 else
Chris@69 3669 lt_nm_to_check=${ac_tool_prefix}nm
Chris@69 3670 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
Chris@69 3671 lt_nm_to_check="$lt_nm_to_check nm"
Chris@69 3672 fi
Chris@69 3673 for lt_tmp_nm in $lt_nm_to_check; do
Chris@69 3674 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
Chris@69 3675 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
Chris@69 3676 IFS=$lt_save_ifs
Chris@69 3677 test -z "$ac_dir" && ac_dir=.
Chris@69 3678 tmp_nm=$ac_dir/$lt_tmp_nm
Chris@69 3679 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
Chris@69 3680 # Check to see if the nm accepts a BSD-compat flag.
Chris@69 3681 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
Chris@69 3682 # nm: unknown option "B" ignored
Chris@69 3683 # Tru64's nm complains that /dev/null is an invalid object file
Chris@69 3684 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
Chris@69 3685 case $build_os in
Chris@69 3686 mingw*) lt_bad_file=conftest.nm/nofile ;;
Chris@69 3687 *) lt_bad_file=/dev/null ;;
Chris@69 3688 esac
Chris@69 3689 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
Chris@69 3690 *$lt_bad_file* | *'Invalid file or object type'*)
Chris@69 3691 lt_cv_path_NM="$tmp_nm -B"
Chris@69 3692 break 2
Chris@69 3693 ;;
Chris@69 3694 *)
Chris@69 3695 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
Chris@69 3696 */dev/null*)
Chris@69 3697 lt_cv_path_NM="$tmp_nm -p"
Chris@69 3698 break 2
Chris@69 3699 ;;
Chris@69 3700 *)
Chris@69 3701 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
Chris@69 3702 continue # so that we can try to find one that supports BSD flags
Chris@69 3703 ;;
Chris@69 3704 esac
Chris@69 3705 ;;
Chris@69 3706 esac
Chris@69 3707 fi
Chris@69 3708 done
Chris@69 3709 IFS=$lt_save_ifs
Chris@69 3710 done
Chris@69 3711 : ${lt_cv_path_NM=no}
Chris@69 3712 fi])
Chris@69 3713 if test no != "$lt_cv_path_NM"; then
Chris@69 3714 NM=$lt_cv_path_NM
Chris@69 3715 else
Chris@69 3716 # Didn't find any BSD compatible name lister, look for dumpbin.
Chris@69 3717 if test -n "$DUMPBIN"; then :
Chris@69 3718 # Let the user override the test.
Chris@69 3719 else
Chris@69 3720 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
Chris@69 3721 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
Chris@69 3722 *COFF*)
Chris@69 3723 DUMPBIN="$DUMPBIN -symbols -headers"
Chris@69 3724 ;;
Chris@69 3725 *)
Chris@69 3726 DUMPBIN=:
Chris@69 3727 ;;
Chris@69 3728 esac
Chris@69 3729 fi
Chris@69 3730 AC_SUBST([DUMPBIN])
Chris@69 3731 if test : != "$DUMPBIN"; then
Chris@69 3732 NM=$DUMPBIN
Chris@69 3733 fi
Chris@69 3734 fi
Chris@69 3735 test -z "$NM" && NM=nm
Chris@69 3736 AC_SUBST([NM])
Chris@69 3737 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
Chris@69 3738
Chris@69 3739 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
Chris@69 3740 [lt_cv_nm_interface="BSD nm"
Chris@69 3741 echo "int some_variable = 0;" > conftest.$ac_ext
Chris@69 3742 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
Chris@69 3743 (eval "$ac_compile" 2>conftest.err)
Chris@69 3744 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@69 3745 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
Chris@69 3746 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
Chris@69 3747 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@69 3748 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
Chris@69 3749 cat conftest.out >&AS_MESSAGE_LOG_FD
Chris@69 3750 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
Chris@69 3751 lt_cv_nm_interface="MS dumpbin"
Chris@69 3752 fi
Chris@69 3753 rm -f conftest*])
Chris@69 3754 ])# LT_PATH_NM
Chris@69 3755
Chris@69 3756 # Old names:
Chris@69 3757 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
Chris@69 3758 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
Chris@69 3759 dnl aclocal-1.4 backwards compatibility:
Chris@69 3760 dnl AC_DEFUN([AM_PROG_NM], [])
Chris@69 3761 dnl AC_DEFUN([AC_PROG_NM], [])
Chris@69 3762
Chris@69 3763 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
Chris@69 3764 # --------------------------------
Chris@69 3765 # how to determine the name of the shared library
Chris@69 3766 # associated with a specific link library.
Chris@69 3767 # -- PORTME fill in with the dynamic library characteristics
Chris@69 3768 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
Chris@69 3769 [m4_require([_LT_DECL_EGREP])
Chris@69 3770 m4_require([_LT_DECL_OBJDUMP])
Chris@69 3771 m4_require([_LT_DECL_DLLTOOL])
Chris@69 3772 AC_CACHE_CHECK([how to associate runtime and link libraries],
Chris@69 3773 lt_cv_sharedlib_from_linklib_cmd,
Chris@69 3774 [lt_cv_sharedlib_from_linklib_cmd='unknown'
Chris@69 3775
Chris@69 3776 case $host_os in
Chris@69 3777 cygwin* | mingw* | pw32* | cegcc*)
Chris@69 3778 # two different shell functions defined in ltmain.sh;
Chris@69 3779 # decide which one to use based on capabilities of $DLLTOOL
Chris@69 3780 case `$DLLTOOL --help 2>&1` in
Chris@69 3781 *--identify-strict*)
Chris@69 3782 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
Chris@69 3783 ;;
Chris@69 3784 *)
Chris@69 3785 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
Chris@69 3786 ;;
Chris@69 3787 esac
Chris@69 3788 ;;
Chris@69 3789 *)
Chris@69 3790 # fallback: assume linklib IS sharedlib
Chris@69 3791 lt_cv_sharedlib_from_linklib_cmd=$ECHO
Chris@69 3792 ;;
Chris@69 3793 esac
Chris@69 3794 ])
Chris@69 3795 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
Chris@69 3796 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
Chris@69 3797
Chris@69 3798 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
Chris@69 3799 [Command to associate shared and link libraries])
Chris@69 3800 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
Chris@69 3801
Chris@69 3802
Chris@69 3803 # _LT_PATH_MANIFEST_TOOL
Chris@69 3804 # ----------------------
Chris@69 3805 # locate the manifest tool
Chris@69 3806 m4_defun([_LT_PATH_MANIFEST_TOOL],
Chris@69 3807 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
Chris@69 3808 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
Chris@69 3809 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
Chris@69 3810 [lt_cv_path_mainfest_tool=no
Chris@69 3811 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
Chris@69 3812 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
Chris@69 3813 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@69 3814 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
Chris@69 3815 lt_cv_path_mainfest_tool=yes
Chris@69 3816 fi
Chris@69 3817 rm -f conftest*])
Chris@69 3818 if test yes != "$lt_cv_path_mainfest_tool"; then
Chris@69 3819 MANIFEST_TOOL=:
Chris@69 3820 fi
Chris@69 3821 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
Chris@69 3822 ])# _LT_PATH_MANIFEST_TOOL
Chris@69 3823
Chris@69 3824
Chris@69 3825 # _LT_DLL_DEF_P([FILE])
Chris@69 3826 # ---------------------
Chris@69 3827 # True iff FILE is a Windows DLL '.def' file.
Chris@69 3828 # Keep in sync with func_dll_def_p in the libtool script
Chris@69 3829 AC_DEFUN([_LT_DLL_DEF_P],
Chris@69 3830 [dnl
Chris@69 3831 test DEF = "`$SED -n dnl
Chris@69 3832 -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
Chris@69 3833 -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
Chris@69 3834 -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
Chris@69 3835 -e q dnl Only consider the first "real" line
Chris@69 3836 $1`" dnl
Chris@69 3837 ])# _LT_DLL_DEF_P
Chris@69 3838
Chris@69 3839
Chris@69 3840 # LT_LIB_M
Chris@69 3841 # --------
Chris@69 3842 # check for math library
Chris@69 3843 AC_DEFUN([LT_LIB_M],
Chris@69 3844 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@69 3845 LIBM=
Chris@69 3846 case $host in
Chris@69 3847 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
Chris@69 3848 # These system don't have libm, or don't need it
Chris@69 3849 ;;
Chris@69 3850 *-ncr-sysv4.3*)
Chris@69 3851 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
Chris@69 3852 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
Chris@69 3853 ;;
Chris@69 3854 *)
Chris@69 3855 AC_CHECK_LIB(m, cos, LIBM=-lm)
Chris@69 3856 ;;
Chris@69 3857 esac
Chris@69 3858 AC_SUBST([LIBM])
Chris@69 3859 ])# LT_LIB_M
Chris@69 3860
Chris@69 3861 # Old name:
Chris@69 3862 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
Chris@69 3863 dnl aclocal-1.4 backwards compatibility:
Chris@69 3864 dnl AC_DEFUN([AC_CHECK_LIBM], [])
Chris@69 3865
Chris@69 3866
Chris@69 3867 # _LT_COMPILER_NO_RTTI([TAGNAME])
Chris@69 3868 # -------------------------------
Chris@69 3869 m4_defun([_LT_COMPILER_NO_RTTI],
Chris@69 3870 [m4_require([_LT_TAG_COMPILER])dnl
Chris@69 3871
Chris@69 3872 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
Chris@69 3873
Chris@69 3874 if test yes = "$GCC"; then
Chris@69 3875 case $cc_basename in
Chris@69 3876 nvcc*)
Chris@69 3877 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
Chris@69 3878 *)
Chris@69 3879 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
Chris@69 3880 esac
Chris@69 3881
Chris@69 3882 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
Chris@69 3883 lt_cv_prog_compiler_rtti_exceptions,
Chris@69 3884 [-fno-rtti -fno-exceptions], [],
Chris@69 3885 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
Chris@69 3886 fi
Chris@69 3887 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
Chris@69 3888 [Compiler flag to turn off builtin functions])
Chris@69 3889 ])# _LT_COMPILER_NO_RTTI
Chris@69 3890
Chris@69 3891
Chris@69 3892 # _LT_CMD_GLOBAL_SYMBOLS
Chris@69 3893 # ----------------------
Chris@69 3894 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
Chris@69 3895 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@69 3896 AC_REQUIRE([AC_PROG_CC])dnl
Chris@69 3897 AC_REQUIRE([AC_PROG_AWK])dnl
Chris@69 3898 AC_REQUIRE([LT_PATH_NM])dnl
Chris@69 3899 AC_REQUIRE([LT_PATH_LD])dnl
Chris@69 3900 m4_require([_LT_DECL_SED])dnl
Chris@69 3901 m4_require([_LT_DECL_EGREP])dnl
Chris@69 3902 m4_require([_LT_TAG_COMPILER])dnl
Chris@69 3903
Chris@69 3904 # Check for command to grab the raw symbol name followed by C symbol from nm.
Chris@69 3905 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
Chris@69 3906 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
Chris@69 3907 [
Chris@69 3908 # These are sane defaults that work on at least a few old systems.
Chris@69 3909 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
Chris@69 3910
Chris@69 3911 # Character class describing NM global symbol codes.
Chris@69 3912 symcode='[[BCDEGRST]]'
Chris@69 3913
Chris@69 3914 # Regexp to match symbols that can be accessed directly from C.
Chris@69 3915 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
Chris@69 3916
Chris@69 3917 # Define system-specific variables.
Chris@69 3918 case $host_os in
Chris@69 3919 aix*)
Chris@69 3920 symcode='[[BCDT]]'
Chris@69 3921 ;;
Chris@69 3922 cygwin* | mingw* | pw32* | cegcc*)
Chris@69 3923 symcode='[[ABCDGISTW]]'
Chris@69 3924 ;;
Chris@69 3925 hpux*)
Chris@69 3926 if test ia64 = "$host_cpu"; then
Chris@69 3927 symcode='[[ABCDEGRST]]'
Chris@69 3928 fi
Chris@69 3929 ;;
Chris@69 3930 irix* | nonstopux*)
Chris@69 3931 symcode='[[BCDEGRST]]'
Chris@69 3932 ;;
Chris@69 3933 osf*)
Chris@69 3934 symcode='[[BCDEGQRST]]'
Chris@69 3935 ;;
Chris@69 3936 solaris*)
Chris@69 3937 symcode='[[BDRT]]'
Chris@69 3938 ;;
Chris@69 3939 sco3.2v5*)
Chris@69 3940 symcode='[[DT]]'
Chris@69 3941 ;;
Chris@69 3942 sysv4.2uw2*)
Chris@69 3943 symcode='[[DT]]'
Chris@69 3944 ;;
Chris@69 3945 sysv5* | sco5v6* | unixware* | OpenUNIX*)
Chris@69 3946 symcode='[[ABDT]]'
Chris@69 3947 ;;
Chris@69 3948 sysv4)
Chris@69 3949 symcode='[[DFNSTU]]'
Chris@69 3950 ;;
Chris@69 3951 esac
Chris@69 3952
Chris@69 3953 # If we're using GNU nm, then use its standard symbol codes.
Chris@69 3954 case `$NM -V 2>&1` in
Chris@69 3955 *GNU* | *'with BFD'*)
Chris@69 3956 symcode='[[ABCDGIRSTW]]' ;;
Chris@69 3957 esac
Chris@69 3958
Chris@69 3959 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
Chris@69 3960 # Gets list of data symbols to import.
Chris@69 3961 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
Chris@69 3962 # Adjust the below global symbol transforms to fixup imported variables.
Chris@69 3963 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
Chris@69 3964 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
Chris@69 3965 lt_c_name_lib_hook="\
Chris@69 3966 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
Chris@69 3967 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
Chris@69 3968 else
Chris@69 3969 # Disable hooks by default.
Chris@69 3970 lt_cv_sys_global_symbol_to_import=
Chris@69 3971 lt_cdecl_hook=
Chris@69 3972 lt_c_name_hook=
Chris@69 3973 lt_c_name_lib_hook=
Chris@69 3974 fi
Chris@69 3975
Chris@69 3976 # Transform an extracted symbol line into a proper C declaration.
Chris@69 3977 # Some systems (esp. on ia64) link data and code symbols differently,
Chris@69 3978 # so use this general approach.
Chris@69 3979 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
Chris@69 3980 $lt_cdecl_hook\
Chris@69 3981 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
Chris@69 3982 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
Chris@69 3983
Chris@69 3984 # Transform an extracted symbol line into symbol name and symbol address
Chris@69 3985 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
Chris@69 3986 $lt_c_name_hook\
Chris@69 3987 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
Chris@69 3988 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
Chris@69 3989
Chris@69 3990 # Transform an extracted symbol line into symbol name with lib prefix and
Chris@69 3991 # symbol address.
Chris@69 3992 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
Chris@69 3993 $lt_c_name_lib_hook\
Chris@69 3994 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
Chris@69 3995 " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
Chris@69 3996 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
Chris@69 3997
Chris@69 3998 # Handle CRLF in mingw tool chain
Chris@69 3999 opt_cr=
Chris@69 4000 case $build_os in
Chris@69 4001 mingw*)
Chris@69 4002 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
Chris@69 4003 ;;
Chris@69 4004 esac
Chris@69 4005
Chris@69 4006 # Try without a prefix underscore, then with it.
Chris@69 4007 for ac_symprfx in "" "_"; do
Chris@69 4008
Chris@69 4009 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
Chris@69 4010 symxfrm="\\1 $ac_symprfx\\2 \\2"
Chris@69 4011
Chris@69 4012 # Write the raw and C identifiers.
Chris@69 4013 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
Chris@69 4014 # Fake it for dumpbin and say T for any non-static function,
Chris@69 4015 # D for any global variable and I for any imported variable.
Chris@69 4016 # Also find C++ and __fastcall symbols from MSVC++,
Chris@69 4017 # which start with @ or ?.
Chris@69 4018 lt_cv_sys_global_symbol_pipe="$AWK ['"\
Chris@69 4019 " {last_section=section; section=\$ 3};"\
Chris@69 4020 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
Chris@69 4021 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
Chris@69 4022 " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
Chris@69 4023 " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
Chris@69 4024 " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
Chris@69 4025 " \$ 0!~/External *\|/{next};"\
Chris@69 4026 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
Chris@69 4027 " {if(hide[section]) next};"\
Chris@69 4028 " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
Chris@69 4029 " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
Chris@69 4030 " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
Chris@69 4031 " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
Chris@69 4032 " ' prfx=^$ac_symprfx]"
Chris@69 4033 else
Chris@69 4034 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
Chris@69 4035 fi
Chris@69 4036 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
Chris@69 4037
Chris@69 4038 # Check to see that the pipe works correctly.
Chris@69 4039 pipe_works=no
Chris@69 4040
Chris@69 4041 rm -f conftest*
Chris@69 4042 cat > conftest.$ac_ext <<_LT_EOF
Chris@69 4043 #ifdef __cplusplus
Chris@69 4044 extern "C" {
Chris@69 4045 #endif
Chris@69 4046 char nm_test_var;
Chris@69 4047 void nm_test_func(void);
Chris@69 4048 void nm_test_func(void){}
Chris@69 4049 #ifdef __cplusplus
Chris@69 4050 }
Chris@69 4051 #endif
Chris@69 4052 int main(){nm_test_var='a';nm_test_func();return(0);}
Chris@69 4053 _LT_EOF
Chris@69 4054
Chris@69 4055 if AC_TRY_EVAL(ac_compile); then
Chris@69 4056 # Now try to grab the symbols.
Chris@69 4057 nlist=conftest.nm
Chris@69 4058 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
Chris@69 4059 # Try sorting and uniquifying the output.
Chris@69 4060 if sort "$nlist" | uniq > "$nlist"T; then
Chris@69 4061 mv -f "$nlist"T "$nlist"
Chris@69 4062 else
Chris@69 4063 rm -f "$nlist"T
Chris@69 4064 fi
Chris@69 4065
Chris@69 4066 # Make sure that we snagged all the symbols we need.
Chris@69 4067 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
Chris@69 4068 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
Chris@69 4069 cat <<_LT_EOF > conftest.$ac_ext
Chris@69 4070 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
Chris@69 4071 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
Chris@69 4072 /* DATA imports from DLLs on WIN32 can't be const, because runtime
Chris@69 4073 relocations are performed -- see ld's documentation on pseudo-relocs. */
Chris@69 4074 # define LT@&t@_DLSYM_CONST
Chris@69 4075 #elif defined __osf__
Chris@69 4076 /* This system does not cope well with relocations in const data. */
Chris@69 4077 # define LT@&t@_DLSYM_CONST
Chris@69 4078 #else
Chris@69 4079 # define LT@&t@_DLSYM_CONST const
Chris@69 4080 #endif
Chris@69 4081
Chris@69 4082 #ifdef __cplusplus
Chris@69 4083 extern "C" {
Chris@69 4084 #endif
Chris@69 4085
Chris@69 4086 _LT_EOF
Chris@69 4087 # Now generate the symbol file.
Chris@69 4088 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
Chris@69 4089
Chris@69 4090 cat <<_LT_EOF >> conftest.$ac_ext
Chris@69 4091
Chris@69 4092 /* The mapping between symbol names and symbols. */
Chris@69 4093 LT@&t@_DLSYM_CONST struct {
Chris@69 4094 const char *name;
Chris@69 4095 void *address;
Chris@69 4096 }
Chris@69 4097 lt__PROGRAM__LTX_preloaded_symbols[[]] =
Chris@69 4098 {
Chris@69 4099 { "@PROGRAM@", (void *) 0 },
Chris@69 4100 _LT_EOF
Chris@69 4101 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
Chris@69 4102 cat <<\_LT_EOF >> conftest.$ac_ext
Chris@69 4103 {0, (void *) 0}
Chris@69 4104 };
Chris@69 4105
Chris@69 4106 /* This works around a problem in FreeBSD linker */
Chris@69 4107 #ifdef FREEBSD_WORKAROUND
Chris@69 4108 static const void *lt_preloaded_setup() {
Chris@69 4109 return lt__PROGRAM__LTX_preloaded_symbols;
Chris@69 4110 }
Chris@69 4111 #endif
Chris@69 4112
Chris@69 4113 #ifdef __cplusplus
Chris@69 4114 }
Chris@69 4115 #endif
Chris@69 4116 _LT_EOF
Chris@69 4117 # Now try linking the two files.
Chris@69 4118 mv conftest.$ac_objext conftstm.$ac_objext
Chris@69 4119 lt_globsym_save_LIBS=$LIBS
Chris@69 4120 lt_globsym_save_CFLAGS=$CFLAGS
Chris@69 4121 LIBS=conftstm.$ac_objext
Chris@69 4122 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
Chris@69 4123 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
Chris@69 4124 pipe_works=yes
Chris@69 4125 fi
Chris@69 4126 LIBS=$lt_globsym_save_LIBS
Chris@69 4127 CFLAGS=$lt_globsym_save_CFLAGS
Chris@69 4128 else
Chris@69 4129 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
Chris@69 4130 fi
Chris@69 4131 else
Chris@69 4132 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
Chris@69 4133 fi
Chris@69 4134 else
Chris@69 4135 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
Chris@69 4136 fi
Chris@69 4137 else
Chris@69 4138 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
Chris@69 4139 cat conftest.$ac_ext >&5
Chris@69 4140 fi
Chris@69 4141 rm -rf conftest* conftst*
Chris@69 4142
Chris@69 4143 # Do not use the global_symbol_pipe unless it works.
Chris@69 4144 if test yes = "$pipe_works"; then
Chris@69 4145 break
Chris@69 4146 else
Chris@69 4147 lt_cv_sys_global_symbol_pipe=
Chris@69 4148 fi
Chris@69 4149 done
Chris@69 4150 ])
Chris@69 4151 if test -z "$lt_cv_sys_global_symbol_pipe"; then
Chris@69 4152 lt_cv_sys_global_symbol_to_cdecl=
Chris@69 4153 fi
Chris@69 4154 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
Chris@69 4155 AC_MSG_RESULT(failed)
Chris@69 4156 else
Chris@69 4157 AC_MSG_RESULT(ok)
Chris@69 4158 fi
Chris@69 4159
Chris@69 4160 # Response file support.
Chris@69 4161 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
Chris@69 4162 nm_file_list_spec='@'
Chris@69 4163 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
Chris@69 4164 nm_file_list_spec='@'
Chris@69 4165 fi
Chris@69 4166
Chris@69 4167 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
Chris@69 4168 [Take the output of nm and produce a listing of raw symbols and C names])
Chris@69 4169 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
Chris@69 4170 [Transform the output of nm in a proper C declaration])
Chris@69 4171 _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
Chris@69 4172 [Transform the output of nm into a list of symbols to manually relocate])
Chris@69 4173 _LT_DECL([global_symbol_to_c_name_address],
Chris@69 4174 [lt_cv_sys_global_symbol_to_c_name_address], [1],
Chris@69 4175 [Transform the output of nm in a C name address pair])
Chris@69 4176 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
Chris@69 4177 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
Chris@69 4178 [Transform the output of nm in a C name address pair when lib prefix is needed])
Chris@69 4179 _LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
Chris@69 4180 [The name lister interface])
Chris@69 4181 _LT_DECL([], [nm_file_list_spec], [1],
Chris@69 4182 [Specify filename containing input files for $NM])
Chris@69 4183 ]) # _LT_CMD_GLOBAL_SYMBOLS
Chris@69 4184
Chris@69 4185
Chris@69 4186 # _LT_COMPILER_PIC([TAGNAME])
Chris@69 4187 # ---------------------------
Chris@69 4188 m4_defun([_LT_COMPILER_PIC],
Chris@69 4189 [m4_require([_LT_TAG_COMPILER])dnl
Chris@69 4190 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
Chris@69 4191 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@69 4192 _LT_TAGVAR(lt_prog_compiler_static, $1)=
Chris@69 4193
Chris@69 4194 m4_if([$1], [CXX], [
Chris@69 4195 # C++ specific cases for pic, static, wl, etc.
Chris@69 4196 if test yes = "$GXX"; then
Chris@69 4197 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@69 4198 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@69 4199
Chris@69 4200 case $host_os in
Chris@69 4201 aix*)
Chris@69 4202 # All AIX code is PIC.
Chris@69 4203 if test ia64 = "$host_cpu"; then
Chris@69 4204 # AIX 5 now supports IA64 processor
Chris@69 4205 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@69 4206 fi
Chris@69 4207 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@69 4208 ;;
Chris@69 4209
Chris@69 4210 amigaos*)
Chris@69 4211 case $host_cpu in
Chris@69 4212 powerpc)
Chris@69 4213 # see comment about AmigaOS4 .so support
Chris@69 4214 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@69 4215 ;;
Chris@69 4216 m68k)
Chris@69 4217 # FIXME: we need at least 68020 code to build shared libraries, but
Chris@69 4218 # adding the '-m68020' flag to GCC prevents building anything better,
Chris@69 4219 # like '-m68040'.
Chris@69 4220 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
Chris@69 4221 ;;
Chris@69 4222 esac
Chris@69 4223 ;;
Chris@69 4224
Chris@69 4225 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
Chris@69 4226 # PIC is the default for these OSes.
Chris@69 4227 ;;
Chris@69 4228 mingw* | cygwin* | os2* | pw32* | cegcc*)
Chris@69 4229 # This hack is so that the source file can tell whether it is being
Chris@69 4230 # built for inclusion in a dll (and should export symbols for example).
Chris@69 4231 # Although the cygwin gcc ignores -fPIC, still need this for old-style
Chris@69 4232 # (--disable-auto-import) libraries
Chris@69 4233 m4_if([$1], [GCJ], [],
Chris@69 4234 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
Chris@69 4235 case $host_os in
Chris@69 4236 os2*)
Chris@69 4237 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
Chris@69 4238 ;;
Chris@69 4239 esac
Chris@69 4240 ;;
Chris@69 4241 darwin* | rhapsody*)
Chris@69 4242 # PIC is the default on this platform
Chris@69 4243 # Common symbols not allowed in MH_DYLIB files
Chris@69 4244 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
Chris@69 4245 ;;
Chris@69 4246 *djgpp*)
Chris@69 4247 # DJGPP does not support shared libraries at all
Chris@69 4248 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@69 4249 ;;
Chris@69 4250 haiku*)
Chris@69 4251 # PIC is the default for Haiku.
Chris@69 4252 # The "-static" flag exists, but is broken.
Chris@69 4253 _LT_TAGVAR(lt_prog_compiler_static, $1)=
Chris@69 4254 ;;
Chris@69 4255 interix[[3-9]]*)
Chris@69 4256 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
Chris@69 4257 # Instead, we relocate shared libraries at runtime.
Chris@69 4258 ;;
Chris@69 4259 sysv4*MP*)
Chris@69 4260 if test -d /usr/nec; then
Chris@69 4261 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
Chris@69 4262 fi
Chris@69 4263 ;;
Chris@69 4264 hpux*)
Chris@69 4265 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
Chris@69 4266 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
Chris@69 4267 # sets the default TLS model and affects inlining.
Chris@69 4268 case $host_cpu in
Chris@69 4269 hppa*64*)
Chris@69 4270 ;;
Chris@69 4271 *)
Chris@69 4272 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@69 4273 ;;
Chris@69 4274 esac
Chris@69 4275 ;;
Chris@69 4276 *qnx* | *nto*)
Chris@69 4277 # QNX uses GNU C++, but need to define -shared option too, otherwise
Chris@69 4278 # it will coredump.
Chris@69 4279 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
Chris@69 4280 ;;
Chris@69 4281 *)
Chris@69 4282 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@69 4283 ;;
Chris@69 4284 esac
Chris@69 4285 else
Chris@69 4286 case $host_os in
Chris@69 4287 aix[[4-9]]*)
Chris@69 4288 # All AIX code is PIC.
Chris@69 4289 if test ia64 = "$host_cpu"; then
Chris@69 4290 # AIX 5 now supports IA64 processor
Chris@69 4291 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@69 4292 else
Chris@69 4293 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
Chris@69 4294 fi
Chris@69 4295 ;;
Chris@69 4296 chorus*)
Chris@69 4297 case $cc_basename in
Chris@69 4298 cxch68*)
Chris@69 4299 # Green Hills C++ Compiler
Chris@69 4300 # _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@69 4301 ;;
Chris@69 4302 esac
Chris@69 4303 ;;
Chris@69 4304 mingw* | cygwin* | os2* | pw32* | cegcc*)
Chris@69 4305 # This hack is so that the source file can tell whether it is being
Chris@69 4306 # built for inclusion in a dll (and should export symbols for example).
Chris@69 4307 m4_if([$1], [GCJ], [],
Chris@69 4308 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
Chris@69 4309 ;;
Chris@69 4310 dgux*)
Chris@69 4311 case $cc_basename in
Chris@69 4312 ec++*)
Chris@69 4313 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@69 4314 ;;
Chris@69 4315 ghcx*)
Chris@69 4316 # Green Hills C++ Compiler
Chris@69 4317 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@69 4318 ;;
Chris@69 4319 *)
Chris@69 4320 ;;
Chris@69 4321 esac
Chris@69 4322 ;;
Chris@69 4323 freebsd* | dragonfly*)
Chris@69 4324 # FreeBSD uses GNU C++
Chris@69 4325 ;;
Chris@69 4326 hpux9* | hpux10* | hpux11*)
Chris@69 4327 case $cc_basename in
Chris@69 4328 CC*)
Chris@69 4329 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@69 4330 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
Chris@69 4331 if test ia64 != "$host_cpu"; then
Chris@69 4332 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
Chris@69 4333 fi
Chris@69 4334 ;;
Chris@69 4335 aCC*)
Chris@69 4336 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@69 4337 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
Chris@69 4338 case $host_cpu in
Chris@69 4339 hppa*64*|ia64*)
Chris@69 4340 # +Z the default
Chris@69 4341 ;;
Chris@69 4342 *)
Chris@69 4343 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
Chris@69 4344 ;;
Chris@69 4345 esac
Chris@69 4346 ;;
Chris@69 4347 *)
Chris@69 4348 ;;
Chris@69 4349 esac
Chris@69 4350 ;;
Chris@69 4351 interix*)
Chris@69 4352 # This is c89, which is MS Visual C++ (no shared libs)
Chris@69 4353 # Anyone wants to do a port?
Chris@69 4354 ;;
Chris@69 4355 irix5* | irix6* | nonstopux*)
Chris@69 4356 case $cc_basename in
Chris@69 4357 CC*)
Chris@69 4358 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@69 4359 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@69 4360 # CC pic flag -KPIC is the default.
Chris@69 4361 ;;
Chris@69 4362 *)
Chris@69 4363 ;;
Chris@69 4364 esac
Chris@69 4365 ;;
Chris@69 4366 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
Chris@69 4367 case $cc_basename in
Chris@69 4368 KCC*)
Chris@69 4369 # KAI C++ Compiler
Chris@69 4370 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
Chris@69 4371 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@69 4372 ;;
Chris@69 4373 ecpc* )
Chris@69 4374 # old Intel C++ for x86_64, which still supported -KPIC.
Chris@69 4375 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@69 4376 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@69 4377 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@69 4378 ;;
Chris@69 4379 icpc* )
Chris@69 4380 # Intel C++, used to be incompatible with GCC.
Chris@69 4381 # ICC 10 doesn't accept -KPIC any more.
Chris@69 4382 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@69 4383 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@69 4384 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@69 4385 ;;
Chris@69 4386 pgCC* | pgcpp*)
Chris@69 4387 # Portland Group C++ compiler
Chris@69 4388 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@69 4389 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
Chris@69 4390 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@69 4391 ;;
Chris@69 4392 cxx*)
Chris@69 4393 # Compaq C++
Chris@69 4394 # Make sure the PIC flag is empty. It appears that all Alpha
Chris@69 4395 # Linux and Compaq Tru64 Unix objects are PIC.
Chris@69 4396 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@69 4397 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@69 4398 ;;
Chris@69 4399 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
Chris@69 4400 # IBM XL 8.0, 9.0 on PPC and BlueGene
Chris@69 4401 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@69 4402 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
Chris@69 4403 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
Chris@69 4404 ;;
Chris@69 4405 *)
Chris@69 4406 case `$CC -V 2>&1 | sed 5q` in
Chris@69 4407 *Sun\ C*)
Chris@69 4408 # Sun C++ 5.9
Chris@69 4409 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@69 4410 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@69 4411 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
Chris@69 4412 ;;
Chris@69 4413 esac
Chris@69 4414 ;;
Chris@69 4415 esac
Chris@69 4416 ;;
Chris@69 4417 lynxos*)
Chris@69 4418 ;;
Chris@69 4419 m88k*)
Chris@69 4420 ;;
Chris@69 4421 mvs*)
Chris@69 4422 case $cc_basename in
Chris@69 4423 cxx*)
Chris@69 4424 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
Chris@69 4425 ;;
Chris@69 4426 *)
Chris@69 4427 ;;
Chris@69 4428 esac
Chris@69 4429 ;;
Chris@69 4430 netbsd*)
Chris@69 4431 ;;
Chris@69 4432 *qnx* | *nto*)
Chris@69 4433 # QNX uses GNU C++, but need to define -shared option too, otherwise
Chris@69 4434 # it will coredump.
Chris@69 4435 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
Chris@69 4436 ;;
Chris@69 4437 osf3* | osf4* | osf5*)
Chris@69 4438 case $cc_basename in
Chris@69 4439 KCC*)
Chris@69 4440 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
Chris@69 4441 ;;
Chris@69 4442 RCC*)
Chris@69 4443 # Rational C++ 2.4.1
Chris@69 4444 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@69 4445 ;;
Chris@69 4446 cxx*)
Chris@69 4447 # Digital/Compaq C++
Chris@69 4448 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@69 4449 # Make sure the PIC flag is empty. It appears that all Alpha
Chris@69 4450 # Linux and Compaq Tru64 Unix objects are PIC.
Chris@69 4451 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@69 4452 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@69 4453 ;;
Chris@69 4454 *)
Chris@69 4455 ;;
Chris@69 4456 esac
Chris@69 4457 ;;
Chris@69 4458 psos*)
Chris@69 4459 ;;
Chris@69 4460 solaris*)
Chris@69 4461 case $cc_basename in
Chris@69 4462 CC* | sunCC*)
Chris@69 4463 # Sun C++ 4.2, 5.x and Centerline C++
Chris@69 4464 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@69 4465 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@69 4466 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
Chris@69 4467 ;;
Chris@69 4468 gcx*)
Chris@69 4469 # Green Hills C++ Compiler
Chris@69 4470 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
Chris@69 4471 ;;
Chris@69 4472 *)
Chris@69 4473 ;;
Chris@69 4474 esac
Chris@69 4475 ;;
Chris@69 4476 sunos4*)
Chris@69 4477 case $cc_basename in
Chris@69 4478 CC*)
Chris@69 4479 # Sun C++ 4.x
Chris@69 4480 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@69 4481 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@69 4482 ;;
Chris@69 4483 lcc*)
Chris@69 4484 # Lucid
Chris@69 4485 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@69 4486 ;;
Chris@69 4487 *)
Chris@69 4488 ;;
Chris@69 4489 esac
Chris@69 4490 ;;
Chris@69 4491 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
Chris@69 4492 case $cc_basename in
Chris@69 4493 CC*)
Chris@69 4494 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@69 4495 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@69 4496 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@69 4497 ;;
Chris@69 4498 esac
Chris@69 4499 ;;
Chris@69 4500 tandem*)
Chris@69 4501 case $cc_basename in
Chris@69 4502 NCC*)
Chris@69 4503 # NonStop-UX NCC 3.20
Chris@69 4504 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@69 4505 ;;
Chris@69 4506 *)
Chris@69 4507 ;;
Chris@69 4508 esac
Chris@69 4509 ;;
Chris@69 4510 vxworks*)
Chris@69 4511 ;;
Chris@69 4512 *)
Chris@69 4513 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
Chris@69 4514 ;;
Chris@69 4515 esac
Chris@69 4516 fi
Chris@69 4517 ],
Chris@69 4518 [
Chris@69 4519 if test yes = "$GCC"; then
Chris@69 4520 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@69 4521 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@69 4522
Chris@69 4523 case $host_os in
Chris@69 4524 aix*)
Chris@69 4525 # All AIX code is PIC.
Chris@69 4526 if test ia64 = "$host_cpu"; then
Chris@69 4527 # AIX 5 now supports IA64 processor
Chris@69 4528 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@69 4529 fi
Chris@69 4530 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@69 4531 ;;
Chris@69 4532
Chris@69 4533 amigaos*)
Chris@69 4534 case $host_cpu in
Chris@69 4535 powerpc)
Chris@69 4536 # see comment about AmigaOS4 .so support
Chris@69 4537 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@69 4538 ;;
Chris@69 4539 m68k)
Chris@69 4540 # FIXME: we need at least 68020 code to build shared libraries, but
Chris@69 4541 # adding the '-m68020' flag to GCC prevents building anything better,
Chris@69 4542 # like '-m68040'.
Chris@69 4543 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
Chris@69 4544 ;;
Chris@69 4545 esac
Chris@69 4546 ;;
Chris@69 4547
Chris@69 4548 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
Chris@69 4549 # PIC is the default for these OSes.
Chris@69 4550 ;;
Chris@69 4551
Chris@69 4552 mingw* | cygwin* | pw32* | os2* | cegcc*)
Chris@69 4553 # This hack is so that the source file can tell whether it is being
Chris@69 4554 # built for inclusion in a dll (and should export symbols for example).
Chris@69 4555 # Although the cygwin gcc ignores -fPIC, still need this for old-style
Chris@69 4556 # (--disable-auto-import) libraries
Chris@69 4557 m4_if([$1], [GCJ], [],
Chris@69 4558 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
Chris@69 4559 case $host_os in
Chris@69 4560 os2*)
Chris@69 4561 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
Chris@69 4562 ;;
Chris@69 4563 esac
Chris@69 4564 ;;
Chris@69 4565
Chris@69 4566 darwin* | rhapsody*)
Chris@69 4567 # PIC is the default on this platform
Chris@69 4568 # Common symbols not allowed in MH_DYLIB files
Chris@69 4569 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
Chris@69 4570 ;;
Chris@69 4571
Chris@69 4572 haiku*)
Chris@69 4573 # PIC is the default for Haiku.
Chris@69 4574 # The "-static" flag exists, but is broken.
Chris@69 4575 _LT_TAGVAR(lt_prog_compiler_static, $1)=
Chris@69 4576 ;;
Chris@69 4577
Chris@69 4578 hpux*)
Chris@69 4579 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
Chris@69 4580 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
Chris@69 4581 # sets the default TLS model and affects inlining.
Chris@69 4582 case $host_cpu in
Chris@69 4583 hppa*64*)
Chris@69 4584 # +Z the default
Chris@69 4585 ;;
Chris@69 4586 *)
Chris@69 4587 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@69 4588 ;;
Chris@69 4589 esac
Chris@69 4590 ;;
Chris@69 4591
Chris@69 4592 interix[[3-9]]*)
Chris@69 4593 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
Chris@69 4594 # Instead, we relocate shared libraries at runtime.
Chris@69 4595 ;;
Chris@69 4596
Chris@69 4597 msdosdjgpp*)
Chris@69 4598 # Just because we use GCC doesn't mean we suddenly get shared libraries
Chris@69 4599 # on systems that don't support them.
Chris@69 4600 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
Chris@69 4601 enable_shared=no
Chris@69 4602 ;;
Chris@69 4603
Chris@69 4604 *nto* | *qnx*)
Chris@69 4605 # QNX uses GNU C++, but need to define -shared option too, otherwise
Chris@69 4606 # it will coredump.
Chris@69 4607 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
Chris@69 4608 ;;
Chris@69 4609
Chris@69 4610 sysv4*MP*)
Chris@69 4611 if test -d /usr/nec; then
Chris@69 4612 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
Chris@69 4613 fi
Chris@69 4614 ;;
Chris@69 4615
Chris@69 4616 *)
Chris@69 4617 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@69 4618 ;;
Chris@69 4619 esac
Chris@69 4620
Chris@69 4621 case $cc_basename in
Chris@69 4622 nvcc*) # Cuda Compiler Driver 2.2
Chris@69 4623 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
Chris@69 4624 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
Chris@69 4625 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
Chris@69 4626 fi
Chris@69 4627 ;;
Chris@69 4628 esac
Chris@69 4629 else
Chris@69 4630 # PORTME Check for flag to pass linker flags through the system compiler.
Chris@69 4631 case $host_os in
Chris@69 4632 aix*)
Chris@69 4633 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@69 4634 if test ia64 = "$host_cpu"; then
Chris@69 4635 # AIX 5 now supports IA64 processor
Chris@69 4636 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@69 4637 else
Chris@69 4638 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
Chris@69 4639 fi
Chris@69 4640 ;;
Chris@69 4641
Chris@69 4642 darwin* | rhapsody*)
Chris@69 4643 # PIC is the default on this platform
Chris@69 4644 # Common symbols not allowed in MH_DYLIB files
Chris@69 4645 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
Chris@69 4646 case $cc_basename in
Chris@69 4647 nagfor*)
Chris@69 4648 # NAG Fortran compiler
Chris@69 4649 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
Chris@69 4650 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
Chris@69 4651 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@69 4652 ;;
Chris@69 4653 esac
Chris@69 4654 ;;
Chris@69 4655
Chris@69 4656 mingw* | cygwin* | pw32* | os2* | cegcc*)
Chris@69 4657 # This hack is so that the source file can tell whether it is being
Chris@69 4658 # built for inclusion in a dll (and should export symbols for example).
Chris@69 4659 m4_if([$1], [GCJ], [],
Chris@69 4660 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
Chris@69 4661 case $host_os in
Chris@69 4662 os2*)
Chris@69 4663 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
Chris@69 4664 ;;
Chris@69 4665 esac
Chris@69 4666 ;;
Chris@69 4667
Chris@69 4668 hpux9* | hpux10* | hpux11*)
Chris@69 4669 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@69 4670 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
Chris@69 4671 # not for PA HP-UX.
Chris@69 4672 case $host_cpu in
Chris@69 4673 hppa*64*|ia64*)
Chris@69 4674 # +Z the default
Chris@69 4675 ;;
Chris@69 4676 *)
Chris@69 4677 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
Chris@69 4678 ;;
Chris@69 4679 esac
Chris@69 4680 # Is there a better lt_prog_compiler_static that works with the bundled CC?
Chris@69 4681 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
Chris@69 4682 ;;
Chris@69 4683
Chris@69 4684 irix5* | irix6* | nonstopux*)
Chris@69 4685 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@69 4686 # PIC (with -KPIC) is the default.
Chris@69 4687 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@69 4688 ;;
Chris@69 4689
Chris@69 4690 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
Chris@69 4691 case $cc_basename in
Chris@69 4692 # old Intel for x86_64, which still supported -KPIC.
Chris@69 4693 ecc*)
Chris@69 4694 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@69 4695 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@69 4696 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@69 4697 ;;
Chris@69 4698 # icc used to be incompatible with GCC.
Chris@69 4699 # ICC 10 doesn't accept -KPIC any more.
Chris@69 4700 icc* | ifort*)
Chris@69 4701 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@69 4702 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@69 4703 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@69 4704 ;;
Chris@69 4705 # Lahey Fortran 8.1.
Chris@69 4706 lf95*)
Chris@69 4707 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@69 4708 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
Chris@69 4709 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
Chris@69 4710 ;;
Chris@69 4711 nagfor*)
Chris@69 4712 # NAG Fortran compiler
Chris@69 4713 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
Chris@69 4714 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
Chris@69 4715 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@69 4716 ;;
Chris@69 4717 tcc*)
Chris@69 4718 # Fabrice Bellard et al's Tiny C Compiler
Chris@69 4719 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@69 4720 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@69 4721 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@69 4722 ;;
Chris@69 4723 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
Chris@69 4724 # Portland Group compilers (*not* the Pentium gcc compiler,
Chris@69 4725 # which looks to be a dead project)
Chris@69 4726 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@69 4727 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
Chris@69 4728 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@69 4729 ;;
Chris@69 4730 ccc*)
Chris@69 4731 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@69 4732 # All Alpha code is PIC.
Chris@69 4733 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@69 4734 ;;
Chris@69 4735 xl* | bgxl* | bgf* | mpixl*)
Chris@69 4736 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
Chris@69 4737 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@69 4738 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
Chris@69 4739 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
Chris@69 4740 ;;
Chris@69 4741 *)
Chris@69 4742 case `$CC -V 2>&1 | sed 5q` in
Chris@69 4743 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
Chris@69 4744 # Sun Fortran 8.3 passes all unrecognized flags to the linker
Chris@69 4745 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@69 4746 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@69 4747 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
Chris@69 4748 ;;
Chris@69 4749 *Sun\ F* | *Sun*Fortran*)
Chris@69 4750 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@69 4751 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@69 4752 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
Chris@69 4753 ;;
Chris@69 4754 *Sun\ C*)
Chris@69 4755 # Sun C 5.9
Chris@69 4756 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@69 4757 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@69 4758 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@69 4759 ;;
Chris@69 4760 *Intel*\ [[CF]]*Compiler*)
Chris@69 4761 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@69 4762 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@69 4763 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@69 4764 ;;
Chris@69 4765 *Portland\ Group*)
Chris@69 4766 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@69 4767 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
Chris@69 4768 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@69 4769 ;;
Chris@69 4770 esac
Chris@69 4771 ;;
Chris@69 4772 esac
Chris@69 4773 ;;
Chris@69 4774
Chris@69 4775 newsos6)
Chris@69 4776 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@69 4777 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@69 4778 ;;
Chris@69 4779
Chris@69 4780 *nto* | *qnx*)
Chris@69 4781 # QNX uses GNU C++, but need to define -shared option too, otherwise
Chris@69 4782 # it will coredump.
Chris@69 4783 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
Chris@69 4784 ;;
Chris@69 4785
Chris@69 4786 osf3* | osf4* | osf5*)
Chris@69 4787 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@69 4788 # All OSF/1 code is PIC.
Chris@69 4789 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@69 4790 ;;
Chris@69 4791
Chris@69 4792 rdos*)
Chris@69 4793 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@69 4794 ;;
Chris@69 4795
Chris@69 4796 solaris*)
Chris@69 4797 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@69 4798 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@69 4799 case $cc_basename in
Chris@69 4800 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
Chris@69 4801 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
Chris@69 4802 *)
Chris@69 4803 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
Chris@69 4804 esac
Chris@69 4805 ;;
Chris@69 4806
Chris@69 4807 sunos4*)
Chris@69 4808 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
Chris@69 4809 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
Chris@69 4810 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@69 4811 ;;
Chris@69 4812
Chris@69 4813 sysv4 | sysv4.2uw2* | sysv4.3*)
Chris@69 4814 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@69 4815 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@69 4816 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@69 4817 ;;
Chris@69 4818
Chris@69 4819 sysv4*MP*)
Chris@69 4820 if test -d /usr/nec; then
Chris@69 4821 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
Chris@69 4822 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@69 4823 fi
Chris@69 4824 ;;
Chris@69 4825
Chris@69 4826 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
Chris@69 4827 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@69 4828 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@69 4829 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@69 4830 ;;
Chris@69 4831
Chris@69 4832 unicos*)
Chris@69 4833 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@69 4834 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
Chris@69 4835 ;;
Chris@69 4836
Chris@69 4837 uts4*)
Chris@69 4838 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@69 4839 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@69 4840 ;;
Chris@69 4841
Chris@69 4842 *)
Chris@69 4843 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
Chris@69 4844 ;;
Chris@69 4845 esac
Chris@69 4846 fi
Chris@69 4847 ])
Chris@69 4848 case $host_os in
Chris@69 4849 # For platforms that do not support PIC, -DPIC is meaningless:
Chris@69 4850 *djgpp*)
Chris@69 4851 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@69 4852 ;;
Chris@69 4853 *)
Chris@69 4854 _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@69 4855 ;;
Chris@69 4856 esac
Chris@69 4857
Chris@69 4858 AC_CACHE_CHECK([for $compiler option to produce PIC],
Chris@69 4859 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
Chris@69 4860 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
Chris@69 4861 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
Chris@69 4862
Chris@69 4863 #
Chris@69 4864 # Check to make sure the PIC flag actually works.
Chris@69 4865 #
Chris@69 4866 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
Chris@69 4867 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
Chris@69 4868 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
Chris@69 4869 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
Chris@69 4870 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
Chris@69 4871 "" | " "*) ;;
Chris@69 4872 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
Chris@69 4873 esac],
Chris@69 4874 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@69 4875 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
Chris@69 4876 fi
Chris@69 4877 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
Chris@69 4878 [Additional compiler flags for building library objects])
Chris@69 4879
Chris@69 4880 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
Chris@69 4881 [How to pass a linker flag through the compiler])
Chris@69 4882 #
Chris@69 4883 # Check to make sure the static flag actually works.
Chris@69 4884 #
Chris@69 4885 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
Chris@69 4886 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
Chris@69 4887 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
Chris@69 4888 $lt_tmp_static_flag,
Chris@69 4889 [],
Chris@69 4890 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
Chris@69 4891 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
Chris@69 4892 [Compiler flag to prevent dynamic linking])
Chris@69 4893 ])# _LT_COMPILER_PIC
Chris@69 4894
Chris@69 4895
Chris@69 4896 # _LT_LINKER_SHLIBS([TAGNAME])
Chris@69 4897 # ----------------------------
Chris@69 4898 # See if the linker supports building shared libraries.
Chris@69 4899 m4_defun([_LT_LINKER_SHLIBS],
Chris@69 4900 [AC_REQUIRE([LT_PATH_LD])dnl
Chris@69 4901 AC_REQUIRE([LT_PATH_NM])dnl
Chris@69 4902 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
Chris@69 4903 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@69 4904 m4_require([_LT_DECL_EGREP])dnl
Chris@69 4905 m4_require([_LT_DECL_SED])dnl
Chris@69 4906 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
Chris@69 4907 m4_require([_LT_TAG_COMPILER])dnl
Chris@69 4908 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
Chris@69 4909 m4_if([$1], [CXX], [
Chris@69 4910 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
Chris@69 4911 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
Chris@69 4912 case $host_os in
Chris@69 4913 aix[[4-9]]*)
Chris@69 4914 # If we're using GNU nm, then we don't want the "-C" option.
Chris@69 4915 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
Chris@69 4916 # Without the "-l" option, or with the "-B" option, AIX nm treats
Chris@69 4917 # weak defined symbols like other global defined symbols, whereas
Chris@69 4918 # GNU nm marks them as "W".
Chris@69 4919 # While the 'weak' keyword is ignored in the Export File, we need
Chris@69 4920 # it in the Import File for the 'aix-soname' feature, so we have
Chris@69 4921 # to replace the "-B" option with "-P" for AIX nm.
Chris@69 4922 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
Chris@69 4923 _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@69 4924 else
Chris@69 4925 _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@69 4926 fi
Chris@69 4927 ;;
Chris@69 4928 pw32*)
Chris@69 4929 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
Chris@69 4930 ;;
Chris@69 4931 cygwin* | mingw* | cegcc*)
Chris@69 4932 case $cc_basename in
Chris@69 4933 cl*)
Chris@69 4934 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
Chris@69 4935 ;;
Chris@69 4936 *)
Chris@69 4937 _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@69 4938 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
Chris@69 4939 ;;
Chris@69 4940 esac
Chris@69 4941 ;;
Chris@69 4942 *)
Chris@69 4943 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
Chris@69 4944 ;;
Chris@69 4945 esac
Chris@69 4946 ], [
Chris@69 4947 runpath_var=
Chris@69 4948 _LT_TAGVAR(allow_undefined_flag, $1)=
Chris@69 4949 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@69 4950 _LT_TAGVAR(archive_cmds, $1)=
Chris@69 4951 _LT_TAGVAR(archive_expsym_cmds, $1)=
Chris@69 4952 _LT_TAGVAR(compiler_needs_object, $1)=no
Chris@69 4953 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
Chris@69 4954 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@69 4955 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
Chris@69 4956 _LT_TAGVAR(hardcode_automatic, $1)=no
Chris@69 4957 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@69 4958 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@69 4959 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@69 4960 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@69 4961 _LT_TAGVAR(hardcode_minus_L, $1)=no
Chris@69 4962 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
Chris@69 4963 _LT_TAGVAR(inherit_rpath, $1)=no
Chris@69 4964 _LT_TAGVAR(link_all_deplibs, $1)=unknown
Chris@69 4965 _LT_TAGVAR(module_cmds, $1)=
Chris@69 4966 _LT_TAGVAR(module_expsym_cmds, $1)=
Chris@69 4967 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
Chris@69 4968 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
Chris@69 4969 _LT_TAGVAR(thread_safe_flag_spec, $1)=
Chris@69 4970 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@69 4971 # include_expsyms should be a list of space-separated symbols to be *always*
Chris@69 4972 # included in the symbol list
Chris@69 4973 _LT_TAGVAR(include_expsyms, $1)=
Chris@69 4974 # exclude_expsyms can be an extended regexp of symbols to exclude
Chris@69 4975 # it will be wrapped by ' (' and ')$', so one must not match beginning or
Chris@69 4976 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
Chris@69 4977 # as well as any symbol that contains 'd'.
Chris@69 4978 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
Chris@69 4979 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
Chris@69 4980 # platforms (ab)use it in PIC code, but their linkers get confused if
Chris@69 4981 # the symbol is explicitly referenced. Since portable code cannot
Chris@69 4982 # rely on this symbol name, it's probably fine to never include it in
Chris@69 4983 # preloaded symbol tables.
Chris@69 4984 # Exclude shared library initialization/finalization symbols.
Chris@69 4985 dnl Note also adjust exclude_expsyms for C++ above.
Chris@69 4986 extract_expsyms_cmds=
Chris@69 4987
Chris@69 4988 case $host_os in
Chris@69 4989 cygwin* | mingw* | pw32* | cegcc*)
Chris@69 4990 # FIXME: the MSVC++ port hasn't been tested in a loooong time
Chris@69 4991 # When not using gcc, we currently assume that we are using
Chris@69 4992 # Microsoft Visual C++.
Chris@69 4993 if test yes != "$GCC"; then
Chris@69 4994 with_gnu_ld=no
Chris@69 4995 fi
Chris@69 4996 ;;
Chris@69 4997 interix*)
Chris@69 4998 # we just hope/assume this is gcc and not c89 (= MSVC++)
Chris@69 4999 with_gnu_ld=yes
Chris@69 5000 ;;
Chris@69 5001 openbsd* | bitrig*)
Chris@69 5002 with_gnu_ld=no
Chris@69 5003 ;;
Chris@69 5004 esac
Chris@69 5005
Chris@69 5006 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@69 5007
Chris@69 5008 # On some targets, GNU ld is compatible enough with the native linker
Chris@69 5009 # that we're better off using the native interface for both.
Chris@69 5010 lt_use_gnu_ld_interface=no
Chris@69 5011 if test yes = "$with_gnu_ld"; then
Chris@69 5012 case $host_os in
Chris@69 5013 aix*)
Chris@69 5014 # The AIX port of GNU ld has always aspired to compatibility
Chris@69 5015 # with the native linker. However, as the warning in the GNU ld
Chris@69 5016 # block says, versions before 2.19.5* couldn't really create working
Chris@69 5017 # shared libraries, regardless of the interface used.
Chris@69 5018 case `$LD -v 2>&1` in
Chris@69 5019 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
Chris@69 5020 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
Chris@69 5021 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
Chris@69 5022 *)
Chris@69 5023 lt_use_gnu_ld_interface=yes
Chris@69 5024 ;;
Chris@69 5025 esac
Chris@69 5026 ;;
Chris@69 5027 *)
Chris@69 5028 lt_use_gnu_ld_interface=yes
Chris@69 5029 ;;
Chris@69 5030 esac
Chris@69 5031 fi
Chris@69 5032
Chris@69 5033 if test yes = "$lt_use_gnu_ld_interface"; then
Chris@69 5034 # If archive_cmds runs LD, not CC, wlarc should be empty
Chris@69 5035 wlarc='$wl'
Chris@69 5036
Chris@69 5037 # Set some defaults for GNU ld with shared library support. These
Chris@69 5038 # are reset later if shared libraries are not supported. Putting them
Chris@69 5039 # here allows them to be overridden if necessary.
Chris@69 5040 runpath_var=LD_RUN_PATH
Chris@69 5041 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@69 5042 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
Chris@69 5043 # ancient GNU ld didn't support --whole-archive et. al.
Chris@69 5044 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
Chris@69 5045 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
Chris@69 5046 else
Chris@69 5047 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@69 5048 fi
Chris@69 5049 supports_anon_versioning=no
Chris@69 5050 case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
Chris@69 5051 *GNU\ gold*) supports_anon_versioning=yes ;;
Chris@69 5052 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
Chris@69 5053 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
Chris@69 5054 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
Chris@69 5055 *\ 2.11.*) ;; # other 2.11 versions
Chris@69 5056 *) supports_anon_versioning=yes ;;
Chris@69 5057 esac
Chris@69 5058
Chris@69 5059 # See if GNU ld supports shared libraries.
Chris@69 5060 case $host_os in
Chris@69 5061 aix[[3-9]]*)
Chris@69 5062 # On AIX/PPC, the GNU linker is very broken
Chris@69 5063 if test ia64 != "$host_cpu"; then
Chris@69 5064 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 5065 cat <<_LT_EOF 1>&2
Chris@69 5066
Chris@69 5067 *** Warning: the GNU linker, at least up to release 2.19, is reported
Chris@69 5068 *** to be unable to reliably create shared libraries on AIX.
Chris@69 5069 *** Therefore, libtool is disabling shared libraries support. If you
Chris@69 5070 *** really care for shared libraries, you may want to install binutils
Chris@69 5071 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
Chris@69 5072 *** You will then need to restart the configuration process.
Chris@69 5073
Chris@69 5074 _LT_EOF
Chris@69 5075 fi
Chris@69 5076 ;;
Chris@69 5077
Chris@69 5078 amigaos*)
Chris@69 5079 case $host_cpu in
Chris@69 5080 powerpc)
Chris@69 5081 # see comment about AmigaOS4 .so support
Chris@69 5082 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@69 5083 _LT_TAGVAR(archive_expsym_cmds, $1)=''
Chris@69 5084 ;;
Chris@69 5085 m68k)
Chris@69 5086 _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@69 5087 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@69 5088 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@69 5089 ;;
Chris@69 5090 esac
Chris@69 5091 ;;
Chris@69 5092
Chris@69 5093 beos*)
Chris@69 5094 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
Chris@69 5095 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@69 5096 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
Chris@69 5097 # support --undefined. This deserves some investigation. FIXME
Chris@69 5098 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@69 5099 else
Chris@69 5100 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 5101 fi
Chris@69 5102 ;;
Chris@69 5103
Chris@69 5104 cygwin* | mingw* | pw32* | cegcc*)
Chris@69 5105 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
Chris@69 5106 # as there is no search path for DLLs.
Chris@69 5107 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@69 5108 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
Chris@69 5109 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@69 5110 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@69 5111 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@69 5112 _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@69 5113 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
Chris@69 5114
Chris@69 5115 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
Chris@69 5116 _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@69 5117 # If the export-symbols file already is a .def file, use it as
Chris@69 5118 # is; otherwise, prepend EXPORTS...
Chris@69 5119 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
Chris@69 5120 cp $export_symbols $output_objdir/$soname.def;
Chris@69 5121 else
Chris@69 5122 echo EXPORTS > $output_objdir/$soname.def;
Chris@69 5123 cat $export_symbols >> $output_objdir/$soname.def;
Chris@69 5124 fi~
Chris@69 5125 $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@69 5126 else
Chris@69 5127 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 5128 fi
Chris@69 5129 ;;
Chris@69 5130
Chris@69 5131 haiku*)
Chris@69 5132 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@69 5133 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@69 5134 ;;
Chris@69 5135
Chris@69 5136 os2*)
Chris@69 5137 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@69 5138 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@69 5139 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@69 5140 shrext_cmds=.dll
Chris@69 5141 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
Chris@69 5142 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
Chris@69 5143 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
Chris@69 5144 $ECHO EXPORTS >> $output_objdir/$libname.def~
Chris@69 5145 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
Chris@69 5146 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
Chris@69 5147 emximp -o $lib $output_objdir/$libname.def'
Chris@69 5148 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
Chris@69 5149 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
Chris@69 5150 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
Chris@69 5151 $ECHO EXPORTS >> $output_objdir/$libname.def~
Chris@69 5152 prefix_cmds="$SED"~
Chris@69 5153 if test EXPORTS = "`$SED 1q $export_symbols`"; then
Chris@69 5154 prefix_cmds="$prefix_cmds -e 1d";
Chris@69 5155 fi~
Chris@69 5156 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
Chris@69 5157 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
Chris@69 5158 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
Chris@69 5159 emximp -o $lib $output_objdir/$libname.def'
Chris@69 5160 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
Chris@69 5161 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@69 5162 ;;
Chris@69 5163
Chris@69 5164 interix[[3-9]]*)
Chris@69 5165 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@69 5166 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@69 5167 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@69 5168 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@69 5169 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
Chris@69 5170 # Instead, shared libraries are loaded at an image base (0x10000000 by
Chris@69 5171 # default) and relocated if they conflict, which is a slow very memory
Chris@69 5172 # consuming and fragmenting process. To avoid this, we pick a random,
Chris@69 5173 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
Chris@69 5174 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
Chris@69 5175 _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@69 5176 _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@69 5177 ;;
Chris@69 5178
Chris@69 5179 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
Chris@69 5180 tmp_diet=no
Chris@69 5181 if test linux-dietlibc = "$host_os"; then
Chris@69 5182 case $cc_basename in
Chris@69 5183 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
Chris@69 5184 esac
Chris@69 5185 fi
Chris@69 5186 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
Chris@69 5187 && test no = "$tmp_diet"
Chris@69 5188 then
Chris@69 5189 tmp_addflag=' $pic_flag'
Chris@69 5190 tmp_sharedflag='-shared'
Chris@69 5191 case $cc_basename,$host_cpu in
Chris@69 5192 pgcc*) # Portland Group C compiler
Chris@69 5193 _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@69 5194 tmp_addflag=' $pic_flag'
Chris@69 5195 ;;
Chris@69 5196 pgf77* | pgf90* | pgf95* | pgfortran*)
Chris@69 5197 # Portland Group f77 and f90 compilers
Chris@69 5198 _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@69 5199 tmp_addflag=' $pic_flag -Mnomain' ;;
Chris@69 5200 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
Chris@69 5201 tmp_addflag=' -i_dynamic' ;;
Chris@69 5202 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
Chris@69 5203 tmp_addflag=' -i_dynamic -nofor_main' ;;
Chris@69 5204 ifc* | ifort*) # Intel Fortran compiler
Chris@69 5205 tmp_addflag=' -nofor_main' ;;
Chris@69 5206 lf95*) # Lahey Fortran 8.1
Chris@69 5207 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@69 5208 tmp_sharedflag='--shared' ;;
Chris@69 5209 nagfor*) # NAGFOR 5.3
Chris@69 5210 tmp_sharedflag='-Wl,-shared' ;;
Chris@69 5211 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
Chris@69 5212 tmp_sharedflag='-qmkshrobj'
Chris@69 5213 tmp_addflag= ;;
Chris@69 5214 nvcc*) # Cuda Compiler Driver 2.2
Chris@69 5215 _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@69 5216 _LT_TAGVAR(compiler_needs_object, $1)=yes
Chris@69 5217 ;;
Chris@69 5218 esac
Chris@69 5219 case `$CC -V 2>&1 | sed 5q` in
Chris@69 5220 *Sun\ C*) # Sun C 5.9
Chris@69 5221 _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@69 5222 _LT_TAGVAR(compiler_needs_object, $1)=yes
Chris@69 5223 tmp_sharedflag='-G' ;;
Chris@69 5224 *Sun\ F*) # Sun Fortran 8.3
Chris@69 5225 tmp_sharedflag='-G' ;;
Chris@69 5226 esac
Chris@69 5227 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@69 5228
Chris@69 5229 if test yes = "$supports_anon_versioning"; then
Chris@69 5230 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
Chris@69 5231 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
Chris@69 5232 echo "local: *; };" >> $output_objdir/$libname.ver~
Chris@69 5233 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
Chris@69 5234 fi
Chris@69 5235
Chris@69 5236 case $cc_basename in
Chris@69 5237 tcc*)
Chris@69 5238 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
Chris@69 5239 ;;
Chris@69 5240 xlf* | bgf* | bgxlf* | mpixlf*)
Chris@69 5241 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
Chris@69 5242 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
Chris@69 5243 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@69 5244 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
Chris@69 5245 if test yes = "$supports_anon_versioning"; then
Chris@69 5246 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
Chris@69 5247 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
Chris@69 5248 echo "local: *; };" >> $output_objdir/$libname.ver~
Chris@69 5249 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
Chris@69 5250 fi
Chris@69 5251 ;;
Chris@69 5252 esac
Chris@69 5253 else
Chris@69 5254 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 5255 fi
Chris@69 5256 ;;
Chris@69 5257
Chris@69 5258 netbsd*)
Chris@69 5259 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
Chris@69 5260 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
Chris@69 5261 wlarc=
Chris@69 5262 else
Chris@69 5263 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@69 5264 _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@69 5265 fi
Chris@69 5266 ;;
Chris@69 5267
Chris@69 5268 solaris*)
Chris@69 5269 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
Chris@69 5270 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 5271 cat <<_LT_EOF 1>&2
Chris@69 5272
Chris@69 5273 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
Chris@69 5274 *** create shared libraries on Solaris systems. Therefore, libtool
Chris@69 5275 *** is disabling shared libraries support. We urge you to upgrade GNU
Chris@69 5276 *** binutils to release 2.9.1 or newer. Another option is to modify
Chris@69 5277 *** your PATH or compiler configuration so that the native linker is
Chris@69 5278 *** used, and then restart.
Chris@69 5279
Chris@69 5280 _LT_EOF
Chris@69 5281 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
Chris@69 5282 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@69 5283 _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@69 5284 else
Chris@69 5285 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 5286 fi
Chris@69 5287 ;;
Chris@69 5288
Chris@69 5289 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
Chris@69 5290 case `$LD -v 2>&1` in
Chris@69 5291 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
Chris@69 5292 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 5293 cat <<_LT_EOF 1>&2
Chris@69 5294
Chris@69 5295 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
Chris@69 5296 *** reliably create shared libraries on SCO systems. Therefore, libtool
Chris@69 5297 *** is disabling shared libraries support. We urge you to upgrade GNU
Chris@69 5298 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
Chris@69 5299 *** your PATH or compiler configuration so that the native linker is
Chris@69 5300 *** used, and then restart.
Chris@69 5301
Chris@69 5302 _LT_EOF
Chris@69 5303 ;;
Chris@69 5304 *)
Chris@69 5305 # For security reasons, it is highly recommended that you always
Chris@69 5306 # use absolute paths for naming shared libraries, and exclude the
Chris@69 5307 # DT_RUNPATH tag from executables and libraries. But doing so
Chris@69 5308 # requires that you compile everything twice, which is a pain.
Chris@69 5309 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
Chris@69 5310 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@69 5311 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@69 5312 _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@69 5313 else
Chris@69 5314 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 5315 fi
Chris@69 5316 ;;
Chris@69 5317 esac
Chris@69 5318 ;;
Chris@69 5319
Chris@69 5320 sunos4*)
Chris@69 5321 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
Chris@69 5322 wlarc=
Chris@69 5323 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@69 5324 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@69 5325 ;;
Chris@69 5326
Chris@69 5327 *)
Chris@69 5328 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
Chris@69 5329 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@69 5330 _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@69 5331 else
Chris@69 5332 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 5333 fi
Chris@69 5334 ;;
Chris@69 5335 esac
Chris@69 5336
Chris@69 5337 if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
Chris@69 5338 runpath_var=
Chris@69 5339 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@69 5340 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@69 5341 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@69 5342 fi
Chris@69 5343 else
Chris@69 5344 # PORTME fill in a description of your system's linker (not GNU ld)
Chris@69 5345 case $host_os in
Chris@69 5346 aix3*)
Chris@69 5347 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@69 5348 _LT_TAGVAR(always_export_symbols, $1)=yes
Chris@69 5349 _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@69 5350 # Note: this linker hardcodes the directories in LIBPATH if there
Chris@69 5351 # are no directories specified by -L.
Chris@69 5352 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@69 5353 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
Chris@69 5354 # Neither direct hardcoding nor static linking is supported with a
Chris@69 5355 # broken collect2.
Chris@69 5356 _LT_TAGVAR(hardcode_direct, $1)=unsupported
Chris@69 5357 fi
Chris@69 5358 ;;
Chris@69 5359
Chris@69 5360 aix[[4-9]]*)
Chris@69 5361 if test ia64 = "$host_cpu"; then
Chris@69 5362 # On IA64, the linker does run time linking by default, so we don't
Chris@69 5363 # have to do anything special.
Chris@69 5364 aix_use_runtimelinking=no
Chris@69 5365 exp_sym_flag='-Bexport'
Chris@69 5366 no_entry_flag=
Chris@69 5367 else
Chris@69 5368 # If we're using GNU nm, then we don't want the "-C" option.
Chris@69 5369 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
Chris@69 5370 # Without the "-l" option, or with the "-B" option, AIX nm treats
Chris@69 5371 # weak defined symbols like other global defined symbols, whereas
Chris@69 5372 # GNU nm marks them as "W".
Chris@69 5373 # While the 'weak' keyword is ignored in the Export File, we need
Chris@69 5374 # it in the Import File for the 'aix-soname' feature, so we have
Chris@69 5375 # to replace the "-B" option with "-P" for AIX nm.
Chris@69 5376 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
Chris@69 5377 _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@69 5378 else
Chris@69 5379 _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@69 5380 fi
Chris@69 5381 aix_use_runtimelinking=no
Chris@69 5382
Chris@69 5383 # Test if we are trying to use run time linking or normal
Chris@69 5384 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
Chris@69 5385 # have runtime linking enabled, and use it for executables.
Chris@69 5386 # For shared libraries, we enable/disable runtime linking
Chris@69 5387 # depending on the kind of the shared library created -
Chris@69 5388 # when "with_aix_soname,aix_use_runtimelinking" is:
Chris@69 5389 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
Chris@69 5390 # "aix,yes" lib.so shared, rtl:yes, for executables
Chris@69 5391 # lib.a static archive
Chris@69 5392 # "both,no" lib.so.V(shr.o) shared, rtl:yes
Chris@69 5393 # lib.a(lib.so.V) shared, rtl:no, for executables
Chris@69 5394 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
Chris@69 5395 # lib.a(lib.so.V) shared, rtl:no
Chris@69 5396 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
Chris@69 5397 # lib.a static archive
Chris@69 5398 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
Chris@69 5399 for ld_flag in $LDFLAGS; do
Chris@69 5400 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
Chris@69 5401 aix_use_runtimelinking=yes
Chris@69 5402 break
Chris@69 5403 fi
Chris@69 5404 done
Chris@69 5405 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
Chris@69 5406 # With aix-soname=svr4, we create the lib.so.V shared archives only,
Chris@69 5407 # so we don't have lib.a shared libs to link our executables.
Chris@69 5408 # We have to force runtime linking in this case.
Chris@69 5409 aix_use_runtimelinking=yes
Chris@69 5410 LDFLAGS="$LDFLAGS -Wl,-brtl"
Chris@69 5411 fi
Chris@69 5412 ;;
Chris@69 5413 esac
Chris@69 5414
Chris@69 5415 exp_sym_flag='-bexport'
Chris@69 5416 no_entry_flag='-bnoentry'
Chris@69 5417 fi
Chris@69 5418
Chris@69 5419 # When large executables or shared objects are built, AIX ld can
Chris@69 5420 # have problems creating the table of contents. If linking a library
Chris@69 5421 # or program results in "error TOC overflow" add -mminimal-toc to
Chris@69 5422 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
Chris@69 5423 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
Chris@69 5424
Chris@69 5425 _LT_TAGVAR(archive_cmds, $1)=''
Chris@69 5426 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@69 5427 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@69 5428 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
Chris@69 5429 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@69 5430 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
Chris@69 5431 case $with_aix_soname,$aix_use_runtimelinking in
Chris@69 5432 aix,*) ;; # traditional, no import file
Chris@69 5433 svr4,* | *,yes) # use import file
Chris@69 5434 # The Import File defines what to hardcode.
Chris@69 5435 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@69 5436 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@69 5437 ;;
Chris@69 5438 esac
Chris@69 5439
Chris@69 5440 if test yes = "$GCC"; then
Chris@69 5441 case $host_os in aix4.[[012]]|aix4.[[012]].*)
Chris@69 5442 # We only want to do this on AIX 4.2 and lower, the check
Chris@69 5443 # below for broken collect2 doesn't work under 4.3+
Chris@69 5444 collect2name=`$CC -print-prog-name=collect2`
Chris@69 5445 if test -f "$collect2name" &&
Chris@69 5446 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
Chris@69 5447 then
Chris@69 5448 # We have reworked collect2
Chris@69 5449 :
Chris@69 5450 else
Chris@69 5451 # We have old collect2
Chris@69 5452 _LT_TAGVAR(hardcode_direct, $1)=unsupported
Chris@69 5453 # It fails to find uninstalled libraries when the uninstalled
Chris@69 5454 # path is not listed in the libpath. Setting hardcode_minus_L
Chris@69 5455 # to unsupported forces relinking
Chris@69 5456 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@69 5457 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@69 5458 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@69 5459 fi
Chris@69 5460 ;;
Chris@69 5461 esac
Chris@69 5462 shared_flag='-shared'
Chris@69 5463 if test yes = "$aix_use_runtimelinking"; then
Chris@69 5464 shared_flag="$shared_flag "'$wl-G'
Chris@69 5465 fi
Chris@69 5466 # Need to ensure runtime linking is disabled for the traditional
Chris@69 5467 # shared library, or the linker may eventually find shared libraries
Chris@69 5468 # /with/ Import File - we do not want to mix them.
Chris@69 5469 shared_flag_aix='-shared'
Chris@69 5470 shared_flag_svr4='-shared $wl-G'
Chris@69 5471 else
Chris@69 5472 # not using gcc
Chris@69 5473 if test ia64 = "$host_cpu"; then
Chris@69 5474 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
Chris@69 5475 # chokes on -Wl,-G. The following line is correct:
Chris@69 5476 shared_flag='-G'
Chris@69 5477 else
Chris@69 5478 if test yes = "$aix_use_runtimelinking"; then
Chris@69 5479 shared_flag='$wl-G'
Chris@69 5480 else
Chris@69 5481 shared_flag='$wl-bM:SRE'
Chris@69 5482 fi
Chris@69 5483 shared_flag_aix='$wl-bM:SRE'
Chris@69 5484 shared_flag_svr4='$wl-G'
Chris@69 5485 fi
Chris@69 5486 fi
Chris@69 5487
Chris@69 5488 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
Chris@69 5489 # It seems that -bexpall does not export symbols beginning with
Chris@69 5490 # underscore (_), so it is better to generate a list of symbols to export.
Chris@69 5491 _LT_TAGVAR(always_export_symbols, $1)=yes
Chris@69 5492 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
Chris@69 5493 # Warning - without using the other runtime loading flags (-brtl),
Chris@69 5494 # -berok will link without error, but may produce a broken library.
Chris@69 5495 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
Chris@69 5496 # Determine the default libpath from the value encoded in an
Chris@69 5497 # empty executable.
Chris@69 5498 _LT_SYS_MODULE_PATH_AIX([$1])
Chris@69 5499 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
Chris@69 5500 _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@69 5501 else
Chris@69 5502 if test ia64 = "$host_cpu"; then
Chris@69 5503 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
Chris@69 5504 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
Chris@69 5505 _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@69 5506 else
Chris@69 5507 # Determine the default libpath from the value encoded in an
Chris@69 5508 # empty executable.
Chris@69 5509 _LT_SYS_MODULE_PATH_AIX([$1])
Chris@69 5510 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
Chris@69 5511 # Warning - without using the other run time loading flags,
Chris@69 5512 # -berok will link without error, but may produce a broken library.
Chris@69 5513 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
Chris@69 5514 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
Chris@69 5515 if test yes = "$with_gnu_ld"; then
Chris@69 5516 # We only use this code for GNU lds that support --whole-archive.
Chris@69 5517 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
Chris@69 5518 else
Chris@69 5519 # Exported symbols can be pulled into shared objects from archives
Chris@69 5520 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
Chris@69 5521 fi
Chris@69 5522 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
Chris@69 5523 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
Chris@69 5524 # -brtl affects multiple linker settings, -berok does not and is overridden later
Chris@69 5525 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
Chris@69 5526 if test svr4 != "$with_aix_soname"; then
Chris@69 5527 # This is similar to how AIX traditionally builds its shared libraries.
Chris@69 5528 _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@69 5529 fi
Chris@69 5530 if test aix != "$with_aix_soname"; then
Chris@69 5531 _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@69 5532 else
Chris@69 5533 # used by -dlpreopen to get the symbols
Chris@69 5534 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
Chris@69 5535 fi
Chris@69 5536 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
Chris@69 5537 fi
Chris@69 5538 fi
Chris@69 5539 ;;
Chris@69 5540
Chris@69 5541 amigaos*)
Chris@69 5542 case $host_cpu in
Chris@69 5543 powerpc)
Chris@69 5544 # see comment about AmigaOS4 .so support
Chris@69 5545 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@69 5546 _LT_TAGVAR(archive_expsym_cmds, $1)=''
Chris@69 5547 ;;
Chris@69 5548 m68k)
Chris@69 5549 _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@69 5550 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@69 5551 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@69 5552 ;;
Chris@69 5553 esac
Chris@69 5554 ;;
Chris@69 5555
Chris@69 5556 bsdi[[45]]*)
Chris@69 5557 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
Chris@69 5558 ;;
Chris@69 5559
Chris@69 5560 cygwin* | mingw* | pw32* | cegcc*)
Chris@69 5561 # When not using gcc, we currently assume that we are using
Chris@69 5562 # Microsoft Visual C++.
Chris@69 5563 # hardcode_libdir_flag_spec is actually meaningless, as there is
Chris@69 5564 # no search path for DLLs.
Chris@69 5565 case $cc_basename in
Chris@69 5566 cl*)
Chris@69 5567 # Native MSVC
Chris@69 5568 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
Chris@69 5569 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@69 5570 _LT_TAGVAR(always_export_symbols, $1)=yes
Chris@69 5571 _LT_TAGVAR(file_list_spec, $1)='@'
Chris@69 5572 # Tell ltmain to make .lib files, not .a files.
Chris@69 5573 libext=lib
Chris@69 5574 # Tell ltmain to make .dll files, not .so files.
Chris@69 5575 shrext_cmds=.dll
Chris@69 5576 # FIXME: Setting linknames here is a bad hack.
Chris@69 5577 _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@69 5578 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
Chris@69 5579 cp "$export_symbols" "$output_objdir/$soname.def";
Chris@69 5580 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
Chris@69 5581 else
Chris@69 5582 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
Chris@69 5583 fi~
Chris@69 5584 $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@69 5585 linknames='
Chris@69 5586 # The linker will not automatically build a static lib if we build a DLL.
Chris@69 5587 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
Chris@69 5588 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@69 5589 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
Chris@69 5590 _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@69 5591 # Don't use ranlib
Chris@69 5592 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
Chris@69 5593 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
Chris@69 5594 lt_tool_outputfile="@TOOL_OUTPUT@"~
Chris@69 5595 case $lt_outputfile in
Chris@69 5596 *.exe|*.EXE) ;;
Chris@69 5597 *)
Chris@69 5598 lt_outputfile=$lt_outputfile.exe
Chris@69 5599 lt_tool_outputfile=$lt_tool_outputfile.exe
Chris@69 5600 ;;
Chris@69 5601 esac~
Chris@69 5602 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
Chris@69 5603 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
Chris@69 5604 $RM "$lt_outputfile.manifest";
Chris@69 5605 fi'
Chris@69 5606 ;;
Chris@69 5607 *)
Chris@69 5608 # Assume MSVC wrapper
Chris@69 5609 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
Chris@69 5610 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@69 5611 # Tell ltmain to make .lib files, not .a files.
Chris@69 5612 libext=lib
Chris@69 5613 # Tell ltmain to make .dll files, not .so files.
Chris@69 5614 shrext_cmds=.dll
Chris@69 5615 # FIXME: Setting linknames here is a bad hack.
Chris@69 5616 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
Chris@69 5617 # The linker will automatically build a .lib file if we build a DLL.
Chris@69 5618 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
Chris@69 5619 # FIXME: Should let the user specify the lib program.
Chris@69 5620 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
Chris@69 5621 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@69 5622 ;;
Chris@69 5623 esac
Chris@69 5624 ;;
Chris@69 5625
Chris@69 5626 darwin* | rhapsody*)
Chris@69 5627 _LT_DARWIN_LINKER_FEATURES($1)
Chris@69 5628 ;;
Chris@69 5629
Chris@69 5630 dgux*)
Chris@69 5631 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@69 5632 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@69 5633 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@69 5634 ;;
Chris@69 5635
Chris@69 5636 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
Chris@69 5637 # support. Future versions do this automatically, but an explicit c++rt0.o
Chris@69 5638 # does not break anything, and helps significantly (at the cost of a little
Chris@69 5639 # extra space).
Chris@69 5640 freebsd2.2*)
Chris@69 5641 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
Chris@69 5642 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@69 5643 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@69 5644 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@69 5645 ;;
Chris@69 5646
Chris@69 5647 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
Chris@69 5648 freebsd2.*)
Chris@69 5649 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
Chris@69 5650 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@69 5651 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@69 5652 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@69 5653 ;;
Chris@69 5654
Chris@69 5655 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
Chris@69 5656 freebsd* | dragonfly*)
Chris@69 5657 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
Chris@69 5658 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@69 5659 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@69 5660 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@69 5661 ;;
Chris@69 5662
Chris@69 5663 hpux9*)
Chris@69 5664 if test yes = "$GCC"; then
Chris@69 5665 _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@69 5666 else
Chris@69 5667 _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@69 5668 fi
Chris@69 5669 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
Chris@69 5670 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@69 5671 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@69 5672
Chris@69 5673 # hardcode_minus_L: Not really in the search PATH,
Chris@69 5674 # but as the default location of the library.
Chris@69 5675 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@69 5676 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@69 5677 ;;
Chris@69 5678
Chris@69 5679 hpux10*)
Chris@69 5680 if test yes,no = "$GCC,$with_gnu_ld"; then
Chris@69 5681 _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@69 5682 else
Chris@69 5683 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
Chris@69 5684 fi
Chris@69 5685 if test no = "$with_gnu_ld"; then
Chris@69 5686 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
Chris@69 5687 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@69 5688 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@69 5689 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@69 5690 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@69 5691 # hardcode_minus_L: Not really in the search PATH,
Chris@69 5692 # but as the default location of the library.
Chris@69 5693 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@69 5694 fi
Chris@69 5695 ;;
Chris@69 5696
Chris@69 5697 hpux11*)
Chris@69 5698 if test yes,no = "$GCC,$with_gnu_ld"; then
Chris@69 5699 case $host_cpu in
Chris@69 5700 hppa*64*)
Chris@69 5701 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@69 5702 ;;
Chris@69 5703 ia64*)
Chris@69 5704 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
Chris@69 5705 ;;
Chris@69 5706 *)
Chris@69 5707 _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@69 5708 ;;
Chris@69 5709 esac
Chris@69 5710 else
Chris@69 5711 case $host_cpu in
Chris@69 5712 hppa*64*)
Chris@69 5713 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@69 5714 ;;
Chris@69 5715 ia64*)
Chris@69 5716 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
Chris@69 5717 ;;
Chris@69 5718 *)
Chris@69 5719 m4_if($1, [], [
Chris@69 5720 # Older versions of the 11.00 compiler do not understand -b yet
Chris@69 5721 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
Chris@69 5722 _LT_LINKER_OPTION([if $CC understands -b],
Chris@69 5723 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
Chris@69 5724 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
Chris@69 5725 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
Chris@69 5726 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
Chris@69 5727 ;;
Chris@69 5728 esac
Chris@69 5729 fi
Chris@69 5730 if test no = "$with_gnu_ld"; then
Chris@69 5731 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
Chris@69 5732 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@69 5733
Chris@69 5734 case $host_cpu in
Chris@69 5735 hppa*64*|ia64*)
Chris@69 5736 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@69 5737 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@69 5738 ;;
Chris@69 5739 *)
Chris@69 5740 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@69 5741 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@69 5742 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@69 5743
Chris@69 5744 # hardcode_minus_L: Not really in the search PATH,
Chris@69 5745 # but as the default location of the library.
Chris@69 5746 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@69 5747 ;;
Chris@69 5748 esac
Chris@69 5749 fi
Chris@69 5750 ;;
Chris@69 5751
Chris@69 5752 irix5* | irix6* | nonstopux*)
Chris@69 5753 if test yes = "$GCC"; then
Chris@69 5754 _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@69 5755 # Try to use the -exported_symbol ld option, if it does not
Chris@69 5756 # work, assume that -exports_file does not work either and
Chris@69 5757 # implicitly export all symbols.
Chris@69 5758 # This should be the same for all languages, so no per-tag cache variable.
Chris@69 5759 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
Chris@69 5760 [lt_cv_irix_exported_symbol],
Chris@69 5761 [save_LDFLAGS=$LDFLAGS
Chris@69 5762 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
Chris@69 5763 AC_LINK_IFELSE(
Chris@69 5764 [AC_LANG_SOURCE(
Chris@69 5765 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
Chris@69 5766 [C++], [[int foo (void) { return 0; }]],
Chris@69 5767 [Fortran 77], [[
Chris@69 5768 subroutine foo
Chris@69 5769 end]],
Chris@69 5770 [Fortran], [[
Chris@69 5771 subroutine foo
Chris@69 5772 end]])])],
Chris@69 5773 [lt_cv_irix_exported_symbol=yes],
Chris@69 5774 [lt_cv_irix_exported_symbol=no])
Chris@69 5775 LDFLAGS=$save_LDFLAGS])
Chris@69 5776 if test yes = "$lt_cv_irix_exported_symbol"; then
Chris@69 5777 _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@69 5778 fi
Chris@69 5779 else
Chris@69 5780 _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@69 5781 _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@69 5782 fi
Chris@69 5783 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
Chris@69 5784 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@69 5785 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@69 5786 _LT_TAGVAR(inherit_rpath, $1)=yes
Chris@69 5787 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@69 5788 ;;
Chris@69 5789
Chris@69 5790 linux*)
Chris@69 5791 case $cc_basename in
Chris@69 5792 tcc*)
Chris@69 5793 # Fabrice Bellard et al's Tiny C Compiler
Chris@69 5794 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@69 5795 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
Chris@69 5796 ;;
Chris@69 5797 esac
Chris@69 5798 ;;
Chris@69 5799
Chris@69 5800 netbsd*)
Chris@69 5801 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
Chris@69 5802 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
Chris@69 5803 else
Chris@69 5804 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
Chris@69 5805 fi
Chris@69 5806 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@69 5807 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@69 5808 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@69 5809 ;;
Chris@69 5810
Chris@69 5811 newsos6)
Chris@69 5812 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@69 5813 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@69 5814 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@69 5815 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@69 5816 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@69 5817 ;;
Chris@69 5818
Chris@69 5819 *nto* | *qnx*)
Chris@69 5820 ;;
Chris@69 5821
Chris@69 5822 openbsd* | bitrig*)
Chris@69 5823 if test -f /usr/libexec/ld.so; then
Chris@69 5824 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@69 5825 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@69 5826 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@69 5827 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
Chris@69 5828 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
Chris@69 5829 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
Chris@69 5830 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@69 5831 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@69 5832 else
Chris@69 5833 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
Chris@69 5834 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@69 5835 fi
Chris@69 5836 else
Chris@69 5837 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 5838 fi
Chris@69 5839 ;;
Chris@69 5840
Chris@69 5841 os2*)
Chris@69 5842 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@69 5843 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@69 5844 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@69 5845 shrext_cmds=.dll
Chris@69 5846 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
Chris@69 5847 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
Chris@69 5848 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
Chris@69 5849 $ECHO EXPORTS >> $output_objdir/$libname.def~
Chris@69 5850 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
Chris@69 5851 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
Chris@69 5852 emximp -o $lib $output_objdir/$libname.def'
Chris@69 5853 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
Chris@69 5854 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
Chris@69 5855 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
Chris@69 5856 $ECHO EXPORTS >> $output_objdir/$libname.def~
Chris@69 5857 prefix_cmds="$SED"~
Chris@69 5858 if test EXPORTS = "`$SED 1q $export_symbols`"; then
Chris@69 5859 prefix_cmds="$prefix_cmds -e 1d";
Chris@69 5860 fi~
Chris@69 5861 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
Chris@69 5862 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
Chris@69 5863 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
Chris@69 5864 emximp -o $lib $output_objdir/$libname.def'
Chris@69 5865 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
Chris@69 5866 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@69 5867 ;;
Chris@69 5868
Chris@69 5869 osf3*)
Chris@69 5870 if test yes = "$GCC"; then
Chris@69 5871 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
Chris@69 5872 _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@69 5873 else
Chris@69 5874 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
Chris@69 5875 _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@69 5876 fi
Chris@69 5877 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
Chris@69 5878 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@69 5879 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@69 5880 ;;
Chris@69 5881
Chris@69 5882 osf4* | osf5*) # as osf3* with the addition of -msym flag
Chris@69 5883 if test yes = "$GCC"; then
Chris@69 5884 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
Chris@69 5885 _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@69 5886 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@69 5887 else
Chris@69 5888 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
Chris@69 5889 _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@69 5890 _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@69 5891 $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@69 5892
Chris@69 5893 # Both c and cxx compiler support -rpath directly
Chris@69 5894 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
Chris@69 5895 fi
Chris@69 5896 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
Chris@69 5897 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@69 5898 ;;
Chris@69 5899
Chris@69 5900 solaris*)
Chris@69 5901 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
Chris@69 5902 if test yes = "$GCC"; then
Chris@69 5903 wlarc='$wl'
Chris@69 5904 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@69 5905 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@69 5906 $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@69 5907 else
Chris@69 5908 case `$CC -V 2>&1` in
Chris@69 5909 *"Compilers 5.0"*)
Chris@69 5910 wlarc=''
Chris@69 5911 _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@69 5912 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@69 5913 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
Chris@69 5914 ;;
Chris@69 5915 *)
Chris@69 5916 wlarc='$wl'
Chris@69 5917 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@69 5918 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@69 5919 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
Chris@69 5920 ;;
Chris@69 5921 esac
Chris@69 5922 fi
Chris@69 5923 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@69 5924 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@69 5925 case $host_os in
Chris@69 5926 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
Chris@69 5927 *)
Chris@69 5928 # The compiler driver will combine and reorder linker options,
Chris@69 5929 # but understands '-z linker_flag'. GCC discards it without '$wl',
Chris@69 5930 # but is careful enough not to reorder.
Chris@69 5931 # Supported since Solaris 2.6 (maybe 2.5.1?)
Chris@69 5932 if test yes = "$GCC"; then
Chris@69 5933 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
Chris@69 5934 else
Chris@69 5935 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
Chris@69 5936 fi
Chris@69 5937 ;;
Chris@69 5938 esac
Chris@69 5939 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@69 5940 ;;
Chris@69 5941
Chris@69 5942 sunos4*)
Chris@69 5943 if test sequent = "$host_vendor"; then
Chris@69 5944 # Use $CC to link under sequent, because it throws in some extra .o
Chris@69 5945 # files that make .init and .fini sections work.
Chris@69 5946 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@69 5947 else
Chris@69 5948 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
Chris@69 5949 fi
Chris@69 5950 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@69 5951 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@69 5952 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@69 5953 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@69 5954 ;;
Chris@69 5955
Chris@69 5956 sysv4)
Chris@69 5957 case $host_vendor in
Chris@69 5958 sni)
Chris@69 5959 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@69 5960 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
Chris@69 5961 ;;
Chris@69 5962 siemens)
Chris@69 5963 ## LD is ld it makes a PLAMLIB
Chris@69 5964 ## CC just makes a GrossModule.
Chris@69 5965 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
Chris@69 5966 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
Chris@69 5967 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@69 5968 ;;
Chris@69 5969 motorola)
Chris@69 5970 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@69 5971 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
Chris@69 5972 ;;
Chris@69 5973 esac
Chris@69 5974 runpath_var='LD_RUN_PATH'
Chris@69 5975 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@69 5976 ;;
Chris@69 5977
Chris@69 5978 sysv4.3*)
Chris@69 5979 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@69 5980 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@69 5981 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
Chris@69 5982 ;;
Chris@69 5983
Chris@69 5984 sysv4*MP*)
Chris@69 5985 if test -d /usr/nec; then
Chris@69 5986 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@69 5987 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@69 5988 runpath_var=LD_RUN_PATH
Chris@69 5989 hardcode_runpath_var=yes
Chris@69 5990 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@69 5991 fi
Chris@69 5992 ;;
Chris@69 5993
Chris@69 5994 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
Chris@69 5995 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
Chris@69 5996 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@69 5997 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@69 5998 runpath_var='LD_RUN_PATH'
Chris@69 5999
Chris@69 6000 if test yes = "$GCC"; then
Chris@69 6001 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@69 6002 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@69 6003 else
Chris@69 6004 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@69 6005 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@69 6006 fi
Chris@69 6007 ;;
Chris@69 6008
Chris@69 6009 sysv5* | sco3.2v5* | sco5v6*)
Chris@69 6010 # Note: We CANNOT use -z defs as we might desire, because we do not
Chris@69 6011 # link with -lc, and that would cause any symbols used from libc to
Chris@69 6012 # always be unresolved, which means just about no library would
Chris@69 6013 # ever link correctly. If we're not using GNU ld we use -z text
Chris@69 6014 # though, which does catch some bad symbols but isn't as heavy-handed
Chris@69 6015 # as -z defs.
Chris@69 6016 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
Chris@69 6017 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
Chris@69 6018 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@69 6019 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@69 6020 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
Chris@69 6021 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
Chris@69 6022 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@69 6023 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
Chris@69 6024 runpath_var='LD_RUN_PATH'
Chris@69 6025
Chris@69 6026 if test yes = "$GCC"; then
Chris@69 6027 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@69 6028 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@69 6029 else
Chris@69 6030 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@69 6031 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@69 6032 fi
Chris@69 6033 ;;
Chris@69 6034
Chris@69 6035 uts4*)
Chris@69 6036 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@69 6037 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@69 6038 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@69 6039 ;;
Chris@69 6040
Chris@69 6041 *)
Chris@69 6042 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 6043 ;;
Chris@69 6044 esac
Chris@69 6045
Chris@69 6046 if test sni = "$host_vendor"; then
Chris@69 6047 case $host in
Chris@69 6048 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
Chris@69 6049 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
Chris@69 6050 ;;
Chris@69 6051 esac
Chris@69 6052 fi
Chris@69 6053 fi
Chris@69 6054 ])
Chris@69 6055 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
Chris@69 6056 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
Chris@69 6057
Chris@69 6058 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
Chris@69 6059
Chris@69 6060 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
Chris@69 6061 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
Chris@69 6062 _LT_DECL([], [extract_expsyms_cmds], [2],
Chris@69 6063 [The commands to extract the exported symbol list from a shared archive])
Chris@69 6064
Chris@69 6065 #
Chris@69 6066 # Do we need to explicitly link libc?
Chris@69 6067 #
Chris@69 6068 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
Chris@69 6069 x|xyes)
Chris@69 6070 # Assume -lc should be added
Chris@69 6071 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
Chris@69 6072
Chris@69 6073 if test yes,yes = "$GCC,$enable_shared"; then
Chris@69 6074 case $_LT_TAGVAR(archive_cmds, $1) in
Chris@69 6075 *'~'*)
Chris@69 6076 # FIXME: we may have to deal with multi-command sequences.
Chris@69 6077 ;;
Chris@69 6078 '$CC '*)
Chris@69 6079 # Test whether the compiler implicitly links with -lc since on some
Chris@69 6080 # systems, -lgcc has to come before -lc. If gcc already passes -lc
Chris@69 6081 # to ld, don't add -lc before -lgcc.
Chris@69 6082 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
Chris@69 6083 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
Chris@69 6084 [$RM conftest*
Chris@69 6085 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
Chris@69 6086
Chris@69 6087 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
Chris@69 6088 soname=conftest
Chris@69 6089 lib=conftest
Chris@69 6090 libobjs=conftest.$ac_objext
Chris@69 6091 deplibs=
Chris@69 6092 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
Chris@69 6093 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
Chris@69 6094 compiler_flags=-v
Chris@69 6095 linker_flags=-v
Chris@69 6096 verstring=
Chris@69 6097 output_objdir=.
Chris@69 6098 libname=conftest
Chris@69 6099 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
Chris@69 6100 _LT_TAGVAR(allow_undefined_flag, $1)=
Chris@69 6101 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
Chris@69 6102 then
Chris@69 6103 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@69 6104 else
Chris@69 6105 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
Chris@69 6106 fi
Chris@69 6107 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
Chris@69 6108 else
Chris@69 6109 cat conftest.err 1>&5
Chris@69 6110 fi
Chris@69 6111 $RM conftest*
Chris@69 6112 ])
Chris@69 6113 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
Chris@69 6114 ;;
Chris@69 6115 esac
Chris@69 6116 fi
Chris@69 6117 ;;
Chris@69 6118 esac
Chris@69 6119
Chris@69 6120 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
Chris@69 6121 [Whether or not to add -lc for building shared libraries])
Chris@69 6122 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
Chris@69 6123 [enable_shared_with_static_runtimes], [0],
Chris@69 6124 [Whether or not to disallow shared libs when runtime libs are static])
Chris@69 6125 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
Chris@69 6126 [Compiler flag to allow reflexive dlopens])
Chris@69 6127 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
Chris@69 6128 [Compiler flag to generate shared objects directly from archives])
Chris@69 6129 _LT_TAGDECL([], [compiler_needs_object], [1],
Chris@69 6130 [Whether the compiler copes with passing no objects directly])
Chris@69 6131 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
Chris@69 6132 [Create an old-style archive from a shared archive])
Chris@69 6133 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
Chris@69 6134 [Create a temporary old-style archive to link instead of a shared archive])
Chris@69 6135 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
Chris@69 6136 _LT_TAGDECL([], [archive_expsym_cmds], [2])
Chris@69 6137 _LT_TAGDECL([], [module_cmds], [2],
Chris@69 6138 [Commands used to build a loadable module if different from building
Chris@69 6139 a shared archive.])
Chris@69 6140 _LT_TAGDECL([], [module_expsym_cmds], [2])
Chris@69 6141 _LT_TAGDECL([], [with_gnu_ld], [1],
Chris@69 6142 [Whether we are building with GNU ld or not])
Chris@69 6143 _LT_TAGDECL([], [allow_undefined_flag], [1],
Chris@69 6144 [Flag that allows shared libraries with undefined symbols to be built])
Chris@69 6145 _LT_TAGDECL([], [no_undefined_flag], [1],
Chris@69 6146 [Flag that enforces no undefined symbols])
Chris@69 6147 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
Chris@69 6148 [Flag to hardcode $libdir into a binary during linking.
Chris@69 6149 This must work even if $libdir does not exist])
Chris@69 6150 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
Chris@69 6151 [Whether we need a single "-rpath" flag with a separated argument])
Chris@69 6152 _LT_TAGDECL([], [hardcode_direct], [0],
Chris@69 6153 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
Chris@69 6154 DIR into the resulting binary])
Chris@69 6155 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
Chris@69 6156 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
Chris@69 6157 DIR into the resulting binary and the resulting library dependency is
Chris@69 6158 "absolute", i.e impossible to change by setting $shlibpath_var if the
Chris@69 6159 library is relocated])
Chris@69 6160 _LT_TAGDECL([], [hardcode_minus_L], [0],
Chris@69 6161 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
Chris@69 6162 into the resulting binary])
Chris@69 6163 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
Chris@69 6164 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
Chris@69 6165 into the resulting binary])
Chris@69 6166 _LT_TAGDECL([], [hardcode_automatic], [0],
Chris@69 6167 [Set to "yes" if building a shared library automatically hardcodes DIR
Chris@69 6168 into the library and all subsequent libraries and executables linked
Chris@69 6169 against it])
Chris@69 6170 _LT_TAGDECL([], [inherit_rpath], [0],
Chris@69 6171 [Set to yes if linker adds runtime paths of dependent libraries
Chris@69 6172 to runtime path list])
Chris@69 6173 _LT_TAGDECL([], [link_all_deplibs], [0],
Chris@69 6174 [Whether libtool must link a program against all its dependency libraries])
Chris@69 6175 _LT_TAGDECL([], [always_export_symbols], [0],
Chris@69 6176 [Set to "yes" if exported symbols are required])
Chris@69 6177 _LT_TAGDECL([], [export_symbols_cmds], [2],
Chris@69 6178 [The commands to list exported symbols])
Chris@69 6179 _LT_TAGDECL([], [exclude_expsyms], [1],
Chris@69 6180 [Symbols that should not be listed in the preloaded symbols])
Chris@69 6181 _LT_TAGDECL([], [include_expsyms], [1],
Chris@69 6182 [Symbols that must always be exported])
Chris@69 6183 _LT_TAGDECL([], [prelink_cmds], [2],
Chris@69 6184 [Commands necessary for linking programs (against libraries) with templates])
Chris@69 6185 _LT_TAGDECL([], [postlink_cmds], [2],
Chris@69 6186 [Commands necessary for finishing linking programs])
Chris@69 6187 _LT_TAGDECL([], [file_list_spec], [1],
Chris@69 6188 [Specify filename containing input files])
Chris@69 6189 dnl FIXME: Not yet implemented
Chris@69 6190 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
Chris@69 6191 dnl [Compiler flag to generate thread safe objects])
Chris@69 6192 ])# _LT_LINKER_SHLIBS
Chris@69 6193
Chris@69 6194
Chris@69 6195 # _LT_LANG_C_CONFIG([TAG])
Chris@69 6196 # ------------------------
Chris@69 6197 # Ensure that the configuration variables for a C compiler are suitably
Chris@69 6198 # defined. These variables are subsequently used by _LT_CONFIG to write
Chris@69 6199 # the compiler configuration to 'libtool'.
Chris@69 6200 m4_defun([_LT_LANG_C_CONFIG],
Chris@69 6201 [m4_require([_LT_DECL_EGREP])dnl
Chris@69 6202 lt_save_CC=$CC
Chris@69 6203 AC_LANG_PUSH(C)
Chris@69 6204
Chris@69 6205 # Source file extension for C test sources.
Chris@69 6206 ac_ext=c
Chris@69 6207
Chris@69 6208 # Object file extension for compiled C test sources.
Chris@69 6209 objext=o
Chris@69 6210 _LT_TAGVAR(objext, $1)=$objext
Chris@69 6211
Chris@69 6212 # Code to be used in simple compile tests
Chris@69 6213 lt_simple_compile_test_code="int some_variable = 0;"
Chris@69 6214
Chris@69 6215 # Code to be used in simple link tests
Chris@69 6216 lt_simple_link_test_code='int main(){return(0);}'
Chris@69 6217
Chris@69 6218 _LT_TAG_COMPILER
Chris@69 6219 # Save the default compiler, since it gets overwritten when the other
Chris@69 6220 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
Chris@69 6221 compiler_DEFAULT=$CC
Chris@69 6222
Chris@69 6223 # save warnings/boilerplate of simple test code
Chris@69 6224 _LT_COMPILER_BOILERPLATE
Chris@69 6225 _LT_LINKER_BOILERPLATE
Chris@69 6226
Chris@69 6227 ## CAVEAT EMPTOR:
Chris@69 6228 ## There is no encapsulation within the following macros, do not change
Chris@69 6229 ## the running order or otherwise move them around unless you know exactly
Chris@69 6230 ## what you are doing...
Chris@69 6231 if test -n "$compiler"; then
Chris@69 6232 _LT_COMPILER_NO_RTTI($1)
Chris@69 6233 _LT_COMPILER_PIC($1)
Chris@69 6234 _LT_COMPILER_C_O($1)
Chris@69 6235 _LT_COMPILER_FILE_LOCKS($1)
Chris@69 6236 _LT_LINKER_SHLIBS($1)
Chris@69 6237 _LT_SYS_DYNAMIC_LINKER($1)
Chris@69 6238 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@69 6239 LT_SYS_DLOPEN_SELF
Chris@69 6240 _LT_CMD_STRIPLIB
Chris@69 6241
Chris@69 6242 # Report what library types will actually be built
Chris@69 6243 AC_MSG_CHECKING([if libtool supports shared libraries])
Chris@69 6244 AC_MSG_RESULT([$can_build_shared])
Chris@69 6245
Chris@69 6246 AC_MSG_CHECKING([whether to build shared libraries])
Chris@69 6247 test no = "$can_build_shared" && enable_shared=no
Chris@69 6248
Chris@69 6249 # On AIX, shared libraries and static libraries use the same namespace, and
Chris@69 6250 # are all built from PIC.
Chris@69 6251 case $host_os in
Chris@69 6252 aix3*)
Chris@69 6253 test yes = "$enable_shared" && enable_static=no
Chris@69 6254 if test -n "$RANLIB"; then
Chris@69 6255 archive_cmds="$archive_cmds~\$RANLIB \$lib"
Chris@69 6256 postinstall_cmds='$RANLIB $lib'
Chris@69 6257 fi
Chris@69 6258 ;;
Chris@69 6259
Chris@69 6260 aix[[4-9]]*)
Chris@69 6261 if test ia64 != "$host_cpu"; then
Chris@69 6262 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
Chris@69 6263 yes,aix,yes) ;; # shared object as lib.so file only
Chris@69 6264 yes,svr4,*) ;; # shared object as lib.so archive member only
Chris@69 6265 yes,*) enable_static=no ;; # shared object in lib.a archive as well
Chris@69 6266 esac
Chris@69 6267 fi
Chris@69 6268 ;;
Chris@69 6269 esac
Chris@69 6270 AC_MSG_RESULT([$enable_shared])
Chris@69 6271
Chris@69 6272 AC_MSG_CHECKING([whether to build static libraries])
Chris@69 6273 # Make sure either enable_shared or enable_static is yes.
Chris@69 6274 test yes = "$enable_shared" || enable_static=yes
Chris@69 6275 AC_MSG_RESULT([$enable_static])
Chris@69 6276
Chris@69 6277 _LT_CONFIG($1)
Chris@69 6278 fi
Chris@69 6279 AC_LANG_POP
Chris@69 6280 CC=$lt_save_CC
Chris@69 6281 ])# _LT_LANG_C_CONFIG
Chris@69 6282
Chris@69 6283
Chris@69 6284 # _LT_LANG_CXX_CONFIG([TAG])
Chris@69 6285 # --------------------------
Chris@69 6286 # Ensure that the configuration variables for a C++ compiler are suitably
Chris@69 6287 # defined. These variables are subsequently used by _LT_CONFIG to write
Chris@69 6288 # the compiler configuration to 'libtool'.
Chris@69 6289 m4_defun([_LT_LANG_CXX_CONFIG],
Chris@69 6290 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@69 6291 m4_require([_LT_DECL_EGREP])dnl
Chris@69 6292 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
Chris@69 6293 if test -n "$CXX" && ( test no != "$CXX" &&
Chris@69 6294 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
Chris@69 6295 (test g++ != "$CXX"))); then
Chris@69 6296 AC_PROG_CXXCPP
Chris@69 6297 else
Chris@69 6298 _lt_caught_CXX_error=yes
Chris@69 6299 fi
Chris@69 6300
Chris@69 6301 AC_LANG_PUSH(C++)
Chris@69 6302 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@69 6303 _LT_TAGVAR(allow_undefined_flag, $1)=
Chris@69 6304 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@69 6305 _LT_TAGVAR(archive_expsym_cmds, $1)=
Chris@69 6306 _LT_TAGVAR(compiler_needs_object, $1)=no
Chris@69 6307 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@69 6308 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@69 6309 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@69 6310 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@69 6311 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@69 6312 _LT_TAGVAR(hardcode_minus_L, $1)=no
Chris@69 6313 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
Chris@69 6314 _LT_TAGVAR(hardcode_automatic, $1)=no
Chris@69 6315 _LT_TAGVAR(inherit_rpath, $1)=no
Chris@69 6316 _LT_TAGVAR(module_cmds, $1)=
Chris@69 6317 _LT_TAGVAR(module_expsym_cmds, $1)=
Chris@69 6318 _LT_TAGVAR(link_all_deplibs, $1)=unknown
Chris@69 6319 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@69 6320 _LT_TAGVAR(reload_flag, $1)=$reload_flag
Chris@69 6321 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
Chris@69 6322 _LT_TAGVAR(no_undefined_flag, $1)=
Chris@69 6323 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@69 6324 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
Chris@69 6325
Chris@69 6326 # Source file extension for C++ test sources.
Chris@69 6327 ac_ext=cpp
Chris@69 6328
Chris@69 6329 # Object file extension for compiled C++ test sources.
Chris@69 6330 objext=o
Chris@69 6331 _LT_TAGVAR(objext, $1)=$objext
Chris@69 6332
Chris@69 6333 # No sense in running all these tests if we already determined that
Chris@69 6334 # the CXX compiler isn't working. Some variables (like enable_shared)
Chris@69 6335 # are currently assumed to apply to all compilers on this platform,
Chris@69 6336 # and will be corrupted by setting them based on a non-working compiler.
Chris@69 6337 if test yes != "$_lt_caught_CXX_error"; then
Chris@69 6338 # Code to be used in simple compile tests
Chris@69 6339 lt_simple_compile_test_code="int some_variable = 0;"
Chris@69 6340
Chris@69 6341 # Code to be used in simple link tests
Chris@69 6342 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
Chris@69 6343
Chris@69 6344 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@69 6345 _LT_TAG_COMPILER
Chris@69 6346
Chris@69 6347 # save warnings/boilerplate of simple test code
Chris@69 6348 _LT_COMPILER_BOILERPLATE
Chris@69 6349 _LT_LINKER_BOILERPLATE
Chris@69 6350
Chris@69 6351 # Allow CC to be a program name with arguments.
Chris@69 6352 lt_save_CC=$CC
Chris@69 6353 lt_save_CFLAGS=$CFLAGS
Chris@69 6354 lt_save_LD=$LD
Chris@69 6355 lt_save_GCC=$GCC
Chris@69 6356 GCC=$GXX
Chris@69 6357 lt_save_with_gnu_ld=$with_gnu_ld
Chris@69 6358 lt_save_path_LD=$lt_cv_path_LD
Chris@69 6359 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
Chris@69 6360 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
Chris@69 6361 else
Chris@69 6362 $as_unset lt_cv_prog_gnu_ld
Chris@69 6363 fi
Chris@69 6364 if test -n "${lt_cv_path_LDCXX+set}"; then
Chris@69 6365 lt_cv_path_LD=$lt_cv_path_LDCXX
Chris@69 6366 else
Chris@69 6367 $as_unset lt_cv_path_LD
Chris@69 6368 fi
Chris@69 6369 test -z "${LDCXX+set}" || LD=$LDCXX
Chris@69 6370 CC=${CXX-"c++"}
Chris@69 6371 CFLAGS=$CXXFLAGS
Chris@69 6372 compiler=$CC
Chris@69 6373 _LT_TAGVAR(compiler, $1)=$CC
Chris@69 6374 _LT_CC_BASENAME([$compiler])
Chris@69 6375
Chris@69 6376 if test -n "$compiler"; then
Chris@69 6377 # We don't want -fno-exception when compiling C++ code, so set the
Chris@69 6378 # no_builtin_flag separately
Chris@69 6379 if test yes = "$GXX"; then
Chris@69 6380 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
Chris@69 6381 else
Chris@69 6382 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
Chris@69 6383 fi
Chris@69 6384
Chris@69 6385 if test yes = "$GXX"; then
Chris@69 6386 # Set up default GNU C++ configuration
Chris@69 6387
Chris@69 6388 LT_PATH_LD
Chris@69 6389
Chris@69 6390 # Check if GNU C++ uses GNU ld as the underlying linker, since the
Chris@69 6391 # archiving commands below assume that GNU ld is being used.
Chris@69 6392 if test yes = "$with_gnu_ld"; then
Chris@69 6393 _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@69 6394 _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@69 6395
Chris@69 6396 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@69 6397 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
Chris@69 6398
Chris@69 6399 # If archive_cmds runs LD, not CC, wlarc should be empty
Chris@69 6400 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
Chris@69 6401 # investigate it a little bit more. (MM)
Chris@69 6402 wlarc='$wl'
Chris@69 6403
Chris@69 6404 # ancient GNU ld didn't support --whole-archive et. al.
Chris@69 6405 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
Chris@69 6406 $GREP 'no-whole-archive' > /dev/null; then
Chris@69 6407 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
Chris@69 6408 else
Chris@69 6409 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@69 6410 fi
Chris@69 6411 else
Chris@69 6412 with_gnu_ld=no
Chris@69 6413 wlarc=
Chris@69 6414
Chris@69 6415 # A generic and very simple default shared library creation
Chris@69 6416 # command for GNU C++ for the case where it uses the native
Chris@69 6417 # linker, instead of GNU ld. If possible, this setting should
Chris@69 6418 # overridden to take advantage of the native linker features on
Chris@69 6419 # the platform it is being used on.
Chris@69 6420 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
Chris@69 6421 fi
Chris@69 6422
Chris@69 6423 # Commands to make compiler produce verbose output that lists
Chris@69 6424 # what "hidden" libraries, object files and flags are used when
Chris@69 6425 # linking a shared library.
Chris@69 6426 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
Chris@69 6427
Chris@69 6428 else
Chris@69 6429 GXX=no
Chris@69 6430 with_gnu_ld=no
Chris@69 6431 wlarc=
Chris@69 6432 fi
Chris@69 6433
Chris@69 6434 # PORTME: fill in a description of your system's C++ link characteristics
Chris@69 6435 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
Chris@69 6436 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@69 6437 case $host_os in
Chris@69 6438 aix3*)
Chris@69 6439 # FIXME: insert proper C++ library support
Chris@69 6440 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 6441 ;;
Chris@69 6442 aix[[4-9]]*)
Chris@69 6443 if test ia64 = "$host_cpu"; then
Chris@69 6444 # On IA64, the linker does run time linking by default, so we don't
Chris@69 6445 # have to do anything special.
Chris@69 6446 aix_use_runtimelinking=no
Chris@69 6447 exp_sym_flag='-Bexport'
Chris@69 6448 no_entry_flag=
Chris@69 6449 else
Chris@69 6450 aix_use_runtimelinking=no
Chris@69 6451
Chris@69 6452 # Test if we are trying to use run time linking or normal
Chris@69 6453 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
Chris@69 6454 # have runtime linking enabled, and use it for executables.
Chris@69 6455 # For shared libraries, we enable/disable runtime linking
Chris@69 6456 # depending on the kind of the shared library created -
Chris@69 6457 # when "with_aix_soname,aix_use_runtimelinking" is:
Chris@69 6458 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
Chris@69 6459 # "aix,yes" lib.so shared, rtl:yes, for executables
Chris@69 6460 # lib.a static archive
Chris@69 6461 # "both,no" lib.so.V(shr.o) shared, rtl:yes
Chris@69 6462 # lib.a(lib.so.V) shared, rtl:no, for executables
Chris@69 6463 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
Chris@69 6464 # lib.a(lib.so.V) shared, rtl:no
Chris@69 6465 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
Chris@69 6466 # lib.a static archive
Chris@69 6467 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
Chris@69 6468 for ld_flag in $LDFLAGS; do
Chris@69 6469 case $ld_flag in
Chris@69 6470 *-brtl*)
Chris@69 6471 aix_use_runtimelinking=yes
Chris@69 6472 break
Chris@69 6473 ;;
Chris@69 6474 esac
Chris@69 6475 done
Chris@69 6476 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
Chris@69 6477 # With aix-soname=svr4, we create the lib.so.V shared archives only,
Chris@69 6478 # so we don't have lib.a shared libs to link our executables.
Chris@69 6479 # We have to force runtime linking in this case.
Chris@69 6480 aix_use_runtimelinking=yes
Chris@69 6481 LDFLAGS="$LDFLAGS -Wl,-brtl"
Chris@69 6482 fi
Chris@69 6483 ;;
Chris@69 6484 esac
Chris@69 6485
Chris@69 6486 exp_sym_flag='-bexport'
Chris@69 6487 no_entry_flag='-bnoentry'
Chris@69 6488 fi
Chris@69 6489
Chris@69 6490 # When large executables or shared objects are built, AIX ld can
Chris@69 6491 # have problems creating the table of contents. If linking a library
Chris@69 6492 # or program results in "error TOC overflow" add -mminimal-toc to
Chris@69 6493 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
Chris@69 6494 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
Chris@69 6495
Chris@69 6496 _LT_TAGVAR(archive_cmds, $1)=''
Chris@69 6497 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@69 6498 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@69 6499 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
Chris@69 6500 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@69 6501 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
Chris@69 6502 case $with_aix_soname,$aix_use_runtimelinking in
Chris@69 6503 aix,*) ;; # no import file
Chris@69 6504 svr4,* | *,yes) # use import file
Chris@69 6505 # The Import File defines what to hardcode.
Chris@69 6506 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@69 6507 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@69 6508 ;;
Chris@69 6509 esac
Chris@69 6510
Chris@69 6511 if test yes = "$GXX"; then
Chris@69 6512 case $host_os in aix4.[[012]]|aix4.[[012]].*)
Chris@69 6513 # We only want to do this on AIX 4.2 and lower, the check
Chris@69 6514 # below for broken collect2 doesn't work under 4.3+
Chris@69 6515 collect2name=`$CC -print-prog-name=collect2`
Chris@69 6516 if test -f "$collect2name" &&
Chris@69 6517 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
Chris@69 6518 then
Chris@69 6519 # We have reworked collect2
Chris@69 6520 :
Chris@69 6521 else
Chris@69 6522 # We have old collect2
Chris@69 6523 _LT_TAGVAR(hardcode_direct, $1)=unsupported
Chris@69 6524 # It fails to find uninstalled libraries when the uninstalled
Chris@69 6525 # path is not listed in the libpath. Setting hardcode_minus_L
Chris@69 6526 # to unsupported forces relinking
Chris@69 6527 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@69 6528 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@69 6529 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@69 6530 fi
Chris@69 6531 esac
Chris@69 6532 shared_flag='-shared'
Chris@69 6533 if test yes = "$aix_use_runtimelinking"; then
Chris@69 6534 shared_flag=$shared_flag' $wl-G'
Chris@69 6535 fi
Chris@69 6536 # Need to ensure runtime linking is disabled for the traditional
Chris@69 6537 # shared library, or the linker may eventually find shared libraries
Chris@69 6538 # /with/ Import File - we do not want to mix them.
Chris@69 6539 shared_flag_aix='-shared'
Chris@69 6540 shared_flag_svr4='-shared $wl-G'
Chris@69 6541 else
Chris@69 6542 # not using gcc
Chris@69 6543 if test ia64 = "$host_cpu"; then
Chris@69 6544 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
Chris@69 6545 # chokes on -Wl,-G. The following line is correct:
Chris@69 6546 shared_flag='-G'
Chris@69 6547 else
Chris@69 6548 if test yes = "$aix_use_runtimelinking"; then
Chris@69 6549 shared_flag='$wl-G'
Chris@69 6550 else
Chris@69 6551 shared_flag='$wl-bM:SRE'
Chris@69 6552 fi
Chris@69 6553 shared_flag_aix='$wl-bM:SRE'
Chris@69 6554 shared_flag_svr4='$wl-G'
Chris@69 6555 fi
Chris@69 6556 fi
Chris@69 6557
Chris@69 6558 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
Chris@69 6559 # It seems that -bexpall does not export symbols beginning with
Chris@69 6560 # underscore (_), so it is better to generate a list of symbols to
Chris@69 6561 # export.
Chris@69 6562 _LT_TAGVAR(always_export_symbols, $1)=yes
Chris@69 6563 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
Chris@69 6564 # Warning - without using the other runtime loading flags (-brtl),
Chris@69 6565 # -berok will link without error, but may produce a broken library.
Chris@69 6566 # The "-G" linker flag allows undefined symbols.
Chris@69 6567 _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
Chris@69 6568 # Determine the default libpath from the value encoded in an empty
Chris@69 6569 # executable.
Chris@69 6570 _LT_SYS_MODULE_PATH_AIX([$1])
Chris@69 6571 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
Chris@69 6572
Chris@69 6573 _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@69 6574 else
Chris@69 6575 if test ia64 = "$host_cpu"; then
Chris@69 6576 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
Chris@69 6577 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
Chris@69 6578 _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@69 6579 else
Chris@69 6580 # Determine the default libpath from the value encoded in an
Chris@69 6581 # empty executable.
Chris@69 6582 _LT_SYS_MODULE_PATH_AIX([$1])
Chris@69 6583 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
Chris@69 6584 # Warning - without using the other run time loading flags,
Chris@69 6585 # -berok will link without error, but may produce a broken library.
Chris@69 6586 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
Chris@69 6587 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
Chris@69 6588 if test yes = "$with_gnu_ld"; then
Chris@69 6589 # We only use this code for GNU lds that support --whole-archive.
Chris@69 6590 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
Chris@69 6591 else
Chris@69 6592 # Exported symbols can be pulled into shared objects from archives
Chris@69 6593 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
Chris@69 6594 fi
Chris@69 6595 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
Chris@69 6596 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
Chris@69 6597 # -brtl affects multiple linker settings, -berok does not and is overridden later
Chris@69 6598 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
Chris@69 6599 if test svr4 != "$with_aix_soname"; then
Chris@69 6600 # This is similar to how AIX traditionally builds its shared
Chris@69 6601 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
Chris@69 6602 _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@69 6603 fi
Chris@69 6604 if test aix != "$with_aix_soname"; then
Chris@69 6605 _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@69 6606 else
Chris@69 6607 # used by -dlpreopen to get the symbols
Chris@69 6608 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
Chris@69 6609 fi
Chris@69 6610 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
Chris@69 6611 fi
Chris@69 6612 fi
Chris@69 6613 ;;
Chris@69 6614
Chris@69 6615 beos*)
Chris@69 6616 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
Chris@69 6617 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@69 6618 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
Chris@69 6619 # support --undefined. This deserves some investigation. FIXME
Chris@69 6620 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@69 6621 else
Chris@69 6622 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 6623 fi
Chris@69 6624 ;;
Chris@69 6625
Chris@69 6626 chorus*)
Chris@69 6627 case $cc_basename in
Chris@69 6628 *)
Chris@69 6629 # FIXME: insert proper C++ library support
Chris@69 6630 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 6631 ;;
Chris@69 6632 esac
Chris@69 6633 ;;
Chris@69 6634
Chris@69 6635 cygwin* | mingw* | pw32* | cegcc*)
Chris@69 6636 case $GXX,$cc_basename in
Chris@69 6637 ,cl* | no,cl*)
Chris@69 6638 # Native MSVC
Chris@69 6639 # hardcode_libdir_flag_spec is actually meaningless, as there is
Chris@69 6640 # no search path for DLLs.
Chris@69 6641 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
Chris@69 6642 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@69 6643 _LT_TAGVAR(always_export_symbols, $1)=yes
Chris@69 6644 _LT_TAGVAR(file_list_spec, $1)='@'
Chris@69 6645 # Tell ltmain to make .lib files, not .a files.
Chris@69 6646 libext=lib
Chris@69 6647 # Tell ltmain to make .dll files, not .so files.
Chris@69 6648 shrext_cmds=.dll
Chris@69 6649 # FIXME: Setting linknames here is a bad hack.
Chris@69 6650 _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@69 6651 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
Chris@69 6652 cp "$export_symbols" "$output_objdir/$soname.def";
Chris@69 6653 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
Chris@69 6654 else
Chris@69 6655 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
Chris@69 6656 fi~
Chris@69 6657 $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@69 6658 linknames='
Chris@69 6659 # The linker will not automatically build a static lib if we build a DLL.
Chris@69 6660 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
Chris@69 6661 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@69 6662 # Don't use ranlib
Chris@69 6663 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
Chris@69 6664 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
Chris@69 6665 lt_tool_outputfile="@TOOL_OUTPUT@"~
Chris@69 6666 case $lt_outputfile in
Chris@69 6667 *.exe|*.EXE) ;;
Chris@69 6668 *)
Chris@69 6669 lt_outputfile=$lt_outputfile.exe
Chris@69 6670 lt_tool_outputfile=$lt_tool_outputfile.exe
Chris@69 6671 ;;
Chris@69 6672 esac~
Chris@69 6673 func_to_tool_file "$lt_outputfile"~
Chris@69 6674 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
Chris@69 6675 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
Chris@69 6676 $RM "$lt_outputfile.manifest";
Chris@69 6677 fi'
Chris@69 6678 ;;
Chris@69 6679 *)
Chris@69 6680 # g++
Chris@69 6681 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
Chris@69 6682 # as there is no search path for DLLs.
Chris@69 6683 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@69 6684 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
Chris@69 6685 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@69 6686 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@69 6687 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@69 6688
Chris@69 6689 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
Chris@69 6690 _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@69 6691 # If the export-symbols file already is a .def file, use it as
Chris@69 6692 # is; otherwise, prepend EXPORTS...
Chris@69 6693 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
Chris@69 6694 cp $export_symbols $output_objdir/$soname.def;
Chris@69 6695 else
Chris@69 6696 echo EXPORTS > $output_objdir/$soname.def;
Chris@69 6697 cat $export_symbols >> $output_objdir/$soname.def;
Chris@69 6698 fi~
Chris@69 6699 $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@69 6700 else
Chris@69 6701 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 6702 fi
Chris@69 6703 ;;
Chris@69 6704 esac
Chris@69 6705 ;;
Chris@69 6706 darwin* | rhapsody*)
Chris@69 6707 _LT_DARWIN_LINKER_FEATURES($1)
Chris@69 6708 ;;
Chris@69 6709
Chris@69 6710 os2*)
Chris@69 6711 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@69 6712 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@69 6713 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@69 6714 shrext_cmds=.dll
Chris@69 6715 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
Chris@69 6716 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
Chris@69 6717 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
Chris@69 6718 $ECHO EXPORTS >> $output_objdir/$libname.def~
Chris@69 6719 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
Chris@69 6720 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
Chris@69 6721 emximp -o $lib $output_objdir/$libname.def'
Chris@69 6722 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
Chris@69 6723 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
Chris@69 6724 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
Chris@69 6725 $ECHO EXPORTS >> $output_objdir/$libname.def~
Chris@69 6726 prefix_cmds="$SED"~
Chris@69 6727 if test EXPORTS = "`$SED 1q $export_symbols`"; then
Chris@69 6728 prefix_cmds="$prefix_cmds -e 1d";
Chris@69 6729 fi~
Chris@69 6730 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
Chris@69 6731 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
Chris@69 6732 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
Chris@69 6733 emximp -o $lib $output_objdir/$libname.def'
Chris@69 6734 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
Chris@69 6735 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@69 6736 ;;
Chris@69 6737
Chris@69 6738 dgux*)
Chris@69 6739 case $cc_basename in
Chris@69 6740 ec++*)
Chris@69 6741 # FIXME: insert proper C++ library support
Chris@69 6742 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 6743 ;;
Chris@69 6744 ghcx*)
Chris@69 6745 # Green Hills C++ Compiler
Chris@69 6746 # FIXME: insert proper C++ library support
Chris@69 6747 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 6748 ;;
Chris@69 6749 *)
Chris@69 6750 # FIXME: insert proper C++ library support
Chris@69 6751 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 6752 ;;
Chris@69 6753 esac
Chris@69 6754 ;;
Chris@69 6755
Chris@69 6756 freebsd2.*)
Chris@69 6757 # C++ shared libraries reported to be fairly broken before
Chris@69 6758 # switch to ELF
Chris@69 6759 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 6760 ;;
Chris@69 6761
Chris@69 6762 freebsd-elf*)
Chris@69 6763 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@69 6764 ;;
Chris@69 6765
Chris@69 6766 freebsd* | dragonfly*)
Chris@69 6767 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
Chris@69 6768 # conventions
Chris@69 6769 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@69 6770 ;;
Chris@69 6771
Chris@69 6772 haiku*)
Chris@69 6773 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@69 6774 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@69 6775 ;;
Chris@69 6776
Chris@69 6777 hpux9*)
Chris@69 6778 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
Chris@69 6779 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@69 6780 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@69 6781 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@69 6782 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
Chris@69 6783 # but as the default
Chris@69 6784 # location of the library.
Chris@69 6785
Chris@69 6786 case $cc_basename in
Chris@69 6787 CC*)
Chris@69 6788 # FIXME: insert proper C++ library support
Chris@69 6789 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 6790 ;;
Chris@69 6791 aCC*)
Chris@69 6792 _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@69 6793 # Commands to make compiler produce verbose output that lists
Chris@69 6794 # what "hidden" libraries, object files and flags are used when
Chris@69 6795 # linking a shared library.
Chris@69 6796 #
Chris@69 6797 # There doesn't appear to be a way to prevent this compiler from
Chris@69 6798 # explicitly linking system object files so we need to strip them
Chris@69 6799 # from the output so that they don't get included in the library
Chris@69 6800 # dependencies.
Chris@69 6801 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@69 6802 ;;
Chris@69 6803 *)
Chris@69 6804 if test yes = "$GXX"; then
Chris@69 6805 _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@69 6806 else
Chris@69 6807 # FIXME: insert proper C++ library support
Chris@69 6808 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 6809 fi
Chris@69 6810 ;;
Chris@69 6811 esac
Chris@69 6812 ;;
Chris@69 6813
Chris@69 6814 hpux10*|hpux11*)
Chris@69 6815 if test no = "$with_gnu_ld"; then
Chris@69 6816 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
Chris@69 6817 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@69 6818
Chris@69 6819 case $host_cpu in
Chris@69 6820 hppa*64*|ia64*)
Chris@69 6821 ;;
Chris@69 6822 *)
Chris@69 6823 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@69 6824 ;;
Chris@69 6825 esac
Chris@69 6826 fi
Chris@69 6827 case $host_cpu in
Chris@69 6828 hppa*64*|ia64*)
Chris@69 6829 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@69 6830 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@69 6831 ;;
Chris@69 6832 *)
Chris@69 6833 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@69 6834 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@69 6835 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
Chris@69 6836 # but as the default
Chris@69 6837 # location of the library.
Chris@69 6838 ;;
Chris@69 6839 esac
Chris@69 6840
Chris@69 6841 case $cc_basename in
Chris@69 6842 CC*)
Chris@69 6843 # FIXME: insert proper C++ library support
Chris@69 6844 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 6845 ;;
Chris@69 6846 aCC*)
Chris@69 6847 case $host_cpu in
Chris@69 6848 hppa*64*)
Chris@69 6849 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@69 6850 ;;
Chris@69 6851 ia64*)
Chris@69 6852 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@69 6853 ;;
Chris@69 6854 *)
Chris@69 6855 _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@69 6856 ;;
Chris@69 6857 esac
Chris@69 6858 # Commands to make compiler produce verbose output that lists
Chris@69 6859 # what "hidden" libraries, object files and flags are used when
Chris@69 6860 # linking a shared library.
Chris@69 6861 #
Chris@69 6862 # There doesn't appear to be a way to prevent this compiler from
Chris@69 6863 # explicitly linking system object files so we need to strip them
Chris@69 6864 # from the output so that they don't get included in the library
Chris@69 6865 # dependencies.
Chris@69 6866 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@69 6867 ;;
Chris@69 6868 *)
Chris@69 6869 if test yes = "$GXX"; then
Chris@69 6870 if test no = "$with_gnu_ld"; then
Chris@69 6871 case $host_cpu in
Chris@69 6872 hppa*64*)
Chris@69 6873 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@69 6874 ;;
Chris@69 6875 ia64*)
Chris@69 6876 _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@69 6877 ;;
Chris@69 6878 *)
Chris@69 6879 _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@69 6880 ;;
Chris@69 6881 esac
Chris@69 6882 fi
Chris@69 6883 else
Chris@69 6884 # FIXME: insert proper C++ library support
Chris@69 6885 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 6886 fi
Chris@69 6887 ;;
Chris@69 6888 esac
Chris@69 6889 ;;
Chris@69 6890
Chris@69 6891 interix[[3-9]]*)
Chris@69 6892 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@69 6893 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@69 6894 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@69 6895 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@69 6896 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
Chris@69 6897 # Instead, shared libraries are loaded at an image base (0x10000000 by
Chris@69 6898 # default) and relocated if they conflict, which is a slow very memory
Chris@69 6899 # consuming and fragmenting process. To avoid this, we pick a random,
Chris@69 6900 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
Chris@69 6901 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
Chris@69 6902 _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@69 6903 _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@69 6904 ;;
Chris@69 6905 irix5* | irix6*)
Chris@69 6906 case $cc_basename in
Chris@69 6907 CC*)
Chris@69 6908 # SGI C++
Chris@69 6909 _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@69 6910
Chris@69 6911 # Archives containing C++ object files must be created using
Chris@69 6912 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
Chris@69 6913 # necessary to make sure instantiated templates are included
Chris@69 6914 # in the archive.
Chris@69 6915 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
Chris@69 6916 ;;
Chris@69 6917 *)
Chris@69 6918 if test yes = "$GXX"; then
Chris@69 6919 if test no = "$with_gnu_ld"; then
Chris@69 6920 _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@69 6921 else
Chris@69 6922 _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@69 6923 fi
Chris@69 6924 fi
Chris@69 6925 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@69 6926 ;;
Chris@69 6927 esac
Chris@69 6928 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@69 6929 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@69 6930 _LT_TAGVAR(inherit_rpath, $1)=yes
Chris@69 6931 ;;
Chris@69 6932
Chris@69 6933 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
Chris@69 6934 case $cc_basename in
Chris@69 6935 KCC*)
Chris@69 6936 # Kuck and Associates, Inc. (KAI) C++ Compiler
Chris@69 6937
Chris@69 6938 # KCC will only create a shared library if the output file
Chris@69 6939 # ends with ".so" (or ".sl" for HP-UX), so rename the library
Chris@69 6940 # to its proper name (with version) after linking.
Chris@69 6941 _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@69 6942 _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@69 6943 # Commands to make compiler produce verbose output that lists
Chris@69 6944 # what "hidden" libraries, object files and flags are used when
Chris@69 6945 # linking a shared library.
Chris@69 6946 #
Chris@69 6947 # There doesn't appear to be a way to prevent this compiler from
Chris@69 6948 # explicitly linking system object files so we need to strip them
Chris@69 6949 # from the output so that they don't get included in the library
Chris@69 6950 # dependencies.
Chris@69 6951 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@69 6952
Chris@69 6953 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@69 6954 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
Chris@69 6955
Chris@69 6956 # Archives containing C++ object files must be created using
Chris@69 6957 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
Chris@69 6958 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
Chris@69 6959 ;;
Chris@69 6960 icpc* | ecpc* )
Chris@69 6961 # Intel C++
Chris@69 6962 with_gnu_ld=yes
Chris@69 6963 # version 8.0 and above of icpc choke on multiply defined symbols
Chris@69 6964 # if we add $predep_objects and $postdep_objects, however 7.1 and
Chris@69 6965 # earlier do not add the objects themselves.
Chris@69 6966 case `$CC -V 2>&1` in
Chris@69 6967 *"Version 7."*)
Chris@69 6968 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@69 6969 _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@69 6970 ;;
Chris@69 6971 *) # Version 8.0 or newer
Chris@69 6972 tmp_idyn=
Chris@69 6973 case $host_cpu in
Chris@69 6974 ia64*) tmp_idyn=' -i_dynamic';;
Chris@69 6975 esac
Chris@69 6976 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@69 6977 _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@69 6978 ;;
Chris@69 6979 esac
Chris@69 6980 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@69 6981 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@69 6982 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
Chris@69 6983 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
Chris@69 6984 ;;
Chris@69 6985 pgCC* | pgcpp*)
Chris@69 6986 # Portland Group C++ compiler
Chris@69 6987 case `$CC -V` in
Chris@69 6988 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
Chris@69 6989 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
Chris@69 6990 rm -rf $tpldir~
Chris@69 6991 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
Chris@69 6992 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
Chris@69 6993 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
Chris@69 6994 rm -rf $tpldir~
Chris@69 6995 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
Chris@69 6996 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
Chris@69 6997 $RANLIB $oldlib'
Chris@69 6998 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
Chris@69 6999 rm -rf $tpldir~
Chris@69 7000 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
Chris@69 7001 $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@69 7002 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
Chris@69 7003 rm -rf $tpldir~
Chris@69 7004 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
Chris@69 7005 $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@69 7006 ;;
Chris@69 7007 *) # Version 6 and above use weak symbols
Chris@69 7008 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@69 7009 _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@69 7010 ;;
Chris@69 7011 esac
Chris@69 7012
Chris@69 7013 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
Chris@69 7014 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
Chris@69 7015 _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@69 7016 ;;
Chris@69 7017 cxx*)
Chris@69 7018 # Compaq C++
Chris@69 7019 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@69 7020 _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@69 7021
Chris@69 7022 runpath_var=LD_RUN_PATH
Chris@69 7023 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
Chris@69 7024 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@69 7025
Chris@69 7026 # Commands to make compiler produce verbose output that lists
Chris@69 7027 # what "hidden" libraries, object files and flags are used when
Chris@69 7028 # linking a shared library.
Chris@69 7029 #
Chris@69 7030 # There doesn't appear to be a way to prevent this compiler from
Chris@69 7031 # explicitly linking system object files so we need to strip them
Chris@69 7032 # from the output so that they don't get included in the library
Chris@69 7033 # dependencies.
Chris@69 7034 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@69 7035 ;;
Chris@69 7036 xl* | mpixl* | bgxl*)
Chris@69 7037 # IBM XL 8.0 on PPC, with GNU ld
Chris@69 7038 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@69 7039 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
Chris@69 7040 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@69 7041 if test yes = "$supports_anon_versioning"; then
Chris@69 7042 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
Chris@69 7043 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
Chris@69 7044 echo "local: *; };" >> $output_objdir/$libname.ver~
Chris@69 7045 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
Chris@69 7046 fi
Chris@69 7047 ;;
Chris@69 7048 *)
Chris@69 7049 case `$CC -V 2>&1 | sed 5q` in
Chris@69 7050 *Sun\ C*)
Chris@69 7051 # Sun C++ 5.9
Chris@69 7052 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
Chris@69 7053 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@69 7054 _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@69 7055 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@69 7056 _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@69 7057 _LT_TAGVAR(compiler_needs_object, $1)=yes
Chris@69 7058
Chris@69 7059 # Not sure whether something based on
Chris@69 7060 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
Chris@69 7061 # would be better.
Chris@69 7062 output_verbose_link_cmd='func_echo_all'
Chris@69 7063
Chris@69 7064 # Archives containing C++ object files must be created using
Chris@69 7065 # "CC -xar", where "CC" is the Sun C++ compiler. This is
Chris@69 7066 # necessary to make sure instantiated templates are included
Chris@69 7067 # in the archive.
Chris@69 7068 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
Chris@69 7069 ;;
Chris@69 7070 esac
Chris@69 7071 ;;
Chris@69 7072 esac
Chris@69 7073 ;;
Chris@69 7074
Chris@69 7075 lynxos*)
Chris@69 7076 # FIXME: insert proper C++ library support
Chris@69 7077 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 7078 ;;
Chris@69 7079
Chris@69 7080 m88k*)
Chris@69 7081 # FIXME: insert proper C++ library support
Chris@69 7082 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 7083 ;;
Chris@69 7084
Chris@69 7085 mvs*)
Chris@69 7086 case $cc_basename in
Chris@69 7087 cxx*)
Chris@69 7088 # FIXME: insert proper C++ library support
Chris@69 7089 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 7090 ;;
Chris@69 7091 *)
Chris@69 7092 # FIXME: insert proper C++ library support
Chris@69 7093 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 7094 ;;
Chris@69 7095 esac
Chris@69 7096 ;;
Chris@69 7097
Chris@69 7098 netbsd*)
Chris@69 7099 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
Chris@69 7100 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
Chris@69 7101 wlarc=
Chris@69 7102 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@69 7103 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@69 7104 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@69 7105 fi
Chris@69 7106 # Workaround some broken pre-1.5 toolchains
Chris@69 7107 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
Chris@69 7108 ;;
Chris@69 7109
Chris@69 7110 *nto* | *qnx*)
Chris@69 7111 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@69 7112 ;;
Chris@69 7113
Chris@69 7114 openbsd* | bitrig*)
Chris@69 7115 if test -f /usr/libexec/ld.so; then
Chris@69 7116 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@69 7117 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@69 7118 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@69 7119 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
Chris@69 7120 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@69 7121 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
Chris@69 7122 _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@69 7123 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@69 7124 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
Chris@69 7125 fi
Chris@69 7126 output_verbose_link_cmd=func_echo_all
Chris@69 7127 else
Chris@69 7128 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 7129 fi
Chris@69 7130 ;;
Chris@69 7131
Chris@69 7132 osf3* | osf4* | osf5*)
Chris@69 7133 case $cc_basename in
Chris@69 7134 KCC*)
Chris@69 7135 # Kuck and Associates, Inc. (KAI) C++ Compiler
Chris@69 7136
Chris@69 7137 # KCC will only create a shared library if the output file
Chris@69 7138 # ends with ".so" (or ".sl" for HP-UX), so rename the library
Chris@69 7139 # to its proper name (with version) after linking.
Chris@69 7140 _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@69 7141
Chris@69 7142 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@69 7143 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@69 7144
Chris@69 7145 # Archives containing C++ object files must be created using
Chris@69 7146 # the KAI C++ compiler.
Chris@69 7147 case $host in
Chris@69 7148 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
Chris@69 7149 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
Chris@69 7150 esac
Chris@69 7151 ;;
Chris@69 7152 RCC*)
Chris@69 7153 # Rational C++ 2.4.1
Chris@69 7154 # FIXME: insert proper C++ library support
Chris@69 7155 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 7156 ;;
Chris@69 7157 cxx*)
Chris@69 7158 case $host in
Chris@69 7159 osf3*)
Chris@69 7160 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
Chris@69 7161 _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@69 7162 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@69 7163 ;;
Chris@69 7164 *)
Chris@69 7165 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
Chris@69 7166 _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@69 7167 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
Chris@69 7168 echo "-hidden">> $lib.exp~
Chris@69 7169 $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@69 7170 $RM $lib.exp'
Chris@69 7171 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
Chris@69 7172 ;;
Chris@69 7173 esac
Chris@69 7174
Chris@69 7175 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@69 7176
Chris@69 7177 # Commands to make compiler produce verbose output that lists
Chris@69 7178 # what "hidden" libraries, object files and flags are used when
Chris@69 7179 # linking a shared library.
Chris@69 7180 #
Chris@69 7181 # There doesn't appear to be a way to prevent this compiler from
Chris@69 7182 # explicitly linking system object files so we need to strip them
Chris@69 7183 # from the output so that they don't get included in the library
Chris@69 7184 # dependencies.
Chris@69 7185 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@69 7186 ;;
Chris@69 7187 *)
Chris@69 7188 if test yes,no = "$GXX,$with_gnu_ld"; then
Chris@69 7189 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
Chris@69 7190 case $host in
Chris@69 7191 osf3*)
Chris@69 7192 _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@69 7193 ;;
Chris@69 7194 *)
Chris@69 7195 _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@69 7196 ;;
Chris@69 7197 esac
Chris@69 7198
Chris@69 7199 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@69 7200 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@69 7201
Chris@69 7202 # Commands to make compiler produce verbose output that lists
Chris@69 7203 # what "hidden" libraries, object files and flags are used when
Chris@69 7204 # linking a shared library.
Chris@69 7205 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
Chris@69 7206
Chris@69 7207 else
Chris@69 7208 # FIXME: insert proper C++ library support
Chris@69 7209 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 7210 fi
Chris@69 7211 ;;
Chris@69 7212 esac
Chris@69 7213 ;;
Chris@69 7214
Chris@69 7215 psos*)
Chris@69 7216 # FIXME: insert proper C++ library support
Chris@69 7217 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 7218 ;;
Chris@69 7219
Chris@69 7220 sunos4*)
Chris@69 7221 case $cc_basename in
Chris@69 7222 CC*)
Chris@69 7223 # Sun C++ 4.x
Chris@69 7224 # FIXME: insert proper C++ library support
Chris@69 7225 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 7226 ;;
Chris@69 7227 lcc*)
Chris@69 7228 # Lucid
Chris@69 7229 # FIXME: insert proper C++ library support
Chris@69 7230 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 7231 ;;
Chris@69 7232 *)
Chris@69 7233 # FIXME: insert proper C++ library support
Chris@69 7234 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 7235 ;;
Chris@69 7236 esac
Chris@69 7237 ;;
Chris@69 7238
Chris@69 7239 solaris*)
Chris@69 7240 case $cc_basename in
Chris@69 7241 CC* | sunCC*)
Chris@69 7242 # Sun C++ 4.2, 5.x and Centerline C++
Chris@69 7243 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
Chris@69 7244 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
Chris@69 7245 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@69 7246 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@69 7247 $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@69 7248
Chris@69 7249 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@69 7250 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@69 7251 case $host_os in
Chris@69 7252 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
Chris@69 7253 *)
Chris@69 7254 # The compiler driver will combine and reorder linker options,
Chris@69 7255 # but understands '-z linker_flag'.
Chris@69 7256 # Supported since Solaris 2.6 (maybe 2.5.1?)
Chris@69 7257 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
Chris@69 7258 ;;
Chris@69 7259 esac
Chris@69 7260 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@69 7261
Chris@69 7262 output_verbose_link_cmd='func_echo_all'
Chris@69 7263
Chris@69 7264 # Archives containing C++ object files must be created using
Chris@69 7265 # "CC -xar", where "CC" is the Sun C++ compiler. This is
Chris@69 7266 # necessary to make sure instantiated templates are included
Chris@69 7267 # in the archive.
Chris@69 7268 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
Chris@69 7269 ;;
Chris@69 7270 gcx*)
Chris@69 7271 # Green Hills C++ Compiler
Chris@69 7272 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
Chris@69 7273
Chris@69 7274 # The C++ compiler must be used to create the archive.
Chris@69 7275 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
Chris@69 7276 ;;
Chris@69 7277 *)
Chris@69 7278 # GNU C++ compiler with Solaris linker
Chris@69 7279 if test yes,no = "$GXX,$with_gnu_ld"; then
Chris@69 7280 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
Chris@69 7281 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
Chris@69 7282 _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@69 7283 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@69 7284 $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@69 7285
Chris@69 7286 # Commands to make compiler produce verbose output that lists
Chris@69 7287 # what "hidden" libraries, object files and flags are used when
Chris@69 7288 # linking a shared library.
Chris@69 7289 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
Chris@69 7290 else
Chris@69 7291 # g++ 2.7 appears to require '-G' NOT '-shared' on this
Chris@69 7292 # platform.
Chris@69 7293 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
Chris@69 7294 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@69 7295 $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@69 7296
Chris@69 7297 # Commands to make compiler produce verbose output that lists
Chris@69 7298 # what "hidden" libraries, object files and flags are used when
Chris@69 7299 # linking a shared library.
Chris@69 7300 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
Chris@69 7301 fi
Chris@69 7302
Chris@69 7303 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
Chris@69 7304 case $host_os in
Chris@69 7305 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
Chris@69 7306 *)
Chris@69 7307 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
Chris@69 7308 ;;
Chris@69 7309 esac
Chris@69 7310 fi
Chris@69 7311 ;;
Chris@69 7312 esac
Chris@69 7313 ;;
Chris@69 7314
Chris@69 7315 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
Chris@69 7316 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
Chris@69 7317 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@69 7318 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@69 7319 runpath_var='LD_RUN_PATH'
Chris@69 7320
Chris@69 7321 case $cc_basename in
Chris@69 7322 CC*)
Chris@69 7323 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@69 7324 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@69 7325 ;;
Chris@69 7326 *)
Chris@69 7327 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@69 7328 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@69 7329 ;;
Chris@69 7330 esac
Chris@69 7331 ;;
Chris@69 7332
Chris@69 7333 sysv5* | sco3.2v5* | sco5v6*)
Chris@69 7334 # Note: We CANNOT use -z defs as we might desire, because we do not
Chris@69 7335 # link with -lc, and that would cause any symbols used from libc to
Chris@69 7336 # always be unresolved, which means just about no library would
Chris@69 7337 # ever link correctly. If we're not using GNU ld we use -z text
Chris@69 7338 # though, which does catch some bad symbols but isn't as heavy-handed
Chris@69 7339 # as -z defs.
Chris@69 7340 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
Chris@69 7341 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
Chris@69 7342 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@69 7343 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@69 7344 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
Chris@69 7345 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
Chris@69 7346 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@69 7347 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
Chris@69 7348 runpath_var='LD_RUN_PATH'
Chris@69 7349
Chris@69 7350 case $cc_basename in
Chris@69 7351 CC*)
Chris@69 7352 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@69 7353 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@69 7354 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
Chris@69 7355 '"$_LT_TAGVAR(old_archive_cmds, $1)"
Chris@69 7356 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
Chris@69 7357 '"$_LT_TAGVAR(reload_cmds, $1)"
Chris@69 7358 ;;
Chris@69 7359 *)
Chris@69 7360 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@69 7361 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@69 7362 ;;
Chris@69 7363 esac
Chris@69 7364 ;;
Chris@69 7365
Chris@69 7366 tandem*)
Chris@69 7367 case $cc_basename in
Chris@69 7368 NCC*)
Chris@69 7369 # NonStop-UX NCC 3.20
Chris@69 7370 # FIXME: insert proper C++ library support
Chris@69 7371 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 7372 ;;
Chris@69 7373 *)
Chris@69 7374 # FIXME: insert proper C++ library support
Chris@69 7375 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 7376 ;;
Chris@69 7377 esac
Chris@69 7378 ;;
Chris@69 7379
Chris@69 7380 vxworks*)
Chris@69 7381 # FIXME: insert proper C++ library support
Chris@69 7382 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 7383 ;;
Chris@69 7384
Chris@69 7385 *)
Chris@69 7386 # FIXME: insert proper C++ library support
Chris@69 7387 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@69 7388 ;;
Chris@69 7389 esac
Chris@69 7390
Chris@69 7391 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
Chris@69 7392 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
Chris@69 7393
Chris@69 7394 _LT_TAGVAR(GCC, $1)=$GXX
Chris@69 7395 _LT_TAGVAR(LD, $1)=$LD
Chris@69 7396
Chris@69 7397 ## CAVEAT EMPTOR:
Chris@69 7398 ## There is no encapsulation within the following macros, do not change
Chris@69 7399 ## the running order or otherwise move them around unless you know exactly
Chris@69 7400 ## what you are doing...
Chris@69 7401 _LT_SYS_HIDDEN_LIBDEPS($1)
Chris@69 7402 _LT_COMPILER_PIC($1)
Chris@69 7403 _LT_COMPILER_C_O($1)
Chris@69 7404 _LT_COMPILER_FILE_LOCKS($1)
Chris@69 7405 _LT_LINKER_SHLIBS($1)
Chris@69 7406 _LT_SYS_DYNAMIC_LINKER($1)
Chris@69 7407 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@69 7408
Chris@69 7409 _LT_CONFIG($1)
Chris@69 7410 fi # test -n "$compiler"
Chris@69 7411
Chris@69 7412 CC=$lt_save_CC
Chris@69 7413 CFLAGS=$lt_save_CFLAGS
Chris@69 7414 LDCXX=$LD
Chris@69 7415 LD=$lt_save_LD
Chris@69 7416 GCC=$lt_save_GCC
Chris@69 7417 with_gnu_ld=$lt_save_with_gnu_ld
Chris@69 7418 lt_cv_path_LDCXX=$lt_cv_path_LD
Chris@69 7419 lt_cv_path_LD=$lt_save_path_LD
Chris@69 7420 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
Chris@69 7421 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
Chris@69 7422 fi # test yes != "$_lt_caught_CXX_error"
Chris@69 7423
Chris@69 7424 AC_LANG_POP
Chris@69 7425 ])# _LT_LANG_CXX_CONFIG
Chris@69 7426
Chris@69 7427
Chris@69 7428 # _LT_FUNC_STRIPNAME_CNF
Chris@69 7429 # ----------------------
Chris@69 7430 # func_stripname_cnf prefix suffix name
Chris@69 7431 # strip PREFIX and SUFFIX off of NAME.
Chris@69 7432 # PREFIX and SUFFIX must not contain globbing or regex special
Chris@69 7433 # characters, hashes, percent signs, but SUFFIX may contain a leading
Chris@69 7434 # dot (in which case that matches only a dot).
Chris@69 7435 #
Chris@69 7436 # This function is identical to the (non-XSI) version of func_stripname,
Chris@69 7437 # except this one can be used by m4 code that may be executed by configure,
Chris@69 7438 # rather than the libtool script.
Chris@69 7439 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
Chris@69 7440 AC_REQUIRE([_LT_DECL_SED])
Chris@69 7441 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
Chris@69 7442 func_stripname_cnf ()
Chris@69 7443 {
Chris@69 7444 case @S|@2 in
Chris@69 7445 .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
Chris@69 7446 *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
Chris@69 7447 esac
Chris@69 7448 } # func_stripname_cnf
Chris@69 7449 ])# _LT_FUNC_STRIPNAME_CNF
Chris@69 7450
Chris@69 7451
Chris@69 7452 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
Chris@69 7453 # ---------------------------------
Chris@69 7454 # Figure out "hidden" library dependencies from verbose
Chris@69 7455 # compiler output when linking a shared library.
Chris@69 7456 # Parse the compiler output and extract the necessary
Chris@69 7457 # objects, libraries and library flags.
Chris@69 7458 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
Chris@69 7459 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@69 7460 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
Chris@69 7461 # Dependencies to place before and after the object being linked:
Chris@69 7462 _LT_TAGVAR(predep_objects, $1)=
Chris@69 7463 _LT_TAGVAR(postdep_objects, $1)=
Chris@69 7464 _LT_TAGVAR(predeps, $1)=
Chris@69 7465 _LT_TAGVAR(postdeps, $1)=
Chris@69 7466 _LT_TAGVAR(compiler_lib_search_path, $1)=
Chris@69 7467
Chris@69 7468 dnl we can't use the lt_simple_compile_test_code here,
Chris@69 7469 dnl because it contains code intended for an executable,
Chris@69 7470 dnl not a library. It's possible we should let each
Chris@69 7471 dnl tag define a new lt_????_link_test_code variable,
Chris@69 7472 dnl but it's only used here...
Chris@69 7473 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
Chris@69 7474 int a;
Chris@69 7475 void foo (void) { a = 0; }
Chris@69 7476 _LT_EOF
Chris@69 7477 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
Chris@69 7478 class Foo
Chris@69 7479 {
Chris@69 7480 public:
Chris@69 7481 Foo (void) { a = 0; }
Chris@69 7482 private:
Chris@69 7483 int a;
Chris@69 7484 };
Chris@69 7485 _LT_EOF
Chris@69 7486 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
Chris@69 7487 subroutine foo
Chris@69 7488 implicit none
Chris@69 7489 integer*4 a
Chris@69 7490 a=0
Chris@69 7491 return
Chris@69 7492 end
Chris@69 7493 _LT_EOF
Chris@69 7494 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
Chris@69 7495 subroutine foo
Chris@69 7496 implicit none
Chris@69 7497 integer a
Chris@69 7498 a=0
Chris@69 7499 return
Chris@69 7500 end
Chris@69 7501 _LT_EOF
Chris@69 7502 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
Chris@69 7503 public class foo {
Chris@69 7504 private int a;
Chris@69 7505 public void bar (void) {
Chris@69 7506 a = 0;
Chris@69 7507 }
Chris@69 7508 };
Chris@69 7509 _LT_EOF
Chris@69 7510 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
Chris@69 7511 package foo
Chris@69 7512 func foo() {
Chris@69 7513 }
Chris@69 7514 _LT_EOF
Chris@69 7515 ])
Chris@69 7516
Chris@69 7517 _lt_libdeps_save_CFLAGS=$CFLAGS
Chris@69 7518 case "$CC $CFLAGS " in #(
Chris@69 7519 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
Chris@69 7520 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
Chris@69 7521 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
Chris@69 7522 esac
Chris@69 7523
Chris@69 7524 dnl Parse the compiler output and extract the necessary
Chris@69 7525 dnl objects, libraries and library flags.
Chris@69 7526 if AC_TRY_EVAL(ac_compile); then
Chris@69 7527 # Parse the compiler output and extract the necessary
Chris@69 7528 # objects, libraries and library flags.
Chris@69 7529
Chris@69 7530 # Sentinel used to keep track of whether or not we are before
Chris@69 7531 # the conftest object file.
Chris@69 7532 pre_test_object_deps_done=no
Chris@69 7533
Chris@69 7534 for p in `eval "$output_verbose_link_cmd"`; do
Chris@69 7535 case $prev$p in
Chris@69 7536
Chris@69 7537 -L* | -R* | -l*)
Chris@69 7538 # Some compilers place space between "-{L,R}" and the path.
Chris@69 7539 # Remove the space.
Chris@69 7540 if test x-L = "$p" ||
Chris@69 7541 test x-R = "$p"; then
Chris@69 7542 prev=$p
Chris@69 7543 continue
Chris@69 7544 fi
Chris@69 7545
Chris@69 7546 # Expand the sysroot to ease extracting the directories later.
Chris@69 7547 if test -z "$prev"; then
Chris@69 7548 case $p in
Chris@69 7549 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
Chris@69 7550 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
Chris@69 7551 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
Chris@69 7552 esac
Chris@69 7553 fi
Chris@69 7554 case $p in
Chris@69 7555 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
Chris@69 7556 esac
Chris@69 7557 if test no = "$pre_test_object_deps_done"; then
Chris@69 7558 case $prev in
Chris@69 7559 -L | -R)
Chris@69 7560 # Internal compiler library paths should come after those
Chris@69 7561 # provided the user. The postdeps already come after the
Chris@69 7562 # user supplied libs so there is no need to process them.
Chris@69 7563 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
Chris@69 7564 _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
Chris@69 7565 else
Chris@69 7566 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
Chris@69 7567 fi
Chris@69 7568 ;;
Chris@69 7569 # The "-l" case would never come before the object being
Chris@69 7570 # linked, so don't bother handling this case.
Chris@69 7571 esac
Chris@69 7572 else
Chris@69 7573 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
Chris@69 7574 _LT_TAGVAR(postdeps, $1)=$prev$p
Chris@69 7575 else
Chris@69 7576 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
Chris@69 7577 fi
Chris@69 7578 fi
Chris@69 7579 prev=
Chris@69 7580 ;;
Chris@69 7581
Chris@69 7582 *.lto.$objext) ;; # Ignore GCC LTO objects
Chris@69 7583 *.$objext)
Chris@69 7584 # This assumes that the test object file only shows up
Chris@69 7585 # once in the compiler output.
Chris@69 7586 if test "$p" = "conftest.$objext"; then
Chris@69 7587 pre_test_object_deps_done=yes
Chris@69 7588 continue
Chris@69 7589 fi
Chris@69 7590
Chris@69 7591 if test no = "$pre_test_object_deps_done"; then
Chris@69 7592 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
Chris@69 7593 _LT_TAGVAR(predep_objects, $1)=$p
Chris@69 7594 else
Chris@69 7595 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
Chris@69 7596 fi
Chris@69 7597 else
Chris@69 7598 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
Chris@69 7599 _LT_TAGVAR(postdep_objects, $1)=$p
Chris@69 7600 else
Chris@69 7601 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
Chris@69 7602 fi
Chris@69 7603 fi
Chris@69 7604 ;;
Chris@69 7605
Chris@69 7606 *) ;; # Ignore the rest.
Chris@69 7607
Chris@69 7608 esac
Chris@69 7609 done
Chris@69 7610
Chris@69 7611 # Clean up.
Chris@69 7612 rm -f a.out a.exe
Chris@69 7613 else
Chris@69 7614 echo "libtool.m4: error: problem compiling $1 test program"
Chris@69 7615 fi
Chris@69 7616
Chris@69 7617 $RM -f confest.$objext
Chris@69 7618 CFLAGS=$_lt_libdeps_save_CFLAGS
Chris@69 7619
Chris@69 7620 # PORTME: override above test on systems where it is broken
Chris@69 7621 m4_if([$1], [CXX],
Chris@69 7622 [case $host_os in
Chris@69 7623 interix[[3-9]]*)
Chris@69 7624 # Interix 3.5 installs completely hosed .la files for C++, so rather than
Chris@69 7625 # hack all around it, let's just trust "g++" to DTRT.
Chris@69 7626 _LT_TAGVAR(predep_objects,$1)=
Chris@69 7627 _LT_TAGVAR(postdep_objects,$1)=
Chris@69 7628 _LT_TAGVAR(postdeps,$1)=
Chris@69 7629 ;;
Chris@69 7630 esac
Chris@69 7631 ])
Chris@69 7632
Chris@69 7633 case " $_LT_TAGVAR(postdeps, $1) " in
Chris@69 7634 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
Chris@69 7635 esac
Chris@69 7636 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
Chris@69 7637 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
Chris@69 7638 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
Chris@69 7639 fi
Chris@69 7640 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
Chris@69 7641 [The directories searched by this compiler when creating a shared library])
Chris@69 7642 _LT_TAGDECL([], [predep_objects], [1],
Chris@69 7643 [Dependencies to place before and after the objects being linked to
Chris@69 7644 create a shared library])
Chris@69 7645 _LT_TAGDECL([], [postdep_objects], [1])
Chris@69 7646 _LT_TAGDECL([], [predeps], [1])
Chris@69 7647 _LT_TAGDECL([], [postdeps], [1])
Chris@69 7648 _LT_TAGDECL([], [compiler_lib_search_path], [1],
Chris@69 7649 [The library search path used internally by the compiler when linking
Chris@69 7650 a shared library])
Chris@69 7651 ])# _LT_SYS_HIDDEN_LIBDEPS
Chris@69 7652
Chris@69 7653
Chris@69 7654 # _LT_LANG_F77_CONFIG([TAG])
Chris@69 7655 # --------------------------
Chris@69 7656 # Ensure that the configuration variables for a Fortran 77 compiler are
Chris@69 7657 # suitably defined. These variables are subsequently used by _LT_CONFIG
Chris@69 7658 # to write the compiler configuration to 'libtool'.
Chris@69 7659 m4_defun([_LT_LANG_F77_CONFIG],
Chris@69 7660 [AC_LANG_PUSH(Fortran 77)
Chris@69 7661 if test -z "$F77" || test no = "$F77"; then
Chris@69 7662 _lt_disable_F77=yes
Chris@69 7663 fi
Chris@69 7664
Chris@69 7665 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@69 7666 _LT_TAGVAR(allow_undefined_flag, $1)=
Chris@69 7667 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@69 7668 _LT_TAGVAR(archive_expsym_cmds, $1)=
Chris@69 7669 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@69 7670 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@69 7671 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@69 7672 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@69 7673 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@69 7674 _LT_TAGVAR(hardcode_minus_L, $1)=no
Chris@69 7675 _LT_TAGVAR(hardcode_automatic, $1)=no
Chris@69 7676 _LT_TAGVAR(inherit_rpath, $1)=no
Chris@69 7677 _LT_TAGVAR(module_cmds, $1)=
Chris@69 7678 _LT_TAGVAR(module_expsym_cmds, $1)=
Chris@69 7679 _LT_TAGVAR(link_all_deplibs, $1)=unknown
Chris@69 7680 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@69 7681 _LT_TAGVAR(reload_flag, $1)=$reload_flag
Chris@69 7682 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
Chris@69 7683 _LT_TAGVAR(no_undefined_flag, $1)=
Chris@69 7684 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@69 7685 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
Chris@69 7686
Chris@69 7687 # Source file extension for f77 test sources.
Chris@69 7688 ac_ext=f
Chris@69 7689
Chris@69 7690 # Object file extension for compiled f77 test sources.
Chris@69 7691 objext=o
Chris@69 7692 _LT_TAGVAR(objext, $1)=$objext
Chris@69 7693
Chris@69 7694 # No sense in running all these tests if we already determined that
Chris@69 7695 # the F77 compiler isn't working. Some variables (like enable_shared)
Chris@69 7696 # are currently assumed to apply to all compilers on this platform,
Chris@69 7697 # and will be corrupted by setting them based on a non-working compiler.
Chris@69 7698 if test yes != "$_lt_disable_F77"; then
Chris@69 7699 # Code to be used in simple compile tests
Chris@69 7700 lt_simple_compile_test_code="\
Chris@69 7701 subroutine t
Chris@69 7702 return
Chris@69 7703 end
Chris@69 7704 "
Chris@69 7705
Chris@69 7706 # Code to be used in simple link tests
Chris@69 7707 lt_simple_link_test_code="\
Chris@69 7708 program t
Chris@69 7709 end
Chris@69 7710 "
Chris@69 7711
Chris@69 7712 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@69 7713 _LT_TAG_COMPILER
Chris@69 7714
Chris@69 7715 # save warnings/boilerplate of simple test code
Chris@69 7716 _LT_COMPILER_BOILERPLATE
Chris@69 7717 _LT_LINKER_BOILERPLATE
Chris@69 7718
Chris@69 7719 # Allow CC to be a program name with arguments.
Chris@69 7720 lt_save_CC=$CC
Chris@69 7721 lt_save_GCC=$GCC
Chris@69 7722 lt_save_CFLAGS=$CFLAGS
Chris@69 7723 CC=${F77-"f77"}
Chris@69 7724 CFLAGS=$FFLAGS
Chris@69 7725 compiler=$CC
Chris@69 7726 _LT_TAGVAR(compiler, $1)=$CC
Chris@69 7727 _LT_CC_BASENAME([$compiler])
Chris@69 7728 GCC=$G77
Chris@69 7729 if test -n "$compiler"; then
Chris@69 7730 AC_MSG_CHECKING([if libtool supports shared libraries])
Chris@69 7731 AC_MSG_RESULT([$can_build_shared])
Chris@69 7732
Chris@69 7733 AC_MSG_CHECKING([whether to build shared libraries])
Chris@69 7734 test no = "$can_build_shared" && enable_shared=no
Chris@69 7735
Chris@69 7736 # On AIX, shared libraries and static libraries use the same namespace, and
Chris@69 7737 # are all built from PIC.
Chris@69 7738 case $host_os in
Chris@69 7739 aix3*)
Chris@69 7740 test yes = "$enable_shared" && enable_static=no
Chris@69 7741 if test -n "$RANLIB"; then
Chris@69 7742 archive_cmds="$archive_cmds~\$RANLIB \$lib"
Chris@69 7743 postinstall_cmds='$RANLIB $lib'
Chris@69 7744 fi
Chris@69 7745 ;;
Chris@69 7746 aix[[4-9]]*)
Chris@69 7747 if test ia64 != "$host_cpu"; then
Chris@69 7748 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
Chris@69 7749 yes,aix,yes) ;; # shared object as lib.so file only
Chris@69 7750 yes,svr4,*) ;; # shared object as lib.so archive member only
Chris@69 7751 yes,*) enable_static=no ;; # shared object in lib.a archive as well
Chris@69 7752 esac
Chris@69 7753 fi
Chris@69 7754 ;;
Chris@69 7755 esac
Chris@69 7756 AC_MSG_RESULT([$enable_shared])
Chris@69 7757
Chris@69 7758 AC_MSG_CHECKING([whether to build static libraries])
Chris@69 7759 # Make sure either enable_shared or enable_static is yes.
Chris@69 7760 test yes = "$enable_shared" || enable_static=yes
Chris@69 7761 AC_MSG_RESULT([$enable_static])
Chris@69 7762
Chris@69 7763 _LT_TAGVAR(GCC, $1)=$G77
Chris@69 7764 _LT_TAGVAR(LD, $1)=$LD
Chris@69 7765
Chris@69 7766 ## CAVEAT EMPTOR:
Chris@69 7767 ## There is no encapsulation within the following macros, do not change
Chris@69 7768 ## the running order or otherwise move them around unless you know exactly
Chris@69 7769 ## what you are doing...
Chris@69 7770 _LT_COMPILER_PIC($1)
Chris@69 7771 _LT_COMPILER_C_O($1)
Chris@69 7772 _LT_COMPILER_FILE_LOCKS($1)
Chris@69 7773 _LT_LINKER_SHLIBS($1)
Chris@69 7774 _LT_SYS_DYNAMIC_LINKER($1)
Chris@69 7775 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@69 7776
Chris@69 7777 _LT_CONFIG($1)
Chris@69 7778 fi # test -n "$compiler"
Chris@69 7779
Chris@69 7780 GCC=$lt_save_GCC
Chris@69 7781 CC=$lt_save_CC
Chris@69 7782 CFLAGS=$lt_save_CFLAGS
Chris@69 7783 fi # test yes != "$_lt_disable_F77"
Chris@69 7784
Chris@69 7785 AC_LANG_POP
Chris@69 7786 ])# _LT_LANG_F77_CONFIG
Chris@69 7787
Chris@69 7788
Chris@69 7789 # _LT_LANG_FC_CONFIG([TAG])
Chris@69 7790 # -------------------------
Chris@69 7791 # Ensure that the configuration variables for a Fortran compiler are
Chris@69 7792 # suitably defined. These variables are subsequently used by _LT_CONFIG
Chris@69 7793 # to write the compiler configuration to 'libtool'.
Chris@69 7794 m4_defun([_LT_LANG_FC_CONFIG],
Chris@69 7795 [AC_LANG_PUSH(Fortran)
Chris@69 7796
Chris@69 7797 if test -z "$FC" || test no = "$FC"; then
Chris@69 7798 _lt_disable_FC=yes
Chris@69 7799 fi
Chris@69 7800
Chris@69 7801 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@69 7802 _LT_TAGVAR(allow_undefined_flag, $1)=
Chris@69 7803 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@69 7804 _LT_TAGVAR(archive_expsym_cmds, $1)=
Chris@69 7805 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@69 7806 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@69 7807 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@69 7808 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@69 7809 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@69 7810 _LT_TAGVAR(hardcode_minus_L, $1)=no
Chris@69 7811 _LT_TAGVAR(hardcode_automatic, $1)=no
Chris@69 7812 _LT_TAGVAR(inherit_rpath, $1)=no
Chris@69 7813 _LT_TAGVAR(module_cmds, $1)=
Chris@69 7814 _LT_TAGVAR(module_expsym_cmds, $1)=
Chris@69 7815 _LT_TAGVAR(link_all_deplibs, $1)=unknown
Chris@69 7816 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@69 7817 _LT_TAGVAR(reload_flag, $1)=$reload_flag
Chris@69 7818 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
Chris@69 7819 _LT_TAGVAR(no_undefined_flag, $1)=
Chris@69 7820 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@69 7821 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
Chris@69 7822
Chris@69 7823 # Source file extension for fc test sources.
Chris@69 7824 ac_ext=${ac_fc_srcext-f}
Chris@69 7825
Chris@69 7826 # Object file extension for compiled fc test sources.
Chris@69 7827 objext=o
Chris@69 7828 _LT_TAGVAR(objext, $1)=$objext
Chris@69 7829
Chris@69 7830 # No sense in running all these tests if we already determined that
Chris@69 7831 # the FC compiler isn't working. Some variables (like enable_shared)
Chris@69 7832 # are currently assumed to apply to all compilers on this platform,
Chris@69 7833 # and will be corrupted by setting them based on a non-working compiler.
Chris@69 7834 if test yes != "$_lt_disable_FC"; then
Chris@69 7835 # Code to be used in simple compile tests
Chris@69 7836 lt_simple_compile_test_code="\
Chris@69 7837 subroutine t
Chris@69 7838 return
Chris@69 7839 end
Chris@69 7840 "
Chris@69 7841
Chris@69 7842 # Code to be used in simple link tests
Chris@69 7843 lt_simple_link_test_code="\
Chris@69 7844 program t
Chris@69 7845 end
Chris@69 7846 "
Chris@69 7847
Chris@69 7848 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@69 7849 _LT_TAG_COMPILER
Chris@69 7850
Chris@69 7851 # save warnings/boilerplate of simple test code
Chris@69 7852 _LT_COMPILER_BOILERPLATE
Chris@69 7853 _LT_LINKER_BOILERPLATE
Chris@69 7854
Chris@69 7855 # Allow CC to be a program name with arguments.
Chris@69 7856 lt_save_CC=$CC
Chris@69 7857 lt_save_GCC=$GCC
Chris@69 7858 lt_save_CFLAGS=$CFLAGS
Chris@69 7859 CC=${FC-"f95"}
Chris@69 7860 CFLAGS=$FCFLAGS
Chris@69 7861 compiler=$CC
Chris@69 7862 GCC=$ac_cv_fc_compiler_gnu
Chris@69 7863
Chris@69 7864 _LT_TAGVAR(compiler, $1)=$CC
Chris@69 7865 _LT_CC_BASENAME([$compiler])
Chris@69 7866
Chris@69 7867 if test -n "$compiler"; then
Chris@69 7868 AC_MSG_CHECKING([if libtool supports shared libraries])
Chris@69 7869 AC_MSG_RESULT([$can_build_shared])
Chris@69 7870
Chris@69 7871 AC_MSG_CHECKING([whether to build shared libraries])
Chris@69 7872 test no = "$can_build_shared" && enable_shared=no
Chris@69 7873
Chris@69 7874 # On AIX, shared libraries and static libraries use the same namespace, and
Chris@69 7875 # are all built from PIC.
Chris@69 7876 case $host_os in
Chris@69 7877 aix3*)
Chris@69 7878 test yes = "$enable_shared" && enable_static=no
Chris@69 7879 if test -n "$RANLIB"; then
Chris@69 7880 archive_cmds="$archive_cmds~\$RANLIB \$lib"
Chris@69 7881 postinstall_cmds='$RANLIB $lib'
Chris@69 7882 fi
Chris@69 7883 ;;
Chris@69 7884 aix[[4-9]]*)
Chris@69 7885 if test ia64 != "$host_cpu"; then
Chris@69 7886 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
Chris@69 7887 yes,aix,yes) ;; # shared object as lib.so file only
Chris@69 7888 yes,svr4,*) ;; # shared object as lib.so archive member only
Chris@69 7889 yes,*) enable_static=no ;; # shared object in lib.a archive as well
Chris@69 7890 esac
Chris@69 7891 fi
Chris@69 7892 ;;
Chris@69 7893 esac
Chris@69 7894 AC_MSG_RESULT([$enable_shared])
Chris@69 7895
Chris@69 7896 AC_MSG_CHECKING([whether to build static libraries])
Chris@69 7897 # Make sure either enable_shared or enable_static is yes.
Chris@69 7898 test yes = "$enable_shared" || enable_static=yes
Chris@69 7899 AC_MSG_RESULT([$enable_static])
Chris@69 7900
Chris@69 7901 _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
Chris@69 7902 _LT_TAGVAR(LD, $1)=$LD
Chris@69 7903
Chris@69 7904 ## CAVEAT EMPTOR:
Chris@69 7905 ## There is no encapsulation within the following macros, do not change
Chris@69 7906 ## the running order or otherwise move them around unless you know exactly
Chris@69 7907 ## what you are doing...
Chris@69 7908 _LT_SYS_HIDDEN_LIBDEPS($1)
Chris@69 7909 _LT_COMPILER_PIC($1)
Chris@69 7910 _LT_COMPILER_C_O($1)
Chris@69 7911 _LT_COMPILER_FILE_LOCKS($1)
Chris@69 7912 _LT_LINKER_SHLIBS($1)
Chris@69 7913 _LT_SYS_DYNAMIC_LINKER($1)
Chris@69 7914 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@69 7915
Chris@69 7916 _LT_CONFIG($1)
Chris@69 7917 fi # test -n "$compiler"
Chris@69 7918
Chris@69 7919 GCC=$lt_save_GCC
Chris@69 7920 CC=$lt_save_CC
Chris@69 7921 CFLAGS=$lt_save_CFLAGS
Chris@69 7922 fi # test yes != "$_lt_disable_FC"
Chris@69 7923
Chris@69 7924 AC_LANG_POP
Chris@69 7925 ])# _LT_LANG_FC_CONFIG
Chris@69 7926
Chris@69 7927
Chris@69 7928 # _LT_LANG_GCJ_CONFIG([TAG])
Chris@69 7929 # --------------------------
Chris@69 7930 # Ensure that the configuration variables for the GNU Java Compiler compiler
Chris@69 7931 # are suitably defined. These variables are subsequently used by _LT_CONFIG
Chris@69 7932 # to write the compiler configuration to 'libtool'.
Chris@69 7933 m4_defun([_LT_LANG_GCJ_CONFIG],
Chris@69 7934 [AC_REQUIRE([LT_PROG_GCJ])dnl
Chris@69 7935 AC_LANG_SAVE
Chris@69 7936
Chris@69 7937 # Source file extension for Java test sources.
Chris@69 7938 ac_ext=java
Chris@69 7939
Chris@69 7940 # Object file extension for compiled Java test sources.
Chris@69 7941 objext=o
Chris@69 7942 _LT_TAGVAR(objext, $1)=$objext
Chris@69 7943
Chris@69 7944 # Code to be used in simple compile tests
Chris@69 7945 lt_simple_compile_test_code="class foo {}"
Chris@69 7946
Chris@69 7947 # Code to be used in simple link tests
Chris@69 7948 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
Chris@69 7949
Chris@69 7950 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@69 7951 _LT_TAG_COMPILER
Chris@69 7952
Chris@69 7953 # save warnings/boilerplate of simple test code
Chris@69 7954 _LT_COMPILER_BOILERPLATE
Chris@69 7955 _LT_LINKER_BOILERPLATE
Chris@69 7956
Chris@69 7957 # Allow CC to be a program name with arguments.
Chris@69 7958 lt_save_CC=$CC
Chris@69 7959 lt_save_CFLAGS=$CFLAGS
Chris@69 7960 lt_save_GCC=$GCC
Chris@69 7961 GCC=yes
Chris@69 7962 CC=${GCJ-"gcj"}
Chris@69 7963 CFLAGS=$GCJFLAGS
Chris@69 7964 compiler=$CC
Chris@69 7965 _LT_TAGVAR(compiler, $1)=$CC
Chris@69 7966 _LT_TAGVAR(LD, $1)=$LD
Chris@69 7967 _LT_CC_BASENAME([$compiler])
Chris@69 7968
Chris@69 7969 # GCJ did not exist at the time GCC didn't implicitly link libc in.
Chris@69 7970 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@69 7971
Chris@69 7972 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@69 7973 _LT_TAGVAR(reload_flag, $1)=$reload_flag
Chris@69 7974 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
Chris@69 7975
Chris@69 7976 ## CAVEAT EMPTOR:
Chris@69 7977 ## There is no encapsulation within the following macros, do not change
Chris@69 7978 ## the running order or otherwise move them around unless you know exactly
Chris@69 7979 ## what you are doing...
Chris@69 7980 if test -n "$compiler"; then
Chris@69 7981 _LT_COMPILER_NO_RTTI($1)
Chris@69 7982 _LT_COMPILER_PIC($1)
Chris@69 7983 _LT_COMPILER_C_O($1)
Chris@69 7984 _LT_COMPILER_FILE_LOCKS($1)
Chris@69 7985 _LT_LINKER_SHLIBS($1)
Chris@69 7986 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@69 7987
Chris@69 7988 _LT_CONFIG($1)
Chris@69 7989 fi
Chris@69 7990
Chris@69 7991 AC_LANG_RESTORE
Chris@69 7992
Chris@69 7993 GCC=$lt_save_GCC
Chris@69 7994 CC=$lt_save_CC
Chris@69 7995 CFLAGS=$lt_save_CFLAGS
Chris@69 7996 ])# _LT_LANG_GCJ_CONFIG
Chris@69 7997
Chris@69 7998
Chris@69 7999 # _LT_LANG_GO_CONFIG([TAG])
Chris@69 8000 # --------------------------
Chris@69 8001 # Ensure that the configuration variables for the GNU Go compiler
Chris@69 8002 # are suitably defined. These variables are subsequently used by _LT_CONFIG
Chris@69 8003 # to write the compiler configuration to 'libtool'.
Chris@69 8004 m4_defun([_LT_LANG_GO_CONFIG],
Chris@69 8005 [AC_REQUIRE([LT_PROG_GO])dnl
Chris@69 8006 AC_LANG_SAVE
Chris@69 8007
Chris@69 8008 # Source file extension for Go test sources.
Chris@69 8009 ac_ext=go
Chris@69 8010
Chris@69 8011 # Object file extension for compiled Go test sources.
Chris@69 8012 objext=o
Chris@69 8013 _LT_TAGVAR(objext, $1)=$objext
Chris@69 8014
Chris@69 8015 # Code to be used in simple compile tests
Chris@69 8016 lt_simple_compile_test_code="package main; func main() { }"
Chris@69 8017
Chris@69 8018 # Code to be used in simple link tests
Chris@69 8019 lt_simple_link_test_code='package main; func main() { }'
Chris@69 8020
Chris@69 8021 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@69 8022 _LT_TAG_COMPILER
Chris@69 8023
Chris@69 8024 # save warnings/boilerplate of simple test code
Chris@69 8025 _LT_COMPILER_BOILERPLATE
Chris@69 8026 _LT_LINKER_BOILERPLATE
Chris@69 8027
Chris@69 8028 # Allow CC to be a program name with arguments.
Chris@69 8029 lt_save_CC=$CC
Chris@69 8030 lt_save_CFLAGS=$CFLAGS
Chris@69 8031 lt_save_GCC=$GCC
Chris@69 8032 GCC=yes
Chris@69 8033 CC=${GOC-"gccgo"}
Chris@69 8034 CFLAGS=$GOFLAGS
Chris@69 8035 compiler=$CC
Chris@69 8036 _LT_TAGVAR(compiler, $1)=$CC
Chris@69 8037 _LT_TAGVAR(LD, $1)=$LD
Chris@69 8038 _LT_CC_BASENAME([$compiler])
Chris@69 8039
Chris@69 8040 # Go did not exist at the time GCC didn't implicitly link libc in.
Chris@69 8041 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@69 8042
Chris@69 8043 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@69 8044 _LT_TAGVAR(reload_flag, $1)=$reload_flag
Chris@69 8045 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
Chris@69 8046
Chris@69 8047 ## CAVEAT EMPTOR:
Chris@69 8048 ## There is no encapsulation within the following macros, do not change
Chris@69 8049 ## the running order or otherwise move them around unless you know exactly
Chris@69 8050 ## what you are doing...
Chris@69 8051 if test -n "$compiler"; then
Chris@69 8052 _LT_COMPILER_NO_RTTI($1)
Chris@69 8053 _LT_COMPILER_PIC($1)
Chris@69 8054 _LT_COMPILER_C_O($1)
Chris@69 8055 _LT_COMPILER_FILE_LOCKS($1)
Chris@69 8056 _LT_LINKER_SHLIBS($1)
Chris@69 8057 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@69 8058
Chris@69 8059 _LT_CONFIG($1)
Chris@69 8060 fi
Chris@69 8061
Chris@69 8062 AC_LANG_RESTORE
Chris@69 8063
Chris@69 8064 GCC=$lt_save_GCC
Chris@69 8065 CC=$lt_save_CC
Chris@69 8066 CFLAGS=$lt_save_CFLAGS
Chris@69 8067 ])# _LT_LANG_GO_CONFIG
Chris@69 8068
Chris@69 8069
Chris@69 8070 # _LT_LANG_RC_CONFIG([TAG])
Chris@69 8071 # -------------------------
Chris@69 8072 # Ensure that the configuration variables for the Windows resource compiler
Chris@69 8073 # are suitably defined. These variables are subsequently used by _LT_CONFIG
Chris@69 8074 # to write the compiler configuration to 'libtool'.
Chris@69 8075 m4_defun([_LT_LANG_RC_CONFIG],
Chris@69 8076 [AC_REQUIRE([LT_PROG_RC])dnl
Chris@69 8077 AC_LANG_SAVE
Chris@69 8078
Chris@69 8079 # Source file extension for RC test sources.
Chris@69 8080 ac_ext=rc
Chris@69 8081
Chris@69 8082 # Object file extension for compiled RC test sources.
Chris@69 8083 objext=o
Chris@69 8084 _LT_TAGVAR(objext, $1)=$objext
Chris@69 8085
Chris@69 8086 # Code to be used in simple compile tests
Chris@69 8087 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
Chris@69 8088
Chris@69 8089 # Code to be used in simple link tests
Chris@69 8090 lt_simple_link_test_code=$lt_simple_compile_test_code
Chris@69 8091
Chris@69 8092 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@69 8093 _LT_TAG_COMPILER
Chris@69 8094
Chris@69 8095 # save warnings/boilerplate of simple test code
Chris@69 8096 _LT_COMPILER_BOILERPLATE
Chris@69 8097 _LT_LINKER_BOILERPLATE
Chris@69 8098
Chris@69 8099 # Allow CC to be a program name with arguments.
Chris@69 8100 lt_save_CC=$CC
Chris@69 8101 lt_save_CFLAGS=$CFLAGS
Chris@69 8102 lt_save_GCC=$GCC
Chris@69 8103 GCC=
Chris@69 8104 CC=${RC-"windres"}
Chris@69 8105 CFLAGS=
Chris@69 8106 compiler=$CC
Chris@69 8107 _LT_TAGVAR(compiler, $1)=$CC
Chris@69 8108 _LT_CC_BASENAME([$compiler])
Chris@69 8109 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
Chris@69 8110
Chris@69 8111 if test -n "$compiler"; then
Chris@69 8112 :
Chris@69 8113 _LT_CONFIG($1)
Chris@69 8114 fi
Chris@69 8115
Chris@69 8116 GCC=$lt_save_GCC
Chris@69 8117 AC_LANG_RESTORE
Chris@69 8118 CC=$lt_save_CC
Chris@69 8119 CFLAGS=$lt_save_CFLAGS
Chris@69 8120 ])# _LT_LANG_RC_CONFIG
Chris@69 8121
Chris@69 8122
Chris@69 8123 # LT_PROG_GCJ
Chris@69 8124 # -----------
Chris@69 8125 AC_DEFUN([LT_PROG_GCJ],
Chris@69 8126 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
Chris@69 8127 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
Chris@69 8128 [AC_CHECK_TOOL(GCJ, gcj,)
Chris@69 8129 test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
Chris@69 8130 AC_SUBST(GCJFLAGS)])])[]dnl
Chris@69 8131 ])
Chris@69 8132
Chris@69 8133 # Old name:
Chris@69 8134 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
Chris@69 8135 dnl aclocal-1.4 backwards compatibility:
Chris@69 8136 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
Chris@69 8137
Chris@69 8138
Chris@69 8139 # LT_PROG_GO
Chris@69 8140 # ----------
Chris@69 8141 AC_DEFUN([LT_PROG_GO],
Chris@69 8142 [AC_CHECK_TOOL(GOC, gccgo,)
Chris@69 8143 ])
Chris@69 8144
Chris@69 8145
Chris@69 8146 # LT_PROG_RC
Chris@69 8147 # ----------
Chris@69 8148 AC_DEFUN([LT_PROG_RC],
Chris@69 8149 [AC_CHECK_TOOL(RC, windres,)
Chris@69 8150 ])
Chris@69 8151
Chris@69 8152 # Old name:
Chris@69 8153 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
Chris@69 8154 dnl aclocal-1.4 backwards compatibility:
Chris@69 8155 dnl AC_DEFUN([LT_AC_PROG_RC], [])
Chris@69 8156
Chris@69 8157
Chris@69 8158 # _LT_DECL_EGREP
Chris@69 8159 # --------------
Chris@69 8160 # If we don't have a new enough Autoconf to choose the best grep
Chris@69 8161 # available, choose the one first in the user's PATH.
Chris@69 8162 m4_defun([_LT_DECL_EGREP],
Chris@69 8163 [AC_REQUIRE([AC_PROG_EGREP])dnl
Chris@69 8164 AC_REQUIRE([AC_PROG_FGREP])dnl
Chris@69 8165 test -z "$GREP" && GREP=grep
Chris@69 8166 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
Chris@69 8167 _LT_DECL([], [EGREP], [1], [An ERE matcher])
Chris@69 8168 _LT_DECL([], [FGREP], [1], [A literal string matcher])
Chris@69 8169 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
Chris@69 8170 AC_SUBST([GREP])
Chris@69 8171 ])
Chris@69 8172
Chris@69 8173
Chris@69 8174 # _LT_DECL_OBJDUMP
Chris@69 8175 # --------------
Chris@69 8176 # If we don't have a new enough Autoconf to choose the best objdump
Chris@69 8177 # available, choose the one first in the user's PATH.
Chris@69 8178 m4_defun([_LT_DECL_OBJDUMP],
Chris@69 8179 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
Chris@69 8180 test -z "$OBJDUMP" && OBJDUMP=objdump
Chris@69 8181 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
Chris@69 8182 AC_SUBST([OBJDUMP])
Chris@69 8183 ])
Chris@69 8184
Chris@69 8185 # _LT_DECL_DLLTOOL
Chris@69 8186 # ----------------
Chris@69 8187 # Ensure DLLTOOL variable is set.
Chris@69 8188 m4_defun([_LT_DECL_DLLTOOL],
Chris@69 8189 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
Chris@69 8190 test -z "$DLLTOOL" && DLLTOOL=dlltool
Chris@69 8191 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
Chris@69 8192 AC_SUBST([DLLTOOL])
Chris@69 8193 ])
Chris@69 8194
Chris@69 8195 # _LT_DECL_SED
Chris@69 8196 # ------------
Chris@69 8197 # Check for a fully-functional sed program, that truncates
Chris@69 8198 # as few characters as possible. Prefer GNU sed if found.
Chris@69 8199 m4_defun([_LT_DECL_SED],
Chris@69 8200 [AC_PROG_SED
Chris@69 8201 test -z "$SED" && SED=sed
Chris@69 8202 Xsed="$SED -e 1s/^X//"
Chris@69 8203 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
Chris@69 8204 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
Chris@69 8205 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
Chris@69 8206 ])# _LT_DECL_SED
Chris@69 8207
Chris@69 8208 m4_ifndef([AC_PROG_SED], [
Chris@69 8209 ############################################################
Chris@69 8210 # NOTE: This macro has been submitted for inclusion into #
Chris@69 8211 # GNU Autoconf as AC_PROG_SED. When it is available in #
Chris@69 8212 # a released version of Autoconf we should remove this #
Chris@69 8213 # macro and use it instead. #
Chris@69 8214 ############################################################
Chris@69 8215
Chris@69 8216 m4_defun([AC_PROG_SED],
Chris@69 8217 [AC_MSG_CHECKING([for a sed that does not truncate output])
Chris@69 8218 AC_CACHE_VAL(lt_cv_path_SED,
Chris@69 8219 [# Loop through the user's path and test for sed and gsed.
Chris@69 8220 # Then use that list of sed's as ones to test for truncation.
Chris@69 8221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Chris@69 8222 for as_dir in $PATH
Chris@69 8223 do
Chris@69 8224 IFS=$as_save_IFS
Chris@69 8225 test -z "$as_dir" && as_dir=.
Chris@69 8226 for lt_ac_prog in sed gsed; do
Chris@69 8227 for ac_exec_ext in '' $ac_executable_extensions; do
Chris@69 8228 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
Chris@69 8229 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
Chris@69 8230 fi
Chris@69 8231 done
Chris@69 8232 done
Chris@69 8233 done
Chris@69 8234 IFS=$as_save_IFS
Chris@69 8235 lt_ac_max=0
Chris@69 8236 lt_ac_count=0
Chris@69 8237 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
Chris@69 8238 # along with /bin/sed that truncates output.
Chris@69 8239 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
Chris@69 8240 test ! -f "$lt_ac_sed" && continue
Chris@69 8241 cat /dev/null > conftest.in
Chris@69 8242 lt_ac_count=0
Chris@69 8243 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
Chris@69 8244 # Check for GNU sed and select it if it is found.
Chris@69 8245 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
Chris@69 8246 lt_cv_path_SED=$lt_ac_sed
Chris@69 8247 break
Chris@69 8248 fi
Chris@69 8249 while true; do
Chris@69 8250 cat conftest.in conftest.in >conftest.tmp
Chris@69 8251 mv conftest.tmp conftest.in
Chris@69 8252 cp conftest.in conftest.nl
Chris@69 8253 echo >>conftest.nl
Chris@69 8254 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
Chris@69 8255 cmp -s conftest.out conftest.nl || break
Chris@69 8256 # 10000 chars as input seems more than enough
Chris@69 8257 test 10 -lt "$lt_ac_count" && break
Chris@69 8258 lt_ac_count=`expr $lt_ac_count + 1`
Chris@69 8259 if test "$lt_ac_count" -gt "$lt_ac_max"; then
Chris@69 8260 lt_ac_max=$lt_ac_count
Chris@69 8261 lt_cv_path_SED=$lt_ac_sed
Chris@69 8262 fi
Chris@69 8263 done
Chris@69 8264 done
Chris@69 8265 ])
Chris@69 8266 SED=$lt_cv_path_SED
Chris@69 8267 AC_SUBST([SED])
Chris@69 8268 AC_MSG_RESULT([$SED])
Chris@69 8269 ])#AC_PROG_SED
Chris@69 8270 ])#m4_ifndef
Chris@69 8271
Chris@69 8272 # Old name:
Chris@69 8273 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
Chris@69 8274 dnl aclocal-1.4 backwards compatibility:
Chris@69 8275 dnl AC_DEFUN([LT_AC_PROG_SED], [])
Chris@69 8276
Chris@69 8277
Chris@69 8278 # _LT_CHECK_SHELL_FEATURES
Chris@69 8279 # ------------------------
Chris@69 8280 # Find out whether the shell is Bourne or XSI compatible,
Chris@69 8281 # or has some other useful features.
Chris@69 8282 m4_defun([_LT_CHECK_SHELL_FEATURES],
Chris@69 8283 [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
Chris@69 8284 lt_unset=unset
Chris@69 8285 else
Chris@69 8286 lt_unset=false
Chris@69 8287 fi
Chris@69 8288 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
Chris@69 8289
Chris@69 8290 # test EBCDIC or ASCII
Chris@69 8291 case `echo X|tr X '\101'` in
Chris@69 8292 A) # ASCII based system
Chris@69 8293 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
Chris@69 8294 lt_SP2NL='tr \040 \012'
Chris@69 8295 lt_NL2SP='tr \015\012 \040\040'
Chris@69 8296 ;;
Chris@69 8297 *) # EBCDIC based system
Chris@69 8298 lt_SP2NL='tr \100 \n'
Chris@69 8299 lt_NL2SP='tr \r\n \100\100'
Chris@69 8300 ;;
Chris@69 8301 esac
Chris@69 8302 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
Chris@69 8303 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
Chris@69 8304 ])# _LT_CHECK_SHELL_FEATURES
Chris@69 8305
Chris@69 8306
Chris@69 8307 # _LT_PATH_CONVERSION_FUNCTIONS
Chris@69 8308 # -----------------------------
Chris@69 8309 # Determine what file name conversion functions should be used by
Chris@69 8310 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
Chris@69 8311 # for certain cross-compile configurations and native mingw.
Chris@69 8312 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
Chris@69 8313 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@69 8314 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
Chris@69 8315 AC_MSG_CHECKING([how to convert $build file names to $host format])
Chris@69 8316 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
Chris@69 8317 [case $host in
Chris@69 8318 *-*-mingw* )
Chris@69 8319 case $build in
Chris@69 8320 *-*-mingw* ) # actually msys
Chris@69 8321 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
Chris@69 8322 ;;
Chris@69 8323 *-*-cygwin* )
Chris@69 8324 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
Chris@69 8325 ;;
Chris@69 8326 * ) # otherwise, assume *nix
Chris@69 8327 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
Chris@69 8328 ;;
Chris@69 8329 esac
Chris@69 8330 ;;
Chris@69 8331 *-*-cygwin* )
Chris@69 8332 case $build in
Chris@69 8333 *-*-mingw* ) # actually msys
Chris@69 8334 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
Chris@69 8335 ;;
Chris@69 8336 *-*-cygwin* )
Chris@69 8337 lt_cv_to_host_file_cmd=func_convert_file_noop
Chris@69 8338 ;;
Chris@69 8339 * ) # otherwise, assume *nix
Chris@69 8340 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
Chris@69 8341 ;;
Chris@69 8342 esac
Chris@69 8343 ;;
Chris@69 8344 * ) # unhandled hosts (and "normal" native builds)
Chris@69 8345 lt_cv_to_host_file_cmd=func_convert_file_noop
Chris@69 8346 ;;
Chris@69 8347 esac
Chris@69 8348 ])
Chris@69 8349 to_host_file_cmd=$lt_cv_to_host_file_cmd
Chris@69 8350 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
Chris@69 8351 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
Chris@69 8352 [0], [convert $build file names to $host format])dnl
Chris@69 8353
Chris@69 8354 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
Chris@69 8355 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
Chris@69 8356 [#assume ordinary cross tools, or native build.
Chris@69 8357 lt_cv_to_tool_file_cmd=func_convert_file_noop
Chris@69 8358 case $host in
Chris@69 8359 *-*-mingw* )
Chris@69 8360 case $build in
Chris@69 8361 *-*-mingw* ) # actually msys
Chris@69 8362 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
Chris@69 8363 ;;
Chris@69 8364 esac
Chris@69 8365 ;;
Chris@69 8366 esac
Chris@69 8367 ])
Chris@69 8368 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
Chris@69 8369 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
Chris@69 8370 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
Chris@69 8371 [0], [convert $build files to toolchain format])dnl
Chris@69 8372 ])# _LT_PATH_CONVERSION_FUNCTIONS