annotate src/fftw-3.3.8/m4/libtool.m4 @ 84:08ae793730bd

Add null config files
author Chris Cannam
date Mon, 02 Mar 2020 14:03:47 +0000
parents d0c2a83c1364
children
rev   line source
Chris@82 1 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
Chris@82 2 #
Chris@82 3 # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
Chris@82 4 # Written by Gordon Matzigkeit, 1996
Chris@82 5 #
Chris@82 6 # This file is free software; the Free Software Foundation gives
Chris@82 7 # unlimited permission to copy and/or distribute it, with or without
Chris@82 8 # modifications, as long as this notice is preserved.
Chris@82 9
Chris@82 10 m4_define([_LT_COPYING], [dnl
Chris@82 11 # Copyright (C) 2014 Free Software Foundation, Inc.
Chris@82 12 # This is free software; see the source for copying conditions. There is NO
Chris@82 13 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Chris@82 14
Chris@82 15 # GNU Libtool is free software; you can redistribute it and/or modify
Chris@82 16 # it under the terms of the GNU General Public License as published by
Chris@82 17 # the Free Software Foundation; either version 2 of of the License, or
Chris@82 18 # (at your option) any later version.
Chris@82 19 #
Chris@82 20 # As a special exception to the GNU General Public License, if you
Chris@82 21 # distribute this file as part of a program or library that is built
Chris@82 22 # using GNU Libtool, you may include this file under the same
Chris@82 23 # distribution terms that you use for the rest of that program.
Chris@82 24 #
Chris@82 25 # GNU Libtool is distributed in the hope that it will be useful, but
Chris@82 26 # WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@82 27 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@82 28 # GNU General Public License for more details.
Chris@82 29 #
Chris@82 30 # You should have received a copy of the GNU General Public License
Chris@82 31 # along with this program. If not, see <http://www.gnu.org/licenses/>.
Chris@82 32 ])
Chris@82 33
Chris@82 34 # serial 58 LT_INIT
Chris@82 35
Chris@82 36
Chris@82 37 # LT_PREREQ(VERSION)
Chris@82 38 # ------------------
Chris@82 39 # Complain and exit if this libtool version is less that VERSION.
Chris@82 40 m4_defun([LT_PREREQ],
Chris@82 41 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
Chris@82 42 [m4_default([$3],
Chris@82 43 [m4_fatal([Libtool version $1 or higher is required],
Chris@82 44 63)])],
Chris@82 45 [$2])])
Chris@82 46
Chris@82 47
Chris@82 48 # _LT_CHECK_BUILDDIR
Chris@82 49 # ------------------
Chris@82 50 # Complain if the absolute build directory name contains unusual characters
Chris@82 51 m4_defun([_LT_CHECK_BUILDDIR],
Chris@82 52 [case `pwd` in
Chris@82 53 *\ * | *\ *)
Chris@82 54 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
Chris@82 55 esac
Chris@82 56 ])
Chris@82 57
Chris@82 58
Chris@82 59 # LT_INIT([OPTIONS])
Chris@82 60 # ------------------
Chris@82 61 AC_DEFUN([LT_INIT],
Chris@82 62 [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
Chris@82 63 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
Chris@82 64 AC_BEFORE([$0], [LT_LANG])dnl
Chris@82 65 AC_BEFORE([$0], [LT_OUTPUT])dnl
Chris@82 66 AC_BEFORE([$0], [LTDL_INIT])dnl
Chris@82 67 m4_require([_LT_CHECK_BUILDDIR])dnl
Chris@82 68
Chris@82 69 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
Chris@82 70 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
Chris@82 71 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
Chris@82 72 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
Chris@82 73 dnl unless we require an AC_DEFUNed macro:
Chris@82 74 AC_REQUIRE([LTOPTIONS_VERSION])dnl
Chris@82 75 AC_REQUIRE([LTSUGAR_VERSION])dnl
Chris@82 76 AC_REQUIRE([LTVERSION_VERSION])dnl
Chris@82 77 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
Chris@82 78 m4_require([_LT_PROG_LTMAIN])dnl
Chris@82 79
Chris@82 80 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
Chris@82 81
Chris@82 82 dnl Parse OPTIONS
Chris@82 83 _LT_SET_OPTIONS([$0], [$1])
Chris@82 84
Chris@82 85 # This can be used to rebuild libtool when needed
Chris@82 86 LIBTOOL_DEPS=$ltmain
Chris@82 87
Chris@82 88 # Always use our own libtool.
Chris@82 89 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
Chris@82 90 AC_SUBST(LIBTOOL)dnl
Chris@82 91
Chris@82 92 _LT_SETUP
Chris@82 93
Chris@82 94 # Only expand once:
Chris@82 95 m4_define([LT_INIT])
Chris@82 96 ])# LT_INIT
Chris@82 97
Chris@82 98 # Old names:
Chris@82 99 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
Chris@82 100 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
Chris@82 101 dnl aclocal-1.4 backwards compatibility:
Chris@82 102 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
Chris@82 103 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
Chris@82 104
Chris@82 105
Chris@82 106 # _LT_PREPARE_CC_BASENAME
Chris@82 107 # -----------------------
Chris@82 108 m4_defun([_LT_PREPARE_CC_BASENAME], [
Chris@82 109 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
Chris@82 110 func_cc_basename ()
Chris@82 111 {
Chris@82 112 for cc_temp in @S|@*""; do
Chris@82 113 case $cc_temp in
Chris@82 114 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
Chris@82 115 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
Chris@82 116 \-*) ;;
Chris@82 117 *) break;;
Chris@82 118 esac
Chris@82 119 done
Chris@82 120 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
Chris@82 121 }
Chris@82 122 ])# _LT_PREPARE_CC_BASENAME
Chris@82 123
Chris@82 124
Chris@82 125 # _LT_CC_BASENAME(CC)
Chris@82 126 # -------------------
Chris@82 127 # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
Chris@82 128 # but that macro is also expanded into generated libtool script, which
Chris@82 129 # arranges for $SED and $ECHO to be set by different means.
Chris@82 130 m4_defun([_LT_CC_BASENAME],
Chris@82 131 [m4_require([_LT_PREPARE_CC_BASENAME])dnl
Chris@82 132 AC_REQUIRE([_LT_DECL_SED])dnl
Chris@82 133 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
Chris@82 134 func_cc_basename $1
Chris@82 135 cc_basename=$func_cc_basename_result
Chris@82 136 ])
Chris@82 137
Chris@82 138
Chris@82 139 # _LT_FILEUTILS_DEFAULTS
Chris@82 140 # ----------------------
Chris@82 141 # It is okay to use these file commands and assume they have been set
Chris@82 142 # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
Chris@82 143 m4_defun([_LT_FILEUTILS_DEFAULTS],
Chris@82 144 [: ${CP="cp -f"}
Chris@82 145 : ${MV="mv -f"}
Chris@82 146 : ${RM="rm -f"}
Chris@82 147 ])# _LT_FILEUTILS_DEFAULTS
Chris@82 148
Chris@82 149
Chris@82 150 # _LT_SETUP
Chris@82 151 # ---------
Chris@82 152 m4_defun([_LT_SETUP],
Chris@82 153 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@82 154 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
Chris@82 155 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
Chris@82 156 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
Chris@82 157
Chris@82 158 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
Chris@82 159 dnl
Chris@82 160 _LT_DECL([], [host_alias], [0], [The host system])dnl
Chris@82 161 _LT_DECL([], [host], [0])dnl
Chris@82 162 _LT_DECL([], [host_os], [0])dnl
Chris@82 163 dnl
Chris@82 164 _LT_DECL([], [build_alias], [0], [The build system])dnl
Chris@82 165 _LT_DECL([], [build], [0])dnl
Chris@82 166 _LT_DECL([], [build_os], [0])dnl
Chris@82 167 dnl
Chris@82 168 AC_REQUIRE([AC_PROG_CC])dnl
Chris@82 169 AC_REQUIRE([LT_PATH_LD])dnl
Chris@82 170 AC_REQUIRE([LT_PATH_NM])dnl
Chris@82 171 dnl
Chris@82 172 AC_REQUIRE([AC_PROG_LN_S])dnl
Chris@82 173 test -z "$LN_S" && LN_S="ln -s"
Chris@82 174 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
Chris@82 175 dnl
Chris@82 176 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
Chris@82 177 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
Chris@82 178 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
Chris@82 179 dnl
Chris@82 180 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@82 181 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
Chris@82 182 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
Chris@82 183 m4_require([_LT_CMD_RELOAD])dnl
Chris@82 184 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
Chris@82 185 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
Chris@82 186 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
Chris@82 187 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
Chris@82 188 m4_require([_LT_WITH_SYSROOT])dnl
Chris@82 189 m4_require([_LT_CMD_TRUNCATE])dnl
Chris@82 190
Chris@82 191 _LT_CONFIG_LIBTOOL_INIT([
Chris@82 192 # See if we are running on zsh, and set the options that allow our
Chris@82 193 # commands through without removal of \ escapes INIT.
Chris@82 194 if test -n "\${ZSH_VERSION+set}"; then
Chris@82 195 setopt NO_GLOB_SUBST
Chris@82 196 fi
Chris@82 197 ])
Chris@82 198 if test -n "${ZSH_VERSION+set}"; then
Chris@82 199 setopt NO_GLOB_SUBST
Chris@82 200 fi
Chris@82 201
Chris@82 202 _LT_CHECK_OBJDIR
Chris@82 203
Chris@82 204 m4_require([_LT_TAG_COMPILER])dnl
Chris@82 205
Chris@82 206 case $host_os in
Chris@82 207 aix3*)
Chris@82 208 # AIX sometimes has problems with the GCC collect2 program. For some
Chris@82 209 # reason, if we set the COLLECT_NAMES environment variable, the problems
Chris@82 210 # vanish in a puff of smoke.
Chris@82 211 if test set != "${COLLECT_NAMES+set}"; then
Chris@82 212 COLLECT_NAMES=
Chris@82 213 export COLLECT_NAMES
Chris@82 214 fi
Chris@82 215 ;;
Chris@82 216 esac
Chris@82 217
Chris@82 218 # Global variables:
Chris@82 219 ofile=libtool
Chris@82 220 can_build_shared=yes
Chris@82 221
Chris@82 222 # All known linkers require a '.a' archive for static linking (except MSVC,
Chris@82 223 # which needs '.lib').
Chris@82 224 libext=a
Chris@82 225
Chris@82 226 with_gnu_ld=$lt_cv_prog_gnu_ld
Chris@82 227
Chris@82 228 old_CC=$CC
Chris@82 229 old_CFLAGS=$CFLAGS
Chris@82 230
Chris@82 231 # Set sane defaults for various variables
Chris@82 232 test -z "$CC" && CC=cc
Chris@82 233 test -z "$LTCC" && LTCC=$CC
Chris@82 234 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
Chris@82 235 test -z "$LD" && LD=ld
Chris@82 236 test -z "$ac_objext" && ac_objext=o
Chris@82 237
Chris@82 238 _LT_CC_BASENAME([$compiler])
Chris@82 239
Chris@82 240 # Only perform the check for file, if the check method requires it
Chris@82 241 test -z "$MAGIC_CMD" && MAGIC_CMD=file
Chris@82 242 case $deplibs_check_method in
Chris@82 243 file_magic*)
Chris@82 244 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
Chris@82 245 _LT_PATH_MAGIC
Chris@82 246 fi
Chris@82 247 ;;
Chris@82 248 esac
Chris@82 249
Chris@82 250 # Use C for the default configuration in the libtool script
Chris@82 251 LT_SUPPORTED_TAG([CC])
Chris@82 252 _LT_LANG_C_CONFIG
Chris@82 253 _LT_LANG_DEFAULT_CONFIG
Chris@82 254 _LT_CONFIG_COMMANDS
Chris@82 255 ])# _LT_SETUP
Chris@82 256
Chris@82 257
Chris@82 258 # _LT_PREPARE_SED_QUOTE_VARS
Chris@82 259 # --------------------------
Chris@82 260 # Define a few sed substitution that help us do robust quoting.
Chris@82 261 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
Chris@82 262 [# Backslashify metacharacters that are still active within
Chris@82 263 # double-quoted strings.
Chris@82 264 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
Chris@82 265
Chris@82 266 # Same as above, but do not quote variable references.
Chris@82 267 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
Chris@82 268
Chris@82 269 # Sed substitution to delay expansion of an escaped shell variable in a
Chris@82 270 # double_quote_subst'ed string.
Chris@82 271 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
Chris@82 272
Chris@82 273 # Sed substitution to delay expansion of an escaped single quote.
Chris@82 274 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
Chris@82 275
Chris@82 276 # Sed substitution to avoid accidental globbing in evaled expressions
Chris@82 277 no_glob_subst='s/\*/\\\*/g'
Chris@82 278 ])
Chris@82 279
Chris@82 280 # _LT_PROG_LTMAIN
Chris@82 281 # ---------------
Chris@82 282 # Note that this code is called both from 'configure', and 'config.status'
Chris@82 283 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
Chris@82 284 # 'config.status' has no value for ac_aux_dir unless we are using Automake,
Chris@82 285 # so we pass a copy along to make sure it has a sensible value anyway.
Chris@82 286 m4_defun([_LT_PROG_LTMAIN],
Chris@82 287 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
Chris@82 288 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
Chris@82 289 ltmain=$ac_aux_dir/ltmain.sh
Chris@82 290 ])# _LT_PROG_LTMAIN
Chris@82 291
Chris@82 292
Chris@82 293 ## ------------------------------------- ##
Chris@82 294 ## Accumulate code for creating libtool. ##
Chris@82 295 ## ------------------------------------- ##
Chris@82 296
Chris@82 297 # So that we can recreate a full libtool script including additional
Chris@82 298 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
Chris@82 299 # in macros and then make a single call at the end using the 'libtool'
Chris@82 300 # label.
Chris@82 301
Chris@82 302
Chris@82 303 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
Chris@82 304 # ----------------------------------------
Chris@82 305 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
Chris@82 306 m4_define([_LT_CONFIG_LIBTOOL_INIT],
Chris@82 307 [m4_ifval([$1],
Chris@82 308 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
Chris@82 309 [$1
Chris@82 310 ])])])
Chris@82 311
Chris@82 312 # Initialize.
Chris@82 313 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
Chris@82 314
Chris@82 315
Chris@82 316 # _LT_CONFIG_LIBTOOL([COMMANDS])
Chris@82 317 # ------------------------------
Chris@82 318 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
Chris@82 319 m4_define([_LT_CONFIG_LIBTOOL],
Chris@82 320 [m4_ifval([$1],
Chris@82 321 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
Chris@82 322 [$1
Chris@82 323 ])])])
Chris@82 324
Chris@82 325 # Initialize.
Chris@82 326 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
Chris@82 327
Chris@82 328
Chris@82 329 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
Chris@82 330 # -----------------------------------------------------
Chris@82 331 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
Chris@82 332 [_LT_CONFIG_LIBTOOL([$1])
Chris@82 333 _LT_CONFIG_LIBTOOL_INIT([$2])
Chris@82 334 ])
Chris@82 335
Chris@82 336
Chris@82 337 # _LT_FORMAT_COMMENT([COMMENT])
Chris@82 338 # -----------------------------
Chris@82 339 # Add leading comment marks to the start of each line, and a trailing
Chris@82 340 # full-stop to the whole comment if one is not present already.
Chris@82 341 m4_define([_LT_FORMAT_COMMENT],
Chris@82 342 [m4_ifval([$1], [
Chris@82 343 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
Chris@82 344 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
Chris@82 345 )])
Chris@82 346
Chris@82 347
Chris@82 348
Chris@82 349 ## ------------------------ ##
Chris@82 350 ## FIXME: Eliminate VARNAME ##
Chris@82 351 ## ------------------------ ##
Chris@82 352
Chris@82 353
Chris@82 354 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
Chris@82 355 # -------------------------------------------------------------------
Chris@82 356 # CONFIGNAME is the name given to the value in the libtool script.
Chris@82 357 # VARNAME is the (base) name used in the configure script.
Chris@82 358 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
Chris@82 359 # VARNAME. Any other value will be used directly.
Chris@82 360 m4_define([_LT_DECL],
Chris@82 361 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
Chris@82 362 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
Chris@82 363 [m4_ifval([$1], [$1], [$2])])
Chris@82 364 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
Chris@82 365 m4_ifval([$4],
Chris@82 366 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
Chris@82 367 lt_dict_add_subkey([lt_decl_dict], [$2],
Chris@82 368 [tagged?], [m4_ifval([$5], [yes], [no])])])
Chris@82 369 ])
Chris@82 370
Chris@82 371
Chris@82 372 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
Chris@82 373 # --------------------------------------------------------
Chris@82 374 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
Chris@82 375
Chris@82 376
Chris@82 377 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
Chris@82 378 # ------------------------------------------------
Chris@82 379 m4_define([lt_decl_tag_varnames],
Chris@82 380 [_lt_decl_filter([tagged?], [yes], $@)])
Chris@82 381
Chris@82 382
Chris@82 383 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
Chris@82 384 # ---------------------------------------------------------
Chris@82 385 m4_define([_lt_decl_filter],
Chris@82 386 [m4_case([$#],
Chris@82 387 [0], [m4_fatal([$0: too few arguments: $#])],
Chris@82 388 [1], [m4_fatal([$0: too few arguments: $#: $1])],
Chris@82 389 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
Chris@82 390 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
Chris@82 391 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
Chris@82 392 ])
Chris@82 393
Chris@82 394
Chris@82 395 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
Chris@82 396 # --------------------------------------------------
Chris@82 397 m4_define([lt_decl_quote_varnames],
Chris@82 398 [_lt_decl_filter([value], [1], $@)])
Chris@82 399
Chris@82 400
Chris@82 401 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
Chris@82 402 # ---------------------------------------------------
Chris@82 403 m4_define([lt_decl_dquote_varnames],
Chris@82 404 [_lt_decl_filter([value], [2], $@)])
Chris@82 405
Chris@82 406
Chris@82 407 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
Chris@82 408 # ---------------------------------------------------
Chris@82 409 m4_define([lt_decl_varnames_tagged],
Chris@82 410 [m4_assert([$# <= 2])dnl
Chris@82 411 _$0(m4_quote(m4_default([$1], [[, ]])),
Chris@82 412 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
Chris@82 413 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
Chris@82 414 m4_define([_lt_decl_varnames_tagged],
Chris@82 415 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
Chris@82 416
Chris@82 417
Chris@82 418 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
Chris@82 419 # ------------------------------------------------
Chris@82 420 m4_define([lt_decl_all_varnames],
Chris@82 421 [_$0(m4_quote(m4_default([$1], [[, ]])),
Chris@82 422 m4_if([$2], [],
Chris@82 423 m4_quote(lt_decl_varnames),
Chris@82 424 m4_quote(m4_shift($@))))[]dnl
Chris@82 425 ])
Chris@82 426 m4_define([_lt_decl_all_varnames],
Chris@82 427 [lt_join($@, lt_decl_varnames_tagged([$1],
Chris@82 428 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
Chris@82 429 ])
Chris@82 430
Chris@82 431
Chris@82 432 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
Chris@82 433 # ------------------------------------
Chris@82 434 # Quote a variable value, and forward it to 'config.status' so that its
Chris@82 435 # declaration there will have the same value as in 'configure'. VARNAME
Chris@82 436 # must have a single quote delimited value for this to work.
Chris@82 437 m4_define([_LT_CONFIG_STATUS_DECLARE],
Chris@82 438 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
Chris@82 439
Chris@82 440
Chris@82 441 # _LT_CONFIG_STATUS_DECLARATIONS
Chris@82 442 # ------------------------------
Chris@82 443 # We delimit libtool config variables with single quotes, so when
Chris@82 444 # we write them to config.status, we have to be sure to quote all
Chris@82 445 # embedded single quotes properly. In configure, this macro expands
Chris@82 446 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
Chris@82 447 #
Chris@82 448 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
Chris@82 449 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
Chris@82 450 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
Chris@82 451 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
Chris@82 452
Chris@82 453
Chris@82 454 # _LT_LIBTOOL_TAGS
Chris@82 455 # ----------------
Chris@82 456 # Output comment and list of tags supported by the script
Chris@82 457 m4_defun([_LT_LIBTOOL_TAGS],
Chris@82 458 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
Chris@82 459 available_tags='_LT_TAGS'dnl
Chris@82 460 ])
Chris@82 461
Chris@82 462
Chris@82 463 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
Chris@82 464 # -----------------------------------
Chris@82 465 # Extract the dictionary values for VARNAME (optionally with TAG) and
Chris@82 466 # expand to a commented shell variable setting:
Chris@82 467 #
Chris@82 468 # # Some comment about what VAR is for.
Chris@82 469 # visible_name=$lt_internal_name
Chris@82 470 m4_define([_LT_LIBTOOL_DECLARE],
Chris@82 471 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
Chris@82 472 [description])))[]dnl
Chris@82 473 m4_pushdef([_libtool_name],
Chris@82 474 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
Chris@82 475 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
Chris@82 476 [0], [_libtool_name=[$]$1],
Chris@82 477 [1], [_libtool_name=$lt_[]$1],
Chris@82 478 [2], [_libtool_name=$lt_[]$1],
Chris@82 479 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
Chris@82 480 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
Chris@82 481 ])
Chris@82 482
Chris@82 483
Chris@82 484 # _LT_LIBTOOL_CONFIG_VARS
Chris@82 485 # -----------------------
Chris@82 486 # Produce commented declarations of non-tagged libtool config variables
Chris@82 487 # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
Chris@82 488 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
Chris@82 489 # section) are produced by _LT_LIBTOOL_TAG_VARS.
Chris@82 490 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
Chris@82 491 [m4_foreach([_lt_var],
Chris@82 492 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
Chris@82 493 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
Chris@82 494
Chris@82 495
Chris@82 496 # _LT_LIBTOOL_TAG_VARS(TAG)
Chris@82 497 # -------------------------
Chris@82 498 m4_define([_LT_LIBTOOL_TAG_VARS],
Chris@82 499 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
Chris@82 500 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
Chris@82 501
Chris@82 502
Chris@82 503 # _LT_TAGVAR(VARNAME, [TAGNAME])
Chris@82 504 # ------------------------------
Chris@82 505 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
Chris@82 506
Chris@82 507
Chris@82 508 # _LT_CONFIG_COMMANDS
Chris@82 509 # -------------------
Chris@82 510 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
Chris@82 511 # variables for single and double quote escaping we saved from calls
Chris@82 512 # to _LT_DECL, we can put quote escaped variables declarations
Chris@82 513 # into 'config.status', and then the shell code to quote escape them in
Chris@82 514 # for loops in 'config.status'. Finally, any additional code accumulated
Chris@82 515 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
Chris@82 516 m4_defun([_LT_CONFIG_COMMANDS],
Chris@82 517 [AC_PROVIDE_IFELSE([LT_OUTPUT],
Chris@82 518 dnl If the libtool generation code has been placed in $CONFIG_LT,
Chris@82 519 dnl instead of duplicating it all over again into config.status,
Chris@82 520 dnl then we will have config.status run $CONFIG_LT later, so it
Chris@82 521 dnl needs to know what name is stored there:
Chris@82 522 [AC_CONFIG_COMMANDS([libtool],
Chris@82 523 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
Chris@82 524 dnl If the libtool generation code is destined for config.status,
Chris@82 525 dnl expand the accumulated commands and init code now:
Chris@82 526 [AC_CONFIG_COMMANDS([libtool],
Chris@82 527 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
Chris@82 528 ])#_LT_CONFIG_COMMANDS
Chris@82 529
Chris@82 530
Chris@82 531 # Initialize.
Chris@82 532 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
Chris@82 533 [
Chris@82 534
Chris@82 535 # The HP-UX ksh and POSIX shell print the target directory to stdout
Chris@82 536 # if CDPATH is set.
Chris@82 537 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
Chris@82 538
Chris@82 539 sed_quote_subst='$sed_quote_subst'
Chris@82 540 double_quote_subst='$double_quote_subst'
Chris@82 541 delay_variable_subst='$delay_variable_subst'
Chris@82 542 _LT_CONFIG_STATUS_DECLARATIONS
Chris@82 543 LTCC='$LTCC'
Chris@82 544 LTCFLAGS='$LTCFLAGS'
Chris@82 545 compiler='$compiler_DEFAULT'
Chris@82 546
Chris@82 547 # A function that is used when there is no print builtin or printf.
Chris@82 548 func_fallback_echo ()
Chris@82 549 {
Chris@82 550 eval 'cat <<_LTECHO_EOF
Chris@82 551 \$[]1
Chris@82 552 _LTECHO_EOF'
Chris@82 553 }
Chris@82 554
Chris@82 555 # Quote evaled strings.
Chris@82 556 for var in lt_decl_all_varnames([[ \
Chris@82 557 ]], lt_decl_quote_varnames); do
Chris@82 558 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
Chris@82 559 *[[\\\\\\\`\\"\\\$]]*)
Chris@82 560 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
Chris@82 561 ;;
Chris@82 562 *)
Chris@82 563 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
Chris@82 564 ;;
Chris@82 565 esac
Chris@82 566 done
Chris@82 567
Chris@82 568 # Double-quote double-evaled strings.
Chris@82 569 for var in lt_decl_all_varnames([[ \
Chris@82 570 ]], lt_decl_dquote_varnames); do
Chris@82 571 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
Chris@82 572 *[[\\\\\\\`\\"\\\$]]*)
Chris@82 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@82 574 ;;
Chris@82 575 *)
Chris@82 576 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
Chris@82 577 ;;
Chris@82 578 esac
Chris@82 579 done
Chris@82 580
Chris@82 581 _LT_OUTPUT_LIBTOOL_INIT
Chris@82 582 ])
Chris@82 583
Chris@82 584 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
Chris@82 585 # ------------------------------------
Chris@82 586 # Generate a child script FILE with all initialization necessary to
Chris@82 587 # reuse the environment learned by the parent script, and make the
Chris@82 588 # file executable. If COMMENT is supplied, it is inserted after the
Chris@82 589 # '#!' sequence but before initialization text begins. After this
Chris@82 590 # macro, additional text can be appended to FILE to form the body of
Chris@82 591 # the child script. The macro ends with non-zero status if the
Chris@82 592 # file could not be fully written (such as if the disk is full).
Chris@82 593 m4_ifdef([AS_INIT_GENERATED],
Chris@82 594 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
Chris@82 595 [m4_defun([_LT_GENERATED_FILE_INIT],
Chris@82 596 [m4_require([AS_PREPARE])]dnl
Chris@82 597 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
Chris@82 598 [lt_write_fail=0
Chris@82 599 cat >$1 <<_ASEOF || lt_write_fail=1
Chris@82 600 #! $SHELL
Chris@82 601 # Generated by $as_me.
Chris@82 602 $2
Chris@82 603 SHELL=\${CONFIG_SHELL-$SHELL}
Chris@82 604 export SHELL
Chris@82 605 _ASEOF
Chris@82 606 cat >>$1 <<\_ASEOF || lt_write_fail=1
Chris@82 607 AS_SHELL_SANITIZE
Chris@82 608 _AS_PREPARE
Chris@82 609 exec AS_MESSAGE_FD>&1
Chris@82 610 _ASEOF
Chris@82 611 test 0 = "$lt_write_fail" && chmod +x $1[]dnl
Chris@82 612 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
Chris@82 613
Chris@82 614 # LT_OUTPUT
Chris@82 615 # ---------
Chris@82 616 # This macro allows early generation of the libtool script (before
Chris@82 617 # AC_OUTPUT is called), incase it is used in configure for compilation
Chris@82 618 # tests.
Chris@82 619 AC_DEFUN([LT_OUTPUT],
Chris@82 620 [: ${CONFIG_LT=./config.lt}
Chris@82 621 AC_MSG_NOTICE([creating $CONFIG_LT])
Chris@82 622 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
Chris@82 623 [# Run this file to recreate a libtool stub with the current configuration.])
Chris@82 624
Chris@82 625 cat >>"$CONFIG_LT" <<\_LTEOF
Chris@82 626 lt_cl_silent=false
Chris@82 627 exec AS_MESSAGE_LOG_FD>>config.log
Chris@82 628 {
Chris@82 629 echo
Chris@82 630 AS_BOX([Running $as_me.])
Chris@82 631 } >&AS_MESSAGE_LOG_FD
Chris@82 632
Chris@82 633 lt_cl_help="\
Chris@82 634 '$as_me' creates a local libtool stub from the current configuration,
Chris@82 635 for use in further configure time tests before the real libtool is
Chris@82 636 generated.
Chris@82 637
Chris@82 638 Usage: $[0] [[OPTIONS]]
Chris@82 639
Chris@82 640 -h, --help print this help, then exit
Chris@82 641 -V, --version print version number, then exit
Chris@82 642 -q, --quiet do not print progress messages
Chris@82 643 -d, --debug don't remove temporary files
Chris@82 644
Chris@82 645 Report bugs to <bug-libtool@gnu.org>."
Chris@82 646
Chris@82 647 lt_cl_version="\
Chris@82 648 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
Chris@82 649 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
Chris@82 650 configured by $[0], generated by m4_PACKAGE_STRING.
Chris@82 651
Chris@82 652 Copyright (C) 2011 Free Software Foundation, Inc.
Chris@82 653 This config.lt script is free software; the Free Software Foundation
Chris@82 654 gives unlimited permision to copy, distribute and modify it."
Chris@82 655
Chris@82 656 while test 0 != $[#]
Chris@82 657 do
Chris@82 658 case $[1] in
Chris@82 659 --version | --v* | -V )
Chris@82 660 echo "$lt_cl_version"; exit 0 ;;
Chris@82 661 --help | --h* | -h )
Chris@82 662 echo "$lt_cl_help"; exit 0 ;;
Chris@82 663 --debug | --d* | -d )
Chris@82 664 debug=: ;;
Chris@82 665 --quiet | --q* | --silent | --s* | -q )
Chris@82 666 lt_cl_silent=: ;;
Chris@82 667
Chris@82 668 -*) AC_MSG_ERROR([unrecognized option: $[1]
Chris@82 669 Try '$[0] --help' for more information.]) ;;
Chris@82 670
Chris@82 671 *) AC_MSG_ERROR([unrecognized argument: $[1]
Chris@82 672 Try '$[0] --help' for more information.]) ;;
Chris@82 673 esac
Chris@82 674 shift
Chris@82 675 done
Chris@82 676
Chris@82 677 if $lt_cl_silent; then
Chris@82 678 exec AS_MESSAGE_FD>/dev/null
Chris@82 679 fi
Chris@82 680 _LTEOF
Chris@82 681
Chris@82 682 cat >>"$CONFIG_LT" <<_LTEOF
Chris@82 683 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
Chris@82 684 _LTEOF
Chris@82 685
Chris@82 686 cat >>"$CONFIG_LT" <<\_LTEOF
Chris@82 687 AC_MSG_NOTICE([creating $ofile])
Chris@82 688 _LT_OUTPUT_LIBTOOL_COMMANDS
Chris@82 689 AS_EXIT(0)
Chris@82 690 _LTEOF
Chris@82 691 chmod +x "$CONFIG_LT"
Chris@82 692
Chris@82 693 # configure is writing to config.log, but config.lt does its own redirection,
Chris@82 694 # appending to config.log, which fails on DOS, as config.log is still kept
Chris@82 695 # open by configure. Here we exec the FD to /dev/null, effectively closing
Chris@82 696 # config.log, so it can be properly (re)opened and appended to by config.lt.
Chris@82 697 lt_cl_success=:
Chris@82 698 test yes = "$silent" &&
Chris@82 699 lt_config_lt_args="$lt_config_lt_args --quiet"
Chris@82 700 exec AS_MESSAGE_LOG_FD>/dev/null
Chris@82 701 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
Chris@82 702 exec AS_MESSAGE_LOG_FD>>config.log
Chris@82 703 $lt_cl_success || AS_EXIT(1)
Chris@82 704 ])# LT_OUTPUT
Chris@82 705
Chris@82 706
Chris@82 707 # _LT_CONFIG(TAG)
Chris@82 708 # ---------------
Chris@82 709 # If TAG is the built-in tag, create an initial libtool script with a
Chris@82 710 # default configuration from the untagged config vars. Otherwise add code
Chris@82 711 # to config.status for appending the configuration named by TAG from the
Chris@82 712 # matching tagged config vars.
Chris@82 713 m4_defun([_LT_CONFIG],
Chris@82 714 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@82 715 _LT_CONFIG_SAVE_COMMANDS([
Chris@82 716 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
Chris@82 717 m4_if(_LT_TAG, [C], [
Chris@82 718 # See if we are running on zsh, and set the options that allow our
Chris@82 719 # commands through without removal of \ escapes.
Chris@82 720 if test -n "${ZSH_VERSION+set}"; then
Chris@82 721 setopt NO_GLOB_SUBST
Chris@82 722 fi
Chris@82 723
Chris@82 724 cfgfile=${ofile}T
Chris@82 725 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
Chris@82 726 $RM "$cfgfile"
Chris@82 727
Chris@82 728 cat <<_LT_EOF >> "$cfgfile"
Chris@82 729 #! $SHELL
Chris@82 730 # Generated automatically by $as_me ($PACKAGE) $VERSION
Chris@82 731 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
Chris@82 732
Chris@82 733 # Provide generalized library-building support services.
Chris@82 734 # Written by Gordon Matzigkeit, 1996
Chris@82 735
Chris@82 736 _LT_COPYING
Chris@82 737 _LT_LIBTOOL_TAGS
Chris@82 738
Chris@82 739 # Configured defaults for sys_lib_dlsearch_path munging.
Chris@82 740 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
Chris@82 741
Chris@82 742 # ### BEGIN LIBTOOL CONFIG
Chris@82 743 _LT_LIBTOOL_CONFIG_VARS
Chris@82 744 _LT_LIBTOOL_TAG_VARS
Chris@82 745 # ### END LIBTOOL CONFIG
Chris@82 746
Chris@82 747 _LT_EOF
Chris@82 748
Chris@82 749 cat <<'_LT_EOF' >> "$cfgfile"
Chris@82 750
Chris@82 751 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
Chris@82 752
Chris@82 753 _LT_PREPARE_MUNGE_PATH_LIST
Chris@82 754 _LT_PREPARE_CC_BASENAME
Chris@82 755
Chris@82 756 # ### END FUNCTIONS SHARED WITH CONFIGURE
Chris@82 757
Chris@82 758 _LT_EOF
Chris@82 759
Chris@82 760 case $host_os in
Chris@82 761 aix3*)
Chris@82 762 cat <<\_LT_EOF >> "$cfgfile"
Chris@82 763 # AIX sometimes has problems with the GCC collect2 program. For some
Chris@82 764 # reason, if we set the COLLECT_NAMES environment variable, the problems
Chris@82 765 # vanish in a puff of smoke.
Chris@82 766 if test set != "${COLLECT_NAMES+set}"; then
Chris@82 767 COLLECT_NAMES=
Chris@82 768 export COLLECT_NAMES
Chris@82 769 fi
Chris@82 770 _LT_EOF
Chris@82 771 ;;
Chris@82 772 esac
Chris@82 773
Chris@82 774 _LT_PROG_LTMAIN
Chris@82 775
Chris@82 776 # We use sed instead of cat because bash on DJGPP gets confused if
Chris@82 777 # if finds mixed CR/LF and LF-only lines. Since sed operates in
Chris@82 778 # text mode, it properly converts lines to CR/LF. This bash problem
Chris@82 779 # is reportedly fixed, but why not run on old versions too?
Chris@82 780 sed '$q' "$ltmain" >> "$cfgfile" \
Chris@82 781 || (rm -f "$cfgfile"; exit 1)
Chris@82 782
Chris@82 783 mv -f "$cfgfile" "$ofile" ||
Chris@82 784 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
Chris@82 785 chmod +x "$ofile"
Chris@82 786 ],
Chris@82 787 [cat <<_LT_EOF >> "$ofile"
Chris@82 788
Chris@82 789 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
Chris@82 790 dnl in a comment (ie after a #).
Chris@82 791 # ### BEGIN LIBTOOL TAG CONFIG: $1
Chris@82 792 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
Chris@82 793 # ### END LIBTOOL TAG CONFIG: $1
Chris@82 794 _LT_EOF
Chris@82 795 ])dnl /m4_if
Chris@82 796 ],
Chris@82 797 [m4_if([$1], [], [
Chris@82 798 PACKAGE='$PACKAGE'
Chris@82 799 VERSION='$VERSION'
Chris@82 800 RM='$RM'
Chris@82 801 ofile='$ofile'], [])
Chris@82 802 ])dnl /_LT_CONFIG_SAVE_COMMANDS
Chris@82 803 ])# _LT_CONFIG
Chris@82 804
Chris@82 805
Chris@82 806 # LT_SUPPORTED_TAG(TAG)
Chris@82 807 # ---------------------
Chris@82 808 # Trace this macro to discover what tags are supported by the libtool
Chris@82 809 # --tag option, using:
Chris@82 810 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
Chris@82 811 AC_DEFUN([LT_SUPPORTED_TAG], [])
Chris@82 812
Chris@82 813
Chris@82 814 # C support is built-in for now
Chris@82 815 m4_define([_LT_LANG_C_enabled], [])
Chris@82 816 m4_define([_LT_TAGS], [])
Chris@82 817
Chris@82 818
Chris@82 819 # LT_LANG(LANG)
Chris@82 820 # -------------
Chris@82 821 # Enable libtool support for the given language if not already enabled.
Chris@82 822 AC_DEFUN([LT_LANG],
Chris@82 823 [AC_BEFORE([$0], [LT_OUTPUT])dnl
Chris@82 824 m4_case([$1],
Chris@82 825 [C], [_LT_LANG(C)],
Chris@82 826 [C++], [_LT_LANG(CXX)],
Chris@82 827 [Go], [_LT_LANG(GO)],
Chris@82 828 [Java], [_LT_LANG(GCJ)],
Chris@82 829 [Fortran 77], [_LT_LANG(F77)],
Chris@82 830 [Fortran], [_LT_LANG(FC)],
Chris@82 831 [Windows Resource], [_LT_LANG(RC)],
Chris@82 832 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
Chris@82 833 [_LT_LANG($1)],
Chris@82 834 [m4_fatal([$0: unsupported language: "$1"])])])dnl
Chris@82 835 ])# LT_LANG
Chris@82 836
Chris@82 837
Chris@82 838 # _LT_LANG(LANGNAME)
Chris@82 839 # ------------------
Chris@82 840 m4_defun([_LT_LANG],
Chris@82 841 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
Chris@82 842 [LT_SUPPORTED_TAG([$1])dnl
Chris@82 843 m4_append([_LT_TAGS], [$1 ])dnl
Chris@82 844 m4_define([_LT_LANG_]$1[_enabled], [])dnl
Chris@82 845 _LT_LANG_$1_CONFIG($1)])dnl
Chris@82 846 ])# _LT_LANG
Chris@82 847
Chris@82 848
Chris@82 849 m4_ifndef([AC_PROG_GO], [
Chris@82 850 ############################################################
Chris@82 851 # NOTE: This macro has been submitted for inclusion into #
Chris@82 852 # GNU Autoconf as AC_PROG_GO. When it is available in #
Chris@82 853 # a released version of Autoconf we should remove this #
Chris@82 854 # macro and use it instead. #
Chris@82 855 ############################################################
Chris@82 856 m4_defun([AC_PROG_GO],
Chris@82 857 [AC_LANG_PUSH(Go)dnl
Chris@82 858 AC_ARG_VAR([GOC], [Go compiler command])dnl
Chris@82 859 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
Chris@82 860 _AC_ARG_VAR_LDFLAGS()dnl
Chris@82 861 AC_CHECK_TOOL(GOC, gccgo)
Chris@82 862 if test -z "$GOC"; then
Chris@82 863 if test -n "$ac_tool_prefix"; then
Chris@82 864 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
Chris@82 865 fi
Chris@82 866 fi
Chris@82 867 if test -z "$GOC"; then
Chris@82 868 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
Chris@82 869 fi
Chris@82 870 ])#m4_defun
Chris@82 871 ])#m4_ifndef
Chris@82 872
Chris@82 873
Chris@82 874 # _LT_LANG_DEFAULT_CONFIG
Chris@82 875 # -----------------------
Chris@82 876 m4_defun([_LT_LANG_DEFAULT_CONFIG],
Chris@82 877 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
Chris@82 878 [LT_LANG(CXX)],
Chris@82 879 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
Chris@82 880
Chris@82 881 AC_PROVIDE_IFELSE([AC_PROG_F77],
Chris@82 882 [LT_LANG(F77)],
Chris@82 883 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
Chris@82 884
Chris@82 885 AC_PROVIDE_IFELSE([AC_PROG_FC],
Chris@82 886 [LT_LANG(FC)],
Chris@82 887 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
Chris@82 888
Chris@82 889 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
Chris@82 890 dnl pulling things in needlessly.
Chris@82 891 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
Chris@82 892 [LT_LANG(GCJ)],
Chris@82 893 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
Chris@82 894 [LT_LANG(GCJ)],
Chris@82 895 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
Chris@82 896 [LT_LANG(GCJ)],
Chris@82 897 [m4_ifdef([AC_PROG_GCJ],
Chris@82 898 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
Chris@82 899 m4_ifdef([A][M_PROG_GCJ],
Chris@82 900 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
Chris@82 901 m4_ifdef([LT_PROG_GCJ],
Chris@82 902 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
Chris@82 903
Chris@82 904 AC_PROVIDE_IFELSE([AC_PROG_GO],
Chris@82 905 [LT_LANG(GO)],
Chris@82 906 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
Chris@82 907
Chris@82 908 AC_PROVIDE_IFELSE([LT_PROG_RC],
Chris@82 909 [LT_LANG(RC)],
Chris@82 910 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
Chris@82 911 ])# _LT_LANG_DEFAULT_CONFIG
Chris@82 912
Chris@82 913 # Obsolete macros:
Chris@82 914 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
Chris@82 915 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
Chris@82 916 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
Chris@82 917 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
Chris@82 918 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
Chris@82 919 dnl aclocal-1.4 backwards compatibility:
Chris@82 920 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
Chris@82 921 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
Chris@82 922 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
Chris@82 923 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
Chris@82 924 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
Chris@82 925
Chris@82 926
Chris@82 927 # _LT_TAG_COMPILER
Chris@82 928 # ----------------
Chris@82 929 m4_defun([_LT_TAG_COMPILER],
Chris@82 930 [AC_REQUIRE([AC_PROG_CC])dnl
Chris@82 931
Chris@82 932 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
Chris@82 933 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
Chris@82 934 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
Chris@82 935 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
Chris@82 936
Chris@82 937 # If no C compiler was specified, use CC.
Chris@82 938 LTCC=${LTCC-"$CC"}
Chris@82 939
Chris@82 940 # If no C compiler flags were specified, use CFLAGS.
Chris@82 941 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
Chris@82 942
Chris@82 943 # Allow CC to be a program name with arguments.
Chris@82 944 compiler=$CC
Chris@82 945 ])# _LT_TAG_COMPILER
Chris@82 946
Chris@82 947
Chris@82 948 # _LT_COMPILER_BOILERPLATE
Chris@82 949 # ------------------------
Chris@82 950 # Check for compiler boilerplate output or warnings with
Chris@82 951 # the simple compiler test code.
Chris@82 952 m4_defun([_LT_COMPILER_BOILERPLATE],
Chris@82 953 [m4_require([_LT_DECL_SED])dnl
Chris@82 954 ac_outfile=conftest.$ac_objext
Chris@82 955 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
Chris@82 956 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
Chris@82 957 _lt_compiler_boilerplate=`cat conftest.err`
Chris@82 958 $RM conftest*
Chris@82 959 ])# _LT_COMPILER_BOILERPLATE
Chris@82 960
Chris@82 961
Chris@82 962 # _LT_LINKER_BOILERPLATE
Chris@82 963 # ----------------------
Chris@82 964 # Check for linker boilerplate output or warnings with
Chris@82 965 # the simple link test code.
Chris@82 966 m4_defun([_LT_LINKER_BOILERPLATE],
Chris@82 967 [m4_require([_LT_DECL_SED])dnl
Chris@82 968 ac_outfile=conftest.$ac_objext
Chris@82 969 echo "$lt_simple_link_test_code" >conftest.$ac_ext
Chris@82 970 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
Chris@82 971 _lt_linker_boilerplate=`cat conftest.err`
Chris@82 972 $RM -r conftest*
Chris@82 973 ])# _LT_LINKER_BOILERPLATE
Chris@82 974
Chris@82 975 # _LT_REQUIRED_DARWIN_CHECKS
Chris@82 976 # -------------------------
Chris@82 977 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
Chris@82 978 case $host_os in
Chris@82 979 rhapsody* | darwin*)
Chris@82 980 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
Chris@82 981 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
Chris@82 982 AC_CHECK_TOOL([LIPO], [lipo], [:])
Chris@82 983 AC_CHECK_TOOL([OTOOL], [otool], [:])
Chris@82 984 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
Chris@82 985 _LT_DECL([], [DSYMUTIL], [1],
Chris@82 986 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
Chris@82 987 _LT_DECL([], [NMEDIT], [1],
Chris@82 988 [Tool to change global to local symbols on Mac OS X])
Chris@82 989 _LT_DECL([], [LIPO], [1],
Chris@82 990 [Tool to manipulate fat objects and archives on Mac OS X])
Chris@82 991 _LT_DECL([], [OTOOL], [1],
Chris@82 992 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
Chris@82 993 _LT_DECL([], [OTOOL64], [1],
Chris@82 994 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
Chris@82 995
Chris@82 996 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
Chris@82 997 [lt_cv_apple_cc_single_mod=no
Chris@82 998 if test -z "$LT_MULTI_MODULE"; then
Chris@82 999 # By default we will add the -single_module flag. You can override
Chris@82 1000 # by either setting the environment variable LT_MULTI_MODULE
Chris@82 1001 # non-empty at configure time, or by adding -multi_module to the
Chris@82 1002 # link flags.
Chris@82 1003 rm -rf libconftest.dylib*
Chris@82 1004 echo "int foo(void){return 1;}" > conftest.c
Chris@82 1005 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
Chris@82 1006 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
Chris@82 1007 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
Chris@82 1008 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
Chris@82 1009 _lt_result=$?
Chris@82 1010 # If there is a non-empty error log, and "single_module"
Chris@82 1011 # appears in it, assume the flag caused a linker warning
Chris@82 1012 if test -s conftest.err && $GREP single_module conftest.err; then
Chris@82 1013 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@82 1014 # Otherwise, if the output was created with a 0 exit code from
Chris@82 1015 # the compiler, it worked.
Chris@82 1016 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
Chris@82 1017 lt_cv_apple_cc_single_mod=yes
Chris@82 1018 else
Chris@82 1019 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@82 1020 fi
Chris@82 1021 rm -rf libconftest.dylib*
Chris@82 1022 rm -f conftest.*
Chris@82 1023 fi])
Chris@82 1024
Chris@82 1025 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
Chris@82 1026 [lt_cv_ld_exported_symbols_list],
Chris@82 1027 [lt_cv_ld_exported_symbols_list=no
Chris@82 1028 save_LDFLAGS=$LDFLAGS
Chris@82 1029 echo "_main" > conftest.sym
Chris@82 1030 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
Chris@82 1031 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
Chris@82 1032 [lt_cv_ld_exported_symbols_list=yes],
Chris@82 1033 [lt_cv_ld_exported_symbols_list=no])
Chris@82 1034 LDFLAGS=$save_LDFLAGS
Chris@82 1035 ])
Chris@82 1036
Chris@82 1037 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
Chris@82 1038 [lt_cv_ld_force_load=no
Chris@82 1039 cat > conftest.c << _LT_EOF
Chris@82 1040 int forced_loaded() { return 2;}
Chris@82 1041 _LT_EOF
Chris@82 1042 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
Chris@82 1043 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
Chris@82 1044 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
Chris@82 1045 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
Chris@82 1046 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
Chris@82 1047 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
Chris@82 1048 cat > conftest.c << _LT_EOF
Chris@82 1049 int main() { return 0;}
Chris@82 1050 _LT_EOF
Chris@82 1051 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
Chris@82 1052 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
Chris@82 1053 _lt_result=$?
Chris@82 1054 if test -s conftest.err && $GREP force_load conftest.err; then
Chris@82 1055 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@82 1056 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
Chris@82 1057 lt_cv_ld_force_load=yes
Chris@82 1058 else
Chris@82 1059 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@82 1060 fi
Chris@82 1061 rm -f conftest.err libconftest.a conftest conftest.c
Chris@82 1062 rm -rf conftest.dSYM
Chris@82 1063 ])
Chris@82 1064 case $host_os in
Chris@82 1065 rhapsody* | darwin1.[[012]])
Chris@82 1066 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
Chris@82 1067 darwin1.*)
Chris@82 1068 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
Chris@82 1069 darwin*) # darwin 5.x on
Chris@82 1070 # if running on 10.5 or later, the deployment target defaults
Chris@82 1071 # to the OS version, if on x86, and 10.4, the deployment
Chris@82 1072 # target defaults to 10.4. Don't you love it?
Chris@82 1073 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
Chris@82 1074 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
Chris@82 1075 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
Chris@82 1076 10.[[012]][[,.]]*)
Chris@82 1077 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
Chris@82 1078 10.*)
Chris@82 1079 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
Chris@82 1080 esac
Chris@82 1081 ;;
Chris@82 1082 esac
Chris@82 1083 if test yes = "$lt_cv_apple_cc_single_mod"; then
Chris@82 1084 _lt_dar_single_mod='$single_module'
Chris@82 1085 fi
Chris@82 1086 if test yes = "$lt_cv_ld_exported_symbols_list"; then
Chris@82 1087 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
Chris@82 1088 else
Chris@82 1089 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
Chris@82 1090 fi
Chris@82 1091 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
Chris@82 1092 _lt_dsymutil='~$DSYMUTIL $lib || :'
Chris@82 1093 else
Chris@82 1094 _lt_dsymutil=
Chris@82 1095 fi
Chris@82 1096 ;;
Chris@82 1097 esac
Chris@82 1098 ])
Chris@82 1099
Chris@82 1100
Chris@82 1101 # _LT_DARWIN_LINKER_FEATURES([TAG])
Chris@82 1102 # ---------------------------------
Chris@82 1103 # Checks for linker and compiler features on darwin
Chris@82 1104 m4_defun([_LT_DARWIN_LINKER_FEATURES],
Chris@82 1105 [
Chris@82 1106 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
Chris@82 1107 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@82 1108 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@82 1109 _LT_TAGVAR(hardcode_automatic, $1)=yes
Chris@82 1110 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
Chris@82 1111 if test yes = "$lt_cv_ld_force_load"; then
Chris@82 1112 _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
Chris@82 1113 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
Chris@82 1114 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
Chris@82 1115 else
Chris@82 1116 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
Chris@82 1117 fi
Chris@82 1118 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@82 1119 _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
Chris@82 1120 case $cc_basename in
Chris@82 1121 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
Chris@82 1122 *) _lt_dar_can_shared=$GCC ;;
Chris@82 1123 esac
Chris@82 1124 if test yes = "$_lt_dar_can_shared"; then
Chris@82 1125 output_verbose_link_cmd=func_echo_all
Chris@82 1126 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
Chris@82 1127 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
Chris@82 1128 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
Chris@82 1129 _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
Chris@82 1130 m4_if([$1], [CXX],
Chris@82 1131 [ if test yes != "$lt_cv_apple_cc_single_mod"; then
Chris@82 1132 _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
Chris@82 1133 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
Chris@82 1134 fi
Chris@82 1135 ],[])
Chris@82 1136 else
Chris@82 1137 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 1138 fi
Chris@82 1139 ])
Chris@82 1140
Chris@82 1141 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
Chris@82 1142 # ----------------------------------
Chris@82 1143 # Links a minimal program and checks the executable
Chris@82 1144 # for the system default hardcoded library path. In most cases,
Chris@82 1145 # this is /usr/lib:/lib, but when the MPI compilers are used
Chris@82 1146 # the location of the communication and MPI libs are included too.
Chris@82 1147 # If we don't find anything, use the default library path according
Chris@82 1148 # to the aix ld manual.
Chris@82 1149 # Store the results from the different compilers for each TAGNAME.
Chris@82 1150 # Allow to override them for all tags through lt_cv_aix_libpath.
Chris@82 1151 m4_defun([_LT_SYS_MODULE_PATH_AIX],
Chris@82 1152 [m4_require([_LT_DECL_SED])dnl
Chris@82 1153 if test set = "${lt_cv_aix_libpath+set}"; then
Chris@82 1154 aix_libpath=$lt_cv_aix_libpath
Chris@82 1155 else
Chris@82 1156 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
Chris@82 1157 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
Chris@82 1158 lt_aix_libpath_sed='[
Chris@82 1159 /Import File Strings/,/^$/ {
Chris@82 1160 /^0/ {
Chris@82 1161 s/^0 *\([^ ]*\) *$/\1/
Chris@82 1162 p
Chris@82 1163 }
Chris@82 1164 }]'
Chris@82 1165 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
Chris@82 1166 # Check for a 64-bit object if we didn't find anything.
Chris@82 1167 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
Chris@82 1168 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
Chris@82 1169 fi],[])
Chris@82 1170 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
Chris@82 1171 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
Chris@82 1172 fi
Chris@82 1173 ])
Chris@82 1174 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
Chris@82 1175 fi
Chris@82 1176 ])# _LT_SYS_MODULE_PATH_AIX
Chris@82 1177
Chris@82 1178
Chris@82 1179 # _LT_SHELL_INIT(ARG)
Chris@82 1180 # -------------------
Chris@82 1181 m4_define([_LT_SHELL_INIT],
Chris@82 1182 [m4_divert_text([M4SH-INIT], [$1
Chris@82 1183 ])])# _LT_SHELL_INIT
Chris@82 1184
Chris@82 1185
Chris@82 1186
Chris@82 1187 # _LT_PROG_ECHO_BACKSLASH
Chris@82 1188 # -----------------------
Chris@82 1189 # Find how we can fake an echo command that does not interpret backslash.
Chris@82 1190 # In particular, with Autoconf 2.60 or later we add some code to the start
Chris@82 1191 # of the generated configure script that will find a shell with a builtin
Chris@82 1192 # printf (that we can use as an echo command).
Chris@82 1193 m4_defun([_LT_PROG_ECHO_BACKSLASH],
Chris@82 1194 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
Chris@82 1195 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
Chris@82 1196 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
Chris@82 1197
Chris@82 1198 AC_MSG_CHECKING([how to print strings])
Chris@82 1199 # Test print first, because it will be a builtin if present.
Chris@82 1200 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
Chris@82 1201 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
Chris@82 1202 ECHO='print -r --'
Chris@82 1203 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
Chris@82 1204 ECHO='printf %s\n'
Chris@82 1205 else
Chris@82 1206 # Use this function as a fallback that always works.
Chris@82 1207 func_fallback_echo ()
Chris@82 1208 {
Chris@82 1209 eval 'cat <<_LTECHO_EOF
Chris@82 1210 $[]1
Chris@82 1211 _LTECHO_EOF'
Chris@82 1212 }
Chris@82 1213 ECHO='func_fallback_echo'
Chris@82 1214 fi
Chris@82 1215
Chris@82 1216 # func_echo_all arg...
Chris@82 1217 # Invoke $ECHO with all args, space-separated.
Chris@82 1218 func_echo_all ()
Chris@82 1219 {
Chris@82 1220 $ECHO "$*"
Chris@82 1221 }
Chris@82 1222
Chris@82 1223 case $ECHO in
Chris@82 1224 printf*) AC_MSG_RESULT([printf]) ;;
Chris@82 1225 print*) AC_MSG_RESULT([print -r]) ;;
Chris@82 1226 *) AC_MSG_RESULT([cat]) ;;
Chris@82 1227 esac
Chris@82 1228
Chris@82 1229 m4_ifdef([_AS_DETECT_SUGGESTED],
Chris@82 1230 [_AS_DETECT_SUGGESTED([
Chris@82 1231 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
Chris@82 1232 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
Chris@82 1233 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
Chris@82 1234 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
Chris@82 1235 PATH=/empty FPATH=/empty; export PATH FPATH
Chris@82 1236 test "X`printf %s $ECHO`" = "X$ECHO" \
Chris@82 1237 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
Chris@82 1238
Chris@82 1239 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
Chris@82 1240 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
Chris@82 1241 ])# _LT_PROG_ECHO_BACKSLASH
Chris@82 1242
Chris@82 1243
Chris@82 1244 # _LT_WITH_SYSROOT
Chris@82 1245 # ----------------
Chris@82 1246 AC_DEFUN([_LT_WITH_SYSROOT],
Chris@82 1247 [AC_MSG_CHECKING([for sysroot])
Chris@82 1248 AC_ARG_WITH([sysroot],
Chris@82 1249 [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
Chris@82 1250 [Search for dependent libraries within DIR (or the compiler's sysroot
Chris@82 1251 if not specified).])],
Chris@82 1252 [], [with_sysroot=no])
Chris@82 1253
Chris@82 1254 dnl lt_sysroot will always be passed unquoted. We quote it here
Chris@82 1255 dnl in case the user passed a directory name.
Chris@82 1256 lt_sysroot=
Chris@82 1257 case $with_sysroot in #(
Chris@82 1258 yes)
Chris@82 1259 if test yes = "$GCC"; then
Chris@82 1260 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
Chris@82 1261 fi
Chris@82 1262 ;; #(
Chris@82 1263 /*)
Chris@82 1264 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
Chris@82 1265 ;; #(
Chris@82 1266 no|'')
Chris@82 1267 ;; #(
Chris@82 1268 *)
Chris@82 1269 AC_MSG_RESULT([$with_sysroot])
Chris@82 1270 AC_MSG_ERROR([The sysroot must be an absolute path.])
Chris@82 1271 ;;
Chris@82 1272 esac
Chris@82 1273
Chris@82 1274 AC_MSG_RESULT([${lt_sysroot:-no}])
Chris@82 1275 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
Chris@82 1276 [dependent libraries, and where our libraries should be installed.])])
Chris@82 1277
Chris@82 1278 # _LT_ENABLE_LOCK
Chris@82 1279 # ---------------
Chris@82 1280 m4_defun([_LT_ENABLE_LOCK],
Chris@82 1281 [AC_ARG_ENABLE([libtool-lock],
Chris@82 1282 [AS_HELP_STRING([--disable-libtool-lock],
Chris@82 1283 [avoid locking (might break parallel builds)])])
Chris@82 1284 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
Chris@82 1285
Chris@82 1286 # Some flags need to be propagated to the compiler or linker for good
Chris@82 1287 # libtool support.
Chris@82 1288 case $host in
Chris@82 1289 ia64-*-hpux*)
Chris@82 1290 # Find out what ABI is being produced by ac_compile, and set mode
Chris@82 1291 # options accordingly.
Chris@82 1292 echo 'int i;' > conftest.$ac_ext
Chris@82 1293 if AC_TRY_EVAL(ac_compile); then
Chris@82 1294 case `/usr/bin/file conftest.$ac_objext` in
Chris@82 1295 *ELF-32*)
Chris@82 1296 HPUX_IA64_MODE=32
Chris@82 1297 ;;
Chris@82 1298 *ELF-64*)
Chris@82 1299 HPUX_IA64_MODE=64
Chris@82 1300 ;;
Chris@82 1301 esac
Chris@82 1302 fi
Chris@82 1303 rm -rf conftest*
Chris@82 1304 ;;
Chris@82 1305 *-*-irix6*)
Chris@82 1306 # Find out what ABI is being produced by ac_compile, and set linker
Chris@82 1307 # options accordingly.
Chris@82 1308 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
Chris@82 1309 if AC_TRY_EVAL(ac_compile); then
Chris@82 1310 if test yes = "$lt_cv_prog_gnu_ld"; then
Chris@82 1311 case `/usr/bin/file conftest.$ac_objext` in
Chris@82 1312 *32-bit*)
Chris@82 1313 LD="${LD-ld} -melf32bsmip"
Chris@82 1314 ;;
Chris@82 1315 *N32*)
Chris@82 1316 LD="${LD-ld} -melf32bmipn32"
Chris@82 1317 ;;
Chris@82 1318 *64-bit*)
Chris@82 1319 LD="${LD-ld} -melf64bmip"
Chris@82 1320 ;;
Chris@82 1321 esac
Chris@82 1322 else
Chris@82 1323 case `/usr/bin/file conftest.$ac_objext` in
Chris@82 1324 *32-bit*)
Chris@82 1325 LD="${LD-ld} -32"
Chris@82 1326 ;;
Chris@82 1327 *N32*)
Chris@82 1328 LD="${LD-ld} -n32"
Chris@82 1329 ;;
Chris@82 1330 *64-bit*)
Chris@82 1331 LD="${LD-ld} -64"
Chris@82 1332 ;;
Chris@82 1333 esac
Chris@82 1334 fi
Chris@82 1335 fi
Chris@82 1336 rm -rf conftest*
Chris@82 1337 ;;
Chris@82 1338
Chris@82 1339 mips64*-*linux*)
Chris@82 1340 # Find out what ABI is being produced by ac_compile, and set linker
Chris@82 1341 # options accordingly.
Chris@82 1342 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
Chris@82 1343 if AC_TRY_EVAL(ac_compile); then
Chris@82 1344 emul=elf
Chris@82 1345 case `/usr/bin/file conftest.$ac_objext` in
Chris@82 1346 *32-bit*)
Chris@82 1347 emul="${emul}32"
Chris@82 1348 ;;
Chris@82 1349 *64-bit*)
Chris@82 1350 emul="${emul}64"
Chris@82 1351 ;;
Chris@82 1352 esac
Chris@82 1353 case `/usr/bin/file conftest.$ac_objext` in
Chris@82 1354 *MSB*)
Chris@82 1355 emul="${emul}btsmip"
Chris@82 1356 ;;
Chris@82 1357 *LSB*)
Chris@82 1358 emul="${emul}ltsmip"
Chris@82 1359 ;;
Chris@82 1360 esac
Chris@82 1361 case `/usr/bin/file conftest.$ac_objext` in
Chris@82 1362 *N32*)
Chris@82 1363 emul="${emul}n32"
Chris@82 1364 ;;
Chris@82 1365 esac
Chris@82 1366 LD="${LD-ld} -m $emul"
Chris@82 1367 fi
Chris@82 1368 rm -rf conftest*
Chris@82 1369 ;;
Chris@82 1370
Chris@82 1371 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
Chris@82 1372 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
Chris@82 1373 # Find out what ABI is being produced by ac_compile, and set linker
Chris@82 1374 # options accordingly. Note that the listed cases only cover the
Chris@82 1375 # situations where additional linker options are needed (such as when
Chris@82 1376 # doing 32-bit compilation for a host where ld defaults to 64-bit, or
Chris@82 1377 # vice versa); the common cases where no linker options are needed do
Chris@82 1378 # not appear in the list.
Chris@82 1379 echo 'int i;' > conftest.$ac_ext
Chris@82 1380 if AC_TRY_EVAL(ac_compile); then
Chris@82 1381 case `/usr/bin/file conftest.o` in
Chris@82 1382 *32-bit*)
Chris@82 1383 case $host in
Chris@82 1384 x86_64-*kfreebsd*-gnu)
Chris@82 1385 LD="${LD-ld} -m elf_i386_fbsd"
Chris@82 1386 ;;
Chris@82 1387 x86_64-*linux*)
Chris@82 1388 case `/usr/bin/file conftest.o` in
Chris@82 1389 *x86-64*)
Chris@82 1390 LD="${LD-ld} -m elf32_x86_64"
Chris@82 1391 ;;
Chris@82 1392 *)
Chris@82 1393 LD="${LD-ld} -m elf_i386"
Chris@82 1394 ;;
Chris@82 1395 esac
Chris@82 1396 ;;
Chris@82 1397 powerpc64le-*linux*)
Chris@82 1398 LD="${LD-ld} -m elf32lppclinux"
Chris@82 1399 ;;
Chris@82 1400 powerpc64-*linux*)
Chris@82 1401 LD="${LD-ld} -m elf32ppclinux"
Chris@82 1402 ;;
Chris@82 1403 s390x-*linux*)
Chris@82 1404 LD="${LD-ld} -m elf_s390"
Chris@82 1405 ;;
Chris@82 1406 sparc64-*linux*)
Chris@82 1407 LD="${LD-ld} -m elf32_sparc"
Chris@82 1408 ;;
Chris@82 1409 esac
Chris@82 1410 ;;
Chris@82 1411 *64-bit*)
Chris@82 1412 case $host in
Chris@82 1413 x86_64-*kfreebsd*-gnu)
Chris@82 1414 LD="${LD-ld} -m elf_x86_64_fbsd"
Chris@82 1415 ;;
Chris@82 1416 x86_64-*linux*)
Chris@82 1417 LD="${LD-ld} -m elf_x86_64"
Chris@82 1418 ;;
Chris@82 1419 powerpcle-*linux*)
Chris@82 1420 LD="${LD-ld} -m elf64lppc"
Chris@82 1421 ;;
Chris@82 1422 powerpc-*linux*)
Chris@82 1423 LD="${LD-ld} -m elf64ppc"
Chris@82 1424 ;;
Chris@82 1425 s390*-*linux*|s390*-*tpf*)
Chris@82 1426 LD="${LD-ld} -m elf64_s390"
Chris@82 1427 ;;
Chris@82 1428 sparc*-*linux*)
Chris@82 1429 LD="${LD-ld} -m elf64_sparc"
Chris@82 1430 ;;
Chris@82 1431 esac
Chris@82 1432 ;;
Chris@82 1433 esac
Chris@82 1434 fi
Chris@82 1435 rm -rf conftest*
Chris@82 1436 ;;
Chris@82 1437
Chris@82 1438 *-*-sco3.2v5*)
Chris@82 1439 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
Chris@82 1440 SAVE_CFLAGS=$CFLAGS
Chris@82 1441 CFLAGS="$CFLAGS -belf"
Chris@82 1442 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
Chris@82 1443 [AC_LANG_PUSH(C)
Chris@82 1444 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
Chris@82 1445 AC_LANG_POP])
Chris@82 1446 if test yes != "$lt_cv_cc_needs_belf"; then
Chris@82 1447 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
Chris@82 1448 CFLAGS=$SAVE_CFLAGS
Chris@82 1449 fi
Chris@82 1450 ;;
Chris@82 1451 *-*solaris*)
Chris@82 1452 # Find out what ABI is being produced by ac_compile, and set linker
Chris@82 1453 # options accordingly.
Chris@82 1454 echo 'int i;' > conftest.$ac_ext
Chris@82 1455 if AC_TRY_EVAL(ac_compile); then
Chris@82 1456 case `/usr/bin/file conftest.o` in
Chris@82 1457 *64-bit*)
Chris@82 1458 case $lt_cv_prog_gnu_ld in
Chris@82 1459 yes*)
Chris@82 1460 case $host in
Chris@82 1461 i?86-*-solaris*|x86_64-*-solaris*)
Chris@82 1462 LD="${LD-ld} -m elf_x86_64"
Chris@82 1463 ;;
Chris@82 1464 sparc*-*-solaris*)
Chris@82 1465 LD="${LD-ld} -m elf64_sparc"
Chris@82 1466 ;;
Chris@82 1467 esac
Chris@82 1468 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
Chris@82 1469 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
Chris@82 1470 LD=${LD-ld}_sol2
Chris@82 1471 fi
Chris@82 1472 ;;
Chris@82 1473 *)
Chris@82 1474 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
Chris@82 1475 LD="${LD-ld} -64"
Chris@82 1476 fi
Chris@82 1477 ;;
Chris@82 1478 esac
Chris@82 1479 ;;
Chris@82 1480 esac
Chris@82 1481 fi
Chris@82 1482 rm -rf conftest*
Chris@82 1483 ;;
Chris@82 1484 esac
Chris@82 1485
Chris@82 1486 need_locks=$enable_libtool_lock
Chris@82 1487 ])# _LT_ENABLE_LOCK
Chris@82 1488
Chris@82 1489
Chris@82 1490 # _LT_PROG_AR
Chris@82 1491 # -----------
Chris@82 1492 m4_defun([_LT_PROG_AR],
Chris@82 1493 [AC_CHECK_TOOLS(AR, [ar], false)
Chris@82 1494 : ${AR=ar}
Chris@82 1495 : ${AR_FLAGS=cru}
Chris@82 1496 _LT_DECL([], [AR], [1], [The archiver])
Chris@82 1497 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
Chris@82 1498
Chris@82 1499 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
Chris@82 1500 [lt_cv_ar_at_file=no
Chris@82 1501 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
Chris@82 1502 [echo conftest.$ac_objext > conftest.lst
Chris@82 1503 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
Chris@82 1504 AC_TRY_EVAL([lt_ar_try])
Chris@82 1505 if test 0 -eq "$ac_status"; then
Chris@82 1506 # Ensure the archiver fails upon bogus file names.
Chris@82 1507 rm -f conftest.$ac_objext libconftest.a
Chris@82 1508 AC_TRY_EVAL([lt_ar_try])
Chris@82 1509 if test 0 -ne "$ac_status"; then
Chris@82 1510 lt_cv_ar_at_file=@
Chris@82 1511 fi
Chris@82 1512 fi
Chris@82 1513 rm -f conftest.* libconftest.a
Chris@82 1514 ])
Chris@82 1515 ])
Chris@82 1516
Chris@82 1517 if test no = "$lt_cv_ar_at_file"; then
Chris@82 1518 archiver_list_spec=
Chris@82 1519 else
Chris@82 1520 archiver_list_spec=$lt_cv_ar_at_file
Chris@82 1521 fi
Chris@82 1522 _LT_DECL([], [archiver_list_spec], [1],
Chris@82 1523 [How to feed a file listing to the archiver])
Chris@82 1524 ])# _LT_PROG_AR
Chris@82 1525
Chris@82 1526
Chris@82 1527 # _LT_CMD_OLD_ARCHIVE
Chris@82 1528 # -------------------
Chris@82 1529 m4_defun([_LT_CMD_OLD_ARCHIVE],
Chris@82 1530 [_LT_PROG_AR
Chris@82 1531
Chris@82 1532 AC_CHECK_TOOL(STRIP, strip, :)
Chris@82 1533 test -z "$STRIP" && STRIP=:
Chris@82 1534 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
Chris@82 1535
Chris@82 1536 AC_CHECK_TOOL(RANLIB, ranlib, :)
Chris@82 1537 test -z "$RANLIB" && RANLIB=:
Chris@82 1538 _LT_DECL([], [RANLIB], [1],
Chris@82 1539 [Commands used to install an old-style archive])
Chris@82 1540
Chris@82 1541 # Determine commands to create old-style static archives.
Chris@82 1542 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
Chris@82 1543 old_postinstall_cmds='chmod 644 $oldlib'
Chris@82 1544 old_postuninstall_cmds=
Chris@82 1545
Chris@82 1546 if test -n "$RANLIB"; then
Chris@82 1547 case $host_os in
Chris@82 1548 bitrig* | openbsd*)
Chris@82 1549 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
Chris@82 1550 ;;
Chris@82 1551 *)
Chris@82 1552 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
Chris@82 1553 ;;
Chris@82 1554 esac
Chris@82 1555 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
Chris@82 1556 fi
Chris@82 1557
Chris@82 1558 case $host_os in
Chris@82 1559 darwin*)
Chris@82 1560 lock_old_archive_extraction=yes ;;
Chris@82 1561 *)
Chris@82 1562 lock_old_archive_extraction=no ;;
Chris@82 1563 esac
Chris@82 1564 _LT_DECL([], [old_postinstall_cmds], [2])
Chris@82 1565 _LT_DECL([], [old_postuninstall_cmds], [2])
Chris@82 1566 _LT_TAGDECL([], [old_archive_cmds], [2],
Chris@82 1567 [Commands used to build an old-style archive])
Chris@82 1568 _LT_DECL([], [lock_old_archive_extraction], [0],
Chris@82 1569 [Whether to use a lock for old archive extraction])
Chris@82 1570 ])# _LT_CMD_OLD_ARCHIVE
Chris@82 1571
Chris@82 1572
Chris@82 1573 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
Chris@82 1574 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
Chris@82 1575 # ----------------------------------------------------------------
Chris@82 1576 # Check whether the given compiler option works
Chris@82 1577 AC_DEFUN([_LT_COMPILER_OPTION],
Chris@82 1578 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@82 1579 m4_require([_LT_DECL_SED])dnl
Chris@82 1580 AC_CACHE_CHECK([$1], [$2],
Chris@82 1581 [$2=no
Chris@82 1582 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
Chris@82 1583 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
Chris@82 1584 lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
Chris@82 1585 # Insert the option either (1) after the last *FLAGS variable, or
Chris@82 1586 # (2) before a word containing "conftest.", or (3) at the end.
Chris@82 1587 # Note that $ac_compile itself does not contain backslashes and begins
Chris@82 1588 # with a dollar sign (not a hyphen), so the echo should work correctly.
Chris@82 1589 # The option is referenced via a variable to avoid confusing sed.
Chris@82 1590 lt_compile=`echo "$ac_compile" | $SED \
Chris@82 1591 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
Chris@82 1592 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
Chris@82 1593 -e 's:$: $lt_compiler_flag:'`
Chris@82 1594 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
Chris@82 1595 (eval "$lt_compile" 2>conftest.err)
Chris@82 1596 ac_status=$?
Chris@82 1597 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@82 1598 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
Chris@82 1599 if (exit $ac_status) && test -s "$ac_outfile"; then
Chris@82 1600 # The compiler can only warn and ignore the option if not recognized
Chris@82 1601 # So say no if there are warnings other than the usual output.
Chris@82 1602 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
Chris@82 1603 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
Chris@82 1604 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
Chris@82 1605 $2=yes
Chris@82 1606 fi
Chris@82 1607 fi
Chris@82 1608 $RM conftest*
Chris@82 1609 ])
Chris@82 1610
Chris@82 1611 if test yes = "[$]$2"; then
Chris@82 1612 m4_if([$5], , :, [$5])
Chris@82 1613 else
Chris@82 1614 m4_if([$6], , :, [$6])
Chris@82 1615 fi
Chris@82 1616 ])# _LT_COMPILER_OPTION
Chris@82 1617
Chris@82 1618 # Old name:
Chris@82 1619 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
Chris@82 1620 dnl aclocal-1.4 backwards compatibility:
Chris@82 1621 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
Chris@82 1622
Chris@82 1623
Chris@82 1624 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
Chris@82 1625 # [ACTION-SUCCESS], [ACTION-FAILURE])
Chris@82 1626 # ----------------------------------------------------
Chris@82 1627 # Check whether the given linker option works
Chris@82 1628 AC_DEFUN([_LT_LINKER_OPTION],
Chris@82 1629 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@82 1630 m4_require([_LT_DECL_SED])dnl
Chris@82 1631 AC_CACHE_CHECK([$1], [$2],
Chris@82 1632 [$2=no
Chris@82 1633 save_LDFLAGS=$LDFLAGS
Chris@82 1634 LDFLAGS="$LDFLAGS $3"
Chris@82 1635 echo "$lt_simple_link_test_code" > conftest.$ac_ext
Chris@82 1636 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
Chris@82 1637 # The linker can only warn and ignore the option if not recognized
Chris@82 1638 # So say no if there are warnings
Chris@82 1639 if test -s conftest.err; then
Chris@82 1640 # Append any errors to the config.log.
Chris@82 1641 cat conftest.err 1>&AS_MESSAGE_LOG_FD
Chris@82 1642 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
Chris@82 1643 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
Chris@82 1644 if diff conftest.exp conftest.er2 >/dev/null; then
Chris@82 1645 $2=yes
Chris@82 1646 fi
Chris@82 1647 else
Chris@82 1648 $2=yes
Chris@82 1649 fi
Chris@82 1650 fi
Chris@82 1651 $RM -r conftest*
Chris@82 1652 LDFLAGS=$save_LDFLAGS
Chris@82 1653 ])
Chris@82 1654
Chris@82 1655 if test yes = "[$]$2"; then
Chris@82 1656 m4_if([$4], , :, [$4])
Chris@82 1657 else
Chris@82 1658 m4_if([$5], , :, [$5])
Chris@82 1659 fi
Chris@82 1660 ])# _LT_LINKER_OPTION
Chris@82 1661
Chris@82 1662 # Old name:
Chris@82 1663 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
Chris@82 1664 dnl aclocal-1.4 backwards compatibility:
Chris@82 1665 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
Chris@82 1666
Chris@82 1667
Chris@82 1668 # LT_CMD_MAX_LEN
Chris@82 1669 #---------------
Chris@82 1670 AC_DEFUN([LT_CMD_MAX_LEN],
Chris@82 1671 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@82 1672 # find the maximum length of command line arguments
Chris@82 1673 AC_MSG_CHECKING([the maximum length of command line arguments])
Chris@82 1674 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
Chris@82 1675 i=0
Chris@82 1676 teststring=ABCD
Chris@82 1677
Chris@82 1678 case $build_os in
Chris@82 1679 msdosdjgpp*)
Chris@82 1680 # On DJGPP, this test can blow up pretty badly due to problems in libc
Chris@82 1681 # (any single argument exceeding 2000 bytes causes a buffer overrun
Chris@82 1682 # during glob expansion). Even if it were fixed, the result of this
Chris@82 1683 # check would be larger than it should be.
Chris@82 1684 lt_cv_sys_max_cmd_len=12288; # 12K is about right
Chris@82 1685 ;;
Chris@82 1686
Chris@82 1687 gnu*)
Chris@82 1688 # Under GNU Hurd, this test is not required because there is
Chris@82 1689 # no limit to the length of command line arguments.
Chris@82 1690 # Libtool will interpret -1 as no limit whatsoever
Chris@82 1691 lt_cv_sys_max_cmd_len=-1;
Chris@82 1692 ;;
Chris@82 1693
Chris@82 1694 cygwin* | mingw* | cegcc*)
Chris@82 1695 # On Win9x/ME, this test blows up -- it succeeds, but takes
Chris@82 1696 # about 5 minutes as the teststring grows exponentially.
Chris@82 1697 # Worse, since 9x/ME are not pre-emptively multitasking,
Chris@82 1698 # you end up with a "frozen" computer, even though with patience
Chris@82 1699 # the test eventually succeeds (with a max line length of 256k).
Chris@82 1700 # Instead, let's just punt: use the minimum linelength reported by
Chris@82 1701 # all of the supported platforms: 8192 (on NT/2K/XP).
Chris@82 1702 lt_cv_sys_max_cmd_len=8192;
Chris@82 1703 ;;
Chris@82 1704
Chris@82 1705 mint*)
Chris@82 1706 # On MiNT this can take a long time and run out of memory.
Chris@82 1707 lt_cv_sys_max_cmd_len=8192;
Chris@82 1708 ;;
Chris@82 1709
Chris@82 1710 amigaos*)
Chris@82 1711 # On AmigaOS with pdksh, this test takes hours, literally.
Chris@82 1712 # So we just punt and use a minimum line length of 8192.
Chris@82 1713 lt_cv_sys_max_cmd_len=8192;
Chris@82 1714 ;;
Chris@82 1715
Chris@82 1716 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
Chris@82 1717 # This has been around since 386BSD, at least. Likely further.
Chris@82 1718 if test -x /sbin/sysctl; then
Chris@82 1719 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
Chris@82 1720 elif test -x /usr/sbin/sysctl; then
Chris@82 1721 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
Chris@82 1722 else
Chris@82 1723 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
Chris@82 1724 fi
Chris@82 1725 # And add a safety zone
Chris@82 1726 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
Chris@82 1727 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
Chris@82 1728 ;;
Chris@82 1729
Chris@82 1730 interix*)
Chris@82 1731 # We know the value 262144 and hardcode it with a safety zone (like BSD)
Chris@82 1732 lt_cv_sys_max_cmd_len=196608
Chris@82 1733 ;;
Chris@82 1734
Chris@82 1735 os2*)
Chris@82 1736 # The test takes a long time on OS/2.
Chris@82 1737 lt_cv_sys_max_cmd_len=8192
Chris@82 1738 ;;
Chris@82 1739
Chris@82 1740 osf*)
Chris@82 1741 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
Chris@82 1742 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
Chris@82 1743 # nice to cause kernel panics so lets avoid the loop below.
Chris@82 1744 # First set a reasonable default.
Chris@82 1745 lt_cv_sys_max_cmd_len=16384
Chris@82 1746 #
Chris@82 1747 if test -x /sbin/sysconfig; then
Chris@82 1748 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
Chris@82 1749 *1*) lt_cv_sys_max_cmd_len=-1 ;;
Chris@82 1750 esac
Chris@82 1751 fi
Chris@82 1752 ;;
Chris@82 1753 sco3.2v5*)
Chris@82 1754 lt_cv_sys_max_cmd_len=102400
Chris@82 1755 ;;
Chris@82 1756 sysv5* | sco5v6* | sysv4.2uw2*)
Chris@82 1757 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
Chris@82 1758 if test -n "$kargmax"; then
Chris@82 1759 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
Chris@82 1760 else
Chris@82 1761 lt_cv_sys_max_cmd_len=32768
Chris@82 1762 fi
Chris@82 1763 ;;
Chris@82 1764 *)
Chris@82 1765 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
Chris@82 1766 if test -n "$lt_cv_sys_max_cmd_len" && \
Chris@82 1767 test undefined != "$lt_cv_sys_max_cmd_len"; then
Chris@82 1768 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
Chris@82 1769 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
Chris@82 1770 else
Chris@82 1771 # Make teststring a little bigger before we do anything with it.
Chris@82 1772 # a 1K string should be a reasonable start.
Chris@82 1773 for i in 1 2 3 4 5 6 7 8; do
Chris@82 1774 teststring=$teststring$teststring
Chris@82 1775 done
Chris@82 1776 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
Chris@82 1777 # If test is not a shell built-in, we'll probably end up computing a
Chris@82 1778 # maximum length that is only half of the actual maximum length, but
Chris@82 1779 # we can't tell.
Chris@82 1780 while { test X`env echo "$teststring$teststring" 2>/dev/null` \
Chris@82 1781 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
Chris@82 1782 test 17 != "$i" # 1/2 MB should be enough
Chris@82 1783 do
Chris@82 1784 i=`expr $i + 1`
Chris@82 1785 teststring=$teststring$teststring
Chris@82 1786 done
Chris@82 1787 # Only check the string length outside the loop.
Chris@82 1788 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
Chris@82 1789 teststring=
Chris@82 1790 # Add a significant safety factor because C++ compilers can tack on
Chris@82 1791 # massive amounts of additional arguments before passing them to the
Chris@82 1792 # linker. It appears as though 1/2 is a usable value.
Chris@82 1793 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
Chris@82 1794 fi
Chris@82 1795 ;;
Chris@82 1796 esac
Chris@82 1797 ])
Chris@82 1798 if test -n "$lt_cv_sys_max_cmd_len"; then
Chris@82 1799 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
Chris@82 1800 else
Chris@82 1801 AC_MSG_RESULT(none)
Chris@82 1802 fi
Chris@82 1803 max_cmd_len=$lt_cv_sys_max_cmd_len
Chris@82 1804 _LT_DECL([], [max_cmd_len], [0],
Chris@82 1805 [What is the maximum length of a command?])
Chris@82 1806 ])# LT_CMD_MAX_LEN
Chris@82 1807
Chris@82 1808 # Old name:
Chris@82 1809 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
Chris@82 1810 dnl aclocal-1.4 backwards compatibility:
Chris@82 1811 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
Chris@82 1812
Chris@82 1813
Chris@82 1814 # _LT_HEADER_DLFCN
Chris@82 1815 # ----------------
Chris@82 1816 m4_defun([_LT_HEADER_DLFCN],
Chris@82 1817 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
Chris@82 1818 ])# _LT_HEADER_DLFCN
Chris@82 1819
Chris@82 1820
Chris@82 1821 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
Chris@82 1822 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
Chris@82 1823 # ----------------------------------------------------------------
Chris@82 1824 m4_defun([_LT_TRY_DLOPEN_SELF],
Chris@82 1825 [m4_require([_LT_HEADER_DLFCN])dnl
Chris@82 1826 if test yes = "$cross_compiling"; then :
Chris@82 1827 [$4]
Chris@82 1828 else
Chris@82 1829 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
Chris@82 1830 lt_status=$lt_dlunknown
Chris@82 1831 cat > conftest.$ac_ext <<_LT_EOF
Chris@82 1832 [#line $LINENO "configure"
Chris@82 1833 #include "confdefs.h"
Chris@82 1834
Chris@82 1835 #if HAVE_DLFCN_H
Chris@82 1836 #include <dlfcn.h>
Chris@82 1837 #endif
Chris@82 1838
Chris@82 1839 #include <stdio.h>
Chris@82 1840
Chris@82 1841 #ifdef RTLD_GLOBAL
Chris@82 1842 # define LT_DLGLOBAL RTLD_GLOBAL
Chris@82 1843 #else
Chris@82 1844 # ifdef DL_GLOBAL
Chris@82 1845 # define LT_DLGLOBAL DL_GLOBAL
Chris@82 1846 # else
Chris@82 1847 # define LT_DLGLOBAL 0
Chris@82 1848 # endif
Chris@82 1849 #endif
Chris@82 1850
Chris@82 1851 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
Chris@82 1852 find out it does not work in some platform. */
Chris@82 1853 #ifndef LT_DLLAZY_OR_NOW
Chris@82 1854 # ifdef RTLD_LAZY
Chris@82 1855 # define LT_DLLAZY_OR_NOW RTLD_LAZY
Chris@82 1856 # else
Chris@82 1857 # ifdef DL_LAZY
Chris@82 1858 # define LT_DLLAZY_OR_NOW DL_LAZY
Chris@82 1859 # else
Chris@82 1860 # ifdef RTLD_NOW
Chris@82 1861 # define LT_DLLAZY_OR_NOW RTLD_NOW
Chris@82 1862 # else
Chris@82 1863 # ifdef DL_NOW
Chris@82 1864 # define LT_DLLAZY_OR_NOW DL_NOW
Chris@82 1865 # else
Chris@82 1866 # define LT_DLLAZY_OR_NOW 0
Chris@82 1867 # endif
Chris@82 1868 # endif
Chris@82 1869 # endif
Chris@82 1870 # endif
Chris@82 1871 #endif
Chris@82 1872
Chris@82 1873 /* When -fvisibility=hidden is used, assume the code has been annotated
Chris@82 1874 correspondingly for the symbols needed. */
Chris@82 1875 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
Chris@82 1876 int fnord () __attribute__((visibility("default")));
Chris@82 1877 #endif
Chris@82 1878
Chris@82 1879 int fnord () { return 42; }
Chris@82 1880 int main ()
Chris@82 1881 {
Chris@82 1882 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
Chris@82 1883 int status = $lt_dlunknown;
Chris@82 1884
Chris@82 1885 if (self)
Chris@82 1886 {
Chris@82 1887 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
Chris@82 1888 else
Chris@82 1889 {
Chris@82 1890 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
Chris@82 1891 else puts (dlerror ());
Chris@82 1892 }
Chris@82 1893 /* dlclose (self); */
Chris@82 1894 }
Chris@82 1895 else
Chris@82 1896 puts (dlerror ());
Chris@82 1897
Chris@82 1898 return status;
Chris@82 1899 }]
Chris@82 1900 _LT_EOF
Chris@82 1901 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
Chris@82 1902 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
Chris@82 1903 lt_status=$?
Chris@82 1904 case x$lt_status in
Chris@82 1905 x$lt_dlno_uscore) $1 ;;
Chris@82 1906 x$lt_dlneed_uscore) $2 ;;
Chris@82 1907 x$lt_dlunknown|x*) $3 ;;
Chris@82 1908 esac
Chris@82 1909 else :
Chris@82 1910 # compilation failed
Chris@82 1911 $3
Chris@82 1912 fi
Chris@82 1913 fi
Chris@82 1914 rm -fr conftest*
Chris@82 1915 ])# _LT_TRY_DLOPEN_SELF
Chris@82 1916
Chris@82 1917
Chris@82 1918 # LT_SYS_DLOPEN_SELF
Chris@82 1919 # ------------------
Chris@82 1920 AC_DEFUN([LT_SYS_DLOPEN_SELF],
Chris@82 1921 [m4_require([_LT_HEADER_DLFCN])dnl
Chris@82 1922 if test yes != "$enable_dlopen"; then
Chris@82 1923 enable_dlopen=unknown
Chris@82 1924 enable_dlopen_self=unknown
Chris@82 1925 enable_dlopen_self_static=unknown
Chris@82 1926 else
Chris@82 1927 lt_cv_dlopen=no
Chris@82 1928 lt_cv_dlopen_libs=
Chris@82 1929
Chris@82 1930 case $host_os in
Chris@82 1931 beos*)
Chris@82 1932 lt_cv_dlopen=load_add_on
Chris@82 1933 lt_cv_dlopen_libs=
Chris@82 1934 lt_cv_dlopen_self=yes
Chris@82 1935 ;;
Chris@82 1936
Chris@82 1937 mingw* | pw32* | cegcc*)
Chris@82 1938 lt_cv_dlopen=LoadLibrary
Chris@82 1939 lt_cv_dlopen_libs=
Chris@82 1940 ;;
Chris@82 1941
Chris@82 1942 cygwin*)
Chris@82 1943 lt_cv_dlopen=dlopen
Chris@82 1944 lt_cv_dlopen_libs=
Chris@82 1945 ;;
Chris@82 1946
Chris@82 1947 darwin*)
Chris@82 1948 # if libdl is installed we need to link against it
Chris@82 1949 AC_CHECK_LIB([dl], [dlopen],
Chris@82 1950 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
Chris@82 1951 lt_cv_dlopen=dyld
Chris@82 1952 lt_cv_dlopen_libs=
Chris@82 1953 lt_cv_dlopen_self=yes
Chris@82 1954 ])
Chris@82 1955 ;;
Chris@82 1956
Chris@82 1957 tpf*)
Chris@82 1958 # Don't try to run any link tests for TPF. We know it's impossible
Chris@82 1959 # because TPF is a cross-compiler, and we know how we open DSOs.
Chris@82 1960 lt_cv_dlopen=dlopen
Chris@82 1961 lt_cv_dlopen_libs=
Chris@82 1962 lt_cv_dlopen_self=no
Chris@82 1963 ;;
Chris@82 1964
Chris@82 1965 *)
Chris@82 1966 AC_CHECK_FUNC([shl_load],
Chris@82 1967 [lt_cv_dlopen=shl_load],
Chris@82 1968 [AC_CHECK_LIB([dld], [shl_load],
Chris@82 1969 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
Chris@82 1970 [AC_CHECK_FUNC([dlopen],
Chris@82 1971 [lt_cv_dlopen=dlopen],
Chris@82 1972 [AC_CHECK_LIB([dl], [dlopen],
Chris@82 1973 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
Chris@82 1974 [AC_CHECK_LIB([svld], [dlopen],
Chris@82 1975 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
Chris@82 1976 [AC_CHECK_LIB([dld], [dld_link],
Chris@82 1977 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
Chris@82 1978 ])
Chris@82 1979 ])
Chris@82 1980 ])
Chris@82 1981 ])
Chris@82 1982 ])
Chris@82 1983 ;;
Chris@82 1984 esac
Chris@82 1985
Chris@82 1986 if test no = "$lt_cv_dlopen"; then
Chris@82 1987 enable_dlopen=no
Chris@82 1988 else
Chris@82 1989 enable_dlopen=yes
Chris@82 1990 fi
Chris@82 1991
Chris@82 1992 case $lt_cv_dlopen in
Chris@82 1993 dlopen)
Chris@82 1994 save_CPPFLAGS=$CPPFLAGS
Chris@82 1995 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
Chris@82 1996
Chris@82 1997 save_LDFLAGS=$LDFLAGS
Chris@82 1998 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
Chris@82 1999
Chris@82 2000 save_LIBS=$LIBS
Chris@82 2001 LIBS="$lt_cv_dlopen_libs $LIBS"
Chris@82 2002
Chris@82 2003 AC_CACHE_CHECK([whether a program can dlopen itself],
Chris@82 2004 lt_cv_dlopen_self, [dnl
Chris@82 2005 _LT_TRY_DLOPEN_SELF(
Chris@82 2006 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
Chris@82 2007 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
Chris@82 2008 ])
Chris@82 2009
Chris@82 2010 if test yes = "$lt_cv_dlopen_self"; then
Chris@82 2011 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
Chris@82 2012 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
Chris@82 2013 lt_cv_dlopen_self_static, [dnl
Chris@82 2014 _LT_TRY_DLOPEN_SELF(
Chris@82 2015 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
Chris@82 2016 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
Chris@82 2017 ])
Chris@82 2018 fi
Chris@82 2019
Chris@82 2020 CPPFLAGS=$save_CPPFLAGS
Chris@82 2021 LDFLAGS=$save_LDFLAGS
Chris@82 2022 LIBS=$save_LIBS
Chris@82 2023 ;;
Chris@82 2024 esac
Chris@82 2025
Chris@82 2026 case $lt_cv_dlopen_self in
Chris@82 2027 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
Chris@82 2028 *) enable_dlopen_self=unknown ;;
Chris@82 2029 esac
Chris@82 2030
Chris@82 2031 case $lt_cv_dlopen_self_static in
Chris@82 2032 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
Chris@82 2033 *) enable_dlopen_self_static=unknown ;;
Chris@82 2034 esac
Chris@82 2035 fi
Chris@82 2036 _LT_DECL([dlopen_support], [enable_dlopen], [0],
Chris@82 2037 [Whether dlopen is supported])
Chris@82 2038 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
Chris@82 2039 [Whether dlopen of programs is supported])
Chris@82 2040 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
Chris@82 2041 [Whether dlopen of statically linked programs is supported])
Chris@82 2042 ])# LT_SYS_DLOPEN_SELF
Chris@82 2043
Chris@82 2044 # Old name:
Chris@82 2045 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
Chris@82 2046 dnl aclocal-1.4 backwards compatibility:
Chris@82 2047 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
Chris@82 2048
Chris@82 2049
Chris@82 2050 # _LT_COMPILER_C_O([TAGNAME])
Chris@82 2051 # ---------------------------
Chris@82 2052 # Check to see if options -c and -o are simultaneously supported by compiler.
Chris@82 2053 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
Chris@82 2054 m4_defun([_LT_COMPILER_C_O],
Chris@82 2055 [m4_require([_LT_DECL_SED])dnl
Chris@82 2056 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@82 2057 m4_require([_LT_TAG_COMPILER])dnl
Chris@82 2058 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
Chris@82 2059 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
Chris@82 2060 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
Chris@82 2061 $RM -r conftest 2>/dev/null
Chris@82 2062 mkdir conftest
Chris@82 2063 cd conftest
Chris@82 2064 mkdir out
Chris@82 2065 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
Chris@82 2066
Chris@82 2067 lt_compiler_flag="-o out/conftest2.$ac_objext"
Chris@82 2068 # Insert the option either (1) after the last *FLAGS variable, or
Chris@82 2069 # (2) before a word containing "conftest.", or (3) at the end.
Chris@82 2070 # Note that $ac_compile itself does not contain backslashes and begins
Chris@82 2071 # with a dollar sign (not a hyphen), so the echo should work correctly.
Chris@82 2072 lt_compile=`echo "$ac_compile" | $SED \
Chris@82 2073 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
Chris@82 2074 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
Chris@82 2075 -e 's:$: $lt_compiler_flag:'`
Chris@82 2076 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
Chris@82 2077 (eval "$lt_compile" 2>out/conftest.err)
Chris@82 2078 ac_status=$?
Chris@82 2079 cat out/conftest.err >&AS_MESSAGE_LOG_FD
Chris@82 2080 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
Chris@82 2081 if (exit $ac_status) && test -s out/conftest2.$ac_objext
Chris@82 2082 then
Chris@82 2083 # The compiler can only warn and ignore the option if not recognized
Chris@82 2084 # So say no if there are warnings
Chris@82 2085 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
Chris@82 2086 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
Chris@82 2087 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
Chris@82 2088 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
Chris@82 2089 fi
Chris@82 2090 fi
Chris@82 2091 chmod u+w . 2>&AS_MESSAGE_LOG_FD
Chris@82 2092 $RM conftest*
Chris@82 2093 # SGI C++ compiler will create directory out/ii_files/ for
Chris@82 2094 # template instantiation
Chris@82 2095 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
Chris@82 2096 $RM out/* && rmdir out
Chris@82 2097 cd ..
Chris@82 2098 $RM -r conftest
Chris@82 2099 $RM conftest*
Chris@82 2100 ])
Chris@82 2101 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
Chris@82 2102 [Does compiler simultaneously support -c and -o options?])
Chris@82 2103 ])# _LT_COMPILER_C_O
Chris@82 2104
Chris@82 2105
Chris@82 2106 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
Chris@82 2107 # ----------------------------------
Chris@82 2108 # Check to see if we can do hard links to lock some files if needed
Chris@82 2109 m4_defun([_LT_COMPILER_FILE_LOCKS],
Chris@82 2110 [m4_require([_LT_ENABLE_LOCK])dnl
Chris@82 2111 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@82 2112 _LT_COMPILER_C_O([$1])
Chris@82 2113
Chris@82 2114 hard_links=nottested
Chris@82 2115 if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
Chris@82 2116 # do not overwrite the value of need_locks provided by the user
Chris@82 2117 AC_MSG_CHECKING([if we can lock with hard links])
Chris@82 2118 hard_links=yes
Chris@82 2119 $RM conftest*
Chris@82 2120 ln conftest.a conftest.b 2>/dev/null && hard_links=no
Chris@82 2121 touch conftest.a
Chris@82 2122 ln conftest.a conftest.b 2>&5 || hard_links=no
Chris@82 2123 ln conftest.a conftest.b 2>/dev/null && hard_links=no
Chris@82 2124 AC_MSG_RESULT([$hard_links])
Chris@82 2125 if test no = "$hard_links"; then
Chris@82 2126 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
Chris@82 2127 need_locks=warn
Chris@82 2128 fi
Chris@82 2129 else
Chris@82 2130 need_locks=no
Chris@82 2131 fi
Chris@82 2132 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
Chris@82 2133 ])# _LT_COMPILER_FILE_LOCKS
Chris@82 2134
Chris@82 2135
Chris@82 2136 # _LT_CHECK_OBJDIR
Chris@82 2137 # ----------------
Chris@82 2138 m4_defun([_LT_CHECK_OBJDIR],
Chris@82 2139 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
Chris@82 2140 [rm -f .libs 2>/dev/null
Chris@82 2141 mkdir .libs 2>/dev/null
Chris@82 2142 if test -d .libs; then
Chris@82 2143 lt_cv_objdir=.libs
Chris@82 2144 else
Chris@82 2145 # MS-DOS does not allow filenames that begin with a dot.
Chris@82 2146 lt_cv_objdir=_libs
Chris@82 2147 fi
Chris@82 2148 rmdir .libs 2>/dev/null])
Chris@82 2149 objdir=$lt_cv_objdir
Chris@82 2150 _LT_DECL([], [objdir], [0],
Chris@82 2151 [The name of the directory that contains temporary libtool files])dnl
Chris@82 2152 m4_pattern_allow([LT_OBJDIR])dnl
Chris@82 2153 AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
Chris@82 2154 [Define to the sub-directory where libtool stores uninstalled libraries.])
Chris@82 2155 ])# _LT_CHECK_OBJDIR
Chris@82 2156
Chris@82 2157
Chris@82 2158 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
Chris@82 2159 # --------------------------------------
Chris@82 2160 # Check hardcoding attributes.
Chris@82 2161 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
Chris@82 2162 [AC_MSG_CHECKING([how to hardcode library paths into programs])
Chris@82 2163 _LT_TAGVAR(hardcode_action, $1)=
Chris@82 2164 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
Chris@82 2165 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
Chris@82 2166 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
Chris@82 2167
Chris@82 2168 # We can hardcode non-existent directories.
Chris@82 2169 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
Chris@82 2170 # If the only mechanism to avoid hardcoding is shlibpath_var, we
Chris@82 2171 # have to relink, otherwise we might link with an installed library
Chris@82 2172 # when we should be linking with a yet-to-be-installed one
Chris@82 2173 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
Chris@82 2174 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
Chris@82 2175 # Linking always hardcodes the temporary library directory.
Chris@82 2176 _LT_TAGVAR(hardcode_action, $1)=relink
Chris@82 2177 else
Chris@82 2178 # We can link without hardcoding, and we can hardcode nonexisting dirs.
Chris@82 2179 _LT_TAGVAR(hardcode_action, $1)=immediate
Chris@82 2180 fi
Chris@82 2181 else
Chris@82 2182 # We cannot hardcode anything, or else we can only hardcode existing
Chris@82 2183 # directories.
Chris@82 2184 _LT_TAGVAR(hardcode_action, $1)=unsupported
Chris@82 2185 fi
Chris@82 2186 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
Chris@82 2187
Chris@82 2188 if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
Chris@82 2189 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
Chris@82 2190 # Fast installation is not supported
Chris@82 2191 enable_fast_install=no
Chris@82 2192 elif test yes = "$shlibpath_overrides_runpath" ||
Chris@82 2193 test no = "$enable_shared"; then
Chris@82 2194 # Fast installation is not necessary
Chris@82 2195 enable_fast_install=needless
Chris@82 2196 fi
Chris@82 2197 _LT_TAGDECL([], [hardcode_action], [0],
Chris@82 2198 [How to hardcode a shared library path into an executable])
Chris@82 2199 ])# _LT_LINKER_HARDCODE_LIBPATH
Chris@82 2200
Chris@82 2201
Chris@82 2202 # _LT_CMD_STRIPLIB
Chris@82 2203 # ----------------
Chris@82 2204 m4_defun([_LT_CMD_STRIPLIB],
Chris@82 2205 [m4_require([_LT_DECL_EGREP])
Chris@82 2206 striplib=
Chris@82 2207 old_striplib=
Chris@82 2208 AC_MSG_CHECKING([whether stripping libraries is possible])
Chris@82 2209 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
Chris@82 2210 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
Chris@82 2211 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
Chris@82 2212 AC_MSG_RESULT([yes])
Chris@82 2213 else
Chris@82 2214 # FIXME - insert some real tests, host_os isn't really good enough
Chris@82 2215 case $host_os in
Chris@82 2216 darwin*)
Chris@82 2217 if test -n "$STRIP"; then
Chris@82 2218 striplib="$STRIP -x"
Chris@82 2219 old_striplib="$STRIP -S"
Chris@82 2220 AC_MSG_RESULT([yes])
Chris@82 2221 else
Chris@82 2222 AC_MSG_RESULT([no])
Chris@82 2223 fi
Chris@82 2224 ;;
Chris@82 2225 *)
Chris@82 2226 AC_MSG_RESULT([no])
Chris@82 2227 ;;
Chris@82 2228 esac
Chris@82 2229 fi
Chris@82 2230 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
Chris@82 2231 _LT_DECL([], [striplib], [1])
Chris@82 2232 ])# _LT_CMD_STRIPLIB
Chris@82 2233
Chris@82 2234
Chris@82 2235 # _LT_PREPARE_MUNGE_PATH_LIST
Chris@82 2236 # ---------------------------
Chris@82 2237 # Make sure func_munge_path_list() is defined correctly.
Chris@82 2238 m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
Chris@82 2239 [[# func_munge_path_list VARIABLE PATH
Chris@82 2240 # -----------------------------------
Chris@82 2241 # VARIABLE is name of variable containing _space_ separated list of
Chris@82 2242 # directories to be munged by the contents of PATH, which is string
Chris@82 2243 # having a format:
Chris@82 2244 # "DIR[:DIR]:"
Chris@82 2245 # string "DIR[ DIR]" will be prepended to VARIABLE
Chris@82 2246 # ":DIR[:DIR]"
Chris@82 2247 # string "DIR[ DIR]" will be appended to VARIABLE
Chris@82 2248 # "DIRP[:DIRP]::[DIRA:]DIRA"
Chris@82 2249 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
Chris@82 2250 # "DIRA[ DIRA]" will be appended to VARIABLE
Chris@82 2251 # "DIR[:DIR]"
Chris@82 2252 # VARIABLE will be replaced by "DIR[ DIR]"
Chris@82 2253 func_munge_path_list ()
Chris@82 2254 {
Chris@82 2255 case x@S|@2 in
Chris@82 2256 x)
Chris@82 2257 ;;
Chris@82 2258 *:)
Chris@82 2259 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
Chris@82 2260 ;;
Chris@82 2261 x:*)
Chris@82 2262 eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
Chris@82 2263 ;;
Chris@82 2264 *::*)
Chris@82 2265 eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
Chris@82 2266 eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
Chris@82 2267 ;;
Chris@82 2268 *)
Chris@82 2269 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
Chris@82 2270 ;;
Chris@82 2271 esac
Chris@82 2272 }
Chris@82 2273 ]])# _LT_PREPARE_PATH_LIST
Chris@82 2274
Chris@82 2275
Chris@82 2276 # _LT_SYS_DYNAMIC_LINKER([TAG])
Chris@82 2277 # -----------------------------
Chris@82 2278 # PORTME Fill in your ld.so characteristics
Chris@82 2279 m4_defun([_LT_SYS_DYNAMIC_LINKER],
Chris@82 2280 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@82 2281 m4_require([_LT_DECL_EGREP])dnl
Chris@82 2282 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@82 2283 m4_require([_LT_DECL_OBJDUMP])dnl
Chris@82 2284 m4_require([_LT_DECL_SED])dnl
Chris@82 2285 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
Chris@82 2286 m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
Chris@82 2287 AC_MSG_CHECKING([dynamic linker characteristics])
Chris@82 2288 m4_if([$1],
Chris@82 2289 [], [
Chris@82 2290 if test yes = "$GCC"; then
Chris@82 2291 case $host_os in
Chris@82 2292 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
Chris@82 2293 *) lt_awk_arg='/^libraries:/' ;;
Chris@82 2294 esac
Chris@82 2295 case $host_os in
Chris@82 2296 mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
Chris@82 2297 *) lt_sed_strip_eq='s|=/|/|g' ;;
Chris@82 2298 esac
Chris@82 2299 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
Chris@82 2300 case $lt_search_path_spec in
Chris@82 2301 *\;*)
Chris@82 2302 # if the path contains ";" then we assume it to be the separator
Chris@82 2303 # otherwise default to the standard path separator (i.e. ":") - it is
Chris@82 2304 # assumed that no part of a normal pathname contains ";" but that should
Chris@82 2305 # okay in the real world where ";" in dirpaths is itself problematic.
Chris@82 2306 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
Chris@82 2307 ;;
Chris@82 2308 *)
Chris@82 2309 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
Chris@82 2310 ;;
Chris@82 2311 esac
Chris@82 2312 # Ok, now we have the path, separated by spaces, we can step through it
Chris@82 2313 # and add multilib dir if necessary...
Chris@82 2314 lt_tmp_lt_search_path_spec=
Chris@82 2315 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
Chris@82 2316 # ...but if some path component already ends with the multilib dir we assume
Chris@82 2317 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
Chris@82 2318 case "$lt_multi_os_dir; $lt_search_path_spec " in
Chris@82 2319 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
Chris@82 2320 lt_multi_os_dir=
Chris@82 2321 ;;
Chris@82 2322 esac
Chris@82 2323 for lt_sys_path in $lt_search_path_spec; do
Chris@82 2324 if test -d "$lt_sys_path$lt_multi_os_dir"; then
Chris@82 2325 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
Chris@82 2326 elif test -n "$lt_multi_os_dir"; then
Chris@82 2327 test -d "$lt_sys_path" && \
Chris@82 2328 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
Chris@82 2329 fi
Chris@82 2330 done
Chris@82 2331 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
Chris@82 2332 BEGIN {RS = " "; FS = "/|\n";} {
Chris@82 2333 lt_foo = "";
Chris@82 2334 lt_count = 0;
Chris@82 2335 for (lt_i = NF; lt_i > 0; lt_i--) {
Chris@82 2336 if ($lt_i != "" && $lt_i != ".") {
Chris@82 2337 if ($lt_i == "..") {
Chris@82 2338 lt_count++;
Chris@82 2339 } else {
Chris@82 2340 if (lt_count == 0) {
Chris@82 2341 lt_foo = "/" $lt_i lt_foo;
Chris@82 2342 } else {
Chris@82 2343 lt_count--;
Chris@82 2344 }
Chris@82 2345 }
Chris@82 2346 }
Chris@82 2347 }
Chris@82 2348 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
Chris@82 2349 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
Chris@82 2350 }'`
Chris@82 2351 # AWK program above erroneously prepends '/' to C:/dos/paths
Chris@82 2352 # for these hosts.
Chris@82 2353 case $host_os in
Chris@82 2354 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
Chris@82 2355 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
Chris@82 2356 esac
Chris@82 2357 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
Chris@82 2358 else
Chris@82 2359 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
Chris@82 2360 fi])
Chris@82 2361 library_names_spec=
Chris@82 2362 libname_spec='lib$name'
Chris@82 2363 soname_spec=
Chris@82 2364 shrext_cmds=.so
Chris@82 2365 postinstall_cmds=
Chris@82 2366 postuninstall_cmds=
Chris@82 2367 finish_cmds=
Chris@82 2368 finish_eval=
Chris@82 2369 shlibpath_var=
Chris@82 2370 shlibpath_overrides_runpath=unknown
Chris@82 2371 version_type=none
Chris@82 2372 dynamic_linker="$host_os ld.so"
Chris@82 2373 sys_lib_dlsearch_path_spec="/lib /usr/lib"
Chris@82 2374 need_lib_prefix=unknown
Chris@82 2375 hardcode_into_libs=no
Chris@82 2376
Chris@82 2377 # when you set need_version to no, make sure it does not cause -set_version
Chris@82 2378 # flags to be left without arguments
Chris@82 2379 need_version=unknown
Chris@82 2380
Chris@82 2381 AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
Chris@82 2382 [User-defined run-time library search path.])
Chris@82 2383
Chris@82 2384 case $host_os in
Chris@82 2385 aix3*)
Chris@82 2386 version_type=linux # correct to gnu/linux during the next big refactor
Chris@82 2387 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
Chris@82 2388 shlibpath_var=LIBPATH
Chris@82 2389
Chris@82 2390 # AIX 3 has no versioning support, so we append a major version to the name.
Chris@82 2391 soname_spec='$libname$release$shared_ext$major'
Chris@82 2392 ;;
Chris@82 2393
Chris@82 2394 aix[[4-9]]*)
Chris@82 2395 version_type=linux # correct to gnu/linux during the next big refactor
Chris@82 2396 need_lib_prefix=no
Chris@82 2397 need_version=no
Chris@82 2398 hardcode_into_libs=yes
Chris@82 2399 if test ia64 = "$host_cpu"; then
Chris@82 2400 # AIX 5 supports IA64
Chris@82 2401 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
Chris@82 2402 shlibpath_var=LD_LIBRARY_PATH
Chris@82 2403 else
Chris@82 2404 # With GCC up to 2.95.x, collect2 would create an import file
Chris@82 2405 # for dependence libraries. The import file would start with
Chris@82 2406 # the line '#! .'. This would cause the generated library to
Chris@82 2407 # depend on '.', always an invalid library. This was fixed in
Chris@82 2408 # development snapshots of GCC prior to 3.0.
Chris@82 2409 case $host_os in
Chris@82 2410 aix4 | aix4.[[01]] | aix4.[[01]].*)
Chris@82 2411 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
Chris@82 2412 echo ' yes '
Chris@82 2413 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
Chris@82 2414 :
Chris@82 2415 else
Chris@82 2416 can_build_shared=no
Chris@82 2417 fi
Chris@82 2418 ;;
Chris@82 2419 esac
Chris@82 2420 # Using Import Files as archive members, it is possible to support
Chris@82 2421 # filename-based versioning of shared library archives on AIX. While
Chris@82 2422 # this would work for both with and without runtime linking, it will
Chris@82 2423 # prevent static linking of such archives. So we do filename-based
Chris@82 2424 # shared library versioning with .so extension only, which is used
Chris@82 2425 # when both runtime linking and shared linking is enabled.
Chris@82 2426 # Unfortunately, runtime linking may impact performance, so we do
Chris@82 2427 # not want this to be the default eventually. Also, we use the
Chris@82 2428 # versioned .so libs for executables only if there is the -brtl
Chris@82 2429 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
Chris@82 2430 # To allow for filename-based versioning support, we need to create
Chris@82 2431 # libNAME.so.V as an archive file, containing:
Chris@82 2432 # *) an Import File, referring to the versioned filename of the
Chris@82 2433 # archive as well as the shared archive member, telling the
Chris@82 2434 # bitwidth (32 or 64) of that shared object, and providing the
Chris@82 2435 # list of exported symbols of that shared object, eventually
Chris@82 2436 # decorated with the 'weak' keyword
Chris@82 2437 # *) the shared object with the F_LOADONLY flag set, to really avoid
Chris@82 2438 # it being seen by the linker.
Chris@82 2439 # At run time we better use the real file rather than another symlink,
Chris@82 2440 # but for link time we create the symlink libNAME.so -> libNAME.so.V
Chris@82 2441
Chris@82 2442 case $with_aix_soname,$aix_use_runtimelinking in
Chris@82 2443 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
Chris@82 2444 # soname into executable. Probably we can add versioning support to
Chris@82 2445 # collect2, so additional links can be useful in future.
Chris@82 2446 aix,yes) # traditional libtool
Chris@82 2447 dynamic_linker='AIX unversionable lib.so'
Chris@82 2448 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
Chris@82 2449 # instead of lib<name>.a to let people know that these are not
Chris@82 2450 # typical AIX shared libraries.
Chris@82 2451 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@82 2452 ;;
Chris@82 2453 aix,no) # traditional AIX only
Chris@82 2454 dynamic_linker='AIX lib.a[(]lib.so.V[)]'
Chris@82 2455 # We preserve .a as extension for shared libraries through AIX4.2
Chris@82 2456 # and later when we are not doing run time linking.
Chris@82 2457 library_names_spec='$libname$release.a $libname.a'
Chris@82 2458 soname_spec='$libname$release$shared_ext$major'
Chris@82 2459 ;;
Chris@82 2460 svr4,*) # full svr4 only
Chris@82 2461 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
Chris@82 2462 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
Chris@82 2463 # We do not specify a path in Import Files, so LIBPATH fires.
Chris@82 2464 shlibpath_overrides_runpath=yes
Chris@82 2465 ;;
Chris@82 2466 *,yes) # both, prefer svr4
Chris@82 2467 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
Chris@82 2468 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
Chris@82 2469 # unpreferred sharedlib libNAME.a needs extra handling
Chris@82 2470 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
Chris@82 2471 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
Chris@82 2472 # We do not specify a path in Import Files, so LIBPATH fires.
Chris@82 2473 shlibpath_overrides_runpath=yes
Chris@82 2474 ;;
Chris@82 2475 *,no) # both, prefer aix
Chris@82 2476 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
Chris@82 2477 library_names_spec='$libname$release.a $libname.a'
Chris@82 2478 soname_spec='$libname$release$shared_ext$major'
Chris@82 2479 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
Chris@82 2480 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
Chris@82 2481 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
Chris@82 2482 ;;
Chris@82 2483 esac
Chris@82 2484 shlibpath_var=LIBPATH
Chris@82 2485 fi
Chris@82 2486 ;;
Chris@82 2487
Chris@82 2488 amigaos*)
Chris@82 2489 case $host_cpu in
Chris@82 2490 powerpc)
Chris@82 2491 # Since July 2007 AmigaOS4 officially supports .so libraries.
Chris@82 2492 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
Chris@82 2493 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@82 2494 ;;
Chris@82 2495 m68k)
Chris@82 2496 library_names_spec='$libname.ixlibrary $libname.a'
Chris@82 2497 # Create ${libname}_ixlibrary.a entries in /sys/libs.
Chris@82 2498 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
Chris@82 2499 ;;
Chris@82 2500 esac
Chris@82 2501 ;;
Chris@82 2502
Chris@82 2503 beos*)
Chris@82 2504 library_names_spec='$libname$shared_ext'
Chris@82 2505 dynamic_linker="$host_os ld.so"
Chris@82 2506 shlibpath_var=LIBRARY_PATH
Chris@82 2507 ;;
Chris@82 2508
Chris@82 2509 bsdi[[45]]*)
Chris@82 2510 version_type=linux # correct to gnu/linux during the next big refactor
Chris@82 2511 need_version=no
Chris@82 2512 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@82 2513 soname_spec='$libname$release$shared_ext$major'
Chris@82 2514 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
Chris@82 2515 shlibpath_var=LD_LIBRARY_PATH
Chris@82 2516 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
Chris@82 2517 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
Chris@82 2518 # the default ld.so.conf also contains /usr/contrib/lib and
Chris@82 2519 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
Chris@82 2520 # libtool to hard-code these into programs
Chris@82 2521 ;;
Chris@82 2522
Chris@82 2523 cygwin* | mingw* | pw32* | cegcc*)
Chris@82 2524 version_type=windows
Chris@82 2525 shrext_cmds=.dll
Chris@82 2526 need_version=no
Chris@82 2527 need_lib_prefix=no
Chris@82 2528
Chris@82 2529 case $GCC,$cc_basename in
Chris@82 2530 yes,*)
Chris@82 2531 # gcc
Chris@82 2532 library_names_spec='$libname.dll.a'
Chris@82 2533 # DLL is installed to $(libdir)/../bin by postinstall_cmds
Chris@82 2534 postinstall_cmds='base_file=`basename \$file`~
Chris@82 2535 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
Chris@82 2536 dldir=$destdir/`dirname \$dlpath`~
Chris@82 2537 test -d \$dldir || mkdir -p \$dldir~
Chris@82 2538 $install_prog $dir/$dlname \$dldir/$dlname~
Chris@82 2539 chmod a+x \$dldir/$dlname~
Chris@82 2540 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
Chris@82 2541 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
Chris@82 2542 fi'
Chris@82 2543 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
Chris@82 2544 dlpath=$dir/\$dldll~
Chris@82 2545 $RM \$dlpath'
Chris@82 2546 shlibpath_overrides_runpath=yes
Chris@82 2547
Chris@82 2548 case $host_os in
Chris@82 2549 cygwin*)
Chris@82 2550 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
Chris@82 2551 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
Chris@82 2552 m4_if([$1], [],[
Chris@82 2553 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
Chris@82 2554 ;;
Chris@82 2555 mingw* | cegcc*)
Chris@82 2556 # MinGW DLLs use traditional 'lib' prefix
Chris@82 2557 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
Chris@82 2558 ;;
Chris@82 2559 pw32*)
Chris@82 2560 # pw32 DLLs use 'pw' prefix rather than 'lib'
Chris@82 2561 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
Chris@82 2562 ;;
Chris@82 2563 esac
Chris@82 2564 dynamic_linker='Win32 ld.exe'
Chris@82 2565 ;;
Chris@82 2566
Chris@82 2567 *,cl*)
Chris@82 2568 # Native MSVC
Chris@82 2569 libname_spec='$name'
Chris@82 2570 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
Chris@82 2571 library_names_spec='$libname.dll.lib'
Chris@82 2572
Chris@82 2573 case $build_os in
Chris@82 2574 mingw*)
Chris@82 2575 sys_lib_search_path_spec=
Chris@82 2576 lt_save_ifs=$IFS
Chris@82 2577 IFS=';'
Chris@82 2578 for lt_path in $LIB
Chris@82 2579 do
Chris@82 2580 IFS=$lt_save_ifs
Chris@82 2581 # Let DOS variable expansion print the short 8.3 style file name.
Chris@82 2582 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
Chris@82 2583 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
Chris@82 2584 done
Chris@82 2585 IFS=$lt_save_ifs
Chris@82 2586 # Convert to MSYS style.
Chris@82 2587 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
Chris@82 2588 ;;
Chris@82 2589 cygwin*)
Chris@82 2590 # Convert to unix form, then to dos form, then back to unix form
Chris@82 2591 # but this time dos style (no spaces!) so that the unix form looks
Chris@82 2592 # like /cygdrive/c/PROGRA~1:/cygdr...
Chris@82 2593 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
Chris@82 2594 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
Chris@82 2595 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
Chris@82 2596 ;;
Chris@82 2597 *)
Chris@82 2598 sys_lib_search_path_spec=$LIB
Chris@82 2599 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
Chris@82 2600 # It is most probably a Windows format PATH.
Chris@82 2601 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
Chris@82 2602 else
Chris@82 2603 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
Chris@82 2604 fi
Chris@82 2605 # FIXME: find the short name or the path components, as spaces are
Chris@82 2606 # common. (e.g. "Program Files" -> "PROGRA~1")
Chris@82 2607 ;;
Chris@82 2608 esac
Chris@82 2609
Chris@82 2610 # DLL is installed to $(libdir)/../bin by postinstall_cmds
Chris@82 2611 postinstall_cmds='base_file=`basename \$file`~
Chris@82 2612 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
Chris@82 2613 dldir=$destdir/`dirname \$dlpath`~
Chris@82 2614 test -d \$dldir || mkdir -p \$dldir~
Chris@82 2615 $install_prog $dir/$dlname \$dldir/$dlname'
Chris@82 2616 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
Chris@82 2617 dlpath=$dir/\$dldll~
Chris@82 2618 $RM \$dlpath'
Chris@82 2619 shlibpath_overrides_runpath=yes
Chris@82 2620 dynamic_linker='Win32 link.exe'
Chris@82 2621 ;;
Chris@82 2622
Chris@82 2623 *)
Chris@82 2624 # Assume MSVC wrapper
Chris@82 2625 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
Chris@82 2626 dynamic_linker='Win32 ld.exe'
Chris@82 2627 ;;
Chris@82 2628 esac
Chris@82 2629 # FIXME: first we should search . and the directory the executable is in
Chris@82 2630 shlibpath_var=PATH
Chris@82 2631 ;;
Chris@82 2632
Chris@82 2633 darwin* | rhapsody*)
Chris@82 2634 dynamic_linker="$host_os dyld"
Chris@82 2635 version_type=darwin
Chris@82 2636 need_lib_prefix=no
Chris@82 2637 need_version=no
Chris@82 2638 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
Chris@82 2639 soname_spec='$libname$release$major$shared_ext'
Chris@82 2640 shlibpath_overrides_runpath=yes
Chris@82 2641 shlibpath_var=DYLD_LIBRARY_PATH
Chris@82 2642 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
Chris@82 2643 m4_if([$1], [],[
Chris@82 2644 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
Chris@82 2645 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
Chris@82 2646 ;;
Chris@82 2647
Chris@82 2648 dgux*)
Chris@82 2649 version_type=linux # correct to gnu/linux during the next big refactor
Chris@82 2650 need_lib_prefix=no
Chris@82 2651 need_version=no
Chris@82 2652 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@82 2653 soname_spec='$libname$release$shared_ext$major'
Chris@82 2654 shlibpath_var=LD_LIBRARY_PATH
Chris@82 2655 ;;
Chris@82 2656
Chris@82 2657 freebsd* | dragonfly*)
Chris@82 2658 # DragonFly does not have aout. When/if they implement a new
Chris@82 2659 # versioning mechanism, adjust this.
Chris@82 2660 if test -x /usr/bin/objformat; then
Chris@82 2661 objformat=`/usr/bin/objformat`
Chris@82 2662 else
Chris@82 2663 case $host_os in
Chris@82 2664 freebsd[[23]].*) objformat=aout ;;
Chris@82 2665 *) objformat=elf ;;
Chris@82 2666 esac
Chris@82 2667 fi
Chris@82 2668 version_type=freebsd-$objformat
Chris@82 2669 case $version_type in
Chris@82 2670 freebsd-elf*)
Chris@82 2671 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@82 2672 soname_spec='$libname$release$shared_ext$major'
Chris@82 2673 need_version=no
Chris@82 2674 need_lib_prefix=no
Chris@82 2675 ;;
Chris@82 2676 freebsd-*)
Chris@82 2677 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
Chris@82 2678 need_version=yes
Chris@82 2679 ;;
Chris@82 2680 esac
Chris@82 2681 shlibpath_var=LD_LIBRARY_PATH
Chris@82 2682 case $host_os in
Chris@82 2683 freebsd2.*)
Chris@82 2684 shlibpath_overrides_runpath=yes
Chris@82 2685 ;;
Chris@82 2686 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
Chris@82 2687 shlibpath_overrides_runpath=yes
Chris@82 2688 hardcode_into_libs=yes
Chris@82 2689 ;;
Chris@82 2690 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
Chris@82 2691 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
Chris@82 2692 shlibpath_overrides_runpath=no
Chris@82 2693 hardcode_into_libs=yes
Chris@82 2694 ;;
Chris@82 2695 *) # from 4.6 on, and DragonFly
Chris@82 2696 shlibpath_overrides_runpath=yes
Chris@82 2697 hardcode_into_libs=yes
Chris@82 2698 ;;
Chris@82 2699 esac
Chris@82 2700 ;;
Chris@82 2701
Chris@82 2702 haiku*)
Chris@82 2703 version_type=linux # correct to gnu/linux during the next big refactor
Chris@82 2704 need_lib_prefix=no
Chris@82 2705 need_version=no
Chris@82 2706 dynamic_linker="$host_os runtime_loader"
Chris@82 2707 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@82 2708 soname_spec='$libname$release$shared_ext$major'
Chris@82 2709 shlibpath_var=LIBRARY_PATH
Chris@82 2710 shlibpath_overrides_runpath=no
Chris@82 2711 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
Chris@82 2712 hardcode_into_libs=yes
Chris@82 2713 ;;
Chris@82 2714
Chris@82 2715 hpux9* | hpux10* | hpux11*)
Chris@82 2716 # Give a soname corresponding to the major version so that dld.sl refuses to
Chris@82 2717 # link against other versions.
Chris@82 2718 version_type=sunos
Chris@82 2719 need_lib_prefix=no
Chris@82 2720 need_version=no
Chris@82 2721 case $host_cpu in
Chris@82 2722 ia64*)
Chris@82 2723 shrext_cmds='.so'
Chris@82 2724 hardcode_into_libs=yes
Chris@82 2725 dynamic_linker="$host_os dld.so"
Chris@82 2726 shlibpath_var=LD_LIBRARY_PATH
Chris@82 2727 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
Chris@82 2728 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@82 2729 soname_spec='$libname$release$shared_ext$major'
Chris@82 2730 if test 32 = "$HPUX_IA64_MODE"; then
Chris@82 2731 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
Chris@82 2732 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
Chris@82 2733 else
Chris@82 2734 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
Chris@82 2735 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
Chris@82 2736 fi
Chris@82 2737 ;;
Chris@82 2738 hppa*64*)
Chris@82 2739 shrext_cmds='.sl'
Chris@82 2740 hardcode_into_libs=yes
Chris@82 2741 dynamic_linker="$host_os dld.sl"
Chris@82 2742 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
Chris@82 2743 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
Chris@82 2744 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@82 2745 soname_spec='$libname$release$shared_ext$major'
Chris@82 2746 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
Chris@82 2747 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
Chris@82 2748 ;;
Chris@82 2749 *)
Chris@82 2750 shrext_cmds='.sl'
Chris@82 2751 dynamic_linker="$host_os dld.sl"
Chris@82 2752 shlibpath_var=SHLIB_PATH
Chris@82 2753 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
Chris@82 2754 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@82 2755 soname_spec='$libname$release$shared_ext$major'
Chris@82 2756 ;;
Chris@82 2757 esac
Chris@82 2758 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
Chris@82 2759 postinstall_cmds='chmod 555 $lib'
Chris@82 2760 # or fails outright, so override atomically:
Chris@82 2761 install_override_mode=555
Chris@82 2762 ;;
Chris@82 2763
Chris@82 2764 interix[[3-9]]*)
Chris@82 2765 version_type=linux # correct to gnu/linux during the next big refactor
Chris@82 2766 need_lib_prefix=no
Chris@82 2767 need_version=no
Chris@82 2768 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@82 2769 soname_spec='$libname$release$shared_ext$major'
Chris@82 2770 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
Chris@82 2771 shlibpath_var=LD_LIBRARY_PATH
Chris@82 2772 shlibpath_overrides_runpath=no
Chris@82 2773 hardcode_into_libs=yes
Chris@82 2774 ;;
Chris@82 2775
Chris@82 2776 irix5* | irix6* | nonstopux*)
Chris@82 2777 case $host_os in
Chris@82 2778 nonstopux*) version_type=nonstopux ;;
Chris@82 2779 *)
Chris@82 2780 if test yes = "$lt_cv_prog_gnu_ld"; then
Chris@82 2781 version_type=linux # correct to gnu/linux during the next big refactor
Chris@82 2782 else
Chris@82 2783 version_type=irix
Chris@82 2784 fi ;;
Chris@82 2785 esac
Chris@82 2786 need_lib_prefix=no
Chris@82 2787 need_version=no
Chris@82 2788 soname_spec='$libname$release$shared_ext$major'
Chris@82 2789 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
Chris@82 2790 case $host_os in
Chris@82 2791 irix5* | nonstopux*)
Chris@82 2792 libsuff= shlibsuff=
Chris@82 2793 ;;
Chris@82 2794 *)
Chris@82 2795 case $LD in # libtool.m4 will add one of these switches to LD
Chris@82 2796 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
Chris@82 2797 libsuff= shlibsuff= libmagic=32-bit;;
Chris@82 2798 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
Chris@82 2799 libsuff=32 shlibsuff=N32 libmagic=N32;;
Chris@82 2800 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
Chris@82 2801 libsuff=64 shlibsuff=64 libmagic=64-bit;;
Chris@82 2802 *) libsuff= shlibsuff= libmagic=never-match;;
Chris@82 2803 esac
Chris@82 2804 ;;
Chris@82 2805 esac
Chris@82 2806 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
Chris@82 2807 shlibpath_overrides_runpath=no
Chris@82 2808 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
Chris@82 2809 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
Chris@82 2810 hardcode_into_libs=yes
Chris@82 2811 ;;
Chris@82 2812
Chris@82 2813 # No shared lib support for Linux oldld, aout, or coff.
Chris@82 2814 linux*oldld* | linux*aout* | linux*coff*)
Chris@82 2815 dynamic_linker=no
Chris@82 2816 ;;
Chris@82 2817
Chris@82 2818 linux*android*)
Chris@82 2819 version_type=none # Android doesn't support versioned libraries.
Chris@82 2820 need_lib_prefix=no
Chris@82 2821 need_version=no
Chris@82 2822 library_names_spec='$libname$release$shared_ext'
Chris@82 2823 soname_spec='$libname$release$shared_ext'
Chris@82 2824 finish_cmds=
Chris@82 2825 shlibpath_var=LD_LIBRARY_PATH
Chris@82 2826 shlibpath_overrides_runpath=yes
Chris@82 2827
Chris@82 2828 # This implies no fast_install, which is unacceptable.
Chris@82 2829 # Some rework will be needed to allow for fast_install
Chris@82 2830 # before this can be enabled.
Chris@82 2831 hardcode_into_libs=yes
Chris@82 2832
Chris@82 2833 dynamic_linker='Android linker'
Chris@82 2834 # Don't embed -rpath directories since the linker doesn't support them.
Chris@82 2835 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@82 2836 ;;
Chris@82 2837
Chris@82 2838 # This must be glibc/ELF.
Chris@82 2839 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
Chris@82 2840 version_type=linux # correct to gnu/linux during the next big refactor
Chris@82 2841 need_lib_prefix=no
Chris@82 2842 need_version=no
Chris@82 2843 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@82 2844 soname_spec='$libname$release$shared_ext$major'
Chris@82 2845 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
Chris@82 2846 shlibpath_var=LD_LIBRARY_PATH
Chris@82 2847 shlibpath_overrides_runpath=no
Chris@82 2848
Chris@82 2849 # Some binutils ld are patched to set DT_RUNPATH
Chris@82 2850 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
Chris@82 2851 [lt_cv_shlibpath_overrides_runpath=no
Chris@82 2852 save_LDFLAGS=$LDFLAGS
Chris@82 2853 save_libdir=$libdir
Chris@82 2854 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
Chris@82 2855 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
Chris@82 2856 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
Chris@82 2857 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
Chris@82 2858 [lt_cv_shlibpath_overrides_runpath=yes])])
Chris@82 2859 LDFLAGS=$save_LDFLAGS
Chris@82 2860 libdir=$save_libdir
Chris@82 2861 ])
Chris@82 2862 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
Chris@82 2863
Chris@82 2864 # This implies no fast_install, which is unacceptable.
Chris@82 2865 # Some rework will be needed to allow for fast_install
Chris@82 2866 # before this can be enabled.
Chris@82 2867 hardcode_into_libs=yes
Chris@82 2868
Chris@82 2869 # Ideally, we could use ldconfig to report *all* directores which are
Chris@82 2870 # searched for libraries, however this is still not possible. Aside from not
Chris@82 2871 # being certain /sbin/ldconfig is available, command
Chris@82 2872 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
Chris@82 2873 # even though it is searched at run-time. Try to do the best guess by
Chris@82 2874 # appending ld.so.conf contents (and includes) to the search path.
Chris@82 2875 if test -f /etc/ld.so.conf; then
Chris@82 2876 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
Chris@82 2877 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
Chris@82 2878 fi
Chris@82 2879
Chris@82 2880 # We used to test for /lib/ld.so.1 and disable shared libraries on
Chris@82 2881 # powerpc, because MkLinux only supported shared libraries with the
Chris@82 2882 # GNU dynamic linker. Since this was broken with cross compilers,
Chris@82 2883 # most powerpc-linux boxes support dynamic linking these days and
Chris@82 2884 # people can always --disable-shared, the test was removed, and we
Chris@82 2885 # assume the GNU/Linux dynamic linker is in use.
Chris@82 2886 dynamic_linker='GNU/Linux ld.so'
Chris@82 2887 ;;
Chris@82 2888
Chris@82 2889 netbsdelf*-gnu)
Chris@82 2890 version_type=linux
Chris@82 2891 need_lib_prefix=no
Chris@82 2892 need_version=no
Chris@82 2893 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
Chris@82 2894 soname_spec='${libname}${release}${shared_ext}$major'
Chris@82 2895 shlibpath_var=LD_LIBRARY_PATH
Chris@82 2896 shlibpath_overrides_runpath=no
Chris@82 2897 hardcode_into_libs=yes
Chris@82 2898 dynamic_linker='NetBSD ld.elf_so'
Chris@82 2899 ;;
Chris@82 2900
Chris@82 2901 netbsd*)
Chris@82 2902 version_type=sunos
Chris@82 2903 need_lib_prefix=no
Chris@82 2904 need_version=no
Chris@82 2905 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
Chris@82 2906 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
Chris@82 2907 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
Chris@82 2908 dynamic_linker='NetBSD (a.out) ld.so'
Chris@82 2909 else
Chris@82 2910 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@82 2911 soname_spec='$libname$release$shared_ext$major'
Chris@82 2912 dynamic_linker='NetBSD ld.elf_so'
Chris@82 2913 fi
Chris@82 2914 shlibpath_var=LD_LIBRARY_PATH
Chris@82 2915 shlibpath_overrides_runpath=yes
Chris@82 2916 hardcode_into_libs=yes
Chris@82 2917 ;;
Chris@82 2918
Chris@82 2919 newsos6)
Chris@82 2920 version_type=linux # correct to gnu/linux during the next big refactor
Chris@82 2921 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@82 2922 shlibpath_var=LD_LIBRARY_PATH
Chris@82 2923 shlibpath_overrides_runpath=yes
Chris@82 2924 ;;
Chris@82 2925
Chris@82 2926 *nto* | *qnx*)
Chris@82 2927 version_type=qnx
Chris@82 2928 need_lib_prefix=no
Chris@82 2929 need_version=no
Chris@82 2930 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@82 2931 soname_spec='$libname$release$shared_ext$major'
Chris@82 2932 shlibpath_var=LD_LIBRARY_PATH
Chris@82 2933 shlibpath_overrides_runpath=no
Chris@82 2934 hardcode_into_libs=yes
Chris@82 2935 dynamic_linker='ldqnx.so'
Chris@82 2936 ;;
Chris@82 2937
Chris@82 2938 openbsd* | bitrig*)
Chris@82 2939 version_type=sunos
Chris@82 2940 sys_lib_dlsearch_path_spec=/usr/lib
Chris@82 2941 need_lib_prefix=no
Chris@82 2942 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
Chris@82 2943 need_version=no
Chris@82 2944 else
Chris@82 2945 need_version=yes
Chris@82 2946 fi
Chris@82 2947 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
Chris@82 2948 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
Chris@82 2949 shlibpath_var=LD_LIBRARY_PATH
Chris@82 2950 shlibpath_overrides_runpath=yes
Chris@82 2951 ;;
Chris@82 2952
Chris@82 2953 os2*)
Chris@82 2954 libname_spec='$name'
Chris@82 2955 version_type=windows
Chris@82 2956 shrext_cmds=.dll
Chris@82 2957 need_version=no
Chris@82 2958 need_lib_prefix=no
Chris@82 2959 # OS/2 can only load a DLL with a base name of 8 characters or less.
Chris@82 2960 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
Chris@82 2961 v=$($ECHO $release$versuffix | tr -d .-);
Chris@82 2962 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
Chris@82 2963 $ECHO $n$v`$shared_ext'
Chris@82 2964 library_names_spec='${libname}_dll.$libext'
Chris@82 2965 dynamic_linker='OS/2 ld.exe'
Chris@82 2966 shlibpath_var=BEGINLIBPATH
Chris@82 2967 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
Chris@82 2968 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
Chris@82 2969 postinstall_cmds='base_file=`basename \$file`~
Chris@82 2970 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
Chris@82 2971 dldir=$destdir/`dirname \$dlpath`~
Chris@82 2972 test -d \$dldir || mkdir -p \$dldir~
Chris@82 2973 $install_prog $dir/$dlname \$dldir/$dlname~
Chris@82 2974 chmod a+x \$dldir/$dlname~
Chris@82 2975 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
Chris@82 2976 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
Chris@82 2977 fi'
Chris@82 2978 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
Chris@82 2979 dlpath=$dir/\$dldll~
Chris@82 2980 $RM \$dlpath'
Chris@82 2981 ;;
Chris@82 2982
Chris@82 2983 osf3* | osf4* | osf5*)
Chris@82 2984 version_type=osf
Chris@82 2985 need_lib_prefix=no
Chris@82 2986 need_version=no
Chris@82 2987 soname_spec='$libname$release$shared_ext$major'
Chris@82 2988 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@82 2989 shlibpath_var=LD_LIBRARY_PATH
Chris@82 2990 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
Chris@82 2991 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
Chris@82 2992 ;;
Chris@82 2993
Chris@82 2994 rdos*)
Chris@82 2995 dynamic_linker=no
Chris@82 2996 ;;
Chris@82 2997
Chris@82 2998 solaris*)
Chris@82 2999 version_type=linux # correct to gnu/linux during the next big refactor
Chris@82 3000 need_lib_prefix=no
Chris@82 3001 need_version=no
Chris@82 3002 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@82 3003 soname_spec='$libname$release$shared_ext$major'
Chris@82 3004 shlibpath_var=LD_LIBRARY_PATH
Chris@82 3005 shlibpath_overrides_runpath=yes
Chris@82 3006 hardcode_into_libs=yes
Chris@82 3007 # ldd complains unless libraries are executable
Chris@82 3008 postinstall_cmds='chmod +x $lib'
Chris@82 3009 ;;
Chris@82 3010
Chris@82 3011 sunos4*)
Chris@82 3012 version_type=sunos
Chris@82 3013 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
Chris@82 3014 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
Chris@82 3015 shlibpath_var=LD_LIBRARY_PATH
Chris@82 3016 shlibpath_overrides_runpath=yes
Chris@82 3017 if test yes = "$with_gnu_ld"; then
Chris@82 3018 need_lib_prefix=no
Chris@82 3019 fi
Chris@82 3020 need_version=yes
Chris@82 3021 ;;
Chris@82 3022
Chris@82 3023 sysv4 | sysv4.3*)
Chris@82 3024 version_type=linux # correct to gnu/linux during the next big refactor
Chris@82 3025 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@82 3026 soname_spec='$libname$release$shared_ext$major'
Chris@82 3027 shlibpath_var=LD_LIBRARY_PATH
Chris@82 3028 case $host_vendor in
Chris@82 3029 sni)
Chris@82 3030 shlibpath_overrides_runpath=no
Chris@82 3031 need_lib_prefix=no
Chris@82 3032 runpath_var=LD_RUN_PATH
Chris@82 3033 ;;
Chris@82 3034 siemens)
Chris@82 3035 need_lib_prefix=no
Chris@82 3036 ;;
Chris@82 3037 motorola)
Chris@82 3038 need_lib_prefix=no
Chris@82 3039 need_version=no
Chris@82 3040 shlibpath_overrides_runpath=no
Chris@82 3041 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
Chris@82 3042 ;;
Chris@82 3043 esac
Chris@82 3044 ;;
Chris@82 3045
Chris@82 3046 sysv4*MP*)
Chris@82 3047 if test -d /usr/nec; then
Chris@82 3048 version_type=linux # correct to gnu/linux during the next big refactor
Chris@82 3049 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
Chris@82 3050 soname_spec='$libname$shared_ext.$major'
Chris@82 3051 shlibpath_var=LD_LIBRARY_PATH
Chris@82 3052 fi
Chris@82 3053 ;;
Chris@82 3054
Chris@82 3055 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
Chris@82 3056 version_type=sco
Chris@82 3057 need_lib_prefix=no
Chris@82 3058 need_version=no
Chris@82 3059 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
Chris@82 3060 soname_spec='$libname$release$shared_ext$major'
Chris@82 3061 shlibpath_var=LD_LIBRARY_PATH
Chris@82 3062 shlibpath_overrides_runpath=yes
Chris@82 3063 hardcode_into_libs=yes
Chris@82 3064 if test yes = "$with_gnu_ld"; then
Chris@82 3065 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
Chris@82 3066 else
Chris@82 3067 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
Chris@82 3068 case $host_os in
Chris@82 3069 sco3.2v5*)
Chris@82 3070 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
Chris@82 3071 ;;
Chris@82 3072 esac
Chris@82 3073 fi
Chris@82 3074 sys_lib_dlsearch_path_spec='/usr/lib'
Chris@82 3075 ;;
Chris@82 3076
Chris@82 3077 tpf*)
Chris@82 3078 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
Chris@82 3079 version_type=linux # correct to gnu/linux during the next big refactor
Chris@82 3080 need_lib_prefix=no
Chris@82 3081 need_version=no
Chris@82 3082 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@82 3083 shlibpath_var=LD_LIBRARY_PATH
Chris@82 3084 shlibpath_overrides_runpath=no
Chris@82 3085 hardcode_into_libs=yes
Chris@82 3086 ;;
Chris@82 3087
Chris@82 3088 uts4*)
Chris@82 3089 version_type=linux # correct to gnu/linux during the next big refactor
Chris@82 3090 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
Chris@82 3091 soname_spec='$libname$release$shared_ext$major'
Chris@82 3092 shlibpath_var=LD_LIBRARY_PATH
Chris@82 3093 ;;
Chris@82 3094
Chris@82 3095 *)
Chris@82 3096 dynamic_linker=no
Chris@82 3097 ;;
Chris@82 3098 esac
Chris@82 3099 AC_MSG_RESULT([$dynamic_linker])
Chris@82 3100 test no = "$dynamic_linker" && can_build_shared=no
Chris@82 3101
Chris@82 3102 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
Chris@82 3103 if test yes = "$GCC"; then
Chris@82 3104 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
Chris@82 3105 fi
Chris@82 3106
Chris@82 3107 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
Chris@82 3108 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
Chris@82 3109 fi
Chris@82 3110
Chris@82 3111 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
Chris@82 3112 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
Chris@82 3113 fi
Chris@82 3114
Chris@82 3115 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
Chris@82 3116 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
Chris@82 3117
Chris@82 3118 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
Chris@82 3119 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
Chris@82 3120
Chris@82 3121 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
Chris@82 3122 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
Chris@82 3123
Chris@82 3124 _LT_DECL([], [variables_saved_for_relink], [1],
Chris@82 3125 [Variables whose values should be saved in libtool wrapper scripts and
Chris@82 3126 restored at link time])
Chris@82 3127 _LT_DECL([], [need_lib_prefix], [0],
Chris@82 3128 [Do we need the "lib" prefix for modules?])
Chris@82 3129 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
Chris@82 3130 _LT_DECL([], [version_type], [0], [Library versioning type])
Chris@82 3131 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
Chris@82 3132 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
Chris@82 3133 _LT_DECL([], [shlibpath_overrides_runpath], [0],
Chris@82 3134 [Is shlibpath searched before the hard-coded library search path?])
Chris@82 3135 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
Chris@82 3136 _LT_DECL([], [library_names_spec], [1],
Chris@82 3137 [[List of archive names. First name is the real one, the rest are links.
Chris@82 3138 The last name is the one that the linker finds with -lNAME]])
Chris@82 3139 _LT_DECL([], [soname_spec], [1],
Chris@82 3140 [[The coded name of the library, if different from the real name]])
Chris@82 3141 _LT_DECL([], [install_override_mode], [1],
Chris@82 3142 [Permission mode override for installation of shared libraries])
Chris@82 3143 _LT_DECL([], [postinstall_cmds], [2],
Chris@82 3144 [Command to use after installation of a shared archive])
Chris@82 3145 _LT_DECL([], [postuninstall_cmds], [2],
Chris@82 3146 [Command to use after uninstallation of a shared archive])
Chris@82 3147 _LT_DECL([], [finish_cmds], [2],
Chris@82 3148 [Commands used to finish a libtool library installation in a directory])
Chris@82 3149 _LT_DECL([], [finish_eval], [1],
Chris@82 3150 [[As "finish_cmds", except a single script fragment to be evaled but
Chris@82 3151 not shown]])
Chris@82 3152 _LT_DECL([], [hardcode_into_libs], [0],
Chris@82 3153 [Whether we should hardcode library paths into libraries])
Chris@82 3154 _LT_DECL([], [sys_lib_search_path_spec], [2],
Chris@82 3155 [Compile-time system search path for libraries])
Chris@82 3156 _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
Chris@82 3157 [Detected run-time system search path for libraries])
Chris@82 3158 _LT_DECL([], [configure_time_lt_sys_library_path], [2],
Chris@82 3159 [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
Chris@82 3160 ])# _LT_SYS_DYNAMIC_LINKER
Chris@82 3161
Chris@82 3162
Chris@82 3163 # _LT_PATH_TOOL_PREFIX(TOOL)
Chris@82 3164 # --------------------------
Chris@82 3165 # find a file program that can recognize shared library
Chris@82 3166 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
Chris@82 3167 [m4_require([_LT_DECL_EGREP])dnl
Chris@82 3168 AC_MSG_CHECKING([for $1])
Chris@82 3169 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
Chris@82 3170 [case $MAGIC_CMD in
Chris@82 3171 [[\\/*] | ?:[\\/]*])
Chris@82 3172 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
Chris@82 3173 ;;
Chris@82 3174 *)
Chris@82 3175 lt_save_MAGIC_CMD=$MAGIC_CMD
Chris@82 3176 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
Chris@82 3177 dnl $ac_dummy forces splitting on constant user-supplied paths.
Chris@82 3178 dnl POSIX.2 word splitting is done only on the output of word expansions,
Chris@82 3179 dnl not every word. This closes a longstanding sh security hole.
Chris@82 3180 ac_dummy="m4_if([$2], , $PATH, [$2])"
Chris@82 3181 for ac_dir in $ac_dummy; do
Chris@82 3182 IFS=$lt_save_ifs
Chris@82 3183 test -z "$ac_dir" && ac_dir=.
Chris@82 3184 if test -f "$ac_dir/$1"; then
Chris@82 3185 lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
Chris@82 3186 if test -n "$file_magic_test_file"; then
Chris@82 3187 case $deplibs_check_method in
Chris@82 3188 "file_magic "*)
Chris@82 3189 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
Chris@82 3190 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
Chris@82 3191 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
Chris@82 3192 $EGREP "$file_magic_regex" > /dev/null; then
Chris@82 3193 :
Chris@82 3194 else
Chris@82 3195 cat <<_LT_EOF 1>&2
Chris@82 3196
Chris@82 3197 *** Warning: the command libtool uses to detect shared libraries,
Chris@82 3198 *** $file_magic_cmd, produces output that libtool cannot recognize.
Chris@82 3199 *** The result is that libtool may fail to recognize shared libraries
Chris@82 3200 *** as such. This will affect the creation of libtool libraries that
Chris@82 3201 *** depend on shared libraries, but programs linked with such libtool
Chris@82 3202 *** libraries will work regardless of this problem. Nevertheless, you
Chris@82 3203 *** may want to report the problem to your system manager and/or to
Chris@82 3204 *** bug-libtool@gnu.org
Chris@82 3205
Chris@82 3206 _LT_EOF
Chris@82 3207 fi ;;
Chris@82 3208 esac
Chris@82 3209 fi
Chris@82 3210 break
Chris@82 3211 fi
Chris@82 3212 done
Chris@82 3213 IFS=$lt_save_ifs
Chris@82 3214 MAGIC_CMD=$lt_save_MAGIC_CMD
Chris@82 3215 ;;
Chris@82 3216 esac])
Chris@82 3217 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
Chris@82 3218 if test -n "$MAGIC_CMD"; then
Chris@82 3219 AC_MSG_RESULT($MAGIC_CMD)
Chris@82 3220 else
Chris@82 3221 AC_MSG_RESULT(no)
Chris@82 3222 fi
Chris@82 3223 _LT_DECL([], [MAGIC_CMD], [0],
Chris@82 3224 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
Chris@82 3225 ])# _LT_PATH_TOOL_PREFIX
Chris@82 3226
Chris@82 3227 # Old name:
Chris@82 3228 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
Chris@82 3229 dnl aclocal-1.4 backwards compatibility:
Chris@82 3230 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
Chris@82 3231
Chris@82 3232
Chris@82 3233 # _LT_PATH_MAGIC
Chris@82 3234 # --------------
Chris@82 3235 # find a file program that can recognize a shared library
Chris@82 3236 m4_defun([_LT_PATH_MAGIC],
Chris@82 3237 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
Chris@82 3238 if test -z "$lt_cv_path_MAGIC_CMD"; then
Chris@82 3239 if test -n "$ac_tool_prefix"; then
Chris@82 3240 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
Chris@82 3241 else
Chris@82 3242 MAGIC_CMD=:
Chris@82 3243 fi
Chris@82 3244 fi
Chris@82 3245 ])# _LT_PATH_MAGIC
Chris@82 3246
Chris@82 3247
Chris@82 3248 # LT_PATH_LD
Chris@82 3249 # ----------
Chris@82 3250 # find the pathname to the GNU or non-GNU linker
Chris@82 3251 AC_DEFUN([LT_PATH_LD],
Chris@82 3252 [AC_REQUIRE([AC_PROG_CC])dnl
Chris@82 3253 AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@82 3254 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
Chris@82 3255 m4_require([_LT_DECL_SED])dnl
Chris@82 3256 m4_require([_LT_DECL_EGREP])dnl
Chris@82 3257 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
Chris@82 3258
Chris@82 3259 AC_ARG_WITH([gnu-ld],
Chris@82 3260 [AS_HELP_STRING([--with-gnu-ld],
Chris@82 3261 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
Chris@82 3262 [test no = "$withval" || with_gnu_ld=yes],
Chris@82 3263 [with_gnu_ld=no])dnl
Chris@82 3264
Chris@82 3265 ac_prog=ld
Chris@82 3266 if test yes = "$GCC"; then
Chris@82 3267 # Check if gcc -print-prog-name=ld gives a path.
Chris@82 3268 AC_MSG_CHECKING([for ld used by $CC])
Chris@82 3269 case $host in
Chris@82 3270 *-*-mingw*)
Chris@82 3271 # gcc leaves a trailing carriage return, which upsets mingw
Chris@82 3272 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
Chris@82 3273 *)
Chris@82 3274 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
Chris@82 3275 esac
Chris@82 3276 case $ac_prog in
Chris@82 3277 # Accept absolute paths.
Chris@82 3278 [[\\/]]* | ?:[[\\/]]*)
Chris@82 3279 re_direlt='/[[^/]][[^/]]*/\.\./'
Chris@82 3280 # Canonicalize the pathname of ld
Chris@82 3281 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
Chris@82 3282 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
Chris@82 3283 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
Chris@82 3284 done
Chris@82 3285 test -z "$LD" && LD=$ac_prog
Chris@82 3286 ;;
Chris@82 3287 "")
Chris@82 3288 # If it fails, then pretend we aren't using GCC.
Chris@82 3289 ac_prog=ld
Chris@82 3290 ;;
Chris@82 3291 *)
Chris@82 3292 # If it is relative, then search for the first ld in PATH.
Chris@82 3293 with_gnu_ld=unknown
Chris@82 3294 ;;
Chris@82 3295 esac
Chris@82 3296 elif test yes = "$with_gnu_ld"; then
Chris@82 3297 AC_MSG_CHECKING([for GNU ld])
Chris@82 3298 else
Chris@82 3299 AC_MSG_CHECKING([for non-GNU ld])
Chris@82 3300 fi
Chris@82 3301 AC_CACHE_VAL(lt_cv_path_LD,
Chris@82 3302 [if test -z "$LD"; then
Chris@82 3303 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
Chris@82 3304 for ac_dir in $PATH; do
Chris@82 3305 IFS=$lt_save_ifs
Chris@82 3306 test -z "$ac_dir" && ac_dir=.
Chris@82 3307 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
Chris@82 3308 lt_cv_path_LD=$ac_dir/$ac_prog
Chris@82 3309 # Check to see if the program is GNU ld. I'd rather use --version,
Chris@82 3310 # but apparently some variants of GNU ld only accept -v.
Chris@82 3311 # Break only if it was the GNU/non-GNU ld that we prefer.
Chris@82 3312 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
Chris@82 3313 *GNU* | *'with BFD'*)
Chris@82 3314 test no != "$with_gnu_ld" && break
Chris@82 3315 ;;
Chris@82 3316 *)
Chris@82 3317 test yes != "$with_gnu_ld" && break
Chris@82 3318 ;;
Chris@82 3319 esac
Chris@82 3320 fi
Chris@82 3321 done
Chris@82 3322 IFS=$lt_save_ifs
Chris@82 3323 else
Chris@82 3324 lt_cv_path_LD=$LD # Let the user override the test with a path.
Chris@82 3325 fi])
Chris@82 3326 LD=$lt_cv_path_LD
Chris@82 3327 if test -n "$LD"; then
Chris@82 3328 AC_MSG_RESULT($LD)
Chris@82 3329 else
Chris@82 3330 AC_MSG_RESULT(no)
Chris@82 3331 fi
Chris@82 3332 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
Chris@82 3333 _LT_PATH_LD_GNU
Chris@82 3334 AC_SUBST([LD])
Chris@82 3335
Chris@82 3336 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
Chris@82 3337 ])# LT_PATH_LD
Chris@82 3338
Chris@82 3339 # Old names:
Chris@82 3340 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
Chris@82 3341 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
Chris@82 3342 dnl aclocal-1.4 backwards compatibility:
Chris@82 3343 dnl AC_DEFUN([AM_PROG_LD], [])
Chris@82 3344 dnl AC_DEFUN([AC_PROG_LD], [])
Chris@82 3345
Chris@82 3346
Chris@82 3347 # _LT_PATH_LD_GNU
Chris@82 3348 #- --------------
Chris@82 3349 m4_defun([_LT_PATH_LD_GNU],
Chris@82 3350 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
Chris@82 3351 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
Chris@82 3352 case `$LD -v 2>&1 </dev/null` in
Chris@82 3353 *GNU* | *'with BFD'*)
Chris@82 3354 lt_cv_prog_gnu_ld=yes
Chris@82 3355 ;;
Chris@82 3356 *)
Chris@82 3357 lt_cv_prog_gnu_ld=no
Chris@82 3358 ;;
Chris@82 3359 esac])
Chris@82 3360 with_gnu_ld=$lt_cv_prog_gnu_ld
Chris@82 3361 ])# _LT_PATH_LD_GNU
Chris@82 3362
Chris@82 3363
Chris@82 3364 # _LT_CMD_RELOAD
Chris@82 3365 # --------------
Chris@82 3366 # find reload flag for linker
Chris@82 3367 # -- PORTME Some linkers may need a different reload flag.
Chris@82 3368 m4_defun([_LT_CMD_RELOAD],
Chris@82 3369 [AC_CACHE_CHECK([for $LD option to reload object files],
Chris@82 3370 lt_cv_ld_reload_flag,
Chris@82 3371 [lt_cv_ld_reload_flag='-r'])
Chris@82 3372 reload_flag=$lt_cv_ld_reload_flag
Chris@82 3373 case $reload_flag in
Chris@82 3374 "" | " "*) ;;
Chris@82 3375 *) reload_flag=" $reload_flag" ;;
Chris@82 3376 esac
Chris@82 3377 reload_cmds='$LD$reload_flag -o $output$reload_objs'
Chris@82 3378 case $host_os in
Chris@82 3379 cygwin* | mingw* | pw32* | cegcc*)
Chris@82 3380 if test yes != "$GCC"; then
Chris@82 3381 reload_cmds=false
Chris@82 3382 fi
Chris@82 3383 ;;
Chris@82 3384 darwin*)
Chris@82 3385 if test yes = "$GCC"; then
Chris@82 3386 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
Chris@82 3387 else
Chris@82 3388 reload_cmds='$LD$reload_flag -o $output$reload_objs'
Chris@82 3389 fi
Chris@82 3390 ;;
Chris@82 3391 esac
Chris@82 3392 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
Chris@82 3393 _LT_TAGDECL([], [reload_cmds], [2])dnl
Chris@82 3394 ])# _LT_CMD_RELOAD
Chris@82 3395
Chris@82 3396
Chris@82 3397 # _LT_PATH_DD
Chris@82 3398 # -----------
Chris@82 3399 # find a working dd
Chris@82 3400 m4_defun([_LT_PATH_DD],
Chris@82 3401 [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
Chris@82 3402 [printf 0123456789abcdef0123456789abcdef >conftest.i
Chris@82 3403 cat conftest.i conftest.i >conftest2.i
Chris@82 3404 : ${lt_DD:=$DD}
Chris@82 3405 AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
Chris@82 3406 [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
Chris@82 3407 cmp -s conftest.i conftest.out \
Chris@82 3408 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
Chris@82 3409 fi])
Chris@82 3410 rm -f conftest.i conftest2.i conftest.out])
Chris@82 3411 ])# _LT_PATH_DD
Chris@82 3412
Chris@82 3413
Chris@82 3414 # _LT_CMD_TRUNCATE
Chris@82 3415 # ----------------
Chris@82 3416 # find command to truncate a binary pipe
Chris@82 3417 m4_defun([_LT_CMD_TRUNCATE],
Chris@82 3418 [m4_require([_LT_PATH_DD])
Chris@82 3419 AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
Chris@82 3420 [printf 0123456789abcdef0123456789abcdef >conftest.i
Chris@82 3421 cat conftest.i conftest.i >conftest2.i
Chris@82 3422 lt_cv_truncate_bin=
Chris@82 3423 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
Chris@82 3424 cmp -s conftest.i conftest.out \
Chris@82 3425 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
Chris@82 3426 fi
Chris@82 3427 rm -f conftest.i conftest2.i conftest.out
Chris@82 3428 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
Chris@82 3429 _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
Chris@82 3430 [Command to truncate a binary pipe])
Chris@82 3431 ])# _LT_CMD_TRUNCATE
Chris@82 3432
Chris@82 3433
Chris@82 3434 # _LT_CHECK_MAGIC_METHOD
Chris@82 3435 # ----------------------
Chris@82 3436 # how to check for library dependencies
Chris@82 3437 # -- PORTME fill in with the dynamic library characteristics
Chris@82 3438 m4_defun([_LT_CHECK_MAGIC_METHOD],
Chris@82 3439 [m4_require([_LT_DECL_EGREP])
Chris@82 3440 m4_require([_LT_DECL_OBJDUMP])
Chris@82 3441 AC_CACHE_CHECK([how to recognize dependent libraries],
Chris@82 3442 lt_cv_deplibs_check_method,
Chris@82 3443 [lt_cv_file_magic_cmd='$MAGIC_CMD'
Chris@82 3444 lt_cv_file_magic_test_file=
Chris@82 3445 lt_cv_deplibs_check_method='unknown'
Chris@82 3446 # Need to set the preceding variable on all platforms that support
Chris@82 3447 # interlibrary dependencies.
Chris@82 3448 # 'none' -- dependencies not supported.
Chris@82 3449 # 'unknown' -- same as none, but documents that we really don't know.
Chris@82 3450 # 'pass_all' -- all dependencies passed with no checks.
Chris@82 3451 # 'test_compile' -- check by making test program.
Chris@82 3452 # 'file_magic [[regex]]' -- check by looking for files in library path
Chris@82 3453 # that responds to the $file_magic_cmd with a given extended regex.
Chris@82 3454 # If you have 'file' or equivalent on your system and you're not sure
Chris@82 3455 # whether 'pass_all' will *always* work, you probably want this one.
Chris@82 3456
Chris@82 3457 case $host_os in
Chris@82 3458 aix[[4-9]]*)
Chris@82 3459 lt_cv_deplibs_check_method=pass_all
Chris@82 3460 ;;
Chris@82 3461
Chris@82 3462 beos*)
Chris@82 3463 lt_cv_deplibs_check_method=pass_all
Chris@82 3464 ;;
Chris@82 3465
Chris@82 3466 bsdi[[45]]*)
Chris@82 3467 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
Chris@82 3468 lt_cv_file_magic_cmd='/usr/bin/file -L'
Chris@82 3469 lt_cv_file_magic_test_file=/shlib/libc.so
Chris@82 3470 ;;
Chris@82 3471
Chris@82 3472 cygwin*)
Chris@82 3473 # func_win32_libid is a shell function defined in ltmain.sh
Chris@82 3474 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
Chris@82 3475 lt_cv_file_magic_cmd='func_win32_libid'
Chris@82 3476 ;;
Chris@82 3477
Chris@82 3478 mingw* | pw32*)
Chris@82 3479 # Base MSYS/MinGW do not provide the 'file' command needed by
Chris@82 3480 # func_win32_libid shell function, so use a weaker test based on 'objdump',
Chris@82 3481 # unless we find 'file', for example because we are cross-compiling.
Chris@82 3482 if ( file / ) >/dev/null 2>&1; then
Chris@82 3483 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
Chris@82 3484 lt_cv_file_magic_cmd='func_win32_libid'
Chris@82 3485 else
Chris@82 3486 # Keep this pattern in sync with the one in func_win32_libid.
Chris@82 3487 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
Chris@82 3488 lt_cv_file_magic_cmd='$OBJDUMP -f'
Chris@82 3489 fi
Chris@82 3490 ;;
Chris@82 3491
Chris@82 3492 cegcc*)
Chris@82 3493 # use the weaker test based on 'objdump'. See mingw*.
Chris@82 3494 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
Chris@82 3495 lt_cv_file_magic_cmd='$OBJDUMP -f'
Chris@82 3496 ;;
Chris@82 3497
Chris@82 3498 darwin* | rhapsody*)
Chris@82 3499 lt_cv_deplibs_check_method=pass_all
Chris@82 3500 ;;
Chris@82 3501
Chris@82 3502 freebsd* | dragonfly*)
Chris@82 3503 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
Chris@82 3504 case $host_cpu in
Chris@82 3505 i*86 )
Chris@82 3506 # Not sure whether the presence of OpenBSD here was a mistake.
Chris@82 3507 # Let's accept both of them until this is cleared up.
Chris@82 3508 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
Chris@82 3509 lt_cv_file_magic_cmd=/usr/bin/file
Chris@82 3510 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
Chris@82 3511 ;;
Chris@82 3512 esac
Chris@82 3513 else
Chris@82 3514 lt_cv_deplibs_check_method=pass_all
Chris@82 3515 fi
Chris@82 3516 ;;
Chris@82 3517
Chris@82 3518 haiku*)
Chris@82 3519 lt_cv_deplibs_check_method=pass_all
Chris@82 3520 ;;
Chris@82 3521
Chris@82 3522 hpux10.20* | hpux11*)
Chris@82 3523 lt_cv_file_magic_cmd=/usr/bin/file
Chris@82 3524 case $host_cpu in
Chris@82 3525 ia64*)
Chris@82 3526 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
Chris@82 3527 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
Chris@82 3528 ;;
Chris@82 3529 hppa*64*)
Chris@82 3530 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
Chris@82 3531 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
Chris@82 3532 ;;
Chris@82 3533 *)
Chris@82 3534 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
Chris@82 3535 lt_cv_file_magic_test_file=/usr/lib/libc.sl
Chris@82 3536 ;;
Chris@82 3537 esac
Chris@82 3538 ;;
Chris@82 3539
Chris@82 3540 interix[[3-9]]*)
Chris@82 3541 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
Chris@82 3542 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
Chris@82 3543 ;;
Chris@82 3544
Chris@82 3545 irix5* | irix6* | nonstopux*)
Chris@82 3546 case $LD in
Chris@82 3547 *-32|*"-32 ") libmagic=32-bit;;
Chris@82 3548 *-n32|*"-n32 ") libmagic=N32;;
Chris@82 3549 *-64|*"-64 ") libmagic=64-bit;;
Chris@82 3550 *) libmagic=never-match;;
Chris@82 3551 esac
Chris@82 3552 lt_cv_deplibs_check_method=pass_all
Chris@82 3553 ;;
Chris@82 3554
Chris@82 3555 # This must be glibc/ELF.
Chris@82 3556 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
Chris@82 3557 lt_cv_deplibs_check_method=pass_all
Chris@82 3558 ;;
Chris@82 3559
Chris@82 3560 netbsd* | netbsdelf*-gnu)
Chris@82 3561 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
Chris@82 3562 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
Chris@82 3563 else
Chris@82 3564 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
Chris@82 3565 fi
Chris@82 3566 ;;
Chris@82 3567
Chris@82 3568 newos6*)
Chris@82 3569 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
Chris@82 3570 lt_cv_file_magic_cmd=/usr/bin/file
Chris@82 3571 lt_cv_file_magic_test_file=/usr/lib/libnls.so
Chris@82 3572 ;;
Chris@82 3573
Chris@82 3574 *nto* | *qnx*)
Chris@82 3575 lt_cv_deplibs_check_method=pass_all
Chris@82 3576 ;;
Chris@82 3577
Chris@82 3578 openbsd* | bitrig*)
Chris@82 3579 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
Chris@82 3580 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
Chris@82 3581 else
Chris@82 3582 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
Chris@82 3583 fi
Chris@82 3584 ;;
Chris@82 3585
Chris@82 3586 osf3* | osf4* | osf5*)
Chris@82 3587 lt_cv_deplibs_check_method=pass_all
Chris@82 3588 ;;
Chris@82 3589
Chris@82 3590 rdos*)
Chris@82 3591 lt_cv_deplibs_check_method=pass_all
Chris@82 3592 ;;
Chris@82 3593
Chris@82 3594 solaris*)
Chris@82 3595 lt_cv_deplibs_check_method=pass_all
Chris@82 3596 ;;
Chris@82 3597
Chris@82 3598 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
Chris@82 3599 lt_cv_deplibs_check_method=pass_all
Chris@82 3600 ;;
Chris@82 3601
Chris@82 3602 sysv4 | sysv4.3*)
Chris@82 3603 case $host_vendor in
Chris@82 3604 motorola)
Chris@82 3605 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
Chris@82 3606 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
Chris@82 3607 ;;
Chris@82 3608 ncr)
Chris@82 3609 lt_cv_deplibs_check_method=pass_all
Chris@82 3610 ;;
Chris@82 3611 sequent)
Chris@82 3612 lt_cv_file_magic_cmd='/bin/file'
Chris@82 3613 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
Chris@82 3614 ;;
Chris@82 3615 sni)
Chris@82 3616 lt_cv_file_magic_cmd='/bin/file'
Chris@82 3617 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
Chris@82 3618 lt_cv_file_magic_test_file=/lib/libc.so
Chris@82 3619 ;;
Chris@82 3620 siemens)
Chris@82 3621 lt_cv_deplibs_check_method=pass_all
Chris@82 3622 ;;
Chris@82 3623 pc)
Chris@82 3624 lt_cv_deplibs_check_method=pass_all
Chris@82 3625 ;;
Chris@82 3626 esac
Chris@82 3627 ;;
Chris@82 3628
Chris@82 3629 tpf*)
Chris@82 3630 lt_cv_deplibs_check_method=pass_all
Chris@82 3631 ;;
Chris@82 3632 os2*)
Chris@82 3633 lt_cv_deplibs_check_method=pass_all
Chris@82 3634 ;;
Chris@82 3635 esac
Chris@82 3636 ])
Chris@82 3637
Chris@82 3638 file_magic_glob=
Chris@82 3639 want_nocaseglob=no
Chris@82 3640 if test "$build" = "$host"; then
Chris@82 3641 case $host_os in
Chris@82 3642 mingw* | pw32*)
Chris@82 3643 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
Chris@82 3644 want_nocaseglob=yes
Chris@82 3645 else
Chris@82 3646 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
Chris@82 3647 fi
Chris@82 3648 ;;
Chris@82 3649 esac
Chris@82 3650 fi
Chris@82 3651
Chris@82 3652 file_magic_cmd=$lt_cv_file_magic_cmd
Chris@82 3653 deplibs_check_method=$lt_cv_deplibs_check_method
Chris@82 3654 test -z "$deplibs_check_method" && deplibs_check_method=unknown
Chris@82 3655
Chris@82 3656 _LT_DECL([], [deplibs_check_method], [1],
Chris@82 3657 [Method to check whether dependent libraries are shared objects])
Chris@82 3658 _LT_DECL([], [file_magic_cmd], [1],
Chris@82 3659 [Command to use when deplibs_check_method = "file_magic"])
Chris@82 3660 _LT_DECL([], [file_magic_glob], [1],
Chris@82 3661 [How to find potential files when deplibs_check_method = "file_magic"])
Chris@82 3662 _LT_DECL([], [want_nocaseglob], [1],
Chris@82 3663 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
Chris@82 3664 ])# _LT_CHECK_MAGIC_METHOD
Chris@82 3665
Chris@82 3666
Chris@82 3667 # LT_PATH_NM
Chris@82 3668 # ----------
Chris@82 3669 # find the pathname to a BSD- or MS-compatible name lister
Chris@82 3670 AC_DEFUN([LT_PATH_NM],
Chris@82 3671 [AC_REQUIRE([AC_PROG_CC])dnl
Chris@82 3672 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
Chris@82 3673 [if test -n "$NM"; then
Chris@82 3674 # Let the user override the test.
Chris@82 3675 lt_cv_path_NM=$NM
Chris@82 3676 else
Chris@82 3677 lt_nm_to_check=${ac_tool_prefix}nm
Chris@82 3678 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
Chris@82 3679 lt_nm_to_check="$lt_nm_to_check nm"
Chris@82 3680 fi
Chris@82 3681 for lt_tmp_nm in $lt_nm_to_check; do
Chris@82 3682 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
Chris@82 3683 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
Chris@82 3684 IFS=$lt_save_ifs
Chris@82 3685 test -z "$ac_dir" && ac_dir=.
Chris@82 3686 tmp_nm=$ac_dir/$lt_tmp_nm
Chris@82 3687 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
Chris@82 3688 # Check to see if the nm accepts a BSD-compat flag.
Chris@82 3689 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
Chris@82 3690 # nm: unknown option "B" ignored
Chris@82 3691 # Tru64's nm complains that /dev/null is an invalid object file
Chris@82 3692 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
Chris@82 3693 case $build_os in
Chris@82 3694 mingw*) lt_bad_file=conftest.nm/nofile ;;
Chris@82 3695 *) lt_bad_file=/dev/null ;;
Chris@82 3696 esac
Chris@82 3697 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
Chris@82 3698 *$lt_bad_file* | *'Invalid file or object type'*)
Chris@82 3699 lt_cv_path_NM="$tmp_nm -B"
Chris@82 3700 break 2
Chris@82 3701 ;;
Chris@82 3702 *)
Chris@82 3703 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
Chris@82 3704 */dev/null*)
Chris@82 3705 lt_cv_path_NM="$tmp_nm -p"
Chris@82 3706 break 2
Chris@82 3707 ;;
Chris@82 3708 *)
Chris@82 3709 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
Chris@82 3710 continue # so that we can try to find one that supports BSD flags
Chris@82 3711 ;;
Chris@82 3712 esac
Chris@82 3713 ;;
Chris@82 3714 esac
Chris@82 3715 fi
Chris@82 3716 done
Chris@82 3717 IFS=$lt_save_ifs
Chris@82 3718 done
Chris@82 3719 : ${lt_cv_path_NM=no}
Chris@82 3720 fi])
Chris@82 3721 if test no != "$lt_cv_path_NM"; then
Chris@82 3722 NM=$lt_cv_path_NM
Chris@82 3723 else
Chris@82 3724 # Didn't find any BSD compatible name lister, look for dumpbin.
Chris@82 3725 if test -n "$DUMPBIN"; then :
Chris@82 3726 # Let the user override the test.
Chris@82 3727 else
Chris@82 3728 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
Chris@82 3729 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
Chris@82 3730 *COFF*)
Chris@82 3731 DUMPBIN="$DUMPBIN -symbols -headers"
Chris@82 3732 ;;
Chris@82 3733 *)
Chris@82 3734 DUMPBIN=:
Chris@82 3735 ;;
Chris@82 3736 esac
Chris@82 3737 fi
Chris@82 3738 AC_SUBST([DUMPBIN])
Chris@82 3739 if test : != "$DUMPBIN"; then
Chris@82 3740 NM=$DUMPBIN
Chris@82 3741 fi
Chris@82 3742 fi
Chris@82 3743 test -z "$NM" && NM=nm
Chris@82 3744 AC_SUBST([NM])
Chris@82 3745 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
Chris@82 3746
Chris@82 3747 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
Chris@82 3748 [lt_cv_nm_interface="BSD nm"
Chris@82 3749 echo "int some_variable = 0;" > conftest.$ac_ext
Chris@82 3750 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
Chris@82 3751 (eval "$ac_compile" 2>conftest.err)
Chris@82 3752 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@82 3753 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
Chris@82 3754 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
Chris@82 3755 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@82 3756 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
Chris@82 3757 cat conftest.out >&AS_MESSAGE_LOG_FD
Chris@82 3758 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
Chris@82 3759 lt_cv_nm_interface="MS dumpbin"
Chris@82 3760 fi
Chris@82 3761 rm -f conftest*])
Chris@82 3762 ])# LT_PATH_NM
Chris@82 3763
Chris@82 3764 # Old names:
Chris@82 3765 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
Chris@82 3766 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
Chris@82 3767 dnl aclocal-1.4 backwards compatibility:
Chris@82 3768 dnl AC_DEFUN([AM_PROG_NM], [])
Chris@82 3769 dnl AC_DEFUN([AC_PROG_NM], [])
Chris@82 3770
Chris@82 3771 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
Chris@82 3772 # --------------------------------
Chris@82 3773 # how to determine the name of the shared library
Chris@82 3774 # associated with a specific link library.
Chris@82 3775 # -- PORTME fill in with the dynamic library characteristics
Chris@82 3776 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
Chris@82 3777 [m4_require([_LT_DECL_EGREP])
Chris@82 3778 m4_require([_LT_DECL_OBJDUMP])
Chris@82 3779 m4_require([_LT_DECL_DLLTOOL])
Chris@82 3780 AC_CACHE_CHECK([how to associate runtime and link libraries],
Chris@82 3781 lt_cv_sharedlib_from_linklib_cmd,
Chris@82 3782 [lt_cv_sharedlib_from_linklib_cmd='unknown'
Chris@82 3783
Chris@82 3784 case $host_os in
Chris@82 3785 cygwin* | mingw* | pw32* | cegcc*)
Chris@82 3786 # two different shell functions defined in ltmain.sh;
Chris@82 3787 # decide which one to use based on capabilities of $DLLTOOL
Chris@82 3788 case `$DLLTOOL --help 2>&1` in
Chris@82 3789 *--identify-strict*)
Chris@82 3790 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
Chris@82 3791 ;;
Chris@82 3792 *)
Chris@82 3793 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
Chris@82 3794 ;;
Chris@82 3795 esac
Chris@82 3796 ;;
Chris@82 3797 *)
Chris@82 3798 # fallback: assume linklib IS sharedlib
Chris@82 3799 lt_cv_sharedlib_from_linklib_cmd=$ECHO
Chris@82 3800 ;;
Chris@82 3801 esac
Chris@82 3802 ])
Chris@82 3803 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
Chris@82 3804 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
Chris@82 3805
Chris@82 3806 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
Chris@82 3807 [Command to associate shared and link libraries])
Chris@82 3808 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
Chris@82 3809
Chris@82 3810
Chris@82 3811 # _LT_PATH_MANIFEST_TOOL
Chris@82 3812 # ----------------------
Chris@82 3813 # locate the manifest tool
Chris@82 3814 m4_defun([_LT_PATH_MANIFEST_TOOL],
Chris@82 3815 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
Chris@82 3816 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
Chris@82 3817 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
Chris@82 3818 [lt_cv_path_mainfest_tool=no
Chris@82 3819 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
Chris@82 3820 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
Chris@82 3821 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@82 3822 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
Chris@82 3823 lt_cv_path_mainfest_tool=yes
Chris@82 3824 fi
Chris@82 3825 rm -f conftest*])
Chris@82 3826 if test yes != "$lt_cv_path_mainfest_tool"; then
Chris@82 3827 MANIFEST_TOOL=:
Chris@82 3828 fi
Chris@82 3829 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
Chris@82 3830 ])# _LT_PATH_MANIFEST_TOOL
Chris@82 3831
Chris@82 3832
Chris@82 3833 # _LT_DLL_DEF_P([FILE])
Chris@82 3834 # ---------------------
Chris@82 3835 # True iff FILE is a Windows DLL '.def' file.
Chris@82 3836 # Keep in sync with func_dll_def_p in the libtool script
Chris@82 3837 AC_DEFUN([_LT_DLL_DEF_P],
Chris@82 3838 [dnl
Chris@82 3839 test DEF = "`$SED -n dnl
Chris@82 3840 -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
Chris@82 3841 -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
Chris@82 3842 -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
Chris@82 3843 -e q dnl Only consider the first "real" line
Chris@82 3844 $1`" dnl
Chris@82 3845 ])# _LT_DLL_DEF_P
Chris@82 3846
Chris@82 3847
Chris@82 3848 # LT_LIB_M
Chris@82 3849 # --------
Chris@82 3850 # check for math library
Chris@82 3851 AC_DEFUN([LT_LIB_M],
Chris@82 3852 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@82 3853 LIBM=
Chris@82 3854 case $host in
Chris@82 3855 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
Chris@82 3856 # These system don't have libm, or don't need it
Chris@82 3857 ;;
Chris@82 3858 *-ncr-sysv4.3*)
Chris@82 3859 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
Chris@82 3860 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
Chris@82 3861 ;;
Chris@82 3862 *)
Chris@82 3863 AC_CHECK_LIB(m, cos, LIBM=-lm)
Chris@82 3864 ;;
Chris@82 3865 esac
Chris@82 3866 AC_SUBST([LIBM])
Chris@82 3867 ])# LT_LIB_M
Chris@82 3868
Chris@82 3869 # Old name:
Chris@82 3870 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
Chris@82 3871 dnl aclocal-1.4 backwards compatibility:
Chris@82 3872 dnl AC_DEFUN([AC_CHECK_LIBM], [])
Chris@82 3873
Chris@82 3874
Chris@82 3875 # _LT_COMPILER_NO_RTTI([TAGNAME])
Chris@82 3876 # -------------------------------
Chris@82 3877 m4_defun([_LT_COMPILER_NO_RTTI],
Chris@82 3878 [m4_require([_LT_TAG_COMPILER])dnl
Chris@82 3879
Chris@82 3880 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
Chris@82 3881
Chris@82 3882 if test yes = "$GCC"; then
Chris@82 3883 case $cc_basename in
Chris@82 3884 nvcc*)
Chris@82 3885 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
Chris@82 3886 *)
Chris@82 3887 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
Chris@82 3888 esac
Chris@82 3889
Chris@82 3890 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
Chris@82 3891 lt_cv_prog_compiler_rtti_exceptions,
Chris@82 3892 [-fno-rtti -fno-exceptions], [],
Chris@82 3893 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
Chris@82 3894 fi
Chris@82 3895 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
Chris@82 3896 [Compiler flag to turn off builtin functions])
Chris@82 3897 ])# _LT_COMPILER_NO_RTTI
Chris@82 3898
Chris@82 3899
Chris@82 3900 # _LT_CMD_GLOBAL_SYMBOLS
Chris@82 3901 # ----------------------
Chris@82 3902 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
Chris@82 3903 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@82 3904 AC_REQUIRE([AC_PROG_CC])dnl
Chris@82 3905 AC_REQUIRE([AC_PROG_AWK])dnl
Chris@82 3906 AC_REQUIRE([LT_PATH_NM])dnl
Chris@82 3907 AC_REQUIRE([LT_PATH_LD])dnl
Chris@82 3908 m4_require([_LT_DECL_SED])dnl
Chris@82 3909 m4_require([_LT_DECL_EGREP])dnl
Chris@82 3910 m4_require([_LT_TAG_COMPILER])dnl
Chris@82 3911
Chris@82 3912 # Check for command to grab the raw symbol name followed by C symbol from nm.
Chris@82 3913 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
Chris@82 3914 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
Chris@82 3915 [
Chris@82 3916 # These are sane defaults that work on at least a few old systems.
Chris@82 3917 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
Chris@82 3918
Chris@82 3919 # Character class describing NM global symbol codes.
Chris@82 3920 symcode='[[BCDEGRST]]'
Chris@82 3921
Chris@82 3922 # Regexp to match symbols that can be accessed directly from C.
Chris@82 3923 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
Chris@82 3924
Chris@82 3925 # Define system-specific variables.
Chris@82 3926 case $host_os in
Chris@82 3927 aix*)
Chris@82 3928 symcode='[[BCDT]]'
Chris@82 3929 ;;
Chris@82 3930 cygwin* | mingw* | pw32* | cegcc*)
Chris@82 3931 symcode='[[ABCDGISTW]]'
Chris@82 3932 ;;
Chris@82 3933 hpux*)
Chris@82 3934 if test ia64 = "$host_cpu"; then
Chris@82 3935 symcode='[[ABCDEGRST]]'
Chris@82 3936 fi
Chris@82 3937 ;;
Chris@82 3938 irix* | nonstopux*)
Chris@82 3939 symcode='[[BCDEGRST]]'
Chris@82 3940 ;;
Chris@82 3941 osf*)
Chris@82 3942 symcode='[[BCDEGQRST]]'
Chris@82 3943 ;;
Chris@82 3944 solaris*)
Chris@82 3945 symcode='[[BDRT]]'
Chris@82 3946 ;;
Chris@82 3947 sco3.2v5*)
Chris@82 3948 symcode='[[DT]]'
Chris@82 3949 ;;
Chris@82 3950 sysv4.2uw2*)
Chris@82 3951 symcode='[[DT]]'
Chris@82 3952 ;;
Chris@82 3953 sysv5* | sco5v6* | unixware* | OpenUNIX*)
Chris@82 3954 symcode='[[ABDT]]'
Chris@82 3955 ;;
Chris@82 3956 sysv4)
Chris@82 3957 symcode='[[DFNSTU]]'
Chris@82 3958 ;;
Chris@82 3959 esac
Chris@82 3960
Chris@82 3961 # If we're using GNU nm, then use its standard symbol codes.
Chris@82 3962 case `$NM -V 2>&1` in
Chris@82 3963 *GNU* | *'with BFD'*)
Chris@82 3964 symcode='[[ABCDGIRSTW]]' ;;
Chris@82 3965 esac
Chris@82 3966
Chris@82 3967 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
Chris@82 3968 # Gets list of data symbols to import.
Chris@82 3969 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
Chris@82 3970 # Adjust the below global symbol transforms to fixup imported variables.
Chris@82 3971 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
Chris@82 3972 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
Chris@82 3973 lt_c_name_lib_hook="\
Chris@82 3974 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
Chris@82 3975 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
Chris@82 3976 else
Chris@82 3977 # Disable hooks by default.
Chris@82 3978 lt_cv_sys_global_symbol_to_import=
Chris@82 3979 lt_cdecl_hook=
Chris@82 3980 lt_c_name_hook=
Chris@82 3981 lt_c_name_lib_hook=
Chris@82 3982 fi
Chris@82 3983
Chris@82 3984 # Transform an extracted symbol line into a proper C declaration.
Chris@82 3985 # Some systems (esp. on ia64) link data and code symbols differently,
Chris@82 3986 # so use this general approach.
Chris@82 3987 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
Chris@82 3988 $lt_cdecl_hook\
Chris@82 3989 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
Chris@82 3990 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
Chris@82 3991
Chris@82 3992 # Transform an extracted symbol line into symbol name and symbol address
Chris@82 3993 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
Chris@82 3994 $lt_c_name_hook\
Chris@82 3995 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
Chris@82 3996 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
Chris@82 3997
Chris@82 3998 # Transform an extracted symbol line into symbol name with lib prefix and
Chris@82 3999 # symbol address.
Chris@82 4000 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
Chris@82 4001 $lt_c_name_lib_hook\
Chris@82 4002 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
Chris@82 4003 " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
Chris@82 4004 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
Chris@82 4005
Chris@82 4006 # Handle CRLF in mingw tool chain
Chris@82 4007 opt_cr=
Chris@82 4008 case $build_os in
Chris@82 4009 mingw*)
Chris@82 4010 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
Chris@82 4011 ;;
Chris@82 4012 esac
Chris@82 4013
Chris@82 4014 # Try without a prefix underscore, then with it.
Chris@82 4015 for ac_symprfx in "" "_"; do
Chris@82 4016
Chris@82 4017 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
Chris@82 4018 symxfrm="\\1 $ac_symprfx\\2 \\2"
Chris@82 4019
Chris@82 4020 # Write the raw and C identifiers.
Chris@82 4021 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
Chris@82 4022 # Fake it for dumpbin and say T for any non-static function,
Chris@82 4023 # D for any global variable and I for any imported variable.
Chris@82 4024 # Also find C++ and __fastcall symbols from MSVC++,
Chris@82 4025 # which start with @ or ?.
Chris@82 4026 lt_cv_sys_global_symbol_pipe="$AWK ['"\
Chris@82 4027 " {last_section=section; section=\$ 3};"\
Chris@82 4028 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
Chris@82 4029 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
Chris@82 4030 " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
Chris@82 4031 " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
Chris@82 4032 " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
Chris@82 4033 " \$ 0!~/External *\|/{next};"\
Chris@82 4034 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
Chris@82 4035 " {if(hide[section]) next};"\
Chris@82 4036 " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
Chris@82 4037 " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
Chris@82 4038 " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
Chris@82 4039 " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
Chris@82 4040 " ' prfx=^$ac_symprfx]"
Chris@82 4041 else
Chris@82 4042 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
Chris@82 4043 fi
Chris@82 4044 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
Chris@82 4045
Chris@82 4046 # Check to see that the pipe works correctly.
Chris@82 4047 pipe_works=no
Chris@82 4048
Chris@82 4049 rm -f conftest*
Chris@82 4050 cat > conftest.$ac_ext <<_LT_EOF
Chris@82 4051 #ifdef __cplusplus
Chris@82 4052 extern "C" {
Chris@82 4053 #endif
Chris@82 4054 char nm_test_var;
Chris@82 4055 void nm_test_func(void);
Chris@82 4056 void nm_test_func(void){}
Chris@82 4057 #ifdef __cplusplus
Chris@82 4058 }
Chris@82 4059 #endif
Chris@82 4060 int main(){nm_test_var='a';nm_test_func();return(0);}
Chris@82 4061 _LT_EOF
Chris@82 4062
Chris@82 4063 if AC_TRY_EVAL(ac_compile); then
Chris@82 4064 # Now try to grab the symbols.
Chris@82 4065 nlist=conftest.nm
Chris@82 4066 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
Chris@82 4067 # Try sorting and uniquifying the output.
Chris@82 4068 if sort "$nlist" | uniq > "$nlist"T; then
Chris@82 4069 mv -f "$nlist"T "$nlist"
Chris@82 4070 else
Chris@82 4071 rm -f "$nlist"T
Chris@82 4072 fi
Chris@82 4073
Chris@82 4074 # Make sure that we snagged all the symbols we need.
Chris@82 4075 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
Chris@82 4076 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
Chris@82 4077 cat <<_LT_EOF > conftest.$ac_ext
Chris@82 4078 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
Chris@82 4079 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
Chris@82 4080 /* DATA imports from DLLs on WIN32 can't be const, because runtime
Chris@82 4081 relocations are performed -- see ld's documentation on pseudo-relocs. */
Chris@82 4082 # define LT@&t@_DLSYM_CONST
Chris@82 4083 #elif defined __osf__
Chris@82 4084 /* This system does not cope well with relocations in const data. */
Chris@82 4085 # define LT@&t@_DLSYM_CONST
Chris@82 4086 #else
Chris@82 4087 # define LT@&t@_DLSYM_CONST const
Chris@82 4088 #endif
Chris@82 4089
Chris@82 4090 #ifdef __cplusplus
Chris@82 4091 extern "C" {
Chris@82 4092 #endif
Chris@82 4093
Chris@82 4094 _LT_EOF
Chris@82 4095 # Now generate the symbol file.
Chris@82 4096 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
Chris@82 4097
Chris@82 4098 cat <<_LT_EOF >> conftest.$ac_ext
Chris@82 4099
Chris@82 4100 /* The mapping between symbol names and symbols. */
Chris@82 4101 LT@&t@_DLSYM_CONST struct {
Chris@82 4102 const char *name;
Chris@82 4103 void *address;
Chris@82 4104 }
Chris@82 4105 lt__PROGRAM__LTX_preloaded_symbols[[]] =
Chris@82 4106 {
Chris@82 4107 { "@PROGRAM@", (void *) 0 },
Chris@82 4108 _LT_EOF
Chris@82 4109 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
Chris@82 4110 cat <<\_LT_EOF >> conftest.$ac_ext
Chris@82 4111 {0, (void *) 0}
Chris@82 4112 };
Chris@82 4113
Chris@82 4114 /* This works around a problem in FreeBSD linker */
Chris@82 4115 #ifdef FREEBSD_WORKAROUND
Chris@82 4116 static const void *lt_preloaded_setup() {
Chris@82 4117 return lt__PROGRAM__LTX_preloaded_symbols;
Chris@82 4118 }
Chris@82 4119 #endif
Chris@82 4120
Chris@82 4121 #ifdef __cplusplus
Chris@82 4122 }
Chris@82 4123 #endif
Chris@82 4124 _LT_EOF
Chris@82 4125 # Now try linking the two files.
Chris@82 4126 mv conftest.$ac_objext conftstm.$ac_objext
Chris@82 4127 lt_globsym_save_LIBS=$LIBS
Chris@82 4128 lt_globsym_save_CFLAGS=$CFLAGS
Chris@82 4129 LIBS=conftstm.$ac_objext
Chris@82 4130 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
Chris@82 4131 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
Chris@82 4132 pipe_works=yes
Chris@82 4133 fi
Chris@82 4134 LIBS=$lt_globsym_save_LIBS
Chris@82 4135 CFLAGS=$lt_globsym_save_CFLAGS
Chris@82 4136 else
Chris@82 4137 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
Chris@82 4138 fi
Chris@82 4139 else
Chris@82 4140 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
Chris@82 4141 fi
Chris@82 4142 else
Chris@82 4143 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
Chris@82 4144 fi
Chris@82 4145 else
Chris@82 4146 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
Chris@82 4147 cat conftest.$ac_ext >&5
Chris@82 4148 fi
Chris@82 4149 rm -rf conftest* conftst*
Chris@82 4150
Chris@82 4151 # Do not use the global_symbol_pipe unless it works.
Chris@82 4152 if test yes = "$pipe_works"; then
Chris@82 4153 break
Chris@82 4154 else
Chris@82 4155 lt_cv_sys_global_symbol_pipe=
Chris@82 4156 fi
Chris@82 4157 done
Chris@82 4158 ])
Chris@82 4159 if test -z "$lt_cv_sys_global_symbol_pipe"; then
Chris@82 4160 lt_cv_sys_global_symbol_to_cdecl=
Chris@82 4161 fi
Chris@82 4162 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
Chris@82 4163 AC_MSG_RESULT(failed)
Chris@82 4164 else
Chris@82 4165 AC_MSG_RESULT(ok)
Chris@82 4166 fi
Chris@82 4167
Chris@82 4168 # Response file support.
Chris@82 4169 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
Chris@82 4170 nm_file_list_spec='@'
Chris@82 4171 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
Chris@82 4172 nm_file_list_spec='@'
Chris@82 4173 fi
Chris@82 4174
Chris@82 4175 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
Chris@82 4176 [Take the output of nm and produce a listing of raw symbols and C names])
Chris@82 4177 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
Chris@82 4178 [Transform the output of nm in a proper C declaration])
Chris@82 4179 _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
Chris@82 4180 [Transform the output of nm into a list of symbols to manually relocate])
Chris@82 4181 _LT_DECL([global_symbol_to_c_name_address],
Chris@82 4182 [lt_cv_sys_global_symbol_to_c_name_address], [1],
Chris@82 4183 [Transform the output of nm in a C name address pair])
Chris@82 4184 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
Chris@82 4185 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
Chris@82 4186 [Transform the output of nm in a C name address pair when lib prefix is needed])
Chris@82 4187 _LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
Chris@82 4188 [The name lister interface])
Chris@82 4189 _LT_DECL([], [nm_file_list_spec], [1],
Chris@82 4190 [Specify filename containing input files for $NM])
Chris@82 4191 ]) # _LT_CMD_GLOBAL_SYMBOLS
Chris@82 4192
Chris@82 4193
Chris@82 4194 # _LT_COMPILER_PIC([TAGNAME])
Chris@82 4195 # ---------------------------
Chris@82 4196 m4_defun([_LT_COMPILER_PIC],
Chris@82 4197 [m4_require([_LT_TAG_COMPILER])dnl
Chris@82 4198 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
Chris@82 4199 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@82 4200 _LT_TAGVAR(lt_prog_compiler_static, $1)=
Chris@82 4201
Chris@82 4202 m4_if([$1], [CXX], [
Chris@82 4203 # C++ specific cases for pic, static, wl, etc.
Chris@82 4204 if test yes = "$GXX"; then
Chris@82 4205 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@82 4206 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@82 4207
Chris@82 4208 case $host_os in
Chris@82 4209 aix*)
Chris@82 4210 # All AIX code is PIC.
Chris@82 4211 if test ia64 = "$host_cpu"; then
Chris@82 4212 # AIX 5 now supports IA64 processor
Chris@82 4213 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@82 4214 fi
Chris@82 4215 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@82 4216 ;;
Chris@82 4217
Chris@82 4218 amigaos*)
Chris@82 4219 case $host_cpu in
Chris@82 4220 powerpc)
Chris@82 4221 # see comment about AmigaOS4 .so support
Chris@82 4222 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@82 4223 ;;
Chris@82 4224 m68k)
Chris@82 4225 # FIXME: we need at least 68020 code to build shared libraries, but
Chris@82 4226 # adding the '-m68020' flag to GCC prevents building anything better,
Chris@82 4227 # like '-m68040'.
Chris@82 4228 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
Chris@82 4229 ;;
Chris@82 4230 esac
Chris@82 4231 ;;
Chris@82 4232
Chris@82 4233 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
Chris@82 4234 # PIC is the default for these OSes.
Chris@82 4235 ;;
Chris@82 4236 mingw* | cygwin* | os2* | pw32* | cegcc*)
Chris@82 4237 # This hack is so that the source file can tell whether it is being
Chris@82 4238 # built for inclusion in a dll (and should export symbols for example).
Chris@82 4239 # Although the cygwin gcc ignores -fPIC, still need this for old-style
Chris@82 4240 # (--disable-auto-import) libraries
Chris@82 4241 m4_if([$1], [GCJ], [],
Chris@82 4242 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
Chris@82 4243 case $host_os in
Chris@82 4244 os2*)
Chris@82 4245 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
Chris@82 4246 ;;
Chris@82 4247 esac
Chris@82 4248 ;;
Chris@82 4249 darwin* | rhapsody*)
Chris@82 4250 # PIC is the default on this platform
Chris@82 4251 # Common symbols not allowed in MH_DYLIB files
Chris@82 4252 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
Chris@82 4253 ;;
Chris@82 4254 *djgpp*)
Chris@82 4255 # DJGPP does not support shared libraries at all
Chris@82 4256 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@82 4257 ;;
Chris@82 4258 haiku*)
Chris@82 4259 # PIC is the default for Haiku.
Chris@82 4260 # The "-static" flag exists, but is broken.
Chris@82 4261 _LT_TAGVAR(lt_prog_compiler_static, $1)=
Chris@82 4262 ;;
Chris@82 4263 interix[[3-9]]*)
Chris@82 4264 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
Chris@82 4265 # Instead, we relocate shared libraries at runtime.
Chris@82 4266 ;;
Chris@82 4267 sysv4*MP*)
Chris@82 4268 if test -d /usr/nec; then
Chris@82 4269 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
Chris@82 4270 fi
Chris@82 4271 ;;
Chris@82 4272 hpux*)
Chris@82 4273 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
Chris@82 4274 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
Chris@82 4275 # sets the default TLS model and affects inlining.
Chris@82 4276 case $host_cpu in
Chris@82 4277 hppa*64*)
Chris@82 4278 ;;
Chris@82 4279 *)
Chris@82 4280 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@82 4281 ;;
Chris@82 4282 esac
Chris@82 4283 ;;
Chris@82 4284 *qnx* | *nto*)
Chris@82 4285 # QNX uses GNU C++, but need to define -shared option too, otherwise
Chris@82 4286 # it will coredump.
Chris@82 4287 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
Chris@82 4288 ;;
Chris@82 4289 *)
Chris@82 4290 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@82 4291 ;;
Chris@82 4292 esac
Chris@82 4293 else
Chris@82 4294 case $host_os in
Chris@82 4295 aix[[4-9]]*)
Chris@82 4296 # All AIX code is PIC.
Chris@82 4297 if test ia64 = "$host_cpu"; then
Chris@82 4298 # AIX 5 now supports IA64 processor
Chris@82 4299 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@82 4300 else
Chris@82 4301 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
Chris@82 4302 fi
Chris@82 4303 ;;
Chris@82 4304 chorus*)
Chris@82 4305 case $cc_basename in
Chris@82 4306 cxch68*)
Chris@82 4307 # Green Hills C++ Compiler
Chris@82 4308 # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
Chris@82 4309 ;;
Chris@82 4310 esac
Chris@82 4311 ;;
Chris@82 4312 mingw* | cygwin* | os2* | pw32* | cegcc*)
Chris@82 4313 # This hack is so that the source file can tell whether it is being
Chris@82 4314 # built for inclusion in a dll (and should export symbols for example).
Chris@82 4315 m4_if([$1], [GCJ], [],
Chris@82 4316 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
Chris@82 4317 ;;
Chris@82 4318 dgux*)
Chris@82 4319 case $cc_basename in
Chris@82 4320 ec++*)
Chris@82 4321 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@82 4322 ;;
Chris@82 4323 ghcx*)
Chris@82 4324 # Green Hills C++ Compiler
Chris@82 4325 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@82 4326 ;;
Chris@82 4327 *)
Chris@82 4328 ;;
Chris@82 4329 esac
Chris@82 4330 ;;
Chris@82 4331 freebsd* | dragonfly*)
Chris@82 4332 # FreeBSD uses GNU C++
Chris@82 4333 ;;
Chris@82 4334 hpux9* | hpux10* | hpux11*)
Chris@82 4335 case $cc_basename in
Chris@82 4336 CC*)
Chris@82 4337 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@82 4338 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
Chris@82 4339 if test ia64 != "$host_cpu"; then
Chris@82 4340 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
Chris@82 4341 fi
Chris@82 4342 ;;
Chris@82 4343 aCC*)
Chris@82 4344 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@82 4345 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
Chris@82 4346 case $host_cpu in
Chris@82 4347 hppa*64*|ia64*)
Chris@82 4348 # +Z the default
Chris@82 4349 ;;
Chris@82 4350 *)
Chris@82 4351 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
Chris@82 4352 ;;
Chris@82 4353 esac
Chris@82 4354 ;;
Chris@82 4355 *)
Chris@82 4356 ;;
Chris@82 4357 esac
Chris@82 4358 ;;
Chris@82 4359 interix*)
Chris@82 4360 # This is c89, which is MS Visual C++ (no shared libs)
Chris@82 4361 # Anyone wants to do a port?
Chris@82 4362 ;;
Chris@82 4363 irix5* | irix6* | nonstopux*)
Chris@82 4364 case $cc_basename in
Chris@82 4365 CC*)
Chris@82 4366 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@82 4367 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@82 4368 # CC pic flag -KPIC is the default.
Chris@82 4369 ;;
Chris@82 4370 *)
Chris@82 4371 ;;
Chris@82 4372 esac
Chris@82 4373 ;;
Chris@82 4374 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
Chris@82 4375 case $cc_basename in
Chris@82 4376 KCC*)
Chris@82 4377 # KAI C++ Compiler
Chris@82 4378 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
Chris@82 4379 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@82 4380 ;;
Chris@82 4381 ecpc* )
Chris@82 4382 # old Intel C++ for x86_64, which still supported -KPIC.
Chris@82 4383 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@82 4384 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@82 4385 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@82 4386 ;;
Chris@82 4387 icpc* )
Chris@82 4388 # Intel C++, used to be incompatible with GCC.
Chris@82 4389 # ICC 10 doesn't accept -KPIC any more.
Chris@82 4390 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@82 4391 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@82 4392 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@82 4393 ;;
Chris@82 4394 pgCC* | pgcpp*)
Chris@82 4395 # Portland Group C++ compiler
Chris@82 4396 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@82 4397 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
Chris@82 4398 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@82 4399 ;;
Chris@82 4400 cxx*)
Chris@82 4401 # Compaq C++
Chris@82 4402 # Make sure the PIC flag is empty. It appears that all Alpha
Chris@82 4403 # Linux and Compaq Tru64 Unix objects are PIC.
Chris@82 4404 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@82 4405 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@82 4406 ;;
Chris@82 4407 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
Chris@82 4408 # IBM XL 8.0, 9.0 on PPC and BlueGene
Chris@82 4409 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@82 4410 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
Chris@82 4411 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
Chris@82 4412 ;;
Chris@82 4413 *)
Chris@82 4414 case `$CC -V 2>&1 | sed 5q` in
Chris@82 4415 *Sun\ C*)
Chris@82 4416 # Sun C++ 5.9
Chris@82 4417 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@82 4418 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@82 4419 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
Chris@82 4420 ;;
Chris@82 4421 esac
Chris@82 4422 ;;
Chris@82 4423 esac
Chris@82 4424 ;;
Chris@82 4425 lynxos*)
Chris@82 4426 ;;
Chris@82 4427 m88k*)
Chris@82 4428 ;;
Chris@82 4429 mvs*)
Chris@82 4430 case $cc_basename in
Chris@82 4431 cxx*)
Chris@82 4432 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
Chris@82 4433 ;;
Chris@82 4434 *)
Chris@82 4435 ;;
Chris@82 4436 esac
Chris@82 4437 ;;
Chris@82 4438 netbsd* | netbsdelf*-gnu)
Chris@82 4439 ;;
Chris@82 4440 *qnx* | *nto*)
Chris@82 4441 # QNX uses GNU C++, but need to define -shared option too, otherwise
Chris@82 4442 # it will coredump.
Chris@82 4443 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
Chris@82 4444 ;;
Chris@82 4445 osf3* | osf4* | osf5*)
Chris@82 4446 case $cc_basename in
Chris@82 4447 KCC*)
Chris@82 4448 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
Chris@82 4449 ;;
Chris@82 4450 RCC*)
Chris@82 4451 # Rational C++ 2.4.1
Chris@82 4452 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@82 4453 ;;
Chris@82 4454 cxx*)
Chris@82 4455 # Digital/Compaq C++
Chris@82 4456 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@82 4457 # Make sure the PIC flag is empty. It appears that all Alpha
Chris@82 4458 # Linux and Compaq Tru64 Unix objects are PIC.
Chris@82 4459 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@82 4460 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@82 4461 ;;
Chris@82 4462 *)
Chris@82 4463 ;;
Chris@82 4464 esac
Chris@82 4465 ;;
Chris@82 4466 psos*)
Chris@82 4467 ;;
Chris@82 4468 solaris*)
Chris@82 4469 case $cc_basename in
Chris@82 4470 CC* | sunCC*)
Chris@82 4471 # Sun C++ 4.2, 5.x and Centerline C++
Chris@82 4472 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@82 4473 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@82 4474 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
Chris@82 4475 ;;
Chris@82 4476 gcx*)
Chris@82 4477 # Green Hills C++ Compiler
Chris@82 4478 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
Chris@82 4479 ;;
Chris@82 4480 *)
Chris@82 4481 ;;
Chris@82 4482 esac
Chris@82 4483 ;;
Chris@82 4484 sunos4*)
Chris@82 4485 case $cc_basename in
Chris@82 4486 CC*)
Chris@82 4487 # Sun C++ 4.x
Chris@82 4488 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@82 4489 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@82 4490 ;;
Chris@82 4491 lcc*)
Chris@82 4492 # Lucid
Chris@82 4493 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@82 4494 ;;
Chris@82 4495 *)
Chris@82 4496 ;;
Chris@82 4497 esac
Chris@82 4498 ;;
Chris@82 4499 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
Chris@82 4500 case $cc_basename in
Chris@82 4501 CC*)
Chris@82 4502 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@82 4503 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@82 4504 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@82 4505 ;;
Chris@82 4506 esac
Chris@82 4507 ;;
Chris@82 4508 tandem*)
Chris@82 4509 case $cc_basename in
Chris@82 4510 NCC*)
Chris@82 4511 # NonStop-UX NCC 3.20
Chris@82 4512 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@82 4513 ;;
Chris@82 4514 *)
Chris@82 4515 ;;
Chris@82 4516 esac
Chris@82 4517 ;;
Chris@82 4518 vxworks*)
Chris@82 4519 ;;
Chris@82 4520 *)
Chris@82 4521 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
Chris@82 4522 ;;
Chris@82 4523 esac
Chris@82 4524 fi
Chris@82 4525 ],
Chris@82 4526 [
Chris@82 4527 if test yes = "$GCC"; then
Chris@82 4528 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@82 4529 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@82 4530
Chris@82 4531 case $host_os in
Chris@82 4532 aix*)
Chris@82 4533 # All AIX code is PIC.
Chris@82 4534 if test ia64 = "$host_cpu"; then
Chris@82 4535 # AIX 5 now supports IA64 processor
Chris@82 4536 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@82 4537 fi
Chris@82 4538 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@82 4539 ;;
Chris@82 4540
Chris@82 4541 amigaos*)
Chris@82 4542 case $host_cpu in
Chris@82 4543 powerpc)
Chris@82 4544 # see comment about AmigaOS4 .so support
Chris@82 4545 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@82 4546 ;;
Chris@82 4547 m68k)
Chris@82 4548 # FIXME: we need at least 68020 code to build shared libraries, but
Chris@82 4549 # adding the '-m68020' flag to GCC prevents building anything better,
Chris@82 4550 # like '-m68040'.
Chris@82 4551 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
Chris@82 4552 ;;
Chris@82 4553 esac
Chris@82 4554 ;;
Chris@82 4555
Chris@82 4556 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
Chris@82 4557 # PIC is the default for these OSes.
Chris@82 4558 ;;
Chris@82 4559
Chris@82 4560 mingw* | cygwin* | pw32* | os2* | cegcc*)
Chris@82 4561 # This hack is so that the source file can tell whether it is being
Chris@82 4562 # built for inclusion in a dll (and should export symbols for example).
Chris@82 4563 # Although the cygwin gcc ignores -fPIC, still need this for old-style
Chris@82 4564 # (--disable-auto-import) libraries
Chris@82 4565 m4_if([$1], [GCJ], [],
Chris@82 4566 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
Chris@82 4567 case $host_os in
Chris@82 4568 os2*)
Chris@82 4569 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
Chris@82 4570 ;;
Chris@82 4571 esac
Chris@82 4572 ;;
Chris@82 4573
Chris@82 4574 darwin* | rhapsody*)
Chris@82 4575 # PIC is the default on this platform
Chris@82 4576 # Common symbols not allowed in MH_DYLIB files
Chris@82 4577 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
Chris@82 4578 ;;
Chris@82 4579
Chris@82 4580 haiku*)
Chris@82 4581 # PIC is the default for Haiku.
Chris@82 4582 # The "-static" flag exists, but is broken.
Chris@82 4583 _LT_TAGVAR(lt_prog_compiler_static, $1)=
Chris@82 4584 ;;
Chris@82 4585
Chris@82 4586 hpux*)
Chris@82 4587 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
Chris@82 4588 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
Chris@82 4589 # sets the default TLS model and affects inlining.
Chris@82 4590 case $host_cpu in
Chris@82 4591 hppa*64*)
Chris@82 4592 # +Z the default
Chris@82 4593 ;;
Chris@82 4594 *)
Chris@82 4595 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@82 4596 ;;
Chris@82 4597 esac
Chris@82 4598 ;;
Chris@82 4599
Chris@82 4600 interix[[3-9]]*)
Chris@82 4601 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
Chris@82 4602 # Instead, we relocate shared libraries at runtime.
Chris@82 4603 ;;
Chris@82 4604
Chris@82 4605 msdosdjgpp*)
Chris@82 4606 # Just because we use GCC doesn't mean we suddenly get shared libraries
Chris@82 4607 # on systems that don't support them.
Chris@82 4608 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
Chris@82 4609 enable_shared=no
Chris@82 4610 ;;
Chris@82 4611
Chris@82 4612 *nto* | *qnx*)
Chris@82 4613 # QNX uses GNU C++, but need to define -shared option too, otherwise
Chris@82 4614 # it will coredump.
Chris@82 4615 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
Chris@82 4616 ;;
Chris@82 4617
Chris@82 4618 sysv4*MP*)
Chris@82 4619 if test -d /usr/nec; then
Chris@82 4620 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
Chris@82 4621 fi
Chris@82 4622 ;;
Chris@82 4623
Chris@82 4624 *)
Chris@82 4625 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@82 4626 ;;
Chris@82 4627 esac
Chris@82 4628
Chris@82 4629 case $cc_basename in
Chris@82 4630 nvcc*) # Cuda Compiler Driver 2.2
Chris@82 4631 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
Chris@82 4632 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
Chris@82 4633 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
Chris@82 4634 fi
Chris@82 4635 ;;
Chris@82 4636 esac
Chris@82 4637 else
Chris@82 4638 # PORTME Check for flag to pass linker flags through the system compiler.
Chris@82 4639 case $host_os in
Chris@82 4640 aix*)
Chris@82 4641 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@82 4642 if test ia64 = "$host_cpu"; then
Chris@82 4643 # AIX 5 now supports IA64 processor
Chris@82 4644 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@82 4645 else
Chris@82 4646 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
Chris@82 4647 fi
Chris@82 4648 ;;
Chris@82 4649
Chris@82 4650 darwin* | rhapsody*)
Chris@82 4651 # PIC is the default on this platform
Chris@82 4652 # Common symbols not allowed in MH_DYLIB files
Chris@82 4653 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
Chris@82 4654 case $cc_basename in
Chris@82 4655 nagfor*)
Chris@82 4656 # NAG Fortran compiler
Chris@82 4657 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
Chris@82 4658 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
Chris@82 4659 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@82 4660 ;;
Chris@82 4661 esac
Chris@82 4662 ;;
Chris@82 4663
Chris@82 4664 mingw* | cygwin* | pw32* | os2* | cegcc*)
Chris@82 4665 # This hack is so that the source file can tell whether it is being
Chris@82 4666 # built for inclusion in a dll (and should export symbols for example).
Chris@82 4667 m4_if([$1], [GCJ], [],
Chris@82 4668 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
Chris@82 4669 case $host_os in
Chris@82 4670 os2*)
Chris@82 4671 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
Chris@82 4672 ;;
Chris@82 4673 esac
Chris@82 4674 ;;
Chris@82 4675
Chris@82 4676 hpux9* | hpux10* | hpux11*)
Chris@82 4677 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@82 4678 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
Chris@82 4679 # not for PA HP-UX.
Chris@82 4680 case $host_cpu in
Chris@82 4681 hppa*64*|ia64*)
Chris@82 4682 # +Z the default
Chris@82 4683 ;;
Chris@82 4684 *)
Chris@82 4685 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
Chris@82 4686 ;;
Chris@82 4687 esac
Chris@82 4688 # Is there a better lt_prog_compiler_static that works with the bundled CC?
Chris@82 4689 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
Chris@82 4690 ;;
Chris@82 4691
Chris@82 4692 irix5* | irix6* | nonstopux*)
Chris@82 4693 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@82 4694 # PIC (with -KPIC) is the default.
Chris@82 4695 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@82 4696 ;;
Chris@82 4697
Chris@82 4698 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
Chris@82 4699 case $cc_basename in
Chris@82 4700 # old Intel for x86_64, which still supported -KPIC.
Chris@82 4701 ecc*)
Chris@82 4702 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@82 4703 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@82 4704 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@82 4705 ;;
Chris@82 4706 # icc used to be incompatible with GCC.
Chris@82 4707 # ICC 10 doesn't accept -KPIC any more.
Chris@82 4708 icc* | ifort*)
Chris@82 4709 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@82 4710 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@82 4711 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@82 4712 ;;
Chris@82 4713 # Lahey Fortran 8.1.
Chris@82 4714 lf95*)
Chris@82 4715 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@82 4716 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
Chris@82 4717 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
Chris@82 4718 ;;
Chris@82 4719 nagfor*)
Chris@82 4720 # NAG Fortran compiler
Chris@82 4721 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
Chris@82 4722 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
Chris@82 4723 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@82 4724 ;;
Chris@82 4725 tcc*)
Chris@82 4726 # Fabrice Bellard et al's Tiny C Compiler
Chris@82 4727 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@82 4728 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@82 4729 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@82 4730 ;;
Chris@82 4731 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
Chris@82 4732 # Portland Group compilers (*not* the Pentium gcc compiler,
Chris@82 4733 # which looks to be a dead project)
Chris@82 4734 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@82 4735 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
Chris@82 4736 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@82 4737 ;;
Chris@82 4738 ccc*)
Chris@82 4739 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@82 4740 # All Alpha code is PIC.
Chris@82 4741 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@82 4742 ;;
Chris@82 4743 xl* | bgxl* | bgf* | mpixl*)
Chris@82 4744 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
Chris@82 4745 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@82 4746 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
Chris@82 4747 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
Chris@82 4748 ;;
Chris@82 4749 *)
Chris@82 4750 case `$CC -V 2>&1 | sed 5q` in
Chris@82 4751 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
Chris@82 4752 # Sun Fortran 8.3 passes all unrecognized flags to the linker
Chris@82 4753 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@82 4754 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@82 4755 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
Chris@82 4756 ;;
Chris@82 4757 *Sun\ F* | *Sun*Fortran*)
Chris@82 4758 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@82 4759 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@82 4760 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
Chris@82 4761 ;;
Chris@82 4762 *Sun\ C*)
Chris@82 4763 # Sun C 5.9
Chris@82 4764 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@82 4765 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@82 4766 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@82 4767 ;;
Chris@82 4768 *Intel*\ [[CF]]*Compiler*)
Chris@82 4769 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@82 4770 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@82 4771 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@82 4772 ;;
Chris@82 4773 *Portland\ Group*)
Chris@82 4774 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@82 4775 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
Chris@82 4776 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@82 4777 ;;
Chris@82 4778 esac
Chris@82 4779 ;;
Chris@82 4780 esac
Chris@82 4781 ;;
Chris@82 4782
Chris@82 4783 newsos6)
Chris@82 4784 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@82 4785 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@82 4786 ;;
Chris@82 4787
Chris@82 4788 *nto* | *qnx*)
Chris@82 4789 # QNX uses GNU C++, but need to define -shared option too, otherwise
Chris@82 4790 # it will coredump.
Chris@82 4791 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
Chris@82 4792 ;;
Chris@82 4793
Chris@82 4794 osf3* | osf4* | osf5*)
Chris@82 4795 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@82 4796 # All OSF/1 code is PIC.
Chris@82 4797 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@82 4798 ;;
Chris@82 4799
Chris@82 4800 rdos*)
Chris@82 4801 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@82 4802 ;;
Chris@82 4803
Chris@82 4804 solaris*)
Chris@82 4805 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@82 4806 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@82 4807 case $cc_basename in
Chris@82 4808 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
Chris@82 4809 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
Chris@82 4810 *)
Chris@82 4811 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
Chris@82 4812 esac
Chris@82 4813 ;;
Chris@82 4814
Chris@82 4815 sunos4*)
Chris@82 4816 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
Chris@82 4817 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
Chris@82 4818 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@82 4819 ;;
Chris@82 4820
Chris@82 4821 sysv4 | sysv4.2uw2* | sysv4.3*)
Chris@82 4822 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@82 4823 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@82 4824 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@82 4825 ;;
Chris@82 4826
Chris@82 4827 sysv4*MP*)
Chris@82 4828 if test -d /usr/nec; then
Chris@82 4829 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
Chris@82 4830 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@82 4831 fi
Chris@82 4832 ;;
Chris@82 4833
Chris@82 4834 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
Chris@82 4835 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@82 4836 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@82 4837 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@82 4838 ;;
Chris@82 4839
Chris@82 4840 unicos*)
Chris@82 4841 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@82 4842 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
Chris@82 4843 ;;
Chris@82 4844
Chris@82 4845 uts4*)
Chris@82 4846 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@82 4847 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@82 4848 ;;
Chris@82 4849
Chris@82 4850 *)
Chris@82 4851 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
Chris@82 4852 ;;
Chris@82 4853 esac
Chris@82 4854 fi
Chris@82 4855 ])
Chris@82 4856 case $host_os in
Chris@82 4857 # For platforms that do not support PIC, -DPIC is meaningless:
Chris@82 4858 *djgpp*)
Chris@82 4859 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@82 4860 ;;
Chris@82 4861 *)
Chris@82 4862 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
Chris@82 4863 ;;
Chris@82 4864 esac
Chris@82 4865
Chris@82 4866 AC_CACHE_CHECK([for $compiler option to produce PIC],
Chris@82 4867 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
Chris@82 4868 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
Chris@82 4869 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
Chris@82 4870
Chris@82 4871 #
Chris@82 4872 # Check to make sure the PIC flag actually works.
Chris@82 4873 #
Chris@82 4874 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
Chris@82 4875 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
Chris@82 4876 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
Chris@82 4877 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
Chris@82 4878 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
Chris@82 4879 "" | " "*) ;;
Chris@82 4880 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
Chris@82 4881 esac],
Chris@82 4882 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@82 4883 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
Chris@82 4884 fi
Chris@82 4885 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
Chris@82 4886 [Additional compiler flags for building library objects])
Chris@82 4887
Chris@82 4888 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
Chris@82 4889 [How to pass a linker flag through the compiler])
Chris@82 4890 #
Chris@82 4891 # Check to make sure the static flag actually works.
Chris@82 4892 #
Chris@82 4893 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
Chris@82 4894 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
Chris@82 4895 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
Chris@82 4896 $lt_tmp_static_flag,
Chris@82 4897 [],
Chris@82 4898 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
Chris@82 4899 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
Chris@82 4900 [Compiler flag to prevent dynamic linking])
Chris@82 4901 ])# _LT_COMPILER_PIC
Chris@82 4902
Chris@82 4903
Chris@82 4904 # _LT_LINKER_SHLIBS([TAGNAME])
Chris@82 4905 # ----------------------------
Chris@82 4906 # See if the linker supports building shared libraries.
Chris@82 4907 m4_defun([_LT_LINKER_SHLIBS],
Chris@82 4908 [AC_REQUIRE([LT_PATH_LD])dnl
Chris@82 4909 AC_REQUIRE([LT_PATH_NM])dnl
Chris@82 4910 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
Chris@82 4911 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@82 4912 m4_require([_LT_DECL_EGREP])dnl
Chris@82 4913 m4_require([_LT_DECL_SED])dnl
Chris@82 4914 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
Chris@82 4915 m4_require([_LT_TAG_COMPILER])dnl
Chris@82 4916 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
Chris@82 4917 m4_if([$1], [CXX], [
Chris@82 4918 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
Chris@82 4919 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
Chris@82 4920 case $host_os in
Chris@82 4921 aix[[4-9]]*)
Chris@82 4922 # If we're using GNU nm, then we don't want the "-C" option.
Chris@82 4923 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
Chris@82 4924 # Without the "-l" option, or with the "-B" option, AIX nm treats
Chris@82 4925 # weak defined symbols like other global defined symbols, whereas
Chris@82 4926 # GNU nm marks them as "W".
Chris@82 4927 # While the 'weak' keyword is ignored in the Export File, we need
Chris@82 4928 # it in the Import File for the 'aix-soname' feature, so we have
Chris@82 4929 # to replace the "-B" option with "-P" for AIX nm.
Chris@82 4930 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
Chris@82 4931 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
Chris@82 4932 else
Chris@82 4933 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
Chris@82 4934 fi
Chris@82 4935 ;;
Chris@82 4936 pw32*)
Chris@82 4937 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
Chris@82 4938 ;;
Chris@82 4939 cygwin* | mingw* | cegcc*)
Chris@82 4940 case $cc_basename in
Chris@82 4941 cl*)
Chris@82 4942 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
Chris@82 4943 ;;
Chris@82 4944 *)
Chris@82 4945 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
Chris@82 4946 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
Chris@82 4947 ;;
Chris@82 4948 esac
Chris@82 4949 ;;
Chris@82 4950 linux* | k*bsd*-gnu | gnu*)
Chris@82 4951 _LT_TAGVAR(link_all_deplibs, $1)=no
Chris@82 4952 ;;
Chris@82 4953 *)
Chris@82 4954 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
Chris@82 4955 ;;
Chris@82 4956 esac
Chris@82 4957 ], [
Chris@82 4958 runpath_var=
Chris@82 4959 _LT_TAGVAR(allow_undefined_flag, $1)=
Chris@82 4960 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@82 4961 _LT_TAGVAR(archive_cmds, $1)=
Chris@82 4962 _LT_TAGVAR(archive_expsym_cmds, $1)=
Chris@82 4963 _LT_TAGVAR(compiler_needs_object, $1)=no
Chris@82 4964 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
Chris@82 4965 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@82 4966 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
Chris@82 4967 _LT_TAGVAR(hardcode_automatic, $1)=no
Chris@82 4968 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@82 4969 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@82 4970 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@82 4971 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@82 4972 _LT_TAGVAR(hardcode_minus_L, $1)=no
Chris@82 4973 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
Chris@82 4974 _LT_TAGVAR(inherit_rpath, $1)=no
Chris@82 4975 _LT_TAGVAR(link_all_deplibs, $1)=unknown
Chris@82 4976 _LT_TAGVAR(module_cmds, $1)=
Chris@82 4977 _LT_TAGVAR(module_expsym_cmds, $1)=
Chris@82 4978 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
Chris@82 4979 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
Chris@82 4980 _LT_TAGVAR(thread_safe_flag_spec, $1)=
Chris@82 4981 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@82 4982 # include_expsyms should be a list of space-separated symbols to be *always*
Chris@82 4983 # included in the symbol list
Chris@82 4984 _LT_TAGVAR(include_expsyms, $1)=
Chris@82 4985 # exclude_expsyms can be an extended regexp of symbols to exclude
Chris@82 4986 # it will be wrapped by ' (' and ')$', so one must not match beginning or
Chris@82 4987 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
Chris@82 4988 # as well as any symbol that contains 'd'.
Chris@82 4989 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
Chris@82 4990 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
Chris@82 4991 # platforms (ab)use it in PIC code, but their linkers get confused if
Chris@82 4992 # the symbol is explicitly referenced. Since portable code cannot
Chris@82 4993 # rely on this symbol name, it's probably fine to never include it in
Chris@82 4994 # preloaded symbol tables.
Chris@82 4995 # Exclude shared library initialization/finalization symbols.
Chris@82 4996 dnl Note also adjust exclude_expsyms for C++ above.
Chris@82 4997 extract_expsyms_cmds=
Chris@82 4998
Chris@82 4999 case $host_os in
Chris@82 5000 cygwin* | mingw* | pw32* | cegcc*)
Chris@82 5001 # FIXME: the MSVC++ port hasn't been tested in a loooong time
Chris@82 5002 # When not using gcc, we currently assume that we are using
Chris@82 5003 # Microsoft Visual C++.
Chris@82 5004 if test yes != "$GCC"; then
Chris@82 5005 with_gnu_ld=no
Chris@82 5006 fi
Chris@82 5007 ;;
Chris@82 5008 interix*)
Chris@82 5009 # we just hope/assume this is gcc and not c89 (= MSVC++)
Chris@82 5010 with_gnu_ld=yes
Chris@82 5011 ;;
Chris@82 5012 openbsd* | bitrig*)
Chris@82 5013 with_gnu_ld=no
Chris@82 5014 ;;
Chris@82 5015 linux* | k*bsd*-gnu | gnu*)
Chris@82 5016 _LT_TAGVAR(link_all_deplibs, $1)=no
Chris@82 5017 ;;
Chris@82 5018 esac
Chris@82 5019
Chris@82 5020 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@82 5021
Chris@82 5022 # On some targets, GNU ld is compatible enough with the native linker
Chris@82 5023 # that we're better off using the native interface for both.
Chris@82 5024 lt_use_gnu_ld_interface=no
Chris@82 5025 if test yes = "$with_gnu_ld"; then
Chris@82 5026 case $host_os in
Chris@82 5027 aix*)
Chris@82 5028 # The AIX port of GNU ld has always aspired to compatibility
Chris@82 5029 # with the native linker. However, as the warning in the GNU ld
Chris@82 5030 # block says, versions before 2.19.5* couldn't really create working
Chris@82 5031 # shared libraries, regardless of the interface used.
Chris@82 5032 case `$LD -v 2>&1` in
Chris@82 5033 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
Chris@82 5034 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
Chris@82 5035 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
Chris@82 5036 *)
Chris@82 5037 lt_use_gnu_ld_interface=yes
Chris@82 5038 ;;
Chris@82 5039 esac
Chris@82 5040 ;;
Chris@82 5041 *)
Chris@82 5042 lt_use_gnu_ld_interface=yes
Chris@82 5043 ;;
Chris@82 5044 esac
Chris@82 5045 fi
Chris@82 5046
Chris@82 5047 if test yes = "$lt_use_gnu_ld_interface"; then
Chris@82 5048 # If archive_cmds runs LD, not CC, wlarc should be empty
Chris@82 5049 wlarc='$wl'
Chris@82 5050
Chris@82 5051 # Set some defaults for GNU ld with shared library support. These
Chris@82 5052 # are reset later if shared libraries are not supported. Putting them
Chris@82 5053 # here allows them to be overridden if necessary.
Chris@82 5054 runpath_var=LD_RUN_PATH
Chris@82 5055 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@82 5056 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
Chris@82 5057 # ancient GNU ld didn't support --whole-archive et. al.
Chris@82 5058 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
Chris@82 5059 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
Chris@82 5060 else
Chris@82 5061 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@82 5062 fi
Chris@82 5063 supports_anon_versioning=no
Chris@82 5064 case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
Chris@82 5065 *GNU\ gold*) supports_anon_versioning=yes ;;
Chris@82 5066 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
Chris@82 5067 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
Chris@82 5068 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
Chris@82 5069 *\ 2.11.*) ;; # other 2.11 versions
Chris@82 5070 *) supports_anon_versioning=yes ;;
Chris@82 5071 esac
Chris@82 5072
Chris@82 5073 # See if GNU ld supports shared libraries.
Chris@82 5074 case $host_os in
Chris@82 5075 aix[[3-9]]*)
Chris@82 5076 # On AIX/PPC, the GNU linker is very broken
Chris@82 5077 if test ia64 != "$host_cpu"; then
Chris@82 5078 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 5079 cat <<_LT_EOF 1>&2
Chris@82 5080
Chris@82 5081 *** Warning: the GNU linker, at least up to release 2.19, is reported
Chris@82 5082 *** to be unable to reliably create shared libraries on AIX.
Chris@82 5083 *** Therefore, libtool is disabling shared libraries support. If you
Chris@82 5084 *** really care for shared libraries, you may want to install binutils
Chris@82 5085 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
Chris@82 5086 *** You will then need to restart the configuration process.
Chris@82 5087
Chris@82 5088 _LT_EOF
Chris@82 5089 fi
Chris@82 5090 ;;
Chris@82 5091
Chris@82 5092 amigaos*)
Chris@82 5093 case $host_cpu in
Chris@82 5094 powerpc)
Chris@82 5095 # see comment about AmigaOS4 .so support
Chris@82 5096 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@82 5097 _LT_TAGVAR(archive_expsym_cmds, $1)=''
Chris@82 5098 ;;
Chris@82 5099 m68k)
Chris@82 5100 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
Chris@82 5101 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@82 5102 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@82 5103 ;;
Chris@82 5104 esac
Chris@82 5105 ;;
Chris@82 5106
Chris@82 5107 beos*)
Chris@82 5108 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
Chris@82 5109 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@82 5110 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
Chris@82 5111 # support --undefined. This deserves some investigation. FIXME
Chris@82 5112 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@82 5113 else
Chris@82 5114 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 5115 fi
Chris@82 5116 ;;
Chris@82 5117
Chris@82 5118 cygwin* | mingw* | pw32* | cegcc*)
Chris@82 5119 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
Chris@82 5120 # as there is no search path for DLLs.
Chris@82 5121 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@82 5122 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
Chris@82 5123 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@82 5124 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@82 5125 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@82 5126 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
Chris@82 5127 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
Chris@82 5128
Chris@82 5129 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
Chris@82 5130 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
Chris@82 5131 # If the export-symbols file already is a .def file, use it as
Chris@82 5132 # is; otherwise, prepend EXPORTS...
Chris@82 5133 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
Chris@82 5134 cp $export_symbols $output_objdir/$soname.def;
Chris@82 5135 else
Chris@82 5136 echo EXPORTS > $output_objdir/$soname.def;
Chris@82 5137 cat $export_symbols >> $output_objdir/$soname.def;
Chris@82 5138 fi~
Chris@82 5139 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
Chris@82 5140 else
Chris@82 5141 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 5142 fi
Chris@82 5143 ;;
Chris@82 5144
Chris@82 5145 haiku*)
Chris@82 5146 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@82 5147 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@82 5148 ;;
Chris@82 5149
Chris@82 5150 os2*)
Chris@82 5151 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@82 5152 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@82 5153 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@82 5154 shrext_cmds=.dll
Chris@82 5155 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
Chris@82 5156 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
Chris@82 5157 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
Chris@82 5158 $ECHO EXPORTS >> $output_objdir/$libname.def~
Chris@82 5159 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
Chris@82 5160 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
Chris@82 5161 emximp -o $lib $output_objdir/$libname.def'
Chris@82 5162 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
Chris@82 5163 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
Chris@82 5164 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
Chris@82 5165 $ECHO EXPORTS >> $output_objdir/$libname.def~
Chris@82 5166 prefix_cmds="$SED"~
Chris@82 5167 if test EXPORTS = "`$SED 1q $export_symbols`"; then
Chris@82 5168 prefix_cmds="$prefix_cmds -e 1d";
Chris@82 5169 fi~
Chris@82 5170 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
Chris@82 5171 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
Chris@82 5172 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
Chris@82 5173 emximp -o $lib $output_objdir/$libname.def'
Chris@82 5174 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
Chris@82 5175 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@82 5176 ;;
Chris@82 5177
Chris@82 5178 interix[[3-9]]*)
Chris@82 5179 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@82 5180 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@82 5181 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@82 5182 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@82 5183 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
Chris@82 5184 # Instead, shared libraries are loaded at an image base (0x10000000 by
Chris@82 5185 # default) and relocated if they conflict, which is a slow very memory
Chris@82 5186 # consuming and fragmenting process. To avoid this, we pick a random,
Chris@82 5187 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
Chris@82 5188 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
Chris@82 5189 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
Chris@82 5190 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
Chris@82 5191 ;;
Chris@82 5192
Chris@82 5193 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
Chris@82 5194 tmp_diet=no
Chris@82 5195 if test linux-dietlibc = "$host_os"; then
Chris@82 5196 case $cc_basename in
Chris@82 5197 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
Chris@82 5198 esac
Chris@82 5199 fi
Chris@82 5200 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
Chris@82 5201 && test no = "$tmp_diet"
Chris@82 5202 then
Chris@82 5203 tmp_addflag=' $pic_flag'
Chris@82 5204 tmp_sharedflag='-shared'
Chris@82 5205 case $cc_basename,$host_cpu in
Chris@82 5206 pgcc*) # Portland Group C compiler
Chris@82 5207 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
Chris@82 5208 tmp_addflag=' $pic_flag'
Chris@82 5209 ;;
Chris@82 5210 pgf77* | pgf90* | pgf95* | pgfortran*)
Chris@82 5211 # Portland Group f77 and f90 compilers
Chris@82 5212 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
Chris@82 5213 tmp_addflag=' $pic_flag -Mnomain' ;;
Chris@82 5214 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
Chris@82 5215 tmp_addflag=' -i_dynamic' ;;
Chris@82 5216 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
Chris@82 5217 tmp_addflag=' -i_dynamic -nofor_main' ;;
Chris@82 5218 ifc* | ifort*) # Intel Fortran compiler
Chris@82 5219 tmp_addflag=' -nofor_main' ;;
Chris@82 5220 lf95*) # Lahey Fortran 8.1
Chris@82 5221 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@82 5222 tmp_sharedflag='--shared' ;;
Chris@82 5223 nagfor*) # NAGFOR 5.3
Chris@82 5224 tmp_sharedflag='-Wl,-shared' ;;
Chris@82 5225 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
Chris@82 5226 tmp_sharedflag='-qmkshrobj'
Chris@82 5227 tmp_addflag= ;;
Chris@82 5228 nvcc*) # Cuda Compiler Driver 2.2
Chris@82 5229 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
Chris@82 5230 _LT_TAGVAR(compiler_needs_object, $1)=yes
Chris@82 5231 ;;
Chris@82 5232 esac
Chris@82 5233 case `$CC -V 2>&1 | sed 5q` in
Chris@82 5234 *Sun\ C*) # Sun C 5.9
Chris@82 5235 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
Chris@82 5236 _LT_TAGVAR(compiler_needs_object, $1)=yes
Chris@82 5237 tmp_sharedflag='-G' ;;
Chris@82 5238 *Sun\ F*) # Sun Fortran 8.3
Chris@82 5239 tmp_sharedflag='-G' ;;
Chris@82 5240 esac
Chris@82 5241 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@82 5242
Chris@82 5243 if test yes = "$supports_anon_versioning"; then
Chris@82 5244 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
Chris@82 5245 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
Chris@82 5246 echo "local: *; };" >> $output_objdir/$libname.ver~
Chris@82 5247 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
Chris@82 5248 fi
Chris@82 5249
Chris@82 5250 case $cc_basename in
Chris@82 5251 tcc*)
Chris@82 5252 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
Chris@82 5253 ;;
Chris@82 5254 xlf* | bgf* | bgxlf* | mpixlf*)
Chris@82 5255 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
Chris@82 5256 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
Chris@82 5257 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@82 5258 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
Chris@82 5259 if test yes = "$supports_anon_versioning"; then
Chris@82 5260 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
Chris@82 5261 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
Chris@82 5262 echo "local: *; };" >> $output_objdir/$libname.ver~
Chris@82 5263 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
Chris@82 5264 fi
Chris@82 5265 ;;
Chris@82 5266 esac
Chris@82 5267 else
Chris@82 5268 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 5269 fi
Chris@82 5270 ;;
Chris@82 5271
Chris@82 5272 netbsd* | netbsdelf*-gnu)
Chris@82 5273 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
Chris@82 5274 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
Chris@82 5275 wlarc=
Chris@82 5276 else
Chris@82 5277 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@82 5278 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
Chris@82 5279 fi
Chris@82 5280 ;;
Chris@82 5281
Chris@82 5282 solaris*)
Chris@82 5283 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
Chris@82 5284 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 5285 cat <<_LT_EOF 1>&2
Chris@82 5286
Chris@82 5287 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
Chris@82 5288 *** create shared libraries on Solaris systems. Therefore, libtool
Chris@82 5289 *** is disabling shared libraries support. We urge you to upgrade GNU
Chris@82 5290 *** binutils to release 2.9.1 or newer. Another option is to modify
Chris@82 5291 *** your PATH or compiler configuration so that the native linker is
Chris@82 5292 *** used, and then restart.
Chris@82 5293
Chris@82 5294 _LT_EOF
Chris@82 5295 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
Chris@82 5296 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@82 5297 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
Chris@82 5298 else
Chris@82 5299 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 5300 fi
Chris@82 5301 ;;
Chris@82 5302
Chris@82 5303 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
Chris@82 5304 case `$LD -v 2>&1` in
Chris@82 5305 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
Chris@82 5306 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 5307 cat <<_LT_EOF 1>&2
Chris@82 5308
Chris@82 5309 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
Chris@82 5310 *** reliably create shared libraries on SCO systems. Therefore, libtool
Chris@82 5311 *** is disabling shared libraries support. We urge you to upgrade GNU
Chris@82 5312 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
Chris@82 5313 *** your PATH or compiler configuration so that the native linker is
Chris@82 5314 *** used, and then restart.
Chris@82 5315
Chris@82 5316 _LT_EOF
Chris@82 5317 ;;
Chris@82 5318 *)
Chris@82 5319 # For security reasons, it is highly recommended that you always
Chris@82 5320 # use absolute paths for naming shared libraries, and exclude the
Chris@82 5321 # DT_RUNPATH tag from executables and libraries. But doing so
Chris@82 5322 # requires that you compile everything twice, which is a pain.
Chris@82 5323 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
Chris@82 5324 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@82 5325 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@82 5326 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
Chris@82 5327 else
Chris@82 5328 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 5329 fi
Chris@82 5330 ;;
Chris@82 5331 esac
Chris@82 5332 ;;
Chris@82 5333
Chris@82 5334 sunos4*)
Chris@82 5335 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
Chris@82 5336 wlarc=
Chris@82 5337 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@82 5338 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@82 5339 ;;
Chris@82 5340
Chris@82 5341 *)
Chris@82 5342 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
Chris@82 5343 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@82 5344 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
Chris@82 5345 else
Chris@82 5346 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 5347 fi
Chris@82 5348 ;;
Chris@82 5349 esac
Chris@82 5350
Chris@82 5351 if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
Chris@82 5352 runpath_var=
Chris@82 5353 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@82 5354 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@82 5355 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@82 5356 fi
Chris@82 5357 else
Chris@82 5358 # PORTME fill in a description of your system's linker (not GNU ld)
Chris@82 5359 case $host_os in
Chris@82 5360 aix3*)
Chris@82 5361 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@82 5362 _LT_TAGVAR(always_export_symbols, $1)=yes
Chris@82 5363 _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
Chris@82 5364 # Note: this linker hardcodes the directories in LIBPATH if there
Chris@82 5365 # are no directories specified by -L.
Chris@82 5366 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@82 5367 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
Chris@82 5368 # Neither direct hardcoding nor static linking is supported with a
Chris@82 5369 # broken collect2.
Chris@82 5370 _LT_TAGVAR(hardcode_direct, $1)=unsupported
Chris@82 5371 fi
Chris@82 5372 ;;
Chris@82 5373
Chris@82 5374 aix[[4-9]]*)
Chris@82 5375 if test ia64 = "$host_cpu"; then
Chris@82 5376 # On IA64, the linker does run time linking by default, so we don't
Chris@82 5377 # have to do anything special.
Chris@82 5378 aix_use_runtimelinking=no
Chris@82 5379 exp_sym_flag='-Bexport'
Chris@82 5380 no_entry_flag=
Chris@82 5381 else
Chris@82 5382 # If we're using GNU nm, then we don't want the "-C" option.
Chris@82 5383 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
Chris@82 5384 # Without the "-l" option, or with the "-B" option, AIX nm treats
Chris@82 5385 # weak defined symbols like other global defined symbols, whereas
Chris@82 5386 # GNU nm marks them as "W".
Chris@82 5387 # While the 'weak' keyword is ignored in the Export File, we need
Chris@82 5388 # it in the Import File for the 'aix-soname' feature, so we have
Chris@82 5389 # to replace the "-B" option with "-P" for AIX nm.
Chris@82 5390 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
Chris@82 5391 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
Chris@82 5392 else
Chris@82 5393 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
Chris@82 5394 fi
Chris@82 5395 aix_use_runtimelinking=no
Chris@82 5396
Chris@82 5397 # Test if we are trying to use run time linking or normal
Chris@82 5398 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
Chris@82 5399 # have runtime linking enabled, and use it for executables.
Chris@82 5400 # For shared libraries, we enable/disable runtime linking
Chris@82 5401 # depending on the kind of the shared library created -
Chris@82 5402 # when "with_aix_soname,aix_use_runtimelinking" is:
Chris@82 5403 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
Chris@82 5404 # "aix,yes" lib.so shared, rtl:yes, for executables
Chris@82 5405 # lib.a static archive
Chris@82 5406 # "both,no" lib.so.V(shr.o) shared, rtl:yes
Chris@82 5407 # lib.a(lib.so.V) shared, rtl:no, for executables
Chris@82 5408 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
Chris@82 5409 # lib.a(lib.so.V) shared, rtl:no
Chris@82 5410 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
Chris@82 5411 # lib.a static archive
Chris@82 5412 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
Chris@82 5413 for ld_flag in $LDFLAGS; do
Chris@82 5414 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
Chris@82 5415 aix_use_runtimelinking=yes
Chris@82 5416 break
Chris@82 5417 fi
Chris@82 5418 done
Chris@82 5419 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
Chris@82 5420 # With aix-soname=svr4, we create the lib.so.V shared archives only,
Chris@82 5421 # so we don't have lib.a shared libs to link our executables.
Chris@82 5422 # We have to force runtime linking in this case.
Chris@82 5423 aix_use_runtimelinking=yes
Chris@82 5424 LDFLAGS="$LDFLAGS -Wl,-brtl"
Chris@82 5425 fi
Chris@82 5426 ;;
Chris@82 5427 esac
Chris@82 5428
Chris@82 5429 exp_sym_flag='-bexport'
Chris@82 5430 no_entry_flag='-bnoentry'
Chris@82 5431 fi
Chris@82 5432
Chris@82 5433 # When large executables or shared objects are built, AIX ld can
Chris@82 5434 # have problems creating the table of contents. If linking a library
Chris@82 5435 # or program results in "error TOC overflow" add -mminimal-toc to
Chris@82 5436 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
Chris@82 5437 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
Chris@82 5438
Chris@82 5439 _LT_TAGVAR(archive_cmds, $1)=''
Chris@82 5440 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@82 5441 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@82 5442 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
Chris@82 5443 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@82 5444 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
Chris@82 5445 case $with_aix_soname,$aix_use_runtimelinking in
Chris@82 5446 aix,*) ;; # traditional, no import file
Chris@82 5447 svr4,* | *,yes) # use import file
Chris@82 5448 # The Import File defines what to hardcode.
Chris@82 5449 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@82 5450 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@82 5451 ;;
Chris@82 5452 esac
Chris@82 5453
Chris@82 5454 if test yes = "$GCC"; then
Chris@82 5455 case $host_os in aix4.[[012]]|aix4.[[012]].*)
Chris@82 5456 # We only want to do this on AIX 4.2 and lower, the check
Chris@82 5457 # below for broken collect2 doesn't work under 4.3+
Chris@82 5458 collect2name=`$CC -print-prog-name=collect2`
Chris@82 5459 if test -f "$collect2name" &&
Chris@82 5460 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
Chris@82 5461 then
Chris@82 5462 # We have reworked collect2
Chris@82 5463 :
Chris@82 5464 else
Chris@82 5465 # We have old collect2
Chris@82 5466 _LT_TAGVAR(hardcode_direct, $1)=unsupported
Chris@82 5467 # It fails to find uninstalled libraries when the uninstalled
Chris@82 5468 # path is not listed in the libpath. Setting hardcode_minus_L
Chris@82 5469 # to unsupported forces relinking
Chris@82 5470 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@82 5471 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@82 5472 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@82 5473 fi
Chris@82 5474 ;;
Chris@82 5475 esac
Chris@82 5476 shared_flag='-shared'
Chris@82 5477 if test yes = "$aix_use_runtimelinking"; then
Chris@82 5478 shared_flag="$shared_flag "'$wl-G'
Chris@82 5479 fi
Chris@82 5480 # Need to ensure runtime linking is disabled for the traditional
Chris@82 5481 # shared library, or the linker may eventually find shared libraries
Chris@82 5482 # /with/ Import File - we do not want to mix them.
Chris@82 5483 shared_flag_aix='-shared'
Chris@82 5484 shared_flag_svr4='-shared $wl-G'
Chris@82 5485 else
Chris@82 5486 # not using gcc
Chris@82 5487 if test ia64 = "$host_cpu"; then
Chris@82 5488 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
Chris@82 5489 # chokes on -Wl,-G. The following line is correct:
Chris@82 5490 shared_flag='-G'
Chris@82 5491 else
Chris@82 5492 if test yes = "$aix_use_runtimelinking"; then
Chris@82 5493 shared_flag='$wl-G'
Chris@82 5494 else
Chris@82 5495 shared_flag='$wl-bM:SRE'
Chris@82 5496 fi
Chris@82 5497 shared_flag_aix='$wl-bM:SRE'
Chris@82 5498 shared_flag_svr4='$wl-G'
Chris@82 5499 fi
Chris@82 5500 fi
Chris@82 5501
Chris@82 5502 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
Chris@82 5503 # It seems that -bexpall does not export symbols beginning with
Chris@82 5504 # underscore (_), so it is better to generate a list of symbols to export.
Chris@82 5505 _LT_TAGVAR(always_export_symbols, $1)=yes
Chris@82 5506 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
Chris@82 5507 # Warning - without using the other runtime loading flags (-brtl),
Chris@82 5508 # -berok will link without error, but may produce a broken library.
Chris@82 5509 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
Chris@82 5510 # Determine the default libpath from the value encoded in an
Chris@82 5511 # empty executable.
Chris@82 5512 _LT_SYS_MODULE_PATH_AIX([$1])
Chris@82 5513 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
Chris@82 5514 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
Chris@82 5515 else
Chris@82 5516 if test ia64 = "$host_cpu"; then
Chris@82 5517 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
Chris@82 5518 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
Chris@82 5519 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
Chris@82 5520 else
Chris@82 5521 # Determine the default libpath from the value encoded in an
Chris@82 5522 # empty executable.
Chris@82 5523 _LT_SYS_MODULE_PATH_AIX([$1])
Chris@82 5524 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
Chris@82 5525 # Warning - without using the other run time loading flags,
Chris@82 5526 # -berok will link without error, but may produce a broken library.
Chris@82 5527 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
Chris@82 5528 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
Chris@82 5529 if test yes = "$with_gnu_ld"; then
Chris@82 5530 # We only use this code for GNU lds that support --whole-archive.
Chris@82 5531 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
Chris@82 5532 else
Chris@82 5533 # Exported symbols can be pulled into shared objects from archives
Chris@82 5534 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
Chris@82 5535 fi
Chris@82 5536 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
Chris@82 5537 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
Chris@82 5538 # -brtl affects multiple linker settings, -berok does not and is overridden later
Chris@82 5539 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
Chris@82 5540 if test svr4 != "$with_aix_soname"; then
Chris@82 5541 # This is similar to how AIX traditionally builds its shared libraries.
Chris@82 5542 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
Chris@82 5543 fi
Chris@82 5544 if test aix != "$with_aix_soname"; then
Chris@82 5545 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
Chris@82 5546 else
Chris@82 5547 # used by -dlpreopen to get the symbols
Chris@82 5548 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
Chris@82 5549 fi
Chris@82 5550 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
Chris@82 5551 fi
Chris@82 5552 fi
Chris@82 5553 ;;
Chris@82 5554
Chris@82 5555 amigaos*)
Chris@82 5556 case $host_cpu in
Chris@82 5557 powerpc)
Chris@82 5558 # see comment about AmigaOS4 .so support
Chris@82 5559 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@82 5560 _LT_TAGVAR(archive_expsym_cmds, $1)=''
Chris@82 5561 ;;
Chris@82 5562 m68k)
Chris@82 5563 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
Chris@82 5564 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@82 5565 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@82 5566 ;;
Chris@82 5567 esac
Chris@82 5568 ;;
Chris@82 5569
Chris@82 5570 bsdi[[45]]*)
Chris@82 5571 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
Chris@82 5572 ;;
Chris@82 5573
Chris@82 5574 cygwin* | mingw* | pw32* | cegcc*)
Chris@82 5575 # When not using gcc, we currently assume that we are using
Chris@82 5576 # Microsoft Visual C++.
Chris@82 5577 # hardcode_libdir_flag_spec is actually meaningless, as there is
Chris@82 5578 # no search path for DLLs.
Chris@82 5579 case $cc_basename in
Chris@82 5580 cl*)
Chris@82 5581 # Native MSVC
Chris@82 5582 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
Chris@82 5583 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@82 5584 _LT_TAGVAR(always_export_symbols, $1)=yes
Chris@82 5585 _LT_TAGVAR(file_list_spec, $1)='@'
Chris@82 5586 # Tell ltmain to make .lib files, not .a files.
Chris@82 5587 libext=lib
Chris@82 5588 # Tell ltmain to make .dll files, not .so files.
Chris@82 5589 shrext_cmds=.dll
Chris@82 5590 # FIXME: Setting linknames here is a bad hack.
Chris@82 5591 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
Chris@82 5592 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
Chris@82 5593 cp "$export_symbols" "$output_objdir/$soname.def";
Chris@82 5594 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
Chris@82 5595 else
Chris@82 5596 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
Chris@82 5597 fi~
Chris@82 5598 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
Chris@82 5599 linknames='
Chris@82 5600 # The linker will not automatically build a static lib if we build a DLL.
Chris@82 5601 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
Chris@82 5602 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@82 5603 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
Chris@82 5604 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
Chris@82 5605 # Don't use ranlib
Chris@82 5606 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
Chris@82 5607 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
Chris@82 5608 lt_tool_outputfile="@TOOL_OUTPUT@"~
Chris@82 5609 case $lt_outputfile in
Chris@82 5610 *.exe|*.EXE) ;;
Chris@82 5611 *)
Chris@82 5612 lt_outputfile=$lt_outputfile.exe
Chris@82 5613 lt_tool_outputfile=$lt_tool_outputfile.exe
Chris@82 5614 ;;
Chris@82 5615 esac~
Chris@82 5616 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
Chris@82 5617 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
Chris@82 5618 $RM "$lt_outputfile.manifest";
Chris@82 5619 fi'
Chris@82 5620 ;;
Chris@82 5621 *)
Chris@82 5622 # Assume MSVC wrapper
Chris@82 5623 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
Chris@82 5624 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@82 5625 # Tell ltmain to make .lib files, not .a files.
Chris@82 5626 libext=lib
Chris@82 5627 # Tell ltmain to make .dll files, not .so files.
Chris@82 5628 shrext_cmds=.dll
Chris@82 5629 # FIXME: Setting linknames here is a bad hack.
Chris@82 5630 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
Chris@82 5631 # The linker will automatically build a .lib file if we build a DLL.
Chris@82 5632 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
Chris@82 5633 # FIXME: Should let the user specify the lib program.
Chris@82 5634 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
Chris@82 5635 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@82 5636 ;;
Chris@82 5637 esac
Chris@82 5638 ;;
Chris@82 5639
Chris@82 5640 darwin* | rhapsody*)
Chris@82 5641 _LT_DARWIN_LINKER_FEATURES($1)
Chris@82 5642 ;;
Chris@82 5643
Chris@82 5644 dgux*)
Chris@82 5645 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@82 5646 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@82 5647 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@82 5648 ;;
Chris@82 5649
Chris@82 5650 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
Chris@82 5651 # support. Future versions do this automatically, but an explicit c++rt0.o
Chris@82 5652 # does not break anything, and helps significantly (at the cost of a little
Chris@82 5653 # extra space).
Chris@82 5654 freebsd2.2*)
Chris@82 5655 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
Chris@82 5656 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@82 5657 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@82 5658 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@82 5659 ;;
Chris@82 5660
Chris@82 5661 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
Chris@82 5662 freebsd2.*)
Chris@82 5663 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
Chris@82 5664 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@82 5665 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@82 5666 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@82 5667 ;;
Chris@82 5668
Chris@82 5669 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
Chris@82 5670 freebsd* | dragonfly*)
Chris@82 5671 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
Chris@82 5672 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@82 5673 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@82 5674 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@82 5675 ;;
Chris@82 5676
Chris@82 5677 hpux9*)
Chris@82 5678 if test yes = "$GCC"; then
Chris@82 5679 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
Chris@82 5680 else
Chris@82 5681 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
Chris@82 5682 fi
Chris@82 5683 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
Chris@82 5684 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@82 5685 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@82 5686
Chris@82 5687 # hardcode_minus_L: Not really in the search PATH,
Chris@82 5688 # but as the default location of the library.
Chris@82 5689 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@82 5690 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@82 5691 ;;
Chris@82 5692
Chris@82 5693 hpux10*)
Chris@82 5694 if test yes,no = "$GCC,$with_gnu_ld"; then
Chris@82 5695 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
Chris@82 5696 else
Chris@82 5697 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
Chris@82 5698 fi
Chris@82 5699 if test no = "$with_gnu_ld"; then
Chris@82 5700 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
Chris@82 5701 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@82 5702 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@82 5703 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@82 5704 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@82 5705 # hardcode_minus_L: Not really in the search PATH,
Chris@82 5706 # but as the default location of the library.
Chris@82 5707 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@82 5708 fi
Chris@82 5709 ;;
Chris@82 5710
Chris@82 5711 hpux11*)
Chris@82 5712 if test yes,no = "$GCC,$with_gnu_ld"; then
Chris@82 5713 case $host_cpu in
Chris@82 5714 hppa*64*)
Chris@82 5715 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@82 5716 ;;
Chris@82 5717 ia64*)
Chris@82 5718 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
Chris@82 5719 ;;
Chris@82 5720 *)
Chris@82 5721 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
Chris@82 5722 ;;
Chris@82 5723 esac
Chris@82 5724 else
Chris@82 5725 case $host_cpu in
Chris@82 5726 hppa*64*)
Chris@82 5727 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@82 5728 ;;
Chris@82 5729 ia64*)
Chris@82 5730 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
Chris@82 5731 ;;
Chris@82 5732 *)
Chris@82 5733 m4_if($1, [], [
Chris@82 5734 # Older versions of the 11.00 compiler do not understand -b yet
Chris@82 5735 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
Chris@82 5736 _LT_LINKER_OPTION([if $CC understands -b],
Chris@82 5737 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
Chris@82 5738 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
Chris@82 5739 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
Chris@82 5740 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
Chris@82 5741 ;;
Chris@82 5742 esac
Chris@82 5743 fi
Chris@82 5744 if test no = "$with_gnu_ld"; then
Chris@82 5745 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
Chris@82 5746 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@82 5747
Chris@82 5748 case $host_cpu in
Chris@82 5749 hppa*64*|ia64*)
Chris@82 5750 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@82 5751 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@82 5752 ;;
Chris@82 5753 *)
Chris@82 5754 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@82 5755 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@82 5756 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@82 5757
Chris@82 5758 # hardcode_minus_L: Not really in the search PATH,
Chris@82 5759 # but as the default location of the library.
Chris@82 5760 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@82 5761 ;;
Chris@82 5762 esac
Chris@82 5763 fi
Chris@82 5764 ;;
Chris@82 5765
Chris@82 5766 irix5* | irix6* | nonstopux*)
Chris@82 5767 if test yes = "$GCC"; then
Chris@82 5768 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
Chris@82 5769 # Try to use the -exported_symbol ld option, if it does not
Chris@82 5770 # work, assume that -exports_file does not work either and
Chris@82 5771 # implicitly export all symbols.
Chris@82 5772 # This should be the same for all languages, so no per-tag cache variable.
Chris@82 5773 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
Chris@82 5774 [lt_cv_irix_exported_symbol],
Chris@82 5775 [save_LDFLAGS=$LDFLAGS
Chris@82 5776 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
Chris@82 5777 AC_LINK_IFELSE(
Chris@82 5778 [AC_LANG_SOURCE(
Chris@82 5779 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
Chris@82 5780 [C++], [[int foo (void) { return 0; }]],
Chris@82 5781 [Fortran 77], [[
Chris@82 5782 subroutine foo
Chris@82 5783 end]],
Chris@82 5784 [Fortran], [[
Chris@82 5785 subroutine foo
Chris@82 5786 end]])])],
Chris@82 5787 [lt_cv_irix_exported_symbol=yes],
Chris@82 5788 [lt_cv_irix_exported_symbol=no])
Chris@82 5789 LDFLAGS=$save_LDFLAGS])
Chris@82 5790 if test yes = "$lt_cv_irix_exported_symbol"; then
Chris@82 5791 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
Chris@82 5792 fi
Chris@82 5793 _LT_TAGVAR(link_all_deplibs, $1)=no
Chris@82 5794 else
Chris@82 5795 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
Chris@82 5796 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
Chris@82 5797 fi
Chris@82 5798 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
Chris@82 5799 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@82 5800 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@82 5801 _LT_TAGVAR(inherit_rpath, $1)=yes
Chris@82 5802 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@82 5803 ;;
Chris@82 5804
Chris@82 5805 linux*)
Chris@82 5806 case $cc_basename in
Chris@82 5807 tcc*)
Chris@82 5808 # Fabrice Bellard et al's Tiny C Compiler
Chris@82 5809 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@82 5810 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
Chris@82 5811 ;;
Chris@82 5812 esac
Chris@82 5813 ;;
Chris@82 5814
Chris@82 5815 netbsd* | netbsdelf*-gnu)
Chris@82 5816 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
Chris@82 5817 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
Chris@82 5818 else
Chris@82 5819 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
Chris@82 5820 fi
Chris@82 5821 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@82 5822 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@82 5823 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@82 5824 ;;
Chris@82 5825
Chris@82 5826 newsos6)
Chris@82 5827 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@82 5828 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@82 5829 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@82 5830 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@82 5831 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@82 5832 ;;
Chris@82 5833
Chris@82 5834 *nto* | *qnx*)
Chris@82 5835 ;;
Chris@82 5836
Chris@82 5837 openbsd* | bitrig*)
Chris@82 5838 if test -f /usr/libexec/ld.so; then
Chris@82 5839 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@82 5840 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@82 5841 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@82 5842 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
Chris@82 5843 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
Chris@82 5844 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
Chris@82 5845 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@82 5846 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@82 5847 else
Chris@82 5848 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
Chris@82 5849 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@82 5850 fi
Chris@82 5851 else
Chris@82 5852 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 5853 fi
Chris@82 5854 ;;
Chris@82 5855
Chris@82 5856 os2*)
Chris@82 5857 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@82 5858 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@82 5859 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@82 5860 shrext_cmds=.dll
Chris@82 5861 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
Chris@82 5862 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
Chris@82 5863 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
Chris@82 5864 $ECHO EXPORTS >> $output_objdir/$libname.def~
Chris@82 5865 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
Chris@82 5866 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
Chris@82 5867 emximp -o $lib $output_objdir/$libname.def'
Chris@82 5868 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
Chris@82 5869 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
Chris@82 5870 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
Chris@82 5871 $ECHO EXPORTS >> $output_objdir/$libname.def~
Chris@82 5872 prefix_cmds="$SED"~
Chris@82 5873 if test EXPORTS = "`$SED 1q $export_symbols`"; then
Chris@82 5874 prefix_cmds="$prefix_cmds -e 1d";
Chris@82 5875 fi~
Chris@82 5876 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
Chris@82 5877 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
Chris@82 5878 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
Chris@82 5879 emximp -o $lib $output_objdir/$libname.def'
Chris@82 5880 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
Chris@82 5881 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@82 5882 ;;
Chris@82 5883
Chris@82 5884 osf3*)
Chris@82 5885 if test yes = "$GCC"; then
Chris@82 5886 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
Chris@82 5887 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
Chris@82 5888 else
Chris@82 5889 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
Chris@82 5890 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
Chris@82 5891 fi
Chris@82 5892 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
Chris@82 5893 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@82 5894 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@82 5895 ;;
Chris@82 5896
Chris@82 5897 osf4* | osf5*) # as osf3* with the addition of -msym flag
Chris@82 5898 if test yes = "$GCC"; then
Chris@82 5899 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
Chris@82 5900 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
Chris@82 5901 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@82 5902 else
Chris@82 5903 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
Chris@82 5904 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
Chris@82 5905 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
Chris@82 5906 $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
Chris@82 5907
Chris@82 5908 # Both c and cxx compiler support -rpath directly
Chris@82 5909 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
Chris@82 5910 fi
Chris@82 5911 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
Chris@82 5912 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@82 5913 ;;
Chris@82 5914
Chris@82 5915 solaris*)
Chris@82 5916 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
Chris@82 5917 if test yes = "$GCC"; then
Chris@82 5918 wlarc='$wl'
Chris@82 5919 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@82 5920 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@82 5921 $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
Chris@82 5922 else
Chris@82 5923 case `$CC -V 2>&1` in
Chris@82 5924 *"Compilers 5.0"*)
Chris@82 5925 wlarc=''
Chris@82 5926 _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@82 5927 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@82 5928 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
Chris@82 5929 ;;
Chris@82 5930 *)
Chris@82 5931 wlarc='$wl'
Chris@82 5932 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@82 5933 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@82 5934 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
Chris@82 5935 ;;
Chris@82 5936 esac
Chris@82 5937 fi
Chris@82 5938 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@82 5939 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@82 5940 case $host_os in
Chris@82 5941 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
Chris@82 5942 *)
Chris@82 5943 # The compiler driver will combine and reorder linker options,
Chris@82 5944 # but understands '-z linker_flag'. GCC discards it without '$wl',
Chris@82 5945 # but is careful enough not to reorder.
Chris@82 5946 # Supported since Solaris 2.6 (maybe 2.5.1?)
Chris@82 5947 if test yes = "$GCC"; then
Chris@82 5948 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
Chris@82 5949 else
Chris@82 5950 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
Chris@82 5951 fi
Chris@82 5952 ;;
Chris@82 5953 esac
Chris@82 5954 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@82 5955 ;;
Chris@82 5956
Chris@82 5957 sunos4*)
Chris@82 5958 if test sequent = "$host_vendor"; then
Chris@82 5959 # Use $CC to link under sequent, because it throws in some extra .o
Chris@82 5960 # files that make .init and .fini sections work.
Chris@82 5961 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@82 5962 else
Chris@82 5963 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
Chris@82 5964 fi
Chris@82 5965 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@82 5966 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@82 5967 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@82 5968 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@82 5969 ;;
Chris@82 5970
Chris@82 5971 sysv4)
Chris@82 5972 case $host_vendor in
Chris@82 5973 sni)
Chris@82 5974 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@82 5975 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
Chris@82 5976 ;;
Chris@82 5977 siemens)
Chris@82 5978 ## LD is ld it makes a PLAMLIB
Chris@82 5979 ## CC just makes a GrossModule.
Chris@82 5980 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
Chris@82 5981 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
Chris@82 5982 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@82 5983 ;;
Chris@82 5984 motorola)
Chris@82 5985 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@82 5986 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
Chris@82 5987 ;;
Chris@82 5988 esac
Chris@82 5989 runpath_var='LD_RUN_PATH'
Chris@82 5990 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@82 5991 ;;
Chris@82 5992
Chris@82 5993 sysv4.3*)
Chris@82 5994 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@82 5995 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@82 5996 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
Chris@82 5997 ;;
Chris@82 5998
Chris@82 5999 sysv4*MP*)
Chris@82 6000 if test -d /usr/nec; then
Chris@82 6001 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@82 6002 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@82 6003 runpath_var=LD_RUN_PATH
Chris@82 6004 hardcode_runpath_var=yes
Chris@82 6005 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@82 6006 fi
Chris@82 6007 ;;
Chris@82 6008
Chris@82 6009 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
Chris@82 6010 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
Chris@82 6011 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@82 6012 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@82 6013 runpath_var='LD_RUN_PATH'
Chris@82 6014
Chris@82 6015 if test yes = "$GCC"; then
Chris@82 6016 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@82 6017 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@82 6018 else
Chris@82 6019 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@82 6020 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@82 6021 fi
Chris@82 6022 ;;
Chris@82 6023
Chris@82 6024 sysv5* | sco3.2v5* | sco5v6*)
Chris@82 6025 # Note: We CANNOT use -z defs as we might desire, because we do not
Chris@82 6026 # link with -lc, and that would cause any symbols used from libc to
Chris@82 6027 # always be unresolved, which means just about no library would
Chris@82 6028 # ever link correctly. If we're not using GNU ld we use -z text
Chris@82 6029 # though, which does catch some bad symbols but isn't as heavy-handed
Chris@82 6030 # as -z defs.
Chris@82 6031 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
Chris@82 6032 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
Chris@82 6033 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@82 6034 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@82 6035 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
Chris@82 6036 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
Chris@82 6037 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@82 6038 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
Chris@82 6039 runpath_var='LD_RUN_PATH'
Chris@82 6040
Chris@82 6041 if test yes = "$GCC"; then
Chris@82 6042 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@82 6043 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@82 6044 else
Chris@82 6045 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@82 6046 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@82 6047 fi
Chris@82 6048 ;;
Chris@82 6049
Chris@82 6050 uts4*)
Chris@82 6051 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@82 6052 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@82 6053 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@82 6054 ;;
Chris@82 6055
Chris@82 6056 *)
Chris@82 6057 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 6058 ;;
Chris@82 6059 esac
Chris@82 6060
Chris@82 6061 if test sni = "$host_vendor"; then
Chris@82 6062 case $host in
Chris@82 6063 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
Chris@82 6064 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
Chris@82 6065 ;;
Chris@82 6066 esac
Chris@82 6067 fi
Chris@82 6068 fi
Chris@82 6069 ])
Chris@82 6070 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
Chris@82 6071 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
Chris@82 6072
Chris@82 6073 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
Chris@82 6074
Chris@82 6075 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
Chris@82 6076 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
Chris@82 6077 _LT_DECL([], [extract_expsyms_cmds], [2],
Chris@82 6078 [The commands to extract the exported symbol list from a shared archive])
Chris@82 6079
Chris@82 6080 #
Chris@82 6081 # Do we need to explicitly link libc?
Chris@82 6082 #
Chris@82 6083 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
Chris@82 6084 x|xyes)
Chris@82 6085 # Assume -lc should be added
Chris@82 6086 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
Chris@82 6087
Chris@82 6088 if test yes,yes = "$GCC,$enable_shared"; then
Chris@82 6089 case $_LT_TAGVAR(archive_cmds, $1) in
Chris@82 6090 *'~'*)
Chris@82 6091 # FIXME: we may have to deal with multi-command sequences.
Chris@82 6092 ;;
Chris@82 6093 '$CC '*)
Chris@82 6094 # Test whether the compiler implicitly links with -lc since on some
Chris@82 6095 # systems, -lgcc has to come before -lc. If gcc already passes -lc
Chris@82 6096 # to ld, don't add -lc before -lgcc.
Chris@82 6097 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
Chris@82 6098 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
Chris@82 6099 [$RM conftest*
Chris@82 6100 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
Chris@82 6101
Chris@82 6102 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
Chris@82 6103 soname=conftest
Chris@82 6104 lib=conftest
Chris@82 6105 libobjs=conftest.$ac_objext
Chris@82 6106 deplibs=
Chris@82 6107 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
Chris@82 6108 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
Chris@82 6109 compiler_flags=-v
Chris@82 6110 linker_flags=-v
Chris@82 6111 verstring=
Chris@82 6112 output_objdir=.
Chris@82 6113 libname=conftest
Chris@82 6114 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
Chris@82 6115 _LT_TAGVAR(allow_undefined_flag, $1)=
Chris@82 6116 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
Chris@82 6117 then
Chris@82 6118 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@82 6119 else
Chris@82 6120 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
Chris@82 6121 fi
Chris@82 6122 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
Chris@82 6123 else
Chris@82 6124 cat conftest.err 1>&5
Chris@82 6125 fi
Chris@82 6126 $RM conftest*
Chris@82 6127 ])
Chris@82 6128 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
Chris@82 6129 ;;
Chris@82 6130 esac
Chris@82 6131 fi
Chris@82 6132 ;;
Chris@82 6133 esac
Chris@82 6134
Chris@82 6135 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
Chris@82 6136 [Whether or not to add -lc for building shared libraries])
Chris@82 6137 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
Chris@82 6138 [enable_shared_with_static_runtimes], [0],
Chris@82 6139 [Whether or not to disallow shared libs when runtime libs are static])
Chris@82 6140 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
Chris@82 6141 [Compiler flag to allow reflexive dlopens])
Chris@82 6142 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
Chris@82 6143 [Compiler flag to generate shared objects directly from archives])
Chris@82 6144 _LT_TAGDECL([], [compiler_needs_object], [1],
Chris@82 6145 [Whether the compiler copes with passing no objects directly])
Chris@82 6146 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
Chris@82 6147 [Create an old-style archive from a shared archive])
Chris@82 6148 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
Chris@82 6149 [Create a temporary old-style archive to link instead of a shared archive])
Chris@82 6150 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
Chris@82 6151 _LT_TAGDECL([], [archive_expsym_cmds], [2])
Chris@82 6152 _LT_TAGDECL([], [module_cmds], [2],
Chris@82 6153 [Commands used to build a loadable module if different from building
Chris@82 6154 a shared archive.])
Chris@82 6155 _LT_TAGDECL([], [module_expsym_cmds], [2])
Chris@82 6156 _LT_TAGDECL([], [with_gnu_ld], [1],
Chris@82 6157 [Whether we are building with GNU ld or not])
Chris@82 6158 _LT_TAGDECL([], [allow_undefined_flag], [1],
Chris@82 6159 [Flag that allows shared libraries with undefined symbols to be built])
Chris@82 6160 _LT_TAGDECL([], [no_undefined_flag], [1],
Chris@82 6161 [Flag that enforces no undefined symbols])
Chris@82 6162 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
Chris@82 6163 [Flag to hardcode $libdir into a binary during linking.
Chris@82 6164 This must work even if $libdir does not exist])
Chris@82 6165 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
Chris@82 6166 [Whether we need a single "-rpath" flag with a separated argument])
Chris@82 6167 _LT_TAGDECL([], [hardcode_direct], [0],
Chris@82 6168 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
Chris@82 6169 DIR into the resulting binary])
Chris@82 6170 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
Chris@82 6171 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
Chris@82 6172 DIR into the resulting binary and the resulting library dependency is
Chris@82 6173 "absolute", i.e impossible to change by setting $shlibpath_var if the
Chris@82 6174 library is relocated])
Chris@82 6175 _LT_TAGDECL([], [hardcode_minus_L], [0],
Chris@82 6176 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
Chris@82 6177 into the resulting binary])
Chris@82 6178 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
Chris@82 6179 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
Chris@82 6180 into the resulting binary])
Chris@82 6181 _LT_TAGDECL([], [hardcode_automatic], [0],
Chris@82 6182 [Set to "yes" if building a shared library automatically hardcodes DIR
Chris@82 6183 into the library and all subsequent libraries and executables linked
Chris@82 6184 against it])
Chris@82 6185 _LT_TAGDECL([], [inherit_rpath], [0],
Chris@82 6186 [Set to yes if linker adds runtime paths of dependent libraries
Chris@82 6187 to runtime path list])
Chris@82 6188 _LT_TAGDECL([], [link_all_deplibs], [0],
Chris@82 6189 [Whether libtool must link a program against all its dependency libraries])
Chris@82 6190 _LT_TAGDECL([], [always_export_symbols], [0],
Chris@82 6191 [Set to "yes" if exported symbols are required])
Chris@82 6192 _LT_TAGDECL([], [export_symbols_cmds], [2],
Chris@82 6193 [The commands to list exported symbols])
Chris@82 6194 _LT_TAGDECL([], [exclude_expsyms], [1],
Chris@82 6195 [Symbols that should not be listed in the preloaded symbols])
Chris@82 6196 _LT_TAGDECL([], [include_expsyms], [1],
Chris@82 6197 [Symbols that must always be exported])
Chris@82 6198 _LT_TAGDECL([], [prelink_cmds], [2],
Chris@82 6199 [Commands necessary for linking programs (against libraries) with templates])
Chris@82 6200 _LT_TAGDECL([], [postlink_cmds], [2],
Chris@82 6201 [Commands necessary for finishing linking programs])
Chris@82 6202 _LT_TAGDECL([], [file_list_spec], [1],
Chris@82 6203 [Specify filename containing input files])
Chris@82 6204 dnl FIXME: Not yet implemented
Chris@82 6205 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
Chris@82 6206 dnl [Compiler flag to generate thread safe objects])
Chris@82 6207 ])# _LT_LINKER_SHLIBS
Chris@82 6208
Chris@82 6209
Chris@82 6210 # _LT_LANG_C_CONFIG([TAG])
Chris@82 6211 # ------------------------
Chris@82 6212 # Ensure that the configuration variables for a C compiler are suitably
Chris@82 6213 # defined. These variables are subsequently used by _LT_CONFIG to write
Chris@82 6214 # the compiler configuration to 'libtool'.
Chris@82 6215 m4_defun([_LT_LANG_C_CONFIG],
Chris@82 6216 [m4_require([_LT_DECL_EGREP])dnl
Chris@82 6217 lt_save_CC=$CC
Chris@82 6218 AC_LANG_PUSH(C)
Chris@82 6219
Chris@82 6220 # Source file extension for C test sources.
Chris@82 6221 ac_ext=c
Chris@82 6222
Chris@82 6223 # Object file extension for compiled C test sources.
Chris@82 6224 objext=o
Chris@82 6225 _LT_TAGVAR(objext, $1)=$objext
Chris@82 6226
Chris@82 6227 # Code to be used in simple compile tests
Chris@82 6228 lt_simple_compile_test_code="int some_variable = 0;"
Chris@82 6229
Chris@82 6230 # Code to be used in simple link tests
Chris@82 6231 lt_simple_link_test_code='int main(){return(0);}'
Chris@82 6232
Chris@82 6233 _LT_TAG_COMPILER
Chris@82 6234 # Save the default compiler, since it gets overwritten when the other
Chris@82 6235 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
Chris@82 6236 compiler_DEFAULT=$CC
Chris@82 6237
Chris@82 6238 # save warnings/boilerplate of simple test code
Chris@82 6239 _LT_COMPILER_BOILERPLATE
Chris@82 6240 _LT_LINKER_BOILERPLATE
Chris@82 6241
Chris@82 6242 ## CAVEAT EMPTOR:
Chris@82 6243 ## There is no encapsulation within the following macros, do not change
Chris@82 6244 ## the running order or otherwise move them around unless you know exactly
Chris@82 6245 ## what you are doing...
Chris@82 6246 if test -n "$compiler"; then
Chris@82 6247 _LT_COMPILER_NO_RTTI($1)
Chris@82 6248 _LT_COMPILER_PIC($1)
Chris@82 6249 _LT_COMPILER_C_O($1)
Chris@82 6250 _LT_COMPILER_FILE_LOCKS($1)
Chris@82 6251 _LT_LINKER_SHLIBS($1)
Chris@82 6252 _LT_SYS_DYNAMIC_LINKER($1)
Chris@82 6253 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@82 6254 LT_SYS_DLOPEN_SELF
Chris@82 6255 _LT_CMD_STRIPLIB
Chris@82 6256
Chris@82 6257 # Report what library types will actually be built
Chris@82 6258 AC_MSG_CHECKING([if libtool supports shared libraries])
Chris@82 6259 AC_MSG_RESULT([$can_build_shared])
Chris@82 6260
Chris@82 6261 AC_MSG_CHECKING([whether to build shared libraries])
Chris@82 6262 test no = "$can_build_shared" && enable_shared=no
Chris@82 6263
Chris@82 6264 # On AIX, shared libraries and static libraries use the same namespace, and
Chris@82 6265 # are all built from PIC.
Chris@82 6266 case $host_os in
Chris@82 6267 aix3*)
Chris@82 6268 test yes = "$enable_shared" && enable_static=no
Chris@82 6269 if test -n "$RANLIB"; then
Chris@82 6270 archive_cmds="$archive_cmds~\$RANLIB \$lib"
Chris@82 6271 postinstall_cmds='$RANLIB $lib'
Chris@82 6272 fi
Chris@82 6273 ;;
Chris@82 6274
Chris@82 6275 aix[[4-9]]*)
Chris@82 6276 if test ia64 != "$host_cpu"; then
Chris@82 6277 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
Chris@82 6278 yes,aix,yes) ;; # shared object as lib.so file only
Chris@82 6279 yes,svr4,*) ;; # shared object as lib.so archive member only
Chris@82 6280 yes,*) enable_static=no ;; # shared object in lib.a archive as well
Chris@82 6281 esac
Chris@82 6282 fi
Chris@82 6283 ;;
Chris@82 6284 esac
Chris@82 6285 AC_MSG_RESULT([$enable_shared])
Chris@82 6286
Chris@82 6287 AC_MSG_CHECKING([whether to build static libraries])
Chris@82 6288 # Make sure either enable_shared or enable_static is yes.
Chris@82 6289 test yes = "$enable_shared" || enable_static=yes
Chris@82 6290 AC_MSG_RESULT([$enable_static])
Chris@82 6291
Chris@82 6292 _LT_CONFIG($1)
Chris@82 6293 fi
Chris@82 6294 AC_LANG_POP
Chris@82 6295 CC=$lt_save_CC
Chris@82 6296 ])# _LT_LANG_C_CONFIG
Chris@82 6297
Chris@82 6298
Chris@82 6299 # _LT_LANG_CXX_CONFIG([TAG])
Chris@82 6300 # --------------------------
Chris@82 6301 # Ensure that the configuration variables for a C++ compiler are suitably
Chris@82 6302 # defined. These variables are subsequently used by _LT_CONFIG to write
Chris@82 6303 # the compiler configuration to 'libtool'.
Chris@82 6304 m4_defun([_LT_LANG_CXX_CONFIG],
Chris@82 6305 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@82 6306 m4_require([_LT_DECL_EGREP])dnl
Chris@82 6307 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
Chris@82 6308 if test -n "$CXX" && ( test no != "$CXX" &&
Chris@82 6309 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
Chris@82 6310 (test g++ != "$CXX"))); then
Chris@82 6311 AC_PROG_CXXCPP
Chris@82 6312 else
Chris@82 6313 _lt_caught_CXX_error=yes
Chris@82 6314 fi
Chris@82 6315
Chris@82 6316 AC_LANG_PUSH(C++)
Chris@82 6317 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@82 6318 _LT_TAGVAR(allow_undefined_flag, $1)=
Chris@82 6319 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@82 6320 _LT_TAGVAR(archive_expsym_cmds, $1)=
Chris@82 6321 _LT_TAGVAR(compiler_needs_object, $1)=no
Chris@82 6322 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@82 6323 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@82 6324 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@82 6325 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@82 6326 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@82 6327 _LT_TAGVAR(hardcode_minus_L, $1)=no
Chris@82 6328 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
Chris@82 6329 _LT_TAGVAR(hardcode_automatic, $1)=no
Chris@82 6330 _LT_TAGVAR(inherit_rpath, $1)=no
Chris@82 6331 _LT_TAGVAR(module_cmds, $1)=
Chris@82 6332 _LT_TAGVAR(module_expsym_cmds, $1)=
Chris@82 6333 _LT_TAGVAR(link_all_deplibs, $1)=unknown
Chris@82 6334 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@82 6335 _LT_TAGVAR(reload_flag, $1)=$reload_flag
Chris@82 6336 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
Chris@82 6337 _LT_TAGVAR(no_undefined_flag, $1)=
Chris@82 6338 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@82 6339 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
Chris@82 6340
Chris@82 6341 # Source file extension for C++ test sources.
Chris@82 6342 ac_ext=cpp
Chris@82 6343
Chris@82 6344 # Object file extension for compiled C++ test sources.
Chris@82 6345 objext=o
Chris@82 6346 _LT_TAGVAR(objext, $1)=$objext
Chris@82 6347
Chris@82 6348 # No sense in running all these tests if we already determined that
Chris@82 6349 # the CXX compiler isn't working. Some variables (like enable_shared)
Chris@82 6350 # are currently assumed to apply to all compilers on this platform,
Chris@82 6351 # and will be corrupted by setting them based on a non-working compiler.
Chris@82 6352 if test yes != "$_lt_caught_CXX_error"; then
Chris@82 6353 # Code to be used in simple compile tests
Chris@82 6354 lt_simple_compile_test_code="int some_variable = 0;"
Chris@82 6355
Chris@82 6356 # Code to be used in simple link tests
Chris@82 6357 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
Chris@82 6358
Chris@82 6359 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@82 6360 _LT_TAG_COMPILER
Chris@82 6361
Chris@82 6362 # save warnings/boilerplate of simple test code
Chris@82 6363 _LT_COMPILER_BOILERPLATE
Chris@82 6364 _LT_LINKER_BOILERPLATE
Chris@82 6365
Chris@82 6366 # Allow CC to be a program name with arguments.
Chris@82 6367 lt_save_CC=$CC
Chris@82 6368 lt_save_CFLAGS=$CFLAGS
Chris@82 6369 lt_save_LD=$LD
Chris@82 6370 lt_save_GCC=$GCC
Chris@82 6371 GCC=$GXX
Chris@82 6372 lt_save_with_gnu_ld=$with_gnu_ld
Chris@82 6373 lt_save_path_LD=$lt_cv_path_LD
Chris@82 6374 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
Chris@82 6375 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
Chris@82 6376 else
Chris@82 6377 $as_unset lt_cv_prog_gnu_ld
Chris@82 6378 fi
Chris@82 6379 if test -n "${lt_cv_path_LDCXX+set}"; then
Chris@82 6380 lt_cv_path_LD=$lt_cv_path_LDCXX
Chris@82 6381 else
Chris@82 6382 $as_unset lt_cv_path_LD
Chris@82 6383 fi
Chris@82 6384 test -z "${LDCXX+set}" || LD=$LDCXX
Chris@82 6385 CC=${CXX-"c++"}
Chris@82 6386 CFLAGS=$CXXFLAGS
Chris@82 6387 compiler=$CC
Chris@82 6388 _LT_TAGVAR(compiler, $1)=$CC
Chris@82 6389 _LT_CC_BASENAME([$compiler])
Chris@82 6390
Chris@82 6391 if test -n "$compiler"; then
Chris@82 6392 # We don't want -fno-exception when compiling C++ code, so set the
Chris@82 6393 # no_builtin_flag separately
Chris@82 6394 if test yes = "$GXX"; then
Chris@82 6395 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
Chris@82 6396 else
Chris@82 6397 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
Chris@82 6398 fi
Chris@82 6399
Chris@82 6400 if test yes = "$GXX"; then
Chris@82 6401 # Set up default GNU C++ configuration
Chris@82 6402
Chris@82 6403 LT_PATH_LD
Chris@82 6404
Chris@82 6405 # Check if GNU C++ uses GNU ld as the underlying linker, since the
Chris@82 6406 # archiving commands below assume that GNU ld is being used.
Chris@82 6407 if test yes = "$with_gnu_ld"; then
Chris@82 6408 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@82 6409 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
Chris@82 6410
Chris@82 6411 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@82 6412 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
Chris@82 6413
Chris@82 6414 # If archive_cmds runs LD, not CC, wlarc should be empty
Chris@82 6415 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
Chris@82 6416 # investigate it a little bit more. (MM)
Chris@82 6417 wlarc='$wl'
Chris@82 6418
Chris@82 6419 # ancient GNU ld didn't support --whole-archive et. al.
Chris@82 6420 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
Chris@82 6421 $GREP 'no-whole-archive' > /dev/null; then
Chris@82 6422 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
Chris@82 6423 else
Chris@82 6424 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@82 6425 fi
Chris@82 6426 else
Chris@82 6427 with_gnu_ld=no
Chris@82 6428 wlarc=
Chris@82 6429
Chris@82 6430 # A generic and very simple default shared library creation
Chris@82 6431 # command for GNU C++ for the case where it uses the native
Chris@82 6432 # linker, instead of GNU ld. If possible, this setting should
Chris@82 6433 # overridden to take advantage of the native linker features on
Chris@82 6434 # the platform it is being used on.
Chris@82 6435 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
Chris@82 6436 fi
Chris@82 6437
Chris@82 6438 # Commands to make compiler produce verbose output that lists
Chris@82 6439 # what "hidden" libraries, object files and flags are used when
Chris@82 6440 # linking a shared library.
Chris@82 6441 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
Chris@82 6442
Chris@82 6443 else
Chris@82 6444 GXX=no
Chris@82 6445 with_gnu_ld=no
Chris@82 6446 wlarc=
Chris@82 6447 fi
Chris@82 6448
Chris@82 6449 # PORTME: fill in a description of your system's C++ link characteristics
Chris@82 6450 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
Chris@82 6451 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@82 6452 case $host_os in
Chris@82 6453 aix3*)
Chris@82 6454 # FIXME: insert proper C++ library support
Chris@82 6455 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 6456 ;;
Chris@82 6457 aix[[4-9]]*)
Chris@82 6458 if test ia64 = "$host_cpu"; then
Chris@82 6459 # On IA64, the linker does run time linking by default, so we don't
Chris@82 6460 # have to do anything special.
Chris@82 6461 aix_use_runtimelinking=no
Chris@82 6462 exp_sym_flag='-Bexport'
Chris@82 6463 no_entry_flag=
Chris@82 6464 else
Chris@82 6465 aix_use_runtimelinking=no
Chris@82 6466
Chris@82 6467 # Test if we are trying to use run time linking or normal
Chris@82 6468 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
Chris@82 6469 # have runtime linking enabled, and use it for executables.
Chris@82 6470 # For shared libraries, we enable/disable runtime linking
Chris@82 6471 # depending on the kind of the shared library created -
Chris@82 6472 # when "with_aix_soname,aix_use_runtimelinking" is:
Chris@82 6473 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
Chris@82 6474 # "aix,yes" lib.so shared, rtl:yes, for executables
Chris@82 6475 # lib.a static archive
Chris@82 6476 # "both,no" lib.so.V(shr.o) shared, rtl:yes
Chris@82 6477 # lib.a(lib.so.V) shared, rtl:no, for executables
Chris@82 6478 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
Chris@82 6479 # lib.a(lib.so.V) shared, rtl:no
Chris@82 6480 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
Chris@82 6481 # lib.a static archive
Chris@82 6482 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
Chris@82 6483 for ld_flag in $LDFLAGS; do
Chris@82 6484 case $ld_flag in
Chris@82 6485 *-brtl*)
Chris@82 6486 aix_use_runtimelinking=yes
Chris@82 6487 break
Chris@82 6488 ;;
Chris@82 6489 esac
Chris@82 6490 done
Chris@82 6491 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
Chris@82 6492 # With aix-soname=svr4, we create the lib.so.V shared archives only,
Chris@82 6493 # so we don't have lib.a shared libs to link our executables.
Chris@82 6494 # We have to force runtime linking in this case.
Chris@82 6495 aix_use_runtimelinking=yes
Chris@82 6496 LDFLAGS="$LDFLAGS -Wl,-brtl"
Chris@82 6497 fi
Chris@82 6498 ;;
Chris@82 6499 esac
Chris@82 6500
Chris@82 6501 exp_sym_flag='-bexport'
Chris@82 6502 no_entry_flag='-bnoentry'
Chris@82 6503 fi
Chris@82 6504
Chris@82 6505 # When large executables or shared objects are built, AIX ld can
Chris@82 6506 # have problems creating the table of contents. If linking a library
Chris@82 6507 # or program results in "error TOC overflow" add -mminimal-toc to
Chris@82 6508 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
Chris@82 6509 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
Chris@82 6510
Chris@82 6511 _LT_TAGVAR(archive_cmds, $1)=''
Chris@82 6512 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@82 6513 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@82 6514 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
Chris@82 6515 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@82 6516 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
Chris@82 6517 case $with_aix_soname,$aix_use_runtimelinking in
Chris@82 6518 aix,*) ;; # no import file
Chris@82 6519 svr4,* | *,yes) # use import file
Chris@82 6520 # The Import File defines what to hardcode.
Chris@82 6521 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@82 6522 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@82 6523 ;;
Chris@82 6524 esac
Chris@82 6525
Chris@82 6526 if test yes = "$GXX"; then
Chris@82 6527 case $host_os in aix4.[[012]]|aix4.[[012]].*)
Chris@82 6528 # We only want to do this on AIX 4.2 and lower, the check
Chris@82 6529 # below for broken collect2 doesn't work under 4.3+
Chris@82 6530 collect2name=`$CC -print-prog-name=collect2`
Chris@82 6531 if test -f "$collect2name" &&
Chris@82 6532 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
Chris@82 6533 then
Chris@82 6534 # We have reworked collect2
Chris@82 6535 :
Chris@82 6536 else
Chris@82 6537 # We have old collect2
Chris@82 6538 _LT_TAGVAR(hardcode_direct, $1)=unsupported
Chris@82 6539 # It fails to find uninstalled libraries when the uninstalled
Chris@82 6540 # path is not listed in the libpath. Setting hardcode_minus_L
Chris@82 6541 # to unsupported forces relinking
Chris@82 6542 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@82 6543 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@82 6544 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@82 6545 fi
Chris@82 6546 esac
Chris@82 6547 shared_flag='-shared'
Chris@82 6548 if test yes = "$aix_use_runtimelinking"; then
Chris@82 6549 shared_flag=$shared_flag' $wl-G'
Chris@82 6550 fi
Chris@82 6551 # Need to ensure runtime linking is disabled for the traditional
Chris@82 6552 # shared library, or the linker may eventually find shared libraries
Chris@82 6553 # /with/ Import File - we do not want to mix them.
Chris@82 6554 shared_flag_aix='-shared'
Chris@82 6555 shared_flag_svr4='-shared $wl-G'
Chris@82 6556 else
Chris@82 6557 # not using gcc
Chris@82 6558 if test ia64 = "$host_cpu"; then
Chris@82 6559 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
Chris@82 6560 # chokes on -Wl,-G. The following line is correct:
Chris@82 6561 shared_flag='-G'
Chris@82 6562 else
Chris@82 6563 if test yes = "$aix_use_runtimelinking"; then
Chris@82 6564 shared_flag='$wl-G'
Chris@82 6565 else
Chris@82 6566 shared_flag='$wl-bM:SRE'
Chris@82 6567 fi
Chris@82 6568 shared_flag_aix='$wl-bM:SRE'
Chris@82 6569 shared_flag_svr4='$wl-G'
Chris@82 6570 fi
Chris@82 6571 fi
Chris@82 6572
Chris@82 6573 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
Chris@82 6574 # It seems that -bexpall does not export symbols beginning with
Chris@82 6575 # underscore (_), so it is better to generate a list of symbols to
Chris@82 6576 # export.
Chris@82 6577 _LT_TAGVAR(always_export_symbols, $1)=yes
Chris@82 6578 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
Chris@82 6579 # Warning - without using the other runtime loading flags (-brtl),
Chris@82 6580 # -berok will link without error, but may produce a broken library.
Chris@82 6581 # The "-G" linker flag allows undefined symbols.
Chris@82 6582 _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
Chris@82 6583 # Determine the default libpath from the value encoded in an empty
Chris@82 6584 # executable.
Chris@82 6585 _LT_SYS_MODULE_PATH_AIX([$1])
Chris@82 6586 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
Chris@82 6587
Chris@82 6588 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
Chris@82 6589 else
Chris@82 6590 if test ia64 = "$host_cpu"; then
Chris@82 6591 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
Chris@82 6592 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
Chris@82 6593 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
Chris@82 6594 else
Chris@82 6595 # Determine the default libpath from the value encoded in an
Chris@82 6596 # empty executable.
Chris@82 6597 _LT_SYS_MODULE_PATH_AIX([$1])
Chris@82 6598 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
Chris@82 6599 # Warning - without using the other run time loading flags,
Chris@82 6600 # -berok will link without error, but may produce a broken library.
Chris@82 6601 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
Chris@82 6602 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
Chris@82 6603 if test yes = "$with_gnu_ld"; then
Chris@82 6604 # We only use this code for GNU lds that support --whole-archive.
Chris@82 6605 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
Chris@82 6606 else
Chris@82 6607 # Exported symbols can be pulled into shared objects from archives
Chris@82 6608 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
Chris@82 6609 fi
Chris@82 6610 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
Chris@82 6611 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
Chris@82 6612 # -brtl affects multiple linker settings, -berok does not and is overridden later
Chris@82 6613 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
Chris@82 6614 if test svr4 != "$with_aix_soname"; then
Chris@82 6615 # This is similar to how AIX traditionally builds its shared
Chris@82 6616 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
Chris@82 6617 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
Chris@82 6618 fi
Chris@82 6619 if test aix != "$with_aix_soname"; then
Chris@82 6620 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
Chris@82 6621 else
Chris@82 6622 # used by -dlpreopen to get the symbols
Chris@82 6623 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
Chris@82 6624 fi
Chris@82 6625 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
Chris@82 6626 fi
Chris@82 6627 fi
Chris@82 6628 ;;
Chris@82 6629
Chris@82 6630 beos*)
Chris@82 6631 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
Chris@82 6632 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@82 6633 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
Chris@82 6634 # support --undefined. This deserves some investigation. FIXME
Chris@82 6635 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@82 6636 else
Chris@82 6637 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 6638 fi
Chris@82 6639 ;;
Chris@82 6640
Chris@82 6641 chorus*)
Chris@82 6642 case $cc_basename in
Chris@82 6643 *)
Chris@82 6644 # FIXME: insert proper C++ library support
Chris@82 6645 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 6646 ;;
Chris@82 6647 esac
Chris@82 6648 ;;
Chris@82 6649
Chris@82 6650 cygwin* | mingw* | pw32* | cegcc*)
Chris@82 6651 case $GXX,$cc_basename in
Chris@82 6652 ,cl* | no,cl*)
Chris@82 6653 # Native MSVC
Chris@82 6654 # hardcode_libdir_flag_spec is actually meaningless, as there is
Chris@82 6655 # no search path for DLLs.
Chris@82 6656 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
Chris@82 6657 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@82 6658 _LT_TAGVAR(always_export_symbols, $1)=yes
Chris@82 6659 _LT_TAGVAR(file_list_spec, $1)='@'
Chris@82 6660 # Tell ltmain to make .lib files, not .a files.
Chris@82 6661 libext=lib
Chris@82 6662 # Tell ltmain to make .dll files, not .so files.
Chris@82 6663 shrext_cmds=.dll
Chris@82 6664 # FIXME: Setting linknames here is a bad hack.
Chris@82 6665 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
Chris@82 6666 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
Chris@82 6667 cp "$export_symbols" "$output_objdir/$soname.def";
Chris@82 6668 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
Chris@82 6669 else
Chris@82 6670 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
Chris@82 6671 fi~
Chris@82 6672 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
Chris@82 6673 linknames='
Chris@82 6674 # The linker will not automatically build a static lib if we build a DLL.
Chris@82 6675 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
Chris@82 6676 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@82 6677 # Don't use ranlib
Chris@82 6678 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
Chris@82 6679 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
Chris@82 6680 lt_tool_outputfile="@TOOL_OUTPUT@"~
Chris@82 6681 case $lt_outputfile in
Chris@82 6682 *.exe|*.EXE) ;;
Chris@82 6683 *)
Chris@82 6684 lt_outputfile=$lt_outputfile.exe
Chris@82 6685 lt_tool_outputfile=$lt_tool_outputfile.exe
Chris@82 6686 ;;
Chris@82 6687 esac~
Chris@82 6688 func_to_tool_file "$lt_outputfile"~
Chris@82 6689 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
Chris@82 6690 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
Chris@82 6691 $RM "$lt_outputfile.manifest";
Chris@82 6692 fi'
Chris@82 6693 ;;
Chris@82 6694 *)
Chris@82 6695 # g++
Chris@82 6696 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
Chris@82 6697 # as there is no search path for DLLs.
Chris@82 6698 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@82 6699 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
Chris@82 6700 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@82 6701 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@82 6702 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@82 6703
Chris@82 6704 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
Chris@82 6705 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
Chris@82 6706 # If the export-symbols file already is a .def file, use it as
Chris@82 6707 # is; otherwise, prepend EXPORTS...
Chris@82 6708 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
Chris@82 6709 cp $export_symbols $output_objdir/$soname.def;
Chris@82 6710 else
Chris@82 6711 echo EXPORTS > $output_objdir/$soname.def;
Chris@82 6712 cat $export_symbols >> $output_objdir/$soname.def;
Chris@82 6713 fi~
Chris@82 6714 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
Chris@82 6715 else
Chris@82 6716 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 6717 fi
Chris@82 6718 ;;
Chris@82 6719 esac
Chris@82 6720 ;;
Chris@82 6721 darwin* | rhapsody*)
Chris@82 6722 _LT_DARWIN_LINKER_FEATURES($1)
Chris@82 6723 ;;
Chris@82 6724
Chris@82 6725 os2*)
Chris@82 6726 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@82 6727 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@82 6728 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@82 6729 shrext_cmds=.dll
Chris@82 6730 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
Chris@82 6731 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
Chris@82 6732 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
Chris@82 6733 $ECHO EXPORTS >> $output_objdir/$libname.def~
Chris@82 6734 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
Chris@82 6735 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
Chris@82 6736 emximp -o $lib $output_objdir/$libname.def'
Chris@82 6737 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
Chris@82 6738 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
Chris@82 6739 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
Chris@82 6740 $ECHO EXPORTS >> $output_objdir/$libname.def~
Chris@82 6741 prefix_cmds="$SED"~
Chris@82 6742 if test EXPORTS = "`$SED 1q $export_symbols`"; then
Chris@82 6743 prefix_cmds="$prefix_cmds -e 1d";
Chris@82 6744 fi~
Chris@82 6745 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
Chris@82 6746 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
Chris@82 6747 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
Chris@82 6748 emximp -o $lib $output_objdir/$libname.def'
Chris@82 6749 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
Chris@82 6750 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@82 6751 ;;
Chris@82 6752
Chris@82 6753 dgux*)
Chris@82 6754 case $cc_basename in
Chris@82 6755 ec++*)
Chris@82 6756 # FIXME: insert proper C++ library support
Chris@82 6757 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 6758 ;;
Chris@82 6759 ghcx*)
Chris@82 6760 # Green Hills C++ Compiler
Chris@82 6761 # FIXME: insert proper C++ library support
Chris@82 6762 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 6763 ;;
Chris@82 6764 *)
Chris@82 6765 # FIXME: insert proper C++ library support
Chris@82 6766 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 6767 ;;
Chris@82 6768 esac
Chris@82 6769 ;;
Chris@82 6770
Chris@82 6771 freebsd2.*)
Chris@82 6772 # C++ shared libraries reported to be fairly broken before
Chris@82 6773 # switch to ELF
Chris@82 6774 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 6775 ;;
Chris@82 6776
Chris@82 6777 freebsd-elf*)
Chris@82 6778 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@82 6779 ;;
Chris@82 6780
Chris@82 6781 freebsd* | dragonfly*)
Chris@82 6782 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
Chris@82 6783 # conventions
Chris@82 6784 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@82 6785 ;;
Chris@82 6786
Chris@82 6787 haiku*)
Chris@82 6788 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@82 6789 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@82 6790 ;;
Chris@82 6791
Chris@82 6792 hpux9*)
Chris@82 6793 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
Chris@82 6794 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@82 6795 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@82 6796 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@82 6797 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
Chris@82 6798 # but as the default
Chris@82 6799 # location of the library.
Chris@82 6800
Chris@82 6801 case $cc_basename in
Chris@82 6802 CC*)
Chris@82 6803 # FIXME: insert proper C++ library support
Chris@82 6804 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 6805 ;;
Chris@82 6806 aCC*)
Chris@82 6807 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
Chris@82 6808 # Commands to make compiler produce verbose output that lists
Chris@82 6809 # what "hidden" libraries, object files and flags are used when
Chris@82 6810 # linking a shared library.
Chris@82 6811 #
Chris@82 6812 # There doesn't appear to be a way to prevent this compiler from
Chris@82 6813 # explicitly linking system object files so we need to strip them
Chris@82 6814 # from the output so that they don't get included in the library
Chris@82 6815 # dependencies.
Chris@82 6816 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
Chris@82 6817 ;;
Chris@82 6818 *)
Chris@82 6819 if test yes = "$GXX"; then
Chris@82 6820 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
Chris@82 6821 else
Chris@82 6822 # FIXME: insert proper C++ library support
Chris@82 6823 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 6824 fi
Chris@82 6825 ;;
Chris@82 6826 esac
Chris@82 6827 ;;
Chris@82 6828
Chris@82 6829 hpux10*|hpux11*)
Chris@82 6830 if test no = "$with_gnu_ld"; then
Chris@82 6831 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
Chris@82 6832 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@82 6833
Chris@82 6834 case $host_cpu in
Chris@82 6835 hppa*64*|ia64*)
Chris@82 6836 ;;
Chris@82 6837 *)
Chris@82 6838 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@82 6839 ;;
Chris@82 6840 esac
Chris@82 6841 fi
Chris@82 6842 case $host_cpu in
Chris@82 6843 hppa*64*|ia64*)
Chris@82 6844 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@82 6845 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@82 6846 ;;
Chris@82 6847 *)
Chris@82 6848 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@82 6849 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@82 6850 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
Chris@82 6851 # but as the default
Chris@82 6852 # location of the library.
Chris@82 6853 ;;
Chris@82 6854 esac
Chris@82 6855
Chris@82 6856 case $cc_basename in
Chris@82 6857 CC*)
Chris@82 6858 # FIXME: insert proper C++ library support
Chris@82 6859 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 6860 ;;
Chris@82 6861 aCC*)
Chris@82 6862 case $host_cpu in
Chris@82 6863 hppa*64*)
Chris@82 6864 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@82 6865 ;;
Chris@82 6866 ia64*)
Chris@82 6867 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@82 6868 ;;
Chris@82 6869 *)
Chris@82 6870 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@82 6871 ;;
Chris@82 6872 esac
Chris@82 6873 # Commands to make compiler produce verbose output that lists
Chris@82 6874 # what "hidden" libraries, object files and flags are used when
Chris@82 6875 # linking a shared library.
Chris@82 6876 #
Chris@82 6877 # There doesn't appear to be a way to prevent this compiler from
Chris@82 6878 # explicitly linking system object files so we need to strip them
Chris@82 6879 # from the output so that they don't get included in the library
Chris@82 6880 # dependencies.
Chris@82 6881 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
Chris@82 6882 ;;
Chris@82 6883 *)
Chris@82 6884 if test yes = "$GXX"; then
Chris@82 6885 if test no = "$with_gnu_ld"; then
Chris@82 6886 case $host_cpu in
Chris@82 6887 hppa*64*)
Chris@82 6888 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@82 6889 ;;
Chris@82 6890 ia64*)
Chris@82 6891 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@82 6892 ;;
Chris@82 6893 *)
Chris@82 6894 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@82 6895 ;;
Chris@82 6896 esac
Chris@82 6897 fi
Chris@82 6898 else
Chris@82 6899 # FIXME: insert proper C++ library support
Chris@82 6900 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 6901 fi
Chris@82 6902 ;;
Chris@82 6903 esac
Chris@82 6904 ;;
Chris@82 6905
Chris@82 6906 interix[[3-9]]*)
Chris@82 6907 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@82 6908 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@82 6909 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@82 6910 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@82 6911 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
Chris@82 6912 # Instead, shared libraries are loaded at an image base (0x10000000 by
Chris@82 6913 # default) and relocated if they conflict, which is a slow very memory
Chris@82 6914 # consuming and fragmenting process. To avoid this, we pick a random,
Chris@82 6915 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
Chris@82 6916 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
Chris@82 6917 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
Chris@82 6918 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
Chris@82 6919 ;;
Chris@82 6920 irix5* | irix6*)
Chris@82 6921 case $cc_basename in
Chris@82 6922 CC*)
Chris@82 6923 # SGI C++
Chris@82 6924 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
Chris@82 6925
Chris@82 6926 # Archives containing C++ object files must be created using
Chris@82 6927 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
Chris@82 6928 # necessary to make sure instantiated templates are included
Chris@82 6929 # in the archive.
Chris@82 6930 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
Chris@82 6931 ;;
Chris@82 6932 *)
Chris@82 6933 if test yes = "$GXX"; then
Chris@82 6934 if test no = "$with_gnu_ld"; then
Chris@82 6935 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
Chris@82 6936 else
Chris@82 6937 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
Chris@82 6938 fi
Chris@82 6939 fi
Chris@82 6940 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@82 6941 ;;
Chris@82 6942 esac
Chris@82 6943 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@82 6944 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@82 6945 _LT_TAGVAR(inherit_rpath, $1)=yes
Chris@82 6946 ;;
Chris@82 6947
Chris@82 6948 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
Chris@82 6949 case $cc_basename in
Chris@82 6950 KCC*)
Chris@82 6951 # Kuck and Associates, Inc. (KAI) C++ Compiler
Chris@82 6952
Chris@82 6953 # KCC will only create a shared library if the output file
Chris@82 6954 # ends with ".so" (or ".sl" for HP-UX), so rename the library
Chris@82 6955 # to its proper name (with version) after linking.
Chris@82 6956 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
Chris@82 6957 _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
Chris@82 6958 # Commands to make compiler produce verbose output that lists
Chris@82 6959 # what "hidden" libraries, object files and flags are used when
Chris@82 6960 # linking a shared library.
Chris@82 6961 #
Chris@82 6962 # There doesn't appear to be a way to prevent this compiler from
Chris@82 6963 # explicitly linking system object files so we need to strip them
Chris@82 6964 # from the output so that they don't get included in the library
Chris@82 6965 # dependencies.
Chris@82 6966 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
Chris@82 6967
Chris@82 6968 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@82 6969 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
Chris@82 6970
Chris@82 6971 # Archives containing C++ object files must be created using
Chris@82 6972 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
Chris@82 6973 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
Chris@82 6974 ;;
Chris@82 6975 icpc* | ecpc* )
Chris@82 6976 # Intel C++
Chris@82 6977 with_gnu_ld=yes
Chris@82 6978 # version 8.0 and above of icpc choke on multiply defined symbols
Chris@82 6979 # if we add $predep_objects and $postdep_objects, however 7.1 and
Chris@82 6980 # earlier do not add the objects themselves.
Chris@82 6981 case `$CC -V 2>&1` in
Chris@82 6982 *"Version 7."*)
Chris@82 6983 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@82 6984 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
Chris@82 6985 ;;
Chris@82 6986 *) # Version 8.0 or newer
Chris@82 6987 tmp_idyn=
Chris@82 6988 case $host_cpu in
Chris@82 6989 ia64*) tmp_idyn=' -i_dynamic';;
Chris@82 6990 esac
Chris@82 6991 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@82 6992 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
Chris@82 6993 ;;
Chris@82 6994 esac
Chris@82 6995 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@82 6996 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@82 6997 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
Chris@82 6998 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
Chris@82 6999 ;;
Chris@82 7000 pgCC* | pgcpp*)
Chris@82 7001 # Portland Group C++ compiler
Chris@82 7002 case `$CC -V` in
Chris@82 7003 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
Chris@82 7004 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
Chris@82 7005 rm -rf $tpldir~
Chris@82 7006 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
Chris@82 7007 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
Chris@82 7008 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
Chris@82 7009 rm -rf $tpldir~
Chris@82 7010 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
Chris@82 7011 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
Chris@82 7012 $RANLIB $oldlib'
Chris@82 7013 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
Chris@82 7014 rm -rf $tpldir~
Chris@82 7015 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
Chris@82 7016 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@82 7017 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
Chris@82 7018 rm -rf $tpldir~
Chris@82 7019 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
Chris@82 7020 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
Chris@82 7021 ;;
Chris@82 7022 *) # Version 6 and above use weak symbols
Chris@82 7023 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@82 7024 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
Chris@82 7025 ;;
Chris@82 7026 esac
Chris@82 7027
Chris@82 7028 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
Chris@82 7029 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
Chris@82 7030 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
Chris@82 7031 ;;
Chris@82 7032 cxx*)
Chris@82 7033 # Compaq C++
Chris@82 7034 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@82 7035 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols'
Chris@82 7036
Chris@82 7037 runpath_var=LD_RUN_PATH
Chris@82 7038 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
Chris@82 7039 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@82 7040
Chris@82 7041 # Commands to make compiler produce verbose output that lists
Chris@82 7042 # what "hidden" libraries, object files and flags are used when
Chris@82 7043 # linking a shared library.
Chris@82 7044 #
Chris@82 7045 # There doesn't appear to be a way to prevent this compiler from
Chris@82 7046 # explicitly linking system object files so we need to strip them
Chris@82 7047 # from the output so that they don't get included in the library
Chris@82 7048 # dependencies.
Chris@82 7049 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
Chris@82 7050 ;;
Chris@82 7051 xl* | mpixl* | bgxl*)
Chris@82 7052 # IBM XL 8.0 on PPC, with GNU ld
Chris@82 7053 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@82 7054 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
Chris@82 7055 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
Chris@82 7056 if test yes = "$supports_anon_versioning"; then
Chris@82 7057 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
Chris@82 7058 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
Chris@82 7059 echo "local: *; };" >> $output_objdir/$libname.ver~
Chris@82 7060 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
Chris@82 7061 fi
Chris@82 7062 ;;
Chris@82 7063 *)
Chris@82 7064 case `$CC -V 2>&1 | sed 5q` in
Chris@82 7065 *Sun\ C*)
Chris@82 7066 # Sun C++ 5.9
Chris@82 7067 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
Chris@82 7068 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@82 7069 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
Chris@82 7070 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@82 7071 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
Chris@82 7072 _LT_TAGVAR(compiler_needs_object, $1)=yes
Chris@82 7073
Chris@82 7074 # Not sure whether something based on
Chris@82 7075 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
Chris@82 7076 # would be better.
Chris@82 7077 output_verbose_link_cmd='func_echo_all'
Chris@82 7078
Chris@82 7079 # Archives containing C++ object files must be created using
Chris@82 7080 # "CC -xar", where "CC" is the Sun C++ compiler. This is
Chris@82 7081 # necessary to make sure instantiated templates are included
Chris@82 7082 # in the archive.
Chris@82 7083 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
Chris@82 7084 ;;
Chris@82 7085 esac
Chris@82 7086 ;;
Chris@82 7087 esac
Chris@82 7088 ;;
Chris@82 7089
Chris@82 7090 lynxos*)
Chris@82 7091 # FIXME: insert proper C++ library support
Chris@82 7092 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 7093 ;;
Chris@82 7094
Chris@82 7095 m88k*)
Chris@82 7096 # FIXME: insert proper C++ library support
Chris@82 7097 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 7098 ;;
Chris@82 7099
Chris@82 7100 mvs*)
Chris@82 7101 case $cc_basename in
Chris@82 7102 cxx*)
Chris@82 7103 # FIXME: insert proper C++ library support
Chris@82 7104 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 7105 ;;
Chris@82 7106 *)
Chris@82 7107 # FIXME: insert proper C++ library support
Chris@82 7108 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 7109 ;;
Chris@82 7110 esac
Chris@82 7111 ;;
Chris@82 7112
Chris@82 7113 netbsd*)
Chris@82 7114 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
Chris@82 7115 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
Chris@82 7116 wlarc=
Chris@82 7117 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@82 7118 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@82 7119 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@82 7120 fi
Chris@82 7121 # Workaround some broken pre-1.5 toolchains
Chris@82 7122 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
Chris@82 7123 ;;
Chris@82 7124
Chris@82 7125 *nto* | *qnx*)
Chris@82 7126 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@82 7127 ;;
Chris@82 7128
Chris@82 7129 openbsd* | bitrig*)
Chris@82 7130 if test -f /usr/libexec/ld.so; then
Chris@82 7131 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@82 7132 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@82 7133 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@82 7134 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
Chris@82 7135 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@82 7136 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
Chris@82 7137 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
Chris@82 7138 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
Chris@82 7139 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
Chris@82 7140 fi
Chris@82 7141 output_verbose_link_cmd=func_echo_all
Chris@82 7142 else
Chris@82 7143 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 7144 fi
Chris@82 7145 ;;
Chris@82 7146
Chris@82 7147 osf3* | osf4* | osf5*)
Chris@82 7148 case $cc_basename in
Chris@82 7149 KCC*)
Chris@82 7150 # Kuck and Associates, Inc. (KAI) C++ Compiler
Chris@82 7151
Chris@82 7152 # KCC will only create a shared library if the output file
Chris@82 7153 # ends with ".so" (or ".sl" for HP-UX), so rename the library
Chris@82 7154 # to its proper name (with version) after linking.
Chris@82 7155 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
Chris@82 7156
Chris@82 7157 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
Chris@82 7158 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@82 7159
Chris@82 7160 # Archives containing C++ object files must be created using
Chris@82 7161 # the KAI C++ compiler.
Chris@82 7162 case $host in
Chris@82 7163 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
Chris@82 7164 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
Chris@82 7165 esac
Chris@82 7166 ;;
Chris@82 7167 RCC*)
Chris@82 7168 # Rational C++ 2.4.1
Chris@82 7169 # FIXME: insert proper C++ library support
Chris@82 7170 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 7171 ;;
Chris@82 7172 cxx*)
Chris@82 7173 case $host in
Chris@82 7174 osf3*)
Chris@82 7175 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
Chris@82 7176 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
Chris@82 7177 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@82 7178 ;;
Chris@82 7179 *)
Chris@82 7180 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
Chris@82 7181 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
Chris@82 7182 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
Chris@82 7183 echo "-hidden">> $lib.exp~
Chris@82 7184 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
Chris@82 7185 $RM $lib.exp'
Chris@82 7186 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
Chris@82 7187 ;;
Chris@82 7188 esac
Chris@82 7189
Chris@82 7190 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@82 7191
Chris@82 7192 # Commands to make compiler produce verbose output that lists
Chris@82 7193 # what "hidden" libraries, object files and flags are used when
Chris@82 7194 # linking a shared library.
Chris@82 7195 #
Chris@82 7196 # There doesn't appear to be a way to prevent this compiler from
Chris@82 7197 # explicitly linking system object files so we need to strip them
Chris@82 7198 # from the output so that they don't get included in the library
Chris@82 7199 # dependencies.
Chris@82 7200 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
Chris@82 7201 ;;
Chris@82 7202 *)
Chris@82 7203 if test yes,no = "$GXX,$with_gnu_ld"; then
Chris@82 7204 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
Chris@82 7205 case $host in
Chris@82 7206 osf3*)
Chris@82 7207 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
Chris@82 7208 ;;
Chris@82 7209 *)
Chris@82 7210 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
Chris@82 7211 ;;
Chris@82 7212 esac
Chris@82 7213
Chris@82 7214 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
Chris@82 7215 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@82 7216
Chris@82 7217 # Commands to make compiler produce verbose output that lists
Chris@82 7218 # what "hidden" libraries, object files and flags are used when
Chris@82 7219 # linking a shared library.
Chris@82 7220 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
Chris@82 7221
Chris@82 7222 else
Chris@82 7223 # FIXME: insert proper C++ library support
Chris@82 7224 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 7225 fi
Chris@82 7226 ;;
Chris@82 7227 esac
Chris@82 7228 ;;
Chris@82 7229
Chris@82 7230 psos*)
Chris@82 7231 # FIXME: insert proper C++ library support
Chris@82 7232 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 7233 ;;
Chris@82 7234
Chris@82 7235 sunos4*)
Chris@82 7236 case $cc_basename in
Chris@82 7237 CC*)
Chris@82 7238 # Sun C++ 4.x
Chris@82 7239 # FIXME: insert proper C++ library support
Chris@82 7240 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 7241 ;;
Chris@82 7242 lcc*)
Chris@82 7243 # Lucid
Chris@82 7244 # FIXME: insert proper C++ library support
Chris@82 7245 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 7246 ;;
Chris@82 7247 *)
Chris@82 7248 # FIXME: insert proper C++ library support
Chris@82 7249 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 7250 ;;
Chris@82 7251 esac
Chris@82 7252 ;;
Chris@82 7253
Chris@82 7254 solaris*)
Chris@82 7255 case $cc_basename in
Chris@82 7256 CC* | sunCC*)
Chris@82 7257 # Sun C++ 4.2, 5.x and Centerline C++
Chris@82 7258 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
Chris@82 7259 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
Chris@82 7260 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@82 7261 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@82 7262 $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
Chris@82 7263
Chris@82 7264 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@82 7265 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@82 7266 case $host_os in
Chris@82 7267 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
Chris@82 7268 *)
Chris@82 7269 # The compiler driver will combine and reorder linker options,
Chris@82 7270 # but understands '-z linker_flag'.
Chris@82 7271 # Supported since Solaris 2.6 (maybe 2.5.1?)
Chris@82 7272 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
Chris@82 7273 ;;
Chris@82 7274 esac
Chris@82 7275 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@82 7276
Chris@82 7277 output_verbose_link_cmd='func_echo_all'
Chris@82 7278
Chris@82 7279 # Archives containing C++ object files must be created using
Chris@82 7280 # "CC -xar", where "CC" is the Sun C++ compiler. This is
Chris@82 7281 # necessary to make sure instantiated templates are included
Chris@82 7282 # in the archive.
Chris@82 7283 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
Chris@82 7284 ;;
Chris@82 7285 gcx*)
Chris@82 7286 # Green Hills C++ Compiler
Chris@82 7287 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
Chris@82 7288
Chris@82 7289 # The C++ compiler must be used to create the archive.
Chris@82 7290 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
Chris@82 7291 ;;
Chris@82 7292 *)
Chris@82 7293 # GNU C++ compiler with Solaris linker
Chris@82 7294 if test yes,no = "$GXX,$with_gnu_ld"; then
Chris@82 7295 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
Chris@82 7296 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
Chris@82 7297 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
Chris@82 7298 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@82 7299 $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
Chris@82 7300
Chris@82 7301 # Commands to make compiler produce verbose output that lists
Chris@82 7302 # what "hidden" libraries, object files and flags are used when
Chris@82 7303 # linking a shared library.
Chris@82 7304 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
Chris@82 7305 else
Chris@82 7306 # g++ 2.7 appears to require '-G' NOT '-shared' on this
Chris@82 7307 # platform.
Chris@82 7308 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
Chris@82 7309 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@82 7310 $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
Chris@82 7311
Chris@82 7312 # Commands to make compiler produce verbose output that lists
Chris@82 7313 # what "hidden" libraries, object files and flags are used when
Chris@82 7314 # linking a shared library.
Chris@82 7315 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
Chris@82 7316 fi
Chris@82 7317
Chris@82 7318 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
Chris@82 7319 case $host_os in
Chris@82 7320 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
Chris@82 7321 *)
Chris@82 7322 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
Chris@82 7323 ;;
Chris@82 7324 esac
Chris@82 7325 fi
Chris@82 7326 ;;
Chris@82 7327 esac
Chris@82 7328 ;;
Chris@82 7329
Chris@82 7330 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
Chris@82 7331 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
Chris@82 7332 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@82 7333 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@82 7334 runpath_var='LD_RUN_PATH'
Chris@82 7335
Chris@82 7336 case $cc_basename in
Chris@82 7337 CC*)
Chris@82 7338 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@82 7339 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@82 7340 ;;
Chris@82 7341 *)
Chris@82 7342 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@82 7343 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@82 7344 ;;
Chris@82 7345 esac
Chris@82 7346 ;;
Chris@82 7347
Chris@82 7348 sysv5* | sco3.2v5* | sco5v6*)
Chris@82 7349 # Note: We CANNOT use -z defs as we might desire, because we do not
Chris@82 7350 # link with -lc, and that would cause any symbols used from libc to
Chris@82 7351 # always be unresolved, which means just about no library would
Chris@82 7352 # ever link correctly. If we're not using GNU ld we use -z text
Chris@82 7353 # though, which does catch some bad symbols but isn't as heavy-handed
Chris@82 7354 # as -z defs.
Chris@82 7355 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
Chris@82 7356 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
Chris@82 7357 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@82 7358 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@82 7359 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
Chris@82 7360 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
Chris@82 7361 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@82 7362 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
Chris@82 7363 runpath_var='LD_RUN_PATH'
Chris@82 7364
Chris@82 7365 case $cc_basename in
Chris@82 7366 CC*)
Chris@82 7367 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@82 7368 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@82 7369 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
Chris@82 7370 '"$_LT_TAGVAR(old_archive_cmds, $1)"
Chris@82 7371 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
Chris@82 7372 '"$_LT_TAGVAR(reload_cmds, $1)"
Chris@82 7373 ;;
Chris@82 7374 *)
Chris@82 7375 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@82 7376 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@82 7377 ;;
Chris@82 7378 esac
Chris@82 7379 ;;
Chris@82 7380
Chris@82 7381 tandem*)
Chris@82 7382 case $cc_basename in
Chris@82 7383 NCC*)
Chris@82 7384 # NonStop-UX NCC 3.20
Chris@82 7385 # FIXME: insert proper C++ library support
Chris@82 7386 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 7387 ;;
Chris@82 7388 *)
Chris@82 7389 # FIXME: insert proper C++ library support
Chris@82 7390 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 7391 ;;
Chris@82 7392 esac
Chris@82 7393 ;;
Chris@82 7394
Chris@82 7395 vxworks*)
Chris@82 7396 # FIXME: insert proper C++ library support
Chris@82 7397 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 7398 ;;
Chris@82 7399
Chris@82 7400 *)
Chris@82 7401 # FIXME: insert proper C++ library support
Chris@82 7402 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@82 7403 ;;
Chris@82 7404 esac
Chris@82 7405
Chris@82 7406 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
Chris@82 7407 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
Chris@82 7408
Chris@82 7409 _LT_TAGVAR(GCC, $1)=$GXX
Chris@82 7410 _LT_TAGVAR(LD, $1)=$LD
Chris@82 7411
Chris@82 7412 ## CAVEAT EMPTOR:
Chris@82 7413 ## There is no encapsulation within the following macros, do not change
Chris@82 7414 ## the running order or otherwise move them around unless you know exactly
Chris@82 7415 ## what you are doing...
Chris@82 7416 _LT_SYS_HIDDEN_LIBDEPS($1)
Chris@82 7417 _LT_COMPILER_PIC($1)
Chris@82 7418 _LT_COMPILER_C_O($1)
Chris@82 7419 _LT_COMPILER_FILE_LOCKS($1)
Chris@82 7420 _LT_LINKER_SHLIBS($1)
Chris@82 7421 _LT_SYS_DYNAMIC_LINKER($1)
Chris@82 7422 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@82 7423
Chris@82 7424 _LT_CONFIG($1)
Chris@82 7425 fi # test -n "$compiler"
Chris@82 7426
Chris@82 7427 CC=$lt_save_CC
Chris@82 7428 CFLAGS=$lt_save_CFLAGS
Chris@82 7429 LDCXX=$LD
Chris@82 7430 LD=$lt_save_LD
Chris@82 7431 GCC=$lt_save_GCC
Chris@82 7432 with_gnu_ld=$lt_save_with_gnu_ld
Chris@82 7433 lt_cv_path_LDCXX=$lt_cv_path_LD
Chris@82 7434 lt_cv_path_LD=$lt_save_path_LD
Chris@82 7435 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
Chris@82 7436 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
Chris@82 7437 fi # test yes != "$_lt_caught_CXX_error"
Chris@82 7438
Chris@82 7439 AC_LANG_POP
Chris@82 7440 ])# _LT_LANG_CXX_CONFIG
Chris@82 7441
Chris@82 7442
Chris@82 7443 # _LT_FUNC_STRIPNAME_CNF
Chris@82 7444 # ----------------------
Chris@82 7445 # func_stripname_cnf prefix suffix name
Chris@82 7446 # strip PREFIX and SUFFIX off of NAME.
Chris@82 7447 # PREFIX and SUFFIX must not contain globbing or regex special
Chris@82 7448 # characters, hashes, percent signs, but SUFFIX may contain a leading
Chris@82 7449 # dot (in which case that matches only a dot).
Chris@82 7450 #
Chris@82 7451 # This function is identical to the (non-XSI) version of func_stripname,
Chris@82 7452 # except this one can be used by m4 code that may be executed by configure,
Chris@82 7453 # rather than the libtool script.
Chris@82 7454 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
Chris@82 7455 AC_REQUIRE([_LT_DECL_SED])
Chris@82 7456 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
Chris@82 7457 func_stripname_cnf ()
Chris@82 7458 {
Chris@82 7459 case @S|@2 in
Chris@82 7460 .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
Chris@82 7461 *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
Chris@82 7462 esac
Chris@82 7463 } # func_stripname_cnf
Chris@82 7464 ])# _LT_FUNC_STRIPNAME_CNF
Chris@82 7465
Chris@82 7466
Chris@82 7467 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
Chris@82 7468 # ---------------------------------
Chris@82 7469 # Figure out "hidden" library dependencies from verbose
Chris@82 7470 # compiler output when linking a shared library.
Chris@82 7471 # Parse the compiler output and extract the necessary
Chris@82 7472 # objects, libraries and library flags.
Chris@82 7473 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
Chris@82 7474 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@82 7475 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
Chris@82 7476 # Dependencies to place before and after the object being linked:
Chris@82 7477 _LT_TAGVAR(predep_objects, $1)=
Chris@82 7478 _LT_TAGVAR(postdep_objects, $1)=
Chris@82 7479 _LT_TAGVAR(predeps, $1)=
Chris@82 7480 _LT_TAGVAR(postdeps, $1)=
Chris@82 7481 _LT_TAGVAR(compiler_lib_search_path, $1)=
Chris@82 7482
Chris@82 7483 dnl we can't use the lt_simple_compile_test_code here,
Chris@82 7484 dnl because it contains code intended for an executable,
Chris@82 7485 dnl not a library. It's possible we should let each
Chris@82 7486 dnl tag define a new lt_????_link_test_code variable,
Chris@82 7487 dnl but it's only used here...
Chris@82 7488 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
Chris@82 7489 int a;
Chris@82 7490 void foo (void) { a = 0; }
Chris@82 7491 _LT_EOF
Chris@82 7492 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
Chris@82 7493 class Foo
Chris@82 7494 {
Chris@82 7495 public:
Chris@82 7496 Foo (void) { a = 0; }
Chris@82 7497 private:
Chris@82 7498 int a;
Chris@82 7499 };
Chris@82 7500 _LT_EOF
Chris@82 7501 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
Chris@82 7502 subroutine foo
Chris@82 7503 implicit none
Chris@82 7504 integer*4 a
Chris@82 7505 a=0
Chris@82 7506 return
Chris@82 7507 end
Chris@82 7508 _LT_EOF
Chris@82 7509 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
Chris@82 7510 subroutine foo
Chris@82 7511 implicit none
Chris@82 7512 integer a
Chris@82 7513 a=0
Chris@82 7514 return
Chris@82 7515 end
Chris@82 7516 _LT_EOF
Chris@82 7517 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
Chris@82 7518 public class foo {
Chris@82 7519 private int a;
Chris@82 7520 public void bar (void) {
Chris@82 7521 a = 0;
Chris@82 7522 }
Chris@82 7523 };
Chris@82 7524 _LT_EOF
Chris@82 7525 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
Chris@82 7526 package foo
Chris@82 7527 func foo() {
Chris@82 7528 }
Chris@82 7529 _LT_EOF
Chris@82 7530 ])
Chris@82 7531
Chris@82 7532 _lt_libdeps_save_CFLAGS=$CFLAGS
Chris@82 7533 case "$CC $CFLAGS " in #(
Chris@82 7534 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
Chris@82 7535 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
Chris@82 7536 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
Chris@82 7537 esac
Chris@82 7538
Chris@82 7539 dnl Parse the compiler output and extract the necessary
Chris@82 7540 dnl objects, libraries and library flags.
Chris@82 7541 if AC_TRY_EVAL(ac_compile); then
Chris@82 7542 # Parse the compiler output and extract the necessary
Chris@82 7543 # objects, libraries and library flags.
Chris@82 7544
Chris@82 7545 # Sentinel used to keep track of whether or not we are before
Chris@82 7546 # the conftest object file.
Chris@82 7547 pre_test_object_deps_done=no
Chris@82 7548
Chris@82 7549 for p in `eval "$output_verbose_link_cmd"`; do
Chris@82 7550 case $prev$p in
Chris@82 7551
Chris@82 7552 -L* | -R* | -l*)
Chris@82 7553 # Some compilers place space between "-{L,R}" and the path.
Chris@82 7554 # Remove the space.
Chris@82 7555 if test x-L = "$p" ||
Chris@82 7556 test x-R = "$p"; then
Chris@82 7557 prev=$p
Chris@82 7558 continue
Chris@82 7559 fi
Chris@82 7560
Chris@82 7561 # Expand the sysroot to ease extracting the directories later.
Chris@82 7562 if test -z "$prev"; then
Chris@82 7563 case $p in
Chris@82 7564 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
Chris@82 7565 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
Chris@82 7566 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
Chris@82 7567 esac
Chris@82 7568 fi
Chris@82 7569 case $p in
Chris@82 7570 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
Chris@82 7571 esac
Chris@82 7572 if test no = "$pre_test_object_deps_done"; then
Chris@82 7573 case $prev in
Chris@82 7574 -L | -R)
Chris@82 7575 # Internal compiler library paths should come after those
Chris@82 7576 # provided the user. The postdeps already come after the
Chris@82 7577 # user supplied libs so there is no need to process them.
Chris@82 7578 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
Chris@82 7579 _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
Chris@82 7580 else
Chris@82 7581 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
Chris@82 7582 fi
Chris@82 7583 ;;
Chris@82 7584 # The "-l" case would never come before the object being
Chris@82 7585 # linked, so don't bother handling this case.
Chris@82 7586 esac
Chris@82 7587 else
Chris@82 7588 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
Chris@82 7589 _LT_TAGVAR(postdeps, $1)=$prev$p
Chris@82 7590 else
Chris@82 7591 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
Chris@82 7592 fi
Chris@82 7593 fi
Chris@82 7594 prev=
Chris@82 7595 ;;
Chris@82 7596
Chris@82 7597 *.lto.$objext) ;; # Ignore GCC LTO objects
Chris@82 7598 *.$objext)
Chris@82 7599 # This assumes that the test object file only shows up
Chris@82 7600 # once in the compiler output.
Chris@82 7601 if test "$p" = "conftest.$objext"; then
Chris@82 7602 pre_test_object_deps_done=yes
Chris@82 7603 continue
Chris@82 7604 fi
Chris@82 7605
Chris@82 7606 if test no = "$pre_test_object_deps_done"; then
Chris@82 7607 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
Chris@82 7608 _LT_TAGVAR(predep_objects, $1)=$p
Chris@82 7609 else
Chris@82 7610 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
Chris@82 7611 fi
Chris@82 7612 else
Chris@82 7613 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
Chris@82 7614 _LT_TAGVAR(postdep_objects, $1)=$p
Chris@82 7615 else
Chris@82 7616 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
Chris@82 7617 fi
Chris@82 7618 fi
Chris@82 7619 ;;
Chris@82 7620
Chris@82 7621 *) ;; # Ignore the rest.
Chris@82 7622
Chris@82 7623 esac
Chris@82 7624 done
Chris@82 7625
Chris@82 7626 # Clean up.
Chris@82 7627 rm -f a.out a.exe
Chris@82 7628 else
Chris@82 7629 echo "libtool.m4: error: problem compiling $1 test program"
Chris@82 7630 fi
Chris@82 7631
Chris@82 7632 $RM -f confest.$objext
Chris@82 7633 CFLAGS=$_lt_libdeps_save_CFLAGS
Chris@82 7634
Chris@82 7635 # PORTME: override above test on systems where it is broken
Chris@82 7636 m4_if([$1], [CXX],
Chris@82 7637 [case $host_os in
Chris@82 7638 interix[[3-9]]*)
Chris@82 7639 # Interix 3.5 installs completely hosed .la files for C++, so rather than
Chris@82 7640 # hack all around it, let's just trust "g++" to DTRT.
Chris@82 7641 _LT_TAGVAR(predep_objects,$1)=
Chris@82 7642 _LT_TAGVAR(postdep_objects,$1)=
Chris@82 7643 _LT_TAGVAR(postdeps,$1)=
Chris@82 7644 ;;
Chris@82 7645 esac
Chris@82 7646 ])
Chris@82 7647
Chris@82 7648 case " $_LT_TAGVAR(postdeps, $1) " in
Chris@82 7649 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
Chris@82 7650 esac
Chris@82 7651 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
Chris@82 7652 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
Chris@82 7653 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
Chris@82 7654 fi
Chris@82 7655 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
Chris@82 7656 [The directories searched by this compiler when creating a shared library])
Chris@82 7657 _LT_TAGDECL([], [predep_objects], [1],
Chris@82 7658 [Dependencies to place before and after the objects being linked to
Chris@82 7659 create a shared library])
Chris@82 7660 _LT_TAGDECL([], [postdep_objects], [1])
Chris@82 7661 _LT_TAGDECL([], [predeps], [1])
Chris@82 7662 _LT_TAGDECL([], [postdeps], [1])
Chris@82 7663 _LT_TAGDECL([], [compiler_lib_search_path], [1],
Chris@82 7664 [The library search path used internally by the compiler when linking
Chris@82 7665 a shared library])
Chris@82 7666 ])# _LT_SYS_HIDDEN_LIBDEPS
Chris@82 7667
Chris@82 7668
Chris@82 7669 # _LT_LANG_F77_CONFIG([TAG])
Chris@82 7670 # --------------------------
Chris@82 7671 # Ensure that the configuration variables for a Fortran 77 compiler are
Chris@82 7672 # suitably defined. These variables are subsequently used by _LT_CONFIG
Chris@82 7673 # to write the compiler configuration to 'libtool'.
Chris@82 7674 m4_defun([_LT_LANG_F77_CONFIG],
Chris@82 7675 [AC_LANG_PUSH(Fortran 77)
Chris@82 7676 if test -z "$F77" || test no = "$F77"; then
Chris@82 7677 _lt_disable_F77=yes
Chris@82 7678 fi
Chris@82 7679
Chris@82 7680 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@82 7681 _LT_TAGVAR(allow_undefined_flag, $1)=
Chris@82 7682 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@82 7683 _LT_TAGVAR(archive_expsym_cmds, $1)=
Chris@82 7684 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@82 7685 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@82 7686 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@82 7687 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@82 7688 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@82 7689 _LT_TAGVAR(hardcode_minus_L, $1)=no
Chris@82 7690 _LT_TAGVAR(hardcode_automatic, $1)=no
Chris@82 7691 _LT_TAGVAR(inherit_rpath, $1)=no
Chris@82 7692 _LT_TAGVAR(module_cmds, $1)=
Chris@82 7693 _LT_TAGVAR(module_expsym_cmds, $1)=
Chris@82 7694 _LT_TAGVAR(link_all_deplibs, $1)=unknown
Chris@82 7695 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@82 7696 _LT_TAGVAR(reload_flag, $1)=$reload_flag
Chris@82 7697 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
Chris@82 7698 _LT_TAGVAR(no_undefined_flag, $1)=
Chris@82 7699 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@82 7700 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
Chris@82 7701
Chris@82 7702 # Source file extension for f77 test sources.
Chris@82 7703 ac_ext=f
Chris@82 7704
Chris@82 7705 # Object file extension for compiled f77 test sources.
Chris@82 7706 objext=o
Chris@82 7707 _LT_TAGVAR(objext, $1)=$objext
Chris@82 7708
Chris@82 7709 # No sense in running all these tests if we already determined that
Chris@82 7710 # the F77 compiler isn't working. Some variables (like enable_shared)
Chris@82 7711 # are currently assumed to apply to all compilers on this platform,
Chris@82 7712 # and will be corrupted by setting them based on a non-working compiler.
Chris@82 7713 if test yes != "$_lt_disable_F77"; then
Chris@82 7714 # Code to be used in simple compile tests
Chris@82 7715 lt_simple_compile_test_code="\
Chris@82 7716 subroutine t
Chris@82 7717 return
Chris@82 7718 end
Chris@82 7719 "
Chris@82 7720
Chris@82 7721 # Code to be used in simple link tests
Chris@82 7722 lt_simple_link_test_code="\
Chris@82 7723 program t
Chris@82 7724 end
Chris@82 7725 "
Chris@82 7726
Chris@82 7727 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@82 7728 _LT_TAG_COMPILER
Chris@82 7729
Chris@82 7730 # save warnings/boilerplate of simple test code
Chris@82 7731 _LT_COMPILER_BOILERPLATE
Chris@82 7732 _LT_LINKER_BOILERPLATE
Chris@82 7733
Chris@82 7734 # Allow CC to be a program name with arguments.
Chris@82 7735 lt_save_CC=$CC
Chris@82 7736 lt_save_GCC=$GCC
Chris@82 7737 lt_save_CFLAGS=$CFLAGS
Chris@82 7738 CC=${F77-"f77"}
Chris@82 7739 CFLAGS=$FFLAGS
Chris@82 7740 compiler=$CC
Chris@82 7741 _LT_TAGVAR(compiler, $1)=$CC
Chris@82 7742 _LT_CC_BASENAME([$compiler])
Chris@82 7743 GCC=$G77
Chris@82 7744 if test -n "$compiler"; then
Chris@82 7745 AC_MSG_CHECKING([if libtool supports shared libraries])
Chris@82 7746 AC_MSG_RESULT([$can_build_shared])
Chris@82 7747
Chris@82 7748 AC_MSG_CHECKING([whether to build shared libraries])
Chris@82 7749 test no = "$can_build_shared" && enable_shared=no
Chris@82 7750
Chris@82 7751 # On AIX, shared libraries and static libraries use the same namespace, and
Chris@82 7752 # are all built from PIC.
Chris@82 7753 case $host_os in
Chris@82 7754 aix3*)
Chris@82 7755 test yes = "$enable_shared" && enable_static=no
Chris@82 7756 if test -n "$RANLIB"; then
Chris@82 7757 archive_cmds="$archive_cmds~\$RANLIB \$lib"
Chris@82 7758 postinstall_cmds='$RANLIB $lib'
Chris@82 7759 fi
Chris@82 7760 ;;
Chris@82 7761 aix[[4-9]]*)
Chris@82 7762 if test ia64 != "$host_cpu"; then
Chris@82 7763 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
Chris@82 7764 yes,aix,yes) ;; # shared object as lib.so file only
Chris@82 7765 yes,svr4,*) ;; # shared object as lib.so archive member only
Chris@82 7766 yes,*) enable_static=no ;; # shared object in lib.a archive as well
Chris@82 7767 esac
Chris@82 7768 fi
Chris@82 7769 ;;
Chris@82 7770 esac
Chris@82 7771 AC_MSG_RESULT([$enable_shared])
Chris@82 7772
Chris@82 7773 AC_MSG_CHECKING([whether to build static libraries])
Chris@82 7774 # Make sure either enable_shared or enable_static is yes.
Chris@82 7775 test yes = "$enable_shared" || enable_static=yes
Chris@82 7776 AC_MSG_RESULT([$enable_static])
Chris@82 7777
Chris@82 7778 _LT_TAGVAR(GCC, $1)=$G77
Chris@82 7779 _LT_TAGVAR(LD, $1)=$LD
Chris@82 7780
Chris@82 7781 ## CAVEAT EMPTOR:
Chris@82 7782 ## There is no encapsulation within the following macros, do not change
Chris@82 7783 ## the running order or otherwise move them around unless you know exactly
Chris@82 7784 ## what you are doing...
Chris@82 7785 _LT_COMPILER_PIC($1)
Chris@82 7786 _LT_COMPILER_C_O($1)
Chris@82 7787 _LT_COMPILER_FILE_LOCKS($1)
Chris@82 7788 _LT_LINKER_SHLIBS($1)
Chris@82 7789 _LT_SYS_DYNAMIC_LINKER($1)
Chris@82 7790 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@82 7791
Chris@82 7792 _LT_CONFIG($1)
Chris@82 7793 fi # test -n "$compiler"
Chris@82 7794
Chris@82 7795 GCC=$lt_save_GCC
Chris@82 7796 CC=$lt_save_CC
Chris@82 7797 CFLAGS=$lt_save_CFLAGS
Chris@82 7798 fi # test yes != "$_lt_disable_F77"
Chris@82 7799
Chris@82 7800 AC_LANG_POP
Chris@82 7801 ])# _LT_LANG_F77_CONFIG
Chris@82 7802
Chris@82 7803
Chris@82 7804 # _LT_LANG_FC_CONFIG([TAG])
Chris@82 7805 # -------------------------
Chris@82 7806 # Ensure that the configuration variables for a Fortran compiler are
Chris@82 7807 # suitably defined. These variables are subsequently used by _LT_CONFIG
Chris@82 7808 # to write the compiler configuration to 'libtool'.
Chris@82 7809 m4_defun([_LT_LANG_FC_CONFIG],
Chris@82 7810 [AC_LANG_PUSH(Fortran)
Chris@82 7811
Chris@82 7812 if test -z "$FC" || test no = "$FC"; then
Chris@82 7813 _lt_disable_FC=yes
Chris@82 7814 fi
Chris@82 7815
Chris@82 7816 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@82 7817 _LT_TAGVAR(allow_undefined_flag, $1)=
Chris@82 7818 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@82 7819 _LT_TAGVAR(archive_expsym_cmds, $1)=
Chris@82 7820 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@82 7821 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@82 7822 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@82 7823 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@82 7824 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@82 7825 _LT_TAGVAR(hardcode_minus_L, $1)=no
Chris@82 7826 _LT_TAGVAR(hardcode_automatic, $1)=no
Chris@82 7827 _LT_TAGVAR(inherit_rpath, $1)=no
Chris@82 7828 _LT_TAGVAR(module_cmds, $1)=
Chris@82 7829 _LT_TAGVAR(module_expsym_cmds, $1)=
Chris@82 7830 _LT_TAGVAR(link_all_deplibs, $1)=unknown
Chris@82 7831 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@82 7832 _LT_TAGVAR(reload_flag, $1)=$reload_flag
Chris@82 7833 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
Chris@82 7834 _LT_TAGVAR(no_undefined_flag, $1)=
Chris@82 7835 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@82 7836 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
Chris@82 7837
Chris@82 7838 # Source file extension for fc test sources.
Chris@82 7839 ac_ext=${ac_fc_srcext-f}
Chris@82 7840
Chris@82 7841 # Object file extension for compiled fc test sources.
Chris@82 7842 objext=o
Chris@82 7843 _LT_TAGVAR(objext, $1)=$objext
Chris@82 7844
Chris@82 7845 # No sense in running all these tests if we already determined that
Chris@82 7846 # the FC compiler isn't working. Some variables (like enable_shared)
Chris@82 7847 # are currently assumed to apply to all compilers on this platform,
Chris@82 7848 # and will be corrupted by setting them based on a non-working compiler.
Chris@82 7849 if test yes != "$_lt_disable_FC"; then
Chris@82 7850 # Code to be used in simple compile tests
Chris@82 7851 lt_simple_compile_test_code="\
Chris@82 7852 subroutine t
Chris@82 7853 return
Chris@82 7854 end
Chris@82 7855 "
Chris@82 7856
Chris@82 7857 # Code to be used in simple link tests
Chris@82 7858 lt_simple_link_test_code="\
Chris@82 7859 program t
Chris@82 7860 end
Chris@82 7861 "
Chris@82 7862
Chris@82 7863 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@82 7864 _LT_TAG_COMPILER
Chris@82 7865
Chris@82 7866 # save warnings/boilerplate of simple test code
Chris@82 7867 _LT_COMPILER_BOILERPLATE
Chris@82 7868 _LT_LINKER_BOILERPLATE
Chris@82 7869
Chris@82 7870 # Allow CC to be a program name with arguments.
Chris@82 7871 lt_save_CC=$CC
Chris@82 7872 lt_save_GCC=$GCC
Chris@82 7873 lt_save_CFLAGS=$CFLAGS
Chris@82 7874 CC=${FC-"f95"}
Chris@82 7875 CFLAGS=$FCFLAGS
Chris@82 7876 compiler=$CC
Chris@82 7877 GCC=$ac_cv_fc_compiler_gnu
Chris@82 7878
Chris@82 7879 _LT_TAGVAR(compiler, $1)=$CC
Chris@82 7880 _LT_CC_BASENAME([$compiler])
Chris@82 7881
Chris@82 7882 if test -n "$compiler"; then
Chris@82 7883 AC_MSG_CHECKING([if libtool supports shared libraries])
Chris@82 7884 AC_MSG_RESULT([$can_build_shared])
Chris@82 7885
Chris@82 7886 AC_MSG_CHECKING([whether to build shared libraries])
Chris@82 7887 test no = "$can_build_shared" && enable_shared=no
Chris@82 7888
Chris@82 7889 # On AIX, shared libraries and static libraries use the same namespace, and
Chris@82 7890 # are all built from PIC.
Chris@82 7891 case $host_os in
Chris@82 7892 aix3*)
Chris@82 7893 test yes = "$enable_shared" && enable_static=no
Chris@82 7894 if test -n "$RANLIB"; then
Chris@82 7895 archive_cmds="$archive_cmds~\$RANLIB \$lib"
Chris@82 7896 postinstall_cmds='$RANLIB $lib'
Chris@82 7897 fi
Chris@82 7898 ;;
Chris@82 7899 aix[[4-9]]*)
Chris@82 7900 if test ia64 != "$host_cpu"; then
Chris@82 7901 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
Chris@82 7902 yes,aix,yes) ;; # shared object as lib.so file only
Chris@82 7903 yes,svr4,*) ;; # shared object as lib.so archive member only
Chris@82 7904 yes,*) enable_static=no ;; # shared object in lib.a archive as well
Chris@82 7905 esac
Chris@82 7906 fi
Chris@82 7907 ;;
Chris@82 7908 esac
Chris@82 7909 AC_MSG_RESULT([$enable_shared])
Chris@82 7910
Chris@82 7911 AC_MSG_CHECKING([whether to build static libraries])
Chris@82 7912 # Make sure either enable_shared or enable_static is yes.
Chris@82 7913 test yes = "$enable_shared" || enable_static=yes
Chris@82 7914 AC_MSG_RESULT([$enable_static])
Chris@82 7915
Chris@82 7916 _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
Chris@82 7917 _LT_TAGVAR(LD, $1)=$LD
Chris@82 7918
Chris@82 7919 ## CAVEAT EMPTOR:
Chris@82 7920 ## There is no encapsulation within the following macros, do not change
Chris@82 7921 ## the running order or otherwise move them around unless you know exactly
Chris@82 7922 ## what you are doing...
Chris@82 7923 _LT_SYS_HIDDEN_LIBDEPS($1)
Chris@82 7924 _LT_COMPILER_PIC($1)
Chris@82 7925 _LT_COMPILER_C_O($1)
Chris@82 7926 _LT_COMPILER_FILE_LOCKS($1)
Chris@82 7927 _LT_LINKER_SHLIBS($1)
Chris@82 7928 _LT_SYS_DYNAMIC_LINKER($1)
Chris@82 7929 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@82 7930
Chris@82 7931 _LT_CONFIG($1)
Chris@82 7932 fi # test -n "$compiler"
Chris@82 7933
Chris@82 7934 GCC=$lt_save_GCC
Chris@82 7935 CC=$lt_save_CC
Chris@82 7936 CFLAGS=$lt_save_CFLAGS
Chris@82 7937 fi # test yes != "$_lt_disable_FC"
Chris@82 7938
Chris@82 7939 AC_LANG_POP
Chris@82 7940 ])# _LT_LANG_FC_CONFIG
Chris@82 7941
Chris@82 7942
Chris@82 7943 # _LT_LANG_GCJ_CONFIG([TAG])
Chris@82 7944 # --------------------------
Chris@82 7945 # Ensure that the configuration variables for the GNU Java Compiler compiler
Chris@82 7946 # are suitably defined. These variables are subsequently used by _LT_CONFIG
Chris@82 7947 # to write the compiler configuration to 'libtool'.
Chris@82 7948 m4_defun([_LT_LANG_GCJ_CONFIG],
Chris@82 7949 [AC_REQUIRE([LT_PROG_GCJ])dnl
Chris@82 7950 AC_LANG_SAVE
Chris@82 7951
Chris@82 7952 # Source file extension for Java test sources.
Chris@82 7953 ac_ext=java
Chris@82 7954
Chris@82 7955 # Object file extension for compiled Java test sources.
Chris@82 7956 objext=o
Chris@82 7957 _LT_TAGVAR(objext, $1)=$objext
Chris@82 7958
Chris@82 7959 # Code to be used in simple compile tests
Chris@82 7960 lt_simple_compile_test_code="class foo {}"
Chris@82 7961
Chris@82 7962 # Code to be used in simple link tests
Chris@82 7963 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
Chris@82 7964
Chris@82 7965 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@82 7966 _LT_TAG_COMPILER
Chris@82 7967
Chris@82 7968 # save warnings/boilerplate of simple test code
Chris@82 7969 _LT_COMPILER_BOILERPLATE
Chris@82 7970 _LT_LINKER_BOILERPLATE
Chris@82 7971
Chris@82 7972 # Allow CC to be a program name with arguments.
Chris@82 7973 lt_save_CC=$CC
Chris@82 7974 lt_save_CFLAGS=$CFLAGS
Chris@82 7975 lt_save_GCC=$GCC
Chris@82 7976 GCC=yes
Chris@82 7977 CC=${GCJ-"gcj"}
Chris@82 7978 CFLAGS=$GCJFLAGS
Chris@82 7979 compiler=$CC
Chris@82 7980 _LT_TAGVAR(compiler, $1)=$CC
Chris@82 7981 _LT_TAGVAR(LD, $1)=$LD
Chris@82 7982 _LT_CC_BASENAME([$compiler])
Chris@82 7983
Chris@82 7984 # GCJ did not exist at the time GCC didn't implicitly link libc in.
Chris@82 7985 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@82 7986
Chris@82 7987 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@82 7988 _LT_TAGVAR(reload_flag, $1)=$reload_flag
Chris@82 7989 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
Chris@82 7990
Chris@82 7991 ## CAVEAT EMPTOR:
Chris@82 7992 ## There is no encapsulation within the following macros, do not change
Chris@82 7993 ## the running order or otherwise move them around unless you know exactly
Chris@82 7994 ## what you are doing...
Chris@82 7995 if test -n "$compiler"; then
Chris@82 7996 _LT_COMPILER_NO_RTTI($1)
Chris@82 7997 _LT_COMPILER_PIC($1)
Chris@82 7998 _LT_COMPILER_C_O($1)
Chris@82 7999 _LT_COMPILER_FILE_LOCKS($1)
Chris@82 8000 _LT_LINKER_SHLIBS($1)
Chris@82 8001 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@82 8002
Chris@82 8003 _LT_CONFIG($1)
Chris@82 8004 fi
Chris@82 8005
Chris@82 8006 AC_LANG_RESTORE
Chris@82 8007
Chris@82 8008 GCC=$lt_save_GCC
Chris@82 8009 CC=$lt_save_CC
Chris@82 8010 CFLAGS=$lt_save_CFLAGS
Chris@82 8011 ])# _LT_LANG_GCJ_CONFIG
Chris@82 8012
Chris@82 8013
Chris@82 8014 # _LT_LANG_GO_CONFIG([TAG])
Chris@82 8015 # --------------------------
Chris@82 8016 # Ensure that the configuration variables for the GNU Go compiler
Chris@82 8017 # are suitably defined. These variables are subsequently used by _LT_CONFIG
Chris@82 8018 # to write the compiler configuration to 'libtool'.
Chris@82 8019 m4_defun([_LT_LANG_GO_CONFIG],
Chris@82 8020 [AC_REQUIRE([LT_PROG_GO])dnl
Chris@82 8021 AC_LANG_SAVE
Chris@82 8022
Chris@82 8023 # Source file extension for Go test sources.
Chris@82 8024 ac_ext=go
Chris@82 8025
Chris@82 8026 # Object file extension for compiled Go test sources.
Chris@82 8027 objext=o
Chris@82 8028 _LT_TAGVAR(objext, $1)=$objext
Chris@82 8029
Chris@82 8030 # Code to be used in simple compile tests
Chris@82 8031 lt_simple_compile_test_code="package main; func main() { }"
Chris@82 8032
Chris@82 8033 # Code to be used in simple link tests
Chris@82 8034 lt_simple_link_test_code='package main; func main() { }'
Chris@82 8035
Chris@82 8036 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@82 8037 _LT_TAG_COMPILER
Chris@82 8038
Chris@82 8039 # save warnings/boilerplate of simple test code
Chris@82 8040 _LT_COMPILER_BOILERPLATE
Chris@82 8041 _LT_LINKER_BOILERPLATE
Chris@82 8042
Chris@82 8043 # Allow CC to be a program name with arguments.
Chris@82 8044 lt_save_CC=$CC
Chris@82 8045 lt_save_CFLAGS=$CFLAGS
Chris@82 8046 lt_save_GCC=$GCC
Chris@82 8047 GCC=yes
Chris@82 8048 CC=${GOC-"gccgo"}
Chris@82 8049 CFLAGS=$GOFLAGS
Chris@82 8050 compiler=$CC
Chris@82 8051 _LT_TAGVAR(compiler, $1)=$CC
Chris@82 8052 _LT_TAGVAR(LD, $1)=$LD
Chris@82 8053 _LT_CC_BASENAME([$compiler])
Chris@82 8054
Chris@82 8055 # Go did not exist at the time GCC didn't implicitly link libc in.
Chris@82 8056 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@82 8057
Chris@82 8058 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@82 8059 _LT_TAGVAR(reload_flag, $1)=$reload_flag
Chris@82 8060 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
Chris@82 8061
Chris@82 8062 ## CAVEAT EMPTOR:
Chris@82 8063 ## There is no encapsulation within the following macros, do not change
Chris@82 8064 ## the running order or otherwise move them around unless you know exactly
Chris@82 8065 ## what you are doing...
Chris@82 8066 if test -n "$compiler"; then
Chris@82 8067 _LT_COMPILER_NO_RTTI($1)
Chris@82 8068 _LT_COMPILER_PIC($1)
Chris@82 8069 _LT_COMPILER_C_O($1)
Chris@82 8070 _LT_COMPILER_FILE_LOCKS($1)
Chris@82 8071 _LT_LINKER_SHLIBS($1)
Chris@82 8072 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@82 8073
Chris@82 8074 _LT_CONFIG($1)
Chris@82 8075 fi
Chris@82 8076
Chris@82 8077 AC_LANG_RESTORE
Chris@82 8078
Chris@82 8079 GCC=$lt_save_GCC
Chris@82 8080 CC=$lt_save_CC
Chris@82 8081 CFLAGS=$lt_save_CFLAGS
Chris@82 8082 ])# _LT_LANG_GO_CONFIG
Chris@82 8083
Chris@82 8084
Chris@82 8085 # _LT_LANG_RC_CONFIG([TAG])
Chris@82 8086 # -------------------------
Chris@82 8087 # Ensure that the configuration variables for the Windows resource compiler
Chris@82 8088 # are suitably defined. These variables are subsequently used by _LT_CONFIG
Chris@82 8089 # to write the compiler configuration to 'libtool'.
Chris@82 8090 m4_defun([_LT_LANG_RC_CONFIG],
Chris@82 8091 [AC_REQUIRE([LT_PROG_RC])dnl
Chris@82 8092 AC_LANG_SAVE
Chris@82 8093
Chris@82 8094 # Source file extension for RC test sources.
Chris@82 8095 ac_ext=rc
Chris@82 8096
Chris@82 8097 # Object file extension for compiled RC test sources.
Chris@82 8098 objext=o
Chris@82 8099 _LT_TAGVAR(objext, $1)=$objext
Chris@82 8100
Chris@82 8101 # Code to be used in simple compile tests
Chris@82 8102 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
Chris@82 8103
Chris@82 8104 # Code to be used in simple link tests
Chris@82 8105 lt_simple_link_test_code=$lt_simple_compile_test_code
Chris@82 8106
Chris@82 8107 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@82 8108 _LT_TAG_COMPILER
Chris@82 8109
Chris@82 8110 # save warnings/boilerplate of simple test code
Chris@82 8111 _LT_COMPILER_BOILERPLATE
Chris@82 8112 _LT_LINKER_BOILERPLATE
Chris@82 8113
Chris@82 8114 # Allow CC to be a program name with arguments.
Chris@82 8115 lt_save_CC=$CC
Chris@82 8116 lt_save_CFLAGS=$CFLAGS
Chris@82 8117 lt_save_GCC=$GCC
Chris@82 8118 GCC=
Chris@82 8119 CC=${RC-"windres"}
Chris@82 8120 CFLAGS=
Chris@82 8121 compiler=$CC
Chris@82 8122 _LT_TAGVAR(compiler, $1)=$CC
Chris@82 8123 _LT_CC_BASENAME([$compiler])
Chris@82 8124 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
Chris@82 8125
Chris@82 8126 if test -n "$compiler"; then
Chris@82 8127 :
Chris@82 8128 _LT_CONFIG($1)
Chris@82 8129 fi
Chris@82 8130
Chris@82 8131 GCC=$lt_save_GCC
Chris@82 8132 AC_LANG_RESTORE
Chris@82 8133 CC=$lt_save_CC
Chris@82 8134 CFLAGS=$lt_save_CFLAGS
Chris@82 8135 ])# _LT_LANG_RC_CONFIG
Chris@82 8136
Chris@82 8137
Chris@82 8138 # LT_PROG_GCJ
Chris@82 8139 # -----------
Chris@82 8140 AC_DEFUN([LT_PROG_GCJ],
Chris@82 8141 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
Chris@82 8142 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
Chris@82 8143 [AC_CHECK_TOOL(GCJ, gcj,)
Chris@82 8144 test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
Chris@82 8145 AC_SUBST(GCJFLAGS)])])[]dnl
Chris@82 8146 ])
Chris@82 8147
Chris@82 8148 # Old name:
Chris@82 8149 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
Chris@82 8150 dnl aclocal-1.4 backwards compatibility:
Chris@82 8151 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
Chris@82 8152
Chris@82 8153
Chris@82 8154 # LT_PROG_GO
Chris@82 8155 # ----------
Chris@82 8156 AC_DEFUN([LT_PROG_GO],
Chris@82 8157 [AC_CHECK_TOOL(GOC, gccgo,)
Chris@82 8158 ])
Chris@82 8159
Chris@82 8160
Chris@82 8161 # LT_PROG_RC
Chris@82 8162 # ----------
Chris@82 8163 AC_DEFUN([LT_PROG_RC],
Chris@82 8164 [AC_CHECK_TOOL(RC, windres,)
Chris@82 8165 ])
Chris@82 8166
Chris@82 8167 # Old name:
Chris@82 8168 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
Chris@82 8169 dnl aclocal-1.4 backwards compatibility:
Chris@82 8170 dnl AC_DEFUN([LT_AC_PROG_RC], [])
Chris@82 8171
Chris@82 8172
Chris@82 8173 # _LT_DECL_EGREP
Chris@82 8174 # --------------
Chris@82 8175 # If we don't have a new enough Autoconf to choose the best grep
Chris@82 8176 # available, choose the one first in the user's PATH.
Chris@82 8177 m4_defun([_LT_DECL_EGREP],
Chris@82 8178 [AC_REQUIRE([AC_PROG_EGREP])dnl
Chris@82 8179 AC_REQUIRE([AC_PROG_FGREP])dnl
Chris@82 8180 test -z "$GREP" && GREP=grep
Chris@82 8181 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
Chris@82 8182 _LT_DECL([], [EGREP], [1], [An ERE matcher])
Chris@82 8183 _LT_DECL([], [FGREP], [1], [A literal string matcher])
Chris@82 8184 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
Chris@82 8185 AC_SUBST([GREP])
Chris@82 8186 ])
Chris@82 8187
Chris@82 8188
Chris@82 8189 # _LT_DECL_OBJDUMP
Chris@82 8190 # --------------
Chris@82 8191 # If we don't have a new enough Autoconf to choose the best objdump
Chris@82 8192 # available, choose the one first in the user's PATH.
Chris@82 8193 m4_defun([_LT_DECL_OBJDUMP],
Chris@82 8194 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
Chris@82 8195 test -z "$OBJDUMP" && OBJDUMP=objdump
Chris@82 8196 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
Chris@82 8197 AC_SUBST([OBJDUMP])
Chris@82 8198 ])
Chris@82 8199
Chris@82 8200 # _LT_DECL_DLLTOOL
Chris@82 8201 # ----------------
Chris@82 8202 # Ensure DLLTOOL variable is set.
Chris@82 8203 m4_defun([_LT_DECL_DLLTOOL],
Chris@82 8204 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
Chris@82 8205 test -z "$DLLTOOL" && DLLTOOL=dlltool
Chris@82 8206 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
Chris@82 8207 AC_SUBST([DLLTOOL])
Chris@82 8208 ])
Chris@82 8209
Chris@82 8210 # _LT_DECL_SED
Chris@82 8211 # ------------
Chris@82 8212 # Check for a fully-functional sed program, that truncates
Chris@82 8213 # as few characters as possible. Prefer GNU sed if found.
Chris@82 8214 m4_defun([_LT_DECL_SED],
Chris@82 8215 [AC_PROG_SED
Chris@82 8216 test -z "$SED" && SED=sed
Chris@82 8217 Xsed="$SED -e 1s/^X//"
Chris@82 8218 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
Chris@82 8219 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
Chris@82 8220 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
Chris@82 8221 ])# _LT_DECL_SED
Chris@82 8222
Chris@82 8223 m4_ifndef([AC_PROG_SED], [
Chris@82 8224 ############################################################
Chris@82 8225 # NOTE: This macro has been submitted for inclusion into #
Chris@82 8226 # GNU Autoconf as AC_PROG_SED. When it is available in #
Chris@82 8227 # a released version of Autoconf we should remove this #
Chris@82 8228 # macro and use it instead. #
Chris@82 8229 ############################################################
Chris@82 8230
Chris@82 8231 m4_defun([AC_PROG_SED],
Chris@82 8232 [AC_MSG_CHECKING([for a sed that does not truncate output])
Chris@82 8233 AC_CACHE_VAL(lt_cv_path_SED,
Chris@82 8234 [# Loop through the user's path and test for sed and gsed.
Chris@82 8235 # Then use that list of sed's as ones to test for truncation.
Chris@82 8236 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Chris@82 8237 for as_dir in $PATH
Chris@82 8238 do
Chris@82 8239 IFS=$as_save_IFS
Chris@82 8240 test -z "$as_dir" && as_dir=.
Chris@82 8241 for lt_ac_prog in sed gsed; do
Chris@82 8242 for ac_exec_ext in '' $ac_executable_extensions; do
Chris@82 8243 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
Chris@82 8244 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
Chris@82 8245 fi
Chris@82 8246 done
Chris@82 8247 done
Chris@82 8248 done
Chris@82 8249 IFS=$as_save_IFS
Chris@82 8250 lt_ac_max=0
Chris@82 8251 lt_ac_count=0
Chris@82 8252 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
Chris@82 8253 # along with /bin/sed that truncates output.
Chris@82 8254 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
Chris@82 8255 test ! -f "$lt_ac_sed" && continue
Chris@82 8256 cat /dev/null > conftest.in
Chris@82 8257 lt_ac_count=0
Chris@82 8258 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
Chris@82 8259 # Check for GNU sed and select it if it is found.
Chris@82 8260 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
Chris@82 8261 lt_cv_path_SED=$lt_ac_sed
Chris@82 8262 break
Chris@82 8263 fi
Chris@82 8264 while true; do
Chris@82 8265 cat conftest.in conftest.in >conftest.tmp
Chris@82 8266 mv conftest.tmp conftest.in
Chris@82 8267 cp conftest.in conftest.nl
Chris@82 8268 echo >>conftest.nl
Chris@82 8269 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
Chris@82 8270 cmp -s conftest.out conftest.nl || break
Chris@82 8271 # 10000 chars as input seems more than enough
Chris@82 8272 test 10 -lt "$lt_ac_count" && break
Chris@82 8273 lt_ac_count=`expr $lt_ac_count + 1`
Chris@82 8274 if test "$lt_ac_count" -gt "$lt_ac_max"; then
Chris@82 8275 lt_ac_max=$lt_ac_count
Chris@82 8276 lt_cv_path_SED=$lt_ac_sed
Chris@82 8277 fi
Chris@82 8278 done
Chris@82 8279 done
Chris@82 8280 ])
Chris@82 8281 SED=$lt_cv_path_SED
Chris@82 8282 AC_SUBST([SED])
Chris@82 8283 AC_MSG_RESULT([$SED])
Chris@82 8284 ])#AC_PROG_SED
Chris@82 8285 ])#m4_ifndef
Chris@82 8286
Chris@82 8287 # Old name:
Chris@82 8288 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
Chris@82 8289 dnl aclocal-1.4 backwards compatibility:
Chris@82 8290 dnl AC_DEFUN([LT_AC_PROG_SED], [])
Chris@82 8291
Chris@82 8292
Chris@82 8293 # _LT_CHECK_SHELL_FEATURES
Chris@82 8294 # ------------------------
Chris@82 8295 # Find out whether the shell is Bourne or XSI compatible,
Chris@82 8296 # or has some other useful features.
Chris@82 8297 m4_defun([_LT_CHECK_SHELL_FEATURES],
Chris@82 8298 [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
Chris@82 8299 lt_unset=unset
Chris@82 8300 else
Chris@82 8301 lt_unset=false
Chris@82 8302 fi
Chris@82 8303 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
Chris@82 8304
Chris@82 8305 # test EBCDIC or ASCII
Chris@82 8306 case `echo X|tr X '\101'` in
Chris@82 8307 A) # ASCII based system
Chris@82 8308 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
Chris@82 8309 lt_SP2NL='tr \040 \012'
Chris@82 8310 lt_NL2SP='tr \015\012 \040\040'
Chris@82 8311 ;;
Chris@82 8312 *) # EBCDIC based system
Chris@82 8313 lt_SP2NL='tr \100 \n'
Chris@82 8314 lt_NL2SP='tr \r\n \100\100'
Chris@82 8315 ;;
Chris@82 8316 esac
Chris@82 8317 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
Chris@82 8318 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
Chris@82 8319 ])# _LT_CHECK_SHELL_FEATURES
Chris@82 8320
Chris@82 8321
Chris@82 8322 # _LT_PATH_CONVERSION_FUNCTIONS
Chris@82 8323 # -----------------------------
Chris@82 8324 # Determine what file name conversion functions should be used by
Chris@82 8325 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
Chris@82 8326 # for certain cross-compile configurations and native mingw.
Chris@82 8327 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
Chris@82 8328 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@82 8329 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
Chris@82 8330 AC_MSG_CHECKING([how to convert $build file names to $host format])
Chris@82 8331 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
Chris@82 8332 [case $host in
Chris@82 8333 *-*-mingw* )
Chris@82 8334 case $build in
Chris@82 8335 *-*-mingw* ) # actually msys
Chris@82 8336 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
Chris@82 8337 ;;
Chris@82 8338 *-*-cygwin* )
Chris@82 8339 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
Chris@82 8340 ;;
Chris@82 8341 * ) # otherwise, assume *nix
Chris@82 8342 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
Chris@82 8343 ;;
Chris@82 8344 esac
Chris@82 8345 ;;
Chris@82 8346 *-*-cygwin* )
Chris@82 8347 case $build in
Chris@82 8348 *-*-mingw* ) # actually msys
Chris@82 8349 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
Chris@82 8350 ;;
Chris@82 8351 *-*-cygwin* )
Chris@82 8352 lt_cv_to_host_file_cmd=func_convert_file_noop
Chris@82 8353 ;;
Chris@82 8354 * ) # otherwise, assume *nix
Chris@82 8355 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
Chris@82 8356 ;;
Chris@82 8357 esac
Chris@82 8358 ;;
Chris@82 8359 * ) # unhandled hosts (and "normal" native builds)
Chris@82 8360 lt_cv_to_host_file_cmd=func_convert_file_noop
Chris@82 8361 ;;
Chris@82 8362 esac
Chris@82 8363 ])
Chris@82 8364 to_host_file_cmd=$lt_cv_to_host_file_cmd
Chris@82 8365 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
Chris@82 8366 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
Chris@82 8367 [0], [convert $build file names to $host format])dnl
Chris@82 8368
Chris@82 8369 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
Chris@82 8370 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
Chris@82 8371 [#assume ordinary cross tools, or native build.
Chris@82 8372 lt_cv_to_tool_file_cmd=func_convert_file_noop
Chris@82 8373 case $host in
Chris@82 8374 *-*-mingw* )
Chris@82 8375 case $build in
Chris@82 8376 *-*-mingw* ) # actually msys
Chris@82 8377 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
Chris@82 8378 ;;
Chris@82 8379 esac
Chris@82 8380 ;;
Chris@82 8381 esac
Chris@82 8382 ])
Chris@82 8383 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
Chris@82 8384 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
Chris@82 8385 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
Chris@82 8386 [0], [convert $build files to toolchain format])dnl
Chris@82 8387 ])# _LT_PATH_CONVERSION_FUNCTIONS