annotate src/libsndfile-1.0.27/M4/libtool.m4 @ 84:08ae793730bd

Add null config files
author Chris Cannam
date Mon, 02 Mar 2020 14:03:47 +0000
parents 1df64224f5ac
children
rev   line source
Chris@40 1 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
Chris@40 2 #
Chris@40 3 # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
Chris@40 4 # Written by Gordon Matzigkeit, 1996
Chris@40 5 #
Chris@40 6 # This file is free software; the Free Software Foundation gives
Chris@40 7 # unlimited permission to copy and/or distribute it, with or without
Chris@40 8 # modifications, as long as this notice is preserved.
Chris@40 9
Chris@40 10 m4_define([_LT_COPYING], [dnl
Chris@40 11 # Copyright (C) 2014 Free Software Foundation, Inc.
Chris@40 12 # This is free software; see the source for copying conditions. There is NO
Chris@40 13 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Chris@40 14
Chris@40 15 # GNU Libtool is free software; you can redistribute it and/or modify
Chris@40 16 # it under the terms of the GNU General Public License as published by
Chris@40 17 # the Free Software Foundation; either version 2 of of the License, or
Chris@40 18 # (at your option) any later version.
Chris@40 19 #
Chris@40 20 # As a special exception to the GNU General Public License, if you
Chris@40 21 # distribute this file as part of a program or library that is built
Chris@40 22 # using GNU Libtool, you may include this file under the same
Chris@40 23 # distribution terms that you use for the rest of that program.
Chris@40 24 #
Chris@40 25 # GNU Libtool is distributed in the hope that it will be useful, but
Chris@40 26 # WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@40 27 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@40 28 # GNU General Public License for more details.
Chris@40 29 #
Chris@40 30 # You should have received a copy of the GNU General Public License
Chris@40 31 # along with this program. If not, see <http://www.gnu.org/licenses/>.
Chris@40 32 ])
Chris@40 33
Chris@40 34 # serial 58 LT_INIT
Chris@40 35
Chris@40 36
Chris@40 37 # LT_PREREQ(VERSION)
Chris@40 38 # ------------------
Chris@40 39 # Complain and exit if this libtool version is less that VERSION.
Chris@40 40 m4_defun([LT_PREREQ],
Chris@40 41 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
Chris@40 42 [m4_default([$3],
Chris@40 43 [m4_fatal([Libtool version $1 or higher is required],
Chris@40 44 63)])],
Chris@40 45 [$2])])
Chris@40 46
Chris@40 47
Chris@40 48 # _LT_CHECK_BUILDDIR
Chris@40 49 # ------------------
Chris@40 50 # Complain if the absolute build directory name contains unusual characters
Chris@40 51 m4_defun([_LT_CHECK_BUILDDIR],
Chris@40 52 [case `pwd` in
Chris@40 53 *\ * | *\ *)
Chris@40 54 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
Chris@40 55 esac
Chris@40 56 ])
Chris@40 57
Chris@40 58
Chris@40 59 # LT_INIT([OPTIONS])
Chris@40 60 # ------------------
Chris@40 61 AC_DEFUN([LT_INIT],
Chris@40 62 [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
Chris@40 63 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
Chris@40 64 AC_BEFORE([$0], [LT_LANG])dnl
Chris@40 65 AC_BEFORE([$0], [LT_OUTPUT])dnl
Chris@40 66 AC_BEFORE([$0], [LTDL_INIT])dnl
Chris@40 67 m4_require([_LT_CHECK_BUILDDIR])dnl
Chris@40 68
Chris@40 69 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
Chris@40 70 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
Chris@40 71 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
Chris@40 72 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
Chris@40 73 dnl unless we require an AC_DEFUNed macro:
Chris@40 74 AC_REQUIRE([LTOPTIONS_VERSION])dnl
Chris@40 75 AC_REQUIRE([LTSUGAR_VERSION])dnl
Chris@40 76 AC_REQUIRE([LTVERSION_VERSION])dnl
Chris@40 77 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
Chris@40 78 m4_require([_LT_PROG_LTMAIN])dnl
Chris@40 79
Chris@40 80 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
Chris@40 81
Chris@40 82 dnl Parse OPTIONS
Chris@40 83 _LT_SET_OPTIONS([$0], [$1])
Chris@40 84
Chris@40 85 # This can be used to rebuild libtool when needed
Chris@40 86 LIBTOOL_DEPS=$ltmain
Chris@40 87
Chris@40 88 # Always use our own libtool.
Chris@40 89 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
Chris@40 90 AC_SUBST(LIBTOOL)dnl
Chris@40 91
Chris@40 92 _LT_SETUP
Chris@40 93
Chris@40 94 # Only expand once:
Chris@40 95 m4_define([LT_INIT])
Chris@40 96 ])# LT_INIT
Chris@40 97
Chris@40 98 # Old names:
Chris@40 99 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
Chris@40 100 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
Chris@40 101 dnl aclocal-1.4 backwards compatibility:
Chris@40 102 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
Chris@40 103 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
Chris@40 104
Chris@40 105
Chris@40 106 # _LT_PREPARE_CC_BASENAME
Chris@40 107 # -----------------------
Chris@40 108 m4_defun([_LT_PREPARE_CC_BASENAME], [
Chris@40 109 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
Chris@40 110 func_cc_basename ()
Chris@40 111 {
Chris@40 112 for cc_temp in @S|@*""; do
Chris@40 113 case $cc_temp in
Chris@40 114 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
Chris@40 115 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
Chris@40 116 \-*) ;;
Chris@40 117 *) break;;
Chris@40 118 esac
Chris@40 119 done
Chris@40 120 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
Chris@40 121 }
Chris@40 122 ])# _LT_PREPARE_CC_BASENAME
Chris@40 123
Chris@40 124
Chris@40 125 # _LT_CC_BASENAME(CC)
Chris@40 126 # -------------------
Chris@40 127 # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
Chris@40 128 # but that macro is also expanded into generated libtool script, which
Chris@40 129 # arranges for $SED and $ECHO to be set by different means.
Chris@40 130 m4_defun([_LT_CC_BASENAME],
Chris@40 131 [m4_require([_LT_PREPARE_CC_BASENAME])dnl
Chris@40 132 AC_REQUIRE([_LT_DECL_SED])dnl
Chris@40 133 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
Chris@40 134 func_cc_basename $1
Chris@40 135 cc_basename=$func_cc_basename_result
Chris@40 136 ])
Chris@40 137
Chris@40 138
Chris@40 139 # _LT_FILEUTILS_DEFAULTS
Chris@40 140 # ----------------------
Chris@40 141 # It is okay to use these file commands and assume they have been set
Chris@40 142 # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
Chris@40 143 m4_defun([_LT_FILEUTILS_DEFAULTS],
Chris@40 144 [: ${CP="cp -f"}
Chris@40 145 : ${MV="mv -f"}
Chris@40 146 : ${RM="rm -f"}
Chris@40 147 ])# _LT_FILEUTILS_DEFAULTS
Chris@40 148
Chris@40 149
Chris@40 150 # _LT_SETUP
Chris@40 151 # ---------
Chris@40 152 m4_defun([_LT_SETUP],
Chris@40 153 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@40 154 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
Chris@40 155 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
Chris@40 156 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
Chris@40 157
Chris@40 158 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
Chris@40 159 dnl
Chris@40 160 _LT_DECL([], [host_alias], [0], [The host system])dnl
Chris@40 161 _LT_DECL([], [host], [0])dnl
Chris@40 162 _LT_DECL([], [host_os], [0])dnl
Chris@40 163 dnl
Chris@40 164 _LT_DECL([], [build_alias], [0], [The build system])dnl
Chris@40 165 _LT_DECL([], [build], [0])dnl
Chris@40 166 _LT_DECL([], [build_os], [0])dnl
Chris@40 167 dnl
Chris@40 168 AC_REQUIRE([AC_PROG_CC])dnl
Chris@40 169 AC_REQUIRE([LT_PATH_LD])dnl
Chris@40 170 AC_REQUIRE([LT_PATH_NM])dnl
Chris@40 171 dnl
Chris@40 172 AC_REQUIRE([AC_PROG_LN_S])dnl
Chris@40 173 test -z "$LN_S" && LN_S="ln -s"
Chris@40 174 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
Chris@40 175 dnl
Chris@40 176 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
Chris@40 177 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
Chris@40 178 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
Chris@40 179 dnl
Chris@40 180 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@40 181 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
Chris@40 182 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
Chris@40 183 m4_require([_LT_CMD_RELOAD])dnl
Chris@40 184 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
Chris@40 185 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
Chris@40 186 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
Chris@40 187 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
Chris@40 188 m4_require([_LT_WITH_SYSROOT])dnl
Chris@40 189 m4_require([_LT_CMD_TRUNCATE])dnl
Chris@40 190
Chris@40 191 _LT_CONFIG_LIBTOOL_INIT([
Chris@40 192 # See if we are running on zsh, and set the options that allow our
Chris@40 193 # commands through without removal of \ escapes INIT.
Chris@40 194 if test -n "\${ZSH_VERSION+set}"; then
Chris@40 195 setopt NO_GLOB_SUBST
Chris@40 196 fi
Chris@40 197 ])
Chris@40 198 if test -n "${ZSH_VERSION+set}"; then
Chris@40 199 setopt NO_GLOB_SUBST
Chris@40 200 fi
Chris@40 201
Chris@40 202 _LT_CHECK_OBJDIR
Chris@40 203
Chris@40 204 m4_require([_LT_TAG_COMPILER])dnl
Chris@40 205
Chris@40 206 case $host_os in
Chris@40 207 aix3*)
Chris@40 208 # AIX sometimes has problems with the GCC collect2 program. For some
Chris@40 209 # reason, if we set the COLLECT_NAMES environment variable, the problems
Chris@40 210 # vanish in a puff of smoke.
Chris@40 211 if test set != "${COLLECT_NAMES+set}"; then
Chris@40 212 COLLECT_NAMES=
Chris@40 213 export COLLECT_NAMES
Chris@40 214 fi
Chris@40 215 ;;
Chris@40 216 esac
Chris@40 217
Chris@40 218 # Global variables:
Chris@40 219 ofile=libtool
Chris@40 220 can_build_shared=yes
Chris@40 221
Chris@40 222 # All known linkers require a '.a' archive for static linking (except MSVC,
Chris@40 223 # which needs '.lib').
Chris@40 224 libext=a
Chris@40 225
Chris@40 226 with_gnu_ld=$lt_cv_prog_gnu_ld
Chris@40 227
Chris@40 228 old_CC=$CC
Chris@40 229 old_CFLAGS=$CFLAGS
Chris@40 230
Chris@40 231 # Set sane defaults for various variables
Chris@40 232 test -z "$CC" && CC=cc
Chris@40 233 test -z "$LTCC" && LTCC=$CC
Chris@40 234 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
Chris@40 235 test -z "$LD" && LD=ld
Chris@40 236 test -z "$ac_objext" && ac_objext=o
Chris@40 237
Chris@40 238 _LT_CC_BASENAME([$compiler])
Chris@40 239
Chris@40 240 # Only perform the check for file, if the check method requires it
Chris@40 241 test -z "$MAGIC_CMD" && MAGIC_CMD=file
Chris@40 242 case $deplibs_check_method in
Chris@40 243 file_magic*)
Chris@40 244 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
Chris@40 245 _LT_PATH_MAGIC
Chris@40 246 fi
Chris@40 247 ;;
Chris@40 248 esac
Chris@40 249
Chris@40 250 # Use C for the default configuration in the libtool script
Chris@40 251 LT_SUPPORTED_TAG([CC])
Chris@40 252 _LT_LANG_C_CONFIG
Chris@40 253 _LT_LANG_DEFAULT_CONFIG
Chris@40 254 _LT_CONFIG_COMMANDS
Chris@40 255 ])# _LT_SETUP
Chris@40 256
Chris@40 257
Chris@40 258 # _LT_PREPARE_SED_QUOTE_VARS
Chris@40 259 # --------------------------
Chris@40 260 # Define a few sed substitution that help us do robust quoting.
Chris@40 261 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
Chris@40 262 [# Backslashify metacharacters that are still active within
Chris@40 263 # double-quoted strings.
Chris@40 264 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
Chris@40 265
Chris@40 266 # Same as above, but do not quote variable references.
Chris@40 267 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
Chris@40 268
Chris@40 269 # Sed substitution to delay expansion of an escaped shell variable in a
Chris@40 270 # double_quote_subst'ed string.
Chris@40 271 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
Chris@40 272
Chris@40 273 # Sed substitution to delay expansion of an escaped single quote.
Chris@40 274 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
Chris@40 275
Chris@40 276 # Sed substitution to avoid accidental globbing in evaled expressions
Chris@40 277 no_glob_subst='s/\*/\\\*/g'
Chris@40 278 ])
Chris@40 279
Chris@40 280 # _LT_PROG_LTMAIN
Chris@40 281 # ---------------
Chris@40 282 # Note that this code is called both from 'configure', and 'config.status'
Chris@40 283 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
Chris@40 284 # 'config.status' has no value for ac_aux_dir unless we are using Automake,
Chris@40 285 # so we pass a copy along to make sure it has a sensible value anyway.
Chris@40 286 m4_defun([_LT_PROG_LTMAIN],
Chris@40 287 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
Chris@40 288 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
Chris@40 289 ltmain=$ac_aux_dir/ltmain.sh
Chris@40 290 ])# _LT_PROG_LTMAIN
Chris@40 291
Chris@40 292
Chris@40 293 ## ------------------------------------- ##
Chris@40 294 ## Accumulate code for creating libtool. ##
Chris@40 295 ## ------------------------------------- ##
Chris@40 296
Chris@40 297 # So that we can recreate a full libtool script including additional
Chris@40 298 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
Chris@40 299 # in macros and then make a single call at the end using the 'libtool'
Chris@40 300 # label.
Chris@40 301
Chris@40 302
Chris@40 303 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
Chris@40 304 # ----------------------------------------
Chris@40 305 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
Chris@40 306 m4_define([_LT_CONFIG_LIBTOOL_INIT],
Chris@40 307 [m4_ifval([$1],
Chris@40 308 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
Chris@40 309 [$1
Chris@40 310 ])])])
Chris@40 311
Chris@40 312 # Initialize.
Chris@40 313 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
Chris@40 314
Chris@40 315
Chris@40 316 # _LT_CONFIG_LIBTOOL([COMMANDS])
Chris@40 317 # ------------------------------
Chris@40 318 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
Chris@40 319 m4_define([_LT_CONFIG_LIBTOOL],
Chris@40 320 [m4_ifval([$1],
Chris@40 321 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
Chris@40 322 [$1
Chris@40 323 ])])])
Chris@40 324
Chris@40 325 # Initialize.
Chris@40 326 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
Chris@40 327
Chris@40 328
Chris@40 329 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
Chris@40 330 # -----------------------------------------------------
Chris@40 331 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
Chris@40 332 [_LT_CONFIG_LIBTOOL([$1])
Chris@40 333 _LT_CONFIG_LIBTOOL_INIT([$2])
Chris@40 334 ])
Chris@40 335
Chris@40 336
Chris@40 337 # _LT_FORMAT_COMMENT([COMMENT])
Chris@40 338 # -----------------------------
Chris@40 339 # Add leading comment marks to the start of each line, and a trailing
Chris@40 340 # full-stop to the whole comment if one is not present already.
Chris@40 341 m4_define([_LT_FORMAT_COMMENT],
Chris@40 342 [m4_ifval([$1], [
Chris@40 343 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
Chris@40 344 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
Chris@40 345 )])
Chris@40 346
Chris@40 347
Chris@40 348
Chris@40 349 ## ------------------------ ##
Chris@40 350 ## FIXME: Eliminate VARNAME ##
Chris@40 351 ## ------------------------ ##
Chris@40 352
Chris@40 353
Chris@40 354 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
Chris@40 355 # -------------------------------------------------------------------
Chris@40 356 # CONFIGNAME is the name given to the value in the libtool script.
Chris@40 357 # VARNAME is the (base) name used in the configure script.
Chris@40 358 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
Chris@40 359 # VARNAME. Any other value will be used directly.
Chris@40 360 m4_define([_LT_DECL],
Chris@40 361 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
Chris@40 362 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
Chris@40 363 [m4_ifval([$1], [$1], [$2])])
Chris@40 364 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
Chris@40 365 m4_ifval([$4],
Chris@40 366 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
Chris@40 367 lt_dict_add_subkey([lt_decl_dict], [$2],
Chris@40 368 [tagged?], [m4_ifval([$5], [yes], [no])])])
Chris@40 369 ])
Chris@40 370
Chris@40 371
Chris@40 372 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
Chris@40 373 # --------------------------------------------------------
Chris@40 374 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
Chris@40 375
Chris@40 376
Chris@40 377 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
Chris@40 378 # ------------------------------------------------
Chris@40 379 m4_define([lt_decl_tag_varnames],
Chris@40 380 [_lt_decl_filter([tagged?], [yes], $@)])
Chris@40 381
Chris@40 382
Chris@40 383 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
Chris@40 384 # ---------------------------------------------------------
Chris@40 385 m4_define([_lt_decl_filter],
Chris@40 386 [m4_case([$#],
Chris@40 387 [0], [m4_fatal([$0: too few arguments: $#])],
Chris@40 388 [1], [m4_fatal([$0: too few arguments: $#: $1])],
Chris@40 389 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
Chris@40 390 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
Chris@40 391 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
Chris@40 392 ])
Chris@40 393
Chris@40 394
Chris@40 395 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
Chris@40 396 # --------------------------------------------------
Chris@40 397 m4_define([lt_decl_quote_varnames],
Chris@40 398 [_lt_decl_filter([value], [1], $@)])
Chris@40 399
Chris@40 400
Chris@40 401 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
Chris@40 402 # ---------------------------------------------------
Chris@40 403 m4_define([lt_decl_dquote_varnames],
Chris@40 404 [_lt_decl_filter([value], [2], $@)])
Chris@40 405
Chris@40 406
Chris@40 407 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
Chris@40 408 # ---------------------------------------------------
Chris@40 409 m4_define([lt_decl_varnames_tagged],
Chris@40 410 [m4_assert([$# <= 2])dnl
Chris@40 411 _$0(m4_quote(m4_default([$1], [[, ]])),
Chris@40 412 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
Chris@40 413 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
Chris@40 414 m4_define([_lt_decl_varnames_tagged],
Chris@40 415 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
Chris@40 416
Chris@40 417
Chris@40 418 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
Chris@40 419 # ------------------------------------------------
Chris@40 420 m4_define([lt_decl_all_varnames],
Chris@40 421 [_$0(m4_quote(m4_default([$1], [[, ]])),
Chris@40 422 m4_if([$2], [],
Chris@40 423 m4_quote(lt_decl_varnames),
Chris@40 424 m4_quote(m4_shift($@))))[]dnl
Chris@40 425 ])
Chris@40 426 m4_define([_lt_decl_all_varnames],
Chris@40 427 [lt_join($@, lt_decl_varnames_tagged([$1],
Chris@40 428 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
Chris@40 429 ])
Chris@40 430
Chris@40 431
Chris@40 432 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
Chris@40 433 # ------------------------------------
Chris@40 434 # Quote a variable value, and forward it to 'config.status' so that its
Chris@40 435 # declaration there will have the same value as in 'configure'. VARNAME
Chris@40 436 # must have a single quote delimited value for this to work.
Chris@40 437 m4_define([_LT_CONFIG_STATUS_DECLARE],
Chris@40 438 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
Chris@40 439
Chris@40 440
Chris@40 441 # _LT_CONFIG_STATUS_DECLARATIONS
Chris@40 442 # ------------------------------
Chris@40 443 # We delimit libtool config variables with single quotes, so when
Chris@40 444 # we write them to config.status, we have to be sure to quote all
Chris@40 445 # embedded single quotes properly. In configure, this macro expands
Chris@40 446 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
Chris@40 447 #
Chris@40 448 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
Chris@40 449 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
Chris@40 450 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
Chris@40 451 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
Chris@40 452
Chris@40 453
Chris@40 454 # _LT_LIBTOOL_TAGS
Chris@40 455 # ----------------
Chris@40 456 # Output comment and list of tags supported by the script
Chris@40 457 m4_defun([_LT_LIBTOOL_TAGS],
Chris@40 458 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
Chris@40 459 available_tags='_LT_TAGS'dnl
Chris@40 460 ])
Chris@40 461
Chris@40 462
Chris@40 463 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
Chris@40 464 # -----------------------------------
Chris@40 465 # Extract the dictionary values for VARNAME (optionally with TAG) and
Chris@40 466 # expand to a commented shell variable setting:
Chris@40 467 #
Chris@40 468 # # Some comment about what VAR is for.
Chris@40 469 # visible_name=$lt_internal_name
Chris@40 470 m4_define([_LT_LIBTOOL_DECLARE],
Chris@40 471 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
Chris@40 472 [description])))[]dnl
Chris@40 473 m4_pushdef([_libtool_name],
Chris@40 474 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
Chris@40 475 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
Chris@40 476 [0], [_libtool_name=[$]$1],
Chris@40 477 [1], [_libtool_name=$lt_[]$1],
Chris@40 478 [2], [_libtool_name=$lt_[]$1],
Chris@40 479 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
Chris@40 480 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
Chris@40 481 ])
Chris@40 482
Chris@40 483
Chris@40 484 # _LT_LIBTOOL_CONFIG_VARS
Chris@40 485 # -----------------------
Chris@40 486 # Produce commented declarations of non-tagged libtool config variables
Chris@40 487 # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
Chris@40 488 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
Chris@40 489 # section) are produced by _LT_LIBTOOL_TAG_VARS.
Chris@40 490 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
Chris@40 491 [m4_foreach([_lt_var],
Chris@40 492 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
Chris@40 493 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
Chris@40 494
Chris@40 495
Chris@40 496 # _LT_LIBTOOL_TAG_VARS(TAG)
Chris@40 497 # -------------------------
Chris@40 498 m4_define([_LT_LIBTOOL_TAG_VARS],
Chris@40 499 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
Chris@40 500 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
Chris@40 501
Chris@40 502
Chris@40 503 # _LT_TAGVAR(VARNAME, [TAGNAME])
Chris@40 504 # ------------------------------
Chris@40 505 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
Chris@40 506
Chris@40 507
Chris@40 508 # _LT_CONFIG_COMMANDS
Chris@40 509 # -------------------
Chris@40 510 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
Chris@40 511 # variables for single and double quote escaping we saved from calls
Chris@40 512 # to _LT_DECL, we can put quote escaped variables declarations
Chris@40 513 # into 'config.status', and then the shell code to quote escape them in
Chris@40 514 # for loops in 'config.status'. Finally, any additional code accumulated
Chris@40 515 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
Chris@40 516 m4_defun([_LT_CONFIG_COMMANDS],
Chris@40 517 [AC_PROVIDE_IFELSE([LT_OUTPUT],
Chris@40 518 dnl If the libtool generation code has been placed in $CONFIG_LT,
Chris@40 519 dnl instead of duplicating it all over again into config.status,
Chris@40 520 dnl then we will have config.status run $CONFIG_LT later, so it
Chris@40 521 dnl needs to know what name is stored there:
Chris@40 522 [AC_CONFIG_COMMANDS([libtool],
Chris@40 523 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
Chris@40 524 dnl If the libtool generation code is destined for config.status,
Chris@40 525 dnl expand the accumulated commands and init code now:
Chris@40 526 [AC_CONFIG_COMMANDS([libtool],
Chris@40 527 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
Chris@40 528 ])#_LT_CONFIG_COMMANDS
Chris@40 529
Chris@40 530
Chris@40 531 # Initialize.
Chris@40 532 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
Chris@40 533 [
Chris@40 534
Chris@40 535 # The HP-UX ksh and POSIX shell print the target directory to stdout
Chris@40 536 # if CDPATH is set.
Chris@40 537 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
Chris@40 538
Chris@40 539 sed_quote_subst='$sed_quote_subst'
Chris@40 540 double_quote_subst='$double_quote_subst'
Chris@40 541 delay_variable_subst='$delay_variable_subst'
Chris@40 542 _LT_CONFIG_STATUS_DECLARATIONS
Chris@40 543 LTCC='$LTCC'
Chris@40 544 LTCFLAGS='$LTCFLAGS'
Chris@40 545 compiler='$compiler_DEFAULT'
Chris@40 546
Chris@40 547 # A function that is used when there is no print builtin or printf.
Chris@40 548 func_fallback_echo ()
Chris@40 549 {
Chris@40 550 eval 'cat <<_LTECHO_EOF
Chris@40 551 \$[]1
Chris@40 552 _LTECHO_EOF'
Chris@40 553 }
Chris@40 554
Chris@40 555 # Quote evaled strings.
Chris@40 556 for var in lt_decl_all_varnames([[ \
Chris@40 557 ]], lt_decl_quote_varnames); do
Chris@40 558 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
Chris@40 559 *[[\\\\\\\`\\"\\\$]]*)
Chris@40 560 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
Chris@40 561 ;;
Chris@40 562 *)
Chris@40 563 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
Chris@40 564 ;;
Chris@40 565 esac
Chris@40 566 done
Chris@40 567
Chris@40 568 # Double-quote double-evaled strings.
Chris@40 569 for var in lt_decl_all_varnames([[ \
Chris@40 570 ]], lt_decl_dquote_varnames); do
Chris@40 571 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
Chris@40 572 *[[\\\\\\\`\\"\\\$]]*)
Chris@40 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@40 574 ;;
Chris@40 575 *)
Chris@40 576 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
Chris@40 577 ;;
Chris@40 578 esac
Chris@40 579 done
Chris@40 580
Chris@40 581 _LT_OUTPUT_LIBTOOL_INIT
Chris@40 582 ])
Chris@40 583
Chris@40 584 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
Chris@40 585 # ------------------------------------
Chris@40 586 # Generate a child script FILE with all initialization necessary to
Chris@40 587 # reuse the environment learned by the parent script, and make the
Chris@40 588 # file executable. If COMMENT is supplied, it is inserted after the
Chris@40 589 # '#!' sequence but before initialization text begins. After this
Chris@40 590 # macro, additional text can be appended to FILE to form the body of
Chris@40 591 # the child script. The macro ends with non-zero status if the
Chris@40 592 # file could not be fully written (such as if the disk is full).
Chris@40 593 m4_ifdef([AS_INIT_GENERATED],
Chris@40 594 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
Chris@40 595 [m4_defun([_LT_GENERATED_FILE_INIT],
Chris@40 596 [m4_require([AS_PREPARE])]dnl
Chris@40 597 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
Chris@40 598 [lt_write_fail=0
Chris@40 599 cat >$1 <<_ASEOF || lt_write_fail=1
Chris@40 600 #! $SHELL
Chris@40 601 # Generated by $as_me.
Chris@40 602 $2
Chris@40 603 SHELL=\${CONFIG_SHELL-$SHELL}
Chris@40 604 export SHELL
Chris@40 605 _ASEOF
Chris@40 606 cat >>$1 <<\_ASEOF || lt_write_fail=1
Chris@40 607 AS_SHELL_SANITIZE
Chris@40 608 _AS_PREPARE
Chris@40 609 exec AS_MESSAGE_FD>&1
Chris@40 610 _ASEOF
Chris@40 611 test 0 = "$lt_write_fail" && chmod +x $1[]dnl
Chris@40 612 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
Chris@40 613
Chris@40 614 # LT_OUTPUT
Chris@40 615 # ---------
Chris@40 616 # This macro allows early generation of the libtool script (before
Chris@40 617 # AC_OUTPUT is called), incase it is used in configure for compilation
Chris@40 618 # tests.
Chris@40 619 AC_DEFUN([LT_OUTPUT],
Chris@40 620 [: ${CONFIG_LT=./config.lt}
Chris@40 621 AC_MSG_NOTICE([creating $CONFIG_LT])
Chris@40 622 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
Chris@40 623 [# Run this file to recreate a libtool stub with the current configuration.])
Chris@40 624
Chris@40 625 cat >>"$CONFIG_LT" <<\_LTEOF
Chris@40 626 lt_cl_silent=false
Chris@40 627 exec AS_MESSAGE_LOG_FD>>config.log
Chris@40 628 {
Chris@40 629 echo
Chris@40 630 AS_BOX([Running $as_me.])
Chris@40 631 } >&AS_MESSAGE_LOG_FD
Chris@40 632
Chris@40 633 lt_cl_help="\
Chris@40 634 '$as_me' creates a local libtool stub from the current configuration,
Chris@40 635 for use in further configure time tests before the real libtool is
Chris@40 636 generated.
Chris@40 637
Chris@40 638 Usage: $[0] [[OPTIONS]]
Chris@40 639
Chris@40 640 -h, --help print this help, then exit
Chris@40 641 -V, --version print version number, then exit
Chris@40 642 -q, --quiet do not print progress messages
Chris@40 643 -d, --debug don't remove temporary files
Chris@40 644
Chris@40 645 Report bugs to <bug-libtool@gnu.org>."
Chris@40 646
Chris@40 647 lt_cl_version="\
Chris@40 648 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
Chris@40 649 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
Chris@40 650 configured by $[0], generated by m4_PACKAGE_STRING.
Chris@40 651
Chris@40 652 Copyright (C) 2011 Free Software Foundation, Inc.
Chris@40 653 This config.lt script is free software; the Free Software Foundation
Chris@40 654 gives unlimited permision to copy, distribute and modify it."
Chris@40 655
Chris@40 656 while test 0 != $[#]
Chris@40 657 do
Chris@40 658 case $[1] in
Chris@40 659 --version | --v* | -V )
Chris@40 660 echo "$lt_cl_version"; exit 0 ;;
Chris@40 661 --help | --h* | -h )
Chris@40 662 echo "$lt_cl_help"; exit 0 ;;
Chris@40 663 --debug | --d* | -d )
Chris@40 664 debug=: ;;
Chris@40 665 --quiet | --q* | --silent | --s* | -q )
Chris@40 666 lt_cl_silent=: ;;
Chris@40 667
Chris@40 668 -*) AC_MSG_ERROR([unrecognized option: $[1]
Chris@40 669 Try '$[0] --help' for more information.]) ;;
Chris@40 670
Chris@40 671 *) AC_MSG_ERROR([unrecognized argument: $[1]
Chris@40 672 Try '$[0] --help' for more information.]) ;;
Chris@40 673 esac
Chris@40 674 shift
Chris@40 675 done
Chris@40 676
Chris@40 677 if $lt_cl_silent; then
Chris@40 678 exec AS_MESSAGE_FD>/dev/null
Chris@40 679 fi
Chris@40 680 _LTEOF
Chris@40 681
Chris@40 682 cat >>"$CONFIG_LT" <<_LTEOF
Chris@40 683 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
Chris@40 684 _LTEOF
Chris@40 685
Chris@40 686 cat >>"$CONFIG_LT" <<\_LTEOF
Chris@40 687 AC_MSG_NOTICE([creating $ofile])
Chris@40 688 _LT_OUTPUT_LIBTOOL_COMMANDS
Chris@40 689 AS_EXIT(0)
Chris@40 690 _LTEOF
Chris@40 691 chmod +x "$CONFIG_LT"
Chris@40 692
Chris@40 693 # configure is writing to config.log, but config.lt does its own redirection,
Chris@40 694 # appending to config.log, which fails on DOS, as config.log is still kept
Chris@40 695 # open by configure. Here we exec the FD to /dev/null, effectively closing
Chris@40 696 # config.log, so it can be properly (re)opened and appended to by config.lt.
Chris@40 697 lt_cl_success=:
Chris@40 698 test yes = "$silent" &&
Chris@40 699 lt_config_lt_args="$lt_config_lt_args --quiet"
Chris@40 700 exec AS_MESSAGE_LOG_FD>/dev/null
Chris@40 701 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
Chris@40 702 exec AS_MESSAGE_LOG_FD>>config.log
Chris@40 703 $lt_cl_success || AS_EXIT(1)
Chris@40 704 ])# LT_OUTPUT
Chris@40 705
Chris@40 706
Chris@40 707 # _LT_CONFIG(TAG)
Chris@40 708 # ---------------
Chris@40 709 # If TAG is the built-in tag, create an initial libtool script with a
Chris@40 710 # default configuration from the untagged config vars. Otherwise add code
Chris@40 711 # to config.status for appending the configuration named by TAG from the
Chris@40 712 # matching tagged config vars.
Chris@40 713 m4_defun([_LT_CONFIG],
Chris@40 714 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@40 715 _LT_CONFIG_SAVE_COMMANDS([
Chris@40 716 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
Chris@40 717 m4_if(_LT_TAG, [C], [
Chris@40 718 # See if we are running on zsh, and set the options that allow our
Chris@40 719 # commands through without removal of \ escapes.
Chris@40 720 if test -n "${ZSH_VERSION+set}"; then
Chris@40 721 setopt NO_GLOB_SUBST
Chris@40 722 fi
Chris@40 723
Chris@40 724 cfgfile=${ofile}T
Chris@40 725 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
Chris@40 726 $RM "$cfgfile"
Chris@40 727
Chris@40 728 cat <<_LT_EOF >> "$cfgfile"
Chris@40 729 #! $SHELL
Chris@40 730 # Generated automatically by $as_me ($PACKAGE) $VERSION
Chris@40 731 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
Chris@40 732 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
Chris@40 733
Chris@40 734 # Provide generalized library-building support services.
Chris@40 735 # Written by Gordon Matzigkeit, 1996
Chris@40 736
Chris@40 737 _LT_COPYING
Chris@40 738 _LT_LIBTOOL_TAGS
Chris@40 739
Chris@40 740 # Configured defaults for sys_lib_dlsearch_path munging.
Chris@40 741 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
Chris@40 742
Chris@40 743 # ### BEGIN LIBTOOL CONFIG
Chris@40 744 _LT_LIBTOOL_CONFIG_VARS
Chris@40 745 _LT_LIBTOOL_TAG_VARS
Chris@40 746 # ### END LIBTOOL CONFIG
Chris@40 747
Chris@40 748 _LT_EOF
Chris@40 749
Chris@40 750 cat <<'_LT_EOF' >> "$cfgfile"
Chris@40 751
Chris@40 752 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
Chris@40 753
Chris@40 754 _LT_PREPARE_MUNGE_PATH_LIST
Chris@40 755 _LT_PREPARE_CC_BASENAME
Chris@40 756
Chris@40 757 # ### END FUNCTIONS SHARED WITH CONFIGURE
Chris@40 758
Chris@40 759 _LT_EOF
Chris@40 760
Chris@40 761 case $host_os in
Chris@40 762 aix3*)
Chris@40 763 cat <<\_LT_EOF >> "$cfgfile"
Chris@40 764 # AIX sometimes has problems with the GCC collect2 program. For some
Chris@40 765 # reason, if we set the COLLECT_NAMES environment variable, the problems
Chris@40 766 # vanish in a puff of smoke.
Chris@40 767 if test set != "${COLLECT_NAMES+set}"; then
Chris@40 768 COLLECT_NAMES=
Chris@40 769 export COLLECT_NAMES
Chris@40 770 fi
Chris@40 771 _LT_EOF
Chris@40 772 ;;
Chris@40 773 esac
Chris@40 774
Chris@40 775 _LT_PROG_LTMAIN
Chris@40 776
Chris@40 777 # We use sed instead of cat because bash on DJGPP gets confused if
Chris@40 778 # if finds mixed CR/LF and LF-only lines. Since sed operates in
Chris@40 779 # text mode, it properly converts lines to CR/LF. This bash problem
Chris@40 780 # is reportedly fixed, but why not run on old versions too?
Chris@40 781 sed '$q' "$ltmain" >> "$cfgfile" \
Chris@40 782 || (rm -f "$cfgfile"; exit 1)
Chris@40 783
Chris@40 784 mv -f "$cfgfile" "$ofile" ||
Chris@40 785 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
Chris@40 786 chmod +x "$ofile"
Chris@40 787 ],
Chris@40 788 [cat <<_LT_EOF >> "$ofile"
Chris@40 789
Chris@40 790 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
Chris@40 791 dnl in a comment (ie after a #).
Chris@40 792 # ### BEGIN LIBTOOL TAG CONFIG: $1
Chris@40 793 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
Chris@40 794 # ### END LIBTOOL TAG CONFIG: $1
Chris@40 795 _LT_EOF
Chris@40 796 ])dnl /m4_if
Chris@40 797 ],
Chris@40 798 [m4_if([$1], [], [
Chris@40 799 PACKAGE='$PACKAGE'
Chris@40 800 VERSION='$VERSION'
Chris@40 801 RM='$RM'
Chris@40 802 ofile='$ofile'], [])
Chris@40 803 ])dnl /_LT_CONFIG_SAVE_COMMANDS
Chris@40 804 ])# _LT_CONFIG
Chris@40 805
Chris@40 806
Chris@40 807 # LT_SUPPORTED_TAG(TAG)
Chris@40 808 # ---------------------
Chris@40 809 # Trace this macro to discover what tags are supported by the libtool
Chris@40 810 # --tag option, using:
Chris@40 811 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
Chris@40 812 AC_DEFUN([LT_SUPPORTED_TAG], [])
Chris@40 813
Chris@40 814
Chris@40 815 # C support is built-in for now
Chris@40 816 m4_define([_LT_LANG_C_enabled], [])
Chris@40 817 m4_define([_LT_TAGS], [])
Chris@40 818
Chris@40 819
Chris@40 820 # LT_LANG(LANG)
Chris@40 821 # -------------
Chris@40 822 # Enable libtool support for the given language if not already enabled.
Chris@40 823 AC_DEFUN([LT_LANG],
Chris@40 824 [AC_BEFORE([$0], [LT_OUTPUT])dnl
Chris@40 825 m4_case([$1],
Chris@40 826 [C], [_LT_LANG(C)],
Chris@40 827 [C++], [_LT_LANG(CXX)],
Chris@40 828 [Go], [_LT_LANG(GO)],
Chris@40 829 [Java], [_LT_LANG(GCJ)],
Chris@40 830 [Fortran 77], [_LT_LANG(F77)],
Chris@40 831 [Fortran], [_LT_LANG(FC)],
Chris@40 832 [Windows Resource], [_LT_LANG(RC)],
Chris@40 833 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
Chris@40 834 [_LT_LANG($1)],
Chris@40 835 [m4_fatal([$0: unsupported language: "$1"])])])dnl
Chris@40 836 ])# LT_LANG
Chris@40 837
Chris@40 838
Chris@40 839 # _LT_LANG(LANGNAME)
Chris@40 840 # ------------------
Chris@40 841 m4_defun([_LT_LANG],
Chris@40 842 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
Chris@40 843 [LT_SUPPORTED_TAG([$1])dnl
Chris@40 844 m4_append([_LT_TAGS], [$1 ])dnl
Chris@40 845 m4_define([_LT_LANG_]$1[_enabled], [])dnl
Chris@40 846 _LT_LANG_$1_CONFIG($1)])dnl
Chris@40 847 ])# _LT_LANG
Chris@40 848
Chris@40 849
Chris@40 850 m4_ifndef([AC_PROG_GO], [
Chris@40 851 ############################################################
Chris@40 852 # NOTE: This macro has been submitted for inclusion into #
Chris@40 853 # GNU Autoconf as AC_PROG_GO. When it is available in #
Chris@40 854 # a released version of Autoconf we should remove this #
Chris@40 855 # macro and use it instead. #
Chris@40 856 ############################################################
Chris@40 857 m4_defun([AC_PROG_GO],
Chris@40 858 [AC_LANG_PUSH(Go)dnl
Chris@40 859 AC_ARG_VAR([GOC], [Go compiler command])dnl
Chris@40 860 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
Chris@40 861 _AC_ARG_VAR_LDFLAGS()dnl
Chris@40 862 AC_CHECK_TOOL(GOC, gccgo)
Chris@40 863 if test -z "$GOC"; then
Chris@40 864 if test -n "$ac_tool_prefix"; then
Chris@40 865 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
Chris@40 866 fi
Chris@40 867 fi
Chris@40 868 if test -z "$GOC"; then
Chris@40 869 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
Chris@40 870 fi
Chris@40 871 ])#m4_defun
Chris@40 872 ])#m4_ifndef
Chris@40 873
Chris@40 874
Chris@40 875 # _LT_LANG_DEFAULT_CONFIG
Chris@40 876 # -----------------------
Chris@40 877 m4_defun([_LT_LANG_DEFAULT_CONFIG],
Chris@40 878 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
Chris@40 879 [LT_LANG(CXX)],
Chris@40 880 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
Chris@40 881
Chris@40 882 AC_PROVIDE_IFELSE([AC_PROG_F77],
Chris@40 883 [LT_LANG(F77)],
Chris@40 884 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
Chris@40 885
Chris@40 886 AC_PROVIDE_IFELSE([AC_PROG_FC],
Chris@40 887 [LT_LANG(FC)],
Chris@40 888 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
Chris@40 889
Chris@40 890 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
Chris@40 891 dnl pulling things in needlessly.
Chris@40 892 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
Chris@40 893 [LT_LANG(GCJ)],
Chris@40 894 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
Chris@40 895 [LT_LANG(GCJ)],
Chris@40 896 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
Chris@40 897 [LT_LANG(GCJ)],
Chris@40 898 [m4_ifdef([AC_PROG_GCJ],
Chris@40 899 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
Chris@40 900 m4_ifdef([A][M_PROG_GCJ],
Chris@40 901 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
Chris@40 902 m4_ifdef([LT_PROG_GCJ],
Chris@40 903 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
Chris@40 904
Chris@40 905 AC_PROVIDE_IFELSE([AC_PROG_GO],
Chris@40 906 [LT_LANG(GO)],
Chris@40 907 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
Chris@40 908
Chris@40 909 AC_PROVIDE_IFELSE([LT_PROG_RC],
Chris@40 910 [LT_LANG(RC)],
Chris@40 911 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
Chris@40 912 ])# _LT_LANG_DEFAULT_CONFIG
Chris@40 913
Chris@40 914 # Obsolete macros:
Chris@40 915 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
Chris@40 916 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
Chris@40 917 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
Chris@40 918 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
Chris@40 919 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
Chris@40 920 dnl aclocal-1.4 backwards compatibility:
Chris@40 921 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
Chris@40 922 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
Chris@40 923 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
Chris@40 924 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
Chris@40 925 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
Chris@40 926
Chris@40 927
Chris@40 928 # _LT_TAG_COMPILER
Chris@40 929 # ----------------
Chris@40 930 m4_defun([_LT_TAG_COMPILER],
Chris@40 931 [AC_REQUIRE([AC_PROG_CC])dnl
Chris@40 932
Chris@40 933 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
Chris@40 934 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
Chris@40 935 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
Chris@40 936 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
Chris@40 937
Chris@40 938 # If no C compiler was specified, use CC.
Chris@40 939 LTCC=${LTCC-"$CC"}
Chris@40 940
Chris@40 941 # If no C compiler flags were specified, use CFLAGS.
Chris@40 942 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
Chris@40 943
Chris@40 944 # Allow CC to be a program name with arguments.
Chris@40 945 compiler=$CC
Chris@40 946 ])# _LT_TAG_COMPILER
Chris@40 947
Chris@40 948
Chris@40 949 # _LT_COMPILER_BOILERPLATE
Chris@40 950 # ------------------------
Chris@40 951 # Check for compiler boilerplate output or warnings with
Chris@40 952 # the simple compiler test code.
Chris@40 953 m4_defun([_LT_COMPILER_BOILERPLATE],
Chris@40 954 [m4_require([_LT_DECL_SED])dnl
Chris@40 955 ac_outfile=conftest.$ac_objext
Chris@40 956 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
Chris@40 957 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
Chris@40 958 _lt_compiler_boilerplate=`cat conftest.err`
Chris@40 959 $RM conftest*
Chris@40 960 ])# _LT_COMPILER_BOILERPLATE
Chris@40 961
Chris@40 962
Chris@40 963 # _LT_LINKER_BOILERPLATE
Chris@40 964 # ----------------------
Chris@40 965 # Check for linker boilerplate output or warnings with
Chris@40 966 # the simple link test code.
Chris@40 967 m4_defun([_LT_LINKER_BOILERPLATE],
Chris@40 968 [m4_require([_LT_DECL_SED])dnl
Chris@40 969 ac_outfile=conftest.$ac_objext
Chris@40 970 echo "$lt_simple_link_test_code" >conftest.$ac_ext
Chris@40 971 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
Chris@40 972 _lt_linker_boilerplate=`cat conftest.err`
Chris@40 973 $RM -r conftest*
Chris@40 974 ])# _LT_LINKER_BOILERPLATE
Chris@40 975
Chris@40 976 # _LT_REQUIRED_DARWIN_CHECKS
Chris@40 977 # -------------------------
Chris@40 978 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
Chris@40 979 case $host_os in
Chris@40 980 rhapsody* | darwin*)
Chris@40 981 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
Chris@40 982 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
Chris@40 983 AC_CHECK_TOOL([LIPO], [lipo], [:])
Chris@40 984 AC_CHECK_TOOL([OTOOL], [otool], [:])
Chris@40 985 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
Chris@40 986 _LT_DECL([], [DSYMUTIL], [1],
Chris@40 987 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
Chris@40 988 _LT_DECL([], [NMEDIT], [1],
Chris@40 989 [Tool to change global to local symbols on Mac OS X])
Chris@40 990 _LT_DECL([], [LIPO], [1],
Chris@40 991 [Tool to manipulate fat objects and archives on Mac OS X])
Chris@40 992 _LT_DECL([], [OTOOL], [1],
Chris@40 993 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
Chris@40 994 _LT_DECL([], [OTOOL64], [1],
Chris@40 995 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
Chris@40 996
Chris@40 997 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
Chris@40 998 [lt_cv_apple_cc_single_mod=no
Chris@40 999 if test -z "$LT_MULTI_MODULE"; then
Chris@40 1000 # By default we will add the -single_module flag. You can override
Chris@40 1001 # by either setting the environment variable LT_MULTI_MODULE
Chris@40 1002 # non-empty at configure time, or by adding -multi_module to the
Chris@40 1003 # link flags.
Chris@40 1004 rm -rf libconftest.dylib*
Chris@40 1005 echo "int foo(void){return 1;}" > conftest.c
Chris@40 1006 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
Chris@40 1007 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
Chris@40 1008 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
Chris@40 1009 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
Chris@40 1010 _lt_result=$?
Chris@40 1011 # If there is a non-empty error log, and "single_module"
Chris@40 1012 # appears in it, assume the flag caused a linker warning
Chris@40 1013 if test -s conftest.err && $GREP single_module conftest.err; then
Chris@40 1014 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@40 1015 # Otherwise, if the output was created with a 0 exit code from
Chris@40 1016 # the compiler, it worked.
Chris@40 1017 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
Chris@40 1018 lt_cv_apple_cc_single_mod=yes
Chris@40 1019 else
Chris@40 1020 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@40 1021 fi
Chris@40 1022 rm -rf libconftest.dylib*
Chris@40 1023 rm -f conftest.*
Chris@40 1024 fi])
Chris@40 1025
Chris@40 1026 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
Chris@40 1027 [lt_cv_ld_exported_symbols_list],
Chris@40 1028 [lt_cv_ld_exported_symbols_list=no
Chris@40 1029 save_LDFLAGS=$LDFLAGS
Chris@40 1030 echo "_main" > conftest.sym
Chris@40 1031 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
Chris@40 1032 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
Chris@40 1033 [lt_cv_ld_exported_symbols_list=yes],
Chris@40 1034 [lt_cv_ld_exported_symbols_list=no])
Chris@40 1035 LDFLAGS=$save_LDFLAGS
Chris@40 1036 ])
Chris@40 1037
Chris@40 1038 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
Chris@40 1039 [lt_cv_ld_force_load=no
Chris@40 1040 cat > conftest.c << _LT_EOF
Chris@40 1041 int forced_loaded() { return 2;}
Chris@40 1042 _LT_EOF
Chris@40 1043 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
Chris@40 1044 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
Chris@40 1045 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
Chris@40 1046 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
Chris@40 1047 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
Chris@40 1048 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
Chris@40 1049 cat > conftest.c << _LT_EOF
Chris@40 1050 int main() { return 0;}
Chris@40 1051 _LT_EOF
Chris@40 1052 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
Chris@40 1053 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
Chris@40 1054 _lt_result=$?
Chris@40 1055 if test -s conftest.err && $GREP force_load conftest.err; then
Chris@40 1056 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@40 1057 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
Chris@40 1058 lt_cv_ld_force_load=yes
Chris@40 1059 else
Chris@40 1060 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@40 1061 fi
Chris@40 1062 rm -f conftest.err libconftest.a conftest conftest.c
Chris@40 1063 rm -rf conftest.dSYM
Chris@40 1064 ])
Chris@40 1065 case $host_os in
Chris@40 1066 rhapsody* | darwin1.[[012]])
Chris@40 1067 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
Chris@40 1068 darwin1.*)
Chris@40 1069 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
Chris@40 1070 darwin*) # darwin 5.x on
Chris@40 1071 # if running on 10.5 or later, the deployment target defaults
Chris@40 1072 # to the OS version, if on x86, and 10.4, the deployment
Chris@40 1073 # target defaults to 10.4. Don't you love it?
Chris@40 1074 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
Chris@40 1075 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
Chris@40 1076 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
Chris@40 1077 10.[[012]][[,.]]*)
Chris@40 1078 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
Chris@40 1079 10.*)
Chris@40 1080 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
Chris@40 1081 esac
Chris@40 1082 ;;
Chris@40 1083 esac
Chris@40 1084 if test yes = "$lt_cv_apple_cc_single_mod"; then
Chris@40 1085 _lt_dar_single_mod='$single_module'
Chris@40 1086 fi
Chris@40 1087 if test yes = "$lt_cv_ld_exported_symbols_list"; then
Chris@40 1088 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
Chris@40 1089 else
Chris@40 1090 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
Chris@40 1091 fi
Chris@40 1092 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
Chris@40 1093 _lt_dsymutil='~$DSYMUTIL $lib || :'
Chris@40 1094 else
Chris@40 1095 _lt_dsymutil=
Chris@40 1096 fi
Chris@40 1097 ;;
Chris@40 1098 esac
Chris@40 1099 ])
Chris@40 1100
Chris@40 1101
Chris@40 1102 # _LT_DARWIN_LINKER_FEATURES([TAG])
Chris@40 1103 # ---------------------------------
Chris@40 1104 # Checks for linker and compiler features on darwin
Chris@40 1105 m4_defun([_LT_DARWIN_LINKER_FEATURES],
Chris@40 1106 [
Chris@40 1107 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
Chris@40 1108 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@40 1109 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@40 1110 _LT_TAGVAR(hardcode_automatic, $1)=yes
Chris@40 1111 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
Chris@40 1112 if test yes = "$lt_cv_ld_force_load"; then
Chris@40 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@40 1114 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
Chris@40 1115 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
Chris@40 1116 else
Chris@40 1117 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
Chris@40 1118 fi
Chris@40 1119 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@40 1120 _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
Chris@40 1121 case $cc_basename in
Chris@40 1122 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
Chris@40 1123 *) _lt_dar_can_shared=$GCC ;;
Chris@40 1124 esac
Chris@40 1125 if test yes = "$_lt_dar_can_shared"; then
Chris@40 1126 output_verbose_link_cmd=func_echo_all
Chris@40 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@40 1128 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
Chris@40 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@40 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@40 1131 m4_if([$1], [CXX],
Chris@40 1132 [ if test yes != "$lt_cv_apple_cc_single_mod"; then
Chris@40 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@40 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@40 1135 fi
Chris@40 1136 ],[])
Chris@40 1137 else
Chris@40 1138 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 1139 fi
Chris@40 1140 ])
Chris@40 1141
Chris@40 1142 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
Chris@40 1143 # ----------------------------------
Chris@40 1144 # Links a minimal program and checks the executable
Chris@40 1145 # for the system default hardcoded library path. In most cases,
Chris@40 1146 # this is /usr/lib:/lib, but when the MPI compilers are used
Chris@40 1147 # the location of the communication and MPI libs are included too.
Chris@40 1148 # If we don't find anything, use the default library path according
Chris@40 1149 # to the aix ld manual.
Chris@40 1150 # Store the results from the different compilers for each TAGNAME.
Chris@40 1151 # Allow to override them for all tags through lt_cv_aix_libpath.
Chris@40 1152 m4_defun([_LT_SYS_MODULE_PATH_AIX],
Chris@40 1153 [m4_require([_LT_DECL_SED])dnl
Chris@40 1154 if test set = "${lt_cv_aix_libpath+set}"; then
Chris@40 1155 aix_libpath=$lt_cv_aix_libpath
Chris@40 1156 else
Chris@40 1157 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
Chris@40 1158 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
Chris@40 1159 lt_aix_libpath_sed='[
Chris@40 1160 /Import File Strings/,/^$/ {
Chris@40 1161 /^0/ {
Chris@40 1162 s/^0 *\([^ ]*\) *$/\1/
Chris@40 1163 p
Chris@40 1164 }
Chris@40 1165 }]'
Chris@40 1166 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
Chris@40 1167 # Check for a 64-bit object if we didn't find anything.
Chris@40 1168 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
Chris@40 1169 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
Chris@40 1170 fi],[])
Chris@40 1171 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
Chris@40 1172 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
Chris@40 1173 fi
Chris@40 1174 ])
Chris@40 1175 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
Chris@40 1176 fi
Chris@40 1177 ])# _LT_SYS_MODULE_PATH_AIX
Chris@40 1178
Chris@40 1179
Chris@40 1180 # _LT_SHELL_INIT(ARG)
Chris@40 1181 # -------------------
Chris@40 1182 m4_define([_LT_SHELL_INIT],
Chris@40 1183 [m4_divert_text([M4SH-INIT], [$1
Chris@40 1184 ])])# _LT_SHELL_INIT
Chris@40 1185
Chris@40 1186
Chris@40 1187
Chris@40 1188 # _LT_PROG_ECHO_BACKSLASH
Chris@40 1189 # -----------------------
Chris@40 1190 # Find how we can fake an echo command that does not interpret backslash.
Chris@40 1191 # In particular, with Autoconf 2.60 or later we add some code to the start
Chris@40 1192 # of the generated configure script that will find a shell with a builtin
Chris@40 1193 # printf (that we can use as an echo command).
Chris@40 1194 m4_defun([_LT_PROG_ECHO_BACKSLASH],
Chris@40 1195 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
Chris@40 1196 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
Chris@40 1197 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
Chris@40 1198
Chris@40 1199 AC_MSG_CHECKING([how to print strings])
Chris@40 1200 # Test print first, because it will be a builtin if present.
Chris@40 1201 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
Chris@40 1202 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
Chris@40 1203 ECHO='print -r --'
Chris@40 1204 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
Chris@40 1205 ECHO='printf %s\n'
Chris@40 1206 else
Chris@40 1207 # Use this function as a fallback that always works.
Chris@40 1208 func_fallback_echo ()
Chris@40 1209 {
Chris@40 1210 eval 'cat <<_LTECHO_EOF
Chris@40 1211 $[]1
Chris@40 1212 _LTECHO_EOF'
Chris@40 1213 }
Chris@40 1214 ECHO='func_fallback_echo'
Chris@40 1215 fi
Chris@40 1216
Chris@40 1217 # func_echo_all arg...
Chris@40 1218 # Invoke $ECHO with all args, space-separated.
Chris@40 1219 func_echo_all ()
Chris@40 1220 {
Chris@40 1221 $ECHO "$*"
Chris@40 1222 }
Chris@40 1223
Chris@40 1224 case $ECHO in
Chris@40 1225 printf*) AC_MSG_RESULT([printf]) ;;
Chris@40 1226 print*) AC_MSG_RESULT([print -r]) ;;
Chris@40 1227 *) AC_MSG_RESULT([cat]) ;;
Chris@40 1228 esac
Chris@40 1229
Chris@40 1230 m4_ifdef([_AS_DETECT_SUGGESTED],
Chris@40 1231 [_AS_DETECT_SUGGESTED([
Chris@40 1232 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
Chris@40 1233 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
Chris@40 1234 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
Chris@40 1235 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
Chris@40 1236 PATH=/empty FPATH=/empty; export PATH FPATH
Chris@40 1237 test "X`printf %s $ECHO`" = "X$ECHO" \
Chris@40 1238 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
Chris@40 1239
Chris@40 1240 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
Chris@40 1241 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
Chris@40 1242 ])# _LT_PROG_ECHO_BACKSLASH
Chris@40 1243
Chris@40 1244
Chris@40 1245 # _LT_WITH_SYSROOT
Chris@40 1246 # ----------------
Chris@40 1247 AC_DEFUN([_LT_WITH_SYSROOT],
Chris@40 1248 [AC_MSG_CHECKING([for sysroot])
Chris@40 1249 AC_ARG_WITH([sysroot],
Chris@40 1250 [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
Chris@40 1251 [Search for dependent libraries within DIR (or the compiler's sysroot
Chris@40 1252 if not specified).])],
Chris@40 1253 [], [with_sysroot=no])
Chris@40 1254
Chris@40 1255 dnl lt_sysroot will always be passed unquoted. We quote it here
Chris@40 1256 dnl in case the user passed a directory name.
Chris@40 1257 lt_sysroot=
Chris@40 1258 case $with_sysroot in #(
Chris@40 1259 yes)
Chris@40 1260 if test yes = "$GCC"; then
Chris@40 1261 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
Chris@40 1262 fi
Chris@40 1263 ;; #(
Chris@40 1264 /*)
Chris@40 1265 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
Chris@40 1266 ;; #(
Chris@40 1267 no|'')
Chris@40 1268 ;; #(
Chris@40 1269 *)
Chris@40 1270 AC_MSG_RESULT([$with_sysroot])
Chris@40 1271 AC_MSG_ERROR([The sysroot must be an absolute path.])
Chris@40 1272 ;;
Chris@40 1273 esac
Chris@40 1274
Chris@40 1275 AC_MSG_RESULT([${lt_sysroot:-no}])
Chris@40 1276 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
Chris@40 1277 [dependent libraries, and where our libraries should be installed.])])
Chris@40 1278
Chris@40 1279 # _LT_ENABLE_LOCK
Chris@40 1280 # ---------------
Chris@40 1281 m4_defun([_LT_ENABLE_LOCK],
Chris@40 1282 [AC_ARG_ENABLE([libtool-lock],
Chris@40 1283 [AS_HELP_STRING([--disable-libtool-lock],
Chris@40 1284 [avoid locking (might break parallel builds)])])
Chris@40 1285 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
Chris@40 1286
Chris@40 1287 # Some flags need to be propagated to the compiler or linker for good
Chris@40 1288 # libtool support.
Chris@40 1289 case $host in
Chris@40 1290 ia64-*-hpux*)
Chris@40 1291 # Find out what ABI is being produced by ac_compile, and set mode
Chris@40 1292 # options accordingly.
Chris@40 1293 echo 'int i;' > conftest.$ac_ext
Chris@40 1294 if AC_TRY_EVAL(ac_compile); then
Chris@40 1295 case `/usr/bin/file conftest.$ac_objext` in
Chris@40 1296 *ELF-32*)
Chris@40 1297 HPUX_IA64_MODE=32
Chris@40 1298 ;;
Chris@40 1299 *ELF-64*)
Chris@40 1300 HPUX_IA64_MODE=64
Chris@40 1301 ;;
Chris@40 1302 esac
Chris@40 1303 fi
Chris@40 1304 rm -rf conftest*
Chris@40 1305 ;;
Chris@40 1306 *-*-irix6*)
Chris@40 1307 # Find out what ABI is being produced by ac_compile, and set linker
Chris@40 1308 # options accordingly.
Chris@40 1309 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
Chris@40 1310 if AC_TRY_EVAL(ac_compile); then
Chris@40 1311 if test yes = "$lt_cv_prog_gnu_ld"; then
Chris@40 1312 case `/usr/bin/file conftest.$ac_objext` in
Chris@40 1313 *32-bit*)
Chris@40 1314 LD="${LD-ld} -melf32bsmip"
Chris@40 1315 ;;
Chris@40 1316 *N32*)
Chris@40 1317 LD="${LD-ld} -melf32bmipn32"
Chris@40 1318 ;;
Chris@40 1319 *64-bit*)
Chris@40 1320 LD="${LD-ld} -melf64bmip"
Chris@40 1321 ;;
Chris@40 1322 esac
Chris@40 1323 else
Chris@40 1324 case `/usr/bin/file conftest.$ac_objext` in
Chris@40 1325 *32-bit*)
Chris@40 1326 LD="${LD-ld} -32"
Chris@40 1327 ;;
Chris@40 1328 *N32*)
Chris@40 1329 LD="${LD-ld} -n32"
Chris@40 1330 ;;
Chris@40 1331 *64-bit*)
Chris@40 1332 LD="${LD-ld} -64"
Chris@40 1333 ;;
Chris@40 1334 esac
Chris@40 1335 fi
Chris@40 1336 fi
Chris@40 1337 rm -rf conftest*
Chris@40 1338 ;;
Chris@40 1339
Chris@40 1340 mips64*-*linux*)
Chris@40 1341 # Find out what ABI is being produced by ac_compile, and set linker
Chris@40 1342 # options accordingly.
Chris@40 1343 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
Chris@40 1344 if AC_TRY_EVAL(ac_compile); then
Chris@40 1345 emul=elf
Chris@40 1346 case `/usr/bin/file conftest.$ac_objext` in
Chris@40 1347 *32-bit*)
Chris@40 1348 emul="${emul}32"
Chris@40 1349 ;;
Chris@40 1350 *64-bit*)
Chris@40 1351 emul="${emul}64"
Chris@40 1352 ;;
Chris@40 1353 esac
Chris@40 1354 case `/usr/bin/file conftest.$ac_objext` in
Chris@40 1355 *MSB*)
Chris@40 1356 emul="${emul}btsmip"
Chris@40 1357 ;;
Chris@40 1358 *LSB*)
Chris@40 1359 emul="${emul}ltsmip"
Chris@40 1360 ;;
Chris@40 1361 esac
Chris@40 1362 case `/usr/bin/file conftest.$ac_objext` in
Chris@40 1363 *N32*)
Chris@40 1364 emul="${emul}n32"
Chris@40 1365 ;;
Chris@40 1366 esac
Chris@40 1367 LD="${LD-ld} -m $emul"
Chris@40 1368 fi
Chris@40 1369 rm -rf conftest*
Chris@40 1370 ;;
Chris@40 1371
Chris@40 1372 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
Chris@40 1373 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
Chris@40 1374 # Find out what ABI is being produced by ac_compile, and set linker
Chris@40 1375 # options accordingly. Note that the listed cases only cover the
Chris@40 1376 # situations where additional linker options are needed (such as when
Chris@40 1377 # doing 32-bit compilation for a host where ld defaults to 64-bit, or
Chris@40 1378 # vice versa); the common cases where no linker options are needed do
Chris@40 1379 # not appear in the list.
Chris@40 1380 echo 'int i;' > conftest.$ac_ext
Chris@40 1381 if AC_TRY_EVAL(ac_compile); then
Chris@40 1382 case `/usr/bin/file conftest.o` in
Chris@40 1383 *32-bit*)
Chris@40 1384 case $host in
Chris@40 1385 x86_64-*kfreebsd*-gnu)
Chris@40 1386 LD="${LD-ld} -m elf_i386_fbsd"
Chris@40 1387 ;;
Chris@40 1388 x86_64-*linux*)
Chris@40 1389 case `/usr/bin/file conftest.o` in
Chris@40 1390 *x86-64*)
Chris@40 1391 LD="${LD-ld} -m elf32_x86_64"
Chris@40 1392 ;;
Chris@40 1393 *)
Chris@40 1394 LD="${LD-ld} -m elf_i386"
Chris@40 1395 ;;
Chris@40 1396 esac
Chris@40 1397 ;;
Chris@40 1398 powerpc64le-*linux*)
Chris@40 1399 LD="${LD-ld} -m elf32lppclinux"
Chris@40 1400 ;;
Chris@40 1401 powerpc64-*linux*)
Chris@40 1402 LD="${LD-ld} -m elf32ppclinux"
Chris@40 1403 ;;
Chris@40 1404 s390x-*linux*)
Chris@40 1405 LD="${LD-ld} -m elf_s390"
Chris@40 1406 ;;
Chris@40 1407 sparc64-*linux*)
Chris@40 1408 LD="${LD-ld} -m elf32_sparc"
Chris@40 1409 ;;
Chris@40 1410 esac
Chris@40 1411 ;;
Chris@40 1412 *64-bit*)
Chris@40 1413 case $host in
Chris@40 1414 x86_64-*kfreebsd*-gnu)
Chris@40 1415 LD="${LD-ld} -m elf_x86_64_fbsd"
Chris@40 1416 ;;
Chris@40 1417 x86_64-*linux*)
Chris@40 1418 LD="${LD-ld} -m elf_x86_64"
Chris@40 1419 ;;
Chris@40 1420 powerpcle-*linux*)
Chris@40 1421 LD="${LD-ld} -m elf64lppc"
Chris@40 1422 ;;
Chris@40 1423 powerpc-*linux*)
Chris@40 1424 LD="${LD-ld} -m elf64ppc"
Chris@40 1425 ;;
Chris@40 1426 s390*-*linux*|s390*-*tpf*)
Chris@40 1427 LD="${LD-ld} -m elf64_s390"
Chris@40 1428 ;;
Chris@40 1429 sparc*-*linux*)
Chris@40 1430 LD="${LD-ld} -m elf64_sparc"
Chris@40 1431 ;;
Chris@40 1432 esac
Chris@40 1433 ;;
Chris@40 1434 esac
Chris@40 1435 fi
Chris@40 1436 rm -rf conftest*
Chris@40 1437 ;;
Chris@40 1438
Chris@40 1439 *-*-sco3.2v5*)
Chris@40 1440 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
Chris@40 1441 SAVE_CFLAGS=$CFLAGS
Chris@40 1442 CFLAGS="$CFLAGS -belf"
Chris@40 1443 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
Chris@40 1444 [AC_LANG_PUSH(C)
Chris@40 1445 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
Chris@40 1446 AC_LANG_POP])
Chris@40 1447 if test yes != "$lt_cv_cc_needs_belf"; then
Chris@40 1448 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
Chris@40 1449 CFLAGS=$SAVE_CFLAGS
Chris@40 1450 fi
Chris@40 1451 ;;
Chris@40 1452 *-*solaris*)
Chris@40 1453 # Find out what ABI is being produced by ac_compile, and set linker
Chris@40 1454 # options accordingly.
Chris@40 1455 echo 'int i;' > conftest.$ac_ext
Chris@40 1456 if AC_TRY_EVAL(ac_compile); then
Chris@40 1457 case `/usr/bin/file conftest.o` in
Chris@40 1458 *64-bit*)
Chris@40 1459 case $lt_cv_prog_gnu_ld in
Chris@40 1460 yes*)
Chris@40 1461 case $host in
Chris@40 1462 i?86-*-solaris*|x86_64-*-solaris*)
Chris@40 1463 LD="${LD-ld} -m elf_x86_64"
Chris@40 1464 ;;
Chris@40 1465 sparc*-*-solaris*)
Chris@40 1466 LD="${LD-ld} -m elf64_sparc"
Chris@40 1467 ;;
Chris@40 1468 esac
Chris@40 1469 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
Chris@40 1470 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
Chris@40 1471 LD=${LD-ld}_sol2
Chris@40 1472 fi
Chris@40 1473 ;;
Chris@40 1474 *)
Chris@40 1475 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
Chris@40 1476 LD="${LD-ld} -64"
Chris@40 1477 fi
Chris@40 1478 ;;
Chris@40 1479 esac
Chris@40 1480 ;;
Chris@40 1481 esac
Chris@40 1482 fi
Chris@40 1483 rm -rf conftest*
Chris@40 1484 ;;
Chris@40 1485 esac
Chris@40 1486
Chris@40 1487 need_locks=$enable_libtool_lock
Chris@40 1488 ])# _LT_ENABLE_LOCK
Chris@40 1489
Chris@40 1490
Chris@40 1491 # _LT_PROG_AR
Chris@40 1492 # -----------
Chris@40 1493 m4_defun([_LT_PROG_AR],
Chris@40 1494 [AC_CHECK_TOOLS(AR, [ar], false)
Chris@40 1495 : ${AR=ar}
Chris@40 1496 : ${AR_FLAGS=cru}
Chris@40 1497 _LT_DECL([], [AR], [1], [The archiver])
Chris@40 1498 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
Chris@40 1499
Chris@40 1500 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
Chris@40 1501 [lt_cv_ar_at_file=no
Chris@40 1502 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
Chris@40 1503 [echo conftest.$ac_objext > conftest.lst
Chris@40 1504 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
Chris@40 1505 AC_TRY_EVAL([lt_ar_try])
Chris@40 1506 if test 0 -eq "$ac_status"; then
Chris@40 1507 # Ensure the archiver fails upon bogus file names.
Chris@40 1508 rm -f conftest.$ac_objext libconftest.a
Chris@40 1509 AC_TRY_EVAL([lt_ar_try])
Chris@40 1510 if test 0 -ne "$ac_status"; then
Chris@40 1511 lt_cv_ar_at_file=@
Chris@40 1512 fi
Chris@40 1513 fi
Chris@40 1514 rm -f conftest.* libconftest.a
Chris@40 1515 ])
Chris@40 1516 ])
Chris@40 1517
Chris@40 1518 if test no = "$lt_cv_ar_at_file"; then
Chris@40 1519 archiver_list_spec=
Chris@40 1520 else
Chris@40 1521 archiver_list_spec=$lt_cv_ar_at_file
Chris@40 1522 fi
Chris@40 1523 _LT_DECL([], [archiver_list_spec], [1],
Chris@40 1524 [How to feed a file listing to the archiver])
Chris@40 1525 ])# _LT_PROG_AR
Chris@40 1526
Chris@40 1527
Chris@40 1528 # _LT_CMD_OLD_ARCHIVE
Chris@40 1529 # -------------------
Chris@40 1530 m4_defun([_LT_CMD_OLD_ARCHIVE],
Chris@40 1531 [_LT_PROG_AR
Chris@40 1532
Chris@40 1533 AC_CHECK_TOOL(STRIP, strip, :)
Chris@40 1534 test -z "$STRIP" && STRIP=:
Chris@40 1535 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
Chris@40 1536
Chris@40 1537 AC_CHECK_TOOL(RANLIB, ranlib, :)
Chris@40 1538 test -z "$RANLIB" && RANLIB=:
Chris@40 1539 _LT_DECL([], [RANLIB], [1],
Chris@40 1540 [Commands used to install an old-style archive])
Chris@40 1541
Chris@40 1542 # Determine commands to create old-style static archives.
Chris@40 1543 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
Chris@40 1544 old_postinstall_cmds='chmod 644 $oldlib'
Chris@40 1545 old_postuninstall_cmds=
Chris@40 1546
Chris@40 1547 if test -n "$RANLIB"; then
Chris@40 1548 case $host_os in
Chris@40 1549 bitrig* | openbsd*)
Chris@40 1550 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
Chris@40 1551 ;;
Chris@40 1552 *)
Chris@40 1553 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
Chris@40 1554 ;;
Chris@40 1555 esac
Chris@40 1556 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
Chris@40 1557 fi
Chris@40 1558
Chris@40 1559 case $host_os in
Chris@40 1560 darwin*)
Chris@40 1561 lock_old_archive_extraction=yes ;;
Chris@40 1562 *)
Chris@40 1563 lock_old_archive_extraction=no ;;
Chris@40 1564 esac
Chris@40 1565 _LT_DECL([], [old_postinstall_cmds], [2])
Chris@40 1566 _LT_DECL([], [old_postuninstall_cmds], [2])
Chris@40 1567 _LT_TAGDECL([], [old_archive_cmds], [2],
Chris@40 1568 [Commands used to build an old-style archive])
Chris@40 1569 _LT_DECL([], [lock_old_archive_extraction], [0],
Chris@40 1570 [Whether to use a lock for old archive extraction])
Chris@40 1571 ])# _LT_CMD_OLD_ARCHIVE
Chris@40 1572
Chris@40 1573
Chris@40 1574 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
Chris@40 1575 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
Chris@40 1576 # ----------------------------------------------------------------
Chris@40 1577 # Check whether the given compiler option works
Chris@40 1578 AC_DEFUN([_LT_COMPILER_OPTION],
Chris@40 1579 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@40 1580 m4_require([_LT_DECL_SED])dnl
Chris@40 1581 AC_CACHE_CHECK([$1], [$2],
Chris@40 1582 [$2=no
Chris@40 1583 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
Chris@40 1584 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
Chris@40 1585 lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
Chris@40 1586 # Insert the option either (1) after the last *FLAGS variable, or
Chris@40 1587 # (2) before a word containing "conftest.", or (3) at the end.
Chris@40 1588 # Note that $ac_compile itself does not contain backslashes and begins
Chris@40 1589 # with a dollar sign (not a hyphen), so the echo should work correctly.
Chris@40 1590 # The option is referenced via a variable to avoid confusing sed.
Chris@40 1591 lt_compile=`echo "$ac_compile" | $SED \
Chris@40 1592 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
Chris@40 1593 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
Chris@40 1594 -e 's:$: $lt_compiler_flag:'`
Chris@40 1595 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
Chris@40 1596 (eval "$lt_compile" 2>conftest.err)
Chris@40 1597 ac_status=$?
Chris@40 1598 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@40 1599 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
Chris@40 1600 if (exit $ac_status) && test -s "$ac_outfile"; then
Chris@40 1601 # The compiler can only warn and ignore the option if not recognized
Chris@40 1602 # So say no if there are warnings other than the usual output.
Chris@40 1603 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
Chris@40 1604 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
Chris@40 1605 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
Chris@40 1606 $2=yes
Chris@40 1607 fi
Chris@40 1608 fi
Chris@40 1609 $RM conftest*
Chris@40 1610 ])
Chris@40 1611
Chris@40 1612 if test yes = "[$]$2"; then
Chris@40 1613 m4_if([$5], , :, [$5])
Chris@40 1614 else
Chris@40 1615 m4_if([$6], , :, [$6])
Chris@40 1616 fi
Chris@40 1617 ])# _LT_COMPILER_OPTION
Chris@40 1618
Chris@40 1619 # Old name:
Chris@40 1620 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
Chris@40 1621 dnl aclocal-1.4 backwards compatibility:
Chris@40 1622 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
Chris@40 1623
Chris@40 1624
Chris@40 1625 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
Chris@40 1626 # [ACTION-SUCCESS], [ACTION-FAILURE])
Chris@40 1627 # ----------------------------------------------------
Chris@40 1628 # Check whether the given linker option works
Chris@40 1629 AC_DEFUN([_LT_LINKER_OPTION],
Chris@40 1630 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@40 1631 m4_require([_LT_DECL_SED])dnl
Chris@40 1632 AC_CACHE_CHECK([$1], [$2],
Chris@40 1633 [$2=no
Chris@40 1634 save_LDFLAGS=$LDFLAGS
Chris@40 1635 LDFLAGS="$LDFLAGS $3"
Chris@40 1636 echo "$lt_simple_link_test_code" > conftest.$ac_ext
Chris@40 1637 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
Chris@40 1638 # The linker can only warn and ignore the option if not recognized
Chris@40 1639 # So say no if there are warnings
Chris@40 1640 if test -s conftest.err; then
Chris@40 1641 # Append any errors to the config.log.
Chris@40 1642 cat conftest.err 1>&AS_MESSAGE_LOG_FD
Chris@40 1643 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
Chris@40 1644 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
Chris@40 1645 if diff conftest.exp conftest.er2 >/dev/null; then
Chris@40 1646 $2=yes
Chris@40 1647 fi
Chris@40 1648 else
Chris@40 1649 $2=yes
Chris@40 1650 fi
Chris@40 1651 fi
Chris@40 1652 $RM -r conftest*
Chris@40 1653 LDFLAGS=$save_LDFLAGS
Chris@40 1654 ])
Chris@40 1655
Chris@40 1656 if test yes = "[$]$2"; then
Chris@40 1657 m4_if([$4], , :, [$4])
Chris@40 1658 else
Chris@40 1659 m4_if([$5], , :, [$5])
Chris@40 1660 fi
Chris@40 1661 ])# _LT_LINKER_OPTION
Chris@40 1662
Chris@40 1663 # Old name:
Chris@40 1664 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
Chris@40 1665 dnl aclocal-1.4 backwards compatibility:
Chris@40 1666 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
Chris@40 1667
Chris@40 1668
Chris@40 1669 # LT_CMD_MAX_LEN
Chris@40 1670 #---------------
Chris@40 1671 AC_DEFUN([LT_CMD_MAX_LEN],
Chris@40 1672 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@40 1673 # find the maximum length of command line arguments
Chris@40 1674 AC_MSG_CHECKING([the maximum length of command line arguments])
Chris@40 1675 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
Chris@40 1676 i=0
Chris@40 1677 teststring=ABCD
Chris@40 1678
Chris@40 1679 case $build_os in
Chris@40 1680 msdosdjgpp*)
Chris@40 1681 # On DJGPP, this test can blow up pretty badly due to problems in libc
Chris@40 1682 # (any single argument exceeding 2000 bytes causes a buffer overrun
Chris@40 1683 # during glob expansion). Even if it were fixed, the result of this
Chris@40 1684 # check would be larger than it should be.
Chris@40 1685 lt_cv_sys_max_cmd_len=12288; # 12K is about right
Chris@40 1686 ;;
Chris@40 1687
Chris@40 1688 gnu*)
Chris@40 1689 # Under GNU Hurd, this test is not required because there is
Chris@40 1690 # no limit to the length of command line arguments.
Chris@40 1691 # Libtool will interpret -1 as no limit whatsoever
Chris@40 1692 lt_cv_sys_max_cmd_len=-1;
Chris@40 1693 ;;
Chris@40 1694
Chris@40 1695 cygwin* | mingw* | cegcc*)
Chris@40 1696 # On Win9x/ME, this test blows up -- it succeeds, but takes
Chris@40 1697 # about 5 minutes as the teststring grows exponentially.
Chris@40 1698 # Worse, since 9x/ME are not pre-emptively multitasking,
Chris@40 1699 # you end up with a "frozen" computer, even though with patience
Chris@40 1700 # the test eventually succeeds (with a max line length of 256k).
Chris@40 1701 # Instead, let's just punt: use the minimum linelength reported by
Chris@40 1702 # all of the supported platforms: 8192 (on NT/2K/XP).
Chris@40 1703 lt_cv_sys_max_cmd_len=8192;
Chris@40 1704 ;;
Chris@40 1705
Chris@40 1706 mint*)
Chris@40 1707 # On MiNT this can take a long time and run out of memory.
Chris@40 1708 lt_cv_sys_max_cmd_len=8192;
Chris@40 1709 ;;
Chris@40 1710
Chris@40 1711 amigaos*)
Chris@40 1712 # On AmigaOS with pdksh, this test takes hours, literally.
Chris@40 1713 # So we just punt and use a minimum line length of 8192.
Chris@40 1714 lt_cv_sys_max_cmd_len=8192;
Chris@40 1715 ;;
Chris@40 1716
Chris@40 1717 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
Chris@40 1718 # This has been around since 386BSD, at least. Likely further.
Chris@40 1719 if test -x /sbin/sysctl; then
Chris@40 1720 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
Chris@40 1721 elif test -x /usr/sbin/sysctl; then
Chris@40 1722 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
Chris@40 1723 else
Chris@40 1724 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
Chris@40 1725 fi
Chris@40 1726 # And add a safety zone
Chris@40 1727 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
Chris@40 1728 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
Chris@40 1729 ;;
Chris@40 1730
Chris@40 1731 interix*)
Chris@40 1732 # We know the value 262144 and hardcode it with a safety zone (like BSD)
Chris@40 1733 lt_cv_sys_max_cmd_len=196608
Chris@40 1734 ;;
Chris@40 1735
Chris@40 1736 os2*)
Chris@40 1737 # The test takes a long time on OS/2.
Chris@40 1738 lt_cv_sys_max_cmd_len=8192
Chris@40 1739 ;;
Chris@40 1740
Chris@40 1741 osf*)
Chris@40 1742 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
Chris@40 1743 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
Chris@40 1744 # nice to cause kernel panics so lets avoid the loop below.
Chris@40 1745 # First set a reasonable default.
Chris@40 1746 lt_cv_sys_max_cmd_len=16384
Chris@40 1747 #
Chris@40 1748 if test -x /sbin/sysconfig; then
Chris@40 1749 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
Chris@40 1750 *1*) lt_cv_sys_max_cmd_len=-1 ;;
Chris@40 1751 esac
Chris@40 1752 fi
Chris@40 1753 ;;
Chris@40 1754 sco3.2v5*)
Chris@40 1755 lt_cv_sys_max_cmd_len=102400
Chris@40 1756 ;;
Chris@40 1757 sysv5* | sco5v6* | sysv4.2uw2*)
Chris@40 1758 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
Chris@40 1759 if test -n "$kargmax"; then
Chris@40 1760 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
Chris@40 1761 else
Chris@40 1762 lt_cv_sys_max_cmd_len=32768
Chris@40 1763 fi
Chris@40 1764 ;;
Chris@40 1765 *)
Chris@40 1766 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
Chris@40 1767 if test -n "$lt_cv_sys_max_cmd_len" && \
Chris@40 1768 test undefined != "$lt_cv_sys_max_cmd_len"; then
Chris@40 1769 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
Chris@40 1770 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
Chris@40 1771 else
Chris@40 1772 # Make teststring a little bigger before we do anything with it.
Chris@40 1773 # a 1K string should be a reasonable start.
Chris@40 1774 for i in 1 2 3 4 5 6 7 8; do
Chris@40 1775 teststring=$teststring$teststring
Chris@40 1776 done
Chris@40 1777 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
Chris@40 1778 # If test is not a shell built-in, we'll probably end up computing a
Chris@40 1779 # maximum length that is only half of the actual maximum length, but
Chris@40 1780 # we can't tell.
Chris@40 1781 while { test X`env echo "$teststring$teststring" 2>/dev/null` \
Chris@40 1782 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
Chris@40 1783 test 17 != "$i" # 1/2 MB should be enough
Chris@40 1784 do
Chris@40 1785 i=`expr $i + 1`
Chris@40 1786 teststring=$teststring$teststring
Chris@40 1787 done
Chris@40 1788 # Only check the string length outside the loop.
Chris@40 1789 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
Chris@40 1790 teststring=
Chris@40 1791 # Add a significant safety factor because C++ compilers can tack on
Chris@40 1792 # massive amounts of additional arguments before passing them to the
Chris@40 1793 # linker. It appears as though 1/2 is a usable value.
Chris@40 1794 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
Chris@40 1795 fi
Chris@40 1796 ;;
Chris@40 1797 esac
Chris@40 1798 ])
Chris@40 1799 if test -n "$lt_cv_sys_max_cmd_len"; then
Chris@40 1800 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
Chris@40 1801 else
Chris@40 1802 AC_MSG_RESULT(none)
Chris@40 1803 fi
Chris@40 1804 max_cmd_len=$lt_cv_sys_max_cmd_len
Chris@40 1805 _LT_DECL([], [max_cmd_len], [0],
Chris@40 1806 [What is the maximum length of a command?])
Chris@40 1807 ])# LT_CMD_MAX_LEN
Chris@40 1808
Chris@40 1809 # Old name:
Chris@40 1810 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
Chris@40 1811 dnl aclocal-1.4 backwards compatibility:
Chris@40 1812 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
Chris@40 1813
Chris@40 1814
Chris@40 1815 # _LT_HEADER_DLFCN
Chris@40 1816 # ----------------
Chris@40 1817 m4_defun([_LT_HEADER_DLFCN],
Chris@40 1818 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
Chris@40 1819 ])# _LT_HEADER_DLFCN
Chris@40 1820
Chris@40 1821
Chris@40 1822 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
Chris@40 1823 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
Chris@40 1824 # ----------------------------------------------------------------
Chris@40 1825 m4_defun([_LT_TRY_DLOPEN_SELF],
Chris@40 1826 [m4_require([_LT_HEADER_DLFCN])dnl
Chris@40 1827 if test yes = "$cross_compiling"; then :
Chris@40 1828 [$4]
Chris@40 1829 else
Chris@40 1830 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
Chris@40 1831 lt_status=$lt_dlunknown
Chris@40 1832 cat > conftest.$ac_ext <<_LT_EOF
Chris@40 1833 [#line $LINENO "configure"
Chris@40 1834 #include "confdefs.h"
Chris@40 1835
Chris@40 1836 #if HAVE_DLFCN_H
Chris@40 1837 #include <dlfcn.h>
Chris@40 1838 #endif
Chris@40 1839
Chris@40 1840 #include <stdio.h>
Chris@40 1841
Chris@40 1842 #ifdef RTLD_GLOBAL
Chris@40 1843 # define LT_DLGLOBAL RTLD_GLOBAL
Chris@40 1844 #else
Chris@40 1845 # ifdef DL_GLOBAL
Chris@40 1846 # define LT_DLGLOBAL DL_GLOBAL
Chris@40 1847 # else
Chris@40 1848 # define LT_DLGLOBAL 0
Chris@40 1849 # endif
Chris@40 1850 #endif
Chris@40 1851
Chris@40 1852 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
Chris@40 1853 find out it does not work in some platform. */
Chris@40 1854 #ifndef LT_DLLAZY_OR_NOW
Chris@40 1855 # ifdef RTLD_LAZY
Chris@40 1856 # define LT_DLLAZY_OR_NOW RTLD_LAZY
Chris@40 1857 # else
Chris@40 1858 # ifdef DL_LAZY
Chris@40 1859 # define LT_DLLAZY_OR_NOW DL_LAZY
Chris@40 1860 # else
Chris@40 1861 # ifdef RTLD_NOW
Chris@40 1862 # define LT_DLLAZY_OR_NOW RTLD_NOW
Chris@40 1863 # else
Chris@40 1864 # ifdef DL_NOW
Chris@40 1865 # define LT_DLLAZY_OR_NOW DL_NOW
Chris@40 1866 # else
Chris@40 1867 # define LT_DLLAZY_OR_NOW 0
Chris@40 1868 # endif
Chris@40 1869 # endif
Chris@40 1870 # endif
Chris@40 1871 # endif
Chris@40 1872 #endif
Chris@40 1873
Chris@40 1874 /* When -fvisibility=hidden is used, assume the code has been annotated
Chris@40 1875 correspondingly for the symbols needed. */
Chris@40 1876 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
Chris@40 1877 int fnord () __attribute__((visibility("default")));
Chris@40 1878 #endif
Chris@40 1879
Chris@40 1880 int fnord () { return 42; }
Chris@40 1881 int main ()
Chris@40 1882 {
Chris@40 1883 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
Chris@40 1884 int status = $lt_dlunknown;
Chris@40 1885
Chris@40 1886 if (self)
Chris@40 1887 {
Chris@40 1888 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
Chris@40 1889 else
Chris@40 1890 {
Chris@40 1891 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
Chris@40 1892 else puts (dlerror ());
Chris@40 1893 }
Chris@40 1894 /* dlclose (self); */
Chris@40 1895 }
Chris@40 1896 else
Chris@40 1897 puts (dlerror ());
Chris@40 1898
Chris@40 1899 return status;
Chris@40 1900 }]
Chris@40 1901 _LT_EOF
Chris@40 1902 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
Chris@40 1903 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
Chris@40 1904 lt_status=$?
Chris@40 1905 case x$lt_status in
Chris@40 1906 x$lt_dlno_uscore) $1 ;;
Chris@40 1907 x$lt_dlneed_uscore) $2 ;;
Chris@40 1908 x$lt_dlunknown|x*) $3 ;;
Chris@40 1909 esac
Chris@40 1910 else :
Chris@40 1911 # compilation failed
Chris@40 1912 $3
Chris@40 1913 fi
Chris@40 1914 fi
Chris@40 1915 rm -fr conftest*
Chris@40 1916 ])# _LT_TRY_DLOPEN_SELF
Chris@40 1917
Chris@40 1918
Chris@40 1919 # LT_SYS_DLOPEN_SELF
Chris@40 1920 # ------------------
Chris@40 1921 AC_DEFUN([LT_SYS_DLOPEN_SELF],
Chris@40 1922 [m4_require([_LT_HEADER_DLFCN])dnl
Chris@40 1923 if test yes != "$enable_dlopen"; then
Chris@40 1924 enable_dlopen=unknown
Chris@40 1925 enable_dlopen_self=unknown
Chris@40 1926 enable_dlopen_self_static=unknown
Chris@40 1927 else
Chris@40 1928 lt_cv_dlopen=no
Chris@40 1929 lt_cv_dlopen_libs=
Chris@40 1930
Chris@40 1931 case $host_os in
Chris@40 1932 beos*)
Chris@40 1933 lt_cv_dlopen=load_add_on
Chris@40 1934 lt_cv_dlopen_libs=
Chris@40 1935 lt_cv_dlopen_self=yes
Chris@40 1936 ;;
Chris@40 1937
Chris@40 1938 mingw* | pw32* | cegcc*)
Chris@40 1939 lt_cv_dlopen=LoadLibrary
Chris@40 1940 lt_cv_dlopen_libs=
Chris@40 1941 ;;
Chris@40 1942
Chris@40 1943 cygwin*)
Chris@40 1944 lt_cv_dlopen=dlopen
Chris@40 1945 lt_cv_dlopen_libs=
Chris@40 1946 ;;
Chris@40 1947
Chris@40 1948 darwin*)
Chris@40 1949 # if libdl is installed we need to link against it
Chris@40 1950 AC_CHECK_LIB([dl], [dlopen],
Chris@40 1951 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
Chris@40 1952 lt_cv_dlopen=dyld
Chris@40 1953 lt_cv_dlopen_libs=
Chris@40 1954 lt_cv_dlopen_self=yes
Chris@40 1955 ])
Chris@40 1956 ;;
Chris@40 1957
Chris@40 1958 tpf*)
Chris@40 1959 # Don't try to run any link tests for TPF. We know it's impossible
Chris@40 1960 # because TPF is a cross-compiler, and we know how we open DSOs.
Chris@40 1961 lt_cv_dlopen=dlopen
Chris@40 1962 lt_cv_dlopen_libs=
Chris@40 1963 lt_cv_dlopen_self=no
Chris@40 1964 ;;
Chris@40 1965
Chris@40 1966 *)
Chris@40 1967 AC_CHECK_FUNC([shl_load],
Chris@40 1968 [lt_cv_dlopen=shl_load],
Chris@40 1969 [AC_CHECK_LIB([dld], [shl_load],
Chris@40 1970 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
Chris@40 1971 [AC_CHECK_FUNC([dlopen],
Chris@40 1972 [lt_cv_dlopen=dlopen],
Chris@40 1973 [AC_CHECK_LIB([dl], [dlopen],
Chris@40 1974 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
Chris@40 1975 [AC_CHECK_LIB([svld], [dlopen],
Chris@40 1976 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
Chris@40 1977 [AC_CHECK_LIB([dld], [dld_link],
Chris@40 1978 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
Chris@40 1979 ])
Chris@40 1980 ])
Chris@40 1981 ])
Chris@40 1982 ])
Chris@40 1983 ])
Chris@40 1984 ;;
Chris@40 1985 esac
Chris@40 1986
Chris@40 1987 if test no = "$lt_cv_dlopen"; then
Chris@40 1988 enable_dlopen=no
Chris@40 1989 else
Chris@40 1990 enable_dlopen=yes
Chris@40 1991 fi
Chris@40 1992
Chris@40 1993 case $lt_cv_dlopen in
Chris@40 1994 dlopen)
Chris@40 1995 save_CPPFLAGS=$CPPFLAGS
Chris@40 1996 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
Chris@40 1997
Chris@40 1998 save_LDFLAGS=$LDFLAGS
Chris@40 1999 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
Chris@40 2000
Chris@40 2001 save_LIBS=$LIBS
Chris@40 2002 LIBS="$lt_cv_dlopen_libs $LIBS"
Chris@40 2003
Chris@40 2004 AC_CACHE_CHECK([whether a program can dlopen itself],
Chris@40 2005 lt_cv_dlopen_self, [dnl
Chris@40 2006 _LT_TRY_DLOPEN_SELF(
Chris@40 2007 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
Chris@40 2008 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
Chris@40 2009 ])
Chris@40 2010
Chris@40 2011 if test yes = "$lt_cv_dlopen_self"; then
Chris@40 2012 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
Chris@40 2013 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
Chris@40 2014 lt_cv_dlopen_self_static, [dnl
Chris@40 2015 _LT_TRY_DLOPEN_SELF(
Chris@40 2016 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
Chris@40 2017 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
Chris@40 2018 ])
Chris@40 2019 fi
Chris@40 2020
Chris@40 2021 CPPFLAGS=$save_CPPFLAGS
Chris@40 2022 LDFLAGS=$save_LDFLAGS
Chris@40 2023 LIBS=$save_LIBS
Chris@40 2024 ;;
Chris@40 2025 esac
Chris@40 2026
Chris@40 2027 case $lt_cv_dlopen_self in
Chris@40 2028 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
Chris@40 2029 *) enable_dlopen_self=unknown ;;
Chris@40 2030 esac
Chris@40 2031
Chris@40 2032 case $lt_cv_dlopen_self_static in
Chris@40 2033 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
Chris@40 2034 *) enable_dlopen_self_static=unknown ;;
Chris@40 2035 esac
Chris@40 2036 fi
Chris@40 2037 _LT_DECL([dlopen_support], [enable_dlopen], [0],
Chris@40 2038 [Whether dlopen is supported])
Chris@40 2039 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
Chris@40 2040 [Whether dlopen of programs is supported])
Chris@40 2041 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
Chris@40 2042 [Whether dlopen of statically linked programs is supported])
Chris@40 2043 ])# LT_SYS_DLOPEN_SELF
Chris@40 2044
Chris@40 2045 # Old name:
Chris@40 2046 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
Chris@40 2047 dnl aclocal-1.4 backwards compatibility:
Chris@40 2048 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
Chris@40 2049
Chris@40 2050
Chris@40 2051 # _LT_COMPILER_C_O([TAGNAME])
Chris@40 2052 # ---------------------------
Chris@40 2053 # Check to see if options -c and -o are simultaneously supported by compiler.
Chris@40 2054 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
Chris@40 2055 m4_defun([_LT_COMPILER_C_O],
Chris@40 2056 [m4_require([_LT_DECL_SED])dnl
Chris@40 2057 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@40 2058 m4_require([_LT_TAG_COMPILER])dnl
Chris@40 2059 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
Chris@40 2060 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
Chris@40 2061 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
Chris@40 2062 $RM -r conftest 2>/dev/null
Chris@40 2063 mkdir conftest
Chris@40 2064 cd conftest
Chris@40 2065 mkdir out
Chris@40 2066 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
Chris@40 2067
Chris@40 2068 lt_compiler_flag="-o out/conftest2.$ac_objext"
Chris@40 2069 # Insert the option either (1) after the last *FLAGS variable, or
Chris@40 2070 # (2) before a word containing "conftest.", or (3) at the end.
Chris@40 2071 # Note that $ac_compile itself does not contain backslashes and begins
Chris@40 2072 # with a dollar sign (not a hyphen), so the echo should work correctly.
Chris@40 2073 lt_compile=`echo "$ac_compile" | $SED \
Chris@40 2074 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
Chris@40 2075 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
Chris@40 2076 -e 's:$: $lt_compiler_flag:'`
Chris@40 2077 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
Chris@40 2078 (eval "$lt_compile" 2>out/conftest.err)
Chris@40 2079 ac_status=$?
Chris@40 2080 cat out/conftest.err >&AS_MESSAGE_LOG_FD
Chris@40 2081 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
Chris@40 2082 if (exit $ac_status) && test -s out/conftest2.$ac_objext
Chris@40 2083 then
Chris@40 2084 # The compiler can only warn and ignore the option if not recognized
Chris@40 2085 # So say no if there are warnings
Chris@40 2086 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
Chris@40 2087 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
Chris@40 2088 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
Chris@40 2089 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
Chris@40 2090 fi
Chris@40 2091 fi
Chris@40 2092 chmod u+w . 2>&AS_MESSAGE_LOG_FD
Chris@40 2093 $RM conftest*
Chris@40 2094 # SGI C++ compiler will create directory out/ii_files/ for
Chris@40 2095 # template instantiation
Chris@40 2096 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
Chris@40 2097 $RM out/* && rmdir out
Chris@40 2098 cd ..
Chris@40 2099 $RM -r conftest
Chris@40 2100 $RM conftest*
Chris@40 2101 ])
Chris@40 2102 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
Chris@40 2103 [Does compiler simultaneously support -c and -o options?])
Chris@40 2104 ])# _LT_COMPILER_C_O
Chris@40 2105
Chris@40 2106
Chris@40 2107 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
Chris@40 2108 # ----------------------------------
Chris@40 2109 # Check to see if we can do hard links to lock some files if needed
Chris@40 2110 m4_defun([_LT_COMPILER_FILE_LOCKS],
Chris@40 2111 [m4_require([_LT_ENABLE_LOCK])dnl
Chris@40 2112 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@40 2113 _LT_COMPILER_C_O([$1])
Chris@40 2114
Chris@40 2115 hard_links=nottested
Chris@40 2116 if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
Chris@40 2117 # do not overwrite the value of need_locks provided by the user
Chris@40 2118 AC_MSG_CHECKING([if we can lock with hard links])
Chris@40 2119 hard_links=yes
Chris@40 2120 $RM conftest*
Chris@40 2121 ln conftest.a conftest.b 2>/dev/null && hard_links=no
Chris@40 2122 touch conftest.a
Chris@40 2123 ln conftest.a conftest.b 2>&5 || hard_links=no
Chris@40 2124 ln conftest.a conftest.b 2>/dev/null && hard_links=no
Chris@40 2125 AC_MSG_RESULT([$hard_links])
Chris@40 2126 if test no = "$hard_links"; then
Chris@40 2127 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
Chris@40 2128 need_locks=warn
Chris@40 2129 fi
Chris@40 2130 else
Chris@40 2131 need_locks=no
Chris@40 2132 fi
Chris@40 2133 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
Chris@40 2134 ])# _LT_COMPILER_FILE_LOCKS
Chris@40 2135
Chris@40 2136
Chris@40 2137 # _LT_CHECK_OBJDIR
Chris@40 2138 # ----------------
Chris@40 2139 m4_defun([_LT_CHECK_OBJDIR],
Chris@40 2140 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
Chris@40 2141 [rm -f .libs 2>/dev/null
Chris@40 2142 mkdir .libs 2>/dev/null
Chris@40 2143 if test -d .libs; then
Chris@40 2144 lt_cv_objdir=.libs
Chris@40 2145 else
Chris@40 2146 # MS-DOS does not allow filenames that begin with a dot.
Chris@40 2147 lt_cv_objdir=_libs
Chris@40 2148 fi
Chris@40 2149 rmdir .libs 2>/dev/null])
Chris@40 2150 objdir=$lt_cv_objdir
Chris@40 2151 _LT_DECL([], [objdir], [0],
Chris@40 2152 [The name of the directory that contains temporary libtool files])dnl
Chris@40 2153 m4_pattern_allow([LT_OBJDIR])dnl
Chris@40 2154 AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
Chris@40 2155 [Define to the sub-directory where libtool stores uninstalled libraries.])
Chris@40 2156 ])# _LT_CHECK_OBJDIR
Chris@40 2157
Chris@40 2158
Chris@40 2159 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
Chris@40 2160 # --------------------------------------
Chris@40 2161 # Check hardcoding attributes.
Chris@40 2162 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
Chris@40 2163 [AC_MSG_CHECKING([how to hardcode library paths into programs])
Chris@40 2164 _LT_TAGVAR(hardcode_action, $1)=
Chris@40 2165 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
Chris@40 2166 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
Chris@40 2167 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
Chris@40 2168
Chris@40 2169 # We can hardcode non-existent directories.
Chris@40 2170 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
Chris@40 2171 # If the only mechanism to avoid hardcoding is shlibpath_var, we
Chris@40 2172 # have to relink, otherwise we might link with an installed library
Chris@40 2173 # when we should be linking with a yet-to-be-installed one
Chris@40 2174 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
Chris@40 2175 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
Chris@40 2176 # Linking always hardcodes the temporary library directory.
Chris@40 2177 _LT_TAGVAR(hardcode_action, $1)=relink
Chris@40 2178 else
Chris@40 2179 # We can link without hardcoding, and we can hardcode nonexisting dirs.
Chris@40 2180 _LT_TAGVAR(hardcode_action, $1)=immediate
Chris@40 2181 fi
Chris@40 2182 else
Chris@40 2183 # We cannot hardcode anything, or else we can only hardcode existing
Chris@40 2184 # directories.
Chris@40 2185 _LT_TAGVAR(hardcode_action, $1)=unsupported
Chris@40 2186 fi
Chris@40 2187 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
Chris@40 2188
Chris@40 2189 if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
Chris@40 2190 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
Chris@40 2191 # Fast installation is not supported
Chris@40 2192 enable_fast_install=no
Chris@40 2193 elif test yes = "$shlibpath_overrides_runpath" ||
Chris@40 2194 test no = "$enable_shared"; then
Chris@40 2195 # Fast installation is not necessary
Chris@40 2196 enable_fast_install=needless
Chris@40 2197 fi
Chris@40 2198 _LT_TAGDECL([], [hardcode_action], [0],
Chris@40 2199 [How to hardcode a shared library path into an executable])
Chris@40 2200 ])# _LT_LINKER_HARDCODE_LIBPATH
Chris@40 2201
Chris@40 2202
Chris@40 2203 # _LT_CMD_STRIPLIB
Chris@40 2204 # ----------------
Chris@40 2205 m4_defun([_LT_CMD_STRIPLIB],
Chris@40 2206 [m4_require([_LT_DECL_EGREP])
Chris@40 2207 striplib=
Chris@40 2208 old_striplib=
Chris@40 2209 AC_MSG_CHECKING([whether stripping libraries is possible])
Chris@40 2210 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
Chris@40 2211 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
Chris@40 2212 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
Chris@40 2213 AC_MSG_RESULT([yes])
Chris@40 2214 else
Chris@40 2215 # FIXME - insert some real tests, host_os isn't really good enough
Chris@40 2216 case $host_os in
Chris@40 2217 darwin*)
Chris@40 2218 if test -n "$STRIP"; then
Chris@40 2219 striplib="$STRIP -x"
Chris@40 2220 old_striplib="$STRIP -S"
Chris@40 2221 AC_MSG_RESULT([yes])
Chris@40 2222 else
Chris@40 2223 AC_MSG_RESULT([no])
Chris@40 2224 fi
Chris@40 2225 ;;
Chris@40 2226 *)
Chris@40 2227 AC_MSG_RESULT([no])
Chris@40 2228 ;;
Chris@40 2229 esac
Chris@40 2230 fi
Chris@40 2231 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
Chris@40 2232 _LT_DECL([], [striplib], [1])
Chris@40 2233 ])# _LT_CMD_STRIPLIB
Chris@40 2234
Chris@40 2235
Chris@40 2236 # _LT_PREPARE_MUNGE_PATH_LIST
Chris@40 2237 # ---------------------------
Chris@40 2238 # Make sure func_munge_path_list() is defined correctly.
Chris@40 2239 m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
Chris@40 2240 [[# func_munge_path_list VARIABLE PATH
Chris@40 2241 # -----------------------------------
Chris@40 2242 # VARIABLE is name of variable containing _space_ separated list of
Chris@40 2243 # directories to be munged by the contents of PATH, which is string
Chris@40 2244 # having a format:
Chris@40 2245 # "DIR[:DIR]:"
Chris@40 2246 # string "DIR[ DIR]" will be prepended to VARIABLE
Chris@40 2247 # ":DIR[:DIR]"
Chris@40 2248 # string "DIR[ DIR]" will be appended to VARIABLE
Chris@40 2249 # "DIRP[:DIRP]::[DIRA:]DIRA"
Chris@40 2250 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
Chris@40 2251 # "DIRA[ DIRA]" will be appended to VARIABLE
Chris@40 2252 # "DIR[:DIR]"
Chris@40 2253 # VARIABLE will be replaced by "DIR[ DIR]"
Chris@40 2254 func_munge_path_list ()
Chris@40 2255 {
Chris@40 2256 case x@S|@2 in
Chris@40 2257 x)
Chris@40 2258 ;;
Chris@40 2259 *:)
Chris@40 2260 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
Chris@40 2261 ;;
Chris@40 2262 x:*)
Chris@40 2263 eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
Chris@40 2264 ;;
Chris@40 2265 *::*)
Chris@40 2266 eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
Chris@40 2267 eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
Chris@40 2268 ;;
Chris@40 2269 *)
Chris@40 2270 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
Chris@40 2271 ;;
Chris@40 2272 esac
Chris@40 2273 }
Chris@40 2274 ]])# _LT_PREPARE_PATH_LIST
Chris@40 2275
Chris@40 2276
Chris@40 2277 # _LT_SYS_DYNAMIC_LINKER([TAG])
Chris@40 2278 # -----------------------------
Chris@40 2279 # PORTME Fill in your ld.so characteristics
Chris@40 2280 m4_defun([_LT_SYS_DYNAMIC_LINKER],
Chris@40 2281 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@40 2282 m4_require([_LT_DECL_EGREP])dnl
Chris@40 2283 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@40 2284 m4_require([_LT_DECL_OBJDUMP])dnl
Chris@40 2285 m4_require([_LT_DECL_SED])dnl
Chris@40 2286 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
Chris@40 2287 m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
Chris@40 2288 AC_MSG_CHECKING([dynamic linker characteristics])
Chris@40 2289 m4_if([$1],
Chris@40 2290 [], [
Chris@40 2291 if test yes = "$GCC"; then
Chris@40 2292 case $host_os in
Chris@40 2293 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
Chris@40 2294 *) lt_awk_arg='/^libraries:/' ;;
Chris@40 2295 esac
Chris@40 2296 case $host_os in
Chris@40 2297 mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
Chris@40 2298 *) lt_sed_strip_eq='s|=/|/|g' ;;
Chris@40 2299 esac
Chris@40 2300 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
Chris@40 2301 case $lt_search_path_spec in
Chris@40 2302 *\;*)
Chris@40 2303 # if the path contains ";" then we assume it to be the separator
Chris@40 2304 # otherwise default to the standard path separator (i.e. ":") - it is
Chris@40 2305 # assumed that no part of a normal pathname contains ";" but that should
Chris@40 2306 # okay in the real world where ";" in dirpaths is itself problematic.
Chris@40 2307 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
Chris@40 2308 ;;
Chris@40 2309 *)
Chris@40 2310 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
Chris@40 2311 ;;
Chris@40 2312 esac
Chris@40 2313 # Ok, now we have the path, separated by spaces, we can step through it
Chris@40 2314 # and add multilib dir if necessary...
Chris@40 2315 lt_tmp_lt_search_path_spec=
Chris@40 2316 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
Chris@40 2317 # ...but if some path component already ends with the multilib dir we assume
Chris@40 2318 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
Chris@40 2319 case "$lt_multi_os_dir; $lt_search_path_spec " in
Chris@40 2320 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
Chris@40 2321 lt_multi_os_dir=
Chris@40 2322 ;;
Chris@40 2323 esac
Chris@40 2324 for lt_sys_path in $lt_search_path_spec; do
Chris@40 2325 if test -d "$lt_sys_path$lt_multi_os_dir"; then
Chris@40 2326 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
Chris@40 2327 elif test -n "$lt_multi_os_dir"; then
Chris@40 2328 test -d "$lt_sys_path" && \
Chris@40 2329 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
Chris@40 2330 fi
Chris@40 2331 done
Chris@40 2332 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
Chris@40 2333 BEGIN {RS = " "; FS = "/|\n";} {
Chris@40 2334 lt_foo = "";
Chris@40 2335 lt_count = 0;
Chris@40 2336 for (lt_i = NF; lt_i > 0; lt_i--) {
Chris@40 2337 if ($lt_i != "" && $lt_i != ".") {
Chris@40 2338 if ($lt_i == "..") {
Chris@40 2339 lt_count++;
Chris@40 2340 } else {
Chris@40 2341 if (lt_count == 0) {
Chris@40 2342 lt_foo = "/" $lt_i lt_foo;
Chris@40 2343 } else {
Chris@40 2344 lt_count--;
Chris@40 2345 }
Chris@40 2346 }
Chris@40 2347 }
Chris@40 2348 }
Chris@40 2349 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
Chris@40 2350 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
Chris@40 2351 }'`
Chris@40 2352 # AWK program above erroneously prepends '/' to C:/dos/paths
Chris@40 2353 # for these hosts.
Chris@40 2354 case $host_os in
Chris@40 2355 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
Chris@40 2356 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
Chris@40 2357 esac
Chris@40 2358 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
Chris@40 2359 else
Chris@40 2360 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
Chris@40 2361 fi])
Chris@40 2362 library_names_spec=
Chris@40 2363 libname_spec='lib$name'
Chris@40 2364 soname_spec=
Chris@40 2365 shrext_cmds=.so
Chris@40 2366 postinstall_cmds=
Chris@40 2367 postuninstall_cmds=
Chris@40 2368 finish_cmds=
Chris@40 2369 finish_eval=
Chris@40 2370 shlibpath_var=
Chris@40 2371 shlibpath_overrides_runpath=unknown
Chris@40 2372 version_type=none
Chris@40 2373 dynamic_linker="$host_os ld.so"
Chris@40 2374 sys_lib_dlsearch_path_spec="/lib /usr/lib"
Chris@40 2375 need_lib_prefix=unknown
Chris@40 2376 hardcode_into_libs=no
Chris@40 2377
Chris@40 2378 # when you set need_version to no, make sure it does not cause -set_version
Chris@40 2379 # flags to be left without arguments
Chris@40 2380 need_version=unknown
Chris@40 2381
Chris@40 2382 AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
Chris@40 2383 [User-defined run-time library search path.])
Chris@40 2384
Chris@40 2385 case $host_os in
Chris@40 2386 aix3*)
Chris@40 2387 version_type=linux # correct to gnu/linux during the next big refactor
Chris@40 2388 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
Chris@40 2389 shlibpath_var=LIBPATH
Chris@40 2390
Chris@40 2391 # AIX 3 has no versioning support, so we append a major version to the name.
Chris@40 2392 soname_spec='$libname$release$shared_ext$major'
Chris@40 2393 ;;
Chris@40 2394
Chris@40 2395 aix[[4-9]]*)
Chris@40 2396 version_type=linux # correct to gnu/linux during the next big refactor
Chris@40 2397 need_lib_prefix=no
Chris@40 2398 need_version=no
Chris@40 2399 hardcode_into_libs=yes
Chris@40 2400 if test ia64 = "$host_cpu"; then
Chris@40 2401 # AIX 5 supports IA64
Chris@40 2402 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
Chris@40 2403 shlibpath_var=LD_LIBRARY_PATH
Chris@40 2404 else
Chris@40 2405 # With GCC up to 2.95.x, collect2 would create an import file
Chris@40 2406 # for dependence libraries. The import file would start with
Chris@40 2407 # the line '#! .'. This would cause the generated library to
Chris@40 2408 # depend on '.', always an invalid library. This was fixed in
Chris@40 2409 # development snapshots of GCC prior to 3.0.
Chris@40 2410 case $host_os in
Chris@40 2411 aix4 | aix4.[[01]] | aix4.[[01]].*)
Chris@40 2412 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
Chris@40 2413 echo ' yes '
Chris@40 2414 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
Chris@40 2415 :
Chris@40 2416 else
Chris@40 2417 can_build_shared=no
Chris@40 2418 fi
Chris@40 2419 ;;
Chris@40 2420 esac
Chris@40 2421 # Using Import Files as archive members, it is possible to support
Chris@40 2422 # filename-based versioning of shared library archives on AIX. While
Chris@40 2423 # this would work for both with and without runtime linking, it will
Chris@40 2424 # prevent static linking of such archives. So we do filename-based
Chris@40 2425 # shared library versioning with .so extension only, which is used
Chris@40 2426 # when both runtime linking and shared linking is enabled.
Chris@40 2427 # Unfortunately, runtime linking may impact performance, so we do
Chris@40 2428 # not want this to be the default eventually. Also, we use the
Chris@40 2429 # versioned .so libs for executables only if there is the -brtl
Chris@40 2430 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
Chris@40 2431 # To allow for filename-based versioning support, we need to create
Chris@40 2432 # libNAME.so.V as an archive file, containing:
Chris@40 2433 # *) an Import File, referring to the versioned filename of the
Chris@40 2434 # archive as well as the shared archive member, telling the
Chris@40 2435 # bitwidth (32 or 64) of that shared object, and providing the
Chris@40 2436 # list of exported symbols of that shared object, eventually
Chris@40 2437 # decorated with the 'weak' keyword
Chris@40 2438 # *) the shared object with the F_LOADONLY flag set, to really avoid
Chris@40 2439 # it being seen by the linker.
Chris@40 2440 # At run time we better use the real file rather than another symlink,
Chris@40 2441 # but for link time we create the symlink libNAME.so -> libNAME.so.V
Chris@40 2442
Chris@40 2443 case $with_aix_soname,$aix_use_runtimelinking in
Chris@40 2444 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
Chris@40 2445 # soname into executable. Probably we can add versioning support to
Chris@40 2446 # collect2, so additional links can be useful in future.
Chris@40 2447 aix,yes) # traditional libtool
Chris@40 2448 dynamic_linker='AIX unversionable lib.so'
Chris@40 2449 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
Chris@40 2450 # instead of lib<name>.a to let people know that these are not
Chris@40 2451 # typical AIX shared libraries.
Chris@40 2452 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@40 2453 ;;
Chris@40 2454 aix,no) # traditional AIX only
Chris@40 2455 dynamic_linker='AIX lib.a[(]lib.so.V[)]'
Chris@40 2456 # We preserve .a as extension for shared libraries through AIX4.2
Chris@40 2457 # and later when we are not doing run time linking.
Chris@40 2458 library_names_spec='$libname$release.a $libname.a'
Chris@40 2459 soname_spec='$libname$release$shared_ext$major'
Chris@40 2460 ;;
Chris@40 2461 svr4,*) # full svr4 only
Chris@40 2462 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
Chris@40 2463 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
Chris@40 2464 # We do not specify a path in Import Files, so LIBPATH fires.
Chris@40 2465 shlibpath_overrides_runpath=yes
Chris@40 2466 ;;
Chris@40 2467 *,yes) # both, prefer svr4
Chris@40 2468 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
Chris@40 2469 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
Chris@40 2470 # unpreferred sharedlib libNAME.a needs extra handling
Chris@40 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@40 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@40 2473 # We do not specify a path in Import Files, so LIBPATH fires.
Chris@40 2474 shlibpath_overrides_runpath=yes
Chris@40 2475 ;;
Chris@40 2476 *,no) # both, prefer aix
Chris@40 2477 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
Chris@40 2478 library_names_spec='$libname$release.a $libname.a'
Chris@40 2479 soname_spec='$libname$release$shared_ext$major'
Chris@40 2480 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
Chris@40 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@40 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@40 2483 ;;
Chris@40 2484 esac
Chris@40 2485 shlibpath_var=LIBPATH
Chris@40 2486 fi
Chris@40 2487 ;;
Chris@40 2488
Chris@40 2489 amigaos*)
Chris@40 2490 case $host_cpu in
Chris@40 2491 powerpc)
Chris@40 2492 # Since July 2007 AmigaOS4 officially supports .so libraries.
Chris@40 2493 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
Chris@40 2494 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@40 2495 ;;
Chris@40 2496 m68k)
Chris@40 2497 library_names_spec='$libname.ixlibrary $libname.a'
Chris@40 2498 # Create ${libname}_ixlibrary.a entries in /sys/libs.
Chris@40 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@40 2500 ;;
Chris@40 2501 esac
Chris@40 2502 ;;
Chris@40 2503
Chris@40 2504 beos*)
Chris@40 2505 library_names_spec='$libname$shared_ext'
Chris@40 2506 dynamic_linker="$host_os ld.so"
Chris@40 2507 shlibpath_var=LIBRARY_PATH
Chris@40 2508 ;;
Chris@40 2509
Chris@40 2510 bsdi[[45]]*)
Chris@40 2511 version_type=linux # correct to gnu/linux during the next big refactor
Chris@40 2512 need_version=no
Chris@40 2513 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@40 2514 soname_spec='$libname$release$shared_ext$major'
Chris@40 2515 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
Chris@40 2516 shlibpath_var=LD_LIBRARY_PATH
Chris@40 2517 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
Chris@40 2518 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
Chris@40 2519 # the default ld.so.conf also contains /usr/contrib/lib and
Chris@40 2520 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
Chris@40 2521 # libtool to hard-code these into programs
Chris@40 2522 ;;
Chris@40 2523
Chris@40 2524 cygwin* | mingw* | pw32* | cegcc*)
Chris@40 2525 version_type=windows
Chris@40 2526 shrext_cmds=.dll
Chris@40 2527 need_version=no
Chris@40 2528 need_lib_prefix=no
Chris@40 2529
Chris@40 2530 case $GCC,$cc_basename in
Chris@40 2531 yes,*)
Chris@40 2532 # gcc
Chris@40 2533 library_names_spec='$libname.dll.a'
Chris@40 2534 # DLL is installed to $(libdir)/../bin by postinstall_cmds
Chris@40 2535 postinstall_cmds='base_file=`basename \$file`~
Chris@40 2536 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
Chris@40 2537 dldir=$destdir/`dirname \$dlpath`~
Chris@40 2538 test -d \$dldir || mkdir -p \$dldir~
Chris@40 2539 $install_prog $dir/$dlname \$dldir/$dlname~
Chris@40 2540 chmod a+x \$dldir/$dlname~
Chris@40 2541 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
Chris@40 2542 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
Chris@40 2543 fi'
Chris@40 2544 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
Chris@40 2545 dlpath=$dir/\$dldll~
Chris@40 2546 $RM \$dlpath'
Chris@40 2547 shlibpath_overrides_runpath=yes
Chris@40 2548
Chris@40 2549 case $host_os in
Chris@40 2550 cygwin*)
Chris@40 2551 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
Chris@40 2552 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
Chris@40 2553 m4_if([$1], [],[
Chris@40 2554 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
Chris@40 2555 ;;
Chris@40 2556 mingw* | cegcc*)
Chris@40 2557 # MinGW DLLs use traditional 'lib' prefix
Chris@40 2558 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
Chris@40 2559 ;;
Chris@40 2560 pw32*)
Chris@40 2561 # pw32 DLLs use 'pw' prefix rather than 'lib'
Chris@40 2562 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
Chris@40 2563 ;;
Chris@40 2564 esac
Chris@40 2565 dynamic_linker='Win32 ld.exe'
Chris@40 2566 ;;
Chris@40 2567
Chris@40 2568 *,cl*)
Chris@40 2569 # Native MSVC
Chris@40 2570 libname_spec='$name'
Chris@40 2571 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
Chris@40 2572 library_names_spec='$libname.dll.lib'
Chris@40 2573
Chris@40 2574 case $build_os in
Chris@40 2575 mingw*)
Chris@40 2576 sys_lib_search_path_spec=
Chris@40 2577 lt_save_ifs=$IFS
Chris@40 2578 IFS=';'
Chris@40 2579 for lt_path in $LIB
Chris@40 2580 do
Chris@40 2581 IFS=$lt_save_ifs
Chris@40 2582 # Let DOS variable expansion print the short 8.3 style file name.
Chris@40 2583 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
Chris@40 2584 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
Chris@40 2585 done
Chris@40 2586 IFS=$lt_save_ifs
Chris@40 2587 # Convert to MSYS style.
Chris@40 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@40 2589 ;;
Chris@40 2590 cygwin*)
Chris@40 2591 # Convert to unix form, then to dos form, then back to unix form
Chris@40 2592 # but this time dos style (no spaces!) so that the unix form looks
Chris@40 2593 # like /cygdrive/c/PROGRA~1:/cygdr...
Chris@40 2594 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
Chris@40 2595 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
Chris@40 2596 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
Chris@40 2597 ;;
Chris@40 2598 *)
Chris@40 2599 sys_lib_search_path_spec=$LIB
Chris@40 2600 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
Chris@40 2601 # It is most probably a Windows format PATH.
Chris@40 2602 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
Chris@40 2603 else
Chris@40 2604 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
Chris@40 2605 fi
Chris@40 2606 # FIXME: find the short name or the path components, as spaces are
Chris@40 2607 # common. (e.g. "Program Files" -> "PROGRA~1")
Chris@40 2608 ;;
Chris@40 2609 esac
Chris@40 2610
Chris@40 2611 # DLL is installed to $(libdir)/../bin by postinstall_cmds
Chris@40 2612 postinstall_cmds='base_file=`basename \$file`~
Chris@40 2613 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
Chris@40 2614 dldir=$destdir/`dirname \$dlpath`~
Chris@40 2615 test -d \$dldir || mkdir -p \$dldir~
Chris@40 2616 $install_prog $dir/$dlname \$dldir/$dlname'
Chris@40 2617 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
Chris@40 2618 dlpath=$dir/\$dldll~
Chris@40 2619 $RM \$dlpath'
Chris@40 2620 shlibpath_overrides_runpath=yes
Chris@40 2621 dynamic_linker='Win32 link.exe'
Chris@40 2622 ;;
Chris@40 2623
Chris@40 2624 *)
Chris@40 2625 # Assume MSVC wrapper
Chris@40 2626 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
Chris@40 2627 dynamic_linker='Win32 ld.exe'
Chris@40 2628 ;;
Chris@40 2629 esac
Chris@40 2630 # FIXME: first we should search . and the directory the executable is in
Chris@40 2631 shlibpath_var=PATH
Chris@40 2632 ;;
Chris@40 2633
Chris@40 2634 darwin* | rhapsody*)
Chris@40 2635 dynamic_linker="$host_os dyld"
Chris@40 2636 version_type=darwin
Chris@40 2637 need_lib_prefix=no
Chris@40 2638 need_version=no
Chris@40 2639 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
Chris@40 2640 soname_spec='$libname$release$major$shared_ext'
Chris@40 2641 shlibpath_overrides_runpath=yes
Chris@40 2642 shlibpath_var=DYLD_LIBRARY_PATH
Chris@40 2643 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
Chris@40 2644 m4_if([$1], [],[
Chris@40 2645 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
Chris@40 2646 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
Chris@40 2647 ;;
Chris@40 2648
Chris@40 2649 dgux*)
Chris@40 2650 version_type=linux # correct to gnu/linux during the next big refactor
Chris@40 2651 need_lib_prefix=no
Chris@40 2652 need_version=no
Chris@40 2653 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@40 2654 soname_spec='$libname$release$shared_ext$major'
Chris@40 2655 shlibpath_var=LD_LIBRARY_PATH
Chris@40 2656 ;;
Chris@40 2657
Chris@40 2658 freebsd* | dragonfly*)
Chris@40 2659 # DragonFly does not have aout. When/if they implement a new
Chris@40 2660 # versioning mechanism, adjust this.
Chris@40 2661 if test -x /usr/bin/objformat; then
Chris@40 2662 objformat=`/usr/bin/objformat`
Chris@40 2663 else
Chris@40 2664 case $host_os in
Chris@40 2665 freebsd[[23]].*) objformat=aout ;;
Chris@40 2666 *) objformat=elf ;;
Chris@40 2667 esac
Chris@40 2668 fi
Chris@40 2669 version_type=freebsd-$objformat
Chris@40 2670 case $version_type in
Chris@40 2671 freebsd-elf*)
Chris@40 2672 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@40 2673 soname_spec='$libname$release$shared_ext$major'
Chris@40 2674 need_version=no
Chris@40 2675 need_lib_prefix=no
Chris@40 2676 ;;
Chris@40 2677 freebsd-*)
Chris@40 2678 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
Chris@40 2679 need_version=yes
Chris@40 2680 ;;
Chris@40 2681 esac
Chris@40 2682 shlibpath_var=LD_LIBRARY_PATH
Chris@40 2683 case $host_os in
Chris@40 2684 freebsd2.*)
Chris@40 2685 shlibpath_overrides_runpath=yes
Chris@40 2686 ;;
Chris@40 2687 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
Chris@40 2688 shlibpath_overrides_runpath=yes
Chris@40 2689 hardcode_into_libs=yes
Chris@40 2690 ;;
Chris@40 2691 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
Chris@40 2692 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
Chris@40 2693 shlibpath_overrides_runpath=no
Chris@40 2694 hardcode_into_libs=yes
Chris@40 2695 ;;
Chris@40 2696 *) # from 4.6 on, and DragonFly
Chris@40 2697 shlibpath_overrides_runpath=yes
Chris@40 2698 hardcode_into_libs=yes
Chris@40 2699 ;;
Chris@40 2700 esac
Chris@40 2701 ;;
Chris@40 2702
Chris@40 2703 haiku*)
Chris@40 2704 version_type=linux # correct to gnu/linux during the next big refactor
Chris@40 2705 need_lib_prefix=no
Chris@40 2706 need_version=no
Chris@40 2707 dynamic_linker="$host_os runtime_loader"
Chris@40 2708 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@40 2709 soname_spec='$libname$release$shared_ext$major'
Chris@40 2710 shlibpath_var=LIBRARY_PATH
Chris@40 2711 shlibpath_overrides_runpath=no
Chris@40 2712 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
Chris@40 2713 hardcode_into_libs=yes
Chris@40 2714 ;;
Chris@40 2715
Chris@40 2716 hpux9* | hpux10* | hpux11*)
Chris@40 2717 # Give a soname corresponding to the major version so that dld.sl refuses to
Chris@40 2718 # link against other versions.
Chris@40 2719 version_type=sunos
Chris@40 2720 need_lib_prefix=no
Chris@40 2721 need_version=no
Chris@40 2722 case $host_cpu in
Chris@40 2723 ia64*)
Chris@40 2724 shrext_cmds='.so'
Chris@40 2725 hardcode_into_libs=yes
Chris@40 2726 dynamic_linker="$host_os dld.so"
Chris@40 2727 shlibpath_var=LD_LIBRARY_PATH
Chris@40 2728 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
Chris@40 2729 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@40 2730 soname_spec='$libname$release$shared_ext$major'
Chris@40 2731 if test 32 = "$HPUX_IA64_MODE"; then
Chris@40 2732 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
Chris@40 2733 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
Chris@40 2734 else
Chris@40 2735 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
Chris@40 2736 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
Chris@40 2737 fi
Chris@40 2738 ;;
Chris@40 2739 hppa*64*)
Chris@40 2740 shrext_cmds='.sl'
Chris@40 2741 hardcode_into_libs=yes
Chris@40 2742 dynamic_linker="$host_os dld.sl"
Chris@40 2743 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
Chris@40 2744 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
Chris@40 2745 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@40 2746 soname_spec='$libname$release$shared_ext$major'
Chris@40 2747 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
Chris@40 2748 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
Chris@40 2749 ;;
Chris@40 2750 *)
Chris@40 2751 shrext_cmds='.sl'
Chris@40 2752 dynamic_linker="$host_os dld.sl"
Chris@40 2753 shlibpath_var=SHLIB_PATH
Chris@40 2754 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
Chris@40 2755 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@40 2756 soname_spec='$libname$release$shared_ext$major'
Chris@40 2757 ;;
Chris@40 2758 esac
Chris@40 2759 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
Chris@40 2760 postinstall_cmds='chmod 555 $lib'
Chris@40 2761 # or fails outright, so override atomically:
Chris@40 2762 install_override_mode=555
Chris@40 2763 ;;
Chris@40 2764
Chris@40 2765 interix[[3-9]]*)
Chris@40 2766 version_type=linux # correct to gnu/linux during the next big refactor
Chris@40 2767 need_lib_prefix=no
Chris@40 2768 need_version=no
Chris@40 2769 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@40 2770 soname_spec='$libname$release$shared_ext$major'
Chris@40 2771 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
Chris@40 2772 shlibpath_var=LD_LIBRARY_PATH
Chris@40 2773 shlibpath_overrides_runpath=no
Chris@40 2774 hardcode_into_libs=yes
Chris@40 2775 ;;
Chris@40 2776
Chris@40 2777 irix5* | irix6* | nonstopux*)
Chris@40 2778 case $host_os in
Chris@40 2779 nonstopux*) version_type=nonstopux ;;
Chris@40 2780 *)
Chris@40 2781 if test yes = "$lt_cv_prog_gnu_ld"; then
Chris@40 2782 version_type=linux # correct to gnu/linux during the next big refactor
Chris@40 2783 else
Chris@40 2784 version_type=irix
Chris@40 2785 fi ;;
Chris@40 2786 esac
Chris@40 2787 need_lib_prefix=no
Chris@40 2788 need_version=no
Chris@40 2789 soname_spec='$libname$release$shared_ext$major'
Chris@40 2790 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
Chris@40 2791 case $host_os in
Chris@40 2792 irix5* | nonstopux*)
Chris@40 2793 libsuff= shlibsuff=
Chris@40 2794 ;;
Chris@40 2795 *)
Chris@40 2796 case $LD in # libtool.m4 will add one of these switches to LD
Chris@40 2797 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
Chris@40 2798 libsuff= shlibsuff= libmagic=32-bit;;
Chris@40 2799 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
Chris@40 2800 libsuff=32 shlibsuff=N32 libmagic=N32;;
Chris@40 2801 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
Chris@40 2802 libsuff=64 shlibsuff=64 libmagic=64-bit;;
Chris@40 2803 *) libsuff= shlibsuff= libmagic=never-match;;
Chris@40 2804 esac
Chris@40 2805 ;;
Chris@40 2806 esac
Chris@40 2807 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
Chris@40 2808 shlibpath_overrides_runpath=no
Chris@40 2809 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
Chris@40 2810 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
Chris@40 2811 hardcode_into_libs=yes
Chris@40 2812 ;;
Chris@40 2813
Chris@40 2814 # No shared lib support for Linux oldld, aout, or coff.
Chris@40 2815 linux*oldld* | linux*aout* | linux*coff*)
Chris@40 2816 dynamic_linker=no
Chris@40 2817 ;;
Chris@40 2818
Chris@40 2819 linux*android*)
Chris@40 2820 version_type=none # Android doesn't support versioned libraries.
Chris@40 2821 need_lib_prefix=no
Chris@40 2822 need_version=no
Chris@40 2823 library_names_spec='$libname$release$shared_ext'
Chris@40 2824 soname_spec='$libname$release$shared_ext'
Chris@40 2825 finish_cmds=
Chris@40 2826 shlibpath_var=LD_LIBRARY_PATH
Chris@40 2827 shlibpath_overrides_runpath=yes
Chris@40 2828
Chris@40 2829 # This implies no fast_install, which is unacceptable.
Chris@40 2830 # Some rework will be needed to allow for fast_install
Chris@40 2831 # before this can be enabled.
Chris@40 2832 hardcode_into_libs=yes
Chris@40 2833
Chris@40 2834 dynamic_linker='Android linker'
Chris@40 2835 # Don't embed -rpath directories since the linker doesn't support them.
Chris@40 2836 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@40 2837 ;;
Chris@40 2838
Chris@40 2839 # This must be glibc/ELF.
Chris@40 2840 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
Chris@40 2841 version_type=linux # correct to gnu/linux during the next big refactor
Chris@40 2842 need_lib_prefix=no
Chris@40 2843 need_version=no
Chris@40 2844 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@40 2845 soname_spec='$libname$release$shared_ext$major'
Chris@40 2846 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
Chris@40 2847 shlibpath_var=LD_LIBRARY_PATH
Chris@40 2848 shlibpath_overrides_runpath=no
Chris@40 2849
Chris@40 2850 # Some binutils ld are patched to set DT_RUNPATH
Chris@40 2851 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
Chris@40 2852 [lt_cv_shlibpath_overrides_runpath=no
Chris@40 2853 save_LDFLAGS=$LDFLAGS
Chris@40 2854 save_libdir=$libdir
Chris@40 2855 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
Chris@40 2856 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
Chris@40 2857 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
Chris@40 2858 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
Chris@40 2859 [lt_cv_shlibpath_overrides_runpath=yes])])
Chris@40 2860 LDFLAGS=$save_LDFLAGS
Chris@40 2861 libdir=$save_libdir
Chris@40 2862 ])
Chris@40 2863 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
Chris@40 2864
Chris@40 2865 # This implies no fast_install, which is unacceptable.
Chris@40 2866 # Some rework will be needed to allow for fast_install
Chris@40 2867 # before this can be enabled.
Chris@40 2868 hardcode_into_libs=yes
Chris@40 2869
Chris@40 2870 # Ideally, we could use ldconfig to report *all* directores which are
Chris@40 2871 # searched for libraries, however this is still not possible. Aside from not
Chris@40 2872 # being certain /sbin/ldconfig is available, command
Chris@40 2873 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
Chris@40 2874 # even though it is searched at run-time. Try to do the best guess by
Chris@40 2875 # appending ld.so.conf contents (and includes) to the search path.
Chris@40 2876 if test -f /etc/ld.so.conf; then
Chris@40 2877 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@40 2878 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
Chris@40 2879 fi
Chris@40 2880
Chris@40 2881 # We used to test for /lib/ld.so.1 and disable shared libraries on
Chris@40 2882 # powerpc, because MkLinux only supported shared libraries with the
Chris@40 2883 # GNU dynamic linker. Since this was broken with cross compilers,
Chris@40 2884 # most powerpc-linux boxes support dynamic linking these days and
Chris@40 2885 # people can always --disable-shared, the test was removed, and we
Chris@40 2886 # assume the GNU/Linux dynamic linker is in use.
Chris@40 2887 dynamic_linker='GNU/Linux ld.so'
Chris@40 2888 ;;
Chris@40 2889
Chris@40 2890 netbsdelf*-gnu)
Chris@40 2891 version_type=linux
Chris@40 2892 need_lib_prefix=no
Chris@40 2893 need_version=no
Chris@40 2894 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
Chris@40 2895 soname_spec='${libname}${release}${shared_ext}$major'
Chris@40 2896 shlibpath_var=LD_LIBRARY_PATH
Chris@40 2897 shlibpath_overrides_runpath=no
Chris@40 2898 hardcode_into_libs=yes
Chris@40 2899 dynamic_linker='NetBSD ld.elf_so'
Chris@40 2900 ;;
Chris@40 2901
Chris@40 2902 netbsd*)
Chris@40 2903 version_type=sunos
Chris@40 2904 need_lib_prefix=no
Chris@40 2905 need_version=no
Chris@40 2906 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
Chris@40 2907 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
Chris@40 2908 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
Chris@40 2909 dynamic_linker='NetBSD (a.out) ld.so'
Chris@40 2910 else
Chris@40 2911 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@40 2912 soname_spec='$libname$release$shared_ext$major'
Chris@40 2913 dynamic_linker='NetBSD ld.elf_so'
Chris@40 2914 fi
Chris@40 2915 shlibpath_var=LD_LIBRARY_PATH
Chris@40 2916 shlibpath_overrides_runpath=yes
Chris@40 2917 hardcode_into_libs=yes
Chris@40 2918 ;;
Chris@40 2919
Chris@40 2920 newsos6)
Chris@40 2921 version_type=linux # correct to gnu/linux during the next big refactor
Chris@40 2922 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@40 2923 shlibpath_var=LD_LIBRARY_PATH
Chris@40 2924 shlibpath_overrides_runpath=yes
Chris@40 2925 ;;
Chris@40 2926
Chris@40 2927 *nto* | *qnx*)
Chris@40 2928 version_type=qnx
Chris@40 2929 need_lib_prefix=no
Chris@40 2930 need_version=no
Chris@40 2931 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@40 2932 soname_spec='$libname$release$shared_ext$major'
Chris@40 2933 shlibpath_var=LD_LIBRARY_PATH
Chris@40 2934 shlibpath_overrides_runpath=no
Chris@40 2935 hardcode_into_libs=yes
Chris@40 2936 dynamic_linker='ldqnx.so'
Chris@40 2937 ;;
Chris@40 2938
Chris@40 2939 openbsd* | bitrig*)
Chris@40 2940 version_type=sunos
Chris@40 2941 sys_lib_dlsearch_path_spec=/usr/lib
Chris@40 2942 need_lib_prefix=no
Chris@40 2943 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
Chris@40 2944 need_version=no
Chris@40 2945 else
Chris@40 2946 need_version=yes
Chris@40 2947 fi
Chris@40 2948 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
Chris@40 2949 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
Chris@40 2950 shlibpath_var=LD_LIBRARY_PATH
Chris@40 2951 shlibpath_overrides_runpath=yes
Chris@40 2952 ;;
Chris@40 2953
Chris@40 2954 os2*)
Chris@40 2955 libname_spec='$name'
Chris@40 2956 version_type=windows
Chris@40 2957 shrext_cmds=.dll
Chris@40 2958 need_version=no
Chris@40 2959 need_lib_prefix=no
Chris@40 2960 # OS/2 can only load a DLL with a base name of 8 characters or less.
Chris@40 2961 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
Chris@40 2962 v=$($ECHO $release$versuffix | tr -d .-);
Chris@40 2963 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
Chris@40 2964 $ECHO $n$v`$shared_ext'
Chris@40 2965 library_names_spec='${libname}_dll.$libext'
Chris@40 2966 dynamic_linker='OS/2 ld.exe'
Chris@40 2967 shlibpath_var=BEGINLIBPATH
Chris@40 2968 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
Chris@40 2969 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
Chris@40 2970 postinstall_cmds='base_file=`basename \$file`~
Chris@40 2971 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
Chris@40 2972 dldir=$destdir/`dirname \$dlpath`~
Chris@40 2973 test -d \$dldir || mkdir -p \$dldir~
Chris@40 2974 $install_prog $dir/$dlname \$dldir/$dlname~
Chris@40 2975 chmod a+x \$dldir/$dlname~
Chris@40 2976 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
Chris@40 2977 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
Chris@40 2978 fi'
Chris@40 2979 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
Chris@40 2980 dlpath=$dir/\$dldll~
Chris@40 2981 $RM \$dlpath'
Chris@40 2982 ;;
Chris@40 2983
Chris@40 2984 osf3* | osf4* | osf5*)
Chris@40 2985 version_type=osf
Chris@40 2986 need_lib_prefix=no
Chris@40 2987 need_version=no
Chris@40 2988 soname_spec='$libname$release$shared_ext$major'
Chris@40 2989 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@40 2990 shlibpath_var=LD_LIBRARY_PATH
Chris@40 2991 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
Chris@40 2992 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
Chris@40 2993 ;;
Chris@40 2994
Chris@40 2995 rdos*)
Chris@40 2996 dynamic_linker=no
Chris@40 2997 ;;
Chris@40 2998
Chris@40 2999 solaris*)
Chris@40 3000 version_type=linux # correct to gnu/linux during the next big refactor
Chris@40 3001 need_lib_prefix=no
Chris@40 3002 need_version=no
Chris@40 3003 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@40 3004 soname_spec='$libname$release$shared_ext$major'
Chris@40 3005 shlibpath_var=LD_LIBRARY_PATH
Chris@40 3006 shlibpath_overrides_runpath=yes
Chris@40 3007 hardcode_into_libs=yes
Chris@40 3008 # ldd complains unless libraries are executable
Chris@40 3009 postinstall_cmds='chmod +x $lib'
Chris@40 3010 ;;
Chris@40 3011
Chris@40 3012 sunos4*)
Chris@40 3013 version_type=sunos
Chris@40 3014 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
Chris@40 3015 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
Chris@40 3016 shlibpath_var=LD_LIBRARY_PATH
Chris@40 3017 shlibpath_overrides_runpath=yes
Chris@40 3018 if test yes = "$with_gnu_ld"; then
Chris@40 3019 need_lib_prefix=no
Chris@40 3020 fi
Chris@40 3021 need_version=yes
Chris@40 3022 ;;
Chris@40 3023
Chris@40 3024 sysv4 | sysv4.3*)
Chris@40 3025 version_type=linux # correct to gnu/linux during the next big refactor
Chris@40 3026 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@40 3027 soname_spec='$libname$release$shared_ext$major'
Chris@40 3028 shlibpath_var=LD_LIBRARY_PATH
Chris@40 3029 case $host_vendor in
Chris@40 3030 sni)
Chris@40 3031 shlibpath_overrides_runpath=no
Chris@40 3032 need_lib_prefix=no
Chris@40 3033 runpath_var=LD_RUN_PATH
Chris@40 3034 ;;
Chris@40 3035 siemens)
Chris@40 3036 need_lib_prefix=no
Chris@40 3037 ;;
Chris@40 3038 motorola)
Chris@40 3039 need_lib_prefix=no
Chris@40 3040 need_version=no
Chris@40 3041 shlibpath_overrides_runpath=no
Chris@40 3042 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
Chris@40 3043 ;;
Chris@40 3044 esac
Chris@40 3045 ;;
Chris@40 3046
Chris@40 3047 sysv4*MP*)
Chris@40 3048 if test -d /usr/nec; then
Chris@40 3049 version_type=linux # correct to gnu/linux during the next big refactor
Chris@40 3050 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
Chris@40 3051 soname_spec='$libname$shared_ext.$major'
Chris@40 3052 shlibpath_var=LD_LIBRARY_PATH
Chris@40 3053 fi
Chris@40 3054 ;;
Chris@40 3055
Chris@40 3056 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
Chris@40 3057 version_type=sco
Chris@40 3058 need_lib_prefix=no
Chris@40 3059 need_version=no
Chris@40 3060 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
Chris@40 3061 soname_spec='$libname$release$shared_ext$major'
Chris@40 3062 shlibpath_var=LD_LIBRARY_PATH
Chris@40 3063 shlibpath_overrides_runpath=yes
Chris@40 3064 hardcode_into_libs=yes
Chris@40 3065 if test yes = "$with_gnu_ld"; then
Chris@40 3066 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
Chris@40 3067 else
Chris@40 3068 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
Chris@40 3069 case $host_os in
Chris@40 3070 sco3.2v5*)
Chris@40 3071 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
Chris@40 3072 ;;
Chris@40 3073 esac
Chris@40 3074 fi
Chris@40 3075 sys_lib_dlsearch_path_spec='/usr/lib'
Chris@40 3076 ;;
Chris@40 3077
Chris@40 3078 tpf*)
Chris@40 3079 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
Chris@40 3080 version_type=linux # correct to gnu/linux during the next big refactor
Chris@40 3081 need_lib_prefix=no
Chris@40 3082 need_version=no
Chris@40 3083 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@40 3084 shlibpath_var=LD_LIBRARY_PATH
Chris@40 3085 shlibpath_overrides_runpath=no
Chris@40 3086 hardcode_into_libs=yes
Chris@40 3087 ;;
Chris@40 3088
Chris@40 3089 uts4*)
Chris@40 3090 version_type=linux # correct to gnu/linux during the next big refactor
Chris@40 3091 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@40 3092 soname_spec='$libname$release$shared_ext$major'
Chris@40 3093 shlibpath_var=LD_LIBRARY_PATH
Chris@40 3094 ;;
Chris@40 3095
Chris@40 3096 *)
Chris@40 3097 dynamic_linker=no
Chris@40 3098 ;;
Chris@40 3099 esac
Chris@40 3100 AC_MSG_RESULT([$dynamic_linker])
Chris@40 3101 test no = "$dynamic_linker" && can_build_shared=no
Chris@40 3102
Chris@40 3103 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
Chris@40 3104 if test yes = "$GCC"; then
Chris@40 3105 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
Chris@40 3106 fi
Chris@40 3107
Chris@40 3108 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
Chris@40 3109 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
Chris@40 3110 fi
Chris@40 3111
Chris@40 3112 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
Chris@40 3113 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
Chris@40 3114 fi
Chris@40 3115
Chris@40 3116 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
Chris@40 3117 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
Chris@40 3118
Chris@40 3119 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
Chris@40 3120 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
Chris@40 3121
Chris@40 3122 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
Chris@40 3123 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
Chris@40 3124
Chris@40 3125 _LT_DECL([], [variables_saved_for_relink], [1],
Chris@40 3126 [Variables whose values should be saved in libtool wrapper scripts and
Chris@40 3127 restored at link time])
Chris@40 3128 _LT_DECL([], [need_lib_prefix], [0],
Chris@40 3129 [Do we need the "lib" prefix for modules?])
Chris@40 3130 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
Chris@40 3131 _LT_DECL([], [version_type], [0], [Library versioning type])
Chris@40 3132 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
Chris@40 3133 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
Chris@40 3134 _LT_DECL([], [shlibpath_overrides_runpath], [0],
Chris@40 3135 [Is shlibpath searched before the hard-coded library search path?])
Chris@40 3136 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
Chris@40 3137 _LT_DECL([], [library_names_spec], [1],
Chris@40 3138 [[List of archive names. First name is the real one, the rest are links.
Chris@40 3139 The last name is the one that the linker finds with -lNAME]])
Chris@40 3140 _LT_DECL([], [soname_spec], [1],
Chris@40 3141 [[The coded name of the library, if different from the real name]])
Chris@40 3142 _LT_DECL([], [install_override_mode], [1],
Chris@40 3143 [Permission mode override for installation of shared libraries])
Chris@40 3144 _LT_DECL([], [postinstall_cmds], [2],
Chris@40 3145 [Command to use after installation of a shared archive])
Chris@40 3146 _LT_DECL([], [postuninstall_cmds], [2],
Chris@40 3147 [Command to use after uninstallation of a shared archive])
Chris@40 3148 _LT_DECL([], [finish_cmds], [2],
Chris@40 3149 [Commands used to finish a libtool library installation in a directory])
Chris@40 3150 _LT_DECL([], [finish_eval], [1],
Chris@40 3151 [[As "finish_cmds", except a single script fragment to be evaled but
Chris@40 3152 not shown]])
Chris@40 3153 _LT_DECL([], [hardcode_into_libs], [0],
Chris@40 3154 [Whether we should hardcode library paths into libraries])
Chris@40 3155 _LT_DECL([], [sys_lib_search_path_spec], [2],
Chris@40 3156 [Compile-time system search path for libraries])
Chris@40 3157 _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
Chris@40 3158 [Detected run-time system search path for libraries])
Chris@40 3159 _LT_DECL([], [configure_time_lt_sys_library_path], [2],
Chris@40 3160 [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
Chris@40 3161 ])# _LT_SYS_DYNAMIC_LINKER
Chris@40 3162
Chris@40 3163
Chris@40 3164 # _LT_PATH_TOOL_PREFIX(TOOL)
Chris@40 3165 # --------------------------
Chris@40 3166 # find a file program that can recognize shared library
Chris@40 3167 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
Chris@40 3168 [m4_require([_LT_DECL_EGREP])dnl
Chris@40 3169 AC_MSG_CHECKING([for $1])
Chris@40 3170 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
Chris@40 3171 [case $MAGIC_CMD in
Chris@40 3172 [[\\/*] | ?:[\\/]*])
Chris@40 3173 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
Chris@40 3174 ;;
Chris@40 3175 *)
Chris@40 3176 lt_save_MAGIC_CMD=$MAGIC_CMD
Chris@40 3177 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
Chris@40 3178 dnl $ac_dummy forces splitting on constant user-supplied paths.
Chris@40 3179 dnl POSIX.2 word splitting is done only on the output of word expansions,
Chris@40 3180 dnl not every word. This closes a longstanding sh security hole.
Chris@40 3181 ac_dummy="m4_if([$2], , $PATH, [$2])"
Chris@40 3182 for ac_dir in $ac_dummy; do
Chris@40 3183 IFS=$lt_save_ifs
Chris@40 3184 test -z "$ac_dir" && ac_dir=.
Chris@40 3185 if test -f "$ac_dir/$1"; then
Chris@40 3186 lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
Chris@40 3187 if test -n "$file_magic_test_file"; then
Chris@40 3188 case $deplibs_check_method in
Chris@40 3189 "file_magic "*)
Chris@40 3190 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
Chris@40 3191 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
Chris@40 3192 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
Chris@40 3193 $EGREP "$file_magic_regex" > /dev/null; then
Chris@40 3194 :
Chris@40 3195 else
Chris@40 3196 cat <<_LT_EOF 1>&2
Chris@40 3197
Chris@40 3198 *** Warning: the command libtool uses to detect shared libraries,
Chris@40 3199 *** $file_magic_cmd, produces output that libtool cannot recognize.
Chris@40 3200 *** The result is that libtool may fail to recognize shared libraries
Chris@40 3201 *** as such. This will affect the creation of libtool libraries that
Chris@40 3202 *** depend on shared libraries, but programs linked with such libtool
Chris@40 3203 *** libraries will work regardless of this problem. Nevertheless, you
Chris@40 3204 *** may want to report the problem to your system manager and/or to
Chris@40 3205 *** bug-libtool@gnu.org
Chris@40 3206
Chris@40 3207 _LT_EOF
Chris@40 3208 fi ;;
Chris@40 3209 esac
Chris@40 3210 fi
Chris@40 3211 break
Chris@40 3212 fi
Chris@40 3213 done
Chris@40 3214 IFS=$lt_save_ifs
Chris@40 3215 MAGIC_CMD=$lt_save_MAGIC_CMD
Chris@40 3216 ;;
Chris@40 3217 esac])
Chris@40 3218 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
Chris@40 3219 if test -n "$MAGIC_CMD"; then
Chris@40 3220 AC_MSG_RESULT($MAGIC_CMD)
Chris@40 3221 else
Chris@40 3222 AC_MSG_RESULT(no)
Chris@40 3223 fi
Chris@40 3224 _LT_DECL([], [MAGIC_CMD], [0],
Chris@40 3225 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
Chris@40 3226 ])# _LT_PATH_TOOL_PREFIX
Chris@40 3227
Chris@40 3228 # Old name:
Chris@40 3229 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
Chris@40 3230 dnl aclocal-1.4 backwards compatibility:
Chris@40 3231 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
Chris@40 3232
Chris@40 3233
Chris@40 3234 # _LT_PATH_MAGIC
Chris@40 3235 # --------------
Chris@40 3236 # find a file program that can recognize a shared library
Chris@40 3237 m4_defun([_LT_PATH_MAGIC],
Chris@40 3238 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
Chris@40 3239 if test -z "$lt_cv_path_MAGIC_CMD"; then
Chris@40 3240 if test -n "$ac_tool_prefix"; then
Chris@40 3241 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
Chris@40 3242 else
Chris@40 3243 MAGIC_CMD=:
Chris@40 3244 fi
Chris@40 3245 fi
Chris@40 3246 ])# _LT_PATH_MAGIC
Chris@40 3247
Chris@40 3248
Chris@40 3249 # LT_PATH_LD
Chris@40 3250 # ----------
Chris@40 3251 # find the pathname to the GNU or non-GNU linker
Chris@40 3252 AC_DEFUN([LT_PATH_LD],
Chris@40 3253 [AC_REQUIRE([AC_PROG_CC])dnl
Chris@40 3254 AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@40 3255 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
Chris@40 3256 m4_require([_LT_DECL_SED])dnl
Chris@40 3257 m4_require([_LT_DECL_EGREP])dnl
Chris@40 3258 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
Chris@40 3259
Chris@40 3260 AC_ARG_WITH([gnu-ld],
Chris@40 3261 [AS_HELP_STRING([--with-gnu-ld],
Chris@40 3262 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
Chris@40 3263 [test no = "$withval" || with_gnu_ld=yes],
Chris@40 3264 [with_gnu_ld=no])dnl
Chris@40 3265
Chris@40 3266 ac_prog=ld
Chris@40 3267 if test yes = "$GCC"; then
Chris@40 3268 # Check if gcc -print-prog-name=ld gives a path.
Chris@40 3269 AC_MSG_CHECKING([for ld used by $CC])
Chris@40 3270 case $host in
Chris@40 3271 *-*-mingw*)
Chris@40 3272 # gcc leaves a trailing carriage return, which upsets mingw
Chris@40 3273 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
Chris@40 3274 *)
Chris@40 3275 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
Chris@40 3276 esac
Chris@40 3277 case $ac_prog in
Chris@40 3278 # Accept absolute paths.
Chris@40 3279 [[\\/]]* | ?:[[\\/]]*)
Chris@40 3280 re_direlt='/[[^/]][[^/]]*/\.\./'
Chris@40 3281 # Canonicalize the pathname of ld
Chris@40 3282 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
Chris@40 3283 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
Chris@40 3284 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
Chris@40 3285 done
Chris@40 3286 test -z "$LD" && LD=$ac_prog
Chris@40 3287 ;;
Chris@40 3288 "")
Chris@40 3289 # If it fails, then pretend we aren't using GCC.
Chris@40 3290 ac_prog=ld
Chris@40 3291 ;;
Chris@40 3292 *)
Chris@40 3293 # If it is relative, then search for the first ld in PATH.
Chris@40 3294 with_gnu_ld=unknown
Chris@40 3295 ;;
Chris@40 3296 esac
Chris@40 3297 elif test yes = "$with_gnu_ld"; then
Chris@40 3298 AC_MSG_CHECKING([for GNU ld])
Chris@40 3299 else
Chris@40 3300 AC_MSG_CHECKING([for non-GNU ld])
Chris@40 3301 fi
Chris@40 3302 AC_CACHE_VAL(lt_cv_path_LD,
Chris@40 3303 [if test -z "$LD"; then
Chris@40 3304 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
Chris@40 3305 for ac_dir in $PATH; do
Chris@40 3306 IFS=$lt_save_ifs
Chris@40 3307 test -z "$ac_dir" && ac_dir=.
Chris@40 3308 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
Chris@40 3309 lt_cv_path_LD=$ac_dir/$ac_prog
Chris@40 3310 # Check to see if the program is GNU ld. I'd rather use --version,
Chris@40 3311 # but apparently some variants of GNU ld only accept -v.
Chris@40 3312 # Break only if it was the GNU/non-GNU ld that we prefer.
Chris@40 3313 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
Chris@40 3314 *GNU* | *'with BFD'*)
Chris@40 3315 test no != "$with_gnu_ld" && break
Chris@40 3316 ;;
Chris@40 3317 *)
Chris@40 3318 test yes != "$with_gnu_ld" && break
Chris@40 3319 ;;
Chris@40 3320 esac
Chris@40 3321 fi
Chris@40 3322 done
Chris@40 3323 IFS=$lt_save_ifs
Chris@40 3324 else
Chris@40 3325 lt_cv_path_LD=$LD # Let the user override the test with a path.
Chris@40 3326 fi])
Chris@40 3327 LD=$lt_cv_path_LD
Chris@40 3328 if test -n "$LD"; then
Chris@40 3329 AC_MSG_RESULT($LD)
Chris@40 3330 else
Chris@40 3331 AC_MSG_RESULT(no)
Chris@40 3332 fi
Chris@40 3333 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
Chris@40 3334 _LT_PATH_LD_GNU
Chris@40 3335 AC_SUBST([LD])
Chris@40 3336
Chris@40 3337 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
Chris@40 3338 ])# LT_PATH_LD
Chris@40 3339
Chris@40 3340 # Old names:
Chris@40 3341 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
Chris@40 3342 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
Chris@40 3343 dnl aclocal-1.4 backwards compatibility:
Chris@40 3344 dnl AC_DEFUN([AM_PROG_LD], [])
Chris@40 3345 dnl AC_DEFUN([AC_PROG_LD], [])
Chris@40 3346
Chris@40 3347
Chris@40 3348 # _LT_PATH_LD_GNU
Chris@40 3349 #- --------------
Chris@40 3350 m4_defun([_LT_PATH_LD_GNU],
Chris@40 3351 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
Chris@40 3352 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
Chris@40 3353 case `$LD -v 2>&1 </dev/null` in
Chris@40 3354 *GNU* | *'with BFD'*)
Chris@40 3355 lt_cv_prog_gnu_ld=yes
Chris@40 3356 ;;
Chris@40 3357 *)
Chris@40 3358 lt_cv_prog_gnu_ld=no
Chris@40 3359 ;;
Chris@40 3360 esac])
Chris@40 3361 with_gnu_ld=$lt_cv_prog_gnu_ld
Chris@40 3362 ])# _LT_PATH_LD_GNU
Chris@40 3363
Chris@40 3364
Chris@40 3365 # _LT_CMD_RELOAD
Chris@40 3366 # --------------
Chris@40 3367 # find reload flag for linker
Chris@40 3368 # -- PORTME Some linkers may need a different reload flag.
Chris@40 3369 m4_defun([_LT_CMD_RELOAD],
Chris@40 3370 [AC_CACHE_CHECK([for $LD option to reload object files],
Chris@40 3371 lt_cv_ld_reload_flag,
Chris@40 3372 [lt_cv_ld_reload_flag='-r'])
Chris@40 3373 reload_flag=$lt_cv_ld_reload_flag
Chris@40 3374 case $reload_flag in
Chris@40 3375 "" | " "*) ;;
Chris@40 3376 *) reload_flag=" $reload_flag" ;;
Chris@40 3377 esac
Chris@40 3378 reload_cmds='$LD$reload_flag -o $output$reload_objs'
Chris@40 3379 case $host_os in
Chris@40 3380 cygwin* | mingw* | pw32* | cegcc*)
Chris@40 3381 if test yes != "$GCC"; then
Chris@40 3382 reload_cmds=false
Chris@40 3383 fi
Chris@40 3384 ;;
Chris@40 3385 darwin*)
Chris@40 3386 if test yes = "$GCC"; then
Chris@40 3387 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
Chris@40 3388 else
Chris@40 3389 reload_cmds='$LD$reload_flag -o $output$reload_objs'
Chris@40 3390 fi
Chris@40 3391 ;;
Chris@40 3392 esac
Chris@40 3393 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
Chris@40 3394 _LT_TAGDECL([], [reload_cmds], [2])dnl
Chris@40 3395 ])# _LT_CMD_RELOAD
Chris@40 3396
Chris@40 3397
Chris@40 3398 # _LT_PATH_DD
Chris@40 3399 # -----------
Chris@40 3400 # find a working dd
Chris@40 3401 m4_defun([_LT_PATH_DD],
Chris@40 3402 [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
Chris@40 3403 [printf 0123456789abcdef0123456789abcdef >conftest.i
Chris@40 3404 cat conftest.i conftest.i >conftest2.i
Chris@40 3405 : ${lt_DD:=$DD}
Chris@40 3406 AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
Chris@40 3407 [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
Chris@40 3408 cmp -s conftest.i conftest.out \
Chris@40 3409 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
Chris@40 3410 fi])
Chris@40 3411 rm -f conftest.i conftest2.i conftest.out])
Chris@40 3412 ])# _LT_PATH_DD
Chris@40 3413
Chris@40 3414
Chris@40 3415 # _LT_CMD_TRUNCATE
Chris@40 3416 # ----------------
Chris@40 3417 # find command to truncate a binary pipe
Chris@40 3418 m4_defun([_LT_CMD_TRUNCATE],
Chris@40 3419 [m4_require([_LT_PATH_DD])
Chris@40 3420 AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
Chris@40 3421 [printf 0123456789abcdef0123456789abcdef >conftest.i
Chris@40 3422 cat conftest.i conftest.i >conftest2.i
Chris@40 3423 lt_cv_truncate_bin=
Chris@40 3424 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
Chris@40 3425 cmp -s conftest.i conftest.out \
Chris@40 3426 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
Chris@40 3427 fi
Chris@40 3428 rm -f conftest.i conftest2.i conftest.out
Chris@40 3429 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
Chris@40 3430 _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
Chris@40 3431 [Command to truncate a binary pipe])
Chris@40 3432 ])# _LT_CMD_TRUNCATE
Chris@40 3433
Chris@40 3434
Chris@40 3435 # _LT_CHECK_MAGIC_METHOD
Chris@40 3436 # ----------------------
Chris@40 3437 # how to check for library dependencies
Chris@40 3438 # -- PORTME fill in with the dynamic library characteristics
Chris@40 3439 m4_defun([_LT_CHECK_MAGIC_METHOD],
Chris@40 3440 [m4_require([_LT_DECL_EGREP])
Chris@40 3441 m4_require([_LT_DECL_OBJDUMP])
Chris@40 3442 AC_CACHE_CHECK([how to recognize dependent libraries],
Chris@40 3443 lt_cv_deplibs_check_method,
Chris@40 3444 [lt_cv_file_magic_cmd='$MAGIC_CMD'
Chris@40 3445 lt_cv_file_magic_test_file=
Chris@40 3446 lt_cv_deplibs_check_method='unknown'
Chris@40 3447 # Need to set the preceding variable on all platforms that support
Chris@40 3448 # interlibrary dependencies.
Chris@40 3449 # 'none' -- dependencies not supported.
Chris@40 3450 # 'unknown' -- same as none, but documents that we really don't know.
Chris@40 3451 # 'pass_all' -- all dependencies passed with no checks.
Chris@40 3452 # 'test_compile' -- check by making test program.
Chris@40 3453 # 'file_magic [[regex]]' -- check by looking for files in library path
Chris@40 3454 # that responds to the $file_magic_cmd with a given extended regex.
Chris@40 3455 # If you have 'file' or equivalent on your system and you're not sure
Chris@40 3456 # whether 'pass_all' will *always* work, you probably want this one.
Chris@40 3457
Chris@40 3458 case $host_os in
Chris@40 3459 aix[[4-9]]*)
Chris@40 3460 lt_cv_deplibs_check_method=pass_all
Chris@40 3461 ;;
Chris@40 3462
Chris@40 3463 beos*)
Chris@40 3464 lt_cv_deplibs_check_method=pass_all
Chris@40 3465 ;;
Chris@40 3466
Chris@40 3467 bsdi[[45]]*)
Chris@40 3468 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
Chris@40 3469 lt_cv_file_magic_cmd='/usr/bin/file -L'
Chris@40 3470 lt_cv_file_magic_test_file=/shlib/libc.so
Chris@40 3471 ;;
Chris@40 3472
Chris@40 3473 cygwin*)
Chris@40 3474 # func_win32_libid is a shell function defined in ltmain.sh
Chris@40 3475 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
Chris@40 3476 lt_cv_file_magic_cmd='func_win32_libid'
Chris@40 3477 ;;
Chris@40 3478
Chris@40 3479 mingw* | pw32*)
Chris@40 3480 # Base MSYS/MinGW do not provide the 'file' command needed by
Chris@40 3481 # func_win32_libid shell function, so use a weaker test based on 'objdump',
Chris@40 3482 # unless we find 'file', for example because we are cross-compiling.
Chris@40 3483 if ( file / ) >/dev/null 2>&1; then
Chris@40 3484 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
Chris@40 3485 lt_cv_file_magic_cmd='func_win32_libid'
Chris@40 3486 else
Chris@40 3487 # Keep this pattern in sync with the one in func_win32_libid.
Chris@40 3488 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
Chris@40 3489 lt_cv_file_magic_cmd='$OBJDUMP -f'
Chris@40 3490 fi
Chris@40 3491 ;;
Chris@40 3492
Chris@40 3493 cegcc*)
Chris@40 3494 # use the weaker test based on 'objdump'. See mingw*.
Chris@40 3495 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
Chris@40 3496 lt_cv_file_magic_cmd='$OBJDUMP -f'
Chris@40 3497 ;;
Chris@40 3498
Chris@40 3499 darwin* | rhapsody*)
Chris@40 3500 lt_cv_deplibs_check_method=pass_all
Chris@40 3501 ;;
Chris@40 3502
Chris@40 3503 freebsd* | dragonfly*)
Chris@40 3504 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
Chris@40 3505 case $host_cpu in
Chris@40 3506 i*86 )
Chris@40 3507 # Not sure whether the presence of OpenBSD here was a mistake.
Chris@40 3508 # Let's accept both of them until this is cleared up.
Chris@40 3509 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
Chris@40 3510 lt_cv_file_magic_cmd=/usr/bin/file
Chris@40 3511 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
Chris@40 3512 ;;
Chris@40 3513 esac
Chris@40 3514 else
Chris@40 3515 lt_cv_deplibs_check_method=pass_all
Chris@40 3516 fi
Chris@40 3517 ;;
Chris@40 3518
Chris@40 3519 haiku*)
Chris@40 3520 lt_cv_deplibs_check_method=pass_all
Chris@40 3521 ;;
Chris@40 3522
Chris@40 3523 hpux10.20* | hpux11*)
Chris@40 3524 lt_cv_file_magic_cmd=/usr/bin/file
Chris@40 3525 case $host_cpu in
Chris@40 3526 ia64*)
Chris@40 3527 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
Chris@40 3528 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
Chris@40 3529 ;;
Chris@40 3530 hppa*64*)
Chris@40 3531 [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@40 3532 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
Chris@40 3533 ;;
Chris@40 3534 *)
Chris@40 3535 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
Chris@40 3536 lt_cv_file_magic_test_file=/usr/lib/libc.sl
Chris@40 3537 ;;
Chris@40 3538 esac
Chris@40 3539 ;;
Chris@40 3540
Chris@40 3541 interix[[3-9]]*)
Chris@40 3542 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
Chris@40 3543 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
Chris@40 3544 ;;
Chris@40 3545
Chris@40 3546 irix5* | irix6* | nonstopux*)
Chris@40 3547 case $LD in
Chris@40 3548 *-32|*"-32 ") libmagic=32-bit;;
Chris@40 3549 *-n32|*"-n32 ") libmagic=N32;;
Chris@40 3550 *-64|*"-64 ") libmagic=64-bit;;
Chris@40 3551 *) libmagic=never-match;;
Chris@40 3552 esac
Chris@40 3553 lt_cv_deplibs_check_method=pass_all
Chris@40 3554 ;;
Chris@40 3555
Chris@40 3556 # This must be glibc/ELF.
Chris@40 3557 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
Chris@40 3558 lt_cv_deplibs_check_method=pass_all
Chris@40 3559 ;;
Chris@40 3560
Chris@40 3561 netbsd* | netbsdelf*-gnu)
Chris@40 3562 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
Chris@40 3563 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
Chris@40 3564 else
Chris@40 3565 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
Chris@40 3566 fi
Chris@40 3567 ;;
Chris@40 3568
Chris@40 3569 newos6*)
Chris@40 3570 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
Chris@40 3571 lt_cv_file_magic_cmd=/usr/bin/file
Chris@40 3572 lt_cv_file_magic_test_file=/usr/lib/libnls.so
Chris@40 3573 ;;
Chris@40 3574
Chris@40 3575 *nto* | *qnx*)
Chris@40 3576 lt_cv_deplibs_check_method=pass_all
Chris@40 3577 ;;
Chris@40 3578
Chris@40 3579 openbsd* | bitrig*)
Chris@40 3580 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
Chris@40 3581 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
Chris@40 3582 else
Chris@40 3583 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
Chris@40 3584 fi
Chris@40 3585 ;;
Chris@40 3586
Chris@40 3587 osf3* | osf4* | osf5*)
Chris@40 3588 lt_cv_deplibs_check_method=pass_all
Chris@40 3589 ;;
Chris@40 3590
Chris@40 3591 rdos*)
Chris@40 3592 lt_cv_deplibs_check_method=pass_all
Chris@40 3593 ;;
Chris@40 3594
Chris@40 3595 solaris*)
Chris@40 3596 lt_cv_deplibs_check_method=pass_all
Chris@40 3597 ;;
Chris@40 3598
Chris@40 3599 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
Chris@40 3600 lt_cv_deplibs_check_method=pass_all
Chris@40 3601 ;;
Chris@40 3602
Chris@40 3603 sysv4 | sysv4.3*)
Chris@40 3604 case $host_vendor in
Chris@40 3605 motorola)
Chris@40 3606 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@40 3607 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
Chris@40 3608 ;;
Chris@40 3609 ncr)
Chris@40 3610 lt_cv_deplibs_check_method=pass_all
Chris@40 3611 ;;
Chris@40 3612 sequent)
Chris@40 3613 lt_cv_file_magic_cmd='/bin/file'
Chris@40 3614 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
Chris@40 3615 ;;
Chris@40 3616 sni)
Chris@40 3617 lt_cv_file_magic_cmd='/bin/file'
Chris@40 3618 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
Chris@40 3619 lt_cv_file_magic_test_file=/lib/libc.so
Chris@40 3620 ;;
Chris@40 3621 siemens)
Chris@40 3622 lt_cv_deplibs_check_method=pass_all
Chris@40 3623 ;;
Chris@40 3624 pc)
Chris@40 3625 lt_cv_deplibs_check_method=pass_all
Chris@40 3626 ;;
Chris@40 3627 esac
Chris@40 3628 ;;
Chris@40 3629
Chris@40 3630 tpf*)
Chris@40 3631 lt_cv_deplibs_check_method=pass_all
Chris@40 3632 ;;
Chris@40 3633 os2*)
Chris@40 3634 lt_cv_deplibs_check_method=pass_all
Chris@40 3635 ;;
Chris@40 3636 esac
Chris@40 3637 ])
Chris@40 3638
Chris@40 3639 file_magic_glob=
Chris@40 3640 want_nocaseglob=no
Chris@40 3641 if test "$build" = "$host"; then
Chris@40 3642 case $host_os in
Chris@40 3643 mingw* | pw32*)
Chris@40 3644 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
Chris@40 3645 want_nocaseglob=yes
Chris@40 3646 else
Chris@40 3647 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
Chris@40 3648 fi
Chris@40 3649 ;;
Chris@40 3650 esac
Chris@40 3651 fi
Chris@40 3652
Chris@40 3653 file_magic_cmd=$lt_cv_file_magic_cmd
Chris@40 3654 deplibs_check_method=$lt_cv_deplibs_check_method
Chris@40 3655 test -z "$deplibs_check_method" && deplibs_check_method=unknown
Chris@40 3656
Chris@40 3657 _LT_DECL([], [deplibs_check_method], [1],
Chris@40 3658 [Method to check whether dependent libraries are shared objects])
Chris@40 3659 _LT_DECL([], [file_magic_cmd], [1],
Chris@40 3660 [Command to use when deplibs_check_method = "file_magic"])
Chris@40 3661 _LT_DECL([], [file_magic_glob], [1],
Chris@40 3662 [How to find potential files when deplibs_check_method = "file_magic"])
Chris@40 3663 _LT_DECL([], [want_nocaseglob], [1],
Chris@40 3664 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
Chris@40 3665 ])# _LT_CHECK_MAGIC_METHOD
Chris@40 3666
Chris@40 3667
Chris@40 3668 # LT_PATH_NM
Chris@40 3669 # ----------
Chris@40 3670 # find the pathname to a BSD- or MS-compatible name lister
Chris@40 3671 AC_DEFUN([LT_PATH_NM],
Chris@40 3672 [AC_REQUIRE([AC_PROG_CC])dnl
Chris@40 3673 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
Chris@40 3674 [if test -n "$NM"; then
Chris@40 3675 # Let the user override the test.
Chris@40 3676 lt_cv_path_NM=$NM
Chris@40 3677 else
Chris@40 3678 lt_nm_to_check=${ac_tool_prefix}nm
Chris@40 3679 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
Chris@40 3680 lt_nm_to_check="$lt_nm_to_check nm"
Chris@40 3681 fi
Chris@40 3682 for lt_tmp_nm in $lt_nm_to_check; do
Chris@40 3683 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
Chris@40 3684 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
Chris@40 3685 IFS=$lt_save_ifs
Chris@40 3686 test -z "$ac_dir" && ac_dir=.
Chris@40 3687 tmp_nm=$ac_dir/$lt_tmp_nm
Chris@40 3688 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
Chris@40 3689 # Check to see if the nm accepts a BSD-compat flag.
Chris@40 3690 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
Chris@40 3691 # nm: unknown option "B" ignored
Chris@40 3692 # Tru64's nm complains that /dev/null is an invalid object file
Chris@40 3693 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
Chris@40 3694 case $build_os in
Chris@40 3695 mingw*) lt_bad_file=conftest.nm/nofile ;;
Chris@40 3696 *) lt_bad_file=/dev/null ;;
Chris@40 3697 esac
Chris@40 3698 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
Chris@40 3699 *$lt_bad_file* | *'Invalid file or object type'*)
Chris@40 3700 lt_cv_path_NM="$tmp_nm -B"
Chris@40 3701 break 2
Chris@40 3702 ;;
Chris@40 3703 *)
Chris@40 3704 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
Chris@40 3705 */dev/null*)
Chris@40 3706 lt_cv_path_NM="$tmp_nm -p"
Chris@40 3707 break 2
Chris@40 3708 ;;
Chris@40 3709 *)
Chris@40 3710 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
Chris@40 3711 continue # so that we can try to find one that supports BSD flags
Chris@40 3712 ;;
Chris@40 3713 esac
Chris@40 3714 ;;
Chris@40 3715 esac
Chris@40 3716 fi
Chris@40 3717 done
Chris@40 3718 IFS=$lt_save_ifs
Chris@40 3719 done
Chris@40 3720 : ${lt_cv_path_NM=no}
Chris@40 3721 fi])
Chris@40 3722 if test no != "$lt_cv_path_NM"; then
Chris@40 3723 NM=$lt_cv_path_NM
Chris@40 3724 else
Chris@40 3725 # Didn't find any BSD compatible name lister, look for dumpbin.
Chris@40 3726 if test -n "$DUMPBIN"; then :
Chris@40 3727 # Let the user override the test.
Chris@40 3728 else
Chris@40 3729 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
Chris@40 3730 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
Chris@40 3731 *COFF*)
Chris@40 3732 DUMPBIN="$DUMPBIN -symbols -headers"
Chris@40 3733 ;;
Chris@40 3734 *)
Chris@40 3735 DUMPBIN=:
Chris@40 3736 ;;
Chris@40 3737 esac
Chris@40 3738 fi
Chris@40 3739 AC_SUBST([DUMPBIN])
Chris@40 3740 if test : != "$DUMPBIN"; then
Chris@40 3741 NM=$DUMPBIN
Chris@40 3742 fi
Chris@40 3743 fi
Chris@40 3744 test -z "$NM" && NM=nm
Chris@40 3745 AC_SUBST([NM])
Chris@40 3746 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
Chris@40 3747
Chris@40 3748 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
Chris@40 3749 [lt_cv_nm_interface="BSD nm"
Chris@40 3750 echo "int some_variable = 0;" > conftest.$ac_ext
Chris@40 3751 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
Chris@40 3752 (eval "$ac_compile" 2>conftest.err)
Chris@40 3753 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@40 3754 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
Chris@40 3755 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
Chris@40 3756 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@40 3757 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
Chris@40 3758 cat conftest.out >&AS_MESSAGE_LOG_FD
Chris@40 3759 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
Chris@40 3760 lt_cv_nm_interface="MS dumpbin"
Chris@40 3761 fi
Chris@40 3762 rm -f conftest*])
Chris@40 3763 ])# LT_PATH_NM
Chris@40 3764
Chris@40 3765 # Old names:
Chris@40 3766 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
Chris@40 3767 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
Chris@40 3768 dnl aclocal-1.4 backwards compatibility:
Chris@40 3769 dnl AC_DEFUN([AM_PROG_NM], [])
Chris@40 3770 dnl AC_DEFUN([AC_PROG_NM], [])
Chris@40 3771
Chris@40 3772 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
Chris@40 3773 # --------------------------------
Chris@40 3774 # how to determine the name of the shared library
Chris@40 3775 # associated with a specific link library.
Chris@40 3776 # -- PORTME fill in with the dynamic library characteristics
Chris@40 3777 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
Chris@40 3778 [m4_require([_LT_DECL_EGREP])
Chris@40 3779 m4_require([_LT_DECL_OBJDUMP])
Chris@40 3780 m4_require([_LT_DECL_DLLTOOL])
Chris@40 3781 AC_CACHE_CHECK([how to associate runtime and link libraries],
Chris@40 3782 lt_cv_sharedlib_from_linklib_cmd,
Chris@40 3783 [lt_cv_sharedlib_from_linklib_cmd='unknown'
Chris@40 3784
Chris@40 3785 case $host_os in
Chris@40 3786 cygwin* | mingw* | pw32* | cegcc*)
Chris@40 3787 # two different shell functions defined in ltmain.sh;
Chris@40 3788 # decide which one to use based on capabilities of $DLLTOOL
Chris@40 3789 case `$DLLTOOL --help 2>&1` in
Chris@40 3790 *--identify-strict*)
Chris@40 3791 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
Chris@40 3792 ;;
Chris@40 3793 *)
Chris@40 3794 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
Chris@40 3795 ;;
Chris@40 3796 esac
Chris@40 3797 ;;
Chris@40 3798 *)
Chris@40 3799 # fallback: assume linklib IS sharedlib
Chris@40 3800 lt_cv_sharedlib_from_linklib_cmd=$ECHO
Chris@40 3801 ;;
Chris@40 3802 esac
Chris@40 3803 ])
Chris@40 3804 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
Chris@40 3805 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
Chris@40 3806
Chris@40 3807 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
Chris@40 3808 [Command to associate shared and link libraries])
Chris@40 3809 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
Chris@40 3810
Chris@40 3811
Chris@40 3812 # _LT_PATH_MANIFEST_TOOL
Chris@40 3813 # ----------------------
Chris@40 3814 # locate the manifest tool
Chris@40 3815 m4_defun([_LT_PATH_MANIFEST_TOOL],
Chris@40 3816 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
Chris@40 3817 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
Chris@40 3818 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
Chris@40 3819 [lt_cv_path_mainfest_tool=no
Chris@40 3820 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
Chris@40 3821 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
Chris@40 3822 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@40 3823 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
Chris@40 3824 lt_cv_path_mainfest_tool=yes
Chris@40 3825 fi
Chris@40 3826 rm -f conftest*])
Chris@40 3827 if test yes != "$lt_cv_path_mainfest_tool"; then
Chris@40 3828 MANIFEST_TOOL=:
Chris@40 3829 fi
Chris@40 3830 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
Chris@40 3831 ])# _LT_PATH_MANIFEST_TOOL
Chris@40 3832
Chris@40 3833
Chris@40 3834 # _LT_DLL_DEF_P([FILE])
Chris@40 3835 # ---------------------
Chris@40 3836 # True iff FILE is a Windows DLL '.def' file.
Chris@40 3837 # Keep in sync with func_dll_def_p in the libtool script
Chris@40 3838 AC_DEFUN([_LT_DLL_DEF_P],
Chris@40 3839 [dnl
Chris@40 3840 test DEF = "`$SED -n dnl
Chris@40 3841 -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
Chris@40 3842 -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
Chris@40 3843 -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
Chris@40 3844 -e q dnl Only consider the first "real" line
Chris@40 3845 $1`" dnl
Chris@40 3846 ])# _LT_DLL_DEF_P
Chris@40 3847
Chris@40 3848
Chris@40 3849 # LT_LIB_M
Chris@40 3850 # --------
Chris@40 3851 # check for math library
Chris@40 3852 AC_DEFUN([LT_LIB_M],
Chris@40 3853 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@40 3854 LIBM=
Chris@40 3855 case $host in
Chris@40 3856 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
Chris@40 3857 # These system don't have libm, or don't need it
Chris@40 3858 ;;
Chris@40 3859 *-ncr-sysv4.3*)
Chris@40 3860 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
Chris@40 3861 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
Chris@40 3862 ;;
Chris@40 3863 *)
Chris@40 3864 AC_CHECK_LIB(m, cos, LIBM=-lm)
Chris@40 3865 ;;
Chris@40 3866 esac
Chris@40 3867 AC_SUBST([LIBM])
Chris@40 3868 ])# LT_LIB_M
Chris@40 3869
Chris@40 3870 # Old name:
Chris@40 3871 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
Chris@40 3872 dnl aclocal-1.4 backwards compatibility:
Chris@40 3873 dnl AC_DEFUN([AC_CHECK_LIBM], [])
Chris@40 3874
Chris@40 3875
Chris@40 3876 # _LT_COMPILER_NO_RTTI([TAGNAME])
Chris@40 3877 # -------------------------------
Chris@40 3878 m4_defun([_LT_COMPILER_NO_RTTI],
Chris@40 3879 [m4_require([_LT_TAG_COMPILER])dnl
Chris@40 3880
Chris@40 3881 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
Chris@40 3882
Chris@40 3883 if test yes = "$GCC"; then
Chris@40 3884 case $cc_basename in
Chris@40 3885 nvcc*)
Chris@40 3886 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
Chris@40 3887 *)
Chris@40 3888 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
Chris@40 3889 esac
Chris@40 3890
Chris@40 3891 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
Chris@40 3892 lt_cv_prog_compiler_rtti_exceptions,
Chris@40 3893 [-fno-rtti -fno-exceptions], [],
Chris@40 3894 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
Chris@40 3895 fi
Chris@40 3896 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
Chris@40 3897 [Compiler flag to turn off builtin functions])
Chris@40 3898 ])# _LT_COMPILER_NO_RTTI
Chris@40 3899
Chris@40 3900
Chris@40 3901 # _LT_CMD_GLOBAL_SYMBOLS
Chris@40 3902 # ----------------------
Chris@40 3903 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
Chris@40 3904 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@40 3905 AC_REQUIRE([AC_PROG_CC])dnl
Chris@40 3906 AC_REQUIRE([AC_PROG_AWK])dnl
Chris@40 3907 AC_REQUIRE([LT_PATH_NM])dnl
Chris@40 3908 AC_REQUIRE([LT_PATH_LD])dnl
Chris@40 3909 m4_require([_LT_DECL_SED])dnl
Chris@40 3910 m4_require([_LT_DECL_EGREP])dnl
Chris@40 3911 m4_require([_LT_TAG_COMPILER])dnl
Chris@40 3912
Chris@40 3913 # Check for command to grab the raw symbol name followed by C symbol from nm.
Chris@40 3914 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
Chris@40 3915 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
Chris@40 3916 [
Chris@40 3917 # These are sane defaults that work on at least a few old systems.
Chris@40 3918 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
Chris@40 3919
Chris@40 3920 # Character class describing NM global symbol codes.
Chris@40 3921 symcode='[[BCDEGRST]]'
Chris@40 3922
Chris@40 3923 # Regexp to match symbols that can be accessed directly from C.
Chris@40 3924 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
Chris@40 3925
Chris@40 3926 # Define system-specific variables.
Chris@40 3927 case $host_os in
Chris@40 3928 aix*)
Chris@40 3929 symcode='[[BCDT]]'
Chris@40 3930 ;;
Chris@40 3931 cygwin* | mingw* | pw32* | cegcc*)
Chris@40 3932 symcode='[[ABCDGISTW]]'
Chris@40 3933 ;;
Chris@40 3934 hpux*)
Chris@40 3935 if test ia64 = "$host_cpu"; then
Chris@40 3936 symcode='[[ABCDEGRST]]'
Chris@40 3937 fi
Chris@40 3938 ;;
Chris@40 3939 irix* | nonstopux*)
Chris@40 3940 symcode='[[BCDEGRST]]'
Chris@40 3941 ;;
Chris@40 3942 osf*)
Chris@40 3943 symcode='[[BCDEGQRST]]'
Chris@40 3944 ;;
Chris@40 3945 solaris*)
Chris@40 3946 symcode='[[BDRT]]'
Chris@40 3947 ;;
Chris@40 3948 sco3.2v5*)
Chris@40 3949 symcode='[[DT]]'
Chris@40 3950 ;;
Chris@40 3951 sysv4.2uw2*)
Chris@40 3952 symcode='[[DT]]'
Chris@40 3953 ;;
Chris@40 3954 sysv5* | sco5v6* | unixware* | OpenUNIX*)
Chris@40 3955 symcode='[[ABDT]]'
Chris@40 3956 ;;
Chris@40 3957 sysv4)
Chris@40 3958 symcode='[[DFNSTU]]'
Chris@40 3959 ;;
Chris@40 3960 esac
Chris@40 3961
Chris@40 3962 # If we're using GNU nm, then use its standard symbol codes.
Chris@40 3963 case `$NM -V 2>&1` in
Chris@40 3964 *GNU* | *'with BFD'*)
Chris@40 3965 symcode='[[ABCDGIRSTW]]' ;;
Chris@40 3966 esac
Chris@40 3967
Chris@40 3968 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
Chris@40 3969 # Gets list of data symbols to import.
Chris@40 3970 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
Chris@40 3971 # Adjust the below global symbol transforms to fixup imported variables.
Chris@40 3972 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
Chris@40 3973 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
Chris@40 3974 lt_c_name_lib_hook="\
Chris@40 3975 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
Chris@40 3976 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
Chris@40 3977 else
Chris@40 3978 # Disable hooks by default.
Chris@40 3979 lt_cv_sys_global_symbol_to_import=
Chris@40 3980 lt_cdecl_hook=
Chris@40 3981 lt_c_name_hook=
Chris@40 3982 lt_c_name_lib_hook=
Chris@40 3983 fi
Chris@40 3984
Chris@40 3985 # Transform an extracted symbol line into a proper C declaration.
Chris@40 3986 # Some systems (esp. on ia64) link data and code symbols differently,
Chris@40 3987 # so use this general approach.
Chris@40 3988 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
Chris@40 3989 $lt_cdecl_hook\
Chris@40 3990 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
Chris@40 3991 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
Chris@40 3992
Chris@40 3993 # Transform an extracted symbol line into symbol name and symbol address
Chris@40 3994 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
Chris@40 3995 $lt_c_name_hook\
Chris@40 3996 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
Chris@40 3997 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
Chris@40 3998
Chris@40 3999 # Transform an extracted symbol line into symbol name with lib prefix and
Chris@40 4000 # symbol address.
Chris@40 4001 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
Chris@40 4002 $lt_c_name_lib_hook\
Chris@40 4003 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
Chris@40 4004 " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
Chris@40 4005 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
Chris@40 4006
Chris@40 4007 # Handle CRLF in mingw tool chain
Chris@40 4008 opt_cr=
Chris@40 4009 case $build_os in
Chris@40 4010 mingw*)
Chris@40 4011 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
Chris@40 4012 ;;
Chris@40 4013 esac
Chris@40 4014
Chris@40 4015 # Try without a prefix underscore, then with it.
Chris@40 4016 for ac_symprfx in "" "_"; do
Chris@40 4017
Chris@40 4018 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
Chris@40 4019 symxfrm="\\1 $ac_symprfx\\2 \\2"
Chris@40 4020
Chris@40 4021 # Write the raw and C identifiers.
Chris@40 4022 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
Chris@40 4023 # Fake it for dumpbin and say T for any non-static function,
Chris@40 4024 # D for any global variable and I for any imported variable.
Chris@40 4025 # Also find C++ and __fastcall symbols from MSVC++,
Chris@40 4026 # which start with @ or ?.
Chris@40 4027 lt_cv_sys_global_symbol_pipe="$AWK ['"\
Chris@40 4028 " {last_section=section; section=\$ 3};"\
Chris@40 4029 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
Chris@40 4030 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
Chris@40 4031 " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
Chris@40 4032 " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
Chris@40 4033 " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
Chris@40 4034 " \$ 0!~/External *\|/{next};"\
Chris@40 4035 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
Chris@40 4036 " {if(hide[section]) next};"\
Chris@40 4037 " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
Chris@40 4038 " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
Chris@40 4039 " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
Chris@40 4040 " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
Chris@40 4041 " ' prfx=^$ac_symprfx]"
Chris@40 4042 else
Chris@40 4043 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
Chris@40 4044 fi
Chris@40 4045 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
Chris@40 4046
Chris@40 4047 # Check to see that the pipe works correctly.
Chris@40 4048 pipe_works=no
Chris@40 4049
Chris@40 4050 rm -f conftest*
Chris@40 4051 cat > conftest.$ac_ext <<_LT_EOF
Chris@40 4052 #ifdef __cplusplus
Chris@40 4053 extern "C" {
Chris@40 4054 #endif
Chris@40 4055 char nm_test_var;
Chris@40 4056 void nm_test_func(void);
Chris@40 4057 void nm_test_func(void){}
Chris@40 4058 #ifdef __cplusplus
Chris@40 4059 }
Chris@40 4060 #endif
Chris@40 4061 int main(){nm_test_var='a';nm_test_func();return(0);}
Chris@40 4062 _LT_EOF
Chris@40 4063
Chris@40 4064 if AC_TRY_EVAL(ac_compile); then
Chris@40 4065 # Now try to grab the symbols.
Chris@40 4066 nlist=conftest.nm
Chris@40 4067 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
Chris@40 4068 # Try sorting and uniquifying the output.
Chris@40 4069 if sort "$nlist" | uniq > "$nlist"T; then
Chris@40 4070 mv -f "$nlist"T "$nlist"
Chris@40 4071 else
Chris@40 4072 rm -f "$nlist"T
Chris@40 4073 fi
Chris@40 4074
Chris@40 4075 # Make sure that we snagged all the symbols we need.
Chris@40 4076 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
Chris@40 4077 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
Chris@40 4078 cat <<_LT_EOF > conftest.$ac_ext
Chris@40 4079 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
Chris@40 4080 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
Chris@40 4081 /* DATA imports from DLLs on WIN32 can't be const, because runtime
Chris@40 4082 relocations are performed -- see ld's documentation on pseudo-relocs. */
Chris@40 4083 # define LT@&t@_DLSYM_CONST
Chris@40 4084 #elif defined __osf__
Chris@40 4085 /* This system does not cope well with relocations in const data. */
Chris@40 4086 # define LT@&t@_DLSYM_CONST
Chris@40 4087 #else
Chris@40 4088 # define LT@&t@_DLSYM_CONST const
Chris@40 4089 #endif
Chris@40 4090
Chris@40 4091 #ifdef __cplusplus
Chris@40 4092 extern "C" {
Chris@40 4093 #endif
Chris@40 4094
Chris@40 4095 _LT_EOF
Chris@40 4096 # Now generate the symbol file.
Chris@40 4097 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
Chris@40 4098
Chris@40 4099 cat <<_LT_EOF >> conftest.$ac_ext
Chris@40 4100
Chris@40 4101 /* The mapping between symbol names and symbols. */
Chris@40 4102 LT@&t@_DLSYM_CONST struct {
Chris@40 4103 const char *name;
Chris@40 4104 void *address;
Chris@40 4105 }
Chris@40 4106 lt__PROGRAM__LTX_preloaded_symbols[[]] =
Chris@40 4107 {
Chris@40 4108 { "@PROGRAM@", (void *) 0 },
Chris@40 4109 _LT_EOF
Chris@40 4110 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
Chris@40 4111 cat <<\_LT_EOF >> conftest.$ac_ext
Chris@40 4112 {0, (void *) 0}
Chris@40 4113 };
Chris@40 4114
Chris@40 4115 /* This works around a problem in FreeBSD linker */
Chris@40 4116 #ifdef FREEBSD_WORKAROUND
Chris@40 4117 static const void *lt_preloaded_setup() {
Chris@40 4118 return lt__PROGRAM__LTX_preloaded_symbols;
Chris@40 4119 }
Chris@40 4120 #endif
Chris@40 4121
Chris@40 4122 #ifdef __cplusplus
Chris@40 4123 }
Chris@40 4124 #endif
Chris@40 4125 _LT_EOF
Chris@40 4126 # Now try linking the two files.
Chris@40 4127 mv conftest.$ac_objext conftstm.$ac_objext
Chris@40 4128 lt_globsym_save_LIBS=$LIBS
Chris@40 4129 lt_globsym_save_CFLAGS=$CFLAGS
Chris@40 4130 LIBS=conftstm.$ac_objext
Chris@40 4131 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
Chris@40 4132 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
Chris@40 4133 pipe_works=yes
Chris@40 4134 fi
Chris@40 4135 LIBS=$lt_globsym_save_LIBS
Chris@40 4136 CFLAGS=$lt_globsym_save_CFLAGS
Chris@40 4137 else
Chris@40 4138 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
Chris@40 4139 fi
Chris@40 4140 else
Chris@40 4141 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
Chris@40 4142 fi
Chris@40 4143 else
Chris@40 4144 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
Chris@40 4145 fi
Chris@40 4146 else
Chris@40 4147 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
Chris@40 4148 cat conftest.$ac_ext >&5
Chris@40 4149 fi
Chris@40 4150 rm -rf conftest* conftst*
Chris@40 4151
Chris@40 4152 # Do not use the global_symbol_pipe unless it works.
Chris@40 4153 if test yes = "$pipe_works"; then
Chris@40 4154 break
Chris@40 4155 else
Chris@40 4156 lt_cv_sys_global_symbol_pipe=
Chris@40 4157 fi
Chris@40 4158 done
Chris@40 4159 ])
Chris@40 4160 if test -z "$lt_cv_sys_global_symbol_pipe"; then
Chris@40 4161 lt_cv_sys_global_symbol_to_cdecl=
Chris@40 4162 fi
Chris@40 4163 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
Chris@40 4164 AC_MSG_RESULT(failed)
Chris@40 4165 else
Chris@40 4166 AC_MSG_RESULT(ok)
Chris@40 4167 fi
Chris@40 4168
Chris@40 4169 # Response file support.
Chris@40 4170 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
Chris@40 4171 nm_file_list_spec='@'
Chris@40 4172 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
Chris@40 4173 nm_file_list_spec='@'
Chris@40 4174 fi
Chris@40 4175
Chris@40 4176 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
Chris@40 4177 [Take the output of nm and produce a listing of raw symbols and C names])
Chris@40 4178 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
Chris@40 4179 [Transform the output of nm in a proper C declaration])
Chris@40 4180 _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
Chris@40 4181 [Transform the output of nm into a list of symbols to manually relocate])
Chris@40 4182 _LT_DECL([global_symbol_to_c_name_address],
Chris@40 4183 [lt_cv_sys_global_symbol_to_c_name_address], [1],
Chris@40 4184 [Transform the output of nm in a C name address pair])
Chris@40 4185 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
Chris@40 4186 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
Chris@40 4187 [Transform the output of nm in a C name address pair when lib prefix is needed])
Chris@40 4188 _LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
Chris@40 4189 [The name lister interface])
Chris@40 4190 _LT_DECL([], [nm_file_list_spec], [1],
Chris@40 4191 [Specify filename containing input files for $NM])
Chris@40 4192 ]) # _LT_CMD_GLOBAL_SYMBOLS
Chris@40 4193
Chris@40 4194
Chris@40 4195 # _LT_COMPILER_PIC([TAGNAME])
Chris@40 4196 # ---------------------------
Chris@40 4197 m4_defun([_LT_COMPILER_PIC],
Chris@40 4198 [m4_require([_LT_TAG_COMPILER])dnl
Chris@40 4199 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
Chris@40 4200 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@40 4201 _LT_TAGVAR(lt_prog_compiler_static, $1)=
Chris@40 4202
Chris@40 4203 m4_if([$1], [CXX], [
Chris@40 4204 # C++ specific cases for pic, static, wl, etc.
Chris@40 4205 if test yes = "$GXX"; then
Chris@40 4206 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@40 4207 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@40 4208
Chris@40 4209 case $host_os in
Chris@40 4210 aix*)
Chris@40 4211 # All AIX code is PIC.
Chris@40 4212 if test ia64 = "$host_cpu"; then
Chris@40 4213 # AIX 5 now supports IA64 processor
Chris@40 4214 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@40 4215 fi
Chris@40 4216 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@40 4217 ;;
Chris@40 4218
Chris@40 4219 amigaos*)
Chris@40 4220 case $host_cpu in
Chris@40 4221 powerpc)
Chris@40 4222 # see comment about AmigaOS4 .so support
Chris@40 4223 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@40 4224 ;;
Chris@40 4225 m68k)
Chris@40 4226 # FIXME: we need at least 68020 code to build shared libraries, but
Chris@40 4227 # adding the '-m68020' flag to GCC prevents building anything better,
Chris@40 4228 # like '-m68040'.
Chris@40 4229 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
Chris@40 4230 ;;
Chris@40 4231 esac
Chris@40 4232 ;;
Chris@40 4233
Chris@40 4234 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
Chris@40 4235 # PIC is the default for these OSes.
Chris@40 4236 ;;
Chris@40 4237 mingw* | cygwin* | os2* | pw32* | cegcc*)
Chris@40 4238 # This hack is so that the source file can tell whether it is being
Chris@40 4239 # built for inclusion in a dll (and should export symbols for example).
Chris@40 4240 # Although the cygwin gcc ignores -fPIC, still need this for old-style
Chris@40 4241 # (--disable-auto-import) libraries
Chris@40 4242 m4_if([$1], [GCJ], [],
Chris@40 4243 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
Chris@40 4244 case $host_os in
Chris@40 4245 os2*)
Chris@40 4246 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
Chris@40 4247 ;;
Chris@40 4248 esac
Chris@40 4249 ;;
Chris@40 4250 darwin* | rhapsody*)
Chris@40 4251 # PIC is the default on this platform
Chris@40 4252 # Common symbols not allowed in MH_DYLIB files
Chris@40 4253 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
Chris@40 4254 ;;
Chris@40 4255 *djgpp*)
Chris@40 4256 # DJGPP does not support shared libraries at all
Chris@40 4257 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@40 4258 ;;
Chris@40 4259 haiku*)
Chris@40 4260 # PIC is the default for Haiku.
Chris@40 4261 # The "-static" flag exists, but is broken.
Chris@40 4262 _LT_TAGVAR(lt_prog_compiler_static, $1)=
Chris@40 4263 ;;
Chris@40 4264 interix[[3-9]]*)
Chris@40 4265 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
Chris@40 4266 # Instead, we relocate shared libraries at runtime.
Chris@40 4267 ;;
Chris@40 4268 sysv4*MP*)
Chris@40 4269 if test -d /usr/nec; then
Chris@40 4270 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
Chris@40 4271 fi
Chris@40 4272 ;;
Chris@40 4273 hpux*)
Chris@40 4274 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
Chris@40 4275 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
Chris@40 4276 # sets the default TLS model and affects inlining.
Chris@40 4277 case $host_cpu in
Chris@40 4278 hppa*64*)
Chris@40 4279 ;;
Chris@40 4280 *)
Chris@40 4281 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@40 4282 ;;
Chris@40 4283 esac
Chris@40 4284 ;;
Chris@40 4285 *qnx* | *nto*)
Chris@40 4286 # QNX uses GNU C++, but need to define -shared option too, otherwise
Chris@40 4287 # it will coredump.
Chris@40 4288 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
Chris@40 4289 ;;
Chris@40 4290 *)
Chris@40 4291 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@40 4292 ;;
Chris@40 4293 esac
Chris@40 4294 else
Chris@40 4295 case $host_os in
Chris@40 4296 aix[[4-9]]*)
Chris@40 4297 # All AIX code is PIC.
Chris@40 4298 if test ia64 = "$host_cpu"; then
Chris@40 4299 # AIX 5 now supports IA64 processor
Chris@40 4300 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@40 4301 else
Chris@40 4302 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
Chris@40 4303 fi
Chris@40 4304 ;;
Chris@40 4305 chorus*)
Chris@40 4306 case $cc_basename in
Chris@40 4307 cxch68*)
Chris@40 4308 # Green Hills C++ Compiler
Chris@40 4309 # _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@40 4310 ;;
Chris@40 4311 esac
Chris@40 4312 ;;
Chris@40 4313 mingw* | cygwin* | os2* | pw32* | cegcc*)
Chris@40 4314 # This hack is so that the source file can tell whether it is being
Chris@40 4315 # built for inclusion in a dll (and should export symbols for example).
Chris@40 4316 m4_if([$1], [GCJ], [],
Chris@40 4317 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
Chris@40 4318 ;;
Chris@40 4319 dgux*)
Chris@40 4320 case $cc_basename in
Chris@40 4321 ec++*)
Chris@40 4322 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@40 4323 ;;
Chris@40 4324 ghcx*)
Chris@40 4325 # Green Hills C++ Compiler
Chris@40 4326 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@40 4327 ;;
Chris@40 4328 *)
Chris@40 4329 ;;
Chris@40 4330 esac
Chris@40 4331 ;;
Chris@40 4332 freebsd* | dragonfly*)
Chris@40 4333 # FreeBSD uses GNU C++
Chris@40 4334 ;;
Chris@40 4335 hpux9* | hpux10* | hpux11*)
Chris@40 4336 case $cc_basename in
Chris@40 4337 CC*)
Chris@40 4338 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@40 4339 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
Chris@40 4340 if test ia64 != "$host_cpu"; then
Chris@40 4341 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
Chris@40 4342 fi
Chris@40 4343 ;;
Chris@40 4344 aCC*)
Chris@40 4345 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@40 4346 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
Chris@40 4347 case $host_cpu in
Chris@40 4348 hppa*64*|ia64*)
Chris@40 4349 # +Z the default
Chris@40 4350 ;;
Chris@40 4351 *)
Chris@40 4352 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
Chris@40 4353 ;;
Chris@40 4354 esac
Chris@40 4355 ;;
Chris@40 4356 *)
Chris@40 4357 ;;
Chris@40 4358 esac
Chris@40 4359 ;;
Chris@40 4360 interix*)
Chris@40 4361 # This is c89, which is MS Visual C++ (no shared libs)
Chris@40 4362 # Anyone wants to do a port?
Chris@40 4363 ;;
Chris@40 4364 irix5* | irix6* | nonstopux*)
Chris@40 4365 case $cc_basename in
Chris@40 4366 CC*)
Chris@40 4367 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@40 4368 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@40 4369 # CC pic flag -KPIC is the default.
Chris@40 4370 ;;
Chris@40 4371 *)
Chris@40 4372 ;;
Chris@40 4373 esac
Chris@40 4374 ;;
Chris@40 4375 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
Chris@40 4376 case $cc_basename in
Chris@40 4377 KCC*)
Chris@40 4378 # KAI C++ Compiler
Chris@40 4379 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
Chris@40 4380 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@40 4381 ;;
Chris@40 4382 ecpc* )
Chris@40 4383 # old Intel C++ for x86_64, which still supported -KPIC.
Chris@40 4384 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@40 4385 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@40 4386 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@40 4387 ;;
Chris@40 4388 icpc* )
Chris@40 4389 # Intel C++, used to be incompatible with GCC.
Chris@40 4390 # ICC 10 doesn't accept -KPIC any more.
Chris@40 4391 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@40 4392 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@40 4393 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@40 4394 ;;
Chris@40 4395 pgCC* | pgcpp*)
Chris@40 4396 # Portland Group C++ compiler
Chris@40 4397 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@40 4398 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
Chris@40 4399 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@40 4400 ;;
Chris@40 4401 cxx*)
Chris@40 4402 # Compaq C++
Chris@40 4403 # Make sure the PIC flag is empty. It appears that all Alpha
Chris@40 4404 # Linux and Compaq Tru64 Unix objects are PIC.
Chris@40 4405 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@40 4406 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@40 4407 ;;
Chris@40 4408 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
Chris@40 4409 # IBM XL 8.0, 9.0 on PPC and BlueGene
Chris@40 4410 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@40 4411 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
Chris@40 4412 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
Chris@40 4413 ;;
Chris@40 4414 *)
Chris@40 4415 case `$CC -V 2>&1 | sed 5q` in
Chris@40 4416 *Sun\ C*)
Chris@40 4417 # Sun C++ 5.9
Chris@40 4418 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@40 4419 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@40 4420 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
Chris@40 4421 ;;
Chris@40 4422 esac
Chris@40 4423 ;;
Chris@40 4424 esac
Chris@40 4425 ;;
Chris@40 4426 lynxos*)
Chris@40 4427 ;;
Chris@40 4428 m88k*)
Chris@40 4429 ;;
Chris@40 4430 mvs*)
Chris@40 4431 case $cc_basename in
Chris@40 4432 cxx*)
Chris@40 4433 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
Chris@40 4434 ;;
Chris@40 4435 *)
Chris@40 4436 ;;
Chris@40 4437 esac
Chris@40 4438 ;;
Chris@40 4439 netbsd* | netbsdelf*-gnu)
Chris@40 4440 ;;
Chris@40 4441 *qnx* | *nto*)
Chris@40 4442 # QNX uses GNU C++, but need to define -shared option too, otherwise
Chris@40 4443 # it will coredump.
Chris@40 4444 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
Chris@40 4445 ;;
Chris@40 4446 osf3* | osf4* | osf5*)
Chris@40 4447 case $cc_basename in
Chris@40 4448 KCC*)
Chris@40 4449 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
Chris@40 4450 ;;
Chris@40 4451 RCC*)
Chris@40 4452 # Rational C++ 2.4.1
Chris@40 4453 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@40 4454 ;;
Chris@40 4455 cxx*)
Chris@40 4456 # Digital/Compaq C++
Chris@40 4457 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@40 4458 # Make sure the PIC flag is empty. It appears that all Alpha
Chris@40 4459 # Linux and Compaq Tru64 Unix objects are PIC.
Chris@40 4460 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@40 4461 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@40 4462 ;;
Chris@40 4463 *)
Chris@40 4464 ;;
Chris@40 4465 esac
Chris@40 4466 ;;
Chris@40 4467 psos*)
Chris@40 4468 ;;
Chris@40 4469 solaris*)
Chris@40 4470 case $cc_basename in
Chris@40 4471 CC* | sunCC*)
Chris@40 4472 # Sun C++ 4.2, 5.x and Centerline C++
Chris@40 4473 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@40 4474 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@40 4475 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
Chris@40 4476 ;;
Chris@40 4477 gcx*)
Chris@40 4478 # Green Hills C++ Compiler
Chris@40 4479 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
Chris@40 4480 ;;
Chris@40 4481 *)
Chris@40 4482 ;;
Chris@40 4483 esac
Chris@40 4484 ;;
Chris@40 4485 sunos4*)
Chris@40 4486 case $cc_basename in
Chris@40 4487 CC*)
Chris@40 4488 # Sun C++ 4.x
Chris@40 4489 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@40 4490 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@40 4491 ;;
Chris@40 4492 lcc*)
Chris@40 4493 # Lucid
Chris@40 4494 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@40 4495 ;;
Chris@40 4496 *)
Chris@40 4497 ;;
Chris@40 4498 esac
Chris@40 4499 ;;
Chris@40 4500 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
Chris@40 4501 case $cc_basename in
Chris@40 4502 CC*)
Chris@40 4503 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@40 4504 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@40 4505 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@40 4506 ;;
Chris@40 4507 esac
Chris@40 4508 ;;
Chris@40 4509 tandem*)
Chris@40 4510 case $cc_basename in
Chris@40 4511 NCC*)
Chris@40 4512 # NonStop-UX NCC 3.20
Chris@40 4513 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@40 4514 ;;
Chris@40 4515 *)
Chris@40 4516 ;;
Chris@40 4517 esac
Chris@40 4518 ;;
Chris@40 4519 vxworks*)
Chris@40 4520 ;;
Chris@40 4521 *)
Chris@40 4522 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
Chris@40 4523 ;;
Chris@40 4524 esac
Chris@40 4525 fi
Chris@40 4526 ],
Chris@40 4527 [
Chris@40 4528 if test yes = "$GCC"; then
Chris@40 4529 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@40 4530 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@40 4531
Chris@40 4532 case $host_os in
Chris@40 4533 aix*)
Chris@40 4534 # All AIX code is PIC.
Chris@40 4535 if test ia64 = "$host_cpu"; then
Chris@40 4536 # AIX 5 now supports IA64 processor
Chris@40 4537 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@40 4538 fi
Chris@40 4539 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@40 4540 ;;
Chris@40 4541
Chris@40 4542 amigaos*)
Chris@40 4543 case $host_cpu in
Chris@40 4544 powerpc)
Chris@40 4545 # see comment about AmigaOS4 .so support
Chris@40 4546 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@40 4547 ;;
Chris@40 4548 m68k)
Chris@40 4549 # FIXME: we need at least 68020 code to build shared libraries, but
Chris@40 4550 # adding the '-m68020' flag to GCC prevents building anything better,
Chris@40 4551 # like '-m68040'.
Chris@40 4552 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
Chris@40 4553 ;;
Chris@40 4554 esac
Chris@40 4555 ;;
Chris@40 4556
Chris@40 4557 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
Chris@40 4558 # PIC is the default for these OSes.
Chris@40 4559 ;;
Chris@40 4560
Chris@40 4561 mingw* | cygwin* | pw32* | os2* | cegcc*)
Chris@40 4562 # This hack is so that the source file can tell whether it is being
Chris@40 4563 # built for inclusion in a dll (and should export symbols for example).
Chris@40 4564 # Although the cygwin gcc ignores -fPIC, still need this for old-style
Chris@40 4565 # (--disable-auto-import) libraries
Chris@40 4566 m4_if([$1], [GCJ], [],
Chris@40 4567 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
Chris@40 4568 case $host_os in
Chris@40 4569 os2*)
Chris@40 4570 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
Chris@40 4571 ;;
Chris@40 4572 esac
Chris@40 4573 ;;
Chris@40 4574
Chris@40 4575 darwin* | rhapsody*)
Chris@40 4576 # PIC is the default on this platform
Chris@40 4577 # Common symbols not allowed in MH_DYLIB files
Chris@40 4578 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
Chris@40 4579 ;;
Chris@40 4580
Chris@40 4581 haiku*)
Chris@40 4582 # PIC is the default for Haiku.
Chris@40 4583 # The "-static" flag exists, but is broken.
Chris@40 4584 _LT_TAGVAR(lt_prog_compiler_static, $1)=
Chris@40 4585 ;;
Chris@40 4586
Chris@40 4587 hpux*)
Chris@40 4588 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
Chris@40 4589 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
Chris@40 4590 # sets the default TLS model and affects inlining.
Chris@40 4591 case $host_cpu in
Chris@40 4592 hppa*64*)
Chris@40 4593 # +Z the default
Chris@40 4594 ;;
Chris@40 4595 *)
Chris@40 4596 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@40 4597 ;;
Chris@40 4598 esac
Chris@40 4599 ;;
Chris@40 4600
Chris@40 4601 interix[[3-9]]*)
Chris@40 4602 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
Chris@40 4603 # Instead, we relocate shared libraries at runtime.
Chris@40 4604 ;;
Chris@40 4605
Chris@40 4606 msdosdjgpp*)
Chris@40 4607 # Just because we use GCC doesn't mean we suddenly get shared libraries
Chris@40 4608 # on systems that don't support them.
Chris@40 4609 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
Chris@40 4610 enable_shared=no
Chris@40 4611 ;;
Chris@40 4612
Chris@40 4613 *nto* | *qnx*)
Chris@40 4614 # QNX uses GNU C++, but need to define -shared option too, otherwise
Chris@40 4615 # it will coredump.
Chris@40 4616 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
Chris@40 4617 ;;
Chris@40 4618
Chris@40 4619 sysv4*MP*)
Chris@40 4620 if test -d /usr/nec; then
Chris@40 4621 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
Chris@40 4622 fi
Chris@40 4623 ;;
Chris@40 4624
Chris@40 4625 *)
Chris@40 4626 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@40 4627 ;;
Chris@40 4628 esac
Chris@40 4629
Chris@40 4630 case $cc_basename in
Chris@40 4631 nvcc*) # Cuda Compiler Driver 2.2
Chris@40 4632 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
Chris@40 4633 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
Chris@40 4634 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
Chris@40 4635 fi
Chris@40 4636 ;;
Chris@40 4637 esac
Chris@40 4638 else
Chris@40 4639 # PORTME Check for flag to pass linker flags through the system compiler.
Chris@40 4640 case $host_os in
Chris@40 4641 aix*)
Chris@40 4642 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@40 4643 if test ia64 = "$host_cpu"; then
Chris@40 4644 # AIX 5 now supports IA64 processor
Chris@40 4645 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@40 4646 else
Chris@40 4647 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
Chris@40 4648 fi
Chris@40 4649 ;;
Chris@40 4650
Chris@40 4651 darwin* | rhapsody*)
Chris@40 4652 # PIC is the default on this platform
Chris@40 4653 # Common symbols not allowed in MH_DYLIB files
Chris@40 4654 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
Chris@40 4655 case $cc_basename in
Chris@40 4656 nagfor*)
Chris@40 4657 # NAG Fortran compiler
Chris@40 4658 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
Chris@40 4659 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
Chris@40 4660 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@40 4661 ;;
Chris@40 4662 esac
Chris@40 4663 ;;
Chris@40 4664
Chris@40 4665 mingw* | cygwin* | pw32* | os2* | cegcc*)
Chris@40 4666 # This hack is so that the source file can tell whether it is being
Chris@40 4667 # built for inclusion in a dll (and should export symbols for example).
Chris@40 4668 m4_if([$1], [GCJ], [],
Chris@40 4669 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
Chris@40 4670 case $host_os in
Chris@40 4671 os2*)
Chris@40 4672 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
Chris@40 4673 ;;
Chris@40 4674 esac
Chris@40 4675 ;;
Chris@40 4676
Chris@40 4677 hpux9* | hpux10* | hpux11*)
Chris@40 4678 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@40 4679 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
Chris@40 4680 # not for PA HP-UX.
Chris@40 4681 case $host_cpu in
Chris@40 4682 hppa*64*|ia64*)
Chris@40 4683 # +Z the default
Chris@40 4684 ;;
Chris@40 4685 *)
Chris@40 4686 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
Chris@40 4687 ;;
Chris@40 4688 esac
Chris@40 4689 # Is there a better lt_prog_compiler_static that works with the bundled CC?
Chris@40 4690 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
Chris@40 4691 ;;
Chris@40 4692
Chris@40 4693 irix5* | irix6* | nonstopux*)
Chris@40 4694 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@40 4695 # PIC (with -KPIC) is the default.
Chris@40 4696 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@40 4697 ;;
Chris@40 4698
Chris@40 4699 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
Chris@40 4700 case $cc_basename in
Chris@40 4701 # old Intel for x86_64, which still supported -KPIC.
Chris@40 4702 ecc*)
Chris@40 4703 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@40 4704 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@40 4705 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@40 4706 ;;
Chris@40 4707 # icc used to be incompatible with GCC.
Chris@40 4708 # ICC 10 doesn't accept -KPIC any more.
Chris@40 4709 icc* | ifort*)
Chris@40 4710 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@40 4711 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@40 4712 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@40 4713 ;;
Chris@40 4714 # Lahey Fortran 8.1.
Chris@40 4715 lf95*)
Chris@40 4716 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@40 4717 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
Chris@40 4718 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
Chris@40 4719 ;;
Chris@40 4720 nagfor*)
Chris@40 4721 # NAG Fortran compiler
Chris@40 4722 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
Chris@40 4723 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
Chris@40 4724 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@40 4725 ;;
Chris@40 4726 tcc*)
Chris@40 4727 # Fabrice Bellard et al's Tiny C Compiler
Chris@40 4728 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@40 4729 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@40 4730 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@40 4731 ;;
Chris@40 4732 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
Chris@40 4733 # Portland Group compilers (*not* the Pentium gcc compiler,
Chris@40 4734 # which looks to be a dead project)
Chris@40 4735 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@40 4736 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
Chris@40 4737 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@40 4738 ;;
Chris@40 4739 ccc*)
Chris@40 4740 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@40 4741 # All Alpha code is PIC.
Chris@40 4742 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@40 4743 ;;
Chris@40 4744 xl* | bgxl* | bgf* | mpixl*)
Chris@40 4745 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
Chris@40 4746 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@40 4747 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
Chris@40 4748 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
Chris@40 4749 ;;
Chris@40 4750 *)
Chris@40 4751 case `$CC -V 2>&1 | sed 5q` in
Chris@40 4752 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
Chris@40 4753 # Sun Fortran 8.3 passes all unrecognized flags to the linker
Chris@40 4754 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@40 4755 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@40 4756 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
Chris@40 4757 ;;
Chris@40 4758 *Sun\ F* | *Sun*Fortran*)
Chris@40 4759 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@40 4760 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@40 4761 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
Chris@40 4762 ;;
Chris@40 4763 *Sun\ C*)
Chris@40 4764 # Sun C 5.9
Chris@40 4765 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@40 4766 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@40 4767 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@40 4768 ;;
Chris@40 4769 *Intel*\ [[CF]]*Compiler*)
Chris@40 4770 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@40 4771 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@40 4772 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@40 4773 ;;
Chris@40 4774 *Portland\ Group*)
Chris@40 4775 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@40 4776 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
Chris@40 4777 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@40 4778 ;;
Chris@40 4779 esac
Chris@40 4780 ;;
Chris@40 4781 esac
Chris@40 4782 ;;
Chris@40 4783
Chris@40 4784 newsos6)
Chris@40 4785 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@40 4786 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@40 4787 ;;
Chris@40 4788
Chris@40 4789 *nto* | *qnx*)
Chris@40 4790 # QNX uses GNU C++, but need to define -shared option too, otherwise
Chris@40 4791 # it will coredump.
Chris@40 4792 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
Chris@40 4793 ;;
Chris@40 4794
Chris@40 4795 osf3* | osf4* | osf5*)
Chris@40 4796 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@40 4797 # All OSF/1 code is PIC.
Chris@40 4798 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@40 4799 ;;
Chris@40 4800
Chris@40 4801 rdos*)
Chris@40 4802 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@40 4803 ;;
Chris@40 4804
Chris@40 4805 solaris*)
Chris@40 4806 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@40 4807 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@40 4808 case $cc_basename in
Chris@40 4809 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
Chris@40 4810 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
Chris@40 4811 *)
Chris@40 4812 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
Chris@40 4813 esac
Chris@40 4814 ;;
Chris@40 4815
Chris@40 4816 sunos4*)
Chris@40 4817 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
Chris@40 4818 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
Chris@40 4819 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@40 4820 ;;
Chris@40 4821
Chris@40 4822 sysv4 | sysv4.2uw2* | sysv4.3*)
Chris@40 4823 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@40 4824 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@40 4825 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@40 4826 ;;
Chris@40 4827
Chris@40 4828 sysv4*MP*)
Chris@40 4829 if test -d /usr/nec; then
Chris@40 4830 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
Chris@40 4831 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@40 4832 fi
Chris@40 4833 ;;
Chris@40 4834
Chris@40 4835 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
Chris@40 4836 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@40 4837 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@40 4838 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@40 4839 ;;
Chris@40 4840
Chris@40 4841 unicos*)
Chris@40 4842 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@40 4843 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
Chris@40 4844 ;;
Chris@40 4845
Chris@40 4846 uts4*)
Chris@40 4847 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@40 4848 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@40 4849 ;;
Chris@40 4850
Chris@40 4851 *)
Chris@40 4852 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
Chris@40 4853 ;;
Chris@40 4854 esac
Chris@40 4855 fi
Chris@40 4856 ])
Chris@40 4857 case $host_os in
Chris@40 4858 # For platforms that do not support PIC, -DPIC is meaningless:
Chris@40 4859 *djgpp*)
Chris@40 4860 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@40 4861 ;;
Chris@40 4862 *)
Chris@40 4863 _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@40 4864 ;;
Chris@40 4865 esac
Chris@40 4866
Chris@40 4867 AC_CACHE_CHECK([for $compiler option to produce PIC],
Chris@40 4868 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
Chris@40 4869 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
Chris@40 4870 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
Chris@40 4871
Chris@40 4872 #
Chris@40 4873 # Check to make sure the PIC flag actually works.
Chris@40 4874 #
Chris@40 4875 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
Chris@40 4876 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
Chris@40 4877 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
Chris@40 4878 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
Chris@40 4879 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
Chris@40 4880 "" | " "*) ;;
Chris@40 4881 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
Chris@40 4882 esac],
Chris@40 4883 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@40 4884 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
Chris@40 4885 fi
Chris@40 4886 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
Chris@40 4887 [Additional compiler flags for building library objects])
Chris@40 4888
Chris@40 4889 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
Chris@40 4890 [How to pass a linker flag through the compiler])
Chris@40 4891 #
Chris@40 4892 # Check to make sure the static flag actually works.
Chris@40 4893 #
Chris@40 4894 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
Chris@40 4895 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
Chris@40 4896 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
Chris@40 4897 $lt_tmp_static_flag,
Chris@40 4898 [],
Chris@40 4899 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
Chris@40 4900 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
Chris@40 4901 [Compiler flag to prevent dynamic linking])
Chris@40 4902 ])# _LT_COMPILER_PIC
Chris@40 4903
Chris@40 4904
Chris@40 4905 # _LT_LINKER_SHLIBS([TAGNAME])
Chris@40 4906 # ----------------------------
Chris@40 4907 # See if the linker supports building shared libraries.
Chris@40 4908 m4_defun([_LT_LINKER_SHLIBS],
Chris@40 4909 [AC_REQUIRE([LT_PATH_LD])dnl
Chris@40 4910 AC_REQUIRE([LT_PATH_NM])dnl
Chris@40 4911 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
Chris@40 4912 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@40 4913 m4_require([_LT_DECL_EGREP])dnl
Chris@40 4914 m4_require([_LT_DECL_SED])dnl
Chris@40 4915 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
Chris@40 4916 m4_require([_LT_TAG_COMPILER])dnl
Chris@40 4917 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
Chris@40 4918 m4_if([$1], [CXX], [
Chris@40 4919 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
Chris@40 4920 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
Chris@40 4921 case $host_os in
Chris@40 4922 aix[[4-9]]*)
Chris@40 4923 # If we're using GNU nm, then we don't want the "-C" option.
Chris@40 4924 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
Chris@40 4925 # Without the "-l" option, or with the "-B" option, AIX nm treats
Chris@40 4926 # weak defined symbols like other global defined symbols, whereas
Chris@40 4927 # GNU nm marks them as "W".
Chris@40 4928 # While the 'weak' keyword is ignored in the Export File, we need
Chris@40 4929 # it in the Import File for the 'aix-soname' feature, so we have
Chris@40 4930 # to replace the "-B" option with "-P" for AIX nm.
Chris@40 4931 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
Chris@40 4932 _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@40 4933 else
Chris@40 4934 _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@40 4935 fi
Chris@40 4936 ;;
Chris@40 4937 pw32*)
Chris@40 4938 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
Chris@40 4939 ;;
Chris@40 4940 cygwin* | mingw* | cegcc*)
Chris@40 4941 case $cc_basename in
Chris@40 4942 cl*)
Chris@40 4943 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
Chris@40 4944 ;;
Chris@40 4945 *)
Chris@40 4946 _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@40 4947 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
Chris@40 4948 ;;
Chris@40 4949 esac
Chris@40 4950 ;;
Chris@40 4951 linux* | k*bsd*-gnu | gnu*)
Chris@40 4952 _LT_TAGVAR(link_all_deplibs, $1)=no
Chris@40 4953 ;;
Chris@40 4954 *)
Chris@40 4955 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
Chris@40 4956 ;;
Chris@40 4957 esac
Chris@40 4958 ], [
Chris@40 4959 runpath_var=
Chris@40 4960 _LT_TAGVAR(allow_undefined_flag, $1)=
Chris@40 4961 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@40 4962 _LT_TAGVAR(archive_cmds, $1)=
Chris@40 4963 _LT_TAGVAR(archive_expsym_cmds, $1)=
Chris@40 4964 _LT_TAGVAR(compiler_needs_object, $1)=no
Chris@40 4965 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
Chris@40 4966 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@40 4967 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
Chris@40 4968 _LT_TAGVAR(hardcode_automatic, $1)=no
Chris@40 4969 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@40 4970 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@40 4971 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@40 4972 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@40 4973 _LT_TAGVAR(hardcode_minus_L, $1)=no
Chris@40 4974 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
Chris@40 4975 _LT_TAGVAR(inherit_rpath, $1)=no
Chris@40 4976 _LT_TAGVAR(link_all_deplibs, $1)=unknown
Chris@40 4977 _LT_TAGVAR(module_cmds, $1)=
Chris@40 4978 _LT_TAGVAR(module_expsym_cmds, $1)=
Chris@40 4979 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
Chris@40 4980 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
Chris@40 4981 _LT_TAGVAR(thread_safe_flag_spec, $1)=
Chris@40 4982 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@40 4983 # include_expsyms should be a list of space-separated symbols to be *always*
Chris@40 4984 # included in the symbol list
Chris@40 4985 _LT_TAGVAR(include_expsyms, $1)=
Chris@40 4986 # exclude_expsyms can be an extended regexp of symbols to exclude
Chris@40 4987 # it will be wrapped by ' (' and ')$', so one must not match beginning or
Chris@40 4988 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
Chris@40 4989 # as well as any symbol that contains 'd'.
Chris@40 4990 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
Chris@40 4991 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
Chris@40 4992 # platforms (ab)use it in PIC code, but their linkers get confused if
Chris@40 4993 # the symbol is explicitly referenced. Since portable code cannot
Chris@40 4994 # rely on this symbol name, it's probably fine to never include it in
Chris@40 4995 # preloaded symbol tables.
Chris@40 4996 # Exclude shared library initialization/finalization symbols.
Chris@40 4997 dnl Note also adjust exclude_expsyms for C++ above.
Chris@40 4998 extract_expsyms_cmds=
Chris@40 4999
Chris@40 5000 case $host_os in
Chris@40 5001 cygwin* | mingw* | pw32* | cegcc*)
Chris@40 5002 # FIXME: the MSVC++ port hasn't been tested in a loooong time
Chris@40 5003 # When not using gcc, we currently assume that we are using
Chris@40 5004 # Microsoft Visual C++.
Chris@40 5005 if test yes != "$GCC"; then
Chris@40 5006 with_gnu_ld=no
Chris@40 5007 fi
Chris@40 5008 ;;
Chris@40 5009 interix*)
Chris@40 5010 # we just hope/assume this is gcc and not c89 (= MSVC++)
Chris@40 5011 with_gnu_ld=yes
Chris@40 5012 ;;
Chris@40 5013 openbsd* | bitrig*)
Chris@40 5014 with_gnu_ld=no
Chris@40 5015 ;;
Chris@40 5016 linux* | k*bsd*-gnu | gnu*)
Chris@40 5017 _LT_TAGVAR(link_all_deplibs, $1)=no
Chris@40 5018 ;;
Chris@40 5019 esac
Chris@40 5020
Chris@40 5021 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@40 5022
Chris@40 5023 # On some targets, GNU ld is compatible enough with the native linker
Chris@40 5024 # that we're better off using the native interface for both.
Chris@40 5025 lt_use_gnu_ld_interface=no
Chris@40 5026 if test yes = "$with_gnu_ld"; then
Chris@40 5027 case $host_os in
Chris@40 5028 aix*)
Chris@40 5029 # The AIX port of GNU ld has always aspired to compatibility
Chris@40 5030 # with the native linker. However, as the warning in the GNU ld
Chris@40 5031 # block says, versions before 2.19.5* couldn't really create working
Chris@40 5032 # shared libraries, regardless of the interface used.
Chris@40 5033 case `$LD -v 2>&1` in
Chris@40 5034 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
Chris@40 5035 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
Chris@40 5036 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
Chris@40 5037 *)
Chris@40 5038 lt_use_gnu_ld_interface=yes
Chris@40 5039 ;;
Chris@40 5040 esac
Chris@40 5041 ;;
Chris@40 5042 *)
Chris@40 5043 lt_use_gnu_ld_interface=yes
Chris@40 5044 ;;
Chris@40 5045 esac
Chris@40 5046 fi
Chris@40 5047
Chris@40 5048 if test yes = "$lt_use_gnu_ld_interface"; then
Chris@40 5049 # If archive_cmds runs LD, not CC, wlarc should be empty
Chris@40 5050 wlarc='$wl'
Chris@40 5051
Chris@40 5052 # Set some defaults for GNU ld with shared library support. These
Chris@40 5053 # are reset later if shared libraries are not supported. Putting them
Chris@40 5054 # here allows them to be overridden if necessary.
Chris@40 5055 runpath_var=LD_RUN_PATH
Chris@40 5056 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@40 5057 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
Chris@40 5058 # ancient GNU ld didn't support --whole-archive et. al.
Chris@40 5059 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
Chris@40 5060 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
Chris@40 5061 else
Chris@40 5062 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@40 5063 fi
Chris@40 5064 supports_anon_versioning=no
Chris@40 5065 case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
Chris@40 5066 *GNU\ gold*) supports_anon_versioning=yes ;;
Chris@40 5067 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
Chris@40 5068 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
Chris@40 5069 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
Chris@40 5070 *\ 2.11.*) ;; # other 2.11 versions
Chris@40 5071 *) supports_anon_versioning=yes ;;
Chris@40 5072 esac
Chris@40 5073
Chris@40 5074 # See if GNU ld supports shared libraries.
Chris@40 5075 case $host_os in
Chris@40 5076 aix[[3-9]]*)
Chris@40 5077 # On AIX/PPC, the GNU linker is very broken
Chris@40 5078 if test ia64 != "$host_cpu"; then
Chris@40 5079 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 5080 cat <<_LT_EOF 1>&2
Chris@40 5081
Chris@40 5082 *** Warning: the GNU linker, at least up to release 2.19, is reported
Chris@40 5083 *** to be unable to reliably create shared libraries on AIX.
Chris@40 5084 *** Therefore, libtool is disabling shared libraries support. If you
Chris@40 5085 *** really care for shared libraries, you may want to install binutils
Chris@40 5086 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
Chris@40 5087 *** You will then need to restart the configuration process.
Chris@40 5088
Chris@40 5089 _LT_EOF
Chris@40 5090 fi
Chris@40 5091 ;;
Chris@40 5092
Chris@40 5093 amigaos*)
Chris@40 5094 case $host_cpu in
Chris@40 5095 powerpc)
Chris@40 5096 # see comment about AmigaOS4 .so support
Chris@40 5097 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@40 5098 _LT_TAGVAR(archive_expsym_cmds, $1)=''
Chris@40 5099 ;;
Chris@40 5100 m68k)
Chris@40 5101 _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@40 5102 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@40 5103 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@40 5104 ;;
Chris@40 5105 esac
Chris@40 5106 ;;
Chris@40 5107
Chris@40 5108 beos*)
Chris@40 5109 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
Chris@40 5110 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@40 5111 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
Chris@40 5112 # support --undefined. This deserves some investigation. FIXME
Chris@40 5113 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@40 5114 else
Chris@40 5115 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 5116 fi
Chris@40 5117 ;;
Chris@40 5118
Chris@40 5119 cygwin* | mingw* | pw32* | cegcc*)
Chris@40 5120 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
Chris@40 5121 # as there is no search path for DLLs.
Chris@40 5122 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@40 5123 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
Chris@40 5124 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@40 5125 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@40 5126 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@40 5127 _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@40 5128 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
Chris@40 5129
Chris@40 5130 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
Chris@40 5131 _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@40 5132 # If the export-symbols file already is a .def file, use it as
Chris@40 5133 # is; otherwise, prepend EXPORTS...
Chris@40 5134 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
Chris@40 5135 cp $export_symbols $output_objdir/$soname.def;
Chris@40 5136 else
Chris@40 5137 echo EXPORTS > $output_objdir/$soname.def;
Chris@40 5138 cat $export_symbols >> $output_objdir/$soname.def;
Chris@40 5139 fi~
Chris@40 5140 $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@40 5141 else
Chris@40 5142 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 5143 fi
Chris@40 5144 ;;
Chris@40 5145
Chris@40 5146 haiku*)
Chris@40 5147 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@40 5148 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@40 5149 ;;
Chris@40 5150
Chris@40 5151 os2*)
Chris@40 5152 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@40 5153 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@40 5154 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@40 5155 shrext_cmds=.dll
Chris@40 5156 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
Chris@40 5157 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
Chris@40 5158 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
Chris@40 5159 $ECHO EXPORTS >> $output_objdir/$libname.def~
Chris@40 5160 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
Chris@40 5161 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
Chris@40 5162 emximp -o $lib $output_objdir/$libname.def'
Chris@40 5163 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
Chris@40 5164 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
Chris@40 5165 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
Chris@40 5166 $ECHO EXPORTS >> $output_objdir/$libname.def~
Chris@40 5167 prefix_cmds="$SED"~
Chris@40 5168 if test EXPORTS = "`$SED 1q $export_symbols`"; then
Chris@40 5169 prefix_cmds="$prefix_cmds -e 1d";
Chris@40 5170 fi~
Chris@40 5171 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
Chris@40 5172 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
Chris@40 5173 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
Chris@40 5174 emximp -o $lib $output_objdir/$libname.def'
Chris@40 5175 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
Chris@40 5176 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@40 5177 ;;
Chris@40 5178
Chris@40 5179 interix[[3-9]]*)
Chris@40 5180 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@40 5181 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@40 5182 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@40 5183 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@40 5184 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
Chris@40 5185 # Instead, shared libraries are loaded at an image base (0x10000000 by
Chris@40 5186 # default) and relocated if they conflict, which is a slow very memory
Chris@40 5187 # consuming and fragmenting process. To avoid this, we pick a random,
Chris@40 5188 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
Chris@40 5189 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
Chris@40 5190 _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@40 5191 _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@40 5192 ;;
Chris@40 5193
Chris@40 5194 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
Chris@40 5195 tmp_diet=no
Chris@40 5196 if test linux-dietlibc = "$host_os"; then
Chris@40 5197 case $cc_basename in
Chris@40 5198 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
Chris@40 5199 esac
Chris@40 5200 fi
Chris@40 5201 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
Chris@40 5202 && test no = "$tmp_diet"
Chris@40 5203 then
Chris@40 5204 tmp_addflag=' $pic_flag'
Chris@40 5205 tmp_sharedflag='-shared'
Chris@40 5206 case $cc_basename,$host_cpu in
Chris@40 5207 pgcc*) # Portland Group C compiler
Chris@40 5208 _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@40 5209 tmp_addflag=' $pic_flag'
Chris@40 5210 ;;
Chris@40 5211 pgf77* | pgf90* | pgf95* | pgfortran*)
Chris@40 5212 # Portland Group f77 and f90 compilers
Chris@40 5213 _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@40 5214 tmp_addflag=' $pic_flag -Mnomain' ;;
Chris@40 5215 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
Chris@40 5216 tmp_addflag=' -i_dynamic' ;;
Chris@40 5217 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
Chris@40 5218 tmp_addflag=' -i_dynamic -nofor_main' ;;
Chris@40 5219 ifc* | ifort*) # Intel Fortran compiler
Chris@40 5220 tmp_addflag=' -nofor_main' ;;
Chris@40 5221 lf95*) # Lahey Fortran 8.1
Chris@40 5222 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@40 5223 tmp_sharedflag='--shared' ;;
Chris@40 5224 nagfor*) # NAGFOR 5.3
Chris@40 5225 tmp_sharedflag='-Wl,-shared' ;;
Chris@40 5226 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
Chris@40 5227 tmp_sharedflag='-qmkshrobj'
Chris@40 5228 tmp_addflag= ;;
Chris@40 5229 nvcc*) # Cuda Compiler Driver 2.2
Chris@40 5230 _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@40 5231 _LT_TAGVAR(compiler_needs_object, $1)=yes
Chris@40 5232 ;;
Chris@40 5233 esac
Chris@40 5234 case `$CC -V 2>&1 | sed 5q` in
Chris@40 5235 *Sun\ C*) # Sun C 5.9
Chris@40 5236 _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@40 5237 _LT_TAGVAR(compiler_needs_object, $1)=yes
Chris@40 5238 tmp_sharedflag='-G' ;;
Chris@40 5239 *Sun\ F*) # Sun Fortran 8.3
Chris@40 5240 tmp_sharedflag='-G' ;;
Chris@40 5241 esac
Chris@40 5242 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@40 5243
Chris@40 5244 if test yes = "$supports_anon_versioning"; then
Chris@40 5245 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
Chris@40 5246 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
Chris@40 5247 echo "local: *; };" >> $output_objdir/$libname.ver~
Chris@40 5248 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
Chris@40 5249 fi
Chris@40 5250
Chris@40 5251 case $cc_basename in
Chris@40 5252 tcc*)
Chris@40 5253 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
Chris@40 5254 ;;
Chris@40 5255 xlf* | bgf* | bgxlf* | mpixlf*)
Chris@40 5256 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
Chris@40 5257 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
Chris@40 5258 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@40 5259 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
Chris@40 5260 if test yes = "$supports_anon_versioning"; then
Chris@40 5261 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
Chris@40 5262 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
Chris@40 5263 echo "local: *; };" >> $output_objdir/$libname.ver~
Chris@40 5264 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
Chris@40 5265 fi
Chris@40 5266 ;;
Chris@40 5267 esac
Chris@40 5268 else
Chris@40 5269 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 5270 fi
Chris@40 5271 ;;
Chris@40 5272
Chris@40 5273 netbsd* | netbsdelf*-gnu)
Chris@40 5274 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
Chris@40 5275 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
Chris@40 5276 wlarc=
Chris@40 5277 else
Chris@40 5278 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@40 5279 _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@40 5280 fi
Chris@40 5281 ;;
Chris@40 5282
Chris@40 5283 solaris*)
Chris@40 5284 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
Chris@40 5285 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 5286 cat <<_LT_EOF 1>&2
Chris@40 5287
Chris@40 5288 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
Chris@40 5289 *** create shared libraries on Solaris systems. Therefore, libtool
Chris@40 5290 *** is disabling shared libraries support. We urge you to upgrade GNU
Chris@40 5291 *** binutils to release 2.9.1 or newer. Another option is to modify
Chris@40 5292 *** your PATH or compiler configuration so that the native linker is
Chris@40 5293 *** used, and then restart.
Chris@40 5294
Chris@40 5295 _LT_EOF
Chris@40 5296 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
Chris@40 5297 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@40 5298 _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@40 5299 else
Chris@40 5300 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 5301 fi
Chris@40 5302 ;;
Chris@40 5303
Chris@40 5304 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
Chris@40 5305 case `$LD -v 2>&1` in
Chris@40 5306 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
Chris@40 5307 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 5308 cat <<_LT_EOF 1>&2
Chris@40 5309
Chris@40 5310 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
Chris@40 5311 *** reliably create shared libraries on SCO systems. Therefore, libtool
Chris@40 5312 *** is disabling shared libraries support. We urge you to upgrade GNU
Chris@40 5313 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
Chris@40 5314 *** your PATH or compiler configuration so that the native linker is
Chris@40 5315 *** used, and then restart.
Chris@40 5316
Chris@40 5317 _LT_EOF
Chris@40 5318 ;;
Chris@40 5319 *)
Chris@40 5320 # For security reasons, it is highly recommended that you always
Chris@40 5321 # use absolute paths for naming shared libraries, and exclude the
Chris@40 5322 # DT_RUNPATH tag from executables and libraries. But doing so
Chris@40 5323 # requires that you compile everything twice, which is a pain.
Chris@40 5324 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
Chris@40 5325 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@40 5326 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@40 5327 _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@40 5328 else
Chris@40 5329 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 5330 fi
Chris@40 5331 ;;
Chris@40 5332 esac
Chris@40 5333 ;;
Chris@40 5334
Chris@40 5335 sunos4*)
Chris@40 5336 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
Chris@40 5337 wlarc=
Chris@40 5338 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@40 5339 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@40 5340 ;;
Chris@40 5341
Chris@40 5342 *)
Chris@40 5343 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
Chris@40 5344 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@40 5345 _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@40 5346 else
Chris@40 5347 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 5348 fi
Chris@40 5349 ;;
Chris@40 5350 esac
Chris@40 5351
Chris@40 5352 if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
Chris@40 5353 runpath_var=
Chris@40 5354 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@40 5355 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@40 5356 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@40 5357 fi
Chris@40 5358 else
Chris@40 5359 # PORTME fill in a description of your system's linker (not GNU ld)
Chris@40 5360 case $host_os in
Chris@40 5361 aix3*)
Chris@40 5362 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@40 5363 _LT_TAGVAR(always_export_symbols, $1)=yes
Chris@40 5364 _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@40 5365 # Note: this linker hardcodes the directories in LIBPATH if there
Chris@40 5366 # are no directories specified by -L.
Chris@40 5367 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@40 5368 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
Chris@40 5369 # Neither direct hardcoding nor static linking is supported with a
Chris@40 5370 # broken collect2.
Chris@40 5371 _LT_TAGVAR(hardcode_direct, $1)=unsupported
Chris@40 5372 fi
Chris@40 5373 ;;
Chris@40 5374
Chris@40 5375 aix[[4-9]]*)
Chris@40 5376 if test ia64 = "$host_cpu"; then
Chris@40 5377 # On IA64, the linker does run time linking by default, so we don't
Chris@40 5378 # have to do anything special.
Chris@40 5379 aix_use_runtimelinking=no
Chris@40 5380 exp_sym_flag='-Bexport'
Chris@40 5381 no_entry_flag=
Chris@40 5382 else
Chris@40 5383 # If we're using GNU nm, then we don't want the "-C" option.
Chris@40 5384 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
Chris@40 5385 # Without the "-l" option, or with the "-B" option, AIX nm treats
Chris@40 5386 # weak defined symbols like other global defined symbols, whereas
Chris@40 5387 # GNU nm marks them as "W".
Chris@40 5388 # While the 'weak' keyword is ignored in the Export File, we need
Chris@40 5389 # it in the Import File for the 'aix-soname' feature, so we have
Chris@40 5390 # to replace the "-B" option with "-P" for AIX nm.
Chris@40 5391 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
Chris@40 5392 _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@40 5393 else
Chris@40 5394 _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@40 5395 fi
Chris@40 5396 aix_use_runtimelinking=no
Chris@40 5397
Chris@40 5398 # Test if we are trying to use run time linking or normal
Chris@40 5399 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
Chris@40 5400 # have runtime linking enabled, and use it for executables.
Chris@40 5401 # For shared libraries, we enable/disable runtime linking
Chris@40 5402 # depending on the kind of the shared library created -
Chris@40 5403 # when "with_aix_soname,aix_use_runtimelinking" is:
Chris@40 5404 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
Chris@40 5405 # "aix,yes" lib.so shared, rtl:yes, for executables
Chris@40 5406 # lib.a static archive
Chris@40 5407 # "both,no" lib.so.V(shr.o) shared, rtl:yes
Chris@40 5408 # lib.a(lib.so.V) shared, rtl:no, for executables
Chris@40 5409 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
Chris@40 5410 # lib.a(lib.so.V) shared, rtl:no
Chris@40 5411 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
Chris@40 5412 # lib.a static archive
Chris@40 5413 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
Chris@40 5414 for ld_flag in $LDFLAGS; do
Chris@40 5415 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
Chris@40 5416 aix_use_runtimelinking=yes
Chris@40 5417 break
Chris@40 5418 fi
Chris@40 5419 done
Chris@40 5420 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
Chris@40 5421 # With aix-soname=svr4, we create the lib.so.V shared archives only,
Chris@40 5422 # so we don't have lib.a shared libs to link our executables.
Chris@40 5423 # We have to force runtime linking in this case.
Chris@40 5424 aix_use_runtimelinking=yes
Chris@40 5425 LDFLAGS="$LDFLAGS -Wl,-brtl"
Chris@40 5426 fi
Chris@40 5427 ;;
Chris@40 5428 esac
Chris@40 5429
Chris@40 5430 exp_sym_flag='-bexport'
Chris@40 5431 no_entry_flag='-bnoentry'
Chris@40 5432 fi
Chris@40 5433
Chris@40 5434 # When large executables or shared objects are built, AIX ld can
Chris@40 5435 # have problems creating the table of contents. If linking a library
Chris@40 5436 # or program results in "error TOC overflow" add -mminimal-toc to
Chris@40 5437 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
Chris@40 5438 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
Chris@40 5439
Chris@40 5440 _LT_TAGVAR(archive_cmds, $1)=''
Chris@40 5441 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@40 5442 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@40 5443 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
Chris@40 5444 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@40 5445 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
Chris@40 5446 case $with_aix_soname,$aix_use_runtimelinking in
Chris@40 5447 aix,*) ;; # traditional, no import file
Chris@40 5448 svr4,* | *,yes) # use import file
Chris@40 5449 # The Import File defines what to hardcode.
Chris@40 5450 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@40 5451 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@40 5452 ;;
Chris@40 5453 esac
Chris@40 5454
Chris@40 5455 if test yes = "$GCC"; then
Chris@40 5456 case $host_os in aix4.[[012]]|aix4.[[012]].*)
Chris@40 5457 # We only want to do this on AIX 4.2 and lower, the check
Chris@40 5458 # below for broken collect2 doesn't work under 4.3+
Chris@40 5459 collect2name=`$CC -print-prog-name=collect2`
Chris@40 5460 if test -f "$collect2name" &&
Chris@40 5461 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
Chris@40 5462 then
Chris@40 5463 # We have reworked collect2
Chris@40 5464 :
Chris@40 5465 else
Chris@40 5466 # We have old collect2
Chris@40 5467 _LT_TAGVAR(hardcode_direct, $1)=unsupported
Chris@40 5468 # It fails to find uninstalled libraries when the uninstalled
Chris@40 5469 # path is not listed in the libpath. Setting hardcode_minus_L
Chris@40 5470 # to unsupported forces relinking
Chris@40 5471 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@40 5472 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@40 5473 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@40 5474 fi
Chris@40 5475 ;;
Chris@40 5476 esac
Chris@40 5477 shared_flag='-shared'
Chris@40 5478 if test yes = "$aix_use_runtimelinking"; then
Chris@40 5479 shared_flag="$shared_flag "'$wl-G'
Chris@40 5480 fi
Chris@40 5481 # Need to ensure runtime linking is disabled for the traditional
Chris@40 5482 # shared library, or the linker may eventually find shared libraries
Chris@40 5483 # /with/ Import File - we do not want to mix them.
Chris@40 5484 shared_flag_aix='-shared'
Chris@40 5485 shared_flag_svr4='-shared $wl-G'
Chris@40 5486 else
Chris@40 5487 # not using gcc
Chris@40 5488 if test ia64 = "$host_cpu"; then
Chris@40 5489 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
Chris@40 5490 # chokes on -Wl,-G. The following line is correct:
Chris@40 5491 shared_flag='-G'
Chris@40 5492 else
Chris@40 5493 if test yes = "$aix_use_runtimelinking"; then
Chris@40 5494 shared_flag='$wl-G'
Chris@40 5495 else
Chris@40 5496 shared_flag='$wl-bM:SRE'
Chris@40 5497 fi
Chris@40 5498 shared_flag_aix='$wl-bM:SRE'
Chris@40 5499 shared_flag_svr4='$wl-G'
Chris@40 5500 fi
Chris@40 5501 fi
Chris@40 5502
Chris@40 5503 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
Chris@40 5504 # It seems that -bexpall does not export symbols beginning with
Chris@40 5505 # underscore (_), so it is better to generate a list of symbols to export.
Chris@40 5506 _LT_TAGVAR(always_export_symbols, $1)=yes
Chris@40 5507 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
Chris@40 5508 # Warning - without using the other runtime loading flags (-brtl),
Chris@40 5509 # -berok will link without error, but may produce a broken library.
Chris@40 5510 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
Chris@40 5511 # Determine the default libpath from the value encoded in an
Chris@40 5512 # empty executable.
Chris@40 5513 _LT_SYS_MODULE_PATH_AIX([$1])
Chris@40 5514 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
Chris@40 5515 _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@40 5516 else
Chris@40 5517 if test ia64 = "$host_cpu"; then
Chris@40 5518 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
Chris@40 5519 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
Chris@40 5520 _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@40 5521 else
Chris@40 5522 # Determine the default libpath from the value encoded in an
Chris@40 5523 # empty executable.
Chris@40 5524 _LT_SYS_MODULE_PATH_AIX([$1])
Chris@40 5525 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
Chris@40 5526 # Warning - without using the other run time loading flags,
Chris@40 5527 # -berok will link without error, but may produce a broken library.
Chris@40 5528 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
Chris@40 5529 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
Chris@40 5530 if test yes = "$with_gnu_ld"; then
Chris@40 5531 # We only use this code for GNU lds that support --whole-archive.
Chris@40 5532 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
Chris@40 5533 else
Chris@40 5534 # Exported symbols can be pulled into shared objects from archives
Chris@40 5535 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
Chris@40 5536 fi
Chris@40 5537 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
Chris@40 5538 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
Chris@40 5539 # -brtl affects multiple linker settings, -berok does not and is overridden later
Chris@40 5540 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
Chris@40 5541 if test svr4 != "$with_aix_soname"; then
Chris@40 5542 # This is similar to how AIX traditionally builds its shared libraries.
Chris@40 5543 _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@40 5544 fi
Chris@40 5545 if test aix != "$with_aix_soname"; then
Chris@40 5546 _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@40 5547 else
Chris@40 5548 # used by -dlpreopen to get the symbols
Chris@40 5549 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
Chris@40 5550 fi
Chris@40 5551 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
Chris@40 5552 fi
Chris@40 5553 fi
Chris@40 5554 ;;
Chris@40 5555
Chris@40 5556 amigaos*)
Chris@40 5557 case $host_cpu in
Chris@40 5558 powerpc)
Chris@40 5559 # see comment about AmigaOS4 .so support
Chris@40 5560 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@40 5561 _LT_TAGVAR(archive_expsym_cmds, $1)=''
Chris@40 5562 ;;
Chris@40 5563 m68k)
Chris@40 5564 _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@40 5565 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@40 5566 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@40 5567 ;;
Chris@40 5568 esac
Chris@40 5569 ;;
Chris@40 5570
Chris@40 5571 bsdi[[45]]*)
Chris@40 5572 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
Chris@40 5573 ;;
Chris@40 5574
Chris@40 5575 cygwin* | mingw* | pw32* | cegcc*)
Chris@40 5576 # When not using gcc, we currently assume that we are using
Chris@40 5577 # Microsoft Visual C++.
Chris@40 5578 # hardcode_libdir_flag_spec is actually meaningless, as there is
Chris@40 5579 # no search path for DLLs.
Chris@40 5580 case $cc_basename in
Chris@40 5581 cl*)
Chris@40 5582 # Native MSVC
Chris@40 5583 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
Chris@40 5584 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@40 5585 _LT_TAGVAR(always_export_symbols, $1)=yes
Chris@40 5586 _LT_TAGVAR(file_list_spec, $1)='@'
Chris@40 5587 # Tell ltmain to make .lib files, not .a files.
Chris@40 5588 libext=lib
Chris@40 5589 # Tell ltmain to make .dll files, not .so files.
Chris@40 5590 shrext_cmds=.dll
Chris@40 5591 # FIXME: Setting linknames here is a bad hack.
Chris@40 5592 _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@40 5593 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
Chris@40 5594 cp "$export_symbols" "$output_objdir/$soname.def";
Chris@40 5595 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
Chris@40 5596 else
Chris@40 5597 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
Chris@40 5598 fi~
Chris@40 5599 $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@40 5600 linknames='
Chris@40 5601 # The linker will not automatically build a static lib if we build a DLL.
Chris@40 5602 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
Chris@40 5603 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@40 5604 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
Chris@40 5605 _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@40 5606 # Don't use ranlib
Chris@40 5607 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
Chris@40 5608 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
Chris@40 5609 lt_tool_outputfile="@TOOL_OUTPUT@"~
Chris@40 5610 case $lt_outputfile in
Chris@40 5611 *.exe|*.EXE) ;;
Chris@40 5612 *)
Chris@40 5613 lt_outputfile=$lt_outputfile.exe
Chris@40 5614 lt_tool_outputfile=$lt_tool_outputfile.exe
Chris@40 5615 ;;
Chris@40 5616 esac~
Chris@40 5617 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
Chris@40 5618 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
Chris@40 5619 $RM "$lt_outputfile.manifest";
Chris@40 5620 fi'
Chris@40 5621 ;;
Chris@40 5622 *)
Chris@40 5623 # Assume MSVC wrapper
Chris@40 5624 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
Chris@40 5625 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@40 5626 # Tell ltmain to make .lib files, not .a files.
Chris@40 5627 libext=lib
Chris@40 5628 # Tell ltmain to make .dll files, not .so files.
Chris@40 5629 shrext_cmds=.dll
Chris@40 5630 # FIXME: Setting linknames here is a bad hack.
Chris@40 5631 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
Chris@40 5632 # The linker will automatically build a .lib file if we build a DLL.
Chris@40 5633 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
Chris@40 5634 # FIXME: Should let the user specify the lib program.
Chris@40 5635 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
Chris@40 5636 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@40 5637 ;;
Chris@40 5638 esac
Chris@40 5639 ;;
Chris@40 5640
Chris@40 5641 darwin* | rhapsody*)
Chris@40 5642 _LT_DARWIN_LINKER_FEATURES($1)
Chris@40 5643 ;;
Chris@40 5644
Chris@40 5645 dgux*)
Chris@40 5646 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@40 5647 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@40 5648 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@40 5649 ;;
Chris@40 5650
Chris@40 5651 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
Chris@40 5652 # support. Future versions do this automatically, but an explicit c++rt0.o
Chris@40 5653 # does not break anything, and helps significantly (at the cost of a little
Chris@40 5654 # extra space).
Chris@40 5655 freebsd2.2*)
Chris@40 5656 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
Chris@40 5657 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@40 5658 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@40 5659 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@40 5660 ;;
Chris@40 5661
Chris@40 5662 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
Chris@40 5663 freebsd2.*)
Chris@40 5664 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
Chris@40 5665 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@40 5666 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@40 5667 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@40 5668 ;;
Chris@40 5669
Chris@40 5670 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
Chris@40 5671 freebsd* | dragonfly*)
Chris@40 5672 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
Chris@40 5673 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@40 5674 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@40 5675 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@40 5676 ;;
Chris@40 5677
Chris@40 5678 hpux9*)
Chris@40 5679 if test yes = "$GCC"; then
Chris@40 5680 _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@40 5681 else
Chris@40 5682 _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@40 5683 fi
Chris@40 5684 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
Chris@40 5685 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@40 5686 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@40 5687
Chris@40 5688 # hardcode_minus_L: Not really in the search PATH,
Chris@40 5689 # but as the default location of the library.
Chris@40 5690 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@40 5691 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@40 5692 ;;
Chris@40 5693
Chris@40 5694 hpux10*)
Chris@40 5695 if test yes,no = "$GCC,$with_gnu_ld"; then
Chris@40 5696 _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@40 5697 else
Chris@40 5698 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
Chris@40 5699 fi
Chris@40 5700 if test no = "$with_gnu_ld"; then
Chris@40 5701 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
Chris@40 5702 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@40 5703 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@40 5704 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@40 5705 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@40 5706 # hardcode_minus_L: Not really in the search PATH,
Chris@40 5707 # but as the default location of the library.
Chris@40 5708 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@40 5709 fi
Chris@40 5710 ;;
Chris@40 5711
Chris@40 5712 hpux11*)
Chris@40 5713 if test yes,no = "$GCC,$with_gnu_ld"; then
Chris@40 5714 case $host_cpu in
Chris@40 5715 hppa*64*)
Chris@40 5716 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@40 5717 ;;
Chris@40 5718 ia64*)
Chris@40 5719 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
Chris@40 5720 ;;
Chris@40 5721 *)
Chris@40 5722 _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@40 5723 ;;
Chris@40 5724 esac
Chris@40 5725 else
Chris@40 5726 case $host_cpu in
Chris@40 5727 hppa*64*)
Chris@40 5728 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@40 5729 ;;
Chris@40 5730 ia64*)
Chris@40 5731 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
Chris@40 5732 ;;
Chris@40 5733 *)
Chris@40 5734 m4_if($1, [], [
Chris@40 5735 # Older versions of the 11.00 compiler do not understand -b yet
Chris@40 5736 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
Chris@40 5737 _LT_LINKER_OPTION([if $CC understands -b],
Chris@40 5738 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
Chris@40 5739 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
Chris@40 5740 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
Chris@40 5741 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
Chris@40 5742 ;;
Chris@40 5743 esac
Chris@40 5744 fi
Chris@40 5745 if test no = "$with_gnu_ld"; then
Chris@40 5746 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
Chris@40 5747 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@40 5748
Chris@40 5749 case $host_cpu in
Chris@40 5750 hppa*64*|ia64*)
Chris@40 5751 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@40 5752 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@40 5753 ;;
Chris@40 5754 *)
Chris@40 5755 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@40 5756 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@40 5757 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@40 5758
Chris@40 5759 # hardcode_minus_L: Not really in the search PATH,
Chris@40 5760 # but as the default location of the library.
Chris@40 5761 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@40 5762 ;;
Chris@40 5763 esac
Chris@40 5764 fi
Chris@40 5765 ;;
Chris@40 5766
Chris@40 5767 irix5* | irix6* | nonstopux*)
Chris@40 5768 if test yes = "$GCC"; then
Chris@40 5769 _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@40 5770 # Try to use the -exported_symbol ld option, if it does not
Chris@40 5771 # work, assume that -exports_file does not work either and
Chris@40 5772 # implicitly export all symbols.
Chris@40 5773 # This should be the same for all languages, so no per-tag cache variable.
Chris@40 5774 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
Chris@40 5775 [lt_cv_irix_exported_symbol],
Chris@40 5776 [save_LDFLAGS=$LDFLAGS
Chris@40 5777 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
Chris@40 5778 AC_LINK_IFELSE(
Chris@40 5779 [AC_LANG_SOURCE(
Chris@40 5780 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
Chris@40 5781 [C++], [[int foo (void) { return 0; }]],
Chris@40 5782 [Fortran 77], [[
Chris@40 5783 subroutine foo
Chris@40 5784 end]],
Chris@40 5785 [Fortran], [[
Chris@40 5786 subroutine foo
Chris@40 5787 end]])])],
Chris@40 5788 [lt_cv_irix_exported_symbol=yes],
Chris@40 5789 [lt_cv_irix_exported_symbol=no])
Chris@40 5790 LDFLAGS=$save_LDFLAGS])
Chris@40 5791 if test yes = "$lt_cv_irix_exported_symbol"; then
Chris@40 5792 _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@40 5793 fi
Chris@40 5794 _LT_TAGVAR(link_all_deplibs, $1)=no
Chris@40 5795 else
Chris@40 5796 _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@40 5797 _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@40 5798 fi
Chris@40 5799 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
Chris@40 5800 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@40 5801 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@40 5802 _LT_TAGVAR(inherit_rpath, $1)=yes
Chris@40 5803 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@40 5804 ;;
Chris@40 5805
Chris@40 5806 linux*)
Chris@40 5807 case $cc_basename in
Chris@40 5808 tcc*)
Chris@40 5809 # Fabrice Bellard et al's Tiny C Compiler
Chris@40 5810 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@40 5811 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
Chris@40 5812 ;;
Chris@40 5813 esac
Chris@40 5814 ;;
Chris@40 5815
Chris@40 5816 netbsd* | netbsdelf*-gnu)
Chris@40 5817 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
Chris@40 5818 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
Chris@40 5819 else
Chris@40 5820 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
Chris@40 5821 fi
Chris@40 5822 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@40 5823 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@40 5824 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@40 5825 ;;
Chris@40 5826
Chris@40 5827 newsos6)
Chris@40 5828 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@40 5829 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@40 5830 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@40 5831 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@40 5832 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@40 5833 ;;
Chris@40 5834
Chris@40 5835 *nto* | *qnx*)
Chris@40 5836 ;;
Chris@40 5837
Chris@40 5838 openbsd* | bitrig*)
Chris@40 5839 if test -f /usr/libexec/ld.so; then
Chris@40 5840 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@40 5841 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@40 5842 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@40 5843 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
Chris@40 5844 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
Chris@40 5845 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
Chris@40 5846 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@40 5847 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@40 5848 else
Chris@40 5849 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
Chris@40 5850 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@40 5851 fi
Chris@40 5852 else
Chris@40 5853 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 5854 fi
Chris@40 5855 ;;
Chris@40 5856
Chris@40 5857 os2*)
Chris@40 5858 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@40 5859 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@40 5860 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@40 5861 shrext_cmds=.dll
Chris@40 5862 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
Chris@40 5863 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
Chris@40 5864 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
Chris@40 5865 $ECHO EXPORTS >> $output_objdir/$libname.def~
Chris@40 5866 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
Chris@40 5867 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
Chris@40 5868 emximp -o $lib $output_objdir/$libname.def'
Chris@40 5869 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
Chris@40 5870 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
Chris@40 5871 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
Chris@40 5872 $ECHO EXPORTS >> $output_objdir/$libname.def~
Chris@40 5873 prefix_cmds="$SED"~
Chris@40 5874 if test EXPORTS = "`$SED 1q $export_symbols`"; then
Chris@40 5875 prefix_cmds="$prefix_cmds -e 1d";
Chris@40 5876 fi~
Chris@40 5877 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
Chris@40 5878 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
Chris@40 5879 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
Chris@40 5880 emximp -o $lib $output_objdir/$libname.def'
Chris@40 5881 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
Chris@40 5882 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@40 5883 ;;
Chris@40 5884
Chris@40 5885 osf3*)
Chris@40 5886 if test yes = "$GCC"; then
Chris@40 5887 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
Chris@40 5888 _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@40 5889 else
Chris@40 5890 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
Chris@40 5891 _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@40 5892 fi
Chris@40 5893 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
Chris@40 5894 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@40 5895 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@40 5896 ;;
Chris@40 5897
Chris@40 5898 osf4* | osf5*) # as osf3* with the addition of -msym flag
Chris@40 5899 if test yes = "$GCC"; then
Chris@40 5900 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
Chris@40 5901 _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@40 5902 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@40 5903 else
Chris@40 5904 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
Chris@40 5905 _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@40 5906 _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@40 5907 $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@40 5908
Chris@40 5909 # Both c and cxx compiler support -rpath directly
Chris@40 5910 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
Chris@40 5911 fi
Chris@40 5912 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
Chris@40 5913 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@40 5914 ;;
Chris@40 5915
Chris@40 5916 solaris*)
Chris@40 5917 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
Chris@40 5918 if test yes = "$GCC"; then
Chris@40 5919 wlarc='$wl'
Chris@40 5920 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@40 5921 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@40 5922 $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@40 5923 else
Chris@40 5924 case `$CC -V 2>&1` in
Chris@40 5925 *"Compilers 5.0"*)
Chris@40 5926 wlarc=''
Chris@40 5927 _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@40 5928 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@40 5929 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
Chris@40 5930 ;;
Chris@40 5931 *)
Chris@40 5932 wlarc='$wl'
Chris@40 5933 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@40 5934 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@40 5935 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
Chris@40 5936 ;;
Chris@40 5937 esac
Chris@40 5938 fi
Chris@40 5939 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@40 5940 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@40 5941 case $host_os in
Chris@40 5942 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
Chris@40 5943 *)
Chris@40 5944 # The compiler driver will combine and reorder linker options,
Chris@40 5945 # but understands '-z linker_flag'. GCC discards it without '$wl',
Chris@40 5946 # but is careful enough not to reorder.
Chris@40 5947 # Supported since Solaris 2.6 (maybe 2.5.1?)
Chris@40 5948 if test yes = "$GCC"; then
Chris@40 5949 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
Chris@40 5950 else
Chris@40 5951 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
Chris@40 5952 fi
Chris@40 5953 ;;
Chris@40 5954 esac
Chris@40 5955 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@40 5956 ;;
Chris@40 5957
Chris@40 5958 sunos4*)
Chris@40 5959 if test sequent = "$host_vendor"; then
Chris@40 5960 # Use $CC to link under sequent, because it throws in some extra .o
Chris@40 5961 # files that make .init and .fini sections work.
Chris@40 5962 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@40 5963 else
Chris@40 5964 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
Chris@40 5965 fi
Chris@40 5966 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@40 5967 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@40 5968 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@40 5969 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@40 5970 ;;
Chris@40 5971
Chris@40 5972 sysv4)
Chris@40 5973 case $host_vendor in
Chris@40 5974 sni)
Chris@40 5975 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@40 5976 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
Chris@40 5977 ;;
Chris@40 5978 siemens)
Chris@40 5979 ## LD is ld it makes a PLAMLIB
Chris@40 5980 ## CC just makes a GrossModule.
Chris@40 5981 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
Chris@40 5982 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
Chris@40 5983 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@40 5984 ;;
Chris@40 5985 motorola)
Chris@40 5986 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@40 5987 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
Chris@40 5988 ;;
Chris@40 5989 esac
Chris@40 5990 runpath_var='LD_RUN_PATH'
Chris@40 5991 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@40 5992 ;;
Chris@40 5993
Chris@40 5994 sysv4.3*)
Chris@40 5995 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@40 5996 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@40 5997 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
Chris@40 5998 ;;
Chris@40 5999
Chris@40 6000 sysv4*MP*)
Chris@40 6001 if test -d /usr/nec; then
Chris@40 6002 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@40 6003 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@40 6004 runpath_var=LD_RUN_PATH
Chris@40 6005 hardcode_runpath_var=yes
Chris@40 6006 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@40 6007 fi
Chris@40 6008 ;;
Chris@40 6009
Chris@40 6010 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
Chris@40 6011 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
Chris@40 6012 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@40 6013 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@40 6014 runpath_var='LD_RUN_PATH'
Chris@40 6015
Chris@40 6016 if test yes = "$GCC"; then
Chris@40 6017 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@40 6018 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@40 6019 else
Chris@40 6020 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@40 6021 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@40 6022 fi
Chris@40 6023 ;;
Chris@40 6024
Chris@40 6025 sysv5* | sco3.2v5* | sco5v6*)
Chris@40 6026 # Note: We CANNOT use -z defs as we might desire, because we do not
Chris@40 6027 # link with -lc, and that would cause any symbols used from libc to
Chris@40 6028 # always be unresolved, which means just about no library would
Chris@40 6029 # ever link correctly. If we're not using GNU ld we use -z text
Chris@40 6030 # though, which does catch some bad symbols but isn't as heavy-handed
Chris@40 6031 # as -z defs.
Chris@40 6032 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
Chris@40 6033 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
Chris@40 6034 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@40 6035 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@40 6036 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
Chris@40 6037 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
Chris@40 6038 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@40 6039 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
Chris@40 6040 runpath_var='LD_RUN_PATH'
Chris@40 6041
Chris@40 6042 if test yes = "$GCC"; then
Chris@40 6043 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@40 6044 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@40 6045 else
Chris@40 6046 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@40 6047 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@40 6048 fi
Chris@40 6049 ;;
Chris@40 6050
Chris@40 6051 uts4*)
Chris@40 6052 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@40 6053 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@40 6054 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@40 6055 ;;
Chris@40 6056
Chris@40 6057 *)
Chris@40 6058 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 6059 ;;
Chris@40 6060 esac
Chris@40 6061
Chris@40 6062 if test sni = "$host_vendor"; then
Chris@40 6063 case $host in
Chris@40 6064 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
Chris@40 6065 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
Chris@40 6066 ;;
Chris@40 6067 esac
Chris@40 6068 fi
Chris@40 6069 fi
Chris@40 6070 ])
Chris@40 6071 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
Chris@40 6072 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
Chris@40 6073
Chris@40 6074 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
Chris@40 6075
Chris@40 6076 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
Chris@40 6077 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
Chris@40 6078 _LT_DECL([], [extract_expsyms_cmds], [2],
Chris@40 6079 [The commands to extract the exported symbol list from a shared archive])
Chris@40 6080
Chris@40 6081 #
Chris@40 6082 # Do we need to explicitly link libc?
Chris@40 6083 #
Chris@40 6084 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
Chris@40 6085 x|xyes)
Chris@40 6086 # Assume -lc should be added
Chris@40 6087 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
Chris@40 6088
Chris@40 6089 if test yes,yes = "$GCC,$enable_shared"; then
Chris@40 6090 case $_LT_TAGVAR(archive_cmds, $1) in
Chris@40 6091 *'~'*)
Chris@40 6092 # FIXME: we may have to deal with multi-command sequences.
Chris@40 6093 ;;
Chris@40 6094 '$CC '*)
Chris@40 6095 # Test whether the compiler implicitly links with -lc since on some
Chris@40 6096 # systems, -lgcc has to come before -lc. If gcc already passes -lc
Chris@40 6097 # to ld, don't add -lc before -lgcc.
Chris@40 6098 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
Chris@40 6099 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
Chris@40 6100 [$RM conftest*
Chris@40 6101 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
Chris@40 6102
Chris@40 6103 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
Chris@40 6104 soname=conftest
Chris@40 6105 lib=conftest
Chris@40 6106 libobjs=conftest.$ac_objext
Chris@40 6107 deplibs=
Chris@40 6108 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
Chris@40 6109 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
Chris@40 6110 compiler_flags=-v
Chris@40 6111 linker_flags=-v
Chris@40 6112 verstring=
Chris@40 6113 output_objdir=.
Chris@40 6114 libname=conftest
Chris@40 6115 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
Chris@40 6116 _LT_TAGVAR(allow_undefined_flag, $1)=
Chris@40 6117 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
Chris@40 6118 then
Chris@40 6119 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@40 6120 else
Chris@40 6121 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
Chris@40 6122 fi
Chris@40 6123 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
Chris@40 6124 else
Chris@40 6125 cat conftest.err 1>&5
Chris@40 6126 fi
Chris@40 6127 $RM conftest*
Chris@40 6128 ])
Chris@40 6129 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
Chris@40 6130 ;;
Chris@40 6131 esac
Chris@40 6132 fi
Chris@40 6133 ;;
Chris@40 6134 esac
Chris@40 6135
Chris@40 6136 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
Chris@40 6137 [Whether or not to add -lc for building shared libraries])
Chris@40 6138 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
Chris@40 6139 [enable_shared_with_static_runtimes], [0],
Chris@40 6140 [Whether or not to disallow shared libs when runtime libs are static])
Chris@40 6141 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
Chris@40 6142 [Compiler flag to allow reflexive dlopens])
Chris@40 6143 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
Chris@40 6144 [Compiler flag to generate shared objects directly from archives])
Chris@40 6145 _LT_TAGDECL([], [compiler_needs_object], [1],
Chris@40 6146 [Whether the compiler copes with passing no objects directly])
Chris@40 6147 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
Chris@40 6148 [Create an old-style archive from a shared archive])
Chris@40 6149 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
Chris@40 6150 [Create a temporary old-style archive to link instead of a shared archive])
Chris@40 6151 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
Chris@40 6152 _LT_TAGDECL([], [archive_expsym_cmds], [2])
Chris@40 6153 _LT_TAGDECL([], [module_cmds], [2],
Chris@40 6154 [Commands used to build a loadable module if different from building
Chris@40 6155 a shared archive.])
Chris@40 6156 _LT_TAGDECL([], [module_expsym_cmds], [2])
Chris@40 6157 _LT_TAGDECL([], [with_gnu_ld], [1],
Chris@40 6158 [Whether we are building with GNU ld or not])
Chris@40 6159 _LT_TAGDECL([], [allow_undefined_flag], [1],
Chris@40 6160 [Flag that allows shared libraries with undefined symbols to be built])
Chris@40 6161 _LT_TAGDECL([], [no_undefined_flag], [1],
Chris@40 6162 [Flag that enforces no undefined symbols])
Chris@40 6163 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
Chris@40 6164 [Flag to hardcode $libdir into a binary during linking.
Chris@40 6165 This must work even if $libdir does not exist])
Chris@40 6166 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
Chris@40 6167 [Whether we need a single "-rpath" flag with a separated argument])
Chris@40 6168 _LT_TAGDECL([], [hardcode_direct], [0],
Chris@40 6169 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
Chris@40 6170 DIR into the resulting binary])
Chris@40 6171 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
Chris@40 6172 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
Chris@40 6173 DIR into the resulting binary and the resulting library dependency is
Chris@40 6174 "absolute", i.e impossible to change by setting $shlibpath_var if the
Chris@40 6175 library is relocated])
Chris@40 6176 _LT_TAGDECL([], [hardcode_minus_L], [0],
Chris@40 6177 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
Chris@40 6178 into the resulting binary])
Chris@40 6179 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
Chris@40 6180 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
Chris@40 6181 into the resulting binary])
Chris@40 6182 _LT_TAGDECL([], [hardcode_automatic], [0],
Chris@40 6183 [Set to "yes" if building a shared library automatically hardcodes DIR
Chris@40 6184 into the library and all subsequent libraries and executables linked
Chris@40 6185 against it])
Chris@40 6186 _LT_TAGDECL([], [inherit_rpath], [0],
Chris@40 6187 [Set to yes if linker adds runtime paths of dependent libraries
Chris@40 6188 to runtime path list])
Chris@40 6189 _LT_TAGDECL([], [link_all_deplibs], [0],
Chris@40 6190 [Whether libtool must link a program against all its dependency libraries])
Chris@40 6191 _LT_TAGDECL([], [always_export_symbols], [0],
Chris@40 6192 [Set to "yes" if exported symbols are required])
Chris@40 6193 _LT_TAGDECL([], [export_symbols_cmds], [2],
Chris@40 6194 [The commands to list exported symbols])
Chris@40 6195 _LT_TAGDECL([], [exclude_expsyms], [1],
Chris@40 6196 [Symbols that should not be listed in the preloaded symbols])
Chris@40 6197 _LT_TAGDECL([], [include_expsyms], [1],
Chris@40 6198 [Symbols that must always be exported])
Chris@40 6199 _LT_TAGDECL([], [prelink_cmds], [2],
Chris@40 6200 [Commands necessary for linking programs (against libraries) with templates])
Chris@40 6201 _LT_TAGDECL([], [postlink_cmds], [2],
Chris@40 6202 [Commands necessary for finishing linking programs])
Chris@40 6203 _LT_TAGDECL([], [file_list_spec], [1],
Chris@40 6204 [Specify filename containing input files])
Chris@40 6205 dnl FIXME: Not yet implemented
Chris@40 6206 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
Chris@40 6207 dnl [Compiler flag to generate thread safe objects])
Chris@40 6208 ])# _LT_LINKER_SHLIBS
Chris@40 6209
Chris@40 6210
Chris@40 6211 # _LT_LANG_C_CONFIG([TAG])
Chris@40 6212 # ------------------------
Chris@40 6213 # Ensure that the configuration variables for a C compiler are suitably
Chris@40 6214 # defined. These variables are subsequently used by _LT_CONFIG to write
Chris@40 6215 # the compiler configuration to 'libtool'.
Chris@40 6216 m4_defun([_LT_LANG_C_CONFIG],
Chris@40 6217 [m4_require([_LT_DECL_EGREP])dnl
Chris@40 6218 lt_save_CC=$CC
Chris@40 6219 AC_LANG_PUSH(C)
Chris@40 6220
Chris@40 6221 # Source file extension for C test sources.
Chris@40 6222 ac_ext=c
Chris@40 6223
Chris@40 6224 # Object file extension for compiled C test sources.
Chris@40 6225 objext=o
Chris@40 6226 _LT_TAGVAR(objext, $1)=$objext
Chris@40 6227
Chris@40 6228 # Code to be used in simple compile tests
Chris@40 6229 lt_simple_compile_test_code="int some_variable = 0;"
Chris@40 6230
Chris@40 6231 # Code to be used in simple link tests
Chris@40 6232 lt_simple_link_test_code='int main(){return(0);}'
Chris@40 6233
Chris@40 6234 _LT_TAG_COMPILER
Chris@40 6235 # Save the default compiler, since it gets overwritten when the other
Chris@40 6236 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
Chris@40 6237 compiler_DEFAULT=$CC
Chris@40 6238
Chris@40 6239 # save warnings/boilerplate of simple test code
Chris@40 6240 _LT_COMPILER_BOILERPLATE
Chris@40 6241 _LT_LINKER_BOILERPLATE
Chris@40 6242
Chris@40 6243 ## CAVEAT EMPTOR:
Chris@40 6244 ## There is no encapsulation within the following macros, do not change
Chris@40 6245 ## the running order or otherwise move them around unless you know exactly
Chris@40 6246 ## what you are doing...
Chris@40 6247 if test -n "$compiler"; then
Chris@40 6248 _LT_COMPILER_NO_RTTI($1)
Chris@40 6249 _LT_COMPILER_PIC($1)
Chris@40 6250 _LT_COMPILER_C_O($1)
Chris@40 6251 _LT_COMPILER_FILE_LOCKS($1)
Chris@40 6252 _LT_LINKER_SHLIBS($1)
Chris@40 6253 _LT_SYS_DYNAMIC_LINKER($1)
Chris@40 6254 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@40 6255 LT_SYS_DLOPEN_SELF
Chris@40 6256 _LT_CMD_STRIPLIB
Chris@40 6257
Chris@40 6258 # Report what library types will actually be built
Chris@40 6259 AC_MSG_CHECKING([if libtool supports shared libraries])
Chris@40 6260 AC_MSG_RESULT([$can_build_shared])
Chris@40 6261
Chris@40 6262 AC_MSG_CHECKING([whether to build shared libraries])
Chris@40 6263 test no = "$can_build_shared" && enable_shared=no
Chris@40 6264
Chris@40 6265 # On AIX, shared libraries and static libraries use the same namespace, and
Chris@40 6266 # are all built from PIC.
Chris@40 6267 case $host_os in
Chris@40 6268 aix3*)
Chris@40 6269 test yes = "$enable_shared" && enable_static=no
Chris@40 6270 if test -n "$RANLIB"; then
Chris@40 6271 archive_cmds="$archive_cmds~\$RANLIB \$lib"
Chris@40 6272 postinstall_cmds='$RANLIB $lib'
Chris@40 6273 fi
Chris@40 6274 ;;
Chris@40 6275
Chris@40 6276 aix[[4-9]]*)
Chris@40 6277 if test ia64 != "$host_cpu"; then
Chris@40 6278 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
Chris@40 6279 yes,aix,yes) ;; # shared object as lib.so file only
Chris@40 6280 yes,svr4,*) ;; # shared object as lib.so archive member only
Chris@40 6281 yes,*) enable_static=no ;; # shared object in lib.a archive as well
Chris@40 6282 esac
Chris@40 6283 fi
Chris@40 6284 ;;
Chris@40 6285 esac
Chris@40 6286 AC_MSG_RESULT([$enable_shared])
Chris@40 6287
Chris@40 6288 AC_MSG_CHECKING([whether to build static libraries])
Chris@40 6289 # Make sure either enable_shared or enable_static is yes.
Chris@40 6290 test yes = "$enable_shared" || enable_static=yes
Chris@40 6291 AC_MSG_RESULT([$enable_static])
Chris@40 6292
Chris@40 6293 _LT_CONFIG($1)
Chris@40 6294 fi
Chris@40 6295 AC_LANG_POP
Chris@40 6296 CC=$lt_save_CC
Chris@40 6297 ])# _LT_LANG_C_CONFIG
Chris@40 6298
Chris@40 6299
Chris@40 6300 # _LT_LANG_CXX_CONFIG([TAG])
Chris@40 6301 # --------------------------
Chris@40 6302 # Ensure that the configuration variables for a C++ compiler are suitably
Chris@40 6303 # defined. These variables are subsequently used by _LT_CONFIG to write
Chris@40 6304 # the compiler configuration to 'libtool'.
Chris@40 6305 m4_defun([_LT_LANG_CXX_CONFIG],
Chris@40 6306 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@40 6307 m4_require([_LT_DECL_EGREP])dnl
Chris@40 6308 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
Chris@40 6309 if test -n "$CXX" && ( test no != "$CXX" &&
Chris@40 6310 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
Chris@40 6311 (test g++ != "$CXX"))); then
Chris@40 6312 AC_PROG_CXXCPP
Chris@40 6313 else
Chris@40 6314 _lt_caught_CXX_error=yes
Chris@40 6315 fi
Chris@40 6316
Chris@40 6317 AC_LANG_PUSH(C++)
Chris@40 6318 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@40 6319 _LT_TAGVAR(allow_undefined_flag, $1)=
Chris@40 6320 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@40 6321 _LT_TAGVAR(archive_expsym_cmds, $1)=
Chris@40 6322 _LT_TAGVAR(compiler_needs_object, $1)=no
Chris@40 6323 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@40 6324 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@40 6325 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@40 6326 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@40 6327 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@40 6328 _LT_TAGVAR(hardcode_minus_L, $1)=no
Chris@40 6329 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
Chris@40 6330 _LT_TAGVAR(hardcode_automatic, $1)=no
Chris@40 6331 _LT_TAGVAR(inherit_rpath, $1)=no
Chris@40 6332 _LT_TAGVAR(module_cmds, $1)=
Chris@40 6333 _LT_TAGVAR(module_expsym_cmds, $1)=
Chris@40 6334 _LT_TAGVAR(link_all_deplibs, $1)=unknown
Chris@40 6335 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@40 6336 _LT_TAGVAR(reload_flag, $1)=$reload_flag
Chris@40 6337 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
Chris@40 6338 _LT_TAGVAR(no_undefined_flag, $1)=
Chris@40 6339 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@40 6340 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
Chris@40 6341
Chris@40 6342 # Source file extension for C++ test sources.
Chris@40 6343 ac_ext=cpp
Chris@40 6344
Chris@40 6345 # Object file extension for compiled C++ test sources.
Chris@40 6346 objext=o
Chris@40 6347 _LT_TAGVAR(objext, $1)=$objext
Chris@40 6348
Chris@40 6349 # No sense in running all these tests if we already determined that
Chris@40 6350 # the CXX compiler isn't working. Some variables (like enable_shared)
Chris@40 6351 # are currently assumed to apply to all compilers on this platform,
Chris@40 6352 # and will be corrupted by setting them based on a non-working compiler.
Chris@40 6353 if test yes != "$_lt_caught_CXX_error"; then
Chris@40 6354 # Code to be used in simple compile tests
Chris@40 6355 lt_simple_compile_test_code="int some_variable = 0;"
Chris@40 6356
Chris@40 6357 # Code to be used in simple link tests
Chris@40 6358 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
Chris@40 6359
Chris@40 6360 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@40 6361 _LT_TAG_COMPILER
Chris@40 6362
Chris@40 6363 # save warnings/boilerplate of simple test code
Chris@40 6364 _LT_COMPILER_BOILERPLATE
Chris@40 6365 _LT_LINKER_BOILERPLATE
Chris@40 6366
Chris@40 6367 # Allow CC to be a program name with arguments.
Chris@40 6368 lt_save_CC=$CC
Chris@40 6369 lt_save_CFLAGS=$CFLAGS
Chris@40 6370 lt_save_LD=$LD
Chris@40 6371 lt_save_GCC=$GCC
Chris@40 6372 GCC=$GXX
Chris@40 6373 lt_save_with_gnu_ld=$with_gnu_ld
Chris@40 6374 lt_save_path_LD=$lt_cv_path_LD
Chris@40 6375 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
Chris@40 6376 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
Chris@40 6377 else
Chris@40 6378 $as_unset lt_cv_prog_gnu_ld
Chris@40 6379 fi
Chris@40 6380 if test -n "${lt_cv_path_LDCXX+set}"; then
Chris@40 6381 lt_cv_path_LD=$lt_cv_path_LDCXX
Chris@40 6382 else
Chris@40 6383 $as_unset lt_cv_path_LD
Chris@40 6384 fi
Chris@40 6385 test -z "${LDCXX+set}" || LD=$LDCXX
Chris@40 6386 CC=${CXX-"c++"}
Chris@40 6387 CFLAGS=$CXXFLAGS
Chris@40 6388 compiler=$CC
Chris@40 6389 _LT_TAGVAR(compiler, $1)=$CC
Chris@40 6390 _LT_CC_BASENAME([$compiler])
Chris@40 6391
Chris@40 6392 if test -n "$compiler"; then
Chris@40 6393 # We don't want -fno-exception when compiling C++ code, so set the
Chris@40 6394 # no_builtin_flag separately
Chris@40 6395 if test yes = "$GXX"; then
Chris@40 6396 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
Chris@40 6397 else
Chris@40 6398 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
Chris@40 6399 fi
Chris@40 6400
Chris@40 6401 if test yes = "$GXX"; then
Chris@40 6402 # Set up default GNU C++ configuration
Chris@40 6403
Chris@40 6404 LT_PATH_LD
Chris@40 6405
Chris@40 6406 # Check if GNU C++ uses GNU ld as the underlying linker, since the
Chris@40 6407 # archiving commands below assume that GNU ld is being used.
Chris@40 6408 if test yes = "$with_gnu_ld"; then
Chris@40 6409 _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@40 6410 _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@40 6411
Chris@40 6412 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@40 6413 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
Chris@40 6414
Chris@40 6415 # If archive_cmds runs LD, not CC, wlarc should be empty
Chris@40 6416 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
Chris@40 6417 # investigate it a little bit more. (MM)
Chris@40 6418 wlarc='$wl'
Chris@40 6419
Chris@40 6420 # ancient GNU ld didn't support --whole-archive et. al.
Chris@40 6421 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
Chris@40 6422 $GREP 'no-whole-archive' > /dev/null; then
Chris@40 6423 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
Chris@40 6424 else
Chris@40 6425 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@40 6426 fi
Chris@40 6427 else
Chris@40 6428 with_gnu_ld=no
Chris@40 6429 wlarc=
Chris@40 6430
Chris@40 6431 # A generic and very simple default shared library creation
Chris@40 6432 # command for GNU C++ for the case where it uses the native
Chris@40 6433 # linker, instead of GNU ld. If possible, this setting should
Chris@40 6434 # overridden to take advantage of the native linker features on
Chris@40 6435 # the platform it is being used on.
Chris@40 6436 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
Chris@40 6437 fi
Chris@40 6438
Chris@40 6439 # Commands to make compiler produce verbose output that lists
Chris@40 6440 # what "hidden" libraries, object files and flags are used when
Chris@40 6441 # linking a shared library.
Chris@40 6442 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
Chris@40 6443
Chris@40 6444 else
Chris@40 6445 GXX=no
Chris@40 6446 with_gnu_ld=no
Chris@40 6447 wlarc=
Chris@40 6448 fi
Chris@40 6449
Chris@40 6450 # PORTME: fill in a description of your system's C++ link characteristics
Chris@40 6451 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
Chris@40 6452 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@40 6453 case $host_os in
Chris@40 6454 aix3*)
Chris@40 6455 # FIXME: insert proper C++ library support
Chris@40 6456 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 6457 ;;
Chris@40 6458 aix[[4-9]]*)
Chris@40 6459 if test ia64 = "$host_cpu"; then
Chris@40 6460 # On IA64, the linker does run time linking by default, so we don't
Chris@40 6461 # have to do anything special.
Chris@40 6462 aix_use_runtimelinking=no
Chris@40 6463 exp_sym_flag='-Bexport'
Chris@40 6464 no_entry_flag=
Chris@40 6465 else
Chris@40 6466 aix_use_runtimelinking=no
Chris@40 6467
Chris@40 6468 # Test if we are trying to use run time linking or normal
Chris@40 6469 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
Chris@40 6470 # have runtime linking enabled, and use it for executables.
Chris@40 6471 # For shared libraries, we enable/disable runtime linking
Chris@40 6472 # depending on the kind of the shared library created -
Chris@40 6473 # when "with_aix_soname,aix_use_runtimelinking" is:
Chris@40 6474 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
Chris@40 6475 # "aix,yes" lib.so shared, rtl:yes, for executables
Chris@40 6476 # lib.a static archive
Chris@40 6477 # "both,no" lib.so.V(shr.o) shared, rtl:yes
Chris@40 6478 # lib.a(lib.so.V) shared, rtl:no, for executables
Chris@40 6479 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
Chris@40 6480 # lib.a(lib.so.V) shared, rtl:no
Chris@40 6481 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
Chris@40 6482 # lib.a static archive
Chris@40 6483 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
Chris@40 6484 for ld_flag in $LDFLAGS; do
Chris@40 6485 case $ld_flag in
Chris@40 6486 *-brtl*)
Chris@40 6487 aix_use_runtimelinking=yes
Chris@40 6488 break
Chris@40 6489 ;;
Chris@40 6490 esac
Chris@40 6491 done
Chris@40 6492 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
Chris@40 6493 # With aix-soname=svr4, we create the lib.so.V shared archives only,
Chris@40 6494 # so we don't have lib.a shared libs to link our executables.
Chris@40 6495 # We have to force runtime linking in this case.
Chris@40 6496 aix_use_runtimelinking=yes
Chris@40 6497 LDFLAGS="$LDFLAGS -Wl,-brtl"
Chris@40 6498 fi
Chris@40 6499 ;;
Chris@40 6500 esac
Chris@40 6501
Chris@40 6502 exp_sym_flag='-bexport'
Chris@40 6503 no_entry_flag='-bnoentry'
Chris@40 6504 fi
Chris@40 6505
Chris@40 6506 # When large executables or shared objects are built, AIX ld can
Chris@40 6507 # have problems creating the table of contents. If linking a library
Chris@40 6508 # or program results in "error TOC overflow" add -mminimal-toc to
Chris@40 6509 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
Chris@40 6510 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
Chris@40 6511
Chris@40 6512 _LT_TAGVAR(archive_cmds, $1)=''
Chris@40 6513 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@40 6514 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@40 6515 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
Chris@40 6516 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@40 6517 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
Chris@40 6518 case $with_aix_soname,$aix_use_runtimelinking in
Chris@40 6519 aix,*) ;; # no import file
Chris@40 6520 svr4,* | *,yes) # use import file
Chris@40 6521 # The Import File defines what to hardcode.
Chris@40 6522 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@40 6523 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@40 6524 ;;
Chris@40 6525 esac
Chris@40 6526
Chris@40 6527 if test yes = "$GXX"; then
Chris@40 6528 case $host_os in aix4.[[012]]|aix4.[[012]].*)
Chris@40 6529 # We only want to do this on AIX 4.2 and lower, the check
Chris@40 6530 # below for broken collect2 doesn't work under 4.3+
Chris@40 6531 collect2name=`$CC -print-prog-name=collect2`
Chris@40 6532 if test -f "$collect2name" &&
Chris@40 6533 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
Chris@40 6534 then
Chris@40 6535 # We have reworked collect2
Chris@40 6536 :
Chris@40 6537 else
Chris@40 6538 # We have old collect2
Chris@40 6539 _LT_TAGVAR(hardcode_direct, $1)=unsupported
Chris@40 6540 # It fails to find uninstalled libraries when the uninstalled
Chris@40 6541 # path is not listed in the libpath. Setting hardcode_minus_L
Chris@40 6542 # to unsupported forces relinking
Chris@40 6543 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@40 6544 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@40 6545 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@40 6546 fi
Chris@40 6547 esac
Chris@40 6548 shared_flag='-shared'
Chris@40 6549 if test yes = "$aix_use_runtimelinking"; then
Chris@40 6550 shared_flag=$shared_flag' $wl-G'
Chris@40 6551 fi
Chris@40 6552 # Need to ensure runtime linking is disabled for the traditional
Chris@40 6553 # shared library, or the linker may eventually find shared libraries
Chris@40 6554 # /with/ Import File - we do not want to mix them.
Chris@40 6555 shared_flag_aix='-shared'
Chris@40 6556 shared_flag_svr4='-shared $wl-G'
Chris@40 6557 else
Chris@40 6558 # not using gcc
Chris@40 6559 if test ia64 = "$host_cpu"; then
Chris@40 6560 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
Chris@40 6561 # chokes on -Wl,-G. The following line is correct:
Chris@40 6562 shared_flag='-G'
Chris@40 6563 else
Chris@40 6564 if test yes = "$aix_use_runtimelinking"; then
Chris@40 6565 shared_flag='$wl-G'
Chris@40 6566 else
Chris@40 6567 shared_flag='$wl-bM:SRE'
Chris@40 6568 fi
Chris@40 6569 shared_flag_aix='$wl-bM:SRE'
Chris@40 6570 shared_flag_svr4='$wl-G'
Chris@40 6571 fi
Chris@40 6572 fi
Chris@40 6573
Chris@40 6574 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
Chris@40 6575 # It seems that -bexpall does not export symbols beginning with
Chris@40 6576 # underscore (_), so it is better to generate a list of symbols to
Chris@40 6577 # export.
Chris@40 6578 _LT_TAGVAR(always_export_symbols, $1)=yes
Chris@40 6579 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
Chris@40 6580 # Warning - without using the other runtime loading flags (-brtl),
Chris@40 6581 # -berok will link without error, but may produce a broken library.
Chris@40 6582 # The "-G" linker flag allows undefined symbols.
Chris@40 6583 _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
Chris@40 6584 # Determine the default libpath from the value encoded in an empty
Chris@40 6585 # executable.
Chris@40 6586 _LT_SYS_MODULE_PATH_AIX([$1])
Chris@40 6587 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
Chris@40 6588
Chris@40 6589 _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@40 6590 else
Chris@40 6591 if test ia64 = "$host_cpu"; then
Chris@40 6592 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
Chris@40 6593 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
Chris@40 6594 _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@40 6595 else
Chris@40 6596 # Determine the default libpath from the value encoded in an
Chris@40 6597 # empty executable.
Chris@40 6598 _LT_SYS_MODULE_PATH_AIX([$1])
Chris@40 6599 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
Chris@40 6600 # Warning - without using the other run time loading flags,
Chris@40 6601 # -berok will link without error, but may produce a broken library.
Chris@40 6602 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
Chris@40 6603 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
Chris@40 6604 if test yes = "$with_gnu_ld"; then
Chris@40 6605 # We only use this code for GNU lds that support --whole-archive.
Chris@40 6606 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
Chris@40 6607 else
Chris@40 6608 # Exported symbols can be pulled into shared objects from archives
Chris@40 6609 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
Chris@40 6610 fi
Chris@40 6611 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
Chris@40 6612 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
Chris@40 6613 # -brtl affects multiple linker settings, -berok does not and is overridden later
Chris@40 6614 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
Chris@40 6615 if test svr4 != "$with_aix_soname"; then
Chris@40 6616 # This is similar to how AIX traditionally builds its shared
Chris@40 6617 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
Chris@40 6618 _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@40 6619 fi
Chris@40 6620 if test aix != "$with_aix_soname"; then
Chris@40 6621 _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@40 6622 else
Chris@40 6623 # used by -dlpreopen to get the symbols
Chris@40 6624 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
Chris@40 6625 fi
Chris@40 6626 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
Chris@40 6627 fi
Chris@40 6628 fi
Chris@40 6629 ;;
Chris@40 6630
Chris@40 6631 beos*)
Chris@40 6632 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
Chris@40 6633 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@40 6634 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
Chris@40 6635 # support --undefined. This deserves some investigation. FIXME
Chris@40 6636 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@40 6637 else
Chris@40 6638 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 6639 fi
Chris@40 6640 ;;
Chris@40 6641
Chris@40 6642 chorus*)
Chris@40 6643 case $cc_basename in
Chris@40 6644 *)
Chris@40 6645 # FIXME: insert proper C++ library support
Chris@40 6646 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 6647 ;;
Chris@40 6648 esac
Chris@40 6649 ;;
Chris@40 6650
Chris@40 6651 cygwin* | mingw* | pw32* | cegcc*)
Chris@40 6652 case $GXX,$cc_basename in
Chris@40 6653 ,cl* | no,cl*)
Chris@40 6654 # Native MSVC
Chris@40 6655 # hardcode_libdir_flag_spec is actually meaningless, as there is
Chris@40 6656 # no search path for DLLs.
Chris@40 6657 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
Chris@40 6658 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@40 6659 _LT_TAGVAR(always_export_symbols, $1)=yes
Chris@40 6660 _LT_TAGVAR(file_list_spec, $1)='@'
Chris@40 6661 # Tell ltmain to make .lib files, not .a files.
Chris@40 6662 libext=lib
Chris@40 6663 # Tell ltmain to make .dll files, not .so files.
Chris@40 6664 shrext_cmds=.dll
Chris@40 6665 # FIXME: Setting linknames here is a bad hack.
Chris@40 6666 _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@40 6667 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
Chris@40 6668 cp "$export_symbols" "$output_objdir/$soname.def";
Chris@40 6669 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
Chris@40 6670 else
Chris@40 6671 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
Chris@40 6672 fi~
Chris@40 6673 $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@40 6674 linknames='
Chris@40 6675 # The linker will not automatically build a static lib if we build a DLL.
Chris@40 6676 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
Chris@40 6677 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@40 6678 # Don't use ranlib
Chris@40 6679 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
Chris@40 6680 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
Chris@40 6681 lt_tool_outputfile="@TOOL_OUTPUT@"~
Chris@40 6682 case $lt_outputfile in
Chris@40 6683 *.exe|*.EXE) ;;
Chris@40 6684 *)
Chris@40 6685 lt_outputfile=$lt_outputfile.exe
Chris@40 6686 lt_tool_outputfile=$lt_tool_outputfile.exe
Chris@40 6687 ;;
Chris@40 6688 esac~
Chris@40 6689 func_to_tool_file "$lt_outputfile"~
Chris@40 6690 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
Chris@40 6691 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
Chris@40 6692 $RM "$lt_outputfile.manifest";
Chris@40 6693 fi'
Chris@40 6694 ;;
Chris@40 6695 *)
Chris@40 6696 # g++
Chris@40 6697 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
Chris@40 6698 # as there is no search path for DLLs.
Chris@40 6699 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@40 6700 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
Chris@40 6701 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@40 6702 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@40 6703 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@40 6704
Chris@40 6705 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
Chris@40 6706 _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@40 6707 # If the export-symbols file already is a .def file, use it as
Chris@40 6708 # is; otherwise, prepend EXPORTS...
Chris@40 6709 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
Chris@40 6710 cp $export_symbols $output_objdir/$soname.def;
Chris@40 6711 else
Chris@40 6712 echo EXPORTS > $output_objdir/$soname.def;
Chris@40 6713 cat $export_symbols >> $output_objdir/$soname.def;
Chris@40 6714 fi~
Chris@40 6715 $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@40 6716 else
Chris@40 6717 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 6718 fi
Chris@40 6719 ;;
Chris@40 6720 esac
Chris@40 6721 ;;
Chris@40 6722 darwin* | rhapsody*)
Chris@40 6723 _LT_DARWIN_LINKER_FEATURES($1)
Chris@40 6724 ;;
Chris@40 6725
Chris@40 6726 os2*)
Chris@40 6727 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@40 6728 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@40 6729 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@40 6730 shrext_cmds=.dll
Chris@40 6731 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
Chris@40 6732 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
Chris@40 6733 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
Chris@40 6734 $ECHO EXPORTS >> $output_objdir/$libname.def~
Chris@40 6735 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
Chris@40 6736 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
Chris@40 6737 emximp -o $lib $output_objdir/$libname.def'
Chris@40 6738 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
Chris@40 6739 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
Chris@40 6740 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
Chris@40 6741 $ECHO EXPORTS >> $output_objdir/$libname.def~
Chris@40 6742 prefix_cmds="$SED"~
Chris@40 6743 if test EXPORTS = "`$SED 1q $export_symbols`"; then
Chris@40 6744 prefix_cmds="$prefix_cmds -e 1d";
Chris@40 6745 fi~
Chris@40 6746 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
Chris@40 6747 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
Chris@40 6748 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
Chris@40 6749 emximp -o $lib $output_objdir/$libname.def'
Chris@40 6750 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
Chris@40 6751 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@40 6752 ;;
Chris@40 6753
Chris@40 6754 dgux*)
Chris@40 6755 case $cc_basename in
Chris@40 6756 ec++*)
Chris@40 6757 # FIXME: insert proper C++ library support
Chris@40 6758 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 6759 ;;
Chris@40 6760 ghcx*)
Chris@40 6761 # Green Hills C++ Compiler
Chris@40 6762 # FIXME: insert proper C++ library support
Chris@40 6763 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 6764 ;;
Chris@40 6765 *)
Chris@40 6766 # FIXME: insert proper C++ library support
Chris@40 6767 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 6768 ;;
Chris@40 6769 esac
Chris@40 6770 ;;
Chris@40 6771
Chris@40 6772 freebsd2.*)
Chris@40 6773 # C++ shared libraries reported to be fairly broken before
Chris@40 6774 # switch to ELF
Chris@40 6775 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 6776 ;;
Chris@40 6777
Chris@40 6778 freebsd-elf*)
Chris@40 6779 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@40 6780 ;;
Chris@40 6781
Chris@40 6782 freebsd* | dragonfly*)
Chris@40 6783 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
Chris@40 6784 # conventions
Chris@40 6785 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@40 6786 ;;
Chris@40 6787
Chris@40 6788 haiku*)
Chris@40 6789 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@40 6790 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@40 6791 ;;
Chris@40 6792
Chris@40 6793 hpux9*)
Chris@40 6794 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
Chris@40 6795 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@40 6796 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@40 6797 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@40 6798 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
Chris@40 6799 # but as the default
Chris@40 6800 # location of the library.
Chris@40 6801
Chris@40 6802 case $cc_basename in
Chris@40 6803 CC*)
Chris@40 6804 # FIXME: insert proper C++ library support
Chris@40 6805 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 6806 ;;
Chris@40 6807 aCC*)
Chris@40 6808 _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@40 6809 # Commands to make compiler produce verbose output that lists
Chris@40 6810 # what "hidden" libraries, object files and flags are used when
Chris@40 6811 # linking a shared library.
Chris@40 6812 #
Chris@40 6813 # There doesn't appear to be a way to prevent this compiler from
Chris@40 6814 # explicitly linking system object files so we need to strip them
Chris@40 6815 # from the output so that they don't get included in the library
Chris@40 6816 # dependencies.
Chris@40 6817 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@40 6818 ;;
Chris@40 6819 *)
Chris@40 6820 if test yes = "$GXX"; then
Chris@40 6821 _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@40 6822 else
Chris@40 6823 # FIXME: insert proper C++ library support
Chris@40 6824 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 6825 fi
Chris@40 6826 ;;
Chris@40 6827 esac
Chris@40 6828 ;;
Chris@40 6829
Chris@40 6830 hpux10*|hpux11*)
Chris@40 6831 if test no = "$with_gnu_ld"; then
Chris@40 6832 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
Chris@40 6833 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@40 6834
Chris@40 6835 case $host_cpu in
Chris@40 6836 hppa*64*|ia64*)
Chris@40 6837 ;;
Chris@40 6838 *)
Chris@40 6839 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@40 6840 ;;
Chris@40 6841 esac
Chris@40 6842 fi
Chris@40 6843 case $host_cpu in
Chris@40 6844 hppa*64*|ia64*)
Chris@40 6845 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@40 6846 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@40 6847 ;;
Chris@40 6848 *)
Chris@40 6849 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@40 6850 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@40 6851 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
Chris@40 6852 # but as the default
Chris@40 6853 # location of the library.
Chris@40 6854 ;;
Chris@40 6855 esac
Chris@40 6856
Chris@40 6857 case $cc_basename in
Chris@40 6858 CC*)
Chris@40 6859 # FIXME: insert proper C++ library support
Chris@40 6860 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 6861 ;;
Chris@40 6862 aCC*)
Chris@40 6863 case $host_cpu in
Chris@40 6864 hppa*64*)
Chris@40 6865 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@40 6866 ;;
Chris@40 6867 ia64*)
Chris@40 6868 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@40 6869 ;;
Chris@40 6870 *)
Chris@40 6871 _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@40 6872 ;;
Chris@40 6873 esac
Chris@40 6874 # Commands to make compiler produce verbose output that lists
Chris@40 6875 # what "hidden" libraries, object files and flags are used when
Chris@40 6876 # linking a shared library.
Chris@40 6877 #
Chris@40 6878 # There doesn't appear to be a way to prevent this compiler from
Chris@40 6879 # explicitly linking system object files so we need to strip them
Chris@40 6880 # from the output so that they don't get included in the library
Chris@40 6881 # dependencies.
Chris@40 6882 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@40 6883 ;;
Chris@40 6884 *)
Chris@40 6885 if test yes = "$GXX"; then
Chris@40 6886 if test no = "$with_gnu_ld"; then
Chris@40 6887 case $host_cpu in
Chris@40 6888 hppa*64*)
Chris@40 6889 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@40 6890 ;;
Chris@40 6891 ia64*)
Chris@40 6892 _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@40 6893 ;;
Chris@40 6894 *)
Chris@40 6895 _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@40 6896 ;;
Chris@40 6897 esac
Chris@40 6898 fi
Chris@40 6899 else
Chris@40 6900 # FIXME: insert proper C++ library support
Chris@40 6901 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 6902 fi
Chris@40 6903 ;;
Chris@40 6904 esac
Chris@40 6905 ;;
Chris@40 6906
Chris@40 6907 interix[[3-9]]*)
Chris@40 6908 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@40 6909 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@40 6910 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@40 6911 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@40 6912 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
Chris@40 6913 # Instead, shared libraries are loaded at an image base (0x10000000 by
Chris@40 6914 # default) and relocated if they conflict, which is a slow very memory
Chris@40 6915 # consuming and fragmenting process. To avoid this, we pick a random,
Chris@40 6916 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
Chris@40 6917 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
Chris@40 6918 _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@40 6919 _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@40 6920 ;;
Chris@40 6921 irix5* | irix6*)
Chris@40 6922 case $cc_basename in
Chris@40 6923 CC*)
Chris@40 6924 # SGI C++
Chris@40 6925 _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@40 6926
Chris@40 6927 # Archives containing C++ object files must be created using
Chris@40 6928 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
Chris@40 6929 # necessary to make sure instantiated templates are included
Chris@40 6930 # in the archive.
Chris@40 6931 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
Chris@40 6932 ;;
Chris@40 6933 *)
Chris@40 6934 if test yes = "$GXX"; then
Chris@40 6935 if test no = "$with_gnu_ld"; then
Chris@40 6936 _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@40 6937 else
Chris@40 6938 _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@40 6939 fi
Chris@40 6940 fi
Chris@40 6941 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@40 6942 ;;
Chris@40 6943 esac
Chris@40 6944 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@40 6945 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@40 6946 _LT_TAGVAR(inherit_rpath, $1)=yes
Chris@40 6947 ;;
Chris@40 6948
Chris@40 6949 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
Chris@40 6950 case $cc_basename in
Chris@40 6951 KCC*)
Chris@40 6952 # Kuck and Associates, Inc. (KAI) C++ Compiler
Chris@40 6953
Chris@40 6954 # KCC will only create a shared library if the output file
Chris@40 6955 # ends with ".so" (or ".sl" for HP-UX), so rename the library
Chris@40 6956 # to its proper name (with version) after linking.
Chris@40 6957 _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@40 6958 _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@40 6959 # Commands to make compiler produce verbose output that lists
Chris@40 6960 # what "hidden" libraries, object files and flags are used when
Chris@40 6961 # linking a shared library.
Chris@40 6962 #
Chris@40 6963 # There doesn't appear to be a way to prevent this compiler from
Chris@40 6964 # explicitly linking system object files so we need to strip them
Chris@40 6965 # from the output so that they don't get included in the library
Chris@40 6966 # dependencies.
Chris@40 6967 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@40 6968
Chris@40 6969 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@40 6970 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
Chris@40 6971
Chris@40 6972 # Archives containing C++ object files must be created using
Chris@40 6973 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
Chris@40 6974 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
Chris@40 6975 ;;
Chris@40 6976 icpc* | ecpc* )
Chris@40 6977 # Intel C++
Chris@40 6978 with_gnu_ld=yes
Chris@40 6979 # version 8.0 and above of icpc choke on multiply defined symbols
Chris@40 6980 # if we add $predep_objects and $postdep_objects, however 7.1 and
Chris@40 6981 # earlier do not add the objects themselves.
Chris@40 6982 case `$CC -V 2>&1` in
Chris@40 6983 *"Version 7."*)
Chris@40 6984 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@40 6985 _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@40 6986 ;;
Chris@40 6987 *) # Version 8.0 or newer
Chris@40 6988 tmp_idyn=
Chris@40 6989 case $host_cpu in
Chris@40 6990 ia64*) tmp_idyn=' -i_dynamic';;
Chris@40 6991 esac
Chris@40 6992 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@40 6993 _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@40 6994 ;;
Chris@40 6995 esac
Chris@40 6996 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@40 6997 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@40 6998 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
Chris@40 6999 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
Chris@40 7000 ;;
Chris@40 7001 pgCC* | pgcpp*)
Chris@40 7002 # Portland Group C++ compiler
Chris@40 7003 case `$CC -V` in
Chris@40 7004 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
Chris@40 7005 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
Chris@40 7006 rm -rf $tpldir~
Chris@40 7007 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
Chris@40 7008 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
Chris@40 7009 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
Chris@40 7010 rm -rf $tpldir~
Chris@40 7011 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
Chris@40 7012 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
Chris@40 7013 $RANLIB $oldlib'
Chris@40 7014 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
Chris@40 7015 rm -rf $tpldir~
Chris@40 7016 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
Chris@40 7017 $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@40 7018 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
Chris@40 7019 rm -rf $tpldir~
Chris@40 7020 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
Chris@40 7021 $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@40 7022 ;;
Chris@40 7023 *) # Version 6 and above use weak symbols
Chris@40 7024 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@40 7025 _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@40 7026 ;;
Chris@40 7027 esac
Chris@40 7028
Chris@40 7029 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
Chris@40 7030 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
Chris@40 7031 _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@40 7032 ;;
Chris@40 7033 cxx*)
Chris@40 7034 # Compaq C++
Chris@40 7035 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@40 7036 _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@40 7037
Chris@40 7038 runpath_var=LD_RUN_PATH
Chris@40 7039 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
Chris@40 7040 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@40 7041
Chris@40 7042 # Commands to make compiler produce verbose output that lists
Chris@40 7043 # what "hidden" libraries, object files and flags are used when
Chris@40 7044 # linking a shared library.
Chris@40 7045 #
Chris@40 7046 # There doesn't appear to be a way to prevent this compiler from
Chris@40 7047 # explicitly linking system object files so we need to strip them
Chris@40 7048 # from the output so that they don't get included in the library
Chris@40 7049 # dependencies.
Chris@40 7050 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@40 7051 ;;
Chris@40 7052 xl* | mpixl* | bgxl*)
Chris@40 7053 # IBM XL 8.0 on PPC, with GNU ld
Chris@40 7054 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@40 7055 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
Chris@40 7056 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@40 7057 if test yes = "$supports_anon_versioning"; then
Chris@40 7058 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
Chris@40 7059 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
Chris@40 7060 echo "local: *; };" >> $output_objdir/$libname.ver~
Chris@40 7061 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
Chris@40 7062 fi
Chris@40 7063 ;;
Chris@40 7064 *)
Chris@40 7065 case `$CC -V 2>&1 | sed 5q` in
Chris@40 7066 *Sun\ C*)
Chris@40 7067 # Sun C++ 5.9
Chris@40 7068 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
Chris@40 7069 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@40 7070 _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@40 7071 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@40 7072 _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@40 7073 _LT_TAGVAR(compiler_needs_object, $1)=yes
Chris@40 7074
Chris@40 7075 # Not sure whether something based on
Chris@40 7076 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
Chris@40 7077 # would be better.
Chris@40 7078 output_verbose_link_cmd='func_echo_all'
Chris@40 7079
Chris@40 7080 # Archives containing C++ object files must be created using
Chris@40 7081 # "CC -xar", where "CC" is the Sun C++ compiler. This is
Chris@40 7082 # necessary to make sure instantiated templates are included
Chris@40 7083 # in the archive.
Chris@40 7084 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
Chris@40 7085 ;;
Chris@40 7086 esac
Chris@40 7087 ;;
Chris@40 7088 esac
Chris@40 7089 ;;
Chris@40 7090
Chris@40 7091 lynxos*)
Chris@40 7092 # FIXME: insert proper C++ library support
Chris@40 7093 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 7094 ;;
Chris@40 7095
Chris@40 7096 m88k*)
Chris@40 7097 # FIXME: insert proper C++ library support
Chris@40 7098 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 7099 ;;
Chris@40 7100
Chris@40 7101 mvs*)
Chris@40 7102 case $cc_basename in
Chris@40 7103 cxx*)
Chris@40 7104 # FIXME: insert proper C++ library support
Chris@40 7105 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 7106 ;;
Chris@40 7107 *)
Chris@40 7108 # FIXME: insert proper C++ library support
Chris@40 7109 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 7110 ;;
Chris@40 7111 esac
Chris@40 7112 ;;
Chris@40 7113
Chris@40 7114 netbsd*)
Chris@40 7115 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
Chris@40 7116 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
Chris@40 7117 wlarc=
Chris@40 7118 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@40 7119 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@40 7120 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@40 7121 fi
Chris@40 7122 # Workaround some broken pre-1.5 toolchains
Chris@40 7123 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
Chris@40 7124 ;;
Chris@40 7125
Chris@40 7126 *nto* | *qnx*)
Chris@40 7127 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@40 7128 ;;
Chris@40 7129
Chris@40 7130 openbsd* | bitrig*)
Chris@40 7131 if test -f /usr/libexec/ld.so; then
Chris@40 7132 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@40 7133 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@40 7134 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@40 7135 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
Chris@40 7136 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@40 7137 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
Chris@40 7138 _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@40 7139 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@40 7140 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
Chris@40 7141 fi
Chris@40 7142 output_verbose_link_cmd=func_echo_all
Chris@40 7143 else
Chris@40 7144 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 7145 fi
Chris@40 7146 ;;
Chris@40 7147
Chris@40 7148 osf3* | osf4* | osf5*)
Chris@40 7149 case $cc_basename in
Chris@40 7150 KCC*)
Chris@40 7151 # Kuck and Associates, Inc. (KAI) C++ Compiler
Chris@40 7152
Chris@40 7153 # KCC will only create a shared library if the output file
Chris@40 7154 # ends with ".so" (or ".sl" for HP-UX), so rename the library
Chris@40 7155 # to its proper name (with version) after linking.
Chris@40 7156 _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@40 7157
Chris@40 7158 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@40 7159 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@40 7160
Chris@40 7161 # Archives containing C++ object files must be created using
Chris@40 7162 # the KAI C++ compiler.
Chris@40 7163 case $host in
Chris@40 7164 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
Chris@40 7165 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
Chris@40 7166 esac
Chris@40 7167 ;;
Chris@40 7168 RCC*)
Chris@40 7169 # Rational C++ 2.4.1
Chris@40 7170 # FIXME: insert proper C++ library support
Chris@40 7171 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 7172 ;;
Chris@40 7173 cxx*)
Chris@40 7174 case $host in
Chris@40 7175 osf3*)
Chris@40 7176 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
Chris@40 7177 _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@40 7178 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@40 7179 ;;
Chris@40 7180 *)
Chris@40 7181 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
Chris@40 7182 _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@40 7183 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
Chris@40 7184 echo "-hidden">> $lib.exp~
Chris@40 7185 $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@40 7186 $RM $lib.exp'
Chris@40 7187 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
Chris@40 7188 ;;
Chris@40 7189 esac
Chris@40 7190
Chris@40 7191 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@40 7192
Chris@40 7193 # Commands to make compiler produce verbose output that lists
Chris@40 7194 # what "hidden" libraries, object files and flags are used when
Chris@40 7195 # linking a shared library.
Chris@40 7196 #
Chris@40 7197 # There doesn't appear to be a way to prevent this compiler from
Chris@40 7198 # explicitly linking system object files so we need to strip them
Chris@40 7199 # from the output so that they don't get included in the library
Chris@40 7200 # dependencies.
Chris@40 7201 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@40 7202 ;;
Chris@40 7203 *)
Chris@40 7204 if test yes,no = "$GXX,$with_gnu_ld"; then
Chris@40 7205 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
Chris@40 7206 case $host in
Chris@40 7207 osf3*)
Chris@40 7208 _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@40 7209 ;;
Chris@40 7210 *)
Chris@40 7211 _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@40 7212 ;;
Chris@40 7213 esac
Chris@40 7214
Chris@40 7215 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@40 7216 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@40 7217
Chris@40 7218 # Commands to make compiler produce verbose output that lists
Chris@40 7219 # what "hidden" libraries, object files and flags are used when
Chris@40 7220 # linking a shared library.
Chris@40 7221 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
Chris@40 7222
Chris@40 7223 else
Chris@40 7224 # FIXME: insert proper C++ library support
Chris@40 7225 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 7226 fi
Chris@40 7227 ;;
Chris@40 7228 esac
Chris@40 7229 ;;
Chris@40 7230
Chris@40 7231 psos*)
Chris@40 7232 # FIXME: insert proper C++ library support
Chris@40 7233 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 7234 ;;
Chris@40 7235
Chris@40 7236 sunos4*)
Chris@40 7237 case $cc_basename in
Chris@40 7238 CC*)
Chris@40 7239 # Sun C++ 4.x
Chris@40 7240 # FIXME: insert proper C++ library support
Chris@40 7241 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 7242 ;;
Chris@40 7243 lcc*)
Chris@40 7244 # Lucid
Chris@40 7245 # FIXME: insert proper C++ library support
Chris@40 7246 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 7247 ;;
Chris@40 7248 *)
Chris@40 7249 # FIXME: insert proper C++ library support
Chris@40 7250 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 7251 ;;
Chris@40 7252 esac
Chris@40 7253 ;;
Chris@40 7254
Chris@40 7255 solaris*)
Chris@40 7256 case $cc_basename in
Chris@40 7257 CC* | sunCC*)
Chris@40 7258 # Sun C++ 4.2, 5.x and Centerline C++
Chris@40 7259 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
Chris@40 7260 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
Chris@40 7261 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@40 7262 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@40 7263 $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@40 7264
Chris@40 7265 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@40 7266 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@40 7267 case $host_os in
Chris@40 7268 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
Chris@40 7269 *)
Chris@40 7270 # The compiler driver will combine and reorder linker options,
Chris@40 7271 # but understands '-z linker_flag'.
Chris@40 7272 # Supported since Solaris 2.6 (maybe 2.5.1?)
Chris@40 7273 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
Chris@40 7274 ;;
Chris@40 7275 esac
Chris@40 7276 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@40 7277
Chris@40 7278 output_verbose_link_cmd='func_echo_all'
Chris@40 7279
Chris@40 7280 # Archives containing C++ object files must be created using
Chris@40 7281 # "CC -xar", where "CC" is the Sun C++ compiler. This is
Chris@40 7282 # necessary to make sure instantiated templates are included
Chris@40 7283 # in the archive.
Chris@40 7284 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
Chris@40 7285 ;;
Chris@40 7286 gcx*)
Chris@40 7287 # Green Hills C++ Compiler
Chris@40 7288 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
Chris@40 7289
Chris@40 7290 # The C++ compiler must be used to create the archive.
Chris@40 7291 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
Chris@40 7292 ;;
Chris@40 7293 *)
Chris@40 7294 # GNU C++ compiler with Solaris linker
Chris@40 7295 if test yes,no = "$GXX,$with_gnu_ld"; then
Chris@40 7296 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
Chris@40 7297 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
Chris@40 7298 _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@40 7299 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@40 7300 $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@40 7301
Chris@40 7302 # Commands to make compiler produce verbose output that lists
Chris@40 7303 # what "hidden" libraries, object files and flags are used when
Chris@40 7304 # linking a shared library.
Chris@40 7305 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
Chris@40 7306 else
Chris@40 7307 # g++ 2.7 appears to require '-G' NOT '-shared' on this
Chris@40 7308 # platform.
Chris@40 7309 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
Chris@40 7310 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@40 7311 $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@40 7312
Chris@40 7313 # Commands to make compiler produce verbose output that lists
Chris@40 7314 # what "hidden" libraries, object files and flags are used when
Chris@40 7315 # linking a shared library.
Chris@40 7316 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
Chris@40 7317 fi
Chris@40 7318
Chris@40 7319 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
Chris@40 7320 case $host_os in
Chris@40 7321 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
Chris@40 7322 *)
Chris@40 7323 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
Chris@40 7324 ;;
Chris@40 7325 esac
Chris@40 7326 fi
Chris@40 7327 ;;
Chris@40 7328 esac
Chris@40 7329 ;;
Chris@40 7330
Chris@40 7331 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
Chris@40 7332 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
Chris@40 7333 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@40 7334 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@40 7335 runpath_var='LD_RUN_PATH'
Chris@40 7336
Chris@40 7337 case $cc_basename in
Chris@40 7338 CC*)
Chris@40 7339 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@40 7340 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@40 7341 ;;
Chris@40 7342 *)
Chris@40 7343 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@40 7344 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@40 7345 ;;
Chris@40 7346 esac
Chris@40 7347 ;;
Chris@40 7348
Chris@40 7349 sysv5* | sco3.2v5* | sco5v6*)
Chris@40 7350 # Note: We CANNOT use -z defs as we might desire, because we do not
Chris@40 7351 # link with -lc, and that would cause any symbols used from libc to
Chris@40 7352 # always be unresolved, which means just about no library would
Chris@40 7353 # ever link correctly. If we're not using GNU ld we use -z text
Chris@40 7354 # though, which does catch some bad symbols but isn't as heavy-handed
Chris@40 7355 # as -z defs.
Chris@40 7356 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
Chris@40 7357 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
Chris@40 7358 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@40 7359 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@40 7360 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
Chris@40 7361 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
Chris@40 7362 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@40 7363 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
Chris@40 7364 runpath_var='LD_RUN_PATH'
Chris@40 7365
Chris@40 7366 case $cc_basename in
Chris@40 7367 CC*)
Chris@40 7368 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@40 7369 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@40 7370 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
Chris@40 7371 '"$_LT_TAGVAR(old_archive_cmds, $1)"
Chris@40 7372 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
Chris@40 7373 '"$_LT_TAGVAR(reload_cmds, $1)"
Chris@40 7374 ;;
Chris@40 7375 *)
Chris@40 7376 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@40 7377 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@40 7378 ;;
Chris@40 7379 esac
Chris@40 7380 ;;
Chris@40 7381
Chris@40 7382 tandem*)
Chris@40 7383 case $cc_basename in
Chris@40 7384 NCC*)
Chris@40 7385 # NonStop-UX NCC 3.20
Chris@40 7386 # FIXME: insert proper C++ library support
Chris@40 7387 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 7388 ;;
Chris@40 7389 *)
Chris@40 7390 # FIXME: insert proper C++ library support
Chris@40 7391 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 7392 ;;
Chris@40 7393 esac
Chris@40 7394 ;;
Chris@40 7395
Chris@40 7396 vxworks*)
Chris@40 7397 # FIXME: insert proper C++ library support
Chris@40 7398 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 7399 ;;
Chris@40 7400
Chris@40 7401 *)
Chris@40 7402 # FIXME: insert proper C++ library support
Chris@40 7403 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@40 7404 ;;
Chris@40 7405 esac
Chris@40 7406
Chris@40 7407 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
Chris@40 7408 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
Chris@40 7409
Chris@40 7410 _LT_TAGVAR(GCC, $1)=$GXX
Chris@40 7411 _LT_TAGVAR(LD, $1)=$LD
Chris@40 7412
Chris@40 7413 ## CAVEAT EMPTOR:
Chris@40 7414 ## There is no encapsulation within the following macros, do not change
Chris@40 7415 ## the running order or otherwise move them around unless you know exactly
Chris@40 7416 ## what you are doing...
Chris@40 7417 _LT_SYS_HIDDEN_LIBDEPS($1)
Chris@40 7418 _LT_COMPILER_PIC($1)
Chris@40 7419 _LT_COMPILER_C_O($1)
Chris@40 7420 _LT_COMPILER_FILE_LOCKS($1)
Chris@40 7421 _LT_LINKER_SHLIBS($1)
Chris@40 7422 _LT_SYS_DYNAMIC_LINKER($1)
Chris@40 7423 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@40 7424
Chris@40 7425 _LT_CONFIG($1)
Chris@40 7426 fi # test -n "$compiler"
Chris@40 7427
Chris@40 7428 CC=$lt_save_CC
Chris@40 7429 CFLAGS=$lt_save_CFLAGS
Chris@40 7430 LDCXX=$LD
Chris@40 7431 LD=$lt_save_LD
Chris@40 7432 GCC=$lt_save_GCC
Chris@40 7433 with_gnu_ld=$lt_save_with_gnu_ld
Chris@40 7434 lt_cv_path_LDCXX=$lt_cv_path_LD
Chris@40 7435 lt_cv_path_LD=$lt_save_path_LD
Chris@40 7436 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
Chris@40 7437 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
Chris@40 7438 fi # test yes != "$_lt_caught_CXX_error"
Chris@40 7439
Chris@40 7440 AC_LANG_POP
Chris@40 7441 ])# _LT_LANG_CXX_CONFIG
Chris@40 7442
Chris@40 7443
Chris@40 7444 # _LT_FUNC_STRIPNAME_CNF
Chris@40 7445 # ----------------------
Chris@40 7446 # func_stripname_cnf prefix suffix name
Chris@40 7447 # strip PREFIX and SUFFIX off of NAME.
Chris@40 7448 # PREFIX and SUFFIX must not contain globbing or regex special
Chris@40 7449 # characters, hashes, percent signs, but SUFFIX may contain a leading
Chris@40 7450 # dot (in which case that matches only a dot).
Chris@40 7451 #
Chris@40 7452 # This function is identical to the (non-XSI) version of func_stripname,
Chris@40 7453 # except this one can be used by m4 code that may be executed by configure,
Chris@40 7454 # rather than the libtool script.
Chris@40 7455 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
Chris@40 7456 AC_REQUIRE([_LT_DECL_SED])
Chris@40 7457 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
Chris@40 7458 func_stripname_cnf ()
Chris@40 7459 {
Chris@40 7460 case @S|@2 in
Chris@40 7461 .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
Chris@40 7462 *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
Chris@40 7463 esac
Chris@40 7464 } # func_stripname_cnf
Chris@40 7465 ])# _LT_FUNC_STRIPNAME_CNF
Chris@40 7466
Chris@40 7467
Chris@40 7468 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
Chris@40 7469 # ---------------------------------
Chris@40 7470 # Figure out "hidden" library dependencies from verbose
Chris@40 7471 # compiler output when linking a shared library.
Chris@40 7472 # Parse the compiler output and extract the necessary
Chris@40 7473 # objects, libraries and library flags.
Chris@40 7474 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
Chris@40 7475 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@40 7476 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
Chris@40 7477 # Dependencies to place before and after the object being linked:
Chris@40 7478 _LT_TAGVAR(predep_objects, $1)=
Chris@40 7479 _LT_TAGVAR(postdep_objects, $1)=
Chris@40 7480 _LT_TAGVAR(predeps, $1)=
Chris@40 7481 _LT_TAGVAR(postdeps, $1)=
Chris@40 7482 _LT_TAGVAR(compiler_lib_search_path, $1)=
Chris@40 7483
Chris@40 7484 dnl we can't use the lt_simple_compile_test_code here,
Chris@40 7485 dnl because it contains code intended for an executable,
Chris@40 7486 dnl not a library. It's possible we should let each
Chris@40 7487 dnl tag define a new lt_????_link_test_code variable,
Chris@40 7488 dnl but it's only used here...
Chris@40 7489 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
Chris@40 7490 int a;
Chris@40 7491 void foo (void) { a = 0; }
Chris@40 7492 _LT_EOF
Chris@40 7493 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
Chris@40 7494 class Foo
Chris@40 7495 {
Chris@40 7496 public:
Chris@40 7497 Foo (void) { a = 0; }
Chris@40 7498 private:
Chris@40 7499 int a;
Chris@40 7500 };
Chris@40 7501 _LT_EOF
Chris@40 7502 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
Chris@40 7503 subroutine foo
Chris@40 7504 implicit none
Chris@40 7505 integer*4 a
Chris@40 7506 a=0
Chris@40 7507 return
Chris@40 7508 end
Chris@40 7509 _LT_EOF
Chris@40 7510 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
Chris@40 7511 subroutine foo
Chris@40 7512 implicit none
Chris@40 7513 integer a
Chris@40 7514 a=0
Chris@40 7515 return
Chris@40 7516 end
Chris@40 7517 _LT_EOF
Chris@40 7518 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
Chris@40 7519 public class foo {
Chris@40 7520 private int a;
Chris@40 7521 public void bar (void) {
Chris@40 7522 a = 0;
Chris@40 7523 }
Chris@40 7524 };
Chris@40 7525 _LT_EOF
Chris@40 7526 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
Chris@40 7527 package foo
Chris@40 7528 func foo() {
Chris@40 7529 }
Chris@40 7530 _LT_EOF
Chris@40 7531 ])
Chris@40 7532
Chris@40 7533 _lt_libdeps_save_CFLAGS=$CFLAGS
Chris@40 7534 case "$CC $CFLAGS " in #(
Chris@40 7535 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
Chris@40 7536 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
Chris@40 7537 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
Chris@40 7538 esac
Chris@40 7539
Chris@40 7540 dnl Parse the compiler output and extract the necessary
Chris@40 7541 dnl objects, libraries and library flags.
Chris@40 7542 if AC_TRY_EVAL(ac_compile); then
Chris@40 7543 # Parse the compiler output and extract the necessary
Chris@40 7544 # objects, libraries and library flags.
Chris@40 7545
Chris@40 7546 # Sentinel used to keep track of whether or not we are before
Chris@40 7547 # the conftest object file.
Chris@40 7548 pre_test_object_deps_done=no
Chris@40 7549
Chris@40 7550 for p in `eval "$output_verbose_link_cmd"`; do
Chris@40 7551 case $prev$p in
Chris@40 7552
Chris@40 7553 -L* | -R* | -l*)
Chris@40 7554 # Some compilers place space between "-{L,R}" and the path.
Chris@40 7555 # Remove the space.
Chris@40 7556 if test x-L = "$p" ||
Chris@40 7557 test x-R = "$p"; then
Chris@40 7558 prev=$p
Chris@40 7559 continue
Chris@40 7560 fi
Chris@40 7561
Chris@40 7562 # Expand the sysroot to ease extracting the directories later.
Chris@40 7563 if test -z "$prev"; then
Chris@40 7564 case $p in
Chris@40 7565 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
Chris@40 7566 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
Chris@40 7567 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
Chris@40 7568 esac
Chris@40 7569 fi
Chris@40 7570 case $p in
Chris@40 7571 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
Chris@40 7572 esac
Chris@40 7573 if test no = "$pre_test_object_deps_done"; then
Chris@40 7574 case $prev in
Chris@40 7575 -L | -R)
Chris@40 7576 # Internal compiler library paths should come after those
Chris@40 7577 # provided the user. The postdeps already come after the
Chris@40 7578 # user supplied libs so there is no need to process them.
Chris@40 7579 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
Chris@40 7580 _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
Chris@40 7581 else
Chris@40 7582 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
Chris@40 7583 fi
Chris@40 7584 ;;
Chris@40 7585 # The "-l" case would never come before the object being
Chris@40 7586 # linked, so don't bother handling this case.
Chris@40 7587 esac
Chris@40 7588 else
Chris@40 7589 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
Chris@40 7590 _LT_TAGVAR(postdeps, $1)=$prev$p
Chris@40 7591 else
Chris@40 7592 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
Chris@40 7593 fi
Chris@40 7594 fi
Chris@40 7595 prev=
Chris@40 7596 ;;
Chris@40 7597
Chris@40 7598 *.lto.$objext) ;; # Ignore GCC LTO objects
Chris@40 7599 *.$objext)
Chris@40 7600 # This assumes that the test object file only shows up
Chris@40 7601 # once in the compiler output.
Chris@40 7602 if test "$p" = "conftest.$objext"; then
Chris@40 7603 pre_test_object_deps_done=yes
Chris@40 7604 continue
Chris@40 7605 fi
Chris@40 7606
Chris@40 7607 if test no = "$pre_test_object_deps_done"; then
Chris@40 7608 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
Chris@40 7609 _LT_TAGVAR(predep_objects, $1)=$p
Chris@40 7610 else
Chris@40 7611 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
Chris@40 7612 fi
Chris@40 7613 else
Chris@40 7614 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
Chris@40 7615 _LT_TAGVAR(postdep_objects, $1)=$p
Chris@40 7616 else
Chris@40 7617 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
Chris@40 7618 fi
Chris@40 7619 fi
Chris@40 7620 ;;
Chris@40 7621
Chris@40 7622 *) ;; # Ignore the rest.
Chris@40 7623
Chris@40 7624 esac
Chris@40 7625 done
Chris@40 7626
Chris@40 7627 # Clean up.
Chris@40 7628 rm -f a.out a.exe
Chris@40 7629 else
Chris@40 7630 echo "libtool.m4: error: problem compiling $1 test program"
Chris@40 7631 fi
Chris@40 7632
Chris@40 7633 $RM -f confest.$objext
Chris@40 7634 CFLAGS=$_lt_libdeps_save_CFLAGS
Chris@40 7635
Chris@40 7636 # PORTME: override above test on systems where it is broken
Chris@40 7637 m4_if([$1], [CXX],
Chris@40 7638 [case $host_os in
Chris@40 7639 interix[[3-9]]*)
Chris@40 7640 # Interix 3.5 installs completely hosed .la files for C++, so rather than
Chris@40 7641 # hack all around it, let's just trust "g++" to DTRT.
Chris@40 7642 _LT_TAGVAR(predep_objects,$1)=
Chris@40 7643 _LT_TAGVAR(postdep_objects,$1)=
Chris@40 7644 _LT_TAGVAR(postdeps,$1)=
Chris@40 7645 ;;
Chris@40 7646 esac
Chris@40 7647 ])
Chris@40 7648
Chris@40 7649 case " $_LT_TAGVAR(postdeps, $1) " in
Chris@40 7650 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
Chris@40 7651 esac
Chris@40 7652 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
Chris@40 7653 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
Chris@40 7654 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
Chris@40 7655 fi
Chris@40 7656 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
Chris@40 7657 [The directories searched by this compiler when creating a shared library])
Chris@40 7658 _LT_TAGDECL([], [predep_objects], [1],
Chris@40 7659 [Dependencies to place before and after the objects being linked to
Chris@40 7660 create a shared library])
Chris@40 7661 _LT_TAGDECL([], [postdep_objects], [1])
Chris@40 7662 _LT_TAGDECL([], [predeps], [1])
Chris@40 7663 _LT_TAGDECL([], [postdeps], [1])
Chris@40 7664 _LT_TAGDECL([], [compiler_lib_search_path], [1],
Chris@40 7665 [The library search path used internally by the compiler when linking
Chris@40 7666 a shared library])
Chris@40 7667 ])# _LT_SYS_HIDDEN_LIBDEPS
Chris@40 7668
Chris@40 7669
Chris@40 7670 # _LT_LANG_F77_CONFIG([TAG])
Chris@40 7671 # --------------------------
Chris@40 7672 # Ensure that the configuration variables for a Fortran 77 compiler are
Chris@40 7673 # suitably defined. These variables are subsequently used by _LT_CONFIG
Chris@40 7674 # to write the compiler configuration to 'libtool'.
Chris@40 7675 m4_defun([_LT_LANG_F77_CONFIG],
Chris@40 7676 [AC_LANG_PUSH(Fortran 77)
Chris@40 7677 if test -z "$F77" || test no = "$F77"; then
Chris@40 7678 _lt_disable_F77=yes
Chris@40 7679 fi
Chris@40 7680
Chris@40 7681 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@40 7682 _LT_TAGVAR(allow_undefined_flag, $1)=
Chris@40 7683 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@40 7684 _LT_TAGVAR(archive_expsym_cmds, $1)=
Chris@40 7685 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@40 7686 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@40 7687 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@40 7688 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@40 7689 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@40 7690 _LT_TAGVAR(hardcode_minus_L, $1)=no
Chris@40 7691 _LT_TAGVAR(hardcode_automatic, $1)=no
Chris@40 7692 _LT_TAGVAR(inherit_rpath, $1)=no
Chris@40 7693 _LT_TAGVAR(module_cmds, $1)=
Chris@40 7694 _LT_TAGVAR(module_expsym_cmds, $1)=
Chris@40 7695 _LT_TAGVAR(link_all_deplibs, $1)=unknown
Chris@40 7696 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@40 7697 _LT_TAGVAR(reload_flag, $1)=$reload_flag
Chris@40 7698 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
Chris@40 7699 _LT_TAGVAR(no_undefined_flag, $1)=
Chris@40 7700 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@40 7701 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
Chris@40 7702
Chris@40 7703 # Source file extension for f77 test sources.
Chris@40 7704 ac_ext=f
Chris@40 7705
Chris@40 7706 # Object file extension for compiled f77 test sources.
Chris@40 7707 objext=o
Chris@40 7708 _LT_TAGVAR(objext, $1)=$objext
Chris@40 7709
Chris@40 7710 # No sense in running all these tests if we already determined that
Chris@40 7711 # the F77 compiler isn't working. Some variables (like enable_shared)
Chris@40 7712 # are currently assumed to apply to all compilers on this platform,
Chris@40 7713 # and will be corrupted by setting them based on a non-working compiler.
Chris@40 7714 if test yes != "$_lt_disable_F77"; then
Chris@40 7715 # Code to be used in simple compile tests
Chris@40 7716 lt_simple_compile_test_code="\
Chris@40 7717 subroutine t
Chris@40 7718 return
Chris@40 7719 end
Chris@40 7720 "
Chris@40 7721
Chris@40 7722 # Code to be used in simple link tests
Chris@40 7723 lt_simple_link_test_code="\
Chris@40 7724 program t
Chris@40 7725 end
Chris@40 7726 "
Chris@40 7727
Chris@40 7728 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@40 7729 _LT_TAG_COMPILER
Chris@40 7730
Chris@40 7731 # save warnings/boilerplate of simple test code
Chris@40 7732 _LT_COMPILER_BOILERPLATE
Chris@40 7733 _LT_LINKER_BOILERPLATE
Chris@40 7734
Chris@40 7735 # Allow CC to be a program name with arguments.
Chris@40 7736 lt_save_CC=$CC
Chris@40 7737 lt_save_GCC=$GCC
Chris@40 7738 lt_save_CFLAGS=$CFLAGS
Chris@40 7739 CC=${F77-"f77"}
Chris@40 7740 CFLAGS=$FFLAGS
Chris@40 7741 compiler=$CC
Chris@40 7742 _LT_TAGVAR(compiler, $1)=$CC
Chris@40 7743 _LT_CC_BASENAME([$compiler])
Chris@40 7744 GCC=$G77
Chris@40 7745 if test -n "$compiler"; then
Chris@40 7746 AC_MSG_CHECKING([if libtool supports shared libraries])
Chris@40 7747 AC_MSG_RESULT([$can_build_shared])
Chris@40 7748
Chris@40 7749 AC_MSG_CHECKING([whether to build shared libraries])
Chris@40 7750 test no = "$can_build_shared" && enable_shared=no
Chris@40 7751
Chris@40 7752 # On AIX, shared libraries and static libraries use the same namespace, and
Chris@40 7753 # are all built from PIC.
Chris@40 7754 case $host_os in
Chris@40 7755 aix3*)
Chris@40 7756 test yes = "$enable_shared" && enable_static=no
Chris@40 7757 if test -n "$RANLIB"; then
Chris@40 7758 archive_cmds="$archive_cmds~\$RANLIB \$lib"
Chris@40 7759 postinstall_cmds='$RANLIB $lib'
Chris@40 7760 fi
Chris@40 7761 ;;
Chris@40 7762 aix[[4-9]]*)
Chris@40 7763 if test ia64 != "$host_cpu"; then
Chris@40 7764 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
Chris@40 7765 yes,aix,yes) ;; # shared object as lib.so file only
Chris@40 7766 yes,svr4,*) ;; # shared object as lib.so archive member only
Chris@40 7767 yes,*) enable_static=no ;; # shared object in lib.a archive as well
Chris@40 7768 esac
Chris@40 7769 fi
Chris@40 7770 ;;
Chris@40 7771 esac
Chris@40 7772 AC_MSG_RESULT([$enable_shared])
Chris@40 7773
Chris@40 7774 AC_MSG_CHECKING([whether to build static libraries])
Chris@40 7775 # Make sure either enable_shared or enable_static is yes.
Chris@40 7776 test yes = "$enable_shared" || enable_static=yes
Chris@40 7777 AC_MSG_RESULT([$enable_static])
Chris@40 7778
Chris@40 7779 _LT_TAGVAR(GCC, $1)=$G77
Chris@40 7780 _LT_TAGVAR(LD, $1)=$LD
Chris@40 7781
Chris@40 7782 ## CAVEAT EMPTOR:
Chris@40 7783 ## There is no encapsulation within the following macros, do not change
Chris@40 7784 ## the running order or otherwise move them around unless you know exactly
Chris@40 7785 ## what you are doing...
Chris@40 7786 _LT_COMPILER_PIC($1)
Chris@40 7787 _LT_COMPILER_C_O($1)
Chris@40 7788 _LT_COMPILER_FILE_LOCKS($1)
Chris@40 7789 _LT_LINKER_SHLIBS($1)
Chris@40 7790 _LT_SYS_DYNAMIC_LINKER($1)
Chris@40 7791 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@40 7792
Chris@40 7793 _LT_CONFIG($1)
Chris@40 7794 fi # test -n "$compiler"
Chris@40 7795
Chris@40 7796 GCC=$lt_save_GCC
Chris@40 7797 CC=$lt_save_CC
Chris@40 7798 CFLAGS=$lt_save_CFLAGS
Chris@40 7799 fi # test yes != "$_lt_disable_F77"
Chris@40 7800
Chris@40 7801 AC_LANG_POP
Chris@40 7802 ])# _LT_LANG_F77_CONFIG
Chris@40 7803
Chris@40 7804
Chris@40 7805 # _LT_LANG_FC_CONFIG([TAG])
Chris@40 7806 # -------------------------
Chris@40 7807 # Ensure that the configuration variables for a Fortran compiler are
Chris@40 7808 # suitably defined. These variables are subsequently used by _LT_CONFIG
Chris@40 7809 # to write the compiler configuration to 'libtool'.
Chris@40 7810 m4_defun([_LT_LANG_FC_CONFIG],
Chris@40 7811 [AC_LANG_PUSH(Fortran)
Chris@40 7812
Chris@40 7813 if test -z "$FC" || test no = "$FC"; then
Chris@40 7814 _lt_disable_FC=yes
Chris@40 7815 fi
Chris@40 7816
Chris@40 7817 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@40 7818 _LT_TAGVAR(allow_undefined_flag, $1)=
Chris@40 7819 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@40 7820 _LT_TAGVAR(archive_expsym_cmds, $1)=
Chris@40 7821 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@40 7822 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@40 7823 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@40 7824 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@40 7825 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@40 7826 _LT_TAGVAR(hardcode_minus_L, $1)=no
Chris@40 7827 _LT_TAGVAR(hardcode_automatic, $1)=no
Chris@40 7828 _LT_TAGVAR(inherit_rpath, $1)=no
Chris@40 7829 _LT_TAGVAR(module_cmds, $1)=
Chris@40 7830 _LT_TAGVAR(module_expsym_cmds, $1)=
Chris@40 7831 _LT_TAGVAR(link_all_deplibs, $1)=unknown
Chris@40 7832 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@40 7833 _LT_TAGVAR(reload_flag, $1)=$reload_flag
Chris@40 7834 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
Chris@40 7835 _LT_TAGVAR(no_undefined_flag, $1)=
Chris@40 7836 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@40 7837 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
Chris@40 7838
Chris@40 7839 # Source file extension for fc test sources.
Chris@40 7840 ac_ext=${ac_fc_srcext-f}
Chris@40 7841
Chris@40 7842 # Object file extension for compiled fc test sources.
Chris@40 7843 objext=o
Chris@40 7844 _LT_TAGVAR(objext, $1)=$objext
Chris@40 7845
Chris@40 7846 # No sense in running all these tests if we already determined that
Chris@40 7847 # the FC compiler isn't working. Some variables (like enable_shared)
Chris@40 7848 # are currently assumed to apply to all compilers on this platform,
Chris@40 7849 # and will be corrupted by setting them based on a non-working compiler.
Chris@40 7850 if test yes != "$_lt_disable_FC"; then
Chris@40 7851 # Code to be used in simple compile tests
Chris@40 7852 lt_simple_compile_test_code="\
Chris@40 7853 subroutine t
Chris@40 7854 return
Chris@40 7855 end
Chris@40 7856 "
Chris@40 7857
Chris@40 7858 # Code to be used in simple link tests
Chris@40 7859 lt_simple_link_test_code="\
Chris@40 7860 program t
Chris@40 7861 end
Chris@40 7862 "
Chris@40 7863
Chris@40 7864 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@40 7865 _LT_TAG_COMPILER
Chris@40 7866
Chris@40 7867 # save warnings/boilerplate of simple test code
Chris@40 7868 _LT_COMPILER_BOILERPLATE
Chris@40 7869 _LT_LINKER_BOILERPLATE
Chris@40 7870
Chris@40 7871 # Allow CC to be a program name with arguments.
Chris@40 7872 lt_save_CC=$CC
Chris@40 7873 lt_save_GCC=$GCC
Chris@40 7874 lt_save_CFLAGS=$CFLAGS
Chris@40 7875 CC=${FC-"f95"}
Chris@40 7876 CFLAGS=$FCFLAGS
Chris@40 7877 compiler=$CC
Chris@40 7878 GCC=$ac_cv_fc_compiler_gnu
Chris@40 7879
Chris@40 7880 _LT_TAGVAR(compiler, $1)=$CC
Chris@40 7881 _LT_CC_BASENAME([$compiler])
Chris@40 7882
Chris@40 7883 if test -n "$compiler"; then
Chris@40 7884 AC_MSG_CHECKING([if libtool supports shared libraries])
Chris@40 7885 AC_MSG_RESULT([$can_build_shared])
Chris@40 7886
Chris@40 7887 AC_MSG_CHECKING([whether to build shared libraries])
Chris@40 7888 test no = "$can_build_shared" && enable_shared=no
Chris@40 7889
Chris@40 7890 # On AIX, shared libraries and static libraries use the same namespace, and
Chris@40 7891 # are all built from PIC.
Chris@40 7892 case $host_os in
Chris@40 7893 aix3*)
Chris@40 7894 test yes = "$enable_shared" && enable_static=no
Chris@40 7895 if test -n "$RANLIB"; then
Chris@40 7896 archive_cmds="$archive_cmds~\$RANLIB \$lib"
Chris@40 7897 postinstall_cmds='$RANLIB $lib'
Chris@40 7898 fi
Chris@40 7899 ;;
Chris@40 7900 aix[[4-9]]*)
Chris@40 7901 if test ia64 != "$host_cpu"; then
Chris@40 7902 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
Chris@40 7903 yes,aix,yes) ;; # shared object as lib.so file only
Chris@40 7904 yes,svr4,*) ;; # shared object as lib.so archive member only
Chris@40 7905 yes,*) enable_static=no ;; # shared object in lib.a archive as well
Chris@40 7906 esac
Chris@40 7907 fi
Chris@40 7908 ;;
Chris@40 7909 esac
Chris@40 7910 AC_MSG_RESULT([$enable_shared])
Chris@40 7911
Chris@40 7912 AC_MSG_CHECKING([whether to build static libraries])
Chris@40 7913 # Make sure either enable_shared or enable_static is yes.
Chris@40 7914 test yes = "$enable_shared" || enable_static=yes
Chris@40 7915 AC_MSG_RESULT([$enable_static])
Chris@40 7916
Chris@40 7917 _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
Chris@40 7918 _LT_TAGVAR(LD, $1)=$LD
Chris@40 7919
Chris@40 7920 ## CAVEAT EMPTOR:
Chris@40 7921 ## There is no encapsulation within the following macros, do not change
Chris@40 7922 ## the running order or otherwise move them around unless you know exactly
Chris@40 7923 ## what you are doing...
Chris@40 7924 _LT_SYS_HIDDEN_LIBDEPS($1)
Chris@40 7925 _LT_COMPILER_PIC($1)
Chris@40 7926 _LT_COMPILER_C_O($1)
Chris@40 7927 _LT_COMPILER_FILE_LOCKS($1)
Chris@40 7928 _LT_LINKER_SHLIBS($1)
Chris@40 7929 _LT_SYS_DYNAMIC_LINKER($1)
Chris@40 7930 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@40 7931
Chris@40 7932 _LT_CONFIG($1)
Chris@40 7933 fi # test -n "$compiler"
Chris@40 7934
Chris@40 7935 GCC=$lt_save_GCC
Chris@40 7936 CC=$lt_save_CC
Chris@40 7937 CFLAGS=$lt_save_CFLAGS
Chris@40 7938 fi # test yes != "$_lt_disable_FC"
Chris@40 7939
Chris@40 7940 AC_LANG_POP
Chris@40 7941 ])# _LT_LANG_FC_CONFIG
Chris@40 7942
Chris@40 7943
Chris@40 7944 # _LT_LANG_GCJ_CONFIG([TAG])
Chris@40 7945 # --------------------------
Chris@40 7946 # Ensure that the configuration variables for the GNU Java Compiler compiler
Chris@40 7947 # are suitably defined. These variables are subsequently used by _LT_CONFIG
Chris@40 7948 # to write the compiler configuration to 'libtool'.
Chris@40 7949 m4_defun([_LT_LANG_GCJ_CONFIG],
Chris@40 7950 [AC_REQUIRE([LT_PROG_GCJ])dnl
Chris@40 7951 AC_LANG_SAVE
Chris@40 7952
Chris@40 7953 # Source file extension for Java test sources.
Chris@40 7954 ac_ext=java
Chris@40 7955
Chris@40 7956 # Object file extension for compiled Java test sources.
Chris@40 7957 objext=o
Chris@40 7958 _LT_TAGVAR(objext, $1)=$objext
Chris@40 7959
Chris@40 7960 # Code to be used in simple compile tests
Chris@40 7961 lt_simple_compile_test_code="class foo {}"
Chris@40 7962
Chris@40 7963 # Code to be used in simple link tests
Chris@40 7964 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
Chris@40 7965
Chris@40 7966 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@40 7967 _LT_TAG_COMPILER
Chris@40 7968
Chris@40 7969 # save warnings/boilerplate of simple test code
Chris@40 7970 _LT_COMPILER_BOILERPLATE
Chris@40 7971 _LT_LINKER_BOILERPLATE
Chris@40 7972
Chris@40 7973 # Allow CC to be a program name with arguments.
Chris@40 7974 lt_save_CC=$CC
Chris@40 7975 lt_save_CFLAGS=$CFLAGS
Chris@40 7976 lt_save_GCC=$GCC
Chris@40 7977 GCC=yes
Chris@40 7978 CC=${GCJ-"gcj"}
Chris@40 7979 CFLAGS=$GCJFLAGS
Chris@40 7980 compiler=$CC
Chris@40 7981 _LT_TAGVAR(compiler, $1)=$CC
Chris@40 7982 _LT_TAGVAR(LD, $1)=$LD
Chris@40 7983 _LT_CC_BASENAME([$compiler])
Chris@40 7984
Chris@40 7985 # GCJ did not exist at the time GCC didn't implicitly link libc in.
Chris@40 7986 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@40 7987
Chris@40 7988 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@40 7989 _LT_TAGVAR(reload_flag, $1)=$reload_flag
Chris@40 7990 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
Chris@40 7991
Chris@40 7992 ## CAVEAT EMPTOR:
Chris@40 7993 ## There is no encapsulation within the following macros, do not change
Chris@40 7994 ## the running order or otherwise move them around unless you know exactly
Chris@40 7995 ## what you are doing...
Chris@40 7996 if test -n "$compiler"; then
Chris@40 7997 _LT_COMPILER_NO_RTTI($1)
Chris@40 7998 _LT_COMPILER_PIC($1)
Chris@40 7999 _LT_COMPILER_C_O($1)
Chris@40 8000 _LT_COMPILER_FILE_LOCKS($1)
Chris@40 8001 _LT_LINKER_SHLIBS($1)
Chris@40 8002 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@40 8003
Chris@40 8004 _LT_CONFIG($1)
Chris@40 8005 fi
Chris@40 8006
Chris@40 8007 AC_LANG_RESTORE
Chris@40 8008
Chris@40 8009 GCC=$lt_save_GCC
Chris@40 8010 CC=$lt_save_CC
Chris@40 8011 CFLAGS=$lt_save_CFLAGS
Chris@40 8012 ])# _LT_LANG_GCJ_CONFIG
Chris@40 8013
Chris@40 8014
Chris@40 8015 # _LT_LANG_GO_CONFIG([TAG])
Chris@40 8016 # --------------------------
Chris@40 8017 # Ensure that the configuration variables for the GNU Go compiler
Chris@40 8018 # are suitably defined. These variables are subsequently used by _LT_CONFIG
Chris@40 8019 # to write the compiler configuration to 'libtool'.
Chris@40 8020 m4_defun([_LT_LANG_GO_CONFIG],
Chris@40 8021 [AC_REQUIRE([LT_PROG_GO])dnl
Chris@40 8022 AC_LANG_SAVE
Chris@40 8023
Chris@40 8024 # Source file extension for Go test sources.
Chris@40 8025 ac_ext=go
Chris@40 8026
Chris@40 8027 # Object file extension for compiled Go test sources.
Chris@40 8028 objext=o
Chris@40 8029 _LT_TAGVAR(objext, $1)=$objext
Chris@40 8030
Chris@40 8031 # Code to be used in simple compile tests
Chris@40 8032 lt_simple_compile_test_code="package main; func main() { }"
Chris@40 8033
Chris@40 8034 # Code to be used in simple link tests
Chris@40 8035 lt_simple_link_test_code='package main; func main() { }'
Chris@40 8036
Chris@40 8037 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@40 8038 _LT_TAG_COMPILER
Chris@40 8039
Chris@40 8040 # save warnings/boilerplate of simple test code
Chris@40 8041 _LT_COMPILER_BOILERPLATE
Chris@40 8042 _LT_LINKER_BOILERPLATE
Chris@40 8043
Chris@40 8044 # Allow CC to be a program name with arguments.
Chris@40 8045 lt_save_CC=$CC
Chris@40 8046 lt_save_CFLAGS=$CFLAGS
Chris@40 8047 lt_save_GCC=$GCC
Chris@40 8048 GCC=yes
Chris@40 8049 CC=${GOC-"gccgo"}
Chris@40 8050 CFLAGS=$GOFLAGS
Chris@40 8051 compiler=$CC
Chris@40 8052 _LT_TAGVAR(compiler, $1)=$CC
Chris@40 8053 _LT_TAGVAR(LD, $1)=$LD
Chris@40 8054 _LT_CC_BASENAME([$compiler])
Chris@40 8055
Chris@40 8056 # Go did not exist at the time GCC didn't implicitly link libc in.
Chris@40 8057 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@40 8058
Chris@40 8059 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@40 8060 _LT_TAGVAR(reload_flag, $1)=$reload_flag
Chris@40 8061 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
Chris@40 8062
Chris@40 8063 ## CAVEAT EMPTOR:
Chris@40 8064 ## There is no encapsulation within the following macros, do not change
Chris@40 8065 ## the running order or otherwise move them around unless you know exactly
Chris@40 8066 ## what you are doing...
Chris@40 8067 if test -n "$compiler"; then
Chris@40 8068 _LT_COMPILER_NO_RTTI($1)
Chris@40 8069 _LT_COMPILER_PIC($1)
Chris@40 8070 _LT_COMPILER_C_O($1)
Chris@40 8071 _LT_COMPILER_FILE_LOCKS($1)
Chris@40 8072 _LT_LINKER_SHLIBS($1)
Chris@40 8073 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@40 8074
Chris@40 8075 _LT_CONFIG($1)
Chris@40 8076 fi
Chris@40 8077
Chris@40 8078 AC_LANG_RESTORE
Chris@40 8079
Chris@40 8080 GCC=$lt_save_GCC
Chris@40 8081 CC=$lt_save_CC
Chris@40 8082 CFLAGS=$lt_save_CFLAGS
Chris@40 8083 ])# _LT_LANG_GO_CONFIG
Chris@40 8084
Chris@40 8085
Chris@40 8086 # _LT_LANG_RC_CONFIG([TAG])
Chris@40 8087 # -------------------------
Chris@40 8088 # Ensure that the configuration variables for the Windows resource compiler
Chris@40 8089 # are suitably defined. These variables are subsequently used by _LT_CONFIG
Chris@40 8090 # to write the compiler configuration to 'libtool'.
Chris@40 8091 m4_defun([_LT_LANG_RC_CONFIG],
Chris@40 8092 [AC_REQUIRE([LT_PROG_RC])dnl
Chris@40 8093 AC_LANG_SAVE
Chris@40 8094
Chris@40 8095 # Source file extension for RC test sources.
Chris@40 8096 ac_ext=rc
Chris@40 8097
Chris@40 8098 # Object file extension for compiled RC test sources.
Chris@40 8099 objext=o
Chris@40 8100 _LT_TAGVAR(objext, $1)=$objext
Chris@40 8101
Chris@40 8102 # Code to be used in simple compile tests
Chris@40 8103 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
Chris@40 8104
Chris@40 8105 # Code to be used in simple link tests
Chris@40 8106 lt_simple_link_test_code=$lt_simple_compile_test_code
Chris@40 8107
Chris@40 8108 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@40 8109 _LT_TAG_COMPILER
Chris@40 8110
Chris@40 8111 # save warnings/boilerplate of simple test code
Chris@40 8112 _LT_COMPILER_BOILERPLATE
Chris@40 8113 _LT_LINKER_BOILERPLATE
Chris@40 8114
Chris@40 8115 # Allow CC to be a program name with arguments.
Chris@40 8116 lt_save_CC=$CC
Chris@40 8117 lt_save_CFLAGS=$CFLAGS
Chris@40 8118 lt_save_GCC=$GCC
Chris@40 8119 GCC=
Chris@40 8120 CC=${RC-"windres"}
Chris@40 8121 CFLAGS=
Chris@40 8122 compiler=$CC
Chris@40 8123 _LT_TAGVAR(compiler, $1)=$CC
Chris@40 8124 _LT_CC_BASENAME([$compiler])
Chris@40 8125 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
Chris@40 8126
Chris@40 8127 if test -n "$compiler"; then
Chris@40 8128 :
Chris@40 8129 _LT_CONFIG($1)
Chris@40 8130 fi
Chris@40 8131
Chris@40 8132 GCC=$lt_save_GCC
Chris@40 8133 AC_LANG_RESTORE
Chris@40 8134 CC=$lt_save_CC
Chris@40 8135 CFLAGS=$lt_save_CFLAGS
Chris@40 8136 ])# _LT_LANG_RC_CONFIG
Chris@40 8137
Chris@40 8138
Chris@40 8139 # LT_PROG_GCJ
Chris@40 8140 # -----------
Chris@40 8141 AC_DEFUN([LT_PROG_GCJ],
Chris@40 8142 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
Chris@40 8143 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
Chris@40 8144 [AC_CHECK_TOOL(GCJ, gcj,)
Chris@40 8145 test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
Chris@40 8146 AC_SUBST(GCJFLAGS)])])[]dnl
Chris@40 8147 ])
Chris@40 8148
Chris@40 8149 # Old name:
Chris@40 8150 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
Chris@40 8151 dnl aclocal-1.4 backwards compatibility:
Chris@40 8152 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
Chris@40 8153
Chris@40 8154
Chris@40 8155 # LT_PROG_GO
Chris@40 8156 # ----------
Chris@40 8157 AC_DEFUN([LT_PROG_GO],
Chris@40 8158 [AC_CHECK_TOOL(GOC, gccgo,)
Chris@40 8159 ])
Chris@40 8160
Chris@40 8161
Chris@40 8162 # LT_PROG_RC
Chris@40 8163 # ----------
Chris@40 8164 AC_DEFUN([LT_PROG_RC],
Chris@40 8165 [AC_CHECK_TOOL(RC, windres,)
Chris@40 8166 ])
Chris@40 8167
Chris@40 8168 # Old name:
Chris@40 8169 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
Chris@40 8170 dnl aclocal-1.4 backwards compatibility:
Chris@40 8171 dnl AC_DEFUN([LT_AC_PROG_RC], [])
Chris@40 8172
Chris@40 8173
Chris@40 8174 # _LT_DECL_EGREP
Chris@40 8175 # --------------
Chris@40 8176 # If we don't have a new enough Autoconf to choose the best grep
Chris@40 8177 # available, choose the one first in the user's PATH.
Chris@40 8178 m4_defun([_LT_DECL_EGREP],
Chris@40 8179 [AC_REQUIRE([AC_PROG_EGREP])dnl
Chris@40 8180 AC_REQUIRE([AC_PROG_FGREP])dnl
Chris@40 8181 test -z "$GREP" && GREP=grep
Chris@40 8182 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
Chris@40 8183 _LT_DECL([], [EGREP], [1], [An ERE matcher])
Chris@40 8184 _LT_DECL([], [FGREP], [1], [A literal string matcher])
Chris@40 8185 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
Chris@40 8186 AC_SUBST([GREP])
Chris@40 8187 ])
Chris@40 8188
Chris@40 8189
Chris@40 8190 # _LT_DECL_OBJDUMP
Chris@40 8191 # --------------
Chris@40 8192 # If we don't have a new enough Autoconf to choose the best objdump
Chris@40 8193 # available, choose the one first in the user's PATH.
Chris@40 8194 m4_defun([_LT_DECL_OBJDUMP],
Chris@40 8195 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
Chris@40 8196 test -z "$OBJDUMP" && OBJDUMP=objdump
Chris@40 8197 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
Chris@40 8198 AC_SUBST([OBJDUMP])
Chris@40 8199 ])
Chris@40 8200
Chris@40 8201 # _LT_DECL_DLLTOOL
Chris@40 8202 # ----------------
Chris@40 8203 # Ensure DLLTOOL variable is set.
Chris@40 8204 m4_defun([_LT_DECL_DLLTOOL],
Chris@40 8205 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
Chris@40 8206 test -z "$DLLTOOL" && DLLTOOL=dlltool
Chris@40 8207 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
Chris@40 8208 AC_SUBST([DLLTOOL])
Chris@40 8209 ])
Chris@40 8210
Chris@40 8211 # _LT_DECL_SED
Chris@40 8212 # ------------
Chris@40 8213 # Check for a fully-functional sed program, that truncates
Chris@40 8214 # as few characters as possible. Prefer GNU sed if found.
Chris@40 8215 m4_defun([_LT_DECL_SED],
Chris@40 8216 [AC_PROG_SED
Chris@40 8217 test -z "$SED" && SED=sed
Chris@40 8218 Xsed="$SED -e 1s/^X//"
Chris@40 8219 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
Chris@40 8220 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
Chris@40 8221 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
Chris@40 8222 ])# _LT_DECL_SED
Chris@40 8223
Chris@40 8224 m4_ifndef([AC_PROG_SED], [
Chris@40 8225 ############################################################
Chris@40 8226 # NOTE: This macro has been submitted for inclusion into #
Chris@40 8227 # GNU Autoconf as AC_PROG_SED. When it is available in #
Chris@40 8228 # a released version of Autoconf we should remove this #
Chris@40 8229 # macro and use it instead. #
Chris@40 8230 ############################################################
Chris@40 8231
Chris@40 8232 m4_defun([AC_PROG_SED],
Chris@40 8233 [AC_MSG_CHECKING([for a sed that does not truncate output])
Chris@40 8234 AC_CACHE_VAL(lt_cv_path_SED,
Chris@40 8235 [# Loop through the user's path and test for sed and gsed.
Chris@40 8236 # Then use that list of sed's as ones to test for truncation.
Chris@40 8237 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Chris@40 8238 for as_dir in $PATH
Chris@40 8239 do
Chris@40 8240 IFS=$as_save_IFS
Chris@40 8241 test -z "$as_dir" && as_dir=.
Chris@40 8242 for lt_ac_prog in sed gsed; do
Chris@40 8243 for ac_exec_ext in '' $ac_executable_extensions; do
Chris@40 8244 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
Chris@40 8245 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
Chris@40 8246 fi
Chris@40 8247 done
Chris@40 8248 done
Chris@40 8249 done
Chris@40 8250 IFS=$as_save_IFS
Chris@40 8251 lt_ac_max=0
Chris@40 8252 lt_ac_count=0
Chris@40 8253 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
Chris@40 8254 # along with /bin/sed that truncates output.
Chris@40 8255 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
Chris@40 8256 test ! -f "$lt_ac_sed" && continue
Chris@40 8257 cat /dev/null > conftest.in
Chris@40 8258 lt_ac_count=0
Chris@40 8259 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
Chris@40 8260 # Check for GNU sed and select it if it is found.
Chris@40 8261 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
Chris@40 8262 lt_cv_path_SED=$lt_ac_sed
Chris@40 8263 break
Chris@40 8264 fi
Chris@40 8265 while true; do
Chris@40 8266 cat conftest.in conftest.in >conftest.tmp
Chris@40 8267 mv conftest.tmp conftest.in
Chris@40 8268 cp conftest.in conftest.nl
Chris@40 8269 echo >>conftest.nl
Chris@40 8270 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
Chris@40 8271 cmp -s conftest.out conftest.nl || break
Chris@40 8272 # 10000 chars as input seems more than enough
Chris@40 8273 test 10 -lt "$lt_ac_count" && break
Chris@40 8274 lt_ac_count=`expr $lt_ac_count + 1`
Chris@40 8275 if test "$lt_ac_count" -gt "$lt_ac_max"; then
Chris@40 8276 lt_ac_max=$lt_ac_count
Chris@40 8277 lt_cv_path_SED=$lt_ac_sed
Chris@40 8278 fi
Chris@40 8279 done
Chris@40 8280 done
Chris@40 8281 ])
Chris@40 8282 SED=$lt_cv_path_SED
Chris@40 8283 AC_SUBST([SED])
Chris@40 8284 AC_MSG_RESULT([$SED])
Chris@40 8285 ])#AC_PROG_SED
Chris@40 8286 ])#m4_ifndef
Chris@40 8287
Chris@40 8288 # Old name:
Chris@40 8289 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
Chris@40 8290 dnl aclocal-1.4 backwards compatibility:
Chris@40 8291 dnl AC_DEFUN([LT_AC_PROG_SED], [])
Chris@40 8292
Chris@40 8293
Chris@40 8294 # _LT_CHECK_SHELL_FEATURES
Chris@40 8295 # ------------------------
Chris@40 8296 # Find out whether the shell is Bourne or XSI compatible,
Chris@40 8297 # or has some other useful features.
Chris@40 8298 m4_defun([_LT_CHECK_SHELL_FEATURES],
Chris@40 8299 [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
Chris@40 8300 lt_unset=unset
Chris@40 8301 else
Chris@40 8302 lt_unset=false
Chris@40 8303 fi
Chris@40 8304 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
Chris@40 8305
Chris@40 8306 # test EBCDIC or ASCII
Chris@40 8307 case `echo X|tr X '\101'` in
Chris@40 8308 A) # ASCII based system
Chris@40 8309 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
Chris@40 8310 lt_SP2NL='tr \040 \012'
Chris@40 8311 lt_NL2SP='tr \015\012 \040\040'
Chris@40 8312 ;;
Chris@40 8313 *) # EBCDIC based system
Chris@40 8314 lt_SP2NL='tr \100 \n'
Chris@40 8315 lt_NL2SP='tr \r\n \100\100'
Chris@40 8316 ;;
Chris@40 8317 esac
Chris@40 8318 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
Chris@40 8319 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
Chris@40 8320 ])# _LT_CHECK_SHELL_FEATURES
Chris@40 8321
Chris@40 8322
Chris@40 8323 # _LT_PATH_CONVERSION_FUNCTIONS
Chris@40 8324 # -----------------------------
Chris@40 8325 # Determine what file name conversion functions should be used by
Chris@40 8326 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
Chris@40 8327 # for certain cross-compile configurations and native mingw.
Chris@40 8328 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
Chris@40 8329 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@40 8330 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
Chris@40 8331 AC_MSG_CHECKING([how to convert $build file names to $host format])
Chris@40 8332 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
Chris@40 8333 [case $host in
Chris@40 8334 *-*-mingw* )
Chris@40 8335 case $build in
Chris@40 8336 *-*-mingw* ) # actually msys
Chris@40 8337 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
Chris@40 8338 ;;
Chris@40 8339 *-*-cygwin* )
Chris@40 8340 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
Chris@40 8341 ;;
Chris@40 8342 * ) # otherwise, assume *nix
Chris@40 8343 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
Chris@40 8344 ;;
Chris@40 8345 esac
Chris@40 8346 ;;
Chris@40 8347 *-*-cygwin* )
Chris@40 8348 case $build in
Chris@40 8349 *-*-mingw* ) # actually msys
Chris@40 8350 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
Chris@40 8351 ;;
Chris@40 8352 *-*-cygwin* )
Chris@40 8353 lt_cv_to_host_file_cmd=func_convert_file_noop
Chris@40 8354 ;;
Chris@40 8355 * ) # otherwise, assume *nix
Chris@40 8356 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
Chris@40 8357 ;;
Chris@40 8358 esac
Chris@40 8359 ;;
Chris@40 8360 * ) # unhandled hosts (and "normal" native builds)
Chris@40 8361 lt_cv_to_host_file_cmd=func_convert_file_noop
Chris@40 8362 ;;
Chris@40 8363 esac
Chris@40 8364 ])
Chris@40 8365 to_host_file_cmd=$lt_cv_to_host_file_cmd
Chris@40 8366 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
Chris@40 8367 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
Chris@40 8368 [0], [convert $build file names to $host format])dnl
Chris@40 8369
Chris@40 8370 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
Chris@40 8371 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
Chris@40 8372 [#assume ordinary cross tools, or native build.
Chris@40 8373 lt_cv_to_tool_file_cmd=func_convert_file_noop
Chris@40 8374 case $host in
Chris@40 8375 *-*-mingw* )
Chris@40 8376 case $build in
Chris@40 8377 *-*-mingw* ) # actually msys
Chris@40 8378 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
Chris@40 8379 ;;
Chris@40 8380 esac
Chris@40 8381 ;;
Chris@40 8382 esac
Chris@40 8383 ])
Chris@40 8384 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
Chris@40 8385 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
Chris@40 8386 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
Chris@40 8387 [0], [convert $build files to toolchain format])dnl
Chris@40 8388 ])# _LT_PATH_CONVERSION_FUNCTIONS