annotate src/libsndfile-1.0.27/M4/libtool.m4 @ 148:b4bfdf10c4b3

Update Win64 capnp builds to v0.6
author Chris Cannam <cannam@all-day-breakfast.com>
date Mon, 22 May 2017 18:56:49 +0100
parents cd6cdf86811e
children
rev   line source
cannam@125 1 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
cannam@125 2 #
cannam@125 3 # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
cannam@125 4 # Written by Gordon Matzigkeit, 1996
cannam@125 5 #
cannam@125 6 # This file is free software; the Free Software Foundation gives
cannam@125 7 # unlimited permission to copy and/or distribute it, with or without
cannam@125 8 # modifications, as long as this notice is preserved.
cannam@125 9
cannam@125 10 m4_define([_LT_COPYING], [dnl
cannam@125 11 # Copyright (C) 2014 Free Software Foundation, Inc.
cannam@125 12 # This is free software; see the source for copying conditions. There is NO
cannam@125 13 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
cannam@125 14
cannam@125 15 # GNU Libtool is free software; you can redistribute it and/or modify
cannam@125 16 # it under the terms of the GNU General Public License as published by
cannam@125 17 # the Free Software Foundation; either version 2 of of the License, or
cannam@125 18 # (at your option) any later version.
cannam@125 19 #
cannam@125 20 # As a special exception to the GNU General Public License, if you
cannam@125 21 # distribute this file as part of a program or library that is built
cannam@125 22 # using GNU Libtool, you may include this file under the same
cannam@125 23 # distribution terms that you use for the rest of that program.
cannam@125 24 #
cannam@125 25 # GNU Libtool is distributed in the hope that it will be useful, but
cannam@125 26 # WITHOUT ANY WARRANTY; without even the implied warranty of
cannam@125 27 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cannam@125 28 # GNU General Public License for more details.
cannam@125 29 #
cannam@125 30 # You should have received a copy of the GNU General Public License
cannam@125 31 # along with this program. If not, see <http://www.gnu.org/licenses/>.
cannam@125 32 ])
cannam@125 33
cannam@125 34 # serial 58 LT_INIT
cannam@125 35
cannam@125 36
cannam@125 37 # LT_PREREQ(VERSION)
cannam@125 38 # ------------------
cannam@125 39 # Complain and exit if this libtool version is less that VERSION.
cannam@125 40 m4_defun([LT_PREREQ],
cannam@125 41 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
cannam@125 42 [m4_default([$3],
cannam@125 43 [m4_fatal([Libtool version $1 or higher is required],
cannam@125 44 63)])],
cannam@125 45 [$2])])
cannam@125 46
cannam@125 47
cannam@125 48 # _LT_CHECK_BUILDDIR
cannam@125 49 # ------------------
cannam@125 50 # Complain if the absolute build directory name contains unusual characters
cannam@125 51 m4_defun([_LT_CHECK_BUILDDIR],
cannam@125 52 [case `pwd` in
cannam@125 53 *\ * | *\ *)
cannam@125 54 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
cannam@125 55 esac
cannam@125 56 ])
cannam@125 57
cannam@125 58
cannam@125 59 # LT_INIT([OPTIONS])
cannam@125 60 # ------------------
cannam@125 61 AC_DEFUN([LT_INIT],
cannam@125 62 [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
cannam@125 63 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
cannam@125 64 AC_BEFORE([$0], [LT_LANG])dnl
cannam@125 65 AC_BEFORE([$0], [LT_OUTPUT])dnl
cannam@125 66 AC_BEFORE([$0], [LTDL_INIT])dnl
cannam@125 67 m4_require([_LT_CHECK_BUILDDIR])dnl
cannam@125 68
cannam@125 69 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
cannam@125 70 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
cannam@125 71 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
cannam@125 72 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
cannam@125 73 dnl unless we require an AC_DEFUNed macro:
cannam@125 74 AC_REQUIRE([LTOPTIONS_VERSION])dnl
cannam@125 75 AC_REQUIRE([LTSUGAR_VERSION])dnl
cannam@125 76 AC_REQUIRE([LTVERSION_VERSION])dnl
cannam@125 77 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
cannam@125 78 m4_require([_LT_PROG_LTMAIN])dnl
cannam@125 79
cannam@125 80 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
cannam@125 81
cannam@125 82 dnl Parse OPTIONS
cannam@125 83 _LT_SET_OPTIONS([$0], [$1])
cannam@125 84
cannam@125 85 # This can be used to rebuild libtool when needed
cannam@125 86 LIBTOOL_DEPS=$ltmain
cannam@125 87
cannam@125 88 # Always use our own libtool.
cannam@125 89 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
cannam@125 90 AC_SUBST(LIBTOOL)dnl
cannam@125 91
cannam@125 92 _LT_SETUP
cannam@125 93
cannam@125 94 # Only expand once:
cannam@125 95 m4_define([LT_INIT])
cannam@125 96 ])# LT_INIT
cannam@125 97
cannam@125 98 # Old names:
cannam@125 99 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
cannam@125 100 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
cannam@125 101 dnl aclocal-1.4 backwards compatibility:
cannam@125 102 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
cannam@125 103 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
cannam@125 104
cannam@125 105
cannam@125 106 # _LT_PREPARE_CC_BASENAME
cannam@125 107 # -----------------------
cannam@125 108 m4_defun([_LT_PREPARE_CC_BASENAME], [
cannam@125 109 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
cannam@125 110 func_cc_basename ()
cannam@125 111 {
cannam@125 112 for cc_temp in @S|@*""; do
cannam@125 113 case $cc_temp in
cannam@125 114 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
cannam@125 115 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
cannam@125 116 \-*) ;;
cannam@125 117 *) break;;
cannam@125 118 esac
cannam@125 119 done
cannam@125 120 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
cannam@125 121 }
cannam@125 122 ])# _LT_PREPARE_CC_BASENAME
cannam@125 123
cannam@125 124
cannam@125 125 # _LT_CC_BASENAME(CC)
cannam@125 126 # -------------------
cannam@125 127 # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
cannam@125 128 # but that macro is also expanded into generated libtool script, which
cannam@125 129 # arranges for $SED and $ECHO to be set by different means.
cannam@125 130 m4_defun([_LT_CC_BASENAME],
cannam@125 131 [m4_require([_LT_PREPARE_CC_BASENAME])dnl
cannam@125 132 AC_REQUIRE([_LT_DECL_SED])dnl
cannam@125 133 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
cannam@125 134 func_cc_basename $1
cannam@125 135 cc_basename=$func_cc_basename_result
cannam@125 136 ])
cannam@125 137
cannam@125 138
cannam@125 139 # _LT_FILEUTILS_DEFAULTS
cannam@125 140 # ----------------------
cannam@125 141 # It is okay to use these file commands and assume they have been set
cannam@125 142 # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
cannam@125 143 m4_defun([_LT_FILEUTILS_DEFAULTS],
cannam@125 144 [: ${CP="cp -f"}
cannam@125 145 : ${MV="mv -f"}
cannam@125 146 : ${RM="rm -f"}
cannam@125 147 ])# _LT_FILEUTILS_DEFAULTS
cannam@125 148
cannam@125 149
cannam@125 150 # _LT_SETUP
cannam@125 151 # ---------
cannam@125 152 m4_defun([_LT_SETUP],
cannam@125 153 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
cannam@125 154 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
cannam@125 155 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
cannam@125 156 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
cannam@125 157
cannam@125 158 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
cannam@125 159 dnl
cannam@125 160 _LT_DECL([], [host_alias], [0], [The host system])dnl
cannam@125 161 _LT_DECL([], [host], [0])dnl
cannam@125 162 _LT_DECL([], [host_os], [0])dnl
cannam@125 163 dnl
cannam@125 164 _LT_DECL([], [build_alias], [0], [The build system])dnl
cannam@125 165 _LT_DECL([], [build], [0])dnl
cannam@125 166 _LT_DECL([], [build_os], [0])dnl
cannam@125 167 dnl
cannam@125 168 AC_REQUIRE([AC_PROG_CC])dnl
cannam@125 169 AC_REQUIRE([LT_PATH_LD])dnl
cannam@125 170 AC_REQUIRE([LT_PATH_NM])dnl
cannam@125 171 dnl
cannam@125 172 AC_REQUIRE([AC_PROG_LN_S])dnl
cannam@125 173 test -z "$LN_S" && LN_S="ln -s"
cannam@125 174 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
cannam@125 175 dnl
cannam@125 176 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
cannam@125 177 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
cannam@125 178 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
cannam@125 179 dnl
cannam@125 180 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@125 181 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
cannam@125 182 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
cannam@125 183 m4_require([_LT_CMD_RELOAD])dnl
cannam@125 184 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
cannam@125 185 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
cannam@125 186 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
cannam@125 187 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
cannam@125 188 m4_require([_LT_WITH_SYSROOT])dnl
cannam@125 189 m4_require([_LT_CMD_TRUNCATE])dnl
cannam@125 190
cannam@125 191 _LT_CONFIG_LIBTOOL_INIT([
cannam@125 192 # See if we are running on zsh, and set the options that allow our
cannam@125 193 # commands through without removal of \ escapes INIT.
cannam@125 194 if test -n "\${ZSH_VERSION+set}"; then
cannam@125 195 setopt NO_GLOB_SUBST
cannam@125 196 fi
cannam@125 197 ])
cannam@125 198 if test -n "${ZSH_VERSION+set}"; then
cannam@125 199 setopt NO_GLOB_SUBST
cannam@125 200 fi
cannam@125 201
cannam@125 202 _LT_CHECK_OBJDIR
cannam@125 203
cannam@125 204 m4_require([_LT_TAG_COMPILER])dnl
cannam@125 205
cannam@125 206 case $host_os in
cannam@125 207 aix3*)
cannam@125 208 # AIX sometimes has problems with the GCC collect2 program. For some
cannam@125 209 # reason, if we set the COLLECT_NAMES environment variable, the problems
cannam@125 210 # vanish in a puff of smoke.
cannam@125 211 if test set != "${COLLECT_NAMES+set}"; then
cannam@125 212 COLLECT_NAMES=
cannam@125 213 export COLLECT_NAMES
cannam@125 214 fi
cannam@125 215 ;;
cannam@125 216 esac
cannam@125 217
cannam@125 218 # Global variables:
cannam@125 219 ofile=libtool
cannam@125 220 can_build_shared=yes
cannam@125 221
cannam@125 222 # All known linkers require a '.a' archive for static linking (except MSVC,
cannam@125 223 # which needs '.lib').
cannam@125 224 libext=a
cannam@125 225
cannam@125 226 with_gnu_ld=$lt_cv_prog_gnu_ld
cannam@125 227
cannam@125 228 old_CC=$CC
cannam@125 229 old_CFLAGS=$CFLAGS
cannam@125 230
cannam@125 231 # Set sane defaults for various variables
cannam@125 232 test -z "$CC" && CC=cc
cannam@125 233 test -z "$LTCC" && LTCC=$CC
cannam@125 234 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
cannam@125 235 test -z "$LD" && LD=ld
cannam@125 236 test -z "$ac_objext" && ac_objext=o
cannam@125 237
cannam@125 238 _LT_CC_BASENAME([$compiler])
cannam@125 239
cannam@125 240 # Only perform the check for file, if the check method requires it
cannam@125 241 test -z "$MAGIC_CMD" && MAGIC_CMD=file
cannam@125 242 case $deplibs_check_method in
cannam@125 243 file_magic*)
cannam@125 244 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
cannam@125 245 _LT_PATH_MAGIC
cannam@125 246 fi
cannam@125 247 ;;
cannam@125 248 esac
cannam@125 249
cannam@125 250 # Use C for the default configuration in the libtool script
cannam@125 251 LT_SUPPORTED_TAG([CC])
cannam@125 252 _LT_LANG_C_CONFIG
cannam@125 253 _LT_LANG_DEFAULT_CONFIG
cannam@125 254 _LT_CONFIG_COMMANDS
cannam@125 255 ])# _LT_SETUP
cannam@125 256
cannam@125 257
cannam@125 258 # _LT_PREPARE_SED_QUOTE_VARS
cannam@125 259 # --------------------------
cannam@125 260 # Define a few sed substitution that help us do robust quoting.
cannam@125 261 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
cannam@125 262 [# Backslashify metacharacters that are still active within
cannam@125 263 # double-quoted strings.
cannam@125 264 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
cannam@125 265
cannam@125 266 # Same as above, but do not quote variable references.
cannam@125 267 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
cannam@125 268
cannam@125 269 # Sed substitution to delay expansion of an escaped shell variable in a
cannam@125 270 # double_quote_subst'ed string.
cannam@125 271 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
cannam@125 272
cannam@125 273 # Sed substitution to delay expansion of an escaped single quote.
cannam@125 274 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
cannam@125 275
cannam@125 276 # Sed substitution to avoid accidental globbing in evaled expressions
cannam@125 277 no_glob_subst='s/\*/\\\*/g'
cannam@125 278 ])
cannam@125 279
cannam@125 280 # _LT_PROG_LTMAIN
cannam@125 281 # ---------------
cannam@125 282 # Note that this code is called both from 'configure', and 'config.status'
cannam@125 283 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
cannam@125 284 # 'config.status' has no value for ac_aux_dir unless we are using Automake,
cannam@125 285 # so we pass a copy along to make sure it has a sensible value anyway.
cannam@125 286 m4_defun([_LT_PROG_LTMAIN],
cannam@125 287 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
cannam@125 288 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
cannam@125 289 ltmain=$ac_aux_dir/ltmain.sh
cannam@125 290 ])# _LT_PROG_LTMAIN
cannam@125 291
cannam@125 292
cannam@125 293 ## ------------------------------------- ##
cannam@125 294 ## Accumulate code for creating libtool. ##
cannam@125 295 ## ------------------------------------- ##
cannam@125 296
cannam@125 297 # So that we can recreate a full libtool script including additional
cannam@125 298 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
cannam@125 299 # in macros and then make a single call at the end using the 'libtool'
cannam@125 300 # label.
cannam@125 301
cannam@125 302
cannam@125 303 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
cannam@125 304 # ----------------------------------------
cannam@125 305 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
cannam@125 306 m4_define([_LT_CONFIG_LIBTOOL_INIT],
cannam@125 307 [m4_ifval([$1],
cannam@125 308 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
cannam@125 309 [$1
cannam@125 310 ])])])
cannam@125 311
cannam@125 312 # Initialize.
cannam@125 313 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
cannam@125 314
cannam@125 315
cannam@125 316 # _LT_CONFIG_LIBTOOL([COMMANDS])
cannam@125 317 # ------------------------------
cannam@125 318 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
cannam@125 319 m4_define([_LT_CONFIG_LIBTOOL],
cannam@125 320 [m4_ifval([$1],
cannam@125 321 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
cannam@125 322 [$1
cannam@125 323 ])])])
cannam@125 324
cannam@125 325 # Initialize.
cannam@125 326 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
cannam@125 327
cannam@125 328
cannam@125 329 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
cannam@125 330 # -----------------------------------------------------
cannam@125 331 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
cannam@125 332 [_LT_CONFIG_LIBTOOL([$1])
cannam@125 333 _LT_CONFIG_LIBTOOL_INIT([$2])
cannam@125 334 ])
cannam@125 335
cannam@125 336
cannam@125 337 # _LT_FORMAT_COMMENT([COMMENT])
cannam@125 338 # -----------------------------
cannam@125 339 # Add leading comment marks to the start of each line, and a trailing
cannam@125 340 # full-stop to the whole comment if one is not present already.
cannam@125 341 m4_define([_LT_FORMAT_COMMENT],
cannam@125 342 [m4_ifval([$1], [
cannam@125 343 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
cannam@125 344 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
cannam@125 345 )])
cannam@125 346
cannam@125 347
cannam@125 348
cannam@125 349 ## ------------------------ ##
cannam@125 350 ## FIXME: Eliminate VARNAME ##
cannam@125 351 ## ------------------------ ##
cannam@125 352
cannam@125 353
cannam@125 354 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
cannam@125 355 # -------------------------------------------------------------------
cannam@125 356 # CONFIGNAME is the name given to the value in the libtool script.
cannam@125 357 # VARNAME is the (base) name used in the configure script.
cannam@125 358 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
cannam@125 359 # VARNAME. Any other value will be used directly.
cannam@125 360 m4_define([_LT_DECL],
cannam@125 361 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
cannam@125 362 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
cannam@125 363 [m4_ifval([$1], [$1], [$2])])
cannam@125 364 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
cannam@125 365 m4_ifval([$4],
cannam@125 366 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
cannam@125 367 lt_dict_add_subkey([lt_decl_dict], [$2],
cannam@125 368 [tagged?], [m4_ifval([$5], [yes], [no])])])
cannam@125 369 ])
cannam@125 370
cannam@125 371
cannam@125 372 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
cannam@125 373 # --------------------------------------------------------
cannam@125 374 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
cannam@125 375
cannam@125 376
cannam@125 377 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
cannam@125 378 # ------------------------------------------------
cannam@125 379 m4_define([lt_decl_tag_varnames],
cannam@125 380 [_lt_decl_filter([tagged?], [yes], $@)])
cannam@125 381
cannam@125 382
cannam@125 383 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
cannam@125 384 # ---------------------------------------------------------
cannam@125 385 m4_define([_lt_decl_filter],
cannam@125 386 [m4_case([$#],
cannam@125 387 [0], [m4_fatal([$0: too few arguments: $#])],
cannam@125 388 [1], [m4_fatal([$0: too few arguments: $#: $1])],
cannam@125 389 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
cannam@125 390 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
cannam@125 391 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
cannam@125 392 ])
cannam@125 393
cannam@125 394
cannam@125 395 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
cannam@125 396 # --------------------------------------------------
cannam@125 397 m4_define([lt_decl_quote_varnames],
cannam@125 398 [_lt_decl_filter([value], [1], $@)])
cannam@125 399
cannam@125 400
cannam@125 401 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
cannam@125 402 # ---------------------------------------------------
cannam@125 403 m4_define([lt_decl_dquote_varnames],
cannam@125 404 [_lt_decl_filter([value], [2], $@)])
cannam@125 405
cannam@125 406
cannam@125 407 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
cannam@125 408 # ---------------------------------------------------
cannam@125 409 m4_define([lt_decl_varnames_tagged],
cannam@125 410 [m4_assert([$# <= 2])dnl
cannam@125 411 _$0(m4_quote(m4_default([$1], [[, ]])),
cannam@125 412 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
cannam@125 413 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
cannam@125 414 m4_define([_lt_decl_varnames_tagged],
cannam@125 415 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
cannam@125 416
cannam@125 417
cannam@125 418 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
cannam@125 419 # ------------------------------------------------
cannam@125 420 m4_define([lt_decl_all_varnames],
cannam@125 421 [_$0(m4_quote(m4_default([$1], [[, ]])),
cannam@125 422 m4_if([$2], [],
cannam@125 423 m4_quote(lt_decl_varnames),
cannam@125 424 m4_quote(m4_shift($@))))[]dnl
cannam@125 425 ])
cannam@125 426 m4_define([_lt_decl_all_varnames],
cannam@125 427 [lt_join($@, lt_decl_varnames_tagged([$1],
cannam@125 428 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
cannam@125 429 ])
cannam@125 430
cannam@125 431
cannam@125 432 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
cannam@125 433 # ------------------------------------
cannam@125 434 # Quote a variable value, and forward it to 'config.status' so that its
cannam@125 435 # declaration there will have the same value as in 'configure'. VARNAME
cannam@125 436 # must have a single quote delimited value for this to work.
cannam@125 437 m4_define([_LT_CONFIG_STATUS_DECLARE],
cannam@125 438 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
cannam@125 439
cannam@125 440
cannam@125 441 # _LT_CONFIG_STATUS_DECLARATIONS
cannam@125 442 # ------------------------------
cannam@125 443 # We delimit libtool config variables with single quotes, so when
cannam@125 444 # we write them to config.status, we have to be sure to quote all
cannam@125 445 # embedded single quotes properly. In configure, this macro expands
cannam@125 446 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
cannam@125 447 #
cannam@125 448 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
cannam@125 449 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
cannam@125 450 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
cannam@125 451 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
cannam@125 452
cannam@125 453
cannam@125 454 # _LT_LIBTOOL_TAGS
cannam@125 455 # ----------------
cannam@125 456 # Output comment and list of tags supported by the script
cannam@125 457 m4_defun([_LT_LIBTOOL_TAGS],
cannam@125 458 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
cannam@125 459 available_tags='_LT_TAGS'dnl
cannam@125 460 ])
cannam@125 461
cannam@125 462
cannam@125 463 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
cannam@125 464 # -----------------------------------
cannam@125 465 # Extract the dictionary values for VARNAME (optionally with TAG) and
cannam@125 466 # expand to a commented shell variable setting:
cannam@125 467 #
cannam@125 468 # # Some comment about what VAR is for.
cannam@125 469 # visible_name=$lt_internal_name
cannam@125 470 m4_define([_LT_LIBTOOL_DECLARE],
cannam@125 471 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
cannam@125 472 [description])))[]dnl
cannam@125 473 m4_pushdef([_libtool_name],
cannam@125 474 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
cannam@125 475 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
cannam@125 476 [0], [_libtool_name=[$]$1],
cannam@125 477 [1], [_libtool_name=$lt_[]$1],
cannam@125 478 [2], [_libtool_name=$lt_[]$1],
cannam@125 479 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
cannam@125 480 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
cannam@125 481 ])
cannam@125 482
cannam@125 483
cannam@125 484 # _LT_LIBTOOL_CONFIG_VARS
cannam@125 485 # -----------------------
cannam@125 486 # Produce commented declarations of non-tagged libtool config variables
cannam@125 487 # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
cannam@125 488 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
cannam@125 489 # section) are produced by _LT_LIBTOOL_TAG_VARS.
cannam@125 490 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
cannam@125 491 [m4_foreach([_lt_var],
cannam@125 492 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
cannam@125 493 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
cannam@125 494
cannam@125 495
cannam@125 496 # _LT_LIBTOOL_TAG_VARS(TAG)
cannam@125 497 # -------------------------
cannam@125 498 m4_define([_LT_LIBTOOL_TAG_VARS],
cannam@125 499 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
cannam@125 500 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
cannam@125 501
cannam@125 502
cannam@125 503 # _LT_TAGVAR(VARNAME, [TAGNAME])
cannam@125 504 # ------------------------------
cannam@125 505 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
cannam@125 506
cannam@125 507
cannam@125 508 # _LT_CONFIG_COMMANDS
cannam@125 509 # -------------------
cannam@125 510 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
cannam@125 511 # variables for single and double quote escaping we saved from calls
cannam@125 512 # to _LT_DECL, we can put quote escaped variables declarations
cannam@125 513 # into 'config.status', and then the shell code to quote escape them in
cannam@125 514 # for loops in 'config.status'. Finally, any additional code accumulated
cannam@125 515 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
cannam@125 516 m4_defun([_LT_CONFIG_COMMANDS],
cannam@125 517 [AC_PROVIDE_IFELSE([LT_OUTPUT],
cannam@125 518 dnl If the libtool generation code has been placed in $CONFIG_LT,
cannam@125 519 dnl instead of duplicating it all over again into config.status,
cannam@125 520 dnl then we will have config.status run $CONFIG_LT later, so it
cannam@125 521 dnl needs to know what name is stored there:
cannam@125 522 [AC_CONFIG_COMMANDS([libtool],
cannam@125 523 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
cannam@125 524 dnl If the libtool generation code is destined for config.status,
cannam@125 525 dnl expand the accumulated commands and init code now:
cannam@125 526 [AC_CONFIG_COMMANDS([libtool],
cannam@125 527 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
cannam@125 528 ])#_LT_CONFIG_COMMANDS
cannam@125 529
cannam@125 530
cannam@125 531 # Initialize.
cannam@125 532 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
cannam@125 533 [
cannam@125 534
cannam@125 535 # The HP-UX ksh and POSIX shell print the target directory to stdout
cannam@125 536 # if CDPATH is set.
cannam@125 537 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
cannam@125 538
cannam@125 539 sed_quote_subst='$sed_quote_subst'
cannam@125 540 double_quote_subst='$double_quote_subst'
cannam@125 541 delay_variable_subst='$delay_variable_subst'
cannam@125 542 _LT_CONFIG_STATUS_DECLARATIONS
cannam@125 543 LTCC='$LTCC'
cannam@125 544 LTCFLAGS='$LTCFLAGS'
cannam@125 545 compiler='$compiler_DEFAULT'
cannam@125 546
cannam@125 547 # A function that is used when there is no print builtin or printf.
cannam@125 548 func_fallback_echo ()
cannam@125 549 {
cannam@125 550 eval 'cat <<_LTECHO_EOF
cannam@125 551 \$[]1
cannam@125 552 _LTECHO_EOF'
cannam@125 553 }
cannam@125 554
cannam@125 555 # Quote evaled strings.
cannam@125 556 for var in lt_decl_all_varnames([[ \
cannam@125 557 ]], lt_decl_quote_varnames); do
cannam@125 558 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
cannam@125 559 *[[\\\\\\\`\\"\\\$]]*)
cannam@125 560 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
cannam@125 561 ;;
cannam@125 562 *)
cannam@125 563 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
cannam@125 564 ;;
cannam@125 565 esac
cannam@125 566 done
cannam@125 567
cannam@125 568 # Double-quote double-evaled strings.
cannam@125 569 for var in lt_decl_all_varnames([[ \
cannam@125 570 ]], lt_decl_dquote_varnames); do
cannam@125 571 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
cannam@125 572 *[[\\\\\\\`\\"\\\$]]*)
cannam@125 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
cannam@125 574 ;;
cannam@125 575 *)
cannam@125 576 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
cannam@125 577 ;;
cannam@125 578 esac
cannam@125 579 done
cannam@125 580
cannam@125 581 _LT_OUTPUT_LIBTOOL_INIT
cannam@125 582 ])
cannam@125 583
cannam@125 584 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
cannam@125 585 # ------------------------------------
cannam@125 586 # Generate a child script FILE with all initialization necessary to
cannam@125 587 # reuse the environment learned by the parent script, and make the
cannam@125 588 # file executable. If COMMENT is supplied, it is inserted after the
cannam@125 589 # '#!' sequence but before initialization text begins. After this
cannam@125 590 # macro, additional text can be appended to FILE to form the body of
cannam@125 591 # the child script. The macro ends with non-zero status if the
cannam@125 592 # file could not be fully written (such as if the disk is full).
cannam@125 593 m4_ifdef([AS_INIT_GENERATED],
cannam@125 594 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
cannam@125 595 [m4_defun([_LT_GENERATED_FILE_INIT],
cannam@125 596 [m4_require([AS_PREPARE])]dnl
cannam@125 597 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
cannam@125 598 [lt_write_fail=0
cannam@125 599 cat >$1 <<_ASEOF || lt_write_fail=1
cannam@125 600 #! $SHELL
cannam@125 601 # Generated by $as_me.
cannam@125 602 $2
cannam@125 603 SHELL=\${CONFIG_SHELL-$SHELL}
cannam@125 604 export SHELL
cannam@125 605 _ASEOF
cannam@125 606 cat >>$1 <<\_ASEOF || lt_write_fail=1
cannam@125 607 AS_SHELL_SANITIZE
cannam@125 608 _AS_PREPARE
cannam@125 609 exec AS_MESSAGE_FD>&1
cannam@125 610 _ASEOF
cannam@125 611 test 0 = "$lt_write_fail" && chmod +x $1[]dnl
cannam@125 612 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
cannam@125 613
cannam@125 614 # LT_OUTPUT
cannam@125 615 # ---------
cannam@125 616 # This macro allows early generation of the libtool script (before
cannam@125 617 # AC_OUTPUT is called), incase it is used in configure for compilation
cannam@125 618 # tests.
cannam@125 619 AC_DEFUN([LT_OUTPUT],
cannam@125 620 [: ${CONFIG_LT=./config.lt}
cannam@125 621 AC_MSG_NOTICE([creating $CONFIG_LT])
cannam@125 622 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
cannam@125 623 [# Run this file to recreate a libtool stub with the current configuration.])
cannam@125 624
cannam@125 625 cat >>"$CONFIG_LT" <<\_LTEOF
cannam@125 626 lt_cl_silent=false
cannam@125 627 exec AS_MESSAGE_LOG_FD>>config.log
cannam@125 628 {
cannam@125 629 echo
cannam@125 630 AS_BOX([Running $as_me.])
cannam@125 631 } >&AS_MESSAGE_LOG_FD
cannam@125 632
cannam@125 633 lt_cl_help="\
cannam@125 634 '$as_me' creates a local libtool stub from the current configuration,
cannam@125 635 for use in further configure time tests before the real libtool is
cannam@125 636 generated.
cannam@125 637
cannam@125 638 Usage: $[0] [[OPTIONS]]
cannam@125 639
cannam@125 640 -h, --help print this help, then exit
cannam@125 641 -V, --version print version number, then exit
cannam@125 642 -q, --quiet do not print progress messages
cannam@125 643 -d, --debug don't remove temporary files
cannam@125 644
cannam@125 645 Report bugs to <bug-libtool@gnu.org>."
cannam@125 646
cannam@125 647 lt_cl_version="\
cannam@125 648 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
cannam@125 649 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
cannam@125 650 configured by $[0], generated by m4_PACKAGE_STRING.
cannam@125 651
cannam@125 652 Copyright (C) 2011 Free Software Foundation, Inc.
cannam@125 653 This config.lt script is free software; the Free Software Foundation
cannam@125 654 gives unlimited permision to copy, distribute and modify it."
cannam@125 655
cannam@125 656 while test 0 != $[#]
cannam@125 657 do
cannam@125 658 case $[1] in
cannam@125 659 --version | --v* | -V )
cannam@125 660 echo "$lt_cl_version"; exit 0 ;;
cannam@125 661 --help | --h* | -h )
cannam@125 662 echo "$lt_cl_help"; exit 0 ;;
cannam@125 663 --debug | --d* | -d )
cannam@125 664 debug=: ;;
cannam@125 665 --quiet | --q* | --silent | --s* | -q )
cannam@125 666 lt_cl_silent=: ;;
cannam@125 667
cannam@125 668 -*) AC_MSG_ERROR([unrecognized option: $[1]
cannam@125 669 Try '$[0] --help' for more information.]) ;;
cannam@125 670
cannam@125 671 *) AC_MSG_ERROR([unrecognized argument: $[1]
cannam@125 672 Try '$[0] --help' for more information.]) ;;
cannam@125 673 esac
cannam@125 674 shift
cannam@125 675 done
cannam@125 676
cannam@125 677 if $lt_cl_silent; then
cannam@125 678 exec AS_MESSAGE_FD>/dev/null
cannam@125 679 fi
cannam@125 680 _LTEOF
cannam@125 681
cannam@125 682 cat >>"$CONFIG_LT" <<_LTEOF
cannam@125 683 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
cannam@125 684 _LTEOF
cannam@125 685
cannam@125 686 cat >>"$CONFIG_LT" <<\_LTEOF
cannam@125 687 AC_MSG_NOTICE([creating $ofile])
cannam@125 688 _LT_OUTPUT_LIBTOOL_COMMANDS
cannam@125 689 AS_EXIT(0)
cannam@125 690 _LTEOF
cannam@125 691 chmod +x "$CONFIG_LT"
cannam@125 692
cannam@125 693 # configure is writing to config.log, but config.lt does its own redirection,
cannam@125 694 # appending to config.log, which fails on DOS, as config.log is still kept
cannam@125 695 # open by configure. Here we exec the FD to /dev/null, effectively closing
cannam@125 696 # config.log, so it can be properly (re)opened and appended to by config.lt.
cannam@125 697 lt_cl_success=:
cannam@125 698 test yes = "$silent" &&
cannam@125 699 lt_config_lt_args="$lt_config_lt_args --quiet"
cannam@125 700 exec AS_MESSAGE_LOG_FD>/dev/null
cannam@125 701 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
cannam@125 702 exec AS_MESSAGE_LOG_FD>>config.log
cannam@125 703 $lt_cl_success || AS_EXIT(1)
cannam@125 704 ])# LT_OUTPUT
cannam@125 705
cannam@125 706
cannam@125 707 # _LT_CONFIG(TAG)
cannam@125 708 # ---------------
cannam@125 709 # If TAG is the built-in tag, create an initial libtool script with a
cannam@125 710 # default configuration from the untagged config vars. Otherwise add code
cannam@125 711 # to config.status for appending the configuration named by TAG from the
cannam@125 712 # matching tagged config vars.
cannam@125 713 m4_defun([_LT_CONFIG],
cannam@125 714 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@125 715 _LT_CONFIG_SAVE_COMMANDS([
cannam@125 716 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
cannam@125 717 m4_if(_LT_TAG, [C], [
cannam@125 718 # See if we are running on zsh, and set the options that allow our
cannam@125 719 # commands through without removal of \ escapes.
cannam@125 720 if test -n "${ZSH_VERSION+set}"; then
cannam@125 721 setopt NO_GLOB_SUBST
cannam@125 722 fi
cannam@125 723
cannam@125 724 cfgfile=${ofile}T
cannam@125 725 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
cannam@125 726 $RM "$cfgfile"
cannam@125 727
cannam@125 728 cat <<_LT_EOF >> "$cfgfile"
cannam@125 729 #! $SHELL
cannam@125 730 # Generated automatically by $as_me ($PACKAGE) $VERSION
cannam@125 731 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
cannam@125 732 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
cannam@125 733
cannam@125 734 # Provide generalized library-building support services.
cannam@125 735 # Written by Gordon Matzigkeit, 1996
cannam@125 736
cannam@125 737 _LT_COPYING
cannam@125 738 _LT_LIBTOOL_TAGS
cannam@125 739
cannam@125 740 # Configured defaults for sys_lib_dlsearch_path munging.
cannam@125 741 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
cannam@125 742
cannam@125 743 # ### BEGIN LIBTOOL CONFIG
cannam@125 744 _LT_LIBTOOL_CONFIG_VARS
cannam@125 745 _LT_LIBTOOL_TAG_VARS
cannam@125 746 # ### END LIBTOOL CONFIG
cannam@125 747
cannam@125 748 _LT_EOF
cannam@125 749
cannam@125 750 cat <<'_LT_EOF' >> "$cfgfile"
cannam@125 751
cannam@125 752 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
cannam@125 753
cannam@125 754 _LT_PREPARE_MUNGE_PATH_LIST
cannam@125 755 _LT_PREPARE_CC_BASENAME
cannam@125 756
cannam@125 757 # ### END FUNCTIONS SHARED WITH CONFIGURE
cannam@125 758
cannam@125 759 _LT_EOF
cannam@125 760
cannam@125 761 case $host_os in
cannam@125 762 aix3*)
cannam@125 763 cat <<\_LT_EOF >> "$cfgfile"
cannam@125 764 # AIX sometimes has problems with the GCC collect2 program. For some
cannam@125 765 # reason, if we set the COLLECT_NAMES environment variable, the problems
cannam@125 766 # vanish in a puff of smoke.
cannam@125 767 if test set != "${COLLECT_NAMES+set}"; then
cannam@125 768 COLLECT_NAMES=
cannam@125 769 export COLLECT_NAMES
cannam@125 770 fi
cannam@125 771 _LT_EOF
cannam@125 772 ;;
cannam@125 773 esac
cannam@125 774
cannam@125 775 _LT_PROG_LTMAIN
cannam@125 776
cannam@125 777 # We use sed instead of cat because bash on DJGPP gets confused if
cannam@125 778 # if finds mixed CR/LF and LF-only lines. Since sed operates in
cannam@125 779 # text mode, it properly converts lines to CR/LF. This bash problem
cannam@125 780 # is reportedly fixed, but why not run on old versions too?
cannam@125 781 sed '$q' "$ltmain" >> "$cfgfile" \
cannam@125 782 || (rm -f "$cfgfile"; exit 1)
cannam@125 783
cannam@125 784 mv -f "$cfgfile" "$ofile" ||
cannam@125 785 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
cannam@125 786 chmod +x "$ofile"
cannam@125 787 ],
cannam@125 788 [cat <<_LT_EOF >> "$ofile"
cannam@125 789
cannam@125 790 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
cannam@125 791 dnl in a comment (ie after a #).
cannam@125 792 # ### BEGIN LIBTOOL TAG CONFIG: $1
cannam@125 793 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
cannam@125 794 # ### END LIBTOOL TAG CONFIG: $1
cannam@125 795 _LT_EOF
cannam@125 796 ])dnl /m4_if
cannam@125 797 ],
cannam@125 798 [m4_if([$1], [], [
cannam@125 799 PACKAGE='$PACKAGE'
cannam@125 800 VERSION='$VERSION'
cannam@125 801 RM='$RM'
cannam@125 802 ofile='$ofile'], [])
cannam@125 803 ])dnl /_LT_CONFIG_SAVE_COMMANDS
cannam@125 804 ])# _LT_CONFIG
cannam@125 805
cannam@125 806
cannam@125 807 # LT_SUPPORTED_TAG(TAG)
cannam@125 808 # ---------------------
cannam@125 809 # Trace this macro to discover what tags are supported by the libtool
cannam@125 810 # --tag option, using:
cannam@125 811 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
cannam@125 812 AC_DEFUN([LT_SUPPORTED_TAG], [])
cannam@125 813
cannam@125 814
cannam@125 815 # C support is built-in for now
cannam@125 816 m4_define([_LT_LANG_C_enabled], [])
cannam@125 817 m4_define([_LT_TAGS], [])
cannam@125 818
cannam@125 819
cannam@125 820 # LT_LANG(LANG)
cannam@125 821 # -------------
cannam@125 822 # Enable libtool support for the given language if not already enabled.
cannam@125 823 AC_DEFUN([LT_LANG],
cannam@125 824 [AC_BEFORE([$0], [LT_OUTPUT])dnl
cannam@125 825 m4_case([$1],
cannam@125 826 [C], [_LT_LANG(C)],
cannam@125 827 [C++], [_LT_LANG(CXX)],
cannam@125 828 [Go], [_LT_LANG(GO)],
cannam@125 829 [Java], [_LT_LANG(GCJ)],
cannam@125 830 [Fortran 77], [_LT_LANG(F77)],
cannam@125 831 [Fortran], [_LT_LANG(FC)],
cannam@125 832 [Windows Resource], [_LT_LANG(RC)],
cannam@125 833 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
cannam@125 834 [_LT_LANG($1)],
cannam@125 835 [m4_fatal([$0: unsupported language: "$1"])])])dnl
cannam@125 836 ])# LT_LANG
cannam@125 837
cannam@125 838
cannam@125 839 # _LT_LANG(LANGNAME)
cannam@125 840 # ------------------
cannam@125 841 m4_defun([_LT_LANG],
cannam@125 842 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
cannam@125 843 [LT_SUPPORTED_TAG([$1])dnl
cannam@125 844 m4_append([_LT_TAGS], [$1 ])dnl
cannam@125 845 m4_define([_LT_LANG_]$1[_enabled], [])dnl
cannam@125 846 _LT_LANG_$1_CONFIG($1)])dnl
cannam@125 847 ])# _LT_LANG
cannam@125 848
cannam@125 849
cannam@125 850 m4_ifndef([AC_PROG_GO], [
cannam@125 851 ############################################################
cannam@125 852 # NOTE: This macro has been submitted for inclusion into #
cannam@125 853 # GNU Autoconf as AC_PROG_GO. When it is available in #
cannam@125 854 # a released version of Autoconf we should remove this #
cannam@125 855 # macro and use it instead. #
cannam@125 856 ############################################################
cannam@125 857 m4_defun([AC_PROG_GO],
cannam@125 858 [AC_LANG_PUSH(Go)dnl
cannam@125 859 AC_ARG_VAR([GOC], [Go compiler command])dnl
cannam@125 860 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
cannam@125 861 _AC_ARG_VAR_LDFLAGS()dnl
cannam@125 862 AC_CHECK_TOOL(GOC, gccgo)
cannam@125 863 if test -z "$GOC"; then
cannam@125 864 if test -n "$ac_tool_prefix"; then
cannam@125 865 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
cannam@125 866 fi
cannam@125 867 fi
cannam@125 868 if test -z "$GOC"; then
cannam@125 869 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
cannam@125 870 fi
cannam@125 871 ])#m4_defun
cannam@125 872 ])#m4_ifndef
cannam@125 873
cannam@125 874
cannam@125 875 # _LT_LANG_DEFAULT_CONFIG
cannam@125 876 # -----------------------
cannam@125 877 m4_defun([_LT_LANG_DEFAULT_CONFIG],
cannam@125 878 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
cannam@125 879 [LT_LANG(CXX)],
cannam@125 880 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
cannam@125 881
cannam@125 882 AC_PROVIDE_IFELSE([AC_PROG_F77],
cannam@125 883 [LT_LANG(F77)],
cannam@125 884 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
cannam@125 885
cannam@125 886 AC_PROVIDE_IFELSE([AC_PROG_FC],
cannam@125 887 [LT_LANG(FC)],
cannam@125 888 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
cannam@125 889
cannam@125 890 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
cannam@125 891 dnl pulling things in needlessly.
cannam@125 892 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
cannam@125 893 [LT_LANG(GCJ)],
cannam@125 894 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
cannam@125 895 [LT_LANG(GCJ)],
cannam@125 896 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
cannam@125 897 [LT_LANG(GCJ)],
cannam@125 898 [m4_ifdef([AC_PROG_GCJ],
cannam@125 899 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
cannam@125 900 m4_ifdef([A][M_PROG_GCJ],
cannam@125 901 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
cannam@125 902 m4_ifdef([LT_PROG_GCJ],
cannam@125 903 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
cannam@125 904
cannam@125 905 AC_PROVIDE_IFELSE([AC_PROG_GO],
cannam@125 906 [LT_LANG(GO)],
cannam@125 907 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
cannam@125 908
cannam@125 909 AC_PROVIDE_IFELSE([LT_PROG_RC],
cannam@125 910 [LT_LANG(RC)],
cannam@125 911 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
cannam@125 912 ])# _LT_LANG_DEFAULT_CONFIG
cannam@125 913
cannam@125 914 # Obsolete macros:
cannam@125 915 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
cannam@125 916 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
cannam@125 917 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
cannam@125 918 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
cannam@125 919 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
cannam@125 920 dnl aclocal-1.4 backwards compatibility:
cannam@125 921 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
cannam@125 922 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
cannam@125 923 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
cannam@125 924 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
cannam@125 925 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
cannam@125 926
cannam@125 927
cannam@125 928 # _LT_TAG_COMPILER
cannam@125 929 # ----------------
cannam@125 930 m4_defun([_LT_TAG_COMPILER],
cannam@125 931 [AC_REQUIRE([AC_PROG_CC])dnl
cannam@125 932
cannam@125 933 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
cannam@125 934 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
cannam@125 935 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
cannam@125 936 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
cannam@125 937
cannam@125 938 # If no C compiler was specified, use CC.
cannam@125 939 LTCC=${LTCC-"$CC"}
cannam@125 940
cannam@125 941 # If no C compiler flags were specified, use CFLAGS.
cannam@125 942 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
cannam@125 943
cannam@125 944 # Allow CC to be a program name with arguments.
cannam@125 945 compiler=$CC
cannam@125 946 ])# _LT_TAG_COMPILER
cannam@125 947
cannam@125 948
cannam@125 949 # _LT_COMPILER_BOILERPLATE
cannam@125 950 # ------------------------
cannam@125 951 # Check for compiler boilerplate output or warnings with
cannam@125 952 # the simple compiler test code.
cannam@125 953 m4_defun([_LT_COMPILER_BOILERPLATE],
cannam@125 954 [m4_require([_LT_DECL_SED])dnl
cannam@125 955 ac_outfile=conftest.$ac_objext
cannam@125 956 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
cannam@125 957 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
cannam@125 958 _lt_compiler_boilerplate=`cat conftest.err`
cannam@125 959 $RM conftest*
cannam@125 960 ])# _LT_COMPILER_BOILERPLATE
cannam@125 961
cannam@125 962
cannam@125 963 # _LT_LINKER_BOILERPLATE
cannam@125 964 # ----------------------
cannam@125 965 # Check for linker boilerplate output or warnings with
cannam@125 966 # the simple link test code.
cannam@125 967 m4_defun([_LT_LINKER_BOILERPLATE],
cannam@125 968 [m4_require([_LT_DECL_SED])dnl
cannam@125 969 ac_outfile=conftest.$ac_objext
cannam@125 970 echo "$lt_simple_link_test_code" >conftest.$ac_ext
cannam@125 971 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
cannam@125 972 _lt_linker_boilerplate=`cat conftest.err`
cannam@125 973 $RM -r conftest*
cannam@125 974 ])# _LT_LINKER_BOILERPLATE
cannam@125 975
cannam@125 976 # _LT_REQUIRED_DARWIN_CHECKS
cannam@125 977 # -------------------------
cannam@125 978 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
cannam@125 979 case $host_os in
cannam@125 980 rhapsody* | darwin*)
cannam@125 981 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
cannam@125 982 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
cannam@125 983 AC_CHECK_TOOL([LIPO], [lipo], [:])
cannam@125 984 AC_CHECK_TOOL([OTOOL], [otool], [:])
cannam@125 985 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
cannam@125 986 _LT_DECL([], [DSYMUTIL], [1],
cannam@125 987 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
cannam@125 988 _LT_DECL([], [NMEDIT], [1],
cannam@125 989 [Tool to change global to local symbols on Mac OS X])
cannam@125 990 _LT_DECL([], [LIPO], [1],
cannam@125 991 [Tool to manipulate fat objects and archives on Mac OS X])
cannam@125 992 _LT_DECL([], [OTOOL], [1],
cannam@125 993 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
cannam@125 994 _LT_DECL([], [OTOOL64], [1],
cannam@125 995 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
cannam@125 996
cannam@125 997 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
cannam@125 998 [lt_cv_apple_cc_single_mod=no
cannam@125 999 if test -z "$LT_MULTI_MODULE"; then
cannam@125 1000 # By default we will add the -single_module flag. You can override
cannam@125 1001 # by either setting the environment variable LT_MULTI_MODULE
cannam@125 1002 # non-empty at configure time, or by adding -multi_module to the
cannam@125 1003 # link flags.
cannam@125 1004 rm -rf libconftest.dylib*
cannam@125 1005 echo "int foo(void){return 1;}" > conftest.c
cannam@125 1006 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
cannam@125 1007 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
cannam@125 1008 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
cannam@125 1009 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
cannam@125 1010 _lt_result=$?
cannam@125 1011 # If there is a non-empty error log, and "single_module"
cannam@125 1012 # appears in it, assume the flag caused a linker warning
cannam@125 1013 if test -s conftest.err && $GREP single_module conftest.err; then
cannam@125 1014 cat conftest.err >&AS_MESSAGE_LOG_FD
cannam@125 1015 # Otherwise, if the output was created with a 0 exit code from
cannam@125 1016 # the compiler, it worked.
cannam@125 1017 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
cannam@125 1018 lt_cv_apple_cc_single_mod=yes
cannam@125 1019 else
cannam@125 1020 cat conftest.err >&AS_MESSAGE_LOG_FD
cannam@125 1021 fi
cannam@125 1022 rm -rf libconftest.dylib*
cannam@125 1023 rm -f conftest.*
cannam@125 1024 fi])
cannam@125 1025
cannam@125 1026 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
cannam@125 1027 [lt_cv_ld_exported_symbols_list],
cannam@125 1028 [lt_cv_ld_exported_symbols_list=no
cannam@125 1029 save_LDFLAGS=$LDFLAGS
cannam@125 1030 echo "_main" > conftest.sym
cannam@125 1031 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
cannam@125 1032 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
cannam@125 1033 [lt_cv_ld_exported_symbols_list=yes],
cannam@125 1034 [lt_cv_ld_exported_symbols_list=no])
cannam@125 1035 LDFLAGS=$save_LDFLAGS
cannam@125 1036 ])
cannam@125 1037
cannam@125 1038 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
cannam@125 1039 [lt_cv_ld_force_load=no
cannam@125 1040 cat > conftest.c << _LT_EOF
cannam@125 1041 int forced_loaded() { return 2;}
cannam@125 1042 _LT_EOF
cannam@125 1043 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
cannam@125 1044 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
cannam@125 1045 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
cannam@125 1046 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
cannam@125 1047 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
cannam@125 1048 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
cannam@125 1049 cat > conftest.c << _LT_EOF
cannam@125 1050 int main() { return 0;}
cannam@125 1051 _LT_EOF
cannam@125 1052 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
cannam@125 1053 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
cannam@125 1054 _lt_result=$?
cannam@125 1055 if test -s conftest.err && $GREP force_load conftest.err; then
cannam@125 1056 cat conftest.err >&AS_MESSAGE_LOG_FD
cannam@125 1057 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
cannam@125 1058 lt_cv_ld_force_load=yes
cannam@125 1059 else
cannam@125 1060 cat conftest.err >&AS_MESSAGE_LOG_FD
cannam@125 1061 fi
cannam@125 1062 rm -f conftest.err libconftest.a conftest conftest.c
cannam@125 1063 rm -rf conftest.dSYM
cannam@125 1064 ])
cannam@125 1065 case $host_os in
cannam@125 1066 rhapsody* | darwin1.[[012]])
cannam@125 1067 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
cannam@125 1068 darwin1.*)
cannam@125 1069 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
cannam@125 1070 darwin*) # darwin 5.x on
cannam@125 1071 # if running on 10.5 or later, the deployment target defaults
cannam@125 1072 # to the OS version, if on x86, and 10.4, the deployment
cannam@125 1073 # target defaults to 10.4. Don't you love it?
cannam@125 1074 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
cannam@125 1075 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
cannam@125 1076 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
cannam@125 1077 10.[[012]][[,.]]*)
cannam@125 1078 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
cannam@125 1079 10.*)
cannam@125 1080 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
cannam@125 1081 esac
cannam@125 1082 ;;
cannam@125 1083 esac
cannam@125 1084 if test yes = "$lt_cv_apple_cc_single_mod"; then
cannam@125 1085 _lt_dar_single_mod='$single_module'
cannam@125 1086 fi
cannam@125 1087 if test yes = "$lt_cv_ld_exported_symbols_list"; then
cannam@125 1088 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
cannam@125 1089 else
cannam@125 1090 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
cannam@125 1091 fi
cannam@125 1092 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
cannam@125 1093 _lt_dsymutil='~$DSYMUTIL $lib || :'
cannam@125 1094 else
cannam@125 1095 _lt_dsymutil=
cannam@125 1096 fi
cannam@125 1097 ;;
cannam@125 1098 esac
cannam@125 1099 ])
cannam@125 1100
cannam@125 1101
cannam@125 1102 # _LT_DARWIN_LINKER_FEATURES([TAG])
cannam@125 1103 # ---------------------------------
cannam@125 1104 # Checks for linker and compiler features on darwin
cannam@125 1105 m4_defun([_LT_DARWIN_LINKER_FEATURES],
cannam@125 1106 [
cannam@125 1107 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
cannam@125 1108 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@125 1109 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@125 1110 _LT_TAGVAR(hardcode_automatic, $1)=yes
cannam@125 1111 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
cannam@125 1112 if test yes = "$lt_cv_ld_force_load"; then
cannam@125 1113 _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
cannam@125 1114 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
cannam@125 1115 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
cannam@125 1116 else
cannam@125 1117 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
cannam@125 1118 fi
cannam@125 1119 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@125 1120 _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
cannam@125 1121 case $cc_basename in
cannam@125 1122 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
cannam@125 1123 *) _lt_dar_can_shared=$GCC ;;
cannam@125 1124 esac
cannam@125 1125 if test yes = "$_lt_dar_can_shared"; then
cannam@125 1126 output_verbose_link_cmd=func_echo_all
cannam@125 1127 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
cannam@125 1128 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
cannam@125 1129 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
cannam@125 1130 _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
cannam@125 1131 m4_if([$1], [CXX],
cannam@125 1132 [ if test yes != "$lt_cv_apple_cc_single_mod"; then
cannam@125 1133 _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
cannam@125 1134 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
cannam@125 1135 fi
cannam@125 1136 ],[])
cannam@125 1137 else
cannam@125 1138 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 1139 fi
cannam@125 1140 ])
cannam@125 1141
cannam@125 1142 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
cannam@125 1143 # ----------------------------------
cannam@125 1144 # Links a minimal program and checks the executable
cannam@125 1145 # for the system default hardcoded library path. In most cases,
cannam@125 1146 # this is /usr/lib:/lib, but when the MPI compilers are used
cannam@125 1147 # the location of the communication and MPI libs are included too.
cannam@125 1148 # If we don't find anything, use the default library path according
cannam@125 1149 # to the aix ld manual.
cannam@125 1150 # Store the results from the different compilers for each TAGNAME.
cannam@125 1151 # Allow to override them for all tags through lt_cv_aix_libpath.
cannam@125 1152 m4_defun([_LT_SYS_MODULE_PATH_AIX],
cannam@125 1153 [m4_require([_LT_DECL_SED])dnl
cannam@125 1154 if test set = "${lt_cv_aix_libpath+set}"; then
cannam@125 1155 aix_libpath=$lt_cv_aix_libpath
cannam@125 1156 else
cannam@125 1157 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
cannam@125 1158 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
cannam@125 1159 lt_aix_libpath_sed='[
cannam@125 1160 /Import File Strings/,/^$/ {
cannam@125 1161 /^0/ {
cannam@125 1162 s/^0 *\([^ ]*\) *$/\1/
cannam@125 1163 p
cannam@125 1164 }
cannam@125 1165 }]'
cannam@125 1166 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
cannam@125 1167 # Check for a 64-bit object if we didn't find anything.
cannam@125 1168 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
cannam@125 1169 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
cannam@125 1170 fi],[])
cannam@125 1171 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
cannam@125 1172 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
cannam@125 1173 fi
cannam@125 1174 ])
cannam@125 1175 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
cannam@125 1176 fi
cannam@125 1177 ])# _LT_SYS_MODULE_PATH_AIX
cannam@125 1178
cannam@125 1179
cannam@125 1180 # _LT_SHELL_INIT(ARG)
cannam@125 1181 # -------------------
cannam@125 1182 m4_define([_LT_SHELL_INIT],
cannam@125 1183 [m4_divert_text([M4SH-INIT], [$1
cannam@125 1184 ])])# _LT_SHELL_INIT
cannam@125 1185
cannam@125 1186
cannam@125 1187
cannam@125 1188 # _LT_PROG_ECHO_BACKSLASH
cannam@125 1189 # -----------------------
cannam@125 1190 # Find how we can fake an echo command that does not interpret backslash.
cannam@125 1191 # In particular, with Autoconf 2.60 or later we add some code to the start
cannam@125 1192 # of the generated configure script that will find a shell with a builtin
cannam@125 1193 # printf (that we can use as an echo command).
cannam@125 1194 m4_defun([_LT_PROG_ECHO_BACKSLASH],
cannam@125 1195 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
cannam@125 1196 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
cannam@125 1197 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
cannam@125 1198
cannam@125 1199 AC_MSG_CHECKING([how to print strings])
cannam@125 1200 # Test print first, because it will be a builtin if present.
cannam@125 1201 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
cannam@125 1202 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
cannam@125 1203 ECHO='print -r --'
cannam@125 1204 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
cannam@125 1205 ECHO='printf %s\n'
cannam@125 1206 else
cannam@125 1207 # Use this function as a fallback that always works.
cannam@125 1208 func_fallback_echo ()
cannam@125 1209 {
cannam@125 1210 eval 'cat <<_LTECHO_EOF
cannam@125 1211 $[]1
cannam@125 1212 _LTECHO_EOF'
cannam@125 1213 }
cannam@125 1214 ECHO='func_fallback_echo'
cannam@125 1215 fi
cannam@125 1216
cannam@125 1217 # func_echo_all arg...
cannam@125 1218 # Invoke $ECHO with all args, space-separated.
cannam@125 1219 func_echo_all ()
cannam@125 1220 {
cannam@125 1221 $ECHO "$*"
cannam@125 1222 }
cannam@125 1223
cannam@125 1224 case $ECHO in
cannam@125 1225 printf*) AC_MSG_RESULT([printf]) ;;
cannam@125 1226 print*) AC_MSG_RESULT([print -r]) ;;
cannam@125 1227 *) AC_MSG_RESULT([cat]) ;;
cannam@125 1228 esac
cannam@125 1229
cannam@125 1230 m4_ifdef([_AS_DETECT_SUGGESTED],
cannam@125 1231 [_AS_DETECT_SUGGESTED([
cannam@125 1232 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
cannam@125 1233 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
cannam@125 1234 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
cannam@125 1235 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
cannam@125 1236 PATH=/empty FPATH=/empty; export PATH FPATH
cannam@125 1237 test "X`printf %s $ECHO`" = "X$ECHO" \
cannam@125 1238 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
cannam@125 1239
cannam@125 1240 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
cannam@125 1241 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
cannam@125 1242 ])# _LT_PROG_ECHO_BACKSLASH
cannam@125 1243
cannam@125 1244
cannam@125 1245 # _LT_WITH_SYSROOT
cannam@125 1246 # ----------------
cannam@125 1247 AC_DEFUN([_LT_WITH_SYSROOT],
cannam@125 1248 [AC_MSG_CHECKING([for sysroot])
cannam@125 1249 AC_ARG_WITH([sysroot],
cannam@125 1250 [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
cannam@125 1251 [Search for dependent libraries within DIR (or the compiler's sysroot
cannam@125 1252 if not specified).])],
cannam@125 1253 [], [with_sysroot=no])
cannam@125 1254
cannam@125 1255 dnl lt_sysroot will always be passed unquoted. We quote it here
cannam@125 1256 dnl in case the user passed a directory name.
cannam@125 1257 lt_sysroot=
cannam@125 1258 case $with_sysroot in #(
cannam@125 1259 yes)
cannam@125 1260 if test yes = "$GCC"; then
cannam@125 1261 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
cannam@125 1262 fi
cannam@125 1263 ;; #(
cannam@125 1264 /*)
cannam@125 1265 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
cannam@125 1266 ;; #(
cannam@125 1267 no|'')
cannam@125 1268 ;; #(
cannam@125 1269 *)
cannam@125 1270 AC_MSG_RESULT([$with_sysroot])
cannam@125 1271 AC_MSG_ERROR([The sysroot must be an absolute path.])
cannam@125 1272 ;;
cannam@125 1273 esac
cannam@125 1274
cannam@125 1275 AC_MSG_RESULT([${lt_sysroot:-no}])
cannam@125 1276 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
cannam@125 1277 [dependent libraries, and where our libraries should be installed.])])
cannam@125 1278
cannam@125 1279 # _LT_ENABLE_LOCK
cannam@125 1280 # ---------------
cannam@125 1281 m4_defun([_LT_ENABLE_LOCK],
cannam@125 1282 [AC_ARG_ENABLE([libtool-lock],
cannam@125 1283 [AS_HELP_STRING([--disable-libtool-lock],
cannam@125 1284 [avoid locking (might break parallel builds)])])
cannam@125 1285 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
cannam@125 1286
cannam@125 1287 # Some flags need to be propagated to the compiler or linker for good
cannam@125 1288 # libtool support.
cannam@125 1289 case $host in
cannam@125 1290 ia64-*-hpux*)
cannam@125 1291 # Find out what ABI is being produced by ac_compile, and set mode
cannam@125 1292 # options accordingly.
cannam@125 1293 echo 'int i;' > conftest.$ac_ext
cannam@125 1294 if AC_TRY_EVAL(ac_compile); then
cannam@125 1295 case `/usr/bin/file conftest.$ac_objext` in
cannam@125 1296 *ELF-32*)
cannam@125 1297 HPUX_IA64_MODE=32
cannam@125 1298 ;;
cannam@125 1299 *ELF-64*)
cannam@125 1300 HPUX_IA64_MODE=64
cannam@125 1301 ;;
cannam@125 1302 esac
cannam@125 1303 fi
cannam@125 1304 rm -rf conftest*
cannam@125 1305 ;;
cannam@125 1306 *-*-irix6*)
cannam@125 1307 # Find out what ABI is being produced by ac_compile, and set linker
cannam@125 1308 # options accordingly.
cannam@125 1309 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
cannam@125 1310 if AC_TRY_EVAL(ac_compile); then
cannam@125 1311 if test yes = "$lt_cv_prog_gnu_ld"; then
cannam@125 1312 case `/usr/bin/file conftest.$ac_objext` in
cannam@125 1313 *32-bit*)
cannam@125 1314 LD="${LD-ld} -melf32bsmip"
cannam@125 1315 ;;
cannam@125 1316 *N32*)
cannam@125 1317 LD="${LD-ld} -melf32bmipn32"
cannam@125 1318 ;;
cannam@125 1319 *64-bit*)
cannam@125 1320 LD="${LD-ld} -melf64bmip"
cannam@125 1321 ;;
cannam@125 1322 esac
cannam@125 1323 else
cannam@125 1324 case `/usr/bin/file conftest.$ac_objext` in
cannam@125 1325 *32-bit*)
cannam@125 1326 LD="${LD-ld} -32"
cannam@125 1327 ;;
cannam@125 1328 *N32*)
cannam@125 1329 LD="${LD-ld} -n32"
cannam@125 1330 ;;
cannam@125 1331 *64-bit*)
cannam@125 1332 LD="${LD-ld} -64"
cannam@125 1333 ;;
cannam@125 1334 esac
cannam@125 1335 fi
cannam@125 1336 fi
cannam@125 1337 rm -rf conftest*
cannam@125 1338 ;;
cannam@125 1339
cannam@125 1340 mips64*-*linux*)
cannam@125 1341 # Find out what ABI is being produced by ac_compile, and set linker
cannam@125 1342 # options accordingly.
cannam@125 1343 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
cannam@125 1344 if AC_TRY_EVAL(ac_compile); then
cannam@125 1345 emul=elf
cannam@125 1346 case `/usr/bin/file conftest.$ac_objext` in
cannam@125 1347 *32-bit*)
cannam@125 1348 emul="${emul}32"
cannam@125 1349 ;;
cannam@125 1350 *64-bit*)
cannam@125 1351 emul="${emul}64"
cannam@125 1352 ;;
cannam@125 1353 esac
cannam@125 1354 case `/usr/bin/file conftest.$ac_objext` in
cannam@125 1355 *MSB*)
cannam@125 1356 emul="${emul}btsmip"
cannam@125 1357 ;;
cannam@125 1358 *LSB*)
cannam@125 1359 emul="${emul}ltsmip"
cannam@125 1360 ;;
cannam@125 1361 esac
cannam@125 1362 case `/usr/bin/file conftest.$ac_objext` in
cannam@125 1363 *N32*)
cannam@125 1364 emul="${emul}n32"
cannam@125 1365 ;;
cannam@125 1366 esac
cannam@125 1367 LD="${LD-ld} -m $emul"
cannam@125 1368 fi
cannam@125 1369 rm -rf conftest*
cannam@125 1370 ;;
cannam@125 1371
cannam@125 1372 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
cannam@125 1373 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
cannam@125 1374 # Find out what ABI is being produced by ac_compile, and set linker
cannam@125 1375 # options accordingly. Note that the listed cases only cover the
cannam@125 1376 # situations where additional linker options are needed (such as when
cannam@125 1377 # doing 32-bit compilation for a host where ld defaults to 64-bit, or
cannam@125 1378 # vice versa); the common cases where no linker options are needed do
cannam@125 1379 # not appear in the list.
cannam@125 1380 echo 'int i;' > conftest.$ac_ext
cannam@125 1381 if AC_TRY_EVAL(ac_compile); then
cannam@125 1382 case `/usr/bin/file conftest.o` in
cannam@125 1383 *32-bit*)
cannam@125 1384 case $host in
cannam@125 1385 x86_64-*kfreebsd*-gnu)
cannam@125 1386 LD="${LD-ld} -m elf_i386_fbsd"
cannam@125 1387 ;;
cannam@125 1388 x86_64-*linux*)
cannam@125 1389 case `/usr/bin/file conftest.o` in
cannam@125 1390 *x86-64*)
cannam@125 1391 LD="${LD-ld} -m elf32_x86_64"
cannam@125 1392 ;;
cannam@125 1393 *)
cannam@125 1394 LD="${LD-ld} -m elf_i386"
cannam@125 1395 ;;
cannam@125 1396 esac
cannam@125 1397 ;;
cannam@125 1398 powerpc64le-*linux*)
cannam@125 1399 LD="${LD-ld} -m elf32lppclinux"
cannam@125 1400 ;;
cannam@125 1401 powerpc64-*linux*)
cannam@125 1402 LD="${LD-ld} -m elf32ppclinux"
cannam@125 1403 ;;
cannam@125 1404 s390x-*linux*)
cannam@125 1405 LD="${LD-ld} -m elf_s390"
cannam@125 1406 ;;
cannam@125 1407 sparc64-*linux*)
cannam@125 1408 LD="${LD-ld} -m elf32_sparc"
cannam@125 1409 ;;
cannam@125 1410 esac
cannam@125 1411 ;;
cannam@125 1412 *64-bit*)
cannam@125 1413 case $host in
cannam@125 1414 x86_64-*kfreebsd*-gnu)
cannam@125 1415 LD="${LD-ld} -m elf_x86_64_fbsd"
cannam@125 1416 ;;
cannam@125 1417 x86_64-*linux*)
cannam@125 1418 LD="${LD-ld} -m elf_x86_64"
cannam@125 1419 ;;
cannam@125 1420 powerpcle-*linux*)
cannam@125 1421 LD="${LD-ld} -m elf64lppc"
cannam@125 1422 ;;
cannam@125 1423 powerpc-*linux*)
cannam@125 1424 LD="${LD-ld} -m elf64ppc"
cannam@125 1425 ;;
cannam@125 1426 s390*-*linux*|s390*-*tpf*)
cannam@125 1427 LD="${LD-ld} -m elf64_s390"
cannam@125 1428 ;;
cannam@125 1429 sparc*-*linux*)
cannam@125 1430 LD="${LD-ld} -m elf64_sparc"
cannam@125 1431 ;;
cannam@125 1432 esac
cannam@125 1433 ;;
cannam@125 1434 esac
cannam@125 1435 fi
cannam@125 1436 rm -rf conftest*
cannam@125 1437 ;;
cannam@125 1438
cannam@125 1439 *-*-sco3.2v5*)
cannam@125 1440 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
cannam@125 1441 SAVE_CFLAGS=$CFLAGS
cannam@125 1442 CFLAGS="$CFLAGS -belf"
cannam@125 1443 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
cannam@125 1444 [AC_LANG_PUSH(C)
cannam@125 1445 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
cannam@125 1446 AC_LANG_POP])
cannam@125 1447 if test yes != "$lt_cv_cc_needs_belf"; then
cannam@125 1448 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
cannam@125 1449 CFLAGS=$SAVE_CFLAGS
cannam@125 1450 fi
cannam@125 1451 ;;
cannam@125 1452 *-*solaris*)
cannam@125 1453 # Find out what ABI is being produced by ac_compile, and set linker
cannam@125 1454 # options accordingly.
cannam@125 1455 echo 'int i;' > conftest.$ac_ext
cannam@125 1456 if AC_TRY_EVAL(ac_compile); then
cannam@125 1457 case `/usr/bin/file conftest.o` in
cannam@125 1458 *64-bit*)
cannam@125 1459 case $lt_cv_prog_gnu_ld in
cannam@125 1460 yes*)
cannam@125 1461 case $host in
cannam@125 1462 i?86-*-solaris*|x86_64-*-solaris*)
cannam@125 1463 LD="${LD-ld} -m elf_x86_64"
cannam@125 1464 ;;
cannam@125 1465 sparc*-*-solaris*)
cannam@125 1466 LD="${LD-ld} -m elf64_sparc"
cannam@125 1467 ;;
cannam@125 1468 esac
cannam@125 1469 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
cannam@125 1470 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
cannam@125 1471 LD=${LD-ld}_sol2
cannam@125 1472 fi
cannam@125 1473 ;;
cannam@125 1474 *)
cannam@125 1475 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
cannam@125 1476 LD="${LD-ld} -64"
cannam@125 1477 fi
cannam@125 1478 ;;
cannam@125 1479 esac
cannam@125 1480 ;;
cannam@125 1481 esac
cannam@125 1482 fi
cannam@125 1483 rm -rf conftest*
cannam@125 1484 ;;
cannam@125 1485 esac
cannam@125 1486
cannam@125 1487 need_locks=$enable_libtool_lock
cannam@125 1488 ])# _LT_ENABLE_LOCK
cannam@125 1489
cannam@125 1490
cannam@125 1491 # _LT_PROG_AR
cannam@125 1492 # -----------
cannam@125 1493 m4_defun([_LT_PROG_AR],
cannam@125 1494 [AC_CHECK_TOOLS(AR, [ar], false)
cannam@125 1495 : ${AR=ar}
cannam@125 1496 : ${AR_FLAGS=cru}
cannam@125 1497 _LT_DECL([], [AR], [1], [The archiver])
cannam@125 1498 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
cannam@125 1499
cannam@125 1500 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
cannam@125 1501 [lt_cv_ar_at_file=no
cannam@125 1502 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
cannam@125 1503 [echo conftest.$ac_objext > conftest.lst
cannam@125 1504 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
cannam@125 1505 AC_TRY_EVAL([lt_ar_try])
cannam@125 1506 if test 0 -eq "$ac_status"; then
cannam@125 1507 # Ensure the archiver fails upon bogus file names.
cannam@125 1508 rm -f conftest.$ac_objext libconftest.a
cannam@125 1509 AC_TRY_EVAL([lt_ar_try])
cannam@125 1510 if test 0 -ne "$ac_status"; then
cannam@125 1511 lt_cv_ar_at_file=@
cannam@125 1512 fi
cannam@125 1513 fi
cannam@125 1514 rm -f conftest.* libconftest.a
cannam@125 1515 ])
cannam@125 1516 ])
cannam@125 1517
cannam@125 1518 if test no = "$lt_cv_ar_at_file"; then
cannam@125 1519 archiver_list_spec=
cannam@125 1520 else
cannam@125 1521 archiver_list_spec=$lt_cv_ar_at_file
cannam@125 1522 fi
cannam@125 1523 _LT_DECL([], [archiver_list_spec], [1],
cannam@125 1524 [How to feed a file listing to the archiver])
cannam@125 1525 ])# _LT_PROG_AR
cannam@125 1526
cannam@125 1527
cannam@125 1528 # _LT_CMD_OLD_ARCHIVE
cannam@125 1529 # -------------------
cannam@125 1530 m4_defun([_LT_CMD_OLD_ARCHIVE],
cannam@125 1531 [_LT_PROG_AR
cannam@125 1532
cannam@125 1533 AC_CHECK_TOOL(STRIP, strip, :)
cannam@125 1534 test -z "$STRIP" && STRIP=:
cannam@125 1535 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
cannam@125 1536
cannam@125 1537 AC_CHECK_TOOL(RANLIB, ranlib, :)
cannam@125 1538 test -z "$RANLIB" && RANLIB=:
cannam@125 1539 _LT_DECL([], [RANLIB], [1],
cannam@125 1540 [Commands used to install an old-style archive])
cannam@125 1541
cannam@125 1542 # Determine commands to create old-style static archives.
cannam@125 1543 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
cannam@125 1544 old_postinstall_cmds='chmod 644 $oldlib'
cannam@125 1545 old_postuninstall_cmds=
cannam@125 1546
cannam@125 1547 if test -n "$RANLIB"; then
cannam@125 1548 case $host_os in
cannam@125 1549 bitrig* | openbsd*)
cannam@125 1550 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
cannam@125 1551 ;;
cannam@125 1552 *)
cannam@125 1553 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
cannam@125 1554 ;;
cannam@125 1555 esac
cannam@125 1556 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
cannam@125 1557 fi
cannam@125 1558
cannam@125 1559 case $host_os in
cannam@125 1560 darwin*)
cannam@125 1561 lock_old_archive_extraction=yes ;;
cannam@125 1562 *)
cannam@125 1563 lock_old_archive_extraction=no ;;
cannam@125 1564 esac
cannam@125 1565 _LT_DECL([], [old_postinstall_cmds], [2])
cannam@125 1566 _LT_DECL([], [old_postuninstall_cmds], [2])
cannam@125 1567 _LT_TAGDECL([], [old_archive_cmds], [2],
cannam@125 1568 [Commands used to build an old-style archive])
cannam@125 1569 _LT_DECL([], [lock_old_archive_extraction], [0],
cannam@125 1570 [Whether to use a lock for old archive extraction])
cannam@125 1571 ])# _LT_CMD_OLD_ARCHIVE
cannam@125 1572
cannam@125 1573
cannam@125 1574 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
cannam@125 1575 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
cannam@125 1576 # ----------------------------------------------------------------
cannam@125 1577 # Check whether the given compiler option works
cannam@125 1578 AC_DEFUN([_LT_COMPILER_OPTION],
cannam@125 1579 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@125 1580 m4_require([_LT_DECL_SED])dnl
cannam@125 1581 AC_CACHE_CHECK([$1], [$2],
cannam@125 1582 [$2=no
cannam@125 1583 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
cannam@125 1584 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
cannam@125 1585 lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
cannam@125 1586 # Insert the option either (1) after the last *FLAGS variable, or
cannam@125 1587 # (2) before a word containing "conftest.", or (3) at the end.
cannam@125 1588 # Note that $ac_compile itself does not contain backslashes and begins
cannam@125 1589 # with a dollar sign (not a hyphen), so the echo should work correctly.
cannam@125 1590 # The option is referenced via a variable to avoid confusing sed.
cannam@125 1591 lt_compile=`echo "$ac_compile" | $SED \
cannam@125 1592 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
cannam@125 1593 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
cannam@125 1594 -e 's:$: $lt_compiler_flag:'`
cannam@125 1595 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
cannam@125 1596 (eval "$lt_compile" 2>conftest.err)
cannam@125 1597 ac_status=$?
cannam@125 1598 cat conftest.err >&AS_MESSAGE_LOG_FD
cannam@125 1599 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
cannam@125 1600 if (exit $ac_status) && test -s "$ac_outfile"; then
cannam@125 1601 # The compiler can only warn and ignore the option if not recognized
cannam@125 1602 # So say no if there are warnings other than the usual output.
cannam@125 1603 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
cannam@125 1604 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
cannam@125 1605 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
cannam@125 1606 $2=yes
cannam@125 1607 fi
cannam@125 1608 fi
cannam@125 1609 $RM conftest*
cannam@125 1610 ])
cannam@125 1611
cannam@125 1612 if test yes = "[$]$2"; then
cannam@125 1613 m4_if([$5], , :, [$5])
cannam@125 1614 else
cannam@125 1615 m4_if([$6], , :, [$6])
cannam@125 1616 fi
cannam@125 1617 ])# _LT_COMPILER_OPTION
cannam@125 1618
cannam@125 1619 # Old name:
cannam@125 1620 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
cannam@125 1621 dnl aclocal-1.4 backwards compatibility:
cannam@125 1622 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
cannam@125 1623
cannam@125 1624
cannam@125 1625 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
cannam@125 1626 # [ACTION-SUCCESS], [ACTION-FAILURE])
cannam@125 1627 # ----------------------------------------------------
cannam@125 1628 # Check whether the given linker option works
cannam@125 1629 AC_DEFUN([_LT_LINKER_OPTION],
cannam@125 1630 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@125 1631 m4_require([_LT_DECL_SED])dnl
cannam@125 1632 AC_CACHE_CHECK([$1], [$2],
cannam@125 1633 [$2=no
cannam@125 1634 save_LDFLAGS=$LDFLAGS
cannam@125 1635 LDFLAGS="$LDFLAGS $3"
cannam@125 1636 echo "$lt_simple_link_test_code" > conftest.$ac_ext
cannam@125 1637 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
cannam@125 1638 # The linker can only warn and ignore the option if not recognized
cannam@125 1639 # So say no if there are warnings
cannam@125 1640 if test -s conftest.err; then
cannam@125 1641 # Append any errors to the config.log.
cannam@125 1642 cat conftest.err 1>&AS_MESSAGE_LOG_FD
cannam@125 1643 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
cannam@125 1644 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
cannam@125 1645 if diff conftest.exp conftest.er2 >/dev/null; then
cannam@125 1646 $2=yes
cannam@125 1647 fi
cannam@125 1648 else
cannam@125 1649 $2=yes
cannam@125 1650 fi
cannam@125 1651 fi
cannam@125 1652 $RM -r conftest*
cannam@125 1653 LDFLAGS=$save_LDFLAGS
cannam@125 1654 ])
cannam@125 1655
cannam@125 1656 if test yes = "[$]$2"; then
cannam@125 1657 m4_if([$4], , :, [$4])
cannam@125 1658 else
cannam@125 1659 m4_if([$5], , :, [$5])
cannam@125 1660 fi
cannam@125 1661 ])# _LT_LINKER_OPTION
cannam@125 1662
cannam@125 1663 # Old name:
cannam@125 1664 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
cannam@125 1665 dnl aclocal-1.4 backwards compatibility:
cannam@125 1666 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
cannam@125 1667
cannam@125 1668
cannam@125 1669 # LT_CMD_MAX_LEN
cannam@125 1670 #---------------
cannam@125 1671 AC_DEFUN([LT_CMD_MAX_LEN],
cannam@125 1672 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
cannam@125 1673 # find the maximum length of command line arguments
cannam@125 1674 AC_MSG_CHECKING([the maximum length of command line arguments])
cannam@125 1675 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
cannam@125 1676 i=0
cannam@125 1677 teststring=ABCD
cannam@125 1678
cannam@125 1679 case $build_os in
cannam@125 1680 msdosdjgpp*)
cannam@125 1681 # On DJGPP, this test can blow up pretty badly due to problems in libc
cannam@125 1682 # (any single argument exceeding 2000 bytes causes a buffer overrun
cannam@125 1683 # during glob expansion). Even if it were fixed, the result of this
cannam@125 1684 # check would be larger than it should be.
cannam@125 1685 lt_cv_sys_max_cmd_len=12288; # 12K is about right
cannam@125 1686 ;;
cannam@125 1687
cannam@125 1688 gnu*)
cannam@125 1689 # Under GNU Hurd, this test is not required because there is
cannam@125 1690 # no limit to the length of command line arguments.
cannam@125 1691 # Libtool will interpret -1 as no limit whatsoever
cannam@125 1692 lt_cv_sys_max_cmd_len=-1;
cannam@125 1693 ;;
cannam@125 1694
cannam@125 1695 cygwin* | mingw* | cegcc*)
cannam@125 1696 # On Win9x/ME, this test blows up -- it succeeds, but takes
cannam@125 1697 # about 5 minutes as the teststring grows exponentially.
cannam@125 1698 # Worse, since 9x/ME are not pre-emptively multitasking,
cannam@125 1699 # you end up with a "frozen" computer, even though with patience
cannam@125 1700 # the test eventually succeeds (with a max line length of 256k).
cannam@125 1701 # Instead, let's just punt: use the minimum linelength reported by
cannam@125 1702 # all of the supported platforms: 8192 (on NT/2K/XP).
cannam@125 1703 lt_cv_sys_max_cmd_len=8192;
cannam@125 1704 ;;
cannam@125 1705
cannam@125 1706 mint*)
cannam@125 1707 # On MiNT this can take a long time and run out of memory.
cannam@125 1708 lt_cv_sys_max_cmd_len=8192;
cannam@125 1709 ;;
cannam@125 1710
cannam@125 1711 amigaos*)
cannam@125 1712 # On AmigaOS with pdksh, this test takes hours, literally.
cannam@125 1713 # So we just punt and use a minimum line length of 8192.
cannam@125 1714 lt_cv_sys_max_cmd_len=8192;
cannam@125 1715 ;;
cannam@125 1716
cannam@125 1717 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
cannam@125 1718 # This has been around since 386BSD, at least. Likely further.
cannam@125 1719 if test -x /sbin/sysctl; then
cannam@125 1720 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
cannam@125 1721 elif test -x /usr/sbin/sysctl; then
cannam@125 1722 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
cannam@125 1723 else
cannam@125 1724 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
cannam@125 1725 fi
cannam@125 1726 # And add a safety zone
cannam@125 1727 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
cannam@125 1728 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
cannam@125 1729 ;;
cannam@125 1730
cannam@125 1731 interix*)
cannam@125 1732 # We know the value 262144 and hardcode it with a safety zone (like BSD)
cannam@125 1733 lt_cv_sys_max_cmd_len=196608
cannam@125 1734 ;;
cannam@125 1735
cannam@125 1736 os2*)
cannam@125 1737 # The test takes a long time on OS/2.
cannam@125 1738 lt_cv_sys_max_cmd_len=8192
cannam@125 1739 ;;
cannam@125 1740
cannam@125 1741 osf*)
cannam@125 1742 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
cannam@125 1743 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
cannam@125 1744 # nice to cause kernel panics so lets avoid the loop below.
cannam@125 1745 # First set a reasonable default.
cannam@125 1746 lt_cv_sys_max_cmd_len=16384
cannam@125 1747 #
cannam@125 1748 if test -x /sbin/sysconfig; then
cannam@125 1749 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
cannam@125 1750 *1*) lt_cv_sys_max_cmd_len=-1 ;;
cannam@125 1751 esac
cannam@125 1752 fi
cannam@125 1753 ;;
cannam@125 1754 sco3.2v5*)
cannam@125 1755 lt_cv_sys_max_cmd_len=102400
cannam@125 1756 ;;
cannam@125 1757 sysv5* | sco5v6* | sysv4.2uw2*)
cannam@125 1758 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
cannam@125 1759 if test -n "$kargmax"; then
cannam@125 1760 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
cannam@125 1761 else
cannam@125 1762 lt_cv_sys_max_cmd_len=32768
cannam@125 1763 fi
cannam@125 1764 ;;
cannam@125 1765 *)
cannam@125 1766 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
cannam@125 1767 if test -n "$lt_cv_sys_max_cmd_len" && \
cannam@125 1768 test undefined != "$lt_cv_sys_max_cmd_len"; then
cannam@125 1769 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
cannam@125 1770 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
cannam@125 1771 else
cannam@125 1772 # Make teststring a little bigger before we do anything with it.
cannam@125 1773 # a 1K string should be a reasonable start.
cannam@125 1774 for i in 1 2 3 4 5 6 7 8; do
cannam@125 1775 teststring=$teststring$teststring
cannam@125 1776 done
cannam@125 1777 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
cannam@125 1778 # If test is not a shell built-in, we'll probably end up computing a
cannam@125 1779 # maximum length that is only half of the actual maximum length, but
cannam@125 1780 # we can't tell.
cannam@125 1781 while { test X`env echo "$teststring$teststring" 2>/dev/null` \
cannam@125 1782 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
cannam@125 1783 test 17 != "$i" # 1/2 MB should be enough
cannam@125 1784 do
cannam@125 1785 i=`expr $i + 1`
cannam@125 1786 teststring=$teststring$teststring
cannam@125 1787 done
cannam@125 1788 # Only check the string length outside the loop.
cannam@125 1789 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
cannam@125 1790 teststring=
cannam@125 1791 # Add a significant safety factor because C++ compilers can tack on
cannam@125 1792 # massive amounts of additional arguments before passing them to the
cannam@125 1793 # linker. It appears as though 1/2 is a usable value.
cannam@125 1794 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
cannam@125 1795 fi
cannam@125 1796 ;;
cannam@125 1797 esac
cannam@125 1798 ])
cannam@125 1799 if test -n "$lt_cv_sys_max_cmd_len"; then
cannam@125 1800 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
cannam@125 1801 else
cannam@125 1802 AC_MSG_RESULT(none)
cannam@125 1803 fi
cannam@125 1804 max_cmd_len=$lt_cv_sys_max_cmd_len
cannam@125 1805 _LT_DECL([], [max_cmd_len], [0],
cannam@125 1806 [What is the maximum length of a command?])
cannam@125 1807 ])# LT_CMD_MAX_LEN
cannam@125 1808
cannam@125 1809 # Old name:
cannam@125 1810 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
cannam@125 1811 dnl aclocal-1.4 backwards compatibility:
cannam@125 1812 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
cannam@125 1813
cannam@125 1814
cannam@125 1815 # _LT_HEADER_DLFCN
cannam@125 1816 # ----------------
cannam@125 1817 m4_defun([_LT_HEADER_DLFCN],
cannam@125 1818 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
cannam@125 1819 ])# _LT_HEADER_DLFCN
cannam@125 1820
cannam@125 1821
cannam@125 1822 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
cannam@125 1823 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
cannam@125 1824 # ----------------------------------------------------------------
cannam@125 1825 m4_defun([_LT_TRY_DLOPEN_SELF],
cannam@125 1826 [m4_require([_LT_HEADER_DLFCN])dnl
cannam@125 1827 if test yes = "$cross_compiling"; then :
cannam@125 1828 [$4]
cannam@125 1829 else
cannam@125 1830 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
cannam@125 1831 lt_status=$lt_dlunknown
cannam@125 1832 cat > conftest.$ac_ext <<_LT_EOF
cannam@125 1833 [#line $LINENO "configure"
cannam@125 1834 #include "confdefs.h"
cannam@125 1835
cannam@125 1836 #if HAVE_DLFCN_H
cannam@125 1837 #include <dlfcn.h>
cannam@125 1838 #endif
cannam@125 1839
cannam@125 1840 #include <stdio.h>
cannam@125 1841
cannam@125 1842 #ifdef RTLD_GLOBAL
cannam@125 1843 # define LT_DLGLOBAL RTLD_GLOBAL
cannam@125 1844 #else
cannam@125 1845 # ifdef DL_GLOBAL
cannam@125 1846 # define LT_DLGLOBAL DL_GLOBAL
cannam@125 1847 # else
cannam@125 1848 # define LT_DLGLOBAL 0
cannam@125 1849 # endif
cannam@125 1850 #endif
cannam@125 1851
cannam@125 1852 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
cannam@125 1853 find out it does not work in some platform. */
cannam@125 1854 #ifndef LT_DLLAZY_OR_NOW
cannam@125 1855 # ifdef RTLD_LAZY
cannam@125 1856 # define LT_DLLAZY_OR_NOW RTLD_LAZY
cannam@125 1857 # else
cannam@125 1858 # ifdef DL_LAZY
cannam@125 1859 # define LT_DLLAZY_OR_NOW DL_LAZY
cannam@125 1860 # else
cannam@125 1861 # ifdef RTLD_NOW
cannam@125 1862 # define LT_DLLAZY_OR_NOW RTLD_NOW
cannam@125 1863 # else
cannam@125 1864 # ifdef DL_NOW
cannam@125 1865 # define LT_DLLAZY_OR_NOW DL_NOW
cannam@125 1866 # else
cannam@125 1867 # define LT_DLLAZY_OR_NOW 0
cannam@125 1868 # endif
cannam@125 1869 # endif
cannam@125 1870 # endif
cannam@125 1871 # endif
cannam@125 1872 #endif
cannam@125 1873
cannam@125 1874 /* When -fvisibility=hidden is used, assume the code has been annotated
cannam@125 1875 correspondingly for the symbols needed. */
cannam@125 1876 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
cannam@125 1877 int fnord () __attribute__((visibility("default")));
cannam@125 1878 #endif
cannam@125 1879
cannam@125 1880 int fnord () { return 42; }
cannam@125 1881 int main ()
cannam@125 1882 {
cannam@125 1883 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
cannam@125 1884 int status = $lt_dlunknown;
cannam@125 1885
cannam@125 1886 if (self)
cannam@125 1887 {
cannam@125 1888 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
cannam@125 1889 else
cannam@125 1890 {
cannam@125 1891 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
cannam@125 1892 else puts (dlerror ());
cannam@125 1893 }
cannam@125 1894 /* dlclose (self); */
cannam@125 1895 }
cannam@125 1896 else
cannam@125 1897 puts (dlerror ());
cannam@125 1898
cannam@125 1899 return status;
cannam@125 1900 }]
cannam@125 1901 _LT_EOF
cannam@125 1902 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
cannam@125 1903 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
cannam@125 1904 lt_status=$?
cannam@125 1905 case x$lt_status in
cannam@125 1906 x$lt_dlno_uscore) $1 ;;
cannam@125 1907 x$lt_dlneed_uscore) $2 ;;
cannam@125 1908 x$lt_dlunknown|x*) $3 ;;
cannam@125 1909 esac
cannam@125 1910 else :
cannam@125 1911 # compilation failed
cannam@125 1912 $3
cannam@125 1913 fi
cannam@125 1914 fi
cannam@125 1915 rm -fr conftest*
cannam@125 1916 ])# _LT_TRY_DLOPEN_SELF
cannam@125 1917
cannam@125 1918
cannam@125 1919 # LT_SYS_DLOPEN_SELF
cannam@125 1920 # ------------------
cannam@125 1921 AC_DEFUN([LT_SYS_DLOPEN_SELF],
cannam@125 1922 [m4_require([_LT_HEADER_DLFCN])dnl
cannam@125 1923 if test yes != "$enable_dlopen"; then
cannam@125 1924 enable_dlopen=unknown
cannam@125 1925 enable_dlopen_self=unknown
cannam@125 1926 enable_dlopen_self_static=unknown
cannam@125 1927 else
cannam@125 1928 lt_cv_dlopen=no
cannam@125 1929 lt_cv_dlopen_libs=
cannam@125 1930
cannam@125 1931 case $host_os in
cannam@125 1932 beos*)
cannam@125 1933 lt_cv_dlopen=load_add_on
cannam@125 1934 lt_cv_dlopen_libs=
cannam@125 1935 lt_cv_dlopen_self=yes
cannam@125 1936 ;;
cannam@125 1937
cannam@125 1938 mingw* | pw32* | cegcc*)
cannam@125 1939 lt_cv_dlopen=LoadLibrary
cannam@125 1940 lt_cv_dlopen_libs=
cannam@125 1941 ;;
cannam@125 1942
cannam@125 1943 cygwin*)
cannam@125 1944 lt_cv_dlopen=dlopen
cannam@125 1945 lt_cv_dlopen_libs=
cannam@125 1946 ;;
cannam@125 1947
cannam@125 1948 darwin*)
cannam@125 1949 # if libdl is installed we need to link against it
cannam@125 1950 AC_CHECK_LIB([dl], [dlopen],
cannam@125 1951 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
cannam@125 1952 lt_cv_dlopen=dyld
cannam@125 1953 lt_cv_dlopen_libs=
cannam@125 1954 lt_cv_dlopen_self=yes
cannam@125 1955 ])
cannam@125 1956 ;;
cannam@125 1957
cannam@125 1958 tpf*)
cannam@125 1959 # Don't try to run any link tests for TPF. We know it's impossible
cannam@125 1960 # because TPF is a cross-compiler, and we know how we open DSOs.
cannam@125 1961 lt_cv_dlopen=dlopen
cannam@125 1962 lt_cv_dlopen_libs=
cannam@125 1963 lt_cv_dlopen_self=no
cannam@125 1964 ;;
cannam@125 1965
cannam@125 1966 *)
cannam@125 1967 AC_CHECK_FUNC([shl_load],
cannam@125 1968 [lt_cv_dlopen=shl_load],
cannam@125 1969 [AC_CHECK_LIB([dld], [shl_load],
cannam@125 1970 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
cannam@125 1971 [AC_CHECK_FUNC([dlopen],
cannam@125 1972 [lt_cv_dlopen=dlopen],
cannam@125 1973 [AC_CHECK_LIB([dl], [dlopen],
cannam@125 1974 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
cannam@125 1975 [AC_CHECK_LIB([svld], [dlopen],
cannam@125 1976 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
cannam@125 1977 [AC_CHECK_LIB([dld], [dld_link],
cannam@125 1978 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
cannam@125 1979 ])
cannam@125 1980 ])
cannam@125 1981 ])
cannam@125 1982 ])
cannam@125 1983 ])
cannam@125 1984 ;;
cannam@125 1985 esac
cannam@125 1986
cannam@125 1987 if test no = "$lt_cv_dlopen"; then
cannam@125 1988 enable_dlopen=no
cannam@125 1989 else
cannam@125 1990 enable_dlopen=yes
cannam@125 1991 fi
cannam@125 1992
cannam@125 1993 case $lt_cv_dlopen in
cannam@125 1994 dlopen)
cannam@125 1995 save_CPPFLAGS=$CPPFLAGS
cannam@125 1996 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
cannam@125 1997
cannam@125 1998 save_LDFLAGS=$LDFLAGS
cannam@125 1999 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
cannam@125 2000
cannam@125 2001 save_LIBS=$LIBS
cannam@125 2002 LIBS="$lt_cv_dlopen_libs $LIBS"
cannam@125 2003
cannam@125 2004 AC_CACHE_CHECK([whether a program can dlopen itself],
cannam@125 2005 lt_cv_dlopen_self, [dnl
cannam@125 2006 _LT_TRY_DLOPEN_SELF(
cannam@125 2007 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
cannam@125 2008 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
cannam@125 2009 ])
cannam@125 2010
cannam@125 2011 if test yes = "$lt_cv_dlopen_self"; then
cannam@125 2012 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
cannam@125 2013 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
cannam@125 2014 lt_cv_dlopen_self_static, [dnl
cannam@125 2015 _LT_TRY_DLOPEN_SELF(
cannam@125 2016 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
cannam@125 2017 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
cannam@125 2018 ])
cannam@125 2019 fi
cannam@125 2020
cannam@125 2021 CPPFLAGS=$save_CPPFLAGS
cannam@125 2022 LDFLAGS=$save_LDFLAGS
cannam@125 2023 LIBS=$save_LIBS
cannam@125 2024 ;;
cannam@125 2025 esac
cannam@125 2026
cannam@125 2027 case $lt_cv_dlopen_self in
cannam@125 2028 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
cannam@125 2029 *) enable_dlopen_self=unknown ;;
cannam@125 2030 esac
cannam@125 2031
cannam@125 2032 case $lt_cv_dlopen_self_static in
cannam@125 2033 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
cannam@125 2034 *) enable_dlopen_self_static=unknown ;;
cannam@125 2035 esac
cannam@125 2036 fi
cannam@125 2037 _LT_DECL([dlopen_support], [enable_dlopen], [0],
cannam@125 2038 [Whether dlopen is supported])
cannam@125 2039 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
cannam@125 2040 [Whether dlopen of programs is supported])
cannam@125 2041 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
cannam@125 2042 [Whether dlopen of statically linked programs is supported])
cannam@125 2043 ])# LT_SYS_DLOPEN_SELF
cannam@125 2044
cannam@125 2045 # Old name:
cannam@125 2046 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
cannam@125 2047 dnl aclocal-1.4 backwards compatibility:
cannam@125 2048 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
cannam@125 2049
cannam@125 2050
cannam@125 2051 # _LT_COMPILER_C_O([TAGNAME])
cannam@125 2052 # ---------------------------
cannam@125 2053 # Check to see if options -c and -o are simultaneously supported by compiler.
cannam@125 2054 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
cannam@125 2055 m4_defun([_LT_COMPILER_C_O],
cannam@125 2056 [m4_require([_LT_DECL_SED])dnl
cannam@125 2057 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@125 2058 m4_require([_LT_TAG_COMPILER])dnl
cannam@125 2059 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
cannam@125 2060 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
cannam@125 2061 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
cannam@125 2062 $RM -r conftest 2>/dev/null
cannam@125 2063 mkdir conftest
cannam@125 2064 cd conftest
cannam@125 2065 mkdir out
cannam@125 2066 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
cannam@125 2067
cannam@125 2068 lt_compiler_flag="-o out/conftest2.$ac_objext"
cannam@125 2069 # Insert the option either (1) after the last *FLAGS variable, or
cannam@125 2070 # (2) before a word containing "conftest.", or (3) at the end.
cannam@125 2071 # Note that $ac_compile itself does not contain backslashes and begins
cannam@125 2072 # with a dollar sign (not a hyphen), so the echo should work correctly.
cannam@125 2073 lt_compile=`echo "$ac_compile" | $SED \
cannam@125 2074 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
cannam@125 2075 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
cannam@125 2076 -e 's:$: $lt_compiler_flag:'`
cannam@125 2077 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
cannam@125 2078 (eval "$lt_compile" 2>out/conftest.err)
cannam@125 2079 ac_status=$?
cannam@125 2080 cat out/conftest.err >&AS_MESSAGE_LOG_FD
cannam@125 2081 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
cannam@125 2082 if (exit $ac_status) && test -s out/conftest2.$ac_objext
cannam@125 2083 then
cannam@125 2084 # The compiler can only warn and ignore the option if not recognized
cannam@125 2085 # So say no if there are warnings
cannam@125 2086 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
cannam@125 2087 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
cannam@125 2088 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
cannam@125 2089 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
cannam@125 2090 fi
cannam@125 2091 fi
cannam@125 2092 chmod u+w . 2>&AS_MESSAGE_LOG_FD
cannam@125 2093 $RM conftest*
cannam@125 2094 # SGI C++ compiler will create directory out/ii_files/ for
cannam@125 2095 # template instantiation
cannam@125 2096 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
cannam@125 2097 $RM out/* && rmdir out
cannam@125 2098 cd ..
cannam@125 2099 $RM -r conftest
cannam@125 2100 $RM conftest*
cannam@125 2101 ])
cannam@125 2102 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
cannam@125 2103 [Does compiler simultaneously support -c and -o options?])
cannam@125 2104 ])# _LT_COMPILER_C_O
cannam@125 2105
cannam@125 2106
cannam@125 2107 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
cannam@125 2108 # ----------------------------------
cannam@125 2109 # Check to see if we can do hard links to lock some files if needed
cannam@125 2110 m4_defun([_LT_COMPILER_FILE_LOCKS],
cannam@125 2111 [m4_require([_LT_ENABLE_LOCK])dnl
cannam@125 2112 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@125 2113 _LT_COMPILER_C_O([$1])
cannam@125 2114
cannam@125 2115 hard_links=nottested
cannam@125 2116 if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
cannam@125 2117 # do not overwrite the value of need_locks provided by the user
cannam@125 2118 AC_MSG_CHECKING([if we can lock with hard links])
cannam@125 2119 hard_links=yes
cannam@125 2120 $RM conftest*
cannam@125 2121 ln conftest.a conftest.b 2>/dev/null && hard_links=no
cannam@125 2122 touch conftest.a
cannam@125 2123 ln conftest.a conftest.b 2>&5 || hard_links=no
cannam@125 2124 ln conftest.a conftest.b 2>/dev/null && hard_links=no
cannam@125 2125 AC_MSG_RESULT([$hard_links])
cannam@125 2126 if test no = "$hard_links"; then
cannam@125 2127 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
cannam@125 2128 need_locks=warn
cannam@125 2129 fi
cannam@125 2130 else
cannam@125 2131 need_locks=no
cannam@125 2132 fi
cannam@125 2133 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
cannam@125 2134 ])# _LT_COMPILER_FILE_LOCKS
cannam@125 2135
cannam@125 2136
cannam@125 2137 # _LT_CHECK_OBJDIR
cannam@125 2138 # ----------------
cannam@125 2139 m4_defun([_LT_CHECK_OBJDIR],
cannam@125 2140 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
cannam@125 2141 [rm -f .libs 2>/dev/null
cannam@125 2142 mkdir .libs 2>/dev/null
cannam@125 2143 if test -d .libs; then
cannam@125 2144 lt_cv_objdir=.libs
cannam@125 2145 else
cannam@125 2146 # MS-DOS does not allow filenames that begin with a dot.
cannam@125 2147 lt_cv_objdir=_libs
cannam@125 2148 fi
cannam@125 2149 rmdir .libs 2>/dev/null])
cannam@125 2150 objdir=$lt_cv_objdir
cannam@125 2151 _LT_DECL([], [objdir], [0],
cannam@125 2152 [The name of the directory that contains temporary libtool files])dnl
cannam@125 2153 m4_pattern_allow([LT_OBJDIR])dnl
cannam@125 2154 AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
cannam@125 2155 [Define to the sub-directory where libtool stores uninstalled libraries.])
cannam@125 2156 ])# _LT_CHECK_OBJDIR
cannam@125 2157
cannam@125 2158
cannam@125 2159 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
cannam@125 2160 # --------------------------------------
cannam@125 2161 # Check hardcoding attributes.
cannam@125 2162 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
cannam@125 2163 [AC_MSG_CHECKING([how to hardcode library paths into programs])
cannam@125 2164 _LT_TAGVAR(hardcode_action, $1)=
cannam@125 2165 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
cannam@125 2166 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
cannam@125 2167 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
cannam@125 2168
cannam@125 2169 # We can hardcode non-existent directories.
cannam@125 2170 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
cannam@125 2171 # If the only mechanism to avoid hardcoding is shlibpath_var, we
cannam@125 2172 # have to relink, otherwise we might link with an installed library
cannam@125 2173 # when we should be linking with a yet-to-be-installed one
cannam@125 2174 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
cannam@125 2175 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
cannam@125 2176 # Linking always hardcodes the temporary library directory.
cannam@125 2177 _LT_TAGVAR(hardcode_action, $1)=relink
cannam@125 2178 else
cannam@125 2179 # We can link without hardcoding, and we can hardcode nonexisting dirs.
cannam@125 2180 _LT_TAGVAR(hardcode_action, $1)=immediate
cannam@125 2181 fi
cannam@125 2182 else
cannam@125 2183 # We cannot hardcode anything, or else we can only hardcode existing
cannam@125 2184 # directories.
cannam@125 2185 _LT_TAGVAR(hardcode_action, $1)=unsupported
cannam@125 2186 fi
cannam@125 2187 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
cannam@125 2188
cannam@125 2189 if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
cannam@125 2190 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
cannam@125 2191 # Fast installation is not supported
cannam@125 2192 enable_fast_install=no
cannam@125 2193 elif test yes = "$shlibpath_overrides_runpath" ||
cannam@125 2194 test no = "$enable_shared"; then
cannam@125 2195 # Fast installation is not necessary
cannam@125 2196 enable_fast_install=needless
cannam@125 2197 fi
cannam@125 2198 _LT_TAGDECL([], [hardcode_action], [0],
cannam@125 2199 [How to hardcode a shared library path into an executable])
cannam@125 2200 ])# _LT_LINKER_HARDCODE_LIBPATH
cannam@125 2201
cannam@125 2202
cannam@125 2203 # _LT_CMD_STRIPLIB
cannam@125 2204 # ----------------
cannam@125 2205 m4_defun([_LT_CMD_STRIPLIB],
cannam@125 2206 [m4_require([_LT_DECL_EGREP])
cannam@125 2207 striplib=
cannam@125 2208 old_striplib=
cannam@125 2209 AC_MSG_CHECKING([whether stripping libraries is possible])
cannam@125 2210 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
cannam@125 2211 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
cannam@125 2212 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
cannam@125 2213 AC_MSG_RESULT([yes])
cannam@125 2214 else
cannam@125 2215 # FIXME - insert some real tests, host_os isn't really good enough
cannam@125 2216 case $host_os in
cannam@125 2217 darwin*)
cannam@125 2218 if test -n "$STRIP"; then
cannam@125 2219 striplib="$STRIP -x"
cannam@125 2220 old_striplib="$STRIP -S"
cannam@125 2221 AC_MSG_RESULT([yes])
cannam@125 2222 else
cannam@125 2223 AC_MSG_RESULT([no])
cannam@125 2224 fi
cannam@125 2225 ;;
cannam@125 2226 *)
cannam@125 2227 AC_MSG_RESULT([no])
cannam@125 2228 ;;
cannam@125 2229 esac
cannam@125 2230 fi
cannam@125 2231 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
cannam@125 2232 _LT_DECL([], [striplib], [1])
cannam@125 2233 ])# _LT_CMD_STRIPLIB
cannam@125 2234
cannam@125 2235
cannam@125 2236 # _LT_PREPARE_MUNGE_PATH_LIST
cannam@125 2237 # ---------------------------
cannam@125 2238 # Make sure func_munge_path_list() is defined correctly.
cannam@125 2239 m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
cannam@125 2240 [[# func_munge_path_list VARIABLE PATH
cannam@125 2241 # -----------------------------------
cannam@125 2242 # VARIABLE is name of variable containing _space_ separated list of
cannam@125 2243 # directories to be munged by the contents of PATH, which is string
cannam@125 2244 # having a format:
cannam@125 2245 # "DIR[:DIR]:"
cannam@125 2246 # string "DIR[ DIR]" will be prepended to VARIABLE
cannam@125 2247 # ":DIR[:DIR]"
cannam@125 2248 # string "DIR[ DIR]" will be appended to VARIABLE
cannam@125 2249 # "DIRP[:DIRP]::[DIRA:]DIRA"
cannam@125 2250 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
cannam@125 2251 # "DIRA[ DIRA]" will be appended to VARIABLE
cannam@125 2252 # "DIR[:DIR]"
cannam@125 2253 # VARIABLE will be replaced by "DIR[ DIR]"
cannam@125 2254 func_munge_path_list ()
cannam@125 2255 {
cannam@125 2256 case x@S|@2 in
cannam@125 2257 x)
cannam@125 2258 ;;
cannam@125 2259 *:)
cannam@125 2260 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
cannam@125 2261 ;;
cannam@125 2262 x:*)
cannam@125 2263 eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
cannam@125 2264 ;;
cannam@125 2265 *::*)
cannam@125 2266 eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
cannam@125 2267 eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
cannam@125 2268 ;;
cannam@125 2269 *)
cannam@125 2270 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
cannam@125 2271 ;;
cannam@125 2272 esac
cannam@125 2273 }
cannam@125 2274 ]])# _LT_PREPARE_PATH_LIST
cannam@125 2275
cannam@125 2276
cannam@125 2277 # _LT_SYS_DYNAMIC_LINKER([TAG])
cannam@125 2278 # -----------------------------
cannam@125 2279 # PORTME Fill in your ld.so characteristics
cannam@125 2280 m4_defun([_LT_SYS_DYNAMIC_LINKER],
cannam@125 2281 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
cannam@125 2282 m4_require([_LT_DECL_EGREP])dnl
cannam@125 2283 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@125 2284 m4_require([_LT_DECL_OBJDUMP])dnl
cannam@125 2285 m4_require([_LT_DECL_SED])dnl
cannam@125 2286 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
cannam@125 2287 m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
cannam@125 2288 AC_MSG_CHECKING([dynamic linker characteristics])
cannam@125 2289 m4_if([$1],
cannam@125 2290 [], [
cannam@125 2291 if test yes = "$GCC"; then
cannam@125 2292 case $host_os in
cannam@125 2293 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
cannam@125 2294 *) lt_awk_arg='/^libraries:/' ;;
cannam@125 2295 esac
cannam@125 2296 case $host_os in
cannam@125 2297 mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
cannam@125 2298 *) lt_sed_strip_eq='s|=/|/|g' ;;
cannam@125 2299 esac
cannam@125 2300 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
cannam@125 2301 case $lt_search_path_spec in
cannam@125 2302 *\;*)
cannam@125 2303 # if the path contains ";" then we assume it to be the separator
cannam@125 2304 # otherwise default to the standard path separator (i.e. ":") - it is
cannam@125 2305 # assumed that no part of a normal pathname contains ";" but that should
cannam@125 2306 # okay in the real world where ";" in dirpaths is itself problematic.
cannam@125 2307 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
cannam@125 2308 ;;
cannam@125 2309 *)
cannam@125 2310 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
cannam@125 2311 ;;
cannam@125 2312 esac
cannam@125 2313 # Ok, now we have the path, separated by spaces, we can step through it
cannam@125 2314 # and add multilib dir if necessary...
cannam@125 2315 lt_tmp_lt_search_path_spec=
cannam@125 2316 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
cannam@125 2317 # ...but if some path component already ends with the multilib dir we assume
cannam@125 2318 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
cannam@125 2319 case "$lt_multi_os_dir; $lt_search_path_spec " in
cannam@125 2320 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
cannam@125 2321 lt_multi_os_dir=
cannam@125 2322 ;;
cannam@125 2323 esac
cannam@125 2324 for lt_sys_path in $lt_search_path_spec; do
cannam@125 2325 if test -d "$lt_sys_path$lt_multi_os_dir"; then
cannam@125 2326 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
cannam@125 2327 elif test -n "$lt_multi_os_dir"; then
cannam@125 2328 test -d "$lt_sys_path" && \
cannam@125 2329 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
cannam@125 2330 fi
cannam@125 2331 done
cannam@125 2332 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
cannam@125 2333 BEGIN {RS = " "; FS = "/|\n";} {
cannam@125 2334 lt_foo = "";
cannam@125 2335 lt_count = 0;
cannam@125 2336 for (lt_i = NF; lt_i > 0; lt_i--) {
cannam@125 2337 if ($lt_i != "" && $lt_i != ".") {
cannam@125 2338 if ($lt_i == "..") {
cannam@125 2339 lt_count++;
cannam@125 2340 } else {
cannam@125 2341 if (lt_count == 0) {
cannam@125 2342 lt_foo = "/" $lt_i lt_foo;
cannam@125 2343 } else {
cannam@125 2344 lt_count--;
cannam@125 2345 }
cannam@125 2346 }
cannam@125 2347 }
cannam@125 2348 }
cannam@125 2349 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
cannam@125 2350 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
cannam@125 2351 }'`
cannam@125 2352 # AWK program above erroneously prepends '/' to C:/dos/paths
cannam@125 2353 # for these hosts.
cannam@125 2354 case $host_os in
cannam@125 2355 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
cannam@125 2356 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
cannam@125 2357 esac
cannam@125 2358 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
cannam@125 2359 else
cannam@125 2360 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
cannam@125 2361 fi])
cannam@125 2362 library_names_spec=
cannam@125 2363 libname_spec='lib$name'
cannam@125 2364 soname_spec=
cannam@125 2365 shrext_cmds=.so
cannam@125 2366 postinstall_cmds=
cannam@125 2367 postuninstall_cmds=
cannam@125 2368 finish_cmds=
cannam@125 2369 finish_eval=
cannam@125 2370 shlibpath_var=
cannam@125 2371 shlibpath_overrides_runpath=unknown
cannam@125 2372 version_type=none
cannam@125 2373 dynamic_linker="$host_os ld.so"
cannam@125 2374 sys_lib_dlsearch_path_spec="/lib /usr/lib"
cannam@125 2375 need_lib_prefix=unknown
cannam@125 2376 hardcode_into_libs=no
cannam@125 2377
cannam@125 2378 # when you set need_version to no, make sure it does not cause -set_version
cannam@125 2379 # flags to be left without arguments
cannam@125 2380 need_version=unknown
cannam@125 2381
cannam@125 2382 AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
cannam@125 2383 [User-defined run-time library search path.])
cannam@125 2384
cannam@125 2385 case $host_os in
cannam@125 2386 aix3*)
cannam@125 2387 version_type=linux # correct to gnu/linux during the next big refactor
cannam@125 2388 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
cannam@125 2389 shlibpath_var=LIBPATH
cannam@125 2390
cannam@125 2391 # AIX 3 has no versioning support, so we append a major version to the name.
cannam@125 2392 soname_spec='$libname$release$shared_ext$major'
cannam@125 2393 ;;
cannam@125 2394
cannam@125 2395 aix[[4-9]]*)
cannam@125 2396 version_type=linux # correct to gnu/linux during the next big refactor
cannam@125 2397 need_lib_prefix=no
cannam@125 2398 need_version=no
cannam@125 2399 hardcode_into_libs=yes
cannam@125 2400 if test ia64 = "$host_cpu"; then
cannam@125 2401 # AIX 5 supports IA64
cannam@125 2402 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
cannam@125 2403 shlibpath_var=LD_LIBRARY_PATH
cannam@125 2404 else
cannam@125 2405 # With GCC up to 2.95.x, collect2 would create an import file
cannam@125 2406 # for dependence libraries. The import file would start with
cannam@125 2407 # the line '#! .'. This would cause the generated library to
cannam@125 2408 # depend on '.', always an invalid library. This was fixed in
cannam@125 2409 # development snapshots of GCC prior to 3.0.
cannam@125 2410 case $host_os in
cannam@125 2411 aix4 | aix4.[[01]] | aix4.[[01]].*)
cannam@125 2412 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
cannam@125 2413 echo ' yes '
cannam@125 2414 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
cannam@125 2415 :
cannam@125 2416 else
cannam@125 2417 can_build_shared=no
cannam@125 2418 fi
cannam@125 2419 ;;
cannam@125 2420 esac
cannam@125 2421 # Using Import Files as archive members, it is possible to support
cannam@125 2422 # filename-based versioning of shared library archives on AIX. While
cannam@125 2423 # this would work for both with and without runtime linking, it will
cannam@125 2424 # prevent static linking of such archives. So we do filename-based
cannam@125 2425 # shared library versioning with .so extension only, which is used
cannam@125 2426 # when both runtime linking and shared linking is enabled.
cannam@125 2427 # Unfortunately, runtime linking may impact performance, so we do
cannam@125 2428 # not want this to be the default eventually. Also, we use the
cannam@125 2429 # versioned .so libs for executables only if there is the -brtl
cannam@125 2430 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
cannam@125 2431 # To allow for filename-based versioning support, we need to create
cannam@125 2432 # libNAME.so.V as an archive file, containing:
cannam@125 2433 # *) an Import File, referring to the versioned filename of the
cannam@125 2434 # archive as well as the shared archive member, telling the
cannam@125 2435 # bitwidth (32 or 64) of that shared object, and providing the
cannam@125 2436 # list of exported symbols of that shared object, eventually
cannam@125 2437 # decorated with the 'weak' keyword
cannam@125 2438 # *) the shared object with the F_LOADONLY flag set, to really avoid
cannam@125 2439 # it being seen by the linker.
cannam@125 2440 # At run time we better use the real file rather than another symlink,
cannam@125 2441 # but for link time we create the symlink libNAME.so -> libNAME.so.V
cannam@125 2442
cannam@125 2443 case $with_aix_soname,$aix_use_runtimelinking in
cannam@125 2444 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
cannam@125 2445 # soname into executable. Probably we can add versioning support to
cannam@125 2446 # collect2, so additional links can be useful in future.
cannam@125 2447 aix,yes) # traditional libtool
cannam@125 2448 dynamic_linker='AIX unversionable lib.so'
cannam@125 2449 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
cannam@125 2450 # instead of lib<name>.a to let people know that these are not
cannam@125 2451 # typical AIX shared libraries.
cannam@125 2452 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@125 2453 ;;
cannam@125 2454 aix,no) # traditional AIX only
cannam@125 2455 dynamic_linker='AIX lib.a[(]lib.so.V[)]'
cannam@125 2456 # We preserve .a as extension for shared libraries through AIX4.2
cannam@125 2457 # and later when we are not doing run time linking.
cannam@125 2458 library_names_spec='$libname$release.a $libname.a'
cannam@125 2459 soname_spec='$libname$release$shared_ext$major'
cannam@125 2460 ;;
cannam@125 2461 svr4,*) # full svr4 only
cannam@125 2462 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
cannam@125 2463 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
cannam@125 2464 # We do not specify a path in Import Files, so LIBPATH fires.
cannam@125 2465 shlibpath_overrides_runpath=yes
cannam@125 2466 ;;
cannam@125 2467 *,yes) # both, prefer svr4
cannam@125 2468 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
cannam@125 2469 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
cannam@125 2470 # unpreferred sharedlib libNAME.a needs extra handling
cannam@125 2471 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
cannam@125 2472 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
cannam@125 2473 # We do not specify a path in Import Files, so LIBPATH fires.
cannam@125 2474 shlibpath_overrides_runpath=yes
cannam@125 2475 ;;
cannam@125 2476 *,no) # both, prefer aix
cannam@125 2477 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
cannam@125 2478 library_names_spec='$libname$release.a $libname.a'
cannam@125 2479 soname_spec='$libname$release$shared_ext$major'
cannam@125 2480 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
cannam@125 2481 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
cannam@125 2482 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
cannam@125 2483 ;;
cannam@125 2484 esac
cannam@125 2485 shlibpath_var=LIBPATH
cannam@125 2486 fi
cannam@125 2487 ;;
cannam@125 2488
cannam@125 2489 amigaos*)
cannam@125 2490 case $host_cpu in
cannam@125 2491 powerpc)
cannam@125 2492 # Since July 2007 AmigaOS4 officially supports .so libraries.
cannam@125 2493 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
cannam@125 2494 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@125 2495 ;;
cannam@125 2496 m68k)
cannam@125 2497 library_names_spec='$libname.ixlibrary $libname.a'
cannam@125 2498 # Create ${libname}_ixlibrary.a entries in /sys/libs.
cannam@125 2499 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
cannam@125 2500 ;;
cannam@125 2501 esac
cannam@125 2502 ;;
cannam@125 2503
cannam@125 2504 beos*)
cannam@125 2505 library_names_spec='$libname$shared_ext'
cannam@125 2506 dynamic_linker="$host_os ld.so"
cannam@125 2507 shlibpath_var=LIBRARY_PATH
cannam@125 2508 ;;
cannam@125 2509
cannam@125 2510 bsdi[[45]]*)
cannam@125 2511 version_type=linux # correct to gnu/linux during the next big refactor
cannam@125 2512 need_version=no
cannam@125 2513 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@125 2514 soname_spec='$libname$release$shared_ext$major'
cannam@125 2515 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
cannam@125 2516 shlibpath_var=LD_LIBRARY_PATH
cannam@125 2517 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
cannam@125 2518 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
cannam@125 2519 # the default ld.so.conf also contains /usr/contrib/lib and
cannam@125 2520 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
cannam@125 2521 # libtool to hard-code these into programs
cannam@125 2522 ;;
cannam@125 2523
cannam@125 2524 cygwin* | mingw* | pw32* | cegcc*)
cannam@125 2525 version_type=windows
cannam@125 2526 shrext_cmds=.dll
cannam@125 2527 need_version=no
cannam@125 2528 need_lib_prefix=no
cannam@125 2529
cannam@125 2530 case $GCC,$cc_basename in
cannam@125 2531 yes,*)
cannam@125 2532 # gcc
cannam@125 2533 library_names_spec='$libname.dll.a'
cannam@125 2534 # DLL is installed to $(libdir)/../bin by postinstall_cmds
cannam@125 2535 postinstall_cmds='base_file=`basename \$file`~
cannam@125 2536 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
cannam@125 2537 dldir=$destdir/`dirname \$dlpath`~
cannam@125 2538 test -d \$dldir || mkdir -p \$dldir~
cannam@125 2539 $install_prog $dir/$dlname \$dldir/$dlname~
cannam@125 2540 chmod a+x \$dldir/$dlname~
cannam@125 2541 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
cannam@125 2542 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
cannam@125 2543 fi'
cannam@125 2544 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
cannam@125 2545 dlpath=$dir/\$dldll~
cannam@125 2546 $RM \$dlpath'
cannam@125 2547 shlibpath_overrides_runpath=yes
cannam@125 2548
cannam@125 2549 case $host_os in
cannam@125 2550 cygwin*)
cannam@125 2551 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
cannam@125 2552 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
cannam@125 2553 m4_if([$1], [],[
cannam@125 2554 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
cannam@125 2555 ;;
cannam@125 2556 mingw* | cegcc*)
cannam@125 2557 # MinGW DLLs use traditional 'lib' prefix
cannam@125 2558 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
cannam@125 2559 ;;
cannam@125 2560 pw32*)
cannam@125 2561 # pw32 DLLs use 'pw' prefix rather than 'lib'
cannam@125 2562 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
cannam@125 2563 ;;
cannam@125 2564 esac
cannam@125 2565 dynamic_linker='Win32 ld.exe'
cannam@125 2566 ;;
cannam@125 2567
cannam@125 2568 *,cl*)
cannam@125 2569 # Native MSVC
cannam@125 2570 libname_spec='$name'
cannam@125 2571 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
cannam@125 2572 library_names_spec='$libname.dll.lib'
cannam@125 2573
cannam@125 2574 case $build_os in
cannam@125 2575 mingw*)
cannam@125 2576 sys_lib_search_path_spec=
cannam@125 2577 lt_save_ifs=$IFS
cannam@125 2578 IFS=';'
cannam@125 2579 for lt_path in $LIB
cannam@125 2580 do
cannam@125 2581 IFS=$lt_save_ifs
cannam@125 2582 # Let DOS variable expansion print the short 8.3 style file name.
cannam@125 2583 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
cannam@125 2584 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
cannam@125 2585 done
cannam@125 2586 IFS=$lt_save_ifs
cannam@125 2587 # Convert to MSYS style.
cannam@125 2588 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
cannam@125 2589 ;;
cannam@125 2590 cygwin*)
cannam@125 2591 # Convert to unix form, then to dos form, then back to unix form
cannam@125 2592 # but this time dos style (no spaces!) so that the unix form looks
cannam@125 2593 # like /cygdrive/c/PROGRA~1:/cygdr...
cannam@125 2594 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
cannam@125 2595 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
cannam@125 2596 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
cannam@125 2597 ;;
cannam@125 2598 *)
cannam@125 2599 sys_lib_search_path_spec=$LIB
cannam@125 2600 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
cannam@125 2601 # It is most probably a Windows format PATH.
cannam@125 2602 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
cannam@125 2603 else
cannam@125 2604 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
cannam@125 2605 fi
cannam@125 2606 # FIXME: find the short name or the path components, as spaces are
cannam@125 2607 # common. (e.g. "Program Files" -> "PROGRA~1")
cannam@125 2608 ;;
cannam@125 2609 esac
cannam@125 2610
cannam@125 2611 # DLL is installed to $(libdir)/../bin by postinstall_cmds
cannam@125 2612 postinstall_cmds='base_file=`basename \$file`~
cannam@125 2613 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
cannam@125 2614 dldir=$destdir/`dirname \$dlpath`~
cannam@125 2615 test -d \$dldir || mkdir -p \$dldir~
cannam@125 2616 $install_prog $dir/$dlname \$dldir/$dlname'
cannam@125 2617 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
cannam@125 2618 dlpath=$dir/\$dldll~
cannam@125 2619 $RM \$dlpath'
cannam@125 2620 shlibpath_overrides_runpath=yes
cannam@125 2621 dynamic_linker='Win32 link.exe'
cannam@125 2622 ;;
cannam@125 2623
cannam@125 2624 *)
cannam@125 2625 # Assume MSVC wrapper
cannam@125 2626 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
cannam@125 2627 dynamic_linker='Win32 ld.exe'
cannam@125 2628 ;;
cannam@125 2629 esac
cannam@125 2630 # FIXME: first we should search . and the directory the executable is in
cannam@125 2631 shlibpath_var=PATH
cannam@125 2632 ;;
cannam@125 2633
cannam@125 2634 darwin* | rhapsody*)
cannam@125 2635 dynamic_linker="$host_os dyld"
cannam@125 2636 version_type=darwin
cannam@125 2637 need_lib_prefix=no
cannam@125 2638 need_version=no
cannam@125 2639 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
cannam@125 2640 soname_spec='$libname$release$major$shared_ext'
cannam@125 2641 shlibpath_overrides_runpath=yes
cannam@125 2642 shlibpath_var=DYLD_LIBRARY_PATH
cannam@125 2643 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
cannam@125 2644 m4_if([$1], [],[
cannam@125 2645 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
cannam@125 2646 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
cannam@125 2647 ;;
cannam@125 2648
cannam@125 2649 dgux*)
cannam@125 2650 version_type=linux # correct to gnu/linux during the next big refactor
cannam@125 2651 need_lib_prefix=no
cannam@125 2652 need_version=no
cannam@125 2653 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@125 2654 soname_spec='$libname$release$shared_ext$major'
cannam@125 2655 shlibpath_var=LD_LIBRARY_PATH
cannam@125 2656 ;;
cannam@125 2657
cannam@125 2658 freebsd* | dragonfly*)
cannam@125 2659 # DragonFly does not have aout. When/if they implement a new
cannam@125 2660 # versioning mechanism, adjust this.
cannam@125 2661 if test -x /usr/bin/objformat; then
cannam@125 2662 objformat=`/usr/bin/objformat`
cannam@125 2663 else
cannam@125 2664 case $host_os in
cannam@125 2665 freebsd[[23]].*) objformat=aout ;;
cannam@125 2666 *) objformat=elf ;;
cannam@125 2667 esac
cannam@125 2668 fi
cannam@125 2669 version_type=freebsd-$objformat
cannam@125 2670 case $version_type in
cannam@125 2671 freebsd-elf*)
cannam@125 2672 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@125 2673 soname_spec='$libname$release$shared_ext$major'
cannam@125 2674 need_version=no
cannam@125 2675 need_lib_prefix=no
cannam@125 2676 ;;
cannam@125 2677 freebsd-*)
cannam@125 2678 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
cannam@125 2679 need_version=yes
cannam@125 2680 ;;
cannam@125 2681 esac
cannam@125 2682 shlibpath_var=LD_LIBRARY_PATH
cannam@125 2683 case $host_os in
cannam@125 2684 freebsd2.*)
cannam@125 2685 shlibpath_overrides_runpath=yes
cannam@125 2686 ;;
cannam@125 2687 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
cannam@125 2688 shlibpath_overrides_runpath=yes
cannam@125 2689 hardcode_into_libs=yes
cannam@125 2690 ;;
cannam@125 2691 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
cannam@125 2692 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
cannam@125 2693 shlibpath_overrides_runpath=no
cannam@125 2694 hardcode_into_libs=yes
cannam@125 2695 ;;
cannam@125 2696 *) # from 4.6 on, and DragonFly
cannam@125 2697 shlibpath_overrides_runpath=yes
cannam@125 2698 hardcode_into_libs=yes
cannam@125 2699 ;;
cannam@125 2700 esac
cannam@125 2701 ;;
cannam@125 2702
cannam@125 2703 haiku*)
cannam@125 2704 version_type=linux # correct to gnu/linux during the next big refactor
cannam@125 2705 need_lib_prefix=no
cannam@125 2706 need_version=no
cannam@125 2707 dynamic_linker="$host_os runtime_loader"
cannam@125 2708 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@125 2709 soname_spec='$libname$release$shared_ext$major'
cannam@125 2710 shlibpath_var=LIBRARY_PATH
cannam@125 2711 shlibpath_overrides_runpath=no
cannam@125 2712 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
cannam@125 2713 hardcode_into_libs=yes
cannam@125 2714 ;;
cannam@125 2715
cannam@125 2716 hpux9* | hpux10* | hpux11*)
cannam@125 2717 # Give a soname corresponding to the major version so that dld.sl refuses to
cannam@125 2718 # link against other versions.
cannam@125 2719 version_type=sunos
cannam@125 2720 need_lib_prefix=no
cannam@125 2721 need_version=no
cannam@125 2722 case $host_cpu in
cannam@125 2723 ia64*)
cannam@125 2724 shrext_cmds='.so'
cannam@125 2725 hardcode_into_libs=yes
cannam@125 2726 dynamic_linker="$host_os dld.so"
cannam@125 2727 shlibpath_var=LD_LIBRARY_PATH
cannam@125 2728 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
cannam@125 2729 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@125 2730 soname_spec='$libname$release$shared_ext$major'
cannam@125 2731 if test 32 = "$HPUX_IA64_MODE"; then
cannam@125 2732 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
cannam@125 2733 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
cannam@125 2734 else
cannam@125 2735 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
cannam@125 2736 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
cannam@125 2737 fi
cannam@125 2738 ;;
cannam@125 2739 hppa*64*)
cannam@125 2740 shrext_cmds='.sl'
cannam@125 2741 hardcode_into_libs=yes
cannam@125 2742 dynamic_linker="$host_os dld.sl"
cannam@125 2743 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
cannam@125 2744 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
cannam@125 2745 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@125 2746 soname_spec='$libname$release$shared_ext$major'
cannam@125 2747 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
cannam@125 2748 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
cannam@125 2749 ;;
cannam@125 2750 *)
cannam@125 2751 shrext_cmds='.sl'
cannam@125 2752 dynamic_linker="$host_os dld.sl"
cannam@125 2753 shlibpath_var=SHLIB_PATH
cannam@125 2754 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
cannam@125 2755 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@125 2756 soname_spec='$libname$release$shared_ext$major'
cannam@125 2757 ;;
cannam@125 2758 esac
cannam@125 2759 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
cannam@125 2760 postinstall_cmds='chmod 555 $lib'
cannam@125 2761 # or fails outright, so override atomically:
cannam@125 2762 install_override_mode=555
cannam@125 2763 ;;
cannam@125 2764
cannam@125 2765 interix[[3-9]]*)
cannam@125 2766 version_type=linux # correct to gnu/linux during the next big refactor
cannam@125 2767 need_lib_prefix=no
cannam@125 2768 need_version=no
cannam@125 2769 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@125 2770 soname_spec='$libname$release$shared_ext$major'
cannam@125 2771 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
cannam@125 2772 shlibpath_var=LD_LIBRARY_PATH
cannam@125 2773 shlibpath_overrides_runpath=no
cannam@125 2774 hardcode_into_libs=yes
cannam@125 2775 ;;
cannam@125 2776
cannam@125 2777 irix5* | irix6* | nonstopux*)
cannam@125 2778 case $host_os in
cannam@125 2779 nonstopux*) version_type=nonstopux ;;
cannam@125 2780 *)
cannam@125 2781 if test yes = "$lt_cv_prog_gnu_ld"; then
cannam@125 2782 version_type=linux # correct to gnu/linux during the next big refactor
cannam@125 2783 else
cannam@125 2784 version_type=irix
cannam@125 2785 fi ;;
cannam@125 2786 esac
cannam@125 2787 need_lib_prefix=no
cannam@125 2788 need_version=no
cannam@125 2789 soname_spec='$libname$release$shared_ext$major'
cannam@125 2790 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
cannam@125 2791 case $host_os in
cannam@125 2792 irix5* | nonstopux*)
cannam@125 2793 libsuff= shlibsuff=
cannam@125 2794 ;;
cannam@125 2795 *)
cannam@125 2796 case $LD in # libtool.m4 will add one of these switches to LD
cannam@125 2797 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
cannam@125 2798 libsuff= shlibsuff= libmagic=32-bit;;
cannam@125 2799 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
cannam@125 2800 libsuff=32 shlibsuff=N32 libmagic=N32;;
cannam@125 2801 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
cannam@125 2802 libsuff=64 shlibsuff=64 libmagic=64-bit;;
cannam@125 2803 *) libsuff= shlibsuff= libmagic=never-match;;
cannam@125 2804 esac
cannam@125 2805 ;;
cannam@125 2806 esac
cannam@125 2807 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
cannam@125 2808 shlibpath_overrides_runpath=no
cannam@125 2809 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
cannam@125 2810 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
cannam@125 2811 hardcode_into_libs=yes
cannam@125 2812 ;;
cannam@125 2813
cannam@125 2814 # No shared lib support for Linux oldld, aout, or coff.
cannam@125 2815 linux*oldld* | linux*aout* | linux*coff*)
cannam@125 2816 dynamic_linker=no
cannam@125 2817 ;;
cannam@125 2818
cannam@125 2819 linux*android*)
cannam@125 2820 version_type=none # Android doesn't support versioned libraries.
cannam@125 2821 need_lib_prefix=no
cannam@125 2822 need_version=no
cannam@125 2823 library_names_spec='$libname$release$shared_ext'
cannam@125 2824 soname_spec='$libname$release$shared_ext'
cannam@125 2825 finish_cmds=
cannam@125 2826 shlibpath_var=LD_LIBRARY_PATH
cannam@125 2827 shlibpath_overrides_runpath=yes
cannam@125 2828
cannam@125 2829 # This implies no fast_install, which is unacceptable.
cannam@125 2830 # Some rework will be needed to allow for fast_install
cannam@125 2831 # before this can be enabled.
cannam@125 2832 hardcode_into_libs=yes
cannam@125 2833
cannam@125 2834 dynamic_linker='Android linker'
cannam@125 2835 # Don't embed -rpath directories since the linker doesn't support them.
cannam@125 2836 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@125 2837 ;;
cannam@125 2838
cannam@125 2839 # This must be glibc/ELF.
cannam@125 2840 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
cannam@125 2841 version_type=linux # correct to gnu/linux during the next big refactor
cannam@125 2842 need_lib_prefix=no
cannam@125 2843 need_version=no
cannam@125 2844 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@125 2845 soname_spec='$libname$release$shared_ext$major'
cannam@125 2846 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
cannam@125 2847 shlibpath_var=LD_LIBRARY_PATH
cannam@125 2848 shlibpath_overrides_runpath=no
cannam@125 2849
cannam@125 2850 # Some binutils ld are patched to set DT_RUNPATH
cannam@125 2851 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
cannam@125 2852 [lt_cv_shlibpath_overrides_runpath=no
cannam@125 2853 save_LDFLAGS=$LDFLAGS
cannam@125 2854 save_libdir=$libdir
cannam@125 2855 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
cannam@125 2856 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
cannam@125 2857 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
cannam@125 2858 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
cannam@125 2859 [lt_cv_shlibpath_overrides_runpath=yes])])
cannam@125 2860 LDFLAGS=$save_LDFLAGS
cannam@125 2861 libdir=$save_libdir
cannam@125 2862 ])
cannam@125 2863 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
cannam@125 2864
cannam@125 2865 # This implies no fast_install, which is unacceptable.
cannam@125 2866 # Some rework will be needed to allow for fast_install
cannam@125 2867 # before this can be enabled.
cannam@125 2868 hardcode_into_libs=yes
cannam@125 2869
cannam@125 2870 # Ideally, we could use ldconfig to report *all* directores which are
cannam@125 2871 # searched for libraries, however this is still not possible. Aside from not
cannam@125 2872 # being certain /sbin/ldconfig is available, command
cannam@125 2873 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
cannam@125 2874 # even though it is searched at run-time. Try to do the best guess by
cannam@125 2875 # appending ld.so.conf contents (and includes) to the search path.
cannam@125 2876 if test -f /etc/ld.so.conf; then
cannam@125 2877 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
cannam@125 2878 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
cannam@125 2879 fi
cannam@125 2880
cannam@125 2881 # We used to test for /lib/ld.so.1 and disable shared libraries on
cannam@125 2882 # powerpc, because MkLinux only supported shared libraries with the
cannam@125 2883 # GNU dynamic linker. Since this was broken with cross compilers,
cannam@125 2884 # most powerpc-linux boxes support dynamic linking these days and
cannam@125 2885 # people can always --disable-shared, the test was removed, and we
cannam@125 2886 # assume the GNU/Linux dynamic linker is in use.
cannam@125 2887 dynamic_linker='GNU/Linux ld.so'
cannam@125 2888 ;;
cannam@125 2889
cannam@125 2890 netbsdelf*-gnu)
cannam@125 2891 version_type=linux
cannam@125 2892 need_lib_prefix=no
cannam@125 2893 need_version=no
cannam@125 2894 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
cannam@125 2895 soname_spec='${libname}${release}${shared_ext}$major'
cannam@125 2896 shlibpath_var=LD_LIBRARY_PATH
cannam@125 2897 shlibpath_overrides_runpath=no
cannam@125 2898 hardcode_into_libs=yes
cannam@125 2899 dynamic_linker='NetBSD ld.elf_so'
cannam@125 2900 ;;
cannam@125 2901
cannam@125 2902 netbsd*)
cannam@125 2903 version_type=sunos
cannam@125 2904 need_lib_prefix=no
cannam@125 2905 need_version=no
cannam@125 2906 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
cannam@125 2907 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
cannam@125 2908 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
cannam@125 2909 dynamic_linker='NetBSD (a.out) ld.so'
cannam@125 2910 else
cannam@125 2911 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@125 2912 soname_spec='$libname$release$shared_ext$major'
cannam@125 2913 dynamic_linker='NetBSD ld.elf_so'
cannam@125 2914 fi
cannam@125 2915 shlibpath_var=LD_LIBRARY_PATH
cannam@125 2916 shlibpath_overrides_runpath=yes
cannam@125 2917 hardcode_into_libs=yes
cannam@125 2918 ;;
cannam@125 2919
cannam@125 2920 newsos6)
cannam@125 2921 version_type=linux # correct to gnu/linux during the next big refactor
cannam@125 2922 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@125 2923 shlibpath_var=LD_LIBRARY_PATH
cannam@125 2924 shlibpath_overrides_runpath=yes
cannam@125 2925 ;;
cannam@125 2926
cannam@125 2927 *nto* | *qnx*)
cannam@125 2928 version_type=qnx
cannam@125 2929 need_lib_prefix=no
cannam@125 2930 need_version=no
cannam@125 2931 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@125 2932 soname_spec='$libname$release$shared_ext$major'
cannam@125 2933 shlibpath_var=LD_LIBRARY_PATH
cannam@125 2934 shlibpath_overrides_runpath=no
cannam@125 2935 hardcode_into_libs=yes
cannam@125 2936 dynamic_linker='ldqnx.so'
cannam@125 2937 ;;
cannam@125 2938
cannam@125 2939 openbsd* | bitrig*)
cannam@125 2940 version_type=sunos
cannam@125 2941 sys_lib_dlsearch_path_spec=/usr/lib
cannam@125 2942 need_lib_prefix=no
cannam@125 2943 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
cannam@125 2944 need_version=no
cannam@125 2945 else
cannam@125 2946 need_version=yes
cannam@125 2947 fi
cannam@125 2948 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
cannam@125 2949 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
cannam@125 2950 shlibpath_var=LD_LIBRARY_PATH
cannam@125 2951 shlibpath_overrides_runpath=yes
cannam@125 2952 ;;
cannam@125 2953
cannam@125 2954 os2*)
cannam@125 2955 libname_spec='$name'
cannam@125 2956 version_type=windows
cannam@125 2957 shrext_cmds=.dll
cannam@125 2958 need_version=no
cannam@125 2959 need_lib_prefix=no
cannam@125 2960 # OS/2 can only load a DLL with a base name of 8 characters or less.
cannam@125 2961 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
cannam@125 2962 v=$($ECHO $release$versuffix | tr -d .-);
cannam@125 2963 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
cannam@125 2964 $ECHO $n$v`$shared_ext'
cannam@125 2965 library_names_spec='${libname}_dll.$libext'
cannam@125 2966 dynamic_linker='OS/2 ld.exe'
cannam@125 2967 shlibpath_var=BEGINLIBPATH
cannam@125 2968 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
cannam@125 2969 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
cannam@125 2970 postinstall_cmds='base_file=`basename \$file`~
cannam@125 2971 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
cannam@125 2972 dldir=$destdir/`dirname \$dlpath`~
cannam@125 2973 test -d \$dldir || mkdir -p \$dldir~
cannam@125 2974 $install_prog $dir/$dlname \$dldir/$dlname~
cannam@125 2975 chmod a+x \$dldir/$dlname~
cannam@125 2976 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
cannam@125 2977 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
cannam@125 2978 fi'
cannam@125 2979 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
cannam@125 2980 dlpath=$dir/\$dldll~
cannam@125 2981 $RM \$dlpath'
cannam@125 2982 ;;
cannam@125 2983
cannam@125 2984 osf3* | osf4* | osf5*)
cannam@125 2985 version_type=osf
cannam@125 2986 need_lib_prefix=no
cannam@125 2987 need_version=no
cannam@125 2988 soname_spec='$libname$release$shared_ext$major'
cannam@125 2989 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@125 2990 shlibpath_var=LD_LIBRARY_PATH
cannam@125 2991 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
cannam@125 2992 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
cannam@125 2993 ;;
cannam@125 2994
cannam@125 2995 rdos*)
cannam@125 2996 dynamic_linker=no
cannam@125 2997 ;;
cannam@125 2998
cannam@125 2999 solaris*)
cannam@125 3000 version_type=linux # correct to gnu/linux during the next big refactor
cannam@125 3001 need_lib_prefix=no
cannam@125 3002 need_version=no
cannam@125 3003 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@125 3004 soname_spec='$libname$release$shared_ext$major'
cannam@125 3005 shlibpath_var=LD_LIBRARY_PATH
cannam@125 3006 shlibpath_overrides_runpath=yes
cannam@125 3007 hardcode_into_libs=yes
cannam@125 3008 # ldd complains unless libraries are executable
cannam@125 3009 postinstall_cmds='chmod +x $lib'
cannam@125 3010 ;;
cannam@125 3011
cannam@125 3012 sunos4*)
cannam@125 3013 version_type=sunos
cannam@125 3014 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
cannam@125 3015 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
cannam@125 3016 shlibpath_var=LD_LIBRARY_PATH
cannam@125 3017 shlibpath_overrides_runpath=yes
cannam@125 3018 if test yes = "$with_gnu_ld"; then
cannam@125 3019 need_lib_prefix=no
cannam@125 3020 fi
cannam@125 3021 need_version=yes
cannam@125 3022 ;;
cannam@125 3023
cannam@125 3024 sysv4 | sysv4.3*)
cannam@125 3025 version_type=linux # correct to gnu/linux during the next big refactor
cannam@125 3026 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@125 3027 soname_spec='$libname$release$shared_ext$major'
cannam@125 3028 shlibpath_var=LD_LIBRARY_PATH
cannam@125 3029 case $host_vendor in
cannam@125 3030 sni)
cannam@125 3031 shlibpath_overrides_runpath=no
cannam@125 3032 need_lib_prefix=no
cannam@125 3033 runpath_var=LD_RUN_PATH
cannam@125 3034 ;;
cannam@125 3035 siemens)
cannam@125 3036 need_lib_prefix=no
cannam@125 3037 ;;
cannam@125 3038 motorola)
cannam@125 3039 need_lib_prefix=no
cannam@125 3040 need_version=no
cannam@125 3041 shlibpath_overrides_runpath=no
cannam@125 3042 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
cannam@125 3043 ;;
cannam@125 3044 esac
cannam@125 3045 ;;
cannam@125 3046
cannam@125 3047 sysv4*MP*)
cannam@125 3048 if test -d /usr/nec; then
cannam@125 3049 version_type=linux # correct to gnu/linux during the next big refactor
cannam@125 3050 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
cannam@125 3051 soname_spec='$libname$shared_ext.$major'
cannam@125 3052 shlibpath_var=LD_LIBRARY_PATH
cannam@125 3053 fi
cannam@125 3054 ;;
cannam@125 3055
cannam@125 3056 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
cannam@125 3057 version_type=sco
cannam@125 3058 need_lib_prefix=no
cannam@125 3059 need_version=no
cannam@125 3060 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
cannam@125 3061 soname_spec='$libname$release$shared_ext$major'
cannam@125 3062 shlibpath_var=LD_LIBRARY_PATH
cannam@125 3063 shlibpath_overrides_runpath=yes
cannam@125 3064 hardcode_into_libs=yes
cannam@125 3065 if test yes = "$with_gnu_ld"; then
cannam@125 3066 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
cannam@125 3067 else
cannam@125 3068 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
cannam@125 3069 case $host_os in
cannam@125 3070 sco3.2v5*)
cannam@125 3071 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
cannam@125 3072 ;;
cannam@125 3073 esac
cannam@125 3074 fi
cannam@125 3075 sys_lib_dlsearch_path_spec='/usr/lib'
cannam@125 3076 ;;
cannam@125 3077
cannam@125 3078 tpf*)
cannam@125 3079 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
cannam@125 3080 version_type=linux # correct to gnu/linux during the next big refactor
cannam@125 3081 need_lib_prefix=no
cannam@125 3082 need_version=no
cannam@125 3083 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@125 3084 shlibpath_var=LD_LIBRARY_PATH
cannam@125 3085 shlibpath_overrides_runpath=no
cannam@125 3086 hardcode_into_libs=yes
cannam@125 3087 ;;
cannam@125 3088
cannam@125 3089 uts4*)
cannam@125 3090 version_type=linux # correct to gnu/linux during the next big refactor
cannam@125 3091 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@125 3092 soname_spec='$libname$release$shared_ext$major'
cannam@125 3093 shlibpath_var=LD_LIBRARY_PATH
cannam@125 3094 ;;
cannam@125 3095
cannam@125 3096 *)
cannam@125 3097 dynamic_linker=no
cannam@125 3098 ;;
cannam@125 3099 esac
cannam@125 3100 AC_MSG_RESULT([$dynamic_linker])
cannam@125 3101 test no = "$dynamic_linker" && can_build_shared=no
cannam@125 3102
cannam@125 3103 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
cannam@125 3104 if test yes = "$GCC"; then
cannam@125 3105 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
cannam@125 3106 fi
cannam@125 3107
cannam@125 3108 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
cannam@125 3109 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
cannam@125 3110 fi
cannam@125 3111
cannam@125 3112 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
cannam@125 3113 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
cannam@125 3114 fi
cannam@125 3115
cannam@125 3116 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
cannam@125 3117 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
cannam@125 3118
cannam@125 3119 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
cannam@125 3120 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
cannam@125 3121
cannam@125 3122 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
cannam@125 3123 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
cannam@125 3124
cannam@125 3125 _LT_DECL([], [variables_saved_for_relink], [1],
cannam@125 3126 [Variables whose values should be saved in libtool wrapper scripts and
cannam@125 3127 restored at link time])
cannam@125 3128 _LT_DECL([], [need_lib_prefix], [0],
cannam@125 3129 [Do we need the "lib" prefix for modules?])
cannam@125 3130 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
cannam@125 3131 _LT_DECL([], [version_type], [0], [Library versioning type])
cannam@125 3132 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
cannam@125 3133 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
cannam@125 3134 _LT_DECL([], [shlibpath_overrides_runpath], [0],
cannam@125 3135 [Is shlibpath searched before the hard-coded library search path?])
cannam@125 3136 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
cannam@125 3137 _LT_DECL([], [library_names_spec], [1],
cannam@125 3138 [[List of archive names. First name is the real one, the rest are links.
cannam@125 3139 The last name is the one that the linker finds with -lNAME]])
cannam@125 3140 _LT_DECL([], [soname_spec], [1],
cannam@125 3141 [[The coded name of the library, if different from the real name]])
cannam@125 3142 _LT_DECL([], [install_override_mode], [1],
cannam@125 3143 [Permission mode override for installation of shared libraries])
cannam@125 3144 _LT_DECL([], [postinstall_cmds], [2],
cannam@125 3145 [Command to use after installation of a shared archive])
cannam@125 3146 _LT_DECL([], [postuninstall_cmds], [2],
cannam@125 3147 [Command to use after uninstallation of a shared archive])
cannam@125 3148 _LT_DECL([], [finish_cmds], [2],
cannam@125 3149 [Commands used to finish a libtool library installation in a directory])
cannam@125 3150 _LT_DECL([], [finish_eval], [1],
cannam@125 3151 [[As "finish_cmds", except a single script fragment to be evaled but
cannam@125 3152 not shown]])
cannam@125 3153 _LT_DECL([], [hardcode_into_libs], [0],
cannam@125 3154 [Whether we should hardcode library paths into libraries])
cannam@125 3155 _LT_DECL([], [sys_lib_search_path_spec], [2],
cannam@125 3156 [Compile-time system search path for libraries])
cannam@125 3157 _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
cannam@125 3158 [Detected run-time system search path for libraries])
cannam@125 3159 _LT_DECL([], [configure_time_lt_sys_library_path], [2],
cannam@125 3160 [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
cannam@125 3161 ])# _LT_SYS_DYNAMIC_LINKER
cannam@125 3162
cannam@125 3163
cannam@125 3164 # _LT_PATH_TOOL_PREFIX(TOOL)
cannam@125 3165 # --------------------------
cannam@125 3166 # find a file program that can recognize shared library
cannam@125 3167 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
cannam@125 3168 [m4_require([_LT_DECL_EGREP])dnl
cannam@125 3169 AC_MSG_CHECKING([for $1])
cannam@125 3170 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
cannam@125 3171 [case $MAGIC_CMD in
cannam@125 3172 [[\\/*] | ?:[\\/]*])
cannam@125 3173 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
cannam@125 3174 ;;
cannam@125 3175 *)
cannam@125 3176 lt_save_MAGIC_CMD=$MAGIC_CMD
cannam@125 3177 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
cannam@125 3178 dnl $ac_dummy forces splitting on constant user-supplied paths.
cannam@125 3179 dnl POSIX.2 word splitting is done only on the output of word expansions,
cannam@125 3180 dnl not every word. This closes a longstanding sh security hole.
cannam@125 3181 ac_dummy="m4_if([$2], , $PATH, [$2])"
cannam@125 3182 for ac_dir in $ac_dummy; do
cannam@125 3183 IFS=$lt_save_ifs
cannam@125 3184 test -z "$ac_dir" && ac_dir=.
cannam@125 3185 if test -f "$ac_dir/$1"; then
cannam@125 3186 lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
cannam@125 3187 if test -n "$file_magic_test_file"; then
cannam@125 3188 case $deplibs_check_method in
cannam@125 3189 "file_magic "*)
cannam@125 3190 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
cannam@125 3191 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
cannam@125 3192 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
cannam@125 3193 $EGREP "$file_magic_regex" > /dev/null; then
cannam@125 3194 :
cannam@125 3195 else
cannam@125 3196 cat <<_LT_EOF 1>&2
cannam@125 3197
cannam@125 3198 *** Warning: the command libtool uses to detect shared libraries,
cannam@125 3199 *** $file_magic_cmd, produces output that libtool cannot recognize.
cannam@125 3200 *** The result is that libtool may fail to recognize shared libraries
cannam@125 3201 *** as such. This will affect the creation of libtool libraries that
cannam@125 3202 *** depend on shared libraries, but programs linked with such libtool
cannam@125 3203 *** libraries will work regardless of this problem. Nevertheless, you
cannam@125 3204 *** may want to report the problem to your system manager and/or to
cannam@125 3205 *** bug-libtool@gnu.org
cannam@125 3206
cannam@125 3207 _LT_EOF
cannam@125 3208 fi ;;
cannam@125 3209 esac
cannam@125 3210 fi
cannam@125 3211 break
cannam@125 3212 fi
cannam@125 3213 done
cannam@125 3214 IFS=$lt_save_ifs
cannam@125 3215 MAGIC_CMD=$lt_save_MAGIC_CMD
cannam@125 3216 ;;
cannam@125 3217 esac])
cannam@125 3218 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
cannam@125 3219 if test -n "$MAGIC_CMD"; then
cannam@125 3220 AC_MSG_RESULT($MAGIC_CMD)
cannam@125 3221 else
cannam@125 3222 AC_MSG_RESULT(no)
cannam@125 3223 fi
cannam@125 3224 _LT_DECL([], [MAGIC_CMD], [0],
cannam@125 3225 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
cannam@125 3226 ])# _LT_PATH_TOOL_PREFIX
cannam@125 3227
cannam@125 3228 # Old name:
cannam@125 3229 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
cannam@125 3230 dnl aclocal-1.4 backwards compatibility:
cannam@125 3231 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
cannam@125 3232
cannam@125 3233
cannam@125 3234 # _LT_PATH_MAGIC
cannam@125 3235 # --------------
cannam@125 3236 # find a file program that can recognize a shared library
cannam@125 3237 m4_defun([_LT_PATH_MAGIC],
cannam@125 3238 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
cannam@125 3239 if test -z "$lt_cv_path_MAGIC_CMD"; then
cannam@125 3240 if test -n "$ac_tool_prefix"; then
cannam@125 3241 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
cannam@125 3242 else
cannam@125 3243 MAGIC_CMD=:
cannam@125 3244 fi
cannam@125 3245 fi
cannam@125 3246 ])# _LT_PATH_MAGIC
cannam@125 3247
cannam@125 3248
cannam@125 3249 # LT_PATH_LD
cannam@125 3250 # ----------
cannam@125 3251 # find the pathname to the GNU or non-GNU linker
cannam@125 3252 AC_DEFUN([LT_PATH_LD],
cannam@125 3253 [AC_REQUIRE([AC_PROG_CC])dnl
cannam@125 3254 AC_REQUIRE([AC_CANONICAL_HOST])dnl
cannam@125 3255 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
cannam@125 3256 m4_require([_LT_DECL_SED])dnl
cannam@125 3257 m4_require([_LT_DECL_EGREP])dnl
cannam@125 3258 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
cannam@125 3259
cannam@125 3260 AC_ARG_WITH([gnu-ld],
cannam@125 3261 [AS_HELP_STRING([--with-gnu-ld],
cannam@125 3262 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
cannam@125 3263 [test no = "$withval" || with_gnu_ld=yes],
cannam@125 3264 [with_gnu_ld=no])dnl
cannam@125 3265
cannam@125 3266 ac_prog=ld
cannam@125 3267 if test yes = "$GCC"; then
cannam@125 3268 # Check if gcc -print-prog-name=ld gives a path.
cannam@125 3269 AC_MSG_CHECKING([for ld used by $CC])
cannam@125 3270 case $host in
cannam@125 3271 *-*-mingw*)
cannam@125 3272 # gcc leaves a trailing carriage return, which upsets mingw
cannam@125 3273 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
cannam@125 3274 *)
cannam@125 3275 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
cannam@125 3276 esac
cannam@125 3277 case $ac_prog in
cannam@125 3278 # Accept absolute paths.
cannam@125 3279 [[\\/]]* | ?:[[\\/]]*)
cannam@125 3280 re_direlt='/[[^/]][[^/]]*/\.\./'
cannam@125 3281 # Canonicalize the pathname of ld
cannam@125 3282 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
cannam@125 3283 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
cannam@125 3284 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
cannam@125 3285 done
cannam@125 3286 test -z "$LD" && LD=$ac_prog
cannam@125 3287 ;;
cannam@125 3288 "")
cannam@125 3289 # If it fails, then pretend we aren't using GCC.
cannam@125 3290 ac_prog=ld
cannam@125 3291 ;;
cannam@125 3292 *)
cannam@125 3293 # If it is relative, then search for the first ld in PATH.
cannam@125 3294 with_gnu_ld=unknown
cannam@125 3295 ;;
cannam@125 3296 esac
cannam@125 3297 elif test yes = "$with_gnu_ld"; then
cannam@125 3298 AC_MSG_CHECKING([for GNU ld])
cannam@125 3299 else
cannam@125 3300 AC_MSG_CHECKING([for non-GNU ld])
cannam@125 3301 fi
cannam@125 3302 AC_CACHE_VAL(lt_cv_path_LD,
cannam@125 3303 [if test -z "$LD"; then
cannam@125 3304 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
cannam@125 3305 for ac_dir in $PATH; do
cannam@125 3306 IFS=$lt_save_ifs
cannam@125 3307 test -z "$ac_dir" && ac_dir=.
cannam@125 3308 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
cannam@125 3309 lt_cv_path_LD=$ac_dir/$ac_prog
cannam@125 3310 # Check to see if the program is GNU ld. I'd rather use --version,
cannam@125 3311 # but apparently some variants of GNU ld only accept -v.
cannam@125 3312 # Break only if it was the GNU/non-GNU ld that we prefer.
cannam@125 3313 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
cannam@125 3314 *GNU* | *'with BFD'*)
cannam@125 3315 test no != "$with_gnu_ld" && break
cannam@125 3316 ;;
cannam@125 3317 *)
cannam@125 3318 test yes != "$with_gnu_ld" && break
cannam@125 3319 ;;
cannam@125 3320 esac
cannam@125 3321 fi
cannam@125 3322 done
cannam@125 3323 IFS=$lt_save_ifs
cannam@125 3324 else
cannam@125 3325 lt_cv_path_LD=$LD # Let the user override the test with a path.
cannam@125 3326 fi])
cannam@125 3327 LD=$lt_cv_path_LD
cannam@125 3328 if test -n "$LD"; then
cannam@125 3329 AC_MSG_RESULT($LD)
cannam@125 3330 else
cannam@125 3331 AC_MSG_RESULT(no)
cannam@125 3332 fi
cannam@125 3333 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
cannam@125 3334 _LT_PATH_LD_GNU
cannam@125 3335 AC_SUBST([LD])
cannam@125 3336
cannam@125 3337 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
cannam@125 3338 ])# LT_PATH_LD
cannam@125 3339
cannam@125 3340 # Old names:
cannam@125 3341 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
cannam@125 3342 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
cannam@125 3343 dnl aclocal-1.4 backwards compatibility:
cannam@125 3344 dnl AC_DEFUN([AM_PROG_LD], [])
cannam@125 3345 dnl AC_DEFUN([AC_PROG_LD], [])
cannam@125 3346
cannam@125 3347
cannam@125 3348 # _LT_PATH_LD_GNU
cannam@125 3349 #- --------------
cannam@125 3350 m4_defun([_LT_PATH_LD_GNU],
cannam@125 3351 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
cannam@125 3352 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
cannam@125 3353 case `$LD -v 2>&1 </dev/null` in
cannam@125 3354 *GNU* | *'with BFD'*)
cannam@125 3355 lt_cv_prog_gnu_ld=yes
cannam@125 3356 ;;
cannam@125 3357 *)
cannam@125 3358 lt_cv_prog_gnu_ld=no
cannam@125 3359 ;;
cannam@125 3360 esac])
cannam@125 3361 with_gnu_ld=$lt_cv_prog_gnu_ld
cannam@125 3362 ])# _LT_PATH_LD_GNU
cannam@125 3363
cannam@125 3364
cannam@125 3365 # _LT_CMD_RELOAD
cannam@125 3366 # --------------
cannam@125 3367 # find reload flag for linker
cannam@125 3368 # -- PORTME Some linkers may need a different reload flag.
cannam@125 3369 m4_defun([_LT_CMD_RELOAD],
cannam@125 3370 [AC_CACHE_CHECK([for $LD option to reload object files],
cannam@125 3371 lt_cv_ld_reload_flag,
cannam@125 3372 [lt_cv_ld_reload_flag='-r'])
cannam@125 3373 reload_flag=$lt_cv_ld_reload_flag
cannam@125 3374 case $reload_flag in
cannam@125 3375 "" | " "*) ;;
cannam@125 3376 *) reload_flag=" $reload_flag" ;;
cannam@125 3377 esac
cannam@125 3378 reload_cmds='$LD$reload_flag -o $output$reload_objs'
cannam@125 3379 case $host_os in
cannam@125 3380 cygwin* | mingw* | pw32* | cegcc*)
cannam@125 3381 if test yes != "$GCC"; then
cannam@125 3382 reload_cmds=false
cannam@125 3383 fi
cannam@125 3384 ;;
cannam@125 3385 darwin*)
cannam@125 3386 if test yes = "$GCC"; then
cannam@125 3387 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
cannam@125 3388 else
cannam@125 3389 reload_cmds='$LD$reload_flag -o $output$reload_objs'
cannam@125 3390 fi
cannam@125 3391 ;;
cannam@125 3392 esac
cannam@125 3393 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
cannam@125 3394 _LT_TAGDECL([], [reload_cmds], [2])dnl
cannam@125 3395 ])# _LT_CMD_RELOAD
cannam@125 3396
cannam@125 3397
cannam@125 3398 # _LT_PATH_DD
cannam@125 3399 # -----------
cannam@125 3400 # find a working dd
cannam@125 3401 m4_defun([_LT_PATH_DD],
cannam@125 3402 [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
cannam@125 3403 [printf 0123456789abcdef0123456789abcdef >conftest.i
cannam@125 3404 cat conftest.i conftest.i >conftest2.i
cannam@125 3405 : ${lt_DD:=$DD}
cannam@125 3406 AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
cannam@125 3407 [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
cannam@125 3408 cmp -s conftest.i conftest.out \
cannam@125 3409 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
cannam@125 3410 fi])
cannam@125 3411 rm -f conftest.i conftest2.i conftest.out])
cannam@125 3412 ])# _LT_PATH_DD
cannam@125 3413
cannam@125 3414
cannam@125 3415 # _LT_CMD_TRUNCATE
cannam@125 3416 # ----------------
cannam@125 3417 # find command to truncate a binary pipe
cannam@125 3418 m4_defun([_LT_CMD_TRUNCATE],
cannam@125 3419 [m4_require([_LT_PATH_DD])
cannam@125 3420 AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
cannam@125 3421 [printf 0123456789abcdef0123456789abcdef >conftest.i
cannam@125 3422 cat conftest.i conftest.i >conftest2.i
cannam@125 3423 lt_cv_truncate_bin=
cannam@125 3424 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
cannam@125 3425 cmp -s conftest.i conftest.out \
cannam@125 3426 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
cannam@125 3427 fi
cannam@125 3428 rm -f conftest.i conftest2.i conftest.out
cannam@125 3429 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
cannam@125 3430 _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
cannam@125 3431 [Command to truncate a binary pipe])
cannam@125 3432 ])# _LT_CMD_TRUNCATE
cannam@125 3433
cannam@125 3434
cannam@125 3435 # _LT_CHECK_MAGIC_METHOD
cannam@125 3436 # ----------------------
cannam@125 3437 # how to check for library dependencies
cannam@125 3438 # -- PORTME fill in with the dynamic library characteristics
cannam@125 3439 m4_defun([_LT_CHECK_MAGIC_METHOD],
cannam@125 3440 [m4_require([_LT_DECL_EGREP])
cannam@125 3441 m4_require([_LT_DECL_OBJDUMP])
cannam@125 3442 AC_CACHE_CHECK([how to recognize dependent libraries],
cannam@125 3443 lt_cv_deplibs_check_method,
cannam@125 3444 [lt_cv_file_magic_cmd='$MAGIC_CMD'
cannam@125 3445 lt_cv_file_magic_test_file=
cannam@125 3446 lt_cv_deplibs_check_method='unknown'
cannam@125 3447 # Need to set the preceding variable on all platforms that support
cannam@125 3448 # interlibrary dependencies.
cannam@125 3449 # 'none' -- dependencies not supported.
cannam@125 3450 # 'unknown' -- same as none, but documents that we really don't know.
cannam@125 3451 # 'pass_all' -- all dependencies passed with no checks.
cannam@125 3452 # 'test_compile' -- check by making test program.
cannam@125 3453 # 'file_magic [[regex]]' -- check by looking for files in library path
cannam@125 3454 # that responds to the $file_magic_cmd with a given extended regex.
cannam@125 3455 # If you have 'file' or equivalent on your system and you're not sure
cannam@125 3456 # whether 'pass_all' will *always* work, you probably want this one.
cannam@125 3457
cannam@125 3458 case $host_os in
cannam@125 3459 aix[[4-9]]*)
cannam@125 3460 lt_cv_deplibs_check_method=pass_all
cannam@125 3461 ;;
cannam@125 3462
cannam@125 3463 beos*)
cannam@125 3464 lt_cv_deplibs_check_method=pass_all
cannam@125 3465 ;;
cannam@125 3466
cannam@125 3467 bsdi[[45]]*)
cannam@125 3468 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
cannam@125 3469 lt_cv_file_magic_cmd='/usr/bin/file -L'
cannam@125 3470 lt_cv_file_magic_test_file=/shlib/libc.so
cannam@125 3471 ;;
cannam@125 3472
cannam@125 3473 cygwin*)
cannam@125 3474 # func_win32_libid is a shell function defined in ltmain.sh
cannam@125 3475 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
cannam@125 3476 lt_cv_file_magic_cmd='func_win32_libid'
cannam@125 3477 ;;
cannam@125 3478
cannam@125 3479 mingw* | pw32*)
cannam@125 3480 # Base MSYS/MinGW do not provide the 'file' command needed by
cannam@125 3481 # func_win32_libid shell function, so use a weaker test based on 'objdump',
cannam@125 3482 # unless we find 'file', for example because we are cross-compiling.
cannam@125 3483 if ( file / ) >/dev/null 2>&1; then
cannam@125 3484 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
cannam@125 3485 lt_cv_file_magic_cmd='func_win32_libid'
cannam@125 3486 else
cannam@125 3487 # Keep this pattern in sync with the one in func_win32_libid.
cannam@125 3488 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
cannam@125 3489 lt_cv_file_magic_cmd='$OBJDUMP -f'
cannam@125 3490 fi
cannam@125 3491 ;;
cannam@125 3492
cannam@125 3493 cegcc*)
cannam@125 3494 # use the weaker test based on 'objdump'. See mingw*.
cannam@125 3495 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
cannam@125 3496 lt_cv_file_magic_cmd='$OBJDUMP -f'
cannam@125 3497 ;;
cannam@125 3498
cannam@125 3499 darwin* | rhapsody*)
cannam@125 3500 lt_cv_deplibs_check_method=pass_all
cannam@125 3501 ;;
cannam@125 3502
cannam@125 3503 freebsd* | dragonfly*)
cannam@125 3504 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
cannam@125 3505 case $host_cpu in
cannam@125 3506 i*86 )
cannam@125 3507 # Not sure whether the presence of OpenBSD here was a mistake.
cannam@125 3508 # Let's accept both of them until this is cleared up.
cannam@125 3509 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
cannam@125 3510 lt_cv_file_magic_cmd=/usr/bin/file
cannam@125 3511 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
cannam@125 3512 ;;
cannam@125 3513 esac
cannam@125 3514 else
cannam@125 3515 lt_cv_deplibs_check_method=pass_all
cannam@125 3516 fi
cannam@125 3517 ;;
cannam@125 3518
cannam@125 3519 haiku*)
cannam@125 3520 lt_cv_deplibs_check_method=pass_all
cannam@125 3521 ;;
cannam@125 3522
cannam@125 3523 hpux10.20* | hpux11*)
cannam@125 3524 lt_cv_file_magic_cmd=/usr/bin/file
cannam@125 3525 case $host_cpu in
cannam@125 3526 ia64*)
cannam@125 3527 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
cannam@125 3528 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
cannam@125 3529 ;;
cannam@125 3530 hppa*64*)
cannam@125 3531 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
cannam@125 3532 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
cannam@125 3533 ;;
cannam@125 3534 *)
cannam@125 3535 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
cannam@125 3536 lt_cv_file_magic_test_file=/usr/lib/libc.sl
cannam@125 3537 ;;
cannam@125 3538 esac
cannam@125 3539 ;;
cannam@125 3540
cannam@125 3541 interix[[3-9]]*)
cannam@125 3542 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
cannam@125 3543 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
cannam@125 3544 ;;
cannam@125 3545
cannam@125 3546 irix5* | irix6* | nonstopux*)
cannam@125 3547 case $LD in
cannam@125 3548 *-32|*"-32 ") libmagic=32-bit;;
cannam@125 3549 *-n32|*"-n32 ") libmagic=N32;;
cannam@125 3550 *-64|*"-64 ") libmagic=64-bit;;
cannam@125 3551 *) libmagic=never-match;;
cannam@125 3552 esac
cannam@125 3553 lt_cv_deplibs_check_method=pass_all
cannam@125 3554 ;;
cannam@125 3555
cannam@125 3556 # This must be glibc/ELF.
cannam@125 3557 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
cannam@125 3558 lt_cv_deplibs_check_method=pass_all
cannam@125 3559 ;;
cannam@125 3560
cannam@125 3561 netbsd* | netbsdelf*-gnu)
cannam@125 3562 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
cannam@125 3563 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
cannam@125 3564 else
cannam@125 3565 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
cannam@125 3566 fi
cannam@125 3567 ;;
cannam@125 3568
cannam@125 3569 newos6*)
cannam@125 3570 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
cannam@125 3571 lt_cv_file_magic_cmd=/usr/bin/file
cannam@125 3572 lt_cv_file_magic_test_file=/usr/lib/libnls.so
cannam@125 3573 ;;
cannam@125 3574
cannam@125 3575 *nto* | *qnx*)
cannam@125 3576 lt_cv_deplibs_check_method=pass_all
cannam@125 3577 ;;
cannam@125 3578
cannam@125 3579 openbsd* | bitrig*)
cannam@125 3580 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
cannam@125 3581 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
cannam@125 3582 else
cannam@125 3583 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
cannam@125 3584 fi
cannam@125 3585 ;;
cannam@125 3586
cannam@125 3587 osf3* | osf4* | osf5*)
cannam@125 3588 lt_cv_deplibs_check_method=pass_all
cannam@125 3589 ;;
cannam@125 3590
cannam@125 3591 rdos*)
cannam@125 3592 lt_cv_deplibs_check_method=pass_all
cannam@125 3593 ;;
cannam@125 3594
cannam@125 3595 solaris*)
cannam@125 3596 lt_cv_deplibs_check_method=pass_all
cannam@125 3597 ;;
cannam@125 3598
cannam@125 3599 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
cannam@125 3600 lt_cv_deplibs_check_method=pass_all
cannam@125 3601 ;;
cannam@125 3602
cannam@125 3603 sysv4 | sysv4.3*)
cannam@125 3604 case $host_vendor in
cannam@125 3605 motorola)
cannam@125 3606 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
cannam@125 3607 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
cannam@125 3608 ;;
cannam@125 3609 ncr)
cannam@125 3610 lt_cv_deplibs_check_method=pass_all
cannam@125 3611 ;;
cannam@125 3612 sequent)
cannam@125 3613 lt_cv_file_magic_cmd='/bin/file'
cannam@125 3614 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
cannam@125 3615 ;;
cannam@125 3616 sni)
cannam@125 3617 lt_cv_file_magic_cmd='/bin/file'
cannam@125 3618 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
cannam@125 3619 lt_cv_file_magic_test_file=/lib/libc.so
cannam@125 3620 ;;
cannam@125 3621 siemens)
cannam@125 3622 lt_cv_deplibs_check_method=pass_all
cannam@125 3623 ;;
cannam@125 3624 pc)
cannam@125 3625 lt_cv_deplibs_check_method=pass_all
cannam@125 3626 ;;
cannam@125 3627 esac
cannam@125 3628 ;;
cannam@125 3629
cannam@125 3630 tpf*)
cannam@125 3631 lt_cv_deplibs_check_method=pass_all
cannam@125 3632 ;;
cannam@125 3633 os2*)
cannam@125 3634 lt_cv_deplibs_check_method=pass_all
cannam@125 3635 ;;
cannam@125 3636 esac
cannam@125 3637 ])
cannam@125 3638
cannam@125 3639 file_magic_glob=
cannam@125 3640 want_nocaseglob=no
cannam@125 3641 if test "$build" = "$host"; then
cannam@125 3642 case $host_os in
cannam@125 3643 mingw* | pw32*)
cannam@125 3644 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
cannam@125 3645 want_nocaseglob=yes
cannam@125 3646 else
cannam@125 3647 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
cannam@125 3648 fi
cannam@125 3649 ;;
cannam@125 3650 esac
cannam@125 3651 fi
cannam@125 3652
cannam@125 3653 file_magic_cmd=$lt_cv_file_magic_cmd
cannam@125 3654 deplibs_check_method=$lt_cv_deplibs_check_method
cannam@125 3655 test -z "$deplibs_check_method" && deplibs_check_method=unknown
cannam@125 3656
cannam@125 3657 _LT_DECL([], [deplibs_check_method], [1],
cannam@125 3658 [Method to check whether dependent libraries are shared objects])
cannam@125 3659 _LT_DECL([], [file_magic_cmd], [1],
cannam@125 3660 [Command to use when deplibs_check_method = "file_magic"])
cannam@125 3661 _LT_DECL([], [file_magic_glob], [1],
cannam@125 3662 [How to find potential files when deplibs_check_method = "file_magic"])
cannam@125 3663 _LT_DECL([], [want_nocaseglob], [1],
cannam@125 3664 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
cannam@125 3665 ])# _LT_CHECK_MAGIC_METHOD
cannam@125 3666
cannam@125 3667
cannam@125 3668 # LT_PATH_NM
cannam@125 3669 # ----------
cannam@125 3670 # find the pathname to a BSD- or MS-compatible name lister
cannam@125 3671 AC_DEFUN([LT_PATH_NM],
cannam@125 3672 [AC_REQUIRE([AC_PROG_CC])dnl
cannam@125 3673 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
cannam@125 3674 [if test -n "$NM"; then
cannam@125 3675 # Let the user override the test.
cannam@125 3676 lt_cv_path_NM=$NM
cannam@125 3677 else
cannam@125 3678 lt_nm_to_check=${ac_tool_prefix}nm
cannam@125 3679 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
cannam@125 3680 lt_nm_to_check="$lt_nm_to_check nm"
cannam@125 3681 fi
cannam@125 3682 for lt_tmp_nm in $lt_nm_to_check; do
cannam@125 3683 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
cannam@125 3684 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
cannam@125 3685 IFS=$lt_save_ifs
cannam@125 3686 test -z "$ac_dir" && ac_dir=.
cannam@125 3687 tmp_nm=$ac_dir/$lt_tmp_nm
cannam@125 3688 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
cannam@125 3689 # Check to see if the nm accepts a BSD-compat flag.
cannam@125 3690 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
cannam@125 3691 # nm: unknown option "B" ignored
cannam@125 3692 # Tru64's nm complains that /dev/null is an invalid object file
cannam@125 3693 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
cannam@125 3694 case $build_os in
cannam@125 3695 mingw*) lt_bad_file=conftest.nm/nofile ;;
cannam@125 3696 *) lt_bad_file=/dev/null ;;
cannam@125 3697 esac
cannam@125 3698 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
cannam@125 3699 *$lt_bad_file* | *'Invalid file or object type'*)
cannam@125 3700 lt_cv_path_NM="$tmp_nm -B"
cannam@125 3701 break 2
cannam@125 3702 ;;
cannam@125 3703 *)
cannam@125 3704 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
cannam@125 3705 */dev/null*)
cannam@125 3706 lt_cv_path_NM="$tmp_nm -p"
cannam@125 3707 break 2
cannam@125 3708 ;;
cannam@125 3709 *)
cannam@125 3710 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
cannam@125 3711 continue # so that we can try to find one that supports BSD flags
cannam@125 3712 ;;
cannam@125 3713 esac
cannam@125 3714 ;;
cannam@125 3715 esac
cannam@125 3716 fi
cannam@125 3717 done
cannam@125 3718 IFS=$lt_save_ifs
cannam@125 3719 done
cannam@125 3720 : ${lt_cv_path_NM=no}
cannam@125 3721 fi])
cannam@125 3722 if test no != "$lt_cv_path_NM"; then
cannam@125 3723 NM=$lt_cv_path_NM
cannam@125 3724 else
cannam@125 3725 # Didn't find any BSD compatible name lister, look for dumpbin.
cannam@125 3726 if test -n "$DUMPBIN"; then :
cannam@125 3727 # Let the user override the test.
cannam@125 3728 else
cannam@125 3729 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
cannam@125 3730 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
cannam@125 3731 *COFF*)
cannam@125 3732 DUMPBIN="$DUMPBIN -symbols -headers"
cannam@125 3733 ;;
cannam@125 3734 *)
cannam@125 3735 DUMPBIN=:
cannam@125 3736 ;;
cannam@125 3737 esac
cannam@125 3738 fi
cannam@125 3739 AC_SUBST([DUMPBIN])
cannam@125 3740 if test : != "$DUMPBIN"; then
cannam@125 3741 NM=$DUMPBIN
cannam@125 3742 fi
cannam@125 3743 fi
cannam@125 3744 test -z "$NM" && NM=nm
cannam@125 3745 AC_SUBST([NM])
cannam@125 3746 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
cannam@125 3747
cannam@125 3748 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
cannam@125 3749 [lt_cv_nm_interface="BSD nm"
cannam@125 3750 echo "int some_variable = 0;" > conftest.$ac_ext
cannam@125 3751 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
cannam@125 3752 (eval "$ac_compile" 2>conftest.err)
cannam@125 3753 cat conftest.err >&AS_MESSAGE_LOG_FD
cannam@125 3754 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
cannam@125 3755 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cannam@125 3756 cat conftest.err >&AS_MESSAGE_LOG_FD
cannam@125 3757 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
cannam@125 3758 cat conftest.out >&AS_MESSAGE_LOG_FD
cannam@125 3759 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
cannam@125 3760 lt_cv_nm_interface="MS dumpbin"
cannam@125 3761 fi
cannam@125 3762 rm -f conftest*])
cannam@125 3763 ])# LT_PATH_NM
cannam@125 3764
cannam@125 3765 # Old names:
cannam@125 3766 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
cannam@125 3767 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
cannam@125 3768 dnl aclocal-1.4 backwards compatibility:
cannam@125 3769 dnl AC_DEFUN([AM_PROG_NM], [])
cannam@125 3770 dnl AC_DEFUN([AC_PROG_NM], [])
cannam@125 3771
cannam@125 3772 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
cannam@125 3773 # --------------------------------
cannam@125 3774 # how to determine the name of the shared library
cannam@125 3775 # associated with a specific link library.
cannam@125 3776 # -- PORTME fill in with the dynamic library characteristics
cannam@125 3777 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
cannam@125 3778 [m4_require([_LT_DECL_EGREP])
cannam@125 3779 m4_require([_LT_DECL_OBJDUMP])
cannam@125 3780 m4_require([_LT_DECL_DLLTOOL])
cannam@125 3781 AC_CACHE_CHECK([how to associate runtime and link libraries],
cannam@125 3782 lt_cv_sharedlib_from_linklib_cmd,
cannam@125 3783 [lt_cv_sharedlib_from_linklib_cmd='unknown'
cannam@125 3784
cannam@125 3785 case $host_os in
cannam@125 3786 cygwin* | mingw* | pw32* | cegcc*)
cannam@125 3787 # two different shell functions defined in ltmain.sh;
cannam@125 3788 # decide which one to use based on capabilities of $DLLTOOL
cannam@125 3789 case `$DLLTOOL --help 2>&1` in
cannam@125 3790 *--identify-strict*)
cannam@125 3791 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
cannam@125 3792 ;;
cannam@125 3793 *)
cannam@125 3794 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
cannam@125 3795 ;;
cannam@125 3796 esac
cannam@125 3797 ;;
cannam@125 3798 *)
cannam@125 3799 # fallback: assume linklib IS sharedlib
cannam@125 3800 lt_cv_sharedlib_from_linklib_cmd=$ECHO
cannam@125 3801 ;;
cannam@125 3802 esac
cannam@125 3803 ])
cannam@125 3804 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
cannam@125 3805 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
cannam@125 3806
cannam@125 3807 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
cannam@125 3808 [Command to associate shared and link libraries])
cannam@125 3809 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
cannam@125 3810
cannam@125 3811
cannam@125 3812 # _LT_PATH_MANIFEST_TOOL
cannam@125 3813 # ----------------------
cannam@125 3814 # locate the manifest tool
cannam@125 3815 m4_defun([_LT_PATH_MANIFEST_TOOL],
cannam@125 3816 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
cannam@125 3817 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
cannam@125 3818 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
cannam@125 3819 [lt_cv_path_mainfest_tool=no
cannam@125 3820 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
cannam@125 3821 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
cannam@125 3822 cat conftest.err >&AS_MESSAGE_LOG_FD
cannam@125 3823 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
cannam@125 3824 lt_cv_path_mainfest_tool=yes
cannam@125 3825 fi
cannam@125 3826 rm -f conftest*])
cannam@125 3827 if test yes != "$lt_cv_path_mainfest_tool"; then
cannam@125 3828 MANIFEST_TOOL=:
cannam@125 3829 fi
cannam@125 3830 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
cannam@125 3831 ])# _LT_PATH_MANIFEST_TOOL
cannam@125 3832
cannam@125 3833
cannam@125 3834 # _LT_DLL_DEF_P([FILE])
cannam@125 3835 # ---------------------
cannam@125 3836 # True iff FILE is a Windows DLL '.def' file.
cannam@125 3837 # Keep in sync with func_dll_def_p in the libtool script
cannam@125 3838 AC_DEFUN([_LT_DLL_DEF_P],
cannam@125 3839 [dnl
cannam@125 3840 test DEF = "`$SED -n dnl
cannam@125 3841 -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
cannam@125 3842 -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
cannam@125 3843 -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
cannam@125 3844 -e q dnl Only consider the first "real" line
cannam@125 3845 $1`" dnl
cannam@125 3846 ])# _LT_DLL_DEF_P
cannam@125 3847
cannam@125 3848
cannam@125 3849 # LT_LIB_M
cannam@125 3850 # --------
cannam@125 3851 # check for math library
cannam@125 3852 AC_DEFUN([LT_LIB_M],
cannam@125 3853 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
cannam@125 3854 LIBM=
cannam@125 3855 case $host in
cannam@125 3856 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
cannam@125 3857 # These system don't have libm, or don't need it
cannam@125 3858 ;;
cannam@125 3859 *-ncr-sysv4.3*)
cannam@125 3860 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
cannam@125 3861 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
cannam@125 3862 ;;
cannam@125 3863 *)
cannam@125 3864 AC_CHECK_LIB(m, cos, LIBM=-lm)
cannam@125 3865 ;;
cannam@125 3866 esac
cannam@125 3867 AC_SUBST([LIBM])
cannam@125 3868 ])# LT_LIB_M
cannam@125 3869
cannam@125 3870 # Old name:
cannam@125 3871 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
cannam@125 3872 dnl aclocal-1.4 backwards compatibility:
cannam@125 3873 dnl AC_DEFUN([AC_CHECK_LIBM], [])
cannam@125 3874
cannam@125 3875
cannam@125 3876 # _LT_COMPILER_NO_RTTI([TAGNAME])
cannam@125 3877 # -------------------------------
cannam@125 3878 m4_defun([_LT_COMPILER_NO_RTTI],
cannam@125 3879 [m4_require([_LT_TAG_COMPILER])dnl
cannam@125 3880
cannam@125 3881 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
cannam@125 3882
cannam@125 3883 if test yes = "$GCC"; then
cannam@125 3884 case $cc_basename in
cannam@125 3885 nvcc*)
cannam@125 3886 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
cannam@125 3887 *)
cannam@125 3888 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
cannam@125 3889 esac
cannam@125 3890
cannam@125 3891 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
cannam@125 3892 lt_cv_prog_compiler_rtti_exceptions,
cannam@125 3893 [-fno-rtti -fno-exceptions], [],
cannam@125 3894 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
cannam@125 3895 fi
cannam@125 3896 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
cannam@125 3897 [Compiler flag to turn off builtin functions])
cannam@125 3898 ])# _LT_COMPILER_NO_RTTI
cannam@125 3899
cannam@125 3900
cannam@125 3901 # _LT_CMD_GLOBAL_SYMBOLS
cannam@125 3902 # ----------------------
cannam@125 3903 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
cannam@125 3904 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
cannam@125 3905 AC_REQUIRE([AC_PROG_CC])dnl
cannam@125 3906 AC_REQUIRE([AC_PROG_AWK])dnl
cannam@125 3907 AC_REQUIRE([LT_PATH_NM])dnl
cannam@125 3908 AC_REQUIRE([LT_PATH_LD])dnl
cannam@125 3909 m4_require([_LT_DECL_SED])dnl
cannam@125 3910 m4_require([_LT_DECL_EGREP])dnl
cannam@125 3911 m4_require([_LT_TAG_COMPILER])dnl
cannam@125 3912
cannam@125 3913 # Check for command to grab the raw symbol name followed by C symbol from nm.
cannam@125 3914 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
cannam@125 3915 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
cannam@125 3916 [
cannam@125 3917 # These are sane defaults that work on at least a few old systems.
cannam@125 3918 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
cannam@125 3919
cannam@125 3920 # Character class describing NM global symbol codes.
cannam@125 3921 symcode='[[BCDEGRST]]'
cannam@125 3922
cannam@125 3923 # Regexp to match symbols that can be accessed directly from C.
cannam@125 3924 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
cannam@125 3925
cannam@125 3926 # Define system-specific variables.
cannam@125 3927 case $host_os in
cannam@125 3928 aix*)
cannam@125 3929 symcode='[[BCDT]]'
cannam@125 3930 ;;
cannam@125 3931 cygwin* | mingw* | pw32* | cegcc*)
cannam@125 3932 symcode='[[ABCDGISTW]]'
cannam@125 3933 ;;
cannam@125 3934 hpux*)
cannam@125 3935 if test ia64 = "$host_cpu"; then
cannam@125 3936 symcode='[[ABCDEGRST]]'
cannam@125 3937 fi
cannam@125 3938 ;;
cannam@125 3939 irix* | nonstopux*)
cannam@125 3940 symcode='[[BCDEGRST]]'
cannam@125 3941 ;;
cannam@125 3942 osf*)
cannam@125 3943 symcode='[[BCDEGQRST]]'
cannam@125 3944 ;;
cannam@125 3945 solaris*)
cannam@125 3946 symcode='[[BDRT]]'
cannam@125 3947 ;;
cannam@125 3948 sco3.2v5*)
cannam@125 3949 symcode='[[DT]]'
cannam@125 3950 ;;
cannam@125 3951 sysv4.2uw2*)
cannam@125 3952 symcode='[[DT]]'
cannam@125 3953 ;;
cannam@125 3954 sysv5* | sco5v6* | unixware* | OpenUNIX*)
cannam@125 3955 symcode='[[ABDT]]'
cannam@125 3956 ;;
cannam@125 3957 sysv4)
cannam@125 3958 symcode='[[DFNSTU]]'
cannam@125 3959 ;;
cannam@125 3960 esac
cannam@125 3961
cannam@125 3962 # If we're using GNU nm, then use its standard symbol codes.
cannam@125 3963 case `$NM -V 2>&1` in
cannam@125 3964 *GNU* | *'with BFD'*)
cannam@125 3965 symcode='[[ABCDGIRSTW]]' ;;
cannam@125 3966 esac
cannam@125 3967
cannam@125 3968 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
cannam@125 3969 # Gets list of data symbols to import.
cannam@125 3970 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
cannam@125 3971 # Adjust the below global symbol transforms to fixup imported variables.
cannam@125 3972 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
cannam@125 3973 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
cannam@125 3974 lt_c_name_lib_hook="\
cannam@125 3975 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
cannam@125 3976 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
cannam@125 3977 else
cannam@125 3978 # Disable hooks by default.
cannam@125 3979 lt_cv_sys_global_symbol_to_import=
cannam@125 3980 lt_cdecl_hook=
cannam@125 3981 lt_c_name_hook=
cannam@125 3982 lt_c_name_lib_hook=
cannam@125 3983 fi
cannam@125 3984
cannam@125 3985 # Transform an extracted symbol line into a proper C declaration.
cannam@125 3986 # Some systems (esp. on ia64) link data and code symbols differently,
cannam@125 3987 # so use this general approach.
cannam@125 3988 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
cannam@125 3989 $lt_cdecl_hook\
cannam@125 3990 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
cannam@125 3991 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
cannam@125 3992
cannam@125 3993 # Transform an extracted symbol line into symbol name and symbol address
cannam@125 3994 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
cannam@125 3995 $lt_c_name_hook\
cannam@125 3996 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
cannam@125 3997 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
cannam@125 3998
cannam@125 3999 # Transform an extracted symbol line into symbol name with lib prefix and
cannam@125 4000 # symbol address.
cannam@125 4001 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
cannam@125 4002 $lt_c_name_lib_hook\
cannam@125 4003 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
cannam@125 4004 " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
cannam@125 4005 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
cannam@125 4006
cannam@125 4007 # Handle CRLF in mingw tool chain
cannam@125 4008 opt_cr=
cannam@125 4009 case $build_os in
cannam@125 4010 mingw*)
cannam@125 4011 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
cannam@125 4012 ;;
cannam@125 4013 esac
cannam@125 4014
cannam@125 4015 # Try without a prefix underscore, then with it.
cannam@125 4016 for ac_symprfx in "" "_"; do
cannam@125 4017
cannam@125 4018 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
cannam@125 4019 symxfrm="\\1 $ac_symprfx\\2 \\2"
cannam@125 4020
cannam@125 4021 # Write the raw and C identifiers.
cannam@125 4022 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
cannam@125 4023 # Fake it for dumpbin and say T for any non-static function,
cannam@125 4024 # D for any global variable and I for any imported variable.
cannam@125 4025 # Also find C++ and __fastcall symbols from MSVC++,
cannam@125 4026 # which start with @ or ?.
cannam@125 4027 lt_cv_sys_global_symbol_pipe="$AWK ['"\
cannam@125 4028 " {last_section=section; section=\$ 3};"\
cannam@125 4029 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
cannam@125 4030 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
cannam@125 4031 " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
cannam@125 4032 " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
cannam@125 4033 " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
cannam@125 4034 " \$ 0!~/External *\|/{next};"\
cannam@125 4035 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
cannam@125 4036 " {if(hide[section]) next};"\
cannam@125 4037 " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
cannam@125 4038 " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
cannam@125 4039 " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
cannam@125 4040 " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
cannam@125 4041 " ' prfx=^$ac_symprfx]"
cannam@125 4042 else
cannam@125 4043 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
cannam@125 4044 fi
cannam@125 4045 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
cannam@125 4046
cannam@125 4047 # Check to see that the pipe works correctly.
cannam@125 4048 pipe_works=no
cannam@125 4049
cannam@125 4050 rm -f conftest*
cannam@125 4051 cat > conftest.$ac_ext <<_LT_EOF
cannam@125 4052 #ifdef __cplusplus
cannam@125 4053 extern "C" {
cannam@125 4054 #endif
cannam@125 4055 char nm_test_var;
cannam@125 4056 void nm_test_func(void);
cannam@125 4057 void nm_test_func(void){}
cannam@125 4058 #ifdef __cplusplus
cannam@125 4059 }
cannam@125 4060 #endif
cannam@125 4061 int main(){nm_test_var='a';nm_test_func();return(0);}
cannam@125 4062 _LT_EOF
cannam@125 4063
cannam@125 4064 if AC_TRY_EVAL(ac_compile); then
cannam@125 4065 # Now try to grab the symbols.
cannam@125 4066 nlist=conftest.nm
cannam@125 4067 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
cannam@125 4068 # Try sorting and uniquifying the output.
cannam@125 4069 if sort "$nlist" | uniq > "$nlist"T; then
cannam@125 4070 mv -f "$nlist"T "$nlist"
cannam@125 4071 else
cannam@125 4072 rm -f "$nlist"T
cannam@125 4073 fi
cannam@125 4074
cannam@125 4075 # Make sure that we snagged all the symbols we need.
cannam@125 4076 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
cannam@125 4077 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
cannam@125 4078 cat <<_LT_EOF > conftest.$ac_ext
cannam@125 4079 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
cannam@125 4080 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
cannam@125 4081 /* DATA imports from DLLs on WIN32 can't be const, because runtime
cannam@125 4082 relocations are performed -- see ld's documentation on pseudo-relocs. */
cannam@125 4083 # define LT@&t@_DLSYM_CONST
cannam@125 4084 #elif defined __osf__
cannam@125 4085 /* This system does not cope well with relocations in const data. */
cannam@125 4086 # define LT@&t@_DLSYM_CONST
cannam@125 4087 #else
cannam@125 4088 # define LT@&t@_DLSYM_CONST const
cannam@125 4089 #endif
cannam@125 4090
cannam@125 4091 #ifdef __cplusplus
cannam@125 4092 extern "C" {
cannam@125 4093 #endif
cannam@125 4094
cannam@125 4095 _LT_EOF
cannam@125 4096 # Now generate the symbol file.
cannam@125 4097 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
cannam@125 4098
cannam@125 4099 cat <<_LT_EOF >> conftest.$ac_ext
cannam@125 4100
cannam@125 4101 /* The mapping between symbol names and symbols. */
cannam@125 4102 LT@&t@_DLSYM_CONST struct {
cannam@125 4103 const char *name;
cannam@125 4104 void *address;
cannam@125 4105 }
cannam@125 4106 lt__PROGRAM__LTX_preloaded_symbols[[]] =
cannam@125 4107 {
cannam@125 4108 { "@PROGRAM@", (void *) 0 },
cannam@125 4109 _LT_EOF
cannam@125 4110 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
cannam@125 4111 cat <<\_LT_EOF >> conftest.$ac_ext
cannam@125 4112 {0, (void *) 0}
cannam@125 4113 };
cannam@125 4114
cannam@125 4115 /* This works around a problem in FreeBSD linker */
cannam@125 4116 #ifdef FREEBSD_WORKAROUND
cannam@125 4117 static const void *lt_preloaded_setup() {
cannam@125 4118 return lt__PROGRAM__LTX_preloaded_symbols;
cannam@125 4119 }
cannam@125 4120 #endif
cannam@125 4121
cannam@125 4122 #ifdef __cplusplus
cannam@125 4123 }
cannam@125 4124 #endif
cannam@125 4125 _LT_EOF
cannam@125 4126 # Now try linking the two files.
cannam@125 4127 mv conftest.$ac_objext conftstm.$ac_objext
cannam@125 4128 lt_globsym_save_LIBS=$LIBS
cannam@125 4129 lt_globsym_save_CFLAGS=$CFLAGS
cannam@125 4130 LIBS=conftstm.$ac_objext
cannam@125 4131 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
cannam@125 4132 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
cannam@125 4133 pipe_works=yes
cannam@125 4134 fi
cannam@125 4135 LIBS=$lt_globsym_save_LIBS
cannam@125 4136 CFLAGS=$lt_globsym_save_CFLAGS
cannam@125 4137 else
cannam@125 4138 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
cannam@125 4139 fi
cannam@125 4140 else
cannam@125 4141 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
cannam@125 4142 fi
cannam@125 4143 else
cannam@125 4144 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
cannam@125 4145 fi
cannam@125 4146 else
cannam@125 4147 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
cannam@125 4148 cat conftest.$ac_ext >&5
cannam@125 4149 fi
cannam@125 4150 rm -rf conftest* conftst*
cannam@125 4151
cannam@125 4152 # Do not use the global_symbol_pipe unless it works.
cannam@125 4153 if test yes = "$pipe_works"; then
cannam@125 4154 break
cannam@125 4155 else
cannam@125 4156 lt_cv_sys_global_symbol_pipe=
cannam@125 4157 fi
cannam@125 4158 done
cannam@125 4159 ])
cannam@125 4160 if test -z "$lt_cv_sys_global_symbol_pipe"; then
cannam@125 4161 lt_cv_sys_global_symbol_to_cdecl=
cannam@125 4162 fi
cannam@125 4163 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
cannam@125 4164 AC_MSG_RESULT(failed)
cannam@125 4165 else
cannam@125 4166 AC_MSG_RESULT(ok)
cannam@125 4167 fi
cannam@125 4168
cannam@125 4169 # Response file support.
cannam@125 4170 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
cannam@125 4171 nm_file_list_spec='@'
cannam@125 4172 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
cannam@125 4173 nm_file_list_spec='@'
cannam@125 4174 fi
cannam@125 4175
cannam@125 4176 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
cannam@125 4177 [Take the output of nm and produce a listing of raw symbols and C names])
cannam@125 4178 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
cannam@125 4179 [Transform the output of nm in a proper C declaration])
cannam@125 4180 _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
cannam@125 4181 [Transform the output of nm into a list of symbols to manually relocate])
cannam@125 4182 _LT_DECL([global_symbol_to_c_name_address],
cannam@125 4183 [lt_cv_sys_global_symbol_to_c_name_address], [1],
cannam@125 4184 [Transform the output of nm in a C name address pair])
cannam@125 4185 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
cannam@125 4186 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
cannam@125 4187 [Transform the output of nm in a C name address pair when lib prefix is needed])
cannam@125 4188 _LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
cannam@125 4189 [The name lister interface])
cannam@125 4190 _LT_DECL([], [nm_file_list_spec], [1],
cannam@125 4191 [Specify filename containing input files for $NM])
cannam@125 4192 ]) # _LT_CMD_GLOBAL_SYMBOLS
cannam@125 4193
cannam@125 4194
cannam@125 4195 # _LT_COMPILER_PIC([TAGNAME])
cannam@125 4196 # ---------------------------
cannam@125 4197 m4_defun([_LT_COMPILER_PIC],
cannam@125 4198 [m4_require([_LT_TAG_COMPILER])dnl
cannam@125 4199 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
cannam@125 4200 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
cannam@125 4201 _LT_TAGVAR(lt_prog_compiler_static, $1)=
cannam@125 4202
cannam@125 4203 m4_if([$1], [CXX], [
cannam@125 4204 # C++ specific cases for pic, static, wl, etc.
cannam@125 4205 if test yes = "$GXX"; then
cannam@125 4206 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@125 4207 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@125 4208
cannam@125 4209 case $host_os in
cannam@125 4210 aix*)
cannam@125 4211 # All AIX code is PIC.
cannam@125 4212 if test ia64 = "$host_cpu"; then
cannam@125 4213 # AIX 5 now supports IA64 processor
cannam@125 4214 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@125 4215 fi
cannam@125 4216 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@125 4217 ;;
cannam@125 4218
cannam@125 4219 amigaos*)
cannam@125 4220 case $host_cpu in
cannam@125 4221 powerpc)
cannam@125 4222 # see comment about AmigaOS4 .so support
cannam@125 4223 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@125 4224 ;;
cannam@125 4225 m68k)
cannam@125 4226 # FIXME: we need at least 68020 code to build shared libraries, but
cannam@125 4227 # adding the '-m68020' flag to GCC prevents building anything better,
cannam@125 4228 # like '-m68040'.
cannam@125 4229 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
cannam@125 4230 ;;
cannam@125 4231 esac
cannam@125 4232 ;;
cannam@125 4233
cannam@125 4234 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
cannam@125 4235 # PIC is the default for these OSes.
cannam@125 4236 ;;
cannam@125 4237 mingw* | cygwin* | os2* | pw32* | cegcc*)
cannam@125 4238 # This hack is so that the source file can tell whether it is being
cannam@125 4239 # built for inclusion in a dll (and should export symbols for example).
cannam@125 4240 # Although the cygwin gcc ignores -fPIC, still need this for old-style
cannam@125 4241 # (--disable-auto-import) libraries
cannam@125 4242 m4_if([$1], [GCJ], [],
cannam@125 4243 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
cannam@125 4244 case $host_os in
cannam@125 4245 os2*)
cannam@125 4246 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
cannam@125 4247 ;;
cannam@125 4248 esac
cannam@125 4249 ;;
cannam@125 4250 darwin* | rhapsody*)
cannam@125 4251 # PIC is the default on this platform
cannam@125 4252 # Common symbols not allowed in MH_DYLIB files
cannam@125 4253 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
cannam@125 4254 ;;
cannam@125 4255 *djgpp*)
cannam@125 4256 # DJGPP does not support shared libraries at all
cannam@125 4257 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
cannam@125 4258 ;;
cannam@125 4259 haiku*)
cannam@125 4260 # PIC is the default for Haiku.
cannam@125 4261 # The "-static" flag exists, but is broken.
cannam@125 4262 _LT_TAGVAR(lt_prog_compiler_static, $1)=
cannam@125 4263 ;;
cannam@125 4264 interix[[3-9]]*)
cannam@125 4265 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
cannam@125 4266 # Instead, we relocate shared libraries at runtime.
cannam@125 4267 ;;
cannam@125 4268 sysv4*MP*)
cannam@125 4269 if test -d /usr/nec; then
cannam@125 4270 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
cannam@125 4271 fi
cannam@125 4272 ;;
cannam@125 4273 hpux*)
cannam@125 4274 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
cannam@125 4275 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
cannam@125 4276 # sets the default TLS model and affects inlining.
cannam@125 4277 case $host_cpu in
cannam@125 4278 hppa*64*)
cannam@125 4279 ;;
cannam@125 4280 *)
cannam@125 4281 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@125 4282 ;;
cannam@125 4283 esac
cannam@125 4284 ;;
cannam@125 4285 *qnx* | *nto*)
cannam@125 4286 # QNX uses GNU C++, but need to define -shared option too, otherwise
cannam@125 4287 # it will coredump.
cannam@125 4288 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
cannam@125 4289 ;;
cannam@125 4290 *)
cannam@125 4291 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@125 4292 ;;
cannam@125 4293 esac
cannam@125 4294 else
cannam@125 4295 case $host_os in
cannam@125 4296 aix[[4-9]]*)
cannam@125 4297 # All AIX code is PIC.
cannam@125 4298 if test ia64 = "$host_cpu"; then
cannam@125 4299 # AIX 5 now supports IA64 processor
cannam@125 4300 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@125 4301 else
cannam@125 4302 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
cannam@125 4303 fi
cannam@125 4304 ;;
cannam@125 4305 chorus*)
cannam@125 4306 case $cc_basename in
cannam@125 4307 cxch68*)
cannam@125 4308 # Green Hills C++ Compiler
cannam@125 4309 # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
cannam@125 4310 ;;
cannam@125 4311 esac
cannam@125 4312 ;;
cannam@125 4313 mingw* | cygwin* | os2* | pw32* | cegcc*)
cannam@125 4314 # This hack is so that the source file can tell whether it is being
cannam@125 4315 # built for inclusion in a dll (and should export symbols for example).
cannam@125 4316 m4_if([$1], [GCJ], [],
cannam@125 4317 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
cannam@125 4318 ;;
cannam@125 4319 dgux*)
cannam@125 4320 case $cc_basename in
cannam@125 4321 ec++*)
cannam@125 4322 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@125 4323 ;;
cannam@125 4324 ghcx*)
cannam@125 4325 # Green Hills C++ Compiler
cannam@125 4326 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
cannam@125 4327 ;;
cannam@125 4328 *)
cannam@125 4329 ;;
cannam@125 4330 esac
cannam@125 4331 ;;
cannam@125 4332 freebsd* | dragonfly*)
cannam@125 4333 # FreeBSD uses GNU C++
cannam@125 4334 ;;
cannam@125 4335 hpux9* | hpux10* | hpux11*)
cannam@125 4336 case $cc_basename in
cannam@125 4337 CC*)
cannam@125 4338 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@125 4339 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
cannam@125 4340 if test ia64 != "$host_cpu"; then
cannam@125 4341 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
cannam@125 4342 fi
cannam@125 4343 ;;
cannam@125 4344 aCC*)
cannam@125 4345 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@125 4346 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
cannam@125 4347 case $host_cpu in
cannam@125 4348 hppa*64*|ia64*)
cannam@125 4349 # +Z the default
cannam@125 4350 ;;
cannam@125 4351 *)
cannam@125 4352 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
cannam@125 4353 ;;
cannam@125 4354 esac
cannam@125 4355 ;;
cannam@125 4356 *)
cannam@125 4357 ;;
cannam@125 4358 esac
cannam@125 4359 ;;
cannam@125 4360 interix*)
cannam@125 4361 # This is c89, which is MS Visual C++ (no shared libs)
cannam@125 4362 # Anyone wants to do a port?
cannam@125 4363 ;;
cannam@125 4364 irix5* | irix6* | nonstopux*)
cannam@125 4365 case $cc_basename in
cannam@125 4366 CC*)
cannam@125 4367 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@125 4368 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@125 4369 # CC pic flag -KPIC is the default.
cannam@125 4370 ;;
cannam@125 4371 *)
cannam@125 4372 ;;
cannam@125 4373 esac
cannam@125 4374 ;;
cannam@125 4375 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
cannam@125 4376 case $cc_basename in
cannam@125 4377 KCC*)
cannam@125 4378 # KAI C++ Compiler
cannam@125 4379 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
cannam@125 4380 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@125 4381 ;;
cannam@125 4382 ecpc* )
cannam@125 4383 # old Intel C++ for x86_64, which still supported -KPIC.
cannam@125 4384 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@125 4385 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@125 4386 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@125 4387 ;;
cannam@125 4388 icpc* )
cannam@125 4389 # Intel C++, used to be incompatible with GCC.
cannam@125 4390 # ICC 10 doesn't accept -KPIC any more.
cannam@125 4391 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@125 4392 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@125 4393 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@125 4394 ;;
cannam@125 4395 pgCC* | pgcpp*)
cannam@125 4396 # Portland Group C++ compiler
cannam@125 4397 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@125 4398 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
cannam@125 4399 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@125 4400 ;;
cannam@125 4401 cxx*)
cannam@125 4402 # Compaq C++
cannam@125 4403 # Make sure the PIC flag is empty. It appears that all Alpha
cannam@125 4404 # Linux and Compaq Tru64 Unix objects are PIC.
cannam@125 4405 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
cannam@125 4406 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@125 4407 ;;
cannam@125 4408 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
cannam@125 4409 # IBM XL 8.0, 9.0 on PPC and BlueGene
cannam@125 4410 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@125 4411 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
cannam@125 4412 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
cannam@125 4413 ;;
cannam@125 4414 *)
cannam@125 4415 case `$CC -V 2>&1 | sed 5q` in
cannam@125 4416 *Sun\ C*)
cannam@125 4417 # Sun C++ 5.9
cannam@125 4418 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@125 4419 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@125 4420 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
cannam@125 4421 ;;
cannam@125 4422 esac
cannam@125 4423 ;;
cannam@125 4424 esac
cannam@125 4425 ;;
cannam@125 4426 lynxos*)
cannam@125 4427 ;;
cannam@125 4428 m88k*)
cannam@125 4429 ;;
cannam@125 4430 mvs*)
cannam@125 4431 case $cc_basename in
cannam@125 4432 cxx*)
cannam@125 4433 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
cannam@125 4434 ;;
cannam@125 4435 *)
cannam@125 4436 ;;
cannam@125 4437 esac
cannam@125 4438 ;;
cannam@125 4439 netbsd* | netbsdelf*-gnu)
cannam@125 4440 ;;
cannam@125 4441 *qnx* | *nto*)
cannam@125 4442 # QNX uses GNU C++, but need to define -shared option too, otherwise
cannam@125 4443 # it will coredump.
cannam@125 4444 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
cannam@125 4445 ;;
cannam@125 4446 osf3* | osf4* | osf5*)
cannam@125 4447 case $cc_basename in
cannam@125 4448 KCC*)
cannam@125 4449 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
cannam@125 4450 ;;
cannam@125 4451 RCC*)
cannam@125 4452 # Rational C++ 2.4.1
cannam@125 4453 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
cannam@125 4454 ;;
cannam@125 4455 cxx*)
cannam@125 4456 # Digital/Compaq C++
cannam@125 4457 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@125 4458 # Make sure the PIC flag is empty. It appears that all Alpha
cannam@125 4459 # Linux and Compaq Tru64 Unix objects are PIC.
cannam@125 4460 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
cannam@125 4461 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@125 4462 ;;
cannam@125 4463 *)
cannam@125 4464 ;;
cannam@125 4465 esac
cannam@125 4466 ;;
cannam@125 4467 psos*)
cannam@125 4468 ;;
cannam@125 4469 solaris*)
cannam@125 4470 case $cc_basename in
cannam@125 4471 CC* | sunCC*)
cannam@125 4472 # Sun C++ 4.2, 5.x and Centerline C++
cannam@125 4473 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@125 4474 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@125 4475 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
cannam@125 4476 ;;
cannam@125 4477 gcx*)
cannam@125 4478 # Green Hills C++ Compiler
cannam@125 4479 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
cannam@125 4480 ;;
cannam@125 4481 *)
cannam@125 4482 ;;
cannam@125 4483 esac
cannam@125 4484 ;;
cannam@125 4485 sunos4*)
cannam@125 4486 case $cc_basename in
cannam@125 4487 CC*)
cannam@125 4488 # Sun C++ 4.x
cannam@125 4489 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
cannam@125 4490 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@125 4491 ;;
cannam@125 4492 lcc*)
cannam@125 4493 # Lucid
cannam@125 4494 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
cannam@125 4495 ;;
cannam@125 4496 *)
cannam@125 4497 ;;
cannam@125 4498 esac
cannam@125 4499 ;;
cannam@125 4500 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
cannam@125 4501 case $cc_basename in
cannam@125 4502 CC*)
cannam@125 4503 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@125 4504 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@125 4505 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@125 4506 ;;
cannam@125 4507 esac
cannam@125 4508 ;;
cannam@125 4509 tandem*)
cannam@125 4510 case $cc_basename in
cannam@125 4511 NCC*)
cannam@125 4512 # NonStop-UX NCC 3.20
cannam@125 4513 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@125 4514 ;;
cannam@125 4515 *)
cannam@125 4516 ;;
cannam@125 4517 esac
cannam@125 4518 ;;
cannam@125 4519 vxworks*)
cannam@125 4520 ;;
cannam@125 4521 *)
cannam@125 4522 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
cannam@125 4523 ;;
cannam@125 4524 esac
cannam@125 4525 fi
cannam@125 4526 ],
cannam@125 4527 [
cannam@125 4528 if test yes = "$GCC"; then
cannam@125 4529 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@125 4530 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@125 4531
cannam@125 4532 case $host_os in
cannam@125 4533 aix*)
cannam@125 4534 # All AIX code is PIC.
cannam@125 4535 if test ia64 = "$host_cpu"; then
cannam@125 4536 # AIX 5 now supports IA64 processor
cannam@125 4537 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@125 4538 fi
cannam@125 4539 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@125 4540 ;;
cannam@125 4541
cannam@125 4542 amigaos*)
cannam@125 4543 case $host_cpu in
cannam@125 4544 powerpc)
cannam@125 4545 # see comment about AmigaOS4 .so support
cannam@125 4546 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@125 4547 ;;
cannam@125 4548 m68k)
cannam@125 4549 # FIXME: we need at least 68020 code to build shared libraries, but
cannam@125 4550 # adding the '-m68020' flag to GCC prevents building anything better,
cannam@125 4551 # like '-m68040'.
cannam@125 4552 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
cannam@125 4553 ;;
cannam@125 4554 esac
cannam@125 4555 ;;
cannam@125 4556
cannam@125 4557 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
cannam@125 4558 # PIC is the default for these OSes.
cannam@125 4559 ;;
cannam@125 4560
cannam@125 4561 mingw* | cygwin* | pw32* | os2* | cegcc*)
cannam@125 4562 # This hack is so that the source file can tell whether it is being
cannam@125 4563 # built for inclusion in a dll (and should export symbols for example).
cannam@125 4564 # Although the cygwin gcc ignores -fPIC, still need this for old-style
cannam@125 4565 # (--disable-auto-import) libraries
cannam@125 4566 m4_if([$1], [GCJ], [],
cannam@125 4567 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
cannam@125 4568 case $host_os in
cannam@125 4569 os2*)
cannam@125 4570 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
cannam@125 4571 ;;
cannam@125 4572 esac
cannam@125 4573 ;;
cannam@125 4574
cannam@125 4575 darwin* | rhapsody*)
cannam@125 4576 # PIC is the default on this platform
cannam@125 4577 # Common symbols not allowed in MH_DYLIB files
cannam@125 4578 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
cannam@125 4579 ;;
cannam@125 4580
cannam@125 4581 haiku*)
cannam@125 4582 # PIC is the default for Haiku.
cannam@125 4583 # The "-static" flag exists, but is broken.
cannam@125 4584 _LT_TAGVAR(lt_prog_compiler_static, $1)=
cannam@125 4585 ;;
cannam@125 4586
cannam@125 4587 hpux*)
cannam@125 4588 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
cannam@125 4589 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
cannam@125 4590 # sets the default TLS model and affects inlining.
cannam@125 4591 case $host_cpu in
cannam@125 4592 hppa*64*)
cannam@125 4593 # +Z the default
cannam@125 4594 ;;
cannam@125 4595 *)
cannam@125 4596 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@125 4597 ;;
cannam@125 4598 esac
cannam@125 4599 ;;
cannam@125 4600
cannam@125 4601 interix[[3-9]]*)
cannam@125 4602 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
cannam@125 4603 # Instead, we relocate shared libraries at runtime.
cannam@125 4604 ;;
cannam@125 4605
cannam@125 4606 msdosdjgpp*)
cannam@125 4607 # Just because we use GCC doesn't mean we suddenly get shared libraries
cannam@125 4608 # on systems that don't support them.
cannam@125 4609 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
cannam@125 4610 enable_shared=no
cannam@125 4611 ;;
cannam@125 4612
cannam@125 4613 *nto* | *qnx*)
cannam@125 4614 # QNX uses GNU C++, but need to define -shared option too, otherwise
cannam@125 4615 # it will coredump.
cannam@125 4616 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
cannam@125 4617 ;;
cannam@125 4618
cannam@125 4619 sysv4*MP*)
cannam@125 4620 if test -d /usr/nec; then
cannam@125 4621 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
cannam@125 4622 fi
cannam@125 4623 ;;
cannam@125 4624
cannam@125 4625 *)
cannam@125 4626 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@125 4627 ;;
cannam@125 4628 esac
cannam@125 4629
cannam@125 4630 case $cc_basename in
cannam@125 4631 nvcc*) # Cuda Compiler Driver 2.2
cannam@125 4632 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
cannam@125 4633 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
cannam@125 4634 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
cannam@125 4635 fi
cannam@125 4636 ;;
cannam@125 4637 esac
cannam@125 4638 else
cannam@125 4639 # PORTME Check for flag to pass linker flags through the system compiler.
cannam@125 4640 case $host_os in
cannam@125 4641 aix*)
cannam@125 4642 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@125 4643 if test ia64 = "$host_cpu"; then
cannam@125 4644 # AIX 5 now supports IA64 processor
cannam@125 4645 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@125 4646 else
cannam@125 4647 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
cannam@125 4648 fi
cannam@125 4649 ;;
cannam@125 4650
cannam@125 4651 darwin* | rhapsody*)
cannam@125 4652 # PIC is the default on this platform
cannam@125 4653 # Common symbols not allowed in MH_DYLIB files
cannam@125 4654 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
cannam@125 4655 case $cc_basename in
cannam@125 4656 nagfor*)
cannam@125 4657 # NAG Fortran compiler
cannam@125 4658 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
cannam@125 4659 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
cannam@125 4660 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@125 4661 ;;
cannam@125 4662 esac
cannam@125 4663 ;;
cannam@125 4664
cannam@125 4665 mingw* | cygwin* | pw32* | os2* | cegcc*)
cannam@125 4666 # This hack is so that the source file can tell whether it is being
cannam@125 4667 # built for inclusion in a dll (and should export symbols for example).
cannam@125 4668 m4_if([$1], [GCJ], [],
cannam@125 4669 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
cannam@125 4670 case $host_os in
cannam@125 4671 os2*)
cannam@125 4672 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
cannam@125 4673 ;;
cannam@125 4674 esac
cannam@125 4675 ;;
cannam@125 4676
cannam@125 4677 hpux9* | hpux10* | hpux11*)
cannam@125 4678 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@125 4679 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
cannam@125 4680 # not for PA HP-UX.
cannam@125 4681 case $host_cpu in
cannam@125 4682 hppa*64*|ia64*)
cannam@125 4683 # +Z the default
cannam@125 4684 ;;
cannam@125 4685 *)
cannam@125 4686 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
cannam@125 4687 ;;
cannam@125 4688 esac
cannam@125 4689 # Is there a better lt_prog_compiler_static that works with the bundled CC?
cannam@125 4690 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
cannam@125 4691 ;;
cannam@125 4692
cannam@125 4693 irix5* | irix6* | nonstopux*)
cannam@125 4694 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@125 4695 # PIC (with -KPIC) is the default.
cannam@125 4696 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@125 4697 ;;
cannam@125 4698
cannam@125 4699 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
cannam@125 4700 case $cc_basename in
cannam@125 4701 # old Intel for x86_64, which still supported -KPIC.
cannam@125 4702 ecc*)
cannam@125 4703 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@125 4704 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@125 4705 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@125 4706 ;;
cannam@125 4707 # icc used to be incompatible with GCC.
cannam@125 4708 # ICC 10 doesn't accept -KPIC any more.
cannam@125 4709 icc* | ifort*)
cannam@125 4710 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@125 4711 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@125 4712 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@125 4713 ;;
cannam@125 4714 # Lahey Fortran 8.1.
cannam@125 4715 lf95*)
cannam@125 4716 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@125 4717 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
cannam@125 4718 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
cannam@125 4719 ;;
cannam@125 4720 nagfor*)
cannam@125 4721 # NAG Fortran compiler
cannam@125 4722 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
cannam@125 4723 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
cannam@125 4724 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@125 4725 ;;
cannam@125 4726 tcc*)
cannam@125 4727 # Fabrice Bellard et al's Tiny C Compiler
cannam@125 4728 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@125 4729 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@125 4730 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@125 4731 ;;
cannam@125 4732 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
cannam@125 4733 # Portland Group compilers (*not* the Pentium gcc compiler,
cannam@125 4734 # which looks to be a dead project)
cannam@125 4735 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@125 4736 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
cannam@125 4737 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@125 4738 ;;
cannam@125 4739 ccc*)
cannam@125 4740 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@125 4741 # All Alpha code is PIC.
cannam@125 4742 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@125 4743 ;;
cannam@125 4744 xl* | bgxl* | bgf* | mpixl*)
cannam@125 4745 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
cannam@125 4746 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@125 4747 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
cannam@125 4748 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
cannam@125 4749 ;;
cannam@125 4750 *)
cannam@125 4751 case `$CC -V 2>&1 | sed 5q` in
cannam@125 4752 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
cannam@125 4753 # Sun Fortran 8.3 passes all unrecognized flags to the linker
cannam@125 4754 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@125 4755 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@125 4756 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
cannam@125 4757 ;;
cannam@125 4758 *Sun\ F* | *Sun*Fortran*)
cannam@125 4759 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@125 4760 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@125 4761 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
cannam@125 4762 ;;
cannam@125 4763 *Sun\ C*)
cannam@125 4764 # Sun C 5.9
cannam@125 4765 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@125 4766 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@125 4767 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@125 4768 ;;
cannam@125 4769 *Intel*\ [[CF]]*Compiler*)
cannam@125 4770 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@125 4771 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@125 4772 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@125 4773 ;;
cannam@125 4774 *Portland\ Group*)
cannam@125 4775 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@125 4776 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
cannam@125 4777 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@125 4778 ;;
cannam@125 4779 esac
cannam@125 4780 ;;
cannam@125 4781 esac
cannam@125 4782 ;;
cannam@125 4783
cannam@125 4784 newsos6)
cannam@125 4785 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@125 4786 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@125 4787 ;;
cannam@125 4788
cannam@125 4789 *nto* | *qnx*)
cannam@125 4790 # QNX uses GNU C++, but need to define -shared option too, otherwise
cannam@125 4791 # it will coredump.
cannam@125 4792 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
cannam@125 4793 ;;
cannam@125 4794
cannam@125 4795 osf3* | osf4* | osf5*)
cannam@125 4796 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@125 4797 # All OSF/1 code is PIC.
cannam@125 4798 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@125 4799 ;;
cannam@125 4800
cannam@125 4801 rdos*)
cannam@125 4802 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@125 4803 ;;
cannam@125 4804
cannam@125 4805 solaris*)
cannam@125 4806 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@125 4807 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@125 4808 case $cc_basename in
cannam@125 4809 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
cannam@125 4810 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
cannam@125 4811 *)
cannam@125 4812 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
cannam@125 4813 esac
cannam@125 4814 ;;
cannam@125 4815
cannam@125 4816 sunos4*)
cannam@125 4817 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
cannam@125 4818 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
cannam@125 4819 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@125 4820 ;;
cannam@125 4821
cannam@125 4822 sysv4 | sysv4.2uw2* | sysv4.3*)
cannam@125 4823 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@125 4824 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@125 4825 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@125 4826 ;;
cannam@125 4827
cannam@125 4828 sysv4*MP*)
cannam@125 4829 if test -d /usr/nec; then
cannam@125 4830 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
cannam@125 4831 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@125 4832 fi
cannam@125 4833 ;;
cannam@125 4834
cannam@125 4835 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
cannam@125 4836 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@125 4837 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@125 4838 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@125 4839 ;;
cannam@125 4840
cannam@125 4841 unicos*)
cannam@125 4842 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@125 4843 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
cannam@125 4844 ;;
cannam@125 4845
cannam@125 4846 uts4*)
cannam@125 4847 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
cannam@125 4848 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@125 4849 ;;
cannam@125 4850
cannam@125 4851 *)
cannam@125 4852 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
cannam@125 4853 ;;
cannam@125 4854 esac
cannam@125 4855 fi
cannam@125 4856 ])
cannam@125 4857 case $host_os in
cannam@125 4858 # For platforms that do not support PIC, -DPIC is meaningless:
cannam@125 4859 *djgpp*)
cannam@125 4860 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
cannam@125 4861 ;;
cannam@125 4862 *)
cannam@125 4863 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
cannam@125 4864 ;;
cannam@125 4865 esac
cannam@125 4866
cannam@125 4867 AC_CACHE_CHECK([for $compiler option to produce PIC],
cannam@125 4868 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
cannam@125 4869 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
cannam@125 4870 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
cannam@125 4871
cannam@125 4872 #
cannam@125 4873 # Check to make sure the PIC flag actually works.
cannam@125 4874 #
cannam@125 4875 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
cannam@125 4876 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
cannam@125 4877 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
cannam@125 4878 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
cannam@125 4879 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
cannam@125 4880 "" | " "*) ;;
cannam@125 4881 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
cannam@125 4882 esac],
cannam@125 4883 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
cannam@125 4884 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
cannam@125 4885 fi
cannam@125 4886 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
cannam@125 4887 [Additional compiler flags for building library objects])
cannam@125 4888
cannam@125 4889 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
cannam@125 4890 [How to pass a linker flag through the compiler])
cannam@125 4891 #
cannam@125 4892 # Check to make sure the static flag actually works.
cannam@125 4893 #
cannam@125 4894 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
cannam@125 4895 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
cannam@125 4896 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
cannam@125 4897 $lt_tmp_static_flag,
cannam@125 4898 [],
cannam@125 4899 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
cannam@125 4900 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
cannam@125 4901 [Compiler flag to prevent dynamic linking])
cannam@125 4902 ])# _LT_COMPILER_PIC
cannam@125 4903
cannam@125 4904
cannam@125 4905 # _LT_LINKER_SHLIBS([TAGNAME])
cannam@125 4906 # ----------------------------
cannam@125 4907 # See if the linker supports building shared libraries.
cannam@125 4908 m4_defun([_LT_LINKER_SHLIBS],
cannam@125 4909 [AC_REQUIRE([LT_PATH_LD])dnl
cannam@125 4910 AC_REQUIRE([LT_PATH_NM])dnl
cannam@125 4911 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
cannam@125 4912 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@125 4913 m4_require([_LT_DECL_EGREP])dnl
cannam@125 4914 m4_require([_LT_DECL_SED])dnl
cannam@125 4915 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
cannam@125 4916 m4_require([_LT_TAG_COMPILER])dnl
cannam@125 4917 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
cannam@125 4918 m4_if([$1], [CXX], [
cannam@125 4919 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
cannam@125 4920 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
cannam@125 4921 case $host_os in
cannam@125 4922 aix[[4-9]]*)
cannam@125 4923 # If we're using GNU nm, then we don't want the "-C" option.
cannam@125 4924 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
cannam@125 4925 # Without the "-l" option, or with the "-B" option, AIX nm treats
cannam@125 4926 # weak defined symbols like other global defined symbols, whereas
cannam@125 4927 # GNU nm marks them as "W".
cannam@125 4928 # While the 'weak' keyword is ignored in the Export File, we need
cannam@125 4929 # it in the Import File for the 'aix-soname' feature, so we have
cannam@125 4930 # to replace the "-B" option with "-P" for AIX nm.
cannam@125 4931 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
cannam@125 4932 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
cannam@125 4933 else
cannam@125 4934 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
cannam@125 4935 fi
cannam@125 4936 ;;
cannam@125 4937 pw32*)
cannam@125 4938 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
cannam@125 4939 ;;
cannam@125 4940 cygwin* | mingw* | cegcc*)
cannam@125 4941 case $cc_basename in
cannam@125 4942 cl*)
cannam@125 4943 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
cannam@125 4944 ;;
cannam@125 4945 *)
cannam@125 4946 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
cannam@125 4947 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
cannam@125 4948 ;;
cannam@125 4949 esac
cannam@125 4950 ;;
cannam@125 4951 linux* | k*bsd*-gnu | gnu*)
cannam@125 4952 _LT_TAGVAR(link_all_deplibs, $1)=no
cannam@125 4953 ;;
cannam@125 4954 *)
cannam@125 4955 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
cannam@125 4956 ;;
cannam@125 4957 esac
cannam@125 4958 ], [
cannam@125 4959 runpath_var=
cannam@125 4960 _LT_TAGVAR(allow_undefined_flag, $1)=
cannam@125 4961 _LT_TAGVAR(always_export_symbols, $1)=no
cannam@125 4962 _LT_TAGVAR(archive_cmds, $1)=
cannam@125 4963 _LT_TAGVAR(archive_expsym_cmds, $1)=
cannam@125 4964 _LT_TAGVAR(compiler_needs_object, $1)=no
cannam@125 4965 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
cannam@125 4966 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
cannam@125 4967 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
cannam@125 4968 _LT_TAGVAR(hardcode_automatic, $1)=no
cannam@125 4969 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@125 4970 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
cannam@125 4971 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
cannam@125 4972 _LT_TAGVAR(hardcode_libdir_separator, $1)=
cannam@125 4973 _LT_TAGVAR(hardcode_minus_L, $1)=no
cannam@125 4974 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
cannam@125 4975 _LT_TAGVAR(inherit_rpath, $1)=no
cannam@125 4976 _LT_TAGVAR(link_all_deplibs, $1)=unknown
cannam@125 4977 _LT_TAGVAR(module_cmds, $1)=
cannam@125 4978 _LT_TAGVAR(module_expsym_cmds, $1)=
cannam@125 4979 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
cannam@125 4980 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
cannam@125 4981 _LT_TAGVAR(thread_safe_flag_spec, $1)=
cannam@125 4982 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@125 4983 # include_expsyms should be a list of space-separated symbols to be *always*
cannam@125 4984 # included in the symbol list
cannam@125 4985 _LT_TAGVAR(include_expsyms, $1)=
cannam@125 4986 # exclude_expsyms can be an extended regexp of symbols to exclude
cannam@125 4987 # it will be wrapped by ' (' and ')$', so one must not match beginning or
cannam@125 4988 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
cannam@125 4989 # as well as any symbol that contains 'd'.
cannam@125 4990 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
cannam@125 4991 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
cannam@125 4992 # platforms (ab)use it in PIC code, but their linkers get confused if
cannam@125 4993 # the symbol is explicitly referenced. Since portable code cannot
cannam@125 4994 # rely on this symbol name, it's probably fine to never include it in
cannam@125 4995 # preloaded symbol tables.
cannam@125 4996 # Exclude shared library initialization/finalization symbols.
cannam@125 4997 dnl Note also adjust exclude_expsyms for C++ above.
cannam@125 4998 extract_expsyms_cmds=
cannam@125 4999
cannam@125 5000 case $host_os in
cannam@125 5001 cygwin* | mingw* | pw32* | cegcc*)
cannam@125 5002 # FIXME: the MSVC++ port hasn't been tested in a loooong time
cannam@125 5003 # When not using gcc, we currently assume that we are using
cannam@125 5004 # Microsoft Visual C++.
cannam@125 5005 if test yes != "$GCC"; then
cannam@125 5006 with_gnu_ld=no
cannam@125 5007 fi
cannam@125 5008 ;;
cannam@125 5009 interix*)
cannam@125 5010 # we just hope/assume this is gcc and not c89 (= MSVC++)
cannam@125 5011 with_gnu_ld=yes
cannam@125 5012 ;;
cannam@125 5013 openbsd* | bitrig*)
cannam@125 5014 with_gnu_ld=no
cannam@125 5015 ;;
cannam@125 5016 linux* | k*bsd*-gnu | gnu*)
cannam@125 5017 _LT_TAGVAR(link_all_deplibs, $1)=no
cannam@125 5018 ;;
cannam@125 5019 esac
cannam@125 5020
cannam@125 5021 _LT_TAGVAR(ld_shlibs, $1)=yes
cannam@125 5022
cannam@125 5023 # On some targets, GNU ld is compatible enough with the native linker
cannam@125 5024 # that we're better off using the native interface for both.
cannam@125 5025 lt_use_gnu_ld_interface=no
cannam@125 5026 if test yes = "$with_gnu_ld"; then
cannam@125 5027 case $host_os in
cannam@125 5028 aix*)
cannam@125 5029 # The AIX port of GNU ld has always aspired to compatibility
cannam@125 5030 # with the native linker. However, as the warning in the GNU ld
cannam@125 5031 # block says, versions before 2.19.5* couldn't really create working
cannam@125 5032 # shared libraries, regardless of the interface used.
cannam@125 5033 case `$LD -v 2>&1` in
cannam@125 5034 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
cannam@125 5035 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
cannam@125 5036 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
cannam@125 5037 *)
cannam@125 5038 lt_use_gnu_ld_interface=yes
cannam@125 5039 ;;
cannam@125 5040 esac
cannam@125 5041 ;;
cannam@125 5042 *)
cannam@125 5043 lt_use_gnu_ld_interface=yes
cannam@125 5044 ;;
cannam@125 5045 esac
cannam@125 5046 fi
cannam@125 5047
cannam@125 5048 if test yes = "$lt_use_gnu_ld_interface"; then
cannam@125 5049 # If archive_cmds runs LD, not CC, wlarc should be empty
cannam@125 5050 wlarc='$wl'
cannam@125 5051
cannam@125 5052 # Set some defaults for GNU ld with shared library support. These
cannam@125 5053 # are reset later if shared libraries are not supported. Putting them
cannam@125 5054 # here allows them to be overridden if necessary.
cannam@125 5055 runpath_var=LD_RUN_PATH
cannam@125 5056 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@125 5057 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
cannam@125 5058 # ancient GNU ld didn't support --whole-archive et. al.
cannam@125 5059 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
cannam@125 5060 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
cannam@125 5061 else
cannam@125 5062 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@125 5063 fi
cannam@125 5064 supports_anon_versioning=no
cannam@125 5065 case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
cannam@125 5066 *GNU\ gold*) supports_anon_versioning=yes ;;
cannam@125 5067 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
cannam@125 5068 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
cannam@125 5069 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
cannam@125 5070 *\ 2.11.*) ;; # other 2.11 versions
cannam@125 5071 *) supports_anon_versioning=yes ;;
cannam@125 5072 esac
cannam@125 5073
cannam@125 5074 # See if GNU ld supports shared libraries.
cannam@125 5075 case $host_os in
cannam@125 5076 aix[[3-9]]*)
cannam@125 5077 # On AIX/PPC, the GNU linker is very broken
cannam@125 5078 if test ia64 != "$host_cpu"; then
cannam@125 5079 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 5080 cat <<_LT_EOF 1>&2
cannam@125 5081
cannam@125 5082 *** Warning: the GNU linker, at least up to release 2.19, is reported
cannam@125 5083 *** to be unable to reliably create shared libraries on AIX.
cannam@125 5084 *** Therefore, libtool is disabling shared libraries support. If you
cannam@125 5085 *** really care for shared libraries, you may want to install binutils
cannam@125 5086 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
cannam@125 5087 *** You will then need to restart the configuration process.
cannam@125 5088
cannam@125 5089 _LT_EOF
cannam@125 5090 fi
cannam@125 5091 ;;
cannam@125 5092
cannam@125 5093 amigaos*)
cannam@125 5094 case $host_cpu in
cannam@125 5095 powerpc)
cannam@125 5096 # see comment about AmigaOS4 .so support
cannam@125 5097 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@125 5098 _LT_TAGVAR(archive_expsym_cmds, $1)=''
cannam@125 5099 ;;
cannam@125 5100 m68k)
cannam@125 5101 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
cannam@125 5102 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@125 5103 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@125 5104 ;;
cannam@125 5105 esac
cannam@125 5106 ;;
cannam@125 5107
cannam@125 5108 beos*)
cannam@125 5109 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
cannam@125 5110 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@125 5111 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
cannam@125 5112 # support --undefined. This deserves some investigation. FIXME
cannam@125 5113 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@125 5114 else
cannam@125 5115 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 5116 fi
cannam@125 5117 ;;
cannam@125 5118
cannam@125 5119 cygwin* | mingw* | pw32* | cegcc*)
cannam@125 5120 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
cannam@125 5121 # as there is no search path for DLLs.
cannam@125 5122 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@125 5123 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
cannam@125 5124 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@125 5125 _LT_TAGVAR(always_export_symbols, $1)=no
cannam@125 5126 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@125 5127 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
cannam@125 5128 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
cannam@125 5129
cannam@125 5130 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
cannam@125 5131 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
cannam@125 5132 # If the export-symbols file already is a .def file, use it as
cannam@125 5133 # is; otherwise, prepend EXPORTS...
cannam@125 5134 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
cannam@125 5135 cp $export_symbols $output_objdir/$soname.def;
cannam@125 5136 else
cannam@125 5137 echo EXPORTS > $output_objdir/$soname.def;
cannam@125 5138 cat $export_symbols >> $output_objdir/$soname.def;
cannam@125 5139 fi~
cannam@125 5140 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
cannam@125 5141 else
cannam@125 5142 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 5143 fi
cannam@125 5144 ;;
cannam@125 5145
cannam@125 5146 haiku*)
cannam@125 5147 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@125 5148 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@125 5149 ;;
cannam@125 5150
cannam@125 5151 os2*)
cannam@125 5152 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@125 5153 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@125 5154 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@125 5155 shrext_cmds=.dll
cannam@125 5156 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
cannam@125 5157 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
cannam@125 5158 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
cannam@125 5159 $ECHO EXPORTS >> $output_objdir/$libname.def~
cannam@125 5160 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
cannam@125 5161 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
cannam@125 5162 emximp -o $lib $output_objdir/$libname.def'
cannam@125 5163 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
cannam@125 5164 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
cannam@125 5165 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
cannam@125 5166 $ECHO EXPORTS >> $output_objdir/$libname.def~
cannam@125 5167 prefix_cmds="$SED"~
cannam@125 5168 if test EXPORTS = "`$SED 1q $export_symbols`"; then
cannam@125 5169 prefix_cmds="$prefix_cmds -e 1d";
cannam@125 5170 fi~
cannam@125 5171 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
cannam@125 5172 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
cannam@125 5173 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
cannam@125 5174 emximp -o $lib $output_objdir/$libname.def'
cannam@125 5175 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
cannam@125 5176 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@125 5177 ;;
cannam@125 5178
cannam@125 5179 interix[[3-9]]*)
cannam@125 5180 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@125 5181 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@125 5182 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
cannam@125 5183 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
cannam@125 5184 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
cannam@125 5185 # Instead, shared libraries are loaded at an image base (0x10000000 by
cannam@125 5186 # default) and relocated if they conflict, which is a slow very memory
cannam@125 5187 # consuming and fragmenting process. To avoid this, we pick a random,
cannam@125 5188 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
cannam@125 5189 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
cannam@125 5190 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
cannam@125 5191 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
cannam@125 5192 ;;
cannam@125 5193
cannam@125 5194 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
cannam@125 5195 tmp_diet=no
cannam@125 5196 if test linux-dietlibc = "$host_os"; then
cannam@125 5197 case $cc_basename in
cannam@125 5198 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
cannam@125 5199 esac
cannam@125 5200 fi
cannam@125 5201 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
cannam@125 5202 && test no = "$tmp_diet"
cannam@125 5203 then
cannam@125 5204 tmp_addflag=' $pic_flag'
cannam@125 5205 tmp_sharedflag='-shared'
cannam@125 5206 case $cc_basename,$host_cpu in
cannam@125 5207 pgcc*) # Portland Group C compiler
cannam@125 5208 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
cannam@125 5209 tmp_addflag=' $pic_flag'
cannam@125 5210 ;;
cannam@125 5211 pgf77* | pgf90* | pgf95* | pgfortran*)
cannam@125 5212 # Portland Group f77 and f90 compilers
cannam@125 5213 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
cannam@125 5214 tmp_addflag=' $pic_flag -Mnomain' ;;
cannam@125 5215 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
cannam@125 5216 tmp_addflag=' -i_dynamic' ;;
cannam@125 5217 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
cannam@125 5218 tmp_addflag=' -i_dynamic -nofor_main' ;;
cannam@125 5219 ifc* | ifort*) # Intel Fortran compiler
cannam@125 5220 tmp_addflag=' -nofor_main' ;;
cannam@125 5221 lf95*) # Lahey Fortran 8.1
cannam@125 5222 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@125 5223 tmp_sharedflag='--shared' ;;
cannam@125 5224 nagfor*) # NAGFOR 5.3
cannam@125 5225 tmp_sharedflag='-Wl,-shared' ;;
cannam@125 5226 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
cannam@125 5227 tmp_sharedflag='-qmkshrobj'
cannam@125 5228 tmp_addflag= ;;
cannam@125 5229 nvcc*) # Cuda Compiler Driver 2.2
cannam@125 5230 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
cannam@125 5231 _LT_TAGVAR(compiler_needs_object, $1)=yes
cannam@125 5232 ;;
cannam@125 5233 esac
cannam@125 5234 case `$CC -V 2>&1 | sed 5q` in
cannam@125 5235 *Sun\ C*) # Sun C 5.9
cannam@125 5236 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
cannam@125 5237 _LT_TAGVAR(compiler_needs_object, $1)=yes
cannam@125 5238 tmp_sharedflag='-G' ;;
cannam@125 5239 *Sun\ F*) # Sun Fortran 8.3
cannam@125 5240 tmp_sharedflag='-G' ;;
cannam@125 5241 esac
cannam@125 5242 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@125 5243
cannam@125 5244 if test yes = "$supports_anon_versioning"; then
cannam@125 5245 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
cannam@125 5246 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
cannam@125 5247 echo "local: *; };" >> $output_objdir/$libname.ver~
cannam@125 5248 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
cannam@125 5249 fi
cannam@125 5250
cannam@125 5251 case $cc_basename in
cannam@125 5252 tcc*)
cannam@125 5253 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
cannam@125 5254 ;;
cannam@125 5255 xlf* | bgf* | bgxlf* | mpixlf*)
cannam@125 5256 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
cannam@125 5257 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
cannam@125 5258 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@125 5259 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
cannam@125 5260 if test yes = "$supports_anon_versioning"; then
cannam@125 5261 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
cannam@125 5262 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
cannam@125 5263 echo "local: *; };" >> $output_objdir/$libname.ver~
cannam@125 5264 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
cannam@125 5265 fi
cannam@125 5266 ;;
cannam@125 5267 esac
cannam@125 5268 else
cannam@125 5269 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 5270 fi
cannam@125 5271 ;;
cannam@125 5272
cannam@125 5273 netbsd* | netbsdelf*-gnu)
cannam@125 5274 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
cannam@125 5275 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
cannam@125 5276 wlarc=
cannam@125 5277 else
cannam@125 5278 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@125 5279 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
cannam@125 5280 fi
cannam@125 5281 ;;
cannam@125 5282
cannam@125 5283 solaris*)
cannam@125 5284 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
cannam@125 5285 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 5286 cat <<_LT_EOF 1>&2
cannam@125 5287
cannam@125 5288 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
cannam@125 5289 *** create shared libraries on Solaris systems. Therefore, libtool
cannam@125 5290 *** is disabling shared libraries support. We urge you to upgrade GNU
cannam@125 5291 *** binutils to release 2.9.1 or newer. Another option is to modify
cannam@125 5292 *** your PATH or compiler configuration so that the native linker is
cannam@125 5293 *** used, and then restart.
cannam@125 5294
cannam@125 5295 _LT_EOF
cannam@125 5296 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
cannam@125 5297 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@125 5298 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
cannam@125 5299 else
cannam@125 5300 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 5301 fi
cannam@125 5302 ;;
cannam@125 5303
cannam@125 5304 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
cannam@125 5305 case `$LD -v 2>&1` in
cannam@125 5306 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
cannam@125 5307 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 5308 cat <<_LT_EOF 1>&2
cannam@125 5309
cannam@125 5310 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
cannam@125 5311 *** reliably create shared libraries on SCO systems. Therefore, libtool
cannam@125 5312 *** is disabling shared libraries support. We urge you to upgrade GNU
cannam@125 5313 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
cannam@125 5314 *** your PATH or compiler configuration so that the native linker is
cannam@125 5315 *** used, and then restart.
cannam@125 5316
cannam@125 5317 _LT_EOF
cannam@125 5318 ;;
cannam@125 5319 *)
cannam@125 5320 # For security reasons, it is highly recommended that you always
cannam@125 5321 # use absolute paths for naming shared libraries, and exclude the
cannam@125 5322 # DT_RUNPATH tag from executables and libraries. But doing so
cannam@125 5323 # requires that you compile everything twice, which is a pain.
cannam@125 5324 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
cannam@125 5325 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@125 5326 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@125 5327 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
cannam@125 5328 else
cannam@125 5329 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 5330 fi
cannam@125 5331 ;;
cannam@125 5332 esac
cannam@125 5333 ;;
cannam@125 5334
cannam@125 5335 sunos4*)
cannam@125 5336 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
cannam@125 5337 wlarc=
cannam@125 5338 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@125 5339 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@125 5340 ;;
cannam@125 5341
cannam@125 5342 *)
cannam@125 5343 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
cannam@125 5344 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@125 5345 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
cannam@125 5346 else
cannam@125 5347 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 5348 fi
cannam@125 5349 ;;
cannam@125 5350 esac
cannam@125 5351
cannam@125 5352 if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
cannam@125 5353 runpath_var=
cannam@125 5354 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
cannam@125 5355 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
cannam@125 5356 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@125 5357 fi
cannam@125 5358 else
cannam@125 5359 # PORTME fill in a description of your system's linker (not GNU ld)
cannam@125 5360 case $host_os in
cannam@125 5361 aix3*)
cannam@125 5362 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@125 5363 _LT_TAGVAR(always_export_symbols, $1)=yes
cannam@125 5364 _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
cannam@125 5365 # Note: this linker hardcodes the directories in LIBPATH if there
cannam@125 5366 # are no directories specified by -L.
cannam@125 5367 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@125 5368 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
cannam@125 5369 # Neither direct hardcoding nor static linking is supported with a
cannam@125 5370 # broken collect2.
cannam@125 5371 _LT_TAGVAR(hardcode_direct, $1)=unsupported
cannam@125 5372 fi
cannam@125 5373 ;;
cannam@125 5374
cannam@125 5375 aix[[4-9]]*)
cannam@125 5376 if test ia64 = "$host_cpu"; then
cannam@125 5377 # On IA64, the linker does run time linking by default, so we don't
cannam@125 5378 # have to do anything special.
cannam@125 5379 aix_use_runtimelinking=no
cannam@125 5380 exp_sym_flag='-Bexport'
cannam@125 5381 no_entry_flag=
cannam@125 5382 else
cannam@125 5383 # If we're using GNU nm, then we don't want the "-C" option.
cannam@125 5384 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
cannam@125 5385 # Without the "-l" option, or with the "-B" option, AIX nm treats
cannam@125 5386 # weak defined symbols like other global defined symbols, whereas
cannam@125 5387 # GNU nm marks them as "W".
cannam@125 5388 # While the 'weak' keyword is ignored in the Export File, we need
cannam@125 5389 # it in the Import File for the 'aix-soname' feature, so we have
cannam@125 5390 # to replace the "-B" option with "-P" for AIX nm.
cannam@125 5391 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
cannam@125 5392 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
cannam@125 5393 else
cannam@125 5394 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
cannam@125 5395 fi
cannam@125 5396 aix_use_runtimelinking=no
cannam@125 5397
cannam@125 5398 # Test if we are trying to use run time linking or normal
cannam@125 5399 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
cannam@125 5400 # have runtime linking enabled, and use it for executables.
cannam@125 5401 # For shared libraries, we enable/disable runtime linking
cannam@125 5402 # depending on the kind of the shared library created -
cannam@125 5403 # when "with_aix_soname,aix_use_runtimelinking" is:
cannam@125 5404 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
cannam@125 5405 # "aix,yes" lib.so shared, rtl:yes, for executables
cannam@125 5406 # lib.a static archive
cannam@125 5407 # "both,no" lib.so.V(shr.o) shared, rtl:yes
cannam@125 5408 # lib.a(lib.so.V) shared, rtl:no, for executables
cannam@125 5409 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
cannam@125 5410 # lib.a(lib.so.V) shared, rtl:no
cannam@125 5411 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
cannam@125 5412 # lib.a static archive
cannam@125 5413 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
cannam@125 5414 for ld_flag in $LDFLAGS; do
cannam@125 5415 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
cannam@125 5416 aix_use_runtimelinking=yes
cannam@125 5417 break
cannam@125 5418 fi
cannam@125 5419 done
cannam@125 5420 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
cannam@125 5421 # With aix-soname=svr4, we create the lib.so.V shared archives only,
cannam@125 5422 # so we don't have lib.a shared libs to link our executables.
cannam@125 5423 # We have to force runtime linking in this case.
cannam@125 5424 aix_use_runtimelinking=yes
cannam@125 5425 LDFLAGS="$LDFLAGS -Wl,-brtl"
cannam@125 5426 fi
cannam@125 5427 ;;
cannam@125 5428 esac
cannam@125 5429
cannam@125 5430 exp_sym_flag='-bexport'
cannam@125 5431 no_entry_flag='-bnoentry'
cannam@125 5432 fi
cannam@125 5433
cannam@125 5434 # When large executables or shared objects are built, AIX ld can
cannam@125 5435 # have problems creating the table of contents. If linking a library
cannam@125 5436 # or program results in "error TOC overflow" add -mminimal-toc to
cannam@125 5437 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
cannam@125 5438 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
cannam@125 5439
cannam@125 5440 _LT_TAGVAR(archive_cmds, $1)=''
cannam@125 5441 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@125 5442 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
cannam@125 5443 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
cannam@125 5444 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@125 5445 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
cannam@125 5446 case $with_aix_soname,$aix_use_runtimelinking in
cannam@125 5447 aix,*) ;; # traditional, no import file
cannam@125 5448 svr4,* | *,yes) # use import file
cannam@125 5449 # The Import File defines what to hardcode.
cannam@125 5450 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@125 5451 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
cannam@125 5452 ;;
cannam@125 5453 esac
cannam@125 5454
cannam@125 5455 if test yes = "$GCC"; then
cannam@125 5456 case $host_os in aix4.[[012]]|aix4.[[012]].*)
cannam@125 5457 # We only want to do this on AIX 4.2 and lower, the check
cannam@125 5458 # below for broken collect2 doesn't work under 4.3+
cannam@125 5459 collect2name=`$CC -print-prog-name=collect2`
cannam@125 5460 if test -f "$collect2name" &&
cannam@125 5461 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
cannam@125 5462 then
cannam@125 5463 # We have reworked collect2
cannam@125 5464 :
cannam@125 5465 else
cannam@125 5466 # We have old collect2
cannam@125 5467 _LT_TAGVAR(hardcode_direct, $1)=unsupported
cannam@125 5468 # It fails to find uninstalled libraries when the uninstalled
cannam@125 5469 # path is not listed in the libpath. Setting hardcode_minus_L
cannam@125 5470 # to unsupported forces relinking
cannam@125 5471 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@125 5472 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@125 5473 _LT_TAGVAR(hardcode_libdir_separator, $1)=
cannam@125 5474 fi
cannam@125 5475 ;;
cannam@125 5476 esac
cannam@125 5477 shared_flag='-shared'
cannam@125 5478 if test yes = "$aix_use_runtimelinking"; then
cannam@125 5479 shared_flag="$shared_flag "'$wl-G'
cannam@125 5480 fi
cannam@125 5481 # Need to ensure runtime linking is disabled for the traditional
cannam@125 5482 # shared library, or the linker may eventually find shared libraries
cannam@125 5483 # /with/ Import File - we do not want to mix them.
cannam@125 5484 shared_flag_aix='-shared'
cannam@125 5485 shared_flag_svr4='-shared $wl-G'
cannam@125 5486 else
cannam@125 5487 # not using gcc
cannam@125 5488 if test ia64 = "$host_cpu"; then
cannam@125 5489 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
cannam@125 5490 # chokes on -Wl,-G. The following line is correct:
cannam@125 5491 shared_flag='-G'
cannam@125 5492 else
cannam@125 5493 if test yes = "$aix_use_runtimelinking"; then
cannam@125 5494 shared_flag='$wl-G'
cannam@125 5495 else
cannam@125 5496 shared_flag='$wl-bM:SRE'
cannam@125 5497 fi
cannam@125 5498 shared_flag_aix='$wl-bM:SRE'
cannam@125 5499 shared_flag_svr4='$wl-G'
cannam@125 5500 fi
cannam@125 5501 fi
cannam@125 5502
cannam@125 5503 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
cannam@125 5504 # It seems that -bexpall does not export symbols beginning with
cannam@125 5505 # underscore (_), so it is better to generate a list of symbols to export.
cannam@125 5506 _LT_TAGVAR(always_export_symbols, $1)=yes
cannam@125 5507 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
cannam@125 5508 # Warning - without using the other runtime loading flags (-brtl),
cannam@125 5509 # -berok will link without error, but may produce a broken library.
cannam@125 5510 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
cannam@125 5511 # Determine the default libpath from the value encoded in an
cannam@125 5512 # empty executable.
cannam@125 5513 _LT_SYS_MODULE_PATH_AIX([$1])
cannam@125 5514 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
cannam@125 5515 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
cannam@125 5516 else
cannam@125 5517 if test ia64 = "$host_cpu"; then
cannam@125 5518 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
cannam@125 5519 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
cannam@125 5520 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
cannam@125 5521 else
cannam@125 5522 # Determine the default libpath from the value encoded in an
cannam@125 5523 # empty executable.
cannam@125 5524 _LT_SYS_MODULE_PATH_AIX([$1])
cannam@125 5525 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
cannam@125 5526 # Warning - without using the other run time loading flags,
cannam@125 5527 # -berok will link without error, but may produce a broken library.
cannam@125 5528 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
cannam@125 5529 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
cannam@125 5530 if test yes = "$with_gnu_ld"; then
cannam@125 5531 # We only use this code for GNU lds that support --whole-archive.
cannam@125 5532 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
cannam@125 5533 else
cannam@125 5534 # Exported symbols can be pulled into shared objects from archives
cannam@125 5535 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
cannam@125 5536 fi
cannam@125 5537 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
cannam@125 5538 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
cannam@125 5539 # -brtl affects multiple linker settings, -berok does not and is overridden later
cannam@125 5540 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
cannam@125 5541 if test svr4 != "$with_aix_soname"; then
cannam@125 5542 # This is similar to how AIX traditionally builds its shared libraries.
cannam@125 5543 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
cannam@125 5544 fi
cannam@125 5545 if test aix != "$with_aix_soname"; then
cannam@125 5546 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
cannam@125 5547 else
cannam@125 5548 # used by -dlpreopen to get the symbols
cannam@125 5549 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
cannam@125 5550 fi
cannam@125 5551 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
cannam@125 5552 fi
cannam@125 5553 fi
cannam@125 5554 ;;
cannam@125 5555
cannam@125 5556 amigaos*)
cannam@125 5557 case $host_cpu in
cannam@125 5558 powerpc)
cannam@125 5559 # see comment about AmigaOS4 .so support
cannam@125 5560 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@125 5561 _LT_TAGVAR(archive_expsym_cmds, $1)=''
cannam@125 5562 ;;
cannam@125 5563 m68k)
cannam@125 5564 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
cannam@125 5565 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@125 5566 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@125 5567 ;;
cannam@125 5568 esac
cannam@125 5569 ;;
cannam@125 5570
cannam@125 5571 bsdi[[45]]*)
cannam@125 5572 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
cannam@125 5573 ;;
cannam@125 5574
cannam@125 5575 cygwin* | mingw* | pw32* | cegcc*)
cannam@125 5576 # When not using gcc, we currently assume that we are using
cannam@125 5577 # Microsoft Visual C++.
cannam@125 5578 # hardcode_libdir_flag_spec is actually meaningless, as there is
cannam@125 5579 # no search path for DLLs.
cannam@125 5580 case $cc_basename in
cannam@125 5581 cl*)
cannam@125 5582 # Native MSVC
cannam@125 5583 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
cannam@125 5584 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@125 5585 _LT_TAGVAR(always_export_symbols, $1)=yes
cannam@125 5586 _LT_TAGVAR(file_list_spec, $1)='@'
cannam@125 5587 # Tell ltmain to make .lib files, not .a files.
cannam@125 5588 libext=lib
cannam@125 5589 # Tell ltmain to make .dll files, not .so files.
cannam@125 5590 shrext_cmds=.dll
cannam@125 5591 # FIXME: Setting linknames here is a bad hack.
cannam@125 5592 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
cannam@125 5593 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
cannam@125 5594 cp "$export_symbols" "$output_objdir/$soname.def";
cannam@125 5595 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
cannam@125 5596 else
cannam@125 5597 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
cannam@125 5598 fi~
cannam@125 5599 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
cannam@125 5600 linknames='
cannam@125 5601 # The linker will not automatically build a static lib if we build a DLL.
cannam@125 5602 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
cannam@125 5603 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@125 5604 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
cannam@125 5605 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
cannam@125 5606 # Don't use ranlib
cannam@125 5607 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
cannam@125 5608 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
cannam@125 5609 lt_tool_outputfile="@TOOL_OUTPUT@"~
cannam@125 5610 case $lt_outputfile in
cannam@125 5611 *.exe|*.EXE) ;;
cannam@125 5612 *)
cannam@125 5613 lt_outputfile=$lt_outputfile.exe
cannam@125 5614 lt_tool_outputfile=$lt_tool_outputfile.exe
cannam@125 5615 ;;
cannam@125 5616 esac~
cannam@125 5617 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
cannam@125 5618 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
cannam@125 5619 $RM "$lt_outputfile.manifest";
cannam@125 5620 fi'
cannam@125 5621 ;;
cannam@125 5622 *)
cannam@125 5623 # Assume MSVC wrapper
cannam@125 5624 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
cannam@125 5625 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@125 5626 # Tell ltmain to make .lib files, not .a files.
cannam@125 5627 libext=lib
cannam@125 5628 # Tell ltmain to make .dll files, not .so files.
cannam@125 5629 shrext_cmds=.dll
cannam@125 5630 # FIXME: Setting linknames here is a bad hack.
cannam@125 5631 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
cannam@125 5632 # The linker will automatically build a .lib file if we build a DLL.
cannam@125 5633 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
cannam@125 5634 # FIXME: Should let the user specify the lib program.
cannam@125 5635 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
cannam@125 5636 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@125 5637 ;;
cannam@125 5638 esac
cannam@125 5639 ;;
cannam@125 5640
cannam@125 5641 darwin* | rhapsody*)
cannam@125 5642 _LT_DARWIN_LINKER_FEATURES($1)
cannam@125 5643 ;;
cannam@125 5644
cannam@125 5645 dgux*)
cannam@125 5646 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@125 5647 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@125 5648 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@125 5649 ;;
cannam@125 5650
cannam@125 5651 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
cannam@125 5652 # support. Future versions do this automatically, but an explicit c++rt0.o
cannam@125 5653 # does not break anything, and helps significantly (at the cost of a little
cannam@125 5654 # extra space).
cannam@125 5655 freebsd2.2*)
cannam@125 5656 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
cannam@125 5657 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@125 5658 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@125 5659 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@125 5660 ;;
cannam@125 5661
cannam@125 5662 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
cannam@125 5663 freebsd2.*)
cannam@125 5664 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
cannam@125 5665 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@125 5666 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@125 5667 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@125 5668 ;;
cannam@125 5669
cannam@125 5670 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
cannam@125 5671 freebsd* | dragonfly*)
cannam@125 5672 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
cannam@125 5673 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@125 5674 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@125 5675 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@125 5676 ;;
cannam@125 5677
cannam@125 5678 hpux9*)
cannam@125 5679 if test yes = "$GCC"; then
cannam@125 5680 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
cannam@125 5681 else
cannam@125 5682 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
cannam@125 5683 fi
cannam@125 5684 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
cannam@125 5685 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@125 5686 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@125 5687
cannam@125 5688 # hardcode_minus_L: Not really in the search PATH,
cannam@125 5689 # but as the default location of the library.
cannam@125 5690 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@125 5691 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
cannam@125 5692 ;;
cannam@125 5693
cannam@125 5694 hpux10*)
cannam@125 5695 if test yes,no = "$GCC,$with_gnu_ld"; then
cannam@125 5696 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
cannam@125 5697 else
cannam@125 5698 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
cannam@125 5699 fi
cannam@125 5700 if test no = "$with_gnu_ld"; then
cannam@125 5701 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
cannam@125 5702 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@125 5703 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@125 5704 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
cannam@125 5705 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
cannam@125 5706 # hardcode_minus_L: Not really in the search PATH,
cannam@125 5707 # but as the default location of the library.
cannam@125 5708 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@125 5709 fi
cannam@125 5710 ;;
cannam@125 5711
cannam@125 5712 hpux11*)
cannam@125 5713 if test yes,no = "$GCC,$with_gnu_ld"; then
cannam@125 5714 case $host_cpu in
cannam@125 5715 hppa*64*)
cannam@125 5716 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@125 5717 ;;
cannam@125 5718 ia64*)
cannam@125 5719 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
cannam@125 5720 ;;
cannam@125 5721 *)
cannam@125 5722 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
cannam@125 5723 ;;
cannam@125 5724 esac
cannam@125 5725 else
cannam@125 5726 case $host_cpu in
cannam@125 5727 hppa*64*)
cannam@125 5728 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@125 5729 ;;
cannam@125 5730 ia64*)
cannam@125 5731 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
cannam@125 5732 ;;
cannam@125 5733 *)
cannam@125 5734 m4_if($1, [], [
cannam@125 5735 # Older versions of the 11.00 compiler do not understand -b yet
cannam@125 5736 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
cannam@125 5737 _LT_LINKER_OPTION([if $CC understands -b],
cannam@125 5738 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
cannam@125 5739 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
cannam@125 5740 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
cannam@125 5741 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
cannam@125 5742 ;;
cannam@125 5743 esac
cannam@125 5744 fi
cannam@125 5745 if test no = "$with_gnu_ld"; then
cannam@125 5746 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
cannam@125 5747 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@125 5748
cannam@125 5749 case $host_cpu in
cannam@125 5750 hppa*64*|ia64*)
cannam@125 5751 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@125 5752 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@125 5753 ;;
cannam@125 5754 *)
cannam@125 5755 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@125 5756 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
cannam@125 5757 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
cannam@125 5758
cannam@125 5759 # hardcode_minus_L: Not really in the search PATH,
cannam@125 5760 # but as the default location of the library.
cannam@125 5761 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@125 5762 ;;
cannam@125 5763 esac
cannam@125 5764 fi
cannam@125 5765 ;;
cannam@125 5766
cannam@125 5767 irix5* | irix6* | nonstopux*)
cannam@125 5768 if test yes = "$GCC"; then
cannam@125 5769 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
cannam@125 5770 # Try to use the -exported_symbol ld option, if it does not
cannam@125 5771 # work, assume that -exports_file does not work either and
cannam@125 5772 # implicitly export all symbols.
cannam@125 5773 # This should be the same for all languages, so no per-tag cache variable.
cannam@125 5774 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
cannam@125 5775 [lt_cv_irix_exported_symbol],
cannam@125 5776 [save_LDFLAGS=$LDFLAGS
cannam@125 5777 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
cannam@125 5778 AC_LINK_IFELSE(
cannam@125 5779 [AC_LANG_SOURCE(
cannam@125 5780 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
cannam@125 5781 [C++], [[int foo (void) { return 0; }]],
cannam@125 5782 [Fortran 77], [[
cannam@125 5783 subroutine foo
cannam@125 5784 end]],
cannam@125 5785 [Fortran], [[
cannam@125 5786 subroutine foo
cannam@125 5787 end]])])],
cannam@125 5788 [lt_cv_irix_exported_symbol=yes],
cannam@125 5789 [lt_cv_irix_exported_symbol=no])
cannam@125 5790 LDFLAGS=$save_LDFLAGS])
cannam@125 5791 if test yes = "$lt_cv_irix_exported_symbol"; then
cannam@125 5792 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
cannam@125 5793 fi
cannam@125 5794 _LT_TAGVAR(link_all_deplibs, $1)=no
cannam@125 5795 else
cannam@125 5796 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
cannam@125 5797 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
cannam@125 5798 fi
cannam@125 5799 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
cannam@125 5800 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@125 5801 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@125 5802 _LT_TAGVAR(inherit_rpath, $1)=yes
cannam@125 5803 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@125 5804 ;;
cannam@125 5805
cannam@125 5806 linux*)
cannam@125 5807 case $cc_basename in
cannam@125 5808 tcc*)
cannam@125 5809 # Fabrice Bellard et al's Tiny C Compiler
cannam@125 5810 _LT_TAGVAR(ld_shlibs, $1)=yes
cannam@125 5811 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
cannam@125 5812 ;;
cannam@125 5813 esac
cannam@125 5814 ;;
cannam@125 5815
cannam@125 5816 netbsd* | netbsdelf*-gnu)
cannam@125 5817 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
cannam@125 5818 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
cannam@125 5819 else
cannam@125 5820 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
cannam@125 5821 fi
cannam@125 5822 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@125 5823 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@125 5824 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@125 5825 ;;
cannam@125 5826
cannam@125 5827 newsos6)
cannam@125 5828 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@125 5829 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@125 5830 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@125 5831 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@125 5832 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@125 5833 ;;
cannam@125 5834
cannam@125 5835 *nto* | *qnx*)
cannam@125 5836 ;;
cannam@125 5837
cannam@125 5838 openbsd* | bitrig*)
cannam@125 5839 if test -f /usr/libexec/ld.so; then
cannam@125 5840 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@125 5841 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@125 5842 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
cannam@125 5843 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
cannam@125 5844 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
cannam@125 5845 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
cannam@125 5846 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
cannam@125 5847 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
cannam@125 5848 else
cannam@125 5849 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
cannam@125 5850 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
cannam@125 5851 fi
cannam@125 5852 else
cannam@125 5853 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 5854 fi
cannam@125 5855 ;;
cannam@125 5856
cannam@125 5857 os2*)
cannam@125 5858 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@125 5859 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@125 5860 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@125 5861 shrext_cmds=.dll
cannam@125 5862 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
cannam@125 5863 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
cannam@125 5864 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
cannam@125 5865 $ECHO EXPORTS >> $output_objdir/$libname.def~
cannam@125 5866 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
cannam@125 5867 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
cannam@125 5868 emximp -o $lib $output_objdir/$libname.def'
cannam@125 5869 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
cannam@125 5870 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
cannam@125 5871 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
cannam@125 5872 $ECHO EXPORTS >> $output_objdir/$libname.def~
cannam@125 5873 prefix_cmds="$SED"~
cannam@125 5874 if test EXPORTS = "`$SED 1q $export_symbols`"; then
cannam@125 5875 prefix_cmds="$prefix_cmds -e 1d";
cannam@125 5876 fi~
cannam@125 5877 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
cannam@125 5878 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
cannam@125 5879 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
cannam@125 5880 emximp -o $lib $output_objdir/$libname.def'
cannam@125 5881 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
cannam@125 5882 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@125 5883 ;;
cannam@125 5884
cannam@125 5885 osf3*)
cannam@125 5886 if test yes = "$GCC"; then
cannam@125 5887 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
cannam@125 5888 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
cannam@125 5889 else
cannam@125 5890 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
cannam@125 5891 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
cannam@125 5892 fi
cannam@125 5893 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
cannam@125 5894 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@125 5895 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@125 5896 ;;
cannam@125 5897
cannam@125 5898 osf4* | osf5*) # as osf3* with the addition of -msym flag
cannam@125 5899 if test yes = "$GCC"; then
cannam@125 5900 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
cannam@125 5901 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
cannam@125 5902 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@125 5903 else
cannam@125 5904 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
cannam@125 5905 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
cannam@125 5906 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
cannam@125 5907 $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
cannam@125 5908
cannam@125 5909 # Both c and cxx compiler support -rpath directly
cannam@125 5910 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
cannam@125 5911 fi
cannam@125 5912 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
cannam@125 5913 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@125 5914 ;;
cannam@125 5915
cannam@125 5916 solaris*)
cannam@125 5917 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
cannam@125 5918 if test yes = "$GCC"; then
cannam@125 5919 wlarc='$wl'
cannam@125 5920 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@125 5921 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
cannam@125 5922 $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
cannam@125 5923 else
cannam@125 5924 case `$CC -V 2>&1` in
cannam@125 5925 *"Compilers 5.0"*)
cannam@125 5926 wlarc=''
cannam@125 5927 _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@125 5928 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
cannam@125 5929 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
cannam@125 5930 ;;
cannam@125 5931 *)
cannam@125 5932 wlarc='$wl'
cannam@125 5933 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@125 5934 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
cannam@125 5935 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
cannam@125 5936 ;;
cannam@125 5937 esac
cannam@125 5938 fi
cannam@125 5939 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@125 5940 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@125 5941 case $host_os in
cannam@125 5942 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
cannam@125 5943 *)
cannam@125 5944 # The compiler driver will combine and reorder linker options,
cannam@125 5945 # but understands '-z linker_flag'. GCC discards it without '$wl',
cannam@125 5946 # but is careful enough not to reorder.
cannam@125 5947 # Supported since Solaris 2.6 (maybe 2.5.1?)
cannam@125 5948 if test yes = "$GCC"; then
cannam@125 5949 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
cannam@125 5950 else
cannam@125 5951 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
cannam@125 5952 fi
cannam@125 5953 ;;
cannam@125 5954 esac
cannam@125 5955 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@125 5956 ;;
cannam@125 5957
cannam@125 5958 sunos4*)
cannam@125 5959 if test sequent = "$host_vendor"; then
cannam@125 5960 # Use $CC to link under sequent, because it throws in some extra .o
cannam@125 5961 # files that make .init and .fini sections work.
cannam@125 5962 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@125 5963 else
cannam@125 5964 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
cannam@125 5965 fi
cannam@125 5966 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@125 5967 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@125 5968 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@125 5969 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@125 5970 ;;
cannam@125 5971
cannam@125 5972 sysv4)
cannam@125 5973 case $host_vendor in
cannam@125 5974 sni)
cannam@125 5975 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@125 5976 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
cannam@125 5977 ;;
cannam@125 5978 siemens)
cannam@125 5979 ## LD is ld it makes a PLAMLIB
cannam@125 5980 ## CC just makes a GrossModule.
cannam@125 5981 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
cannam@125 5982 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
cannam@125 5983 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@125 5984 ;;
cannam@125 5985 motorola)
cannam@125 5986 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@125 5987 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
cannam@125 5988 ;;
cannam@125 5989 esac
cannam@125 5990 runpath_var='LD_RUN_PATH'
cannam@125 5991 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@125 5992 ;;
cannam@125 5993
cannam@125 5994 sysv4.3*)
cannam@125 5995 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@125 5996 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@125 5997 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
cannam@125 5998 ;;
cannam@125 5999
cannam@125 6000 sysv4*MP*)
cannam@125 6001 if test -d /usr/nec; then
cannam@125 6002 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@125 6003 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@125 6004 runpath_var=LD_RUN_PATH
cannam@125 6005 hardcode_runpath_var=yes
cannam@125 6006 _LT_TAGVAR(ld_shlibs, $1)=yes
cannam@125 6007 fi
cannam@125 6008 ;;
cannam@125 6009
cannam@125 6010 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
cannam@125 6011 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
cannam@125 6012 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@125 6013 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@125 6014 runpath_var='LD_RUN_PATH'
cannam@125 6015
cannam@125 6016 if test yes = "$GCC"; then
cannam@125 6017 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@125 6018 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@125 6019 else
cannam@125 6020 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@125 6021 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@125 6022 fi
cannam@125 6023 ;;
cannam@125 6024
cannam@125 6025 sysv5* | sco3.2v5* | sco5v6*)
cannam@125 6026 # Note: We CANNOT use -z defs as we might desire, because we do not
cannam@125 6027 # link with -lc, and that would cause any symbols used from libc to
cannam@125 6028 # always be unresolved, which means just about no library would
cannam@125 6029 # ever link correctly. If we're not using GNU ld we use -z text
cannam@125 6030 # though, which does catch some bad symbols but isn't as heavy-handed
cannam@125 6031 # as -z defs.
cannam@125 6032 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
cannam@125 6033 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
cannam@125 6034 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@125 6035 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@125 6036 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
cannam@125 6037 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
cannam@125 6038 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@125 6039 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
cannam@125 6040 runpath_var='LD_RUN_PATH'
cannam@125 6041
cannam@125 6042 if test yes = "$GCC"; then
cannam@125 6043 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@125 6044 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@125 6045 else
cannam@125 6046 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@125 6047 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@125 6048 fi
cannam@125 6049 ;;
cannam@125 6050
cannam@125 6051 uts4*)
cannam@125 6052 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@125 6053 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@125 6054 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@125 6055 ;;
cannam@125 6056
cannam@125 6057 *)
cannam@125 6058 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 6059 ;;
cannam@125 6060 esac
cannam@125 6061
cannam@125 6062 if test sni = "$host_vendor"; then
cannam@125 6063 case $host in
cannam@125 6064 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
cannam@125 6065 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
cannam@125 6066 ;;
cannam@125 6067 esac
cannam@125 6068 fi
cannam@125 6069 fi
cannam@125 6070 ])
cannam@125 6071 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
cannam@125 6072 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
cannam@125 6073
cannam@125 6074 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
cannam@125 6075
cannam@125 6076 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
cannam@125 6077 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
cannam@125 6078 _LT_DECL([], [extract_expsyms_cmds], [2],
cannam@125 6079 [The commands to extract the exported symbol list from a shared archive])
cannam@125 6080
cannam@125 6081 #
cannam@125 6082 # Do we need to explicitly link libc?
cannam@125 6083 #
cannam@125 6084 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
cannam@125 6085 x|xyes)
cannam@125 6086 # Assume -lc should be added
cannam@125 6087 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
cannam@125 6088
cannam@125 6089 if test yes,yes = "$GCC,$enable_shared"; then
cannam@125 6090 case $_LT_TAGVAR(archive_cmds, $1) in
cannam@125 6091 *'~'*)
cannam@125 6092 # FIXME: we may have to deal with multi-command sequences.
cannam@125 6093 ;;
cannam@125 6094 '$CC '*)
cannam@125 6095 # Test whether the compiler implicitly links with -lc since on some
cannam@125 6096 # systems, -lgcc has to come before -lc. If gcc already passes -lc
cannam@125 6097 # to ld, don't add -lc before -lgcc.
cannam@125 6098 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
cannam@125 6099 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
cannam@125 6100 [$RM conftest*
cannam@125 6101 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
cannam@125 6102
cannam@125 6103 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
cannam@125 6104 soname=conftest
cannam@125 6105 lib=conftest
cannam@125 6106 libobjs=conftest.$ac_objext
cannam@125 6107 deplibs=
cannam@125 6108 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
cannam@125 6109 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
cannam@125 6110 compiler_flags=-v
cannam@125 6111 linker_flags=-v
cannam@125 6112 verstring=
cannam@125 6113 output_objdir=.
cannam@125 6114 libname=conftest
cannam@125 6115 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
cannam@125 6116 _LT_TAGVAR(allow_undefined_flag, $1)=
cannam@125 6117 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
cannam@125 6118 then
cannam@125 6119 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@125 6120 else
cannam@125 6121 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
cannam@125 6122 fi
cannam@125 6123 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
cannam@125 6124 else
cannam@125 6125 cat conftest.err 1>&5
cannam@125 6126 fi
cannam@125 6127 $RM conftest*
cannam@125 6128 ])
cannam@125 6129 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
cannam@125 6130 ;;
cannam@125 6131 esac
cannam@125 6132 fi
cannam@125 6133 ;;
cannam@125 6134 esac
cannam@125 6135
cannam@125 6136 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
cannam@125 6137 [Whether or not to add -lc for building shared libraries])
cannam@125 6138 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
cannam@125 6139 [enable_shared_with_static_runtimes], [0],
cannam@125 6140 [Whether or not to disallow shared libs when runtime libs are static])
cannam@125 6141 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
cannam@125 6142 [Compiler flag to allow reflexive dlopens])
cannam@125 6143 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
cannam@125 6144 [Compiler flag to generate shared objects directly from archives])
cannam@125 6145 _LT_TAGDECL([], [compiler_needs_object], [1],
cannam@125 6146 [Whether the compiler copes with passing no objects directly])
cannam@125 6147 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
cannam@125 6148 [Create an old-style archive from a shared archive])
cannam@125 6149 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
cannam@125 6150 [Create a temporary old-style archive to link instead of a shared archive])
cannam@125 6151 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
cannam@125 6152 _LT_TAGDECL([], [archive_expsym_cmds], [2])
cannam@125 6153 _LT_TAGDECL([], [module_cmds], [2],
cannam@125 6154 [Commands used to build a loadable module if different from building
cannam@125 6155 a shared archive.])
cannam@125 6156 _LT_TAGDECL([], [module_expsym_cmds], [2])
cannam@125 6157 _LT_TAGDECL([], [with_gnu_ld], [1],
cannam@125 6158 [Whether we are building with GNU ld or not])
cannam@125 6159 _LT_TAGDECL([], [allow_undefined_flag], [1],
cannam@125 6160 [Flag that allows shared libraries with undefined symbols to be built])
cannam@125 6161 _LT_TAGDECL([], [no_undefined_flag], [1],
cannam@125 6162 [Flag that enforces no undefined symbols])
cannam@125 6163 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
cannam@125 6164 [Flag to hardcode $libdir into a binary during linking.
cannam@125 6165 This must work even if $libdir does not exist])
cannam@125 6166 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
cannam@125 6167 [Whether we need a single "-rpath" flag with a separated argument])
cannam@125 6168 _LT_TAGDECL([], [hardcode_direct], [0],
cannam@125 6169 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
cannam@125 6170 DIR into the resulting binary])
cannam@125 6171 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
cannam@125 6172 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
cannam@125 6173 DIR into the resulting binary and the resulting library dependency is
cannam@125 6174 "absolute", i.e impossible to change by setting $shlibpath_var if the
cannam@125 6175 library is relocated])
cannam@125 6176 _LT_TAGDECL([], [hardcode_minus_L], [0],
cannam@125 6177 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
cannam@125 6178 into the resulting binary])
cannam@125 6179 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
cannam@125 6180 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
cannam@125 6181 into the resulting binary])
cannam@125 6182 _LT_TAGDECL([], [hardcode_automatic], [0],
cannam@125 6183 [Set to "yes" if building a shared library automatically hardcodes DIR
cannam@125 6184 into the library and all subsequent libraries and executables linked
cannam@125 6185 against it])
cannam@125 6186 _LT_TAGDECL([], [inherit_rpath], [0],
cannam@125 6187 [Set to yes if linker adds runtime paths of dependent libraries
cannam@125 6188 to runtime path list])
cannam@125 6189 _LT_TAGDECL([], [link_all_deplibs], [0],
cannam@125 6190 [Whether libtool must link a program against all its dependency libraries])
cannam@125 6191 _LT_TAGDECL([], [always_export_symbols], [0],
cannam@125 6192 [Set to "yes" if exported symbols are required])
cannam@125 6193 _LT_TAGDECL([], [export_symbols_cmds], [2],
cannam@125 6194 [The commands to list exported symbols])
cannam@125 6195 _LT_TAGDECL([], [exclude_expsyms], [1],
cannam@125 6196 [Symbols that should not be listed in the preloaded symbols])
cannam@125 6197 _LT_TAGDECL([], [include_expsyms], [1],
cannam@125 6198 [Symbols that must always be exported])
cannam@125 6199 _LT_TAGDECL([], [prelink_cmds], [2],
cannam@125 6200 [Commands necessary for linking programs (against libraries) with templates])
cannam@125 6201 _LT_TAGDECL([], [postlink_cmds], [2],
cannam@125 6202 [Commands necessary for finishing linking programs])
cannam@125 6203 _LT_TAGDECL([], [file_list_spec], [1],
cannam@125 6204 [Specify filename containing input files])
cannam@125 6205 dnl FIXME: Not yet implemented
cannam@125 6206 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
cannam@125 6207 dnl [Compiler flag to generate thread safe objects])
cannam@125 6208 ])# _LT_LINKER_SHLIBS
cannam@125 6209
cannam@125 6210
cannam@125 6211 # _LT_LANG_C_CONFIG([TAG])
cannam@125 6212 # ------------------------
cannam@125 6213 # Ensure that the configuration variables for a C compiler are suitably
cannam@125 6214 # defined. These variables are subsequently used by _LT_CONFIG to write
cannam@125 6215 # the compiler configuration to 'libtool'.
cannam@125 6216 m4_defun([_LT_LANG_C_CONFIG],
cannam@125 6217 [m4_require([_LT_DECL_EGREP])dnl
cannam@125 6218 lt_save_CC=$CC
cannam@125 6219 AC_LANG_PUSH(C)
cannam@125 6220
cannam@125 6221 # Source file extension for C test sources.
cannam@125 6222 ac_ext=c
cannam@125 6223
cannam@125 6224 # Object file extension for compiled C test sources.
cannam@125 6225 objext=o
cannam@125 6226 _LT_TAGVAR(objext, $1)=$objext
cannam@125 6227
cannam@125 6228 # Code to be used in simple compile tests
cannam@125 6229 lt_simple_compile_test_code="int some_variable = 0;"
cannam@125 6230
cannam@125 6231 # Code to be used in simple link tests
cannam@125 6232 lt_simple_link_test_code='int main(){return(0);}'
cannam@125 6233
cannam@125 6234 _LT_TAG_COMPILER
cannam@125 6235 # Save the default compiler, since it gets overwritten when the other
cannam@125 6236 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
cannam@125 6237 compiler_DEFAULT=$CC
cannam@125 6238
cannam@125 6239 # save warnings/boilerplate of simple test code
cannam@125 6240 _LT_COMPILER_BOILERPLATE
cannam@125 6241 _LT_LINKER_BOILERPLATE
cannam@125 6242
cannam@125 6243 ## CAVEAT EMPTOR:
cannam@125 6244 ## There is no encapsulation within the following macros, do not change
cannam@125 6245 ## the running order or otherwise move them around unless you know exactly
cannam@125 6246 ## what you are doing...
cannam@125 6247 if test -n "$compiler"; then
cannam@125 6248 _LT_COMPILER_NO_RTTI($1)
cannam@125 6249 _LT_COMPILER_PIC($1)
cannam@125 6250 _LT_COMPILER_C_O($1)
cannam@125 6251 _LT_COMPILER_FILE_LOCKS($1)
cannam@125 6252 _LT_LINKER_SHLIBS($1)
cannam@125 6253 _LT_SYS_DYNAMIC_LINKER($1)
cannam@125 6254 _LT_LINKER_HARDCODE_LIBPATH($1)
cannam@125 6255 LT_SYS_DLOPEN_SELF
cannam@125 6256 _LT_CMD_STRIPLIB
cannam@125 6257
cannam@125 6258 # Report what library types will actually be built
cannam@125 6259 AC_MSG_CHECKING([if libtool supports shared libraries])
cannam@125 6260 AC_MSG_RESULT([$can_build_shared])
cannam@125 6261
cannam@125 6262 AC_MSG_CHECKING([whether to build shared libraries])
cannam@125 6263 test no = "$can_build_shared" && enable_shared=no
cannam@125 6264
cannam@125 6265 # On AIX, shared libraries and static libraries use the same namespace, and
cannam@125 6266 # are all built from PIC.
cannam@125 6267 case $host_os in
cannam@125 6268 aix3*)
cannam@125 6269 test yes = "$enable_shared" && enable_static=no
cannam@125 6270 if test -n "$RANLIB"; then
cannam@125 6271 archive_cmds="$archive_cmds~\$RANLIB \$lib"
cannam@125 6272 postinstall_cmds='$RANLIB $lib'
cannam@125 6273 fi
cannam@125 6274 ;;
cannam@125 6275
cannam@125 6276 aix[[4-9]]*)
cannam@125 6277 if test ia64 != "$host_cpu"; then
cannam@125 6278 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
cannam@125 6279 yes,aix,yes) ;; # shared object as lib.so file only
cannam@125 6280 yes,svr4,*) ;; # shared object as lib.so archive member only
cannam@125 6281 yes,*) enable_static=no ;; # shared object in lib.a archive as well
cannam@125 6282 esac
cannam@125 6283 fi
cannam@125 6284 ;;
cannam@125 6285 esac
cannam@125 6286 AC_MSG_RESULT([$enable_shared])
cannam@125 6287
cannam@125 6288 AC_MSG_CHECKING([whether to build static libraries])
cannam@125 6289 # Make sure either enable_shared or enable_static is yes.
cannam@125 6290 test yes = "$enable_shared" || enable_static=yes
cannam@125 6291 AC_MSG_RESULT([$enable_static])
cannam@125 6292
cannam@125 6293 _LT_CONFIG($1)
cannam@125 6294 fi
cannam@125 6295 AC_LANG_POP
cannam@125 6296 CC=$lt_save_CC
cannam@125 6297 ])# _LT_LANG_C_CONFIG
cannam@125 6298
cannam@125 6299
cannam@125 6300 # _LT_LANG_CXX_CONFIG([TAG])
cannam@125 6301 # --------------------------
cannam@125 6302 # Ensure that the configuration variables for a C++ compiler are suitably
cannam@125 6303 # defined. These variables are subsequently used by _LT_CONFIG to write
cannam@125 6304 # the compiler configuration to 'libtool'.
cannam@125 6305 m4_defun([_LT_LANG_CXX_CONFIG],
cannam@125 6306 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@125 6307 m4_require([_LT_DECL_EGREP])dnl
cannam@125 6308 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
cannam@125 6309 if test -n "$CXX" && ( test no != "$CXX" &&
cannam@125 6310 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
cannam@125 6311 (test g++ != "$CXX"))); then
cannam@125 6312 AC_PROG_CXXCPP
cannam@125 6313 else
cannam@125 6314 _lt_caught_CXX_error=yes
cannam@125 6315 fi
cannam@125 6316
cannam@125 6317 AC_LANG_PUSH(C++)
cannam@125 6318 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@125 6319 _LT_TAGVAR(allow_undefined_flag, $1)=
cannam@125 6320 _LT_TAGVAR(always_export_symbols, $1)=no
cannam@125 6321 _LT_TAGVAR(archive_expsym_cmds, $1)=
cannam@125 6322 _LT_TAGVAR(compiler_needs_object, $1)=no
cannam@125 6323 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
cannam@125 6324 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@125 6325 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
cannam@125 6326 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
cannam@125 6327 _LT_TAGVAR(hardcode_libdir_separator, $1)=
cannam@125 6328 _LT_TAGVAR(hardcode_minus_L, $1)=no
cannam@125 6329 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
cannam@125 6330 _LT_TAGVAR(hardcode_automatic, $1)=no
cannam@125 6331 _LT_TAGVAR(inherit_rpath, $1)=no
cannam@125 6332 _LT_TAGVAR(module_cmds, $1)=
cannam@125 6333 _LT_TAGVAR(module_expsym_cmds, $1)=
cannam@125 6334 _LT_TAGVAR(link_all_deplibs, $1)=unknown
cannam@125 6335 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
cannam@125 6336 _LT_TAGVAR(reload_flag, $1)=$reload_flag
cannam@125 6337 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
cannam@125 6338 _LT_TAGVAR(no_undefined_flag, $1)=
cannam@125 6339 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@125 6340 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
cannam@125 6341
cannam@125 6342 # Source file extension for C++ test sources.
cannam@125 6343 ac_ext=cpp
cannam@125 6344
cannam@125 6345 # Object file extension for compiled C++ test sources.
cannam@125 6346 objext=o
cannam@125 6347 _LT_TAGVAR(objext, $1)=$objext
cannam@125 6348
cannam@125 6349 # No sense in running all these tests if we already determined that
cannam@125 6350 # the CXX compiler isn't working. Some variables (like enable_shared)
cannam@125 6351 # are currently assumed to apply to all compilers on this platform,
cannam@125 6352 # and will be corrupted by setting them based on a non-working compiler.
cannam@125 6353 if test yes != "$_lt_caught_CXX_error"; then
cannam@125 6354 # Code to be used in simple compile tests
cannam@125 6355 lt_simple_compile_test_code="int some_variable = 0;"
cannam@125 6356
cannam@125 6357 # Code to be used in simple link tests
cannam@125 6358 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
cannam@125 6359
cannam@125 6360 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
cannam@125 6361 _LT_TAG_COMPILER
cannam@125 6362
cannam@125 6363 # save warnings/boilerplate of simple test code
cannam@125 6364 _LT_COMPILER_BOILERPLATE
cannam@125 6365 _LT_LINKER_BOILERPLATE
cannam@125 6366
cannam@125 6367 # Allow CC to be a program name with arguments.
cannam@125 6368 lt_save_CC=$CC
cannam@125 6369 lt_save_CFLAGS=$CFLAGS
cannam@125 6370 lt_save_LD=$LD
cannam@125 6371 lt_save_GCC=$GCC
cannam@125 6372 GCC=$GXX
cannam@125 6373 lt_save_with_gnu_ld=$with_gnu_ld
cannam@125 6374 lt_save_path_LD=$lt_cv_path_LD
cannam@125 6375 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
cannam@125 6376 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
cannam@125 6377 else
cannam@125 6378 $as_unset lt_cv_prog_gnu_ld
cannam@125 6379 fi
cannam@125 6380 if test -n "${lt_cv_path_LDCXX+set}"; then
cannam@125 6381 lt_cv_path_LD=$lt_cv_path_LDCXX
cannam@125 6382 else
cannam@125 6383 $as_unset lt_cv_path_LD
cannam@125 6384 fi
cannam@125 6385 test -z "${LDCXX+set}" || LD=$LDCXX
cannam@125 6386 CC=${CXX-"c++"}
cannam@125 6387 CFLAGS=$CXXFLAGS
cannam@125 6388 compiler=$CC
cannam@125 6389 _LT_TAGVAR(compiler, $1)=$CC
cannam@125 6390 _LT_CC_BASENAME([$compiler])
cannam@125 6391
cannam@125 6392 if test -n "$compiler"; then
cannam@125 6393 # We don't want -fno-exception when compiling C++ code, so set the
cannam@125 6394 # no_builtin_flag separately
cannam@125 6395 if test yes = "$GXX"; then
cannam@125 6396 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
cannam@125 6397 else
cannam@125 6398 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
cannam@125 6399 fi
cannam@125 6400
cannam@125 6401 if test yes = "$GXX"; then
cannam@125 6402 # Set up default GNU C++ configuration
cannam@125 6403
cannam@125 6404 LT_PATH_LD
cannam@125 6405
cannam@125 6406 # Check if GNU C++ uses GNU ld as the underlying linker, since the
cannam@125 6407 # archiving commands below assume that GNU ld is being used.
cannam@125 6408 if test yes = "$with_gnu_ld"; then
cannam@125 6409 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@125 6410 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
cannam@125 6411
cannam@125 6412 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@125 6413 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
cannam@125 6414
cannam@125 6415 # If archive_cmds runs LD, not CC, wlarc should be empty
cannam@125 6416 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
cannam@125 6417 # investigate it a little bit more. (MM)
cannam@125 6418 wlarc='$wl'
cannam@125 6419
cannam@125 6420 # ancient GNU ld didn't support --whole-archive et. al.
cannam@125 6421 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
cannam@125 6422 $GREP 'no-whole-archive' > /dev/null; then
cannam@125 6423 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
cannam@125 6424 else
cannam@125 6425 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@125 6426 fi
cannam@125 6427 else
cannam@125 6428 with_gnu_ld=no
cannam@125 6429 wlarc=
cannam@125 6430
cannam@125 6431 # A generic and very simple default shared library creation
cannam@125 6432 # command for GNU C++ for the case where it uses the native
cannam@125 6433 # linker, instead of GNU ld. If possible, this setting should
cannam@125 6434 # overridden to take advantage of the native linker features on
cannam@125 6435 # the platform it is being used on.
cannam@125 6436 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
cannam@125 6437 fi
cannam@125 6438
cannam@125 6439 # Commands to make compiler produce verbose output that lists
cannam@125 6440 # what "hidden" libraries, object files and flags are used when
cannam@125 6441 # linking a shared library.
cannam@125 6442 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
cannam@125 6443
cannam@125 6444 else
cannam@125 6445 GXX=no
cannam@125 6446 with_gnu_ld=no
cannam@125 6447 wlarc=
cannam@125 6448 fi
cannam@125 6449
cannam@125 6450 # PORTME: fill in a description of your system's C++ link characteristics
cannam@125 6451 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
cannam@125 6452 _LT_TAGVAR(ld_shlibs, $1)=yes
cannam@125 6453 case $host_os in
cannam@125 6454 aix3*)
cannam@125 6455 # FIXME: insert proper C++ library support
cannam@125 6456 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 6457 ;;
cannam@125 6458 aix[[4-9]]*)
cannam@125 6459 if test ia64 = "$host_cpu"; then
cannam@125 6460 # On IA64, the linker does run time linking by default, so we don't
cannam@125 6461 # have to do anything special.
cannam@125 6462 aix_use_runtimelinking=no
cannam@125 6463 exp_sym_flag='-Bexport'
cannam@125 6464 no_entry_flag=
cannam@125 6465 else
cannam@125 6466 aix_use_runtimelinking=no
cannam@125 6467
cannam@125 6468 # Test if we are trying to use run time linking or normal
cannam@125 6469 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
cannam@125 6470 # have runtime linking enabled, and use it for executables.
cannam@125 6471 # For shared libraries, we enable/disable runtime linking
cannam@125 6472 # depending on the kind of the shared library created -
cannam@125 6473 # when "with_aix_soname,aix_use_runtimelinking" is:
cannam@125 6474 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
cannam@125 6475 # "aix,yes" lib.so shared, rtl:yes, for executables
cannam@125 6476 # lib.a static archive
cannam@125 6477 # "both,no" lib.so.V(shr.o) shared, rtl:yes
cannam@125 6478 # lib.a(lib.so.V) shared, rtl:no, for executables
cannam@125 6479 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
cannam@125 6480 # lib.a(lib.so.V) shared, rtl:no
cannam@125 6481 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
cannam@125 6482 # lib.a static archive
cannam@125 6483 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
cannam@125 6484 for ld_flag in $LDFLAGS; do
cannam@125 6485 case $ld_flag in
cannam@125 6486 *-brtl*)
cannam@125 6487 aix_use_runtimelinking=yes
cannam@125 6488 break
cannam@125 6489 ;;
cannam@125 6490 esac
cannam@125 6491 done
cannam@125 6492 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
cannam@125 6493 # With aix-soname=svr4, we create the lib.so.V shared archives only,
cannam@125 6494 # so we don't have lib.a shared libs to link our executables.
cannam@125 6495 # We have to force runtime linking in this case.
cannam@125 6496 aix_use_runtimelinking=yes
cannam@125 6497 LDFLAGS="$LDFLAGS -Wl,-brtl"
cannam@125 6498 fi
cannam@125 6499 ;;
cannam@125 6500 esac
cannam@125 6501
cannam@125 6502 exp_sym_flag='-bexport'
cannam@125 6503 no_entry_flag='-bnoentry'
cannam@125 6504 fi
cannam@125 6505
cannam@125 6506 # When large executables or shared objects are built, AIX ld can
cannam@125 6507 # have problems creating the table of contents. If linking a library
cannam@125 6508 # or program results in "error TOC overflow" add -mminimal-toc to
cannam@125 6509 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
cannam@125 6510 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
cannam@125 6511
cannam@125 6512 _LT_TAGVAR(archive_cmds, $1)=''
cannam@125 6513 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@125 6514 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
cannam@125 6515 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
cannam@125 6516 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@125 6517 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
cannam@125 6518 case $with_aix_soname,$aix_use_runtimelinking in
cannam@125 6519 aix,*) ;; # no import file
cannam@125 6520 svr4,* | *,yes) # use import file
cannam@125 6521 # The Import File defines what to hardcode.
cannam@125 6522 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@125 6523 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
cannam@125 6524 ;;
cannam@125 6525 esac
cannam@125 6526
cannam@125 6527 if test yes = "$GXX"; then
cannam@125 6528 case $host_os in aix4.[[012]]|aix4.[[012]].*)
cannam@125 6529 # We only want to do this on AIX 4.2 and lower, the check
cannam@125 6530 # below for broken collect2 doesn't work under 4.3+
cannam@125 6531 collect2name=`$CC -print-prog-name=collect2`
cannam@125 6532 if test -f "$collect2name" &&
cannam@125 6533 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
cannam@125 6534 then
cannam@125 6535 # We have reworked collect2
cannam@125 6536 :
cannam@125 6537 else
cannam@125 6538 # We have old collect2
cannam@125 6539 _LT_TAGVAR(hardcode_direct, $1)=unsupported
cannam@125 6540 # It fails to find uninstalled libraries when the uninstalled
cannam@125 6541 # path is not listed in the libpath. Setting hardcode_minus_L
cannam@125 6542 # to unsupported forces relinking
cannam@125 6543 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@125 6544 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@125 6545 _LT_TAGVAR(hardcode_libdir_separator, $1)=
cannam@125 6546 fi
cannam@125 6547 esac
cannam@125 6548 shared_flag='-shared'
cannam@125 6549 if test yes = "$aix_use_runtimelinking"; then
cannam@125 6550 shared_flag=$shared_flag' $wl-G'
cannam@125 6551 fi
cannam@125 6552 # Need to ensure runtime linking is disabled for the traditional
cannam@125 6553 # shared library, or the linker may eventually find shared libraries
cannam@125 6554 # /with/ Import File - we do not want to mix them.
cannam@125 6555 shared_flag_aix='-shared'
cannam@125 6556 shared_flag_svr4='-shared $wl-G'
cannam@125 6557 else
cannam@125 6558 # not using gcc
cannam@125 6559 if test ia64 = "$host_cpu"; then
cannam@125 6560 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
cannam@125 6561 # chokes on -Wl,-G. The following line is correct:
cannam@125 6562 shared_flag='-G'
cannam@125 6563 else
cannam@125 6564 if test yes = "$aix_use_runtimelinking"; then
cannam@125 6565 shared_flag='$wl-G'
cannam@125 6566 else
cannam@125 6567 shared_flag='$wl-bM:SRE'
cannam@125 6568 fi
cannam@125 6569 shared_flag_aix='$wl-bM:SRE'
cannam@125 6570 shared_flag_svr4='$wl-G'
cannam@125 6571 fi
cannam@125 6572 fi
cannam@125 6573
cannam@125 6574 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
cannam@125 6575 # It seems that -bexpall does not export symbols beginning with
cannam@125 6576 # underscore (_), so it is better to generate a list of symbols to
cannam@125 6577 # export.
cannam@125 6578 _LT_TAGVAR(always_export_symbols, $1)=yes
cannam@125 6579 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
cannam@125 6580 # Warning - without using the other runtime loading flags (-brtl),
cannam@125 6581 # -berok will link without error, but may produce a broken library.
cannam@125 6582 # The "-G" linker flag allows undefined symbols.
cannam@125 6583 _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
cannam@125 6584 # Determine the default libpath from the value encoded in an empty
cannam@125 6585 # executable.
cannam@125 6586 _LT_SYS_MODULE_PATH_AIX([$1])
cannam@125 6587 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
cannam@125 6588
cannam@125 6589 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
cannam@125 6590 else
cannam@125 6591 if test ia64 = "$host_cpu"; then
cannam@125 6592 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
cannam@125 6593 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
cannam@125 6594 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
cannam@125 6595 else
cannam@125 6596 # Determine the default libpath from the value encoded in an
cannam@125 6597 # empty executable.
cannam@125 6598 _LT_SYS_MODULE_PATH_AIX([$1])
cannam@125 6599 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
cannam@125 6600 # Warning - without using the other run time loading flags,
cannam@125 6601 # -berok will link without error, but may produce a broken library.
cannam@125 6602 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
cannam@125 6603 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
cannam@125 6604 if test yes = "$with_gnu_ld"; then
cannam@125 6605 # We only use this code for GNU lds that support --whole-archive.
cannam@125 6606 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
cannam@125 6607 else
cannam@125 6608 # Exported symbols can be pulled into shared objects from archives
cannam@125 6609 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
cannam@125 6610 fi
cannam@125 6611 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
cannam@125 6612 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
cannam@125 6613 # -brtl affects multiple linker settings, -berok does not and is overridden later
cannam@125 6614 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
cannam@125 6615 if test svr4 != "$with_aix_soname"; then
cannam@125 6616 # This is similar to how AIX traditionally builds its shared
cannam@125 6617 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
cannam@125 6618 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
cannam@125 6619 fi
cannam@125 6620 if test aix != "$with_aix_soname"; then
cannam@125 6621 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
cannam@125 6622 else
cannam@125 6623 # used by -dlpreopen to get the symbols
cannam@125 6624 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
cannam@125 6625 fi
cannam@125 6626 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
cannam@125 6627 fi
cannam@125 6628 fi
cannam@125 6629 ;;
cannam@125 6630
cannam@125 6631 beos*)
cannam@125 6632 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
cannam@125 6633 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@125 6634 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
cannam@125 6635 # support --undefined. This deserves some investigation. FIXME
cannam@125 6636 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@125 6637 else
cannam@125 6638 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 6639 fi
cannam@125 6640 ;;
cannam@125 6641
cannam@125 6642 chorus*)
cannam@125 6643 case $cc_basename in
cannam@125 6644 *)
cannam@125 6645 # FIXME: insert proper C++ library support
cannam@125 6646 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 6647 ;;
cannam@125 6648 esac
cannam@125 6649 ;;
cannam@125 6650
cannam@125 6651 cygwin* | mingw* | pw32* | cegcc*)
cannam@125 6652 case $GXX,$cc_basename in
cannam@125 6653 ,cl* | no,cl*)
cannam@125 6654 # Native MSVC
cannam@125 6655 # hardcode_libdir_flag_spec is actually meaningless, as there is
cannam@125 6656 # no search path for DLLs.
cannam@125 6657 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
cannam@125 6658 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@125 6659 _LT_TAGVAR(always_export_symbols, $1)=yes
cannam@125 6660 _LT_TAGVAR(file_list_spec, $1)='@'
cannam@125 6661 # Tell ltmain to make .lib files, not .a files.
cannam@125 6662 libext=lib
cannam@125 6663 # Tell ltmain to make .dll files, not .so files.
cannam@125 6664 shrext_cmds=.dll
cannam@125 6665 # FIXME: Setting linknames here is a bad hack.
cannam@125 6666 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
cannam@125 6667 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
cannam@125 6668 cp "$export_symbols" "$output_objdir/$soname.def";
cannam@125 6669 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
cannam@125 6670 else
cannam@125 6671 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
cannam@125 6672 fi~
cannam@125 6673 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
cannam@125 6674 linknames='
cannam@125 6675 # The linker will not automatically build a static lib if we build a DLL.
cannam@125 6676 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
cannam@125 6677 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@125 6678 # Don't use ranlib
cannam@125 6679 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
cannam@125 6680 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
cannam@125 6681 lt_tool_outputfile="@TOOL_OUTPUT@"~
cannam@125 6682 case $lt_outputfile in
cannam@125 6683 *.exe|*.EXE) ;;
cannam@125 6684 *)
cannam@125 6685 lt_outputfile=$lt_outputfile.exe
cannam@125 6686 lt_tool_outputfile=$lt_tool_outputfile.exe
cannam@125 6687 ;;
cannam@125 6688 esac~
cannam@125 6689 func_to_tool_file "$lt_outputfile"~
cannam@125 6690 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
cannam@125 6691 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
cannam@125 6692 $RM "$lt_outputfile.manifest";
cannam@125 6693 fi'
cannam@125 6694 ;;
cannam@125 6695 *)
cannam@125 6696 # g++
cannam@125 6697 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
cannam@125 6698 # as there is no search path for DLLs.
cannam@125 6699 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@125 6700 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
cannam@125 6701 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@125 6702 _LT_TAGVAR(always_export_symbols, $1)=no
cannam@125 6703 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@125 6704
cannam@125 6705 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
cannam@125 6706 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
cannam@125 6707 # If the export-symbols file already is a .def file, use it as
cannam@125 6708 # is; otherwise, prepend EXPORTS...
cannam@125 6709 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
cannam@125 6710 cp $export_symbols $output_objdir/$soname.def;
cannam@125 6711 else
cannam@125 6712 echo EXPORTS > $output_objdir/$soname.def;
cannam@125 6713 cat $export_symbols >> $output_objdir/$soname.def;
cannam@125 6714 fi~
cannam@125 6715 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
cannam@125 6716 else
cannam@125 6717 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 6718 fi
cannam@125 6719 ;;
cannam@125 6720 esac
cannam@125 6721 ;;
cannam@125 6722 darwin* | rhapsody*)
cannam@125 6723 _LT_DARWIN_LINKER_FEATURES($1)
cannam@125 6724 ;;
cannam@125 6725
cannam@125 6726 os2*)
cannam@125 6727 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@125 6728 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@125 6729 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@125 6730 shrext_cmds=.dll
cannam@125 6731 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
cannam@125 6732 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
cannam@125 6733 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
cannam@125 6734 $ECHO EXPORTS >> $output_objdir/$libname.def~
cannam@125 6735 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
cannam@125 6736 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
cannam@125 6737 emximp -o $lib $output_objdir/$libname.def'
cannam@125 6738 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
cannam@125 6739 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
cannam@125 6740 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
cannam@125 6741 $ECHO EXPORTS >> $output_objdir/$libname.def~
cannam@125 6742 prefix_cmds="$SED"~
cannam@125 6743 if test EXPORTS = "`$SED 1q $export_symbols`"; then
cannam@125 6744 prefix_cmds="$prefix_cmds -e 1d";
cannam@125 6745 fi~
cannam@125 6746 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
cannam@125 6747 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
cannam@125 6748 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
cannam@125 6749 emximp -o $lib $output_objdir/$libname.def'
cannam@125 6750 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
cannam@125 6751 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@125 6752 ;;
cannam@125 6753
cannam@125 6754 dgux*)
cannam@125 6755 case $cc_basename in
cannam@125 6756 ec++*)
cannam@125 6757 # FIXME: insert proper C++ library support
cannam@125 6758 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 6759 ;;
cannam@125 6760 ghcx*)
cannam@125 6761 # Green Hills C++ Compiler
cannam@125 6762 # FIXME: insert proper C++ library support
cannam@125 6763 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 6764 ;;
cannam@125 6765 *)
cannam@125 6766 # FIXME: insert proper C++ library support
cannam@125 6767 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 6768 ;;
cannam@125 6769 esac
cannam@125 6770 ;;
cannam@125 6771
cannam@125 6772 freebsd2.*)
cannam@125 6773 # C++ shared libraries reported to be fairly broken before
cannam@125 6774 # switch to ELF
cannam@125 6775 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 6776 ;;
cannam@125 6777
cannam@125 6778 freebsd-elf*)
cannam@125 6779 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@125 6780 ;;
cannam@125 6781
cannam@125 6782 freebsd* | dragonfly*)
cannam@125 6783 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
cannam@125 6784 # conventions
cannam@125 6785 _LT_TAGVAR(ld_shlibs, $1)=yes
cannam@125 6786 ;;
cannam@125 6787
cannam@125 6788 haiku*)
cannam@125 6789 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@125 6790 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@125 6791 ;;
cannam@125 6792
cannam@125 6793 hpux9*)
cannam@125 6794 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
cannam@125 6795 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@125 6796 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
cannam@125 6797 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@125 6798 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
cannam@125 6799 # but as the default
cannam@125 6800 # location of the library.
cannam@125 6801
cannam@125 6802 case $cc_basename in
cannam@125 6803 CC*)
cannam@125 6804 # FIXME: insert proper C++ library support
cannam@125 6805 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 6806 ;;
cannam@125 6807 aCC*)
cannam@125 6808 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
cannam@125 6809 # Commands to make compiler produce verbose output that lists
cannam@125 6810 # what "hidden" libraries, object files and flags are used when
cannam@125 6811 # linking a shared library.
cannam@125 6812 #
cannam@125 6813 # There doesn't appear to be a way to prevent this compiler from
cannam@125 6814 # explicitly linking system object files so we need to strip them
cannam@125 6815 # from the output so that they don't get included in the library
cannam@125 6816 # dependencies.
cannam@125 6817 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
cannam@125 6818 ;;
cannam@125 6819 *)
cannam@125 6820 if test yes = "$GXX"; then
cannam@125 6821 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
cannam@125 6822 else
cannam@125 6823 # FIXME: insert proper C++ library support
cannam@125 6824 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 6825 fi
cannam@125 6826 ;;
cannam@125 6827 esac
cannam@125 6828 ;;
cannam@125 6829
cannam@125 6830 hpux10*|hpux11*)
cannam@125 6831 if test no = "$with_gnu_ld"; then
cannam@125 6832 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
cannam@125 6833 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@125 6834
cannam@125 6835 case $host_cpu in
cannam@125 6836 hppa*64*|ia64*)
cannam@125 6837 ;;
cannam@125 6838 *)
cannam@125 6839 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
cannam@125 6840 ;;
cannam@125 6841 esac
cannam@125 6842 fi
cannam@125 6843 case $host_cpu in
cannam@125 6844 hppa*64*|ia64*)
cannam@125 6845 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@125 6846 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@125 6847 ;;
cannam@125 6848 *)
cannam@125 6849 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@125 6850 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
cannam@125 6851 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
cannam@125 6852 # but as the default
cannam@125 6853 # location of the library.
cannam@125 6854 ;;
cannam@125 6855 esac
cannam@125 6856
cannam@125 6857 case $cc_basename in
cannam@125 6858 CC*)
cannam@125 6859 # FIXME: insert proper C++ library support
cannam@125 6860 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 6861 ;;
cannam@125 6862 aCC*)
cannam@125 6863 case $host_cpu in
cannam@125 6864 hppa*64*)
cannam@125 6865 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
cannam@125 6866 ;;
cannam@125 6867 ia64*)
cannam@125 6868 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
cannam@125 6869 ;;
cannam@125 6870 *)
cannam@125 6871 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
cannam@125 6872 ;;
cannam@125 6873 esac
cannam@125 6874 # Commands to make compiler produce verbose output that lists
cannam@125 6875 # what "hidden" libraries, object files and flags are used when
cannam@125 6876 # linking a shared library.
cannam@125 6877 #
cannam@125 6878 # There doesn't appear to be a way to prevent this compiler from
cannam@125 6879 # explicitly linking system object files so we need to strip them
cannam@125 6880 # from the output so that they don't get included in the library
cannam@125 6881 # dependencies.
cannam@125 6882 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
cannam@125 6883 ;;
cannam@125 6884 *)
cannam@125 6885 if test yes = "$GXX"; then
cannam@125 6886 if test no = "$with_gnu_ld"; then
cannam@125 6887 case $host_cpu in
cannam@125 6888 hppa*64*)
cannam@125 6889 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
cannam@125 6890 ;;
cannam@125 6891 ia64*)
cannam@125 6892 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
cannam@125 6893 ;;
cannam@125 6894 *)
cannam@125 6895 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
cannam@125 6896 ;;
cannam@125 6897 esac
cannam@125 6898 fi
cannam@125 6899 else
cannam@125 6900 # FIXME: insert proper C++ library support
cannam@125 6901 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 6902 fi
cannam@125 6903 ;;
cannam@125 6904 esac
cannam@125 6905 ;;
cannam@125 6906
cannam@125 6907 interix[[3-9]]*)
cannam@125 6908 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@125 6909 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@125 6910 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
cannam@125 6911 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
cannam@125 6912 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
cannam@125 6913 # Instead, shared libraries are loaded at an image base (0x10000000 by
cannam@125 6914 # default) and relocated if they conflict, which is a slow very memory
cannam@125 6915 # consuming and fragmenting process. To avoid this, we pick a random,
cannam@125 6916 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
cannam@125 6917 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
cannam@125 6918 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
cannam@125 6919 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
cannam@125 6920 ;;
cannam@125 6921 irix5* | irix6*)
cannam@125 6922 case $cc_basename in
cannam@125 6923 CC*)
cannam@125 6924 # SGI C++
cannam@125 6925 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
cannam@125 6926
cannam@125 6927 # Archives containing C++ object files must be created using
cannam@125 6928 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
cannam@125 6929 # necessary to make sure instantiated templates are included
cannam@125 6930 # in the archive.
cannam@125 6931 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
cannam@125 6932 ;;
cannam@125 6933 *)
cannam@125 6934 if test yes = "$GXX"; then
cannam@125 6935 if test no = "$with_gnu_ld"; then
cannam@125 6936 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
cannam@125 6937 else
cannam@125 6938 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
cannam@125 6939 fi
cannam@125 6940 fi
cannam@125 6941 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@125 6942 ;;
cannam@125 6943 esac
cannam@125 6944 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@125 6945 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@125 6946 _LT_TAGVAR(inherit_rpath, $1)=yes
cannam@125 6947 ;;
cannam@125 6948
cannam@125 6949 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
cannam@125 6950 case $cc_basename in
cannam@125 6951 KCC*)
cannam@125 6952 # Kuck and Associates, Inc. (KAI) C++ Compiler
cannam@125 6953
cannam@125 6954 # KCC will only create a shared library if the output file
cannam@125 6955 # ends with ".so" (or ".sl" for HP-UX), so rename the library
cannam@125 6956 # to its proper name (with version) after linking.
cannam@125 6957 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
cannam@125 6958 _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
cannam@125 6959 # Commands to make compiler produce verbose output that lists
cannam@125 6960 # what "hidden" libraries, object files and flags are used when
cannam@125 6961 # linking a shared library.
cannam@125 6962 #
cannam@125 6963 # There doesn't appear to be a way to prevent this compiler from
cannam@125 6964 # explicitly linking system object files so we need to strip them
cannam@125 6965 # from the output so that they don't get included in the library
cannam@125 6966 # dependencies.
cannam@125 6967 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
cannam@125 6968
cannam@125 6969 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
cannam@125 6970 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
cannam@125 6971
cannam@125 6972 # Archives containing C++ object files must be created using
cannam@125 6973 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
cannam@125 6974 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
cannam@125 6975 ;;
cannam@125 6976 icpc* | ecpc* )
cannam@125 6977 # Intel C++
cannam@125 6978 with_gnu_ld=yes
cannam@125 6979 # version 8.0 and above of icpc choke on multiply defined symbols
cannam@125 6980 # if we add $predep_objects and $postdep_objects, however 7.1 and
cannam@125 6981 # earlier do not add the objects themselves.
cannam@125 6982 case `$CC -V 2>&1` in
cannam@125 6983 *"Version 7."*)
cannam@125 6984 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@125 6985 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
cannam@125 6986 ;;
cannam@125 6987 *) # Version 8.0 or newer
cannam@125 6988 tmp_idyn=
cannam@125 6989 case $host_cpu in
cannam@125 6990 ia64*) tmp_idyn=' -i_dynamic';;
cannam@125 6991 esac
cannam@125 6992 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@125 6993 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
cannam@125 6994 ;;
cannam@125 6995 esac
cannam@125 6996 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@125 6997 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
cannam@125 6998 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
cannam@125 6999 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
cannam@125 7000 ;;
cannam@125 7001 pgCC* | pgcpp*)
cannam@125 7002 # Portland Group C++ compiler
cannam@125 7003 case `$CC -V` in
cannam@125 7004 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
cannam@125 7005 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
cannam@125 7006 rm -rf $tpldir~
cannam@125 7007 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
cannam@125 7008 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
cannam@125 7009 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
cannam@125 7010 rm -rf $tpldir~
cannam@125 7011 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
cannam@125 7012 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
cannam@125 7013 $RANLIB $oldlib'
cannam@125 7014 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
cannam@125 7015 rm -rf $tpldir~
cannam@125 7016 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
cannam@125 7017 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@125 7018 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
cannam@125 7019 rm -rf $tpldir~
cannam@125 7020 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
cannam@125 7021 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
cannam@125 7022 ;;
cannam@125 7023 *) # Version 6 and above use weak symbols
cannam@125 7024 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@125 7025 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
cannam@125 7026 ;;
cannam@125 7027 esac
cannam@125 7028
cannam@125 7029 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
cannam@125 7030 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
cannam@125 7031 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
cannam@125 7032 ;;
cannam@125 7033 cxx*)
cannam@125 7034 # Compaq C++
cannam@125 7035 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@125 7036 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols'
cannam@125 7037
cannam@125 7038 runpath_var=LD_RUN_PATH
cannam@125 7039 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
cannam@125 7040 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@125 7041
cannam@125 7042 # Commands to make compiler produce verbose output that lists
cannam@125 7043 # what "hidden" libraries, object files and flags are used when
cannam@125 7044 # linking a shared library.
cannam@125 7045 #
cannam@125 7046 # There doesn't appear to be a way to prevent this compiler from
cannam@125 7047 # explicitly linking system object files so we need to strip them
cannam@125 7048 # from the output so that they don't get included in the library
cannam@125 7049 # dependencies.
cannam@125 7050 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
cannam@125 7051 ;;
cannam@125 7052 xl* | mpixl* | bgxl*)
cannam@125 7053 # IBM XL 8.0 on PPC, with GNU ld
cannam@125 7054 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@125 7055 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
cannam@125 7056 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@125 7057 if test yes = "$supports_anon_versioning"; then
cannam@125 7058 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
cannam@125 7059 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
cannam@125 7060 echo "local: *; };" >> $output_objdir/$libname.ver~
cannam@125 7061 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
cannam@125 7062 fi
cannam@125 7063 ;;
cannam@125 7064 *)
cannam@125 7065 case `$CC -V 2>&1 | sed 5q` in
cannam@125 7066 *Sun\ C*)
cannam@125 7067 # Sun C++ 5.9
cannam@125 7068 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
cannam@125 7069 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
cannam@125 7070 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
cannam@125 7071 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@125 7072 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
cannam@125 7073 _LT_TAGVAR(compiler_needs_object, $1)=yes
cannam@125 7074
cannam@125 7075 # Not sure whether something based on
cannam@125 7076 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
cannam@125 7077 # would be better.
cannam@125 7078 output_verbose_link_cmd='func_echo_all'
cannam@125 7079
cannam@125 7080 # Archives containing C++ object files must be created using
cannam@125 7081 # "CC -xar", where "CC" is the Sun C++ compiler. This is
cannam@125 7082 # necessary to make sure instantiated templates are included
cannam@125 7083 # in the archive.
cannam@125 7084 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
cannam@125 7085 ;;
cannam@125 7086 esac
cannam@125 7087 ;;
cannam@125 7088 esac
cannam@125 7089 ;;
cannam@125 7090
cannam@125 7091 lynxos*)
cannam@125 7092 # FIXME: insert proper C++ library support
cannam@125 7093 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 7094 ;;
cannam@125 7095
cannam@125 7096 m88k*)
cannam@125 7097 # FIXME: insert proper C++ library support
cannam@125 7098 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 7099 ;;
cannam@125 7100
cannam@125 7101 mvs*)
cannam@125 7102 case $cc_basename in
cannam@125 7103 cxx*)
cannam@125 7104 # FIXME: insert proper C++ library support
cannam@125 7105 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 7106 ;;
cannam@125 7107 *)
cannam@125 7108 # FIXME: insert proper C++ library support
cannam@125 7109 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 7110 ;;
cannam@125 7111 esac
cannam@125 7112 ;;
cannam@125 7113
cannam@125 7114 netbsd*)
cannam@125 7115 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
cannam@125 7116 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
cannam@125 7117 wlarc=
cannam@125 7118 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@125 7119 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@125 7120 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@125 7121 fi
cannam@125 7122 # Workaround some broken pre-1.5 toolchains
cannam@125 7123 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
cannam@125 7124 ;;
cannam@125 7125
cannam@125 7126 *nto* | *qnx*)
cannam@125 7127 _LT_TAGVAR(ld_shlibs, $1)=yes
cannam@125 7128 ;;
cannam@125 7129
cannam@125 7130 openbsd* | bitrig*)
cannam@125 7131 if test -f /usr/libexec/ld.so; then
cannam@125 7132 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@125 7133 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@125 7134 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
cannam@125 7135 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
cannam@125 7136 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
cannam@125 7137 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
cannam@125 7138 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
cannam@125 7139 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
cannam@125 7140 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
cannam@125 7141 fi
cannam@125 7142 output_verbose_link_cmd=func_echo_all
cannam@125 7143 else
cannam@125 7144 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 7145 fi
cannam@125 7146 ;;
cannam@125 7147
cannam@125 7148 osf3* | osf4* | osf5*)
cannam@125 7149 case $cc_basename in
cannam@125 7150 KCC*)
cannam@125 7151 # Kuck and Associates, Inc. (KAI) C++ Compiler
cannam@125 7152
cannam@125 7153 # KCC will only create a shared library if the output file
cannam@125 7154 # ends with ".so" (or ".sl" for HP-UX), so rename the library
cannam@125 7155 # to its proper name (with version) after linking.
cannam@125 7156 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
cannam@125 7157
cannam@125 7158 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
cannam@125 7159 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@125 7160
cannam@125 7161 # Archives containing C++ object files must be created using
cannam@125 7162 # the KAI C++ compiler.
cannam@125 7163 case $host in
cannam@125 7164 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
cannam@125 7165 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
cannam@125 7166 esac
cannam@125 7167 ;;
cannam@125 7168 RCC*)
cannam@125 7169 # Rational C++ 2.4.1
cannam@125 7170 # FIXME: insert proper C++ library support
cannam@125 7171 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 7172 ;;
cannam@125 7173 cxx*)
cannam@125 7174 case $host in
cannam@125 7175 osf3*)
cannam@125 7176 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
cannam@125 7177 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
cannam@125 7178 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@125 7179 ;;
cannam@125 7180 *)
cannam@125 7181 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
cannam@125 7182 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
cannam@125 7183 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
cannam@125 7184 echo "-hidden">> $lib.exp~
cannam@125 7185 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
cannam@125 7186 $RM $lib.exp'
cannam@125 7187 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
cannam@125 7188 ;;
cannam@125 7189 esac
cannam@125 7190
cannam@125 7191 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@125 7192
cannam@125 7193 # Commands to make compiler produce verbose output that lists
cannam@125 7194 # what "hidden" libraries, object files and flags are used when
cannam@125 7195 # linking a shared library.
cannam@125 7196 #
cannam@125 7197 # There doesn't appear to be a way to prevent this compiler from
cannam@125 7198 # explicitly linking system object files so we need to strip them
cannam@125 7199 # from the output so that they don't get included in the library
cannam@125 7200 # dependencies.
cannam@125 7201 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
cannam@125 7202 ;;
cannam@125 7203 *)
cannam@125 7204 if test yes,no = "$GXX,$with_gnu_ld"; then
cannam@125 7205 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
cannam@125 7206 case $host in
cannam@125 7207 osf3*)
cannam@125 7208 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
cannam@125 7209 ;;
cannam@125 7210 *)
cannam@125 7211 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
cannam@125 7212 ;;
cannam@125 7213 esac
cannam@125 7214
cannam@125 7215 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@125 7216 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@125 7217
cannam@125 7218 # Commands to make compiler produce verbose output that lists
cannam@125 7219 # what "hidden" libraries, object files and flags are used when
cannam@125 7220 # linking a shared library.
cannam@125 7221 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
cannam@125 7222
cannam@125 7223 else
cannam@125 7224 # FIXME: insert proper C++ library support
cannam@125 7225 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 7226 fi
cannam@125 7227 ;;
cannam@125 7228 esac
cannam@125 7229 ;;
cannam@125 7230
cannam@125 7231 psos*)
cannam@125 7232 # FIXME: insert proper C++ library support
cannam@125 7233 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 7234 ;;
cannam@125 7235
cannam@125 7236 sunos4*)
cannam@125 7237 case $cc_basename in
cannam@125 7238 CC*)
cannam@125 7239 # Sun C++ 4.x
cannam@125 7240 # FIXME: insert proper C++ library support
cannam@125 7241 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 7242 ;;
cannam@125 7243 lcc*)
cannam@125 7244 # Lucid
cannam@125 7245 # FIXME: insert proper C++ library support
cannam@125 7246 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 7247 ;;
cannam@125 7248 *)
cannam@125 7249 # FIXME: insert proper C++ library support
cannam@125 7250 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 7251 ;;
cannam@125 7252 esac
cannam@125 7253 ;;
cannam@125 7254
cannam@125 7255 solaris*)
cannam@125 7256 case $cc_basename in
cannam@125 7257 CC* | sunCC*)
cannam@125 7258 # Sun C++ 4.2, 5.x and Centerline C++
cannam@125 7259 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
cannam@125 7260 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
cannam@125 7261 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
cannam@125 7262 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
cannam@125 7263 $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
cannam@125 7264
cannam@125 7265 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@125 7266 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@125 7267 case $host_os in
cannam@125 7268 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
cannam@125 7269 *)
cannam@125 7270 # The compiler driver will combine and reorder linker options,
cannam@125 7271 # but understands '-z linker_flag'.
cannam@125 7272 # Supported since Solaris 2.6 (maybe 2.5.1?)
cannam@125 7273 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
cannam@125 7274 ;;
cannam@125 7275 esac
cannam@125 7276 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@125 7277
cannam@125 7278 output_verbose_link_cmd='func_echo_all'
cannam@125 7279
cannam@125 7280 # Archives containing C++ object files must be created using
cannam@125 7281 # "CC -xar", where "CC" is the Sun C++ compiler. This is
cannam@125 7282 # necessary to make sure instantiated templates are included
cannam@125 7283 # in the archive.
cannam@125 7284 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
cannam@125 7285 ;;
cannam@125 7286 gcx*)
cannam@125 7287 # Green Hills C++ Compiler
cannam@125 7288 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
cannam@125 7289
cannam@125 7290 # The C++ compiler must be used to create the archive.
cannam@125 7291 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
cannam@125 7292 ;;
cannam@125 7293 *)
cannam@125 7294 # GNU C++ compiler with Solaris linker
cannam@125 7295 if test yes,no = "$GXX,$with_gnu_ld"; then
cannam@125 7296 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
cannam@125 7297 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
cannam@125 7298 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
cannam@125 7299 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
cannam@125 7300 $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
cannam@125 7301
cannam@125 7302 # Commands to make compiler produce verbose output that lists
cannam@125 7303 # what "hidden" libraries, object files and flags are used when
cannam@125 7304 # linking a shared library.
cannam@125 7305 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
cannam@125 7306 else
cannam@125 7307 # g++ 2.7 appears to require '-G' NOT '-shared' on this
cannam@125 7308 # platform.
cannam@125 7309 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
cannam@125 7310 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
cannam@125 7311 $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
cannam@125 7312
cannam@125 7313 # Commands to make compiler produce verbose output that lists
cannam@125 7314 # what "hidden" libraries, object files and flags are used when
cannam@125 7315 # linking a shared library.
cannam@125 7316 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
cannam@125 7317 fi
cannam@125 7318
cannam@125 7319 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
cannam@125 7320 case $host_os in
cannam@125 7321 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
cannam@125 7322 *)
cannam@125 7323 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
cannam@125 7324 ;;
cannam@125 7325 esac
cannam@125 7326 fi
cannam@125 7327 ;;
cannam@125 7328 esac
cannam@125 7329 ;;
cannam@125 7330
cannam@125 7331 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
cannam@125 7332 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
cannam@125 7333 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@125 7334 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@125 7335 runpath_var='LD_RUN_PATH'
cannam@125 7336
cannam@125 7337 case $cc_basename in
cannam@125 7338 CC*)
cannam@125 7339 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@125 7340 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@125 7341 ;;
cannam@125 7342 *)
cannam@125 7343 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@125 7344 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@125 7345 ;;
cannam@125 7346 esac
cannam@125 7347 ;;
cannam@125 7348
cannam@125 7349 sysv5* | sco3.2v5* | sco5v6*)
cannam@125 7350 # Note: We CANNOT use -z defs as we might desire, because we do not
cannam@125 7351 # link with -lc, and that would cause any symbols used from libc to
cannam@125 7352 # always be unresolved, which means just about no library would
cannam@125 7353 # ever link correctly. If we're not using GNU ld we use -z text
cannam@125 7354 # though, which does catch some bad symbols but isn't as heavy-handed
cannam@125 7355 # as -z defs.
cannam@125 7356 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
cannam@125 7357 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
cannam@125 7358 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@125 7359 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@125 7360 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
cannam@125 7361 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
cannam@125 7362 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@125 7363 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
cannam@125 7364 runpath_var='LD_RUN_PATH'
cannam@125 7365
cannam@125 7366 case $cc_basename in
cannam@125 7367 CC*)
cannam@125 7368 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@125 7369 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@125 7370 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
cannam@125 7371 '"$_LT_TAGVAR(old_archive_cmds, $1)"
cannam@125 7372 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
cannam@125 7373 '"$_LT_TAGVAR(reload_cmds, $1)"
cannam@125 7374 ;;
cannam@125 7375 *)
cannam@125 7376 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@125 7377 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@125 7378 ;;
cannam@125 7379 esac
cannam@125 7380 ;;
cannam@125 7381
cannam@125 7382 tandem*)
cannam@125 7383 case $cc_basename in
cannam@125 7384 NCC*)
cannam@125 7385 # NonStop-UX NCC 3.20
cannam@125 7386 # FIXME: insert proper C++ library support
cannam@125 7387 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 7388 ;;
cannam@125 7389 *)
cannam@125 7390 # FIXME: insert proper C++ library support
cannam@125 7391 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 7392 ;;
cannam@125 7393 esac
cannam@125 7394 ;;
cannam@125 7395
cannam@125 7396 vxworks*)
cannam@125 7397 # FIXME: insert proper C++ library support
cannam@125 7398 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 7399 ;;
cannam@125 7400
cannam@125 7401 *)
cannam@125 7402 # FIXME: insert proper C++ library support
cannam@125 7403 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@125 7404 ;;
cannam@125 7405 esac
cannam@125 7406
cannam@125 7407 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
cannam@125 7408 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
cannam@125 7409
cannam@125 7410 _LT_TAGVAR(GCC, $1)=$GXX
cannam@125 7411 _LT_TAGVAR(LD, $1)=$LD
cannam@125 7412
cannam@125 7413 ## CAVEAT EMPTOR:
cannam@125 7414 ## There is no encapsulation within the following macros, do not change
cannam@125 7415 ## the running order or otherwise move them around unless you know exactly
cannam@125 7416 ## what you are doing...
cannam@125 7417 _LT_SYS_HIDDEN_LIBDEPS($1)
cannam@125 7418 _LT_COMPILER_PIC($1)
cannam@125 7419 _LT_COMPILER_C_O($1)
cannam@125 7420 _LT_COMPILER_FILE_LOCKS($1)
cannam@125 7421 _LT_LINKER_SHLIBS($1)
cannam@125 7422 _LT_SYS_DYNAMIC_LINKER($1)
cannam@125 7423 _LT_LINKER_HARDCODE_LIBPATH($1)
cannam@125 7424
cannam@125 7425 _LT_CONFIG($1)
cannam@125 7426 fi # test -n "$compiler"
cannam@125 7427
cannam@125 7428 CC=$lt_save_CC
cannam@125 7429 CFLAGS=$lt_save_CFLAGS
cannam@125 7430 LDCXX=$LD
cannam@125 7431 LD=$lt_save_LD
cannam@125 7432 GCC=$lt_save_GCC
cannam@125 7433 with_gnu_ld=$lt_save_with_gnu_ld
cannam@125 7434 lt_cv_path_LDCXX=$lt_cv_path_LD
cannam@125 7435 lt_cv_path_LD=$lt_save_path_LD
cannam@125 7436 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
cannam@125 7437 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
cannam@125 7438 fi # test yes != "$_lt_caught_CXX_error"
cannam@125 7439
cannam@125 7440 AC_LANG_POP
cannam@125 7441 ])# _LT_LANG_CXX_CONFIG
cannam@125 7442
cannam@125 7443
cannam@125 7444 # _LT_FUNC_STRIPNAME_CNF
cannam@125 7445 # ----------------------
cannam@125 7446 # func_stripname_cnf prefix suffix name
cannam@125 7447 # strip PREFIX and SUFFIX off of NAME.
cannam@125 7448 # PREFIX and SUFFIX must not contain globbing or regex special
cannam@125 7449 # characters, hashes, percent signs, but SUFFIX may contain a leading
cannam@125 7450 # dot (in which case that matches only a dot).
cannam@125 7451 #
cannam@125 7452 # This function is identical to the (non-XSI) version of func_stripname,
cannam@125 7453 # except this one can be used by m4 code that may be executed by configure,
cannam@125 7454 # rather than the libtool script.
cannam@125 7455 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
cannam@125 7456 AC_REQUIRE([_LT_DECL_SED])
cannam@125 7457 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
cannam@125 7458 func_stripname_cnf ()
cannam@125 7459 {
cannam@125 7460 case @S|@2 in
cannam@125 7461 .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
cannam@125 7462 *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
cannam@125 7463 esac
cannam@125 7464 } # func_stripname_cnf
cannam@125 7465 ])# _LT_FUNC_STRIPNAME_CNF
cannam@125 7466
cannam@125 7467
cannam@125 7468 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
cannam@125 7469 # ---------------------------------
cannam@125 7470 # Figure out "hidden" library dependencies from verbose
cannam@125 7471 # compiler output when linking a shared library.
cannam@125 7472 # Parse the compiler output and extract the necessary
cannam@125 7473 # objects, libraries and library flags.
cannam@125 7474 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
cannam@125 7475 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@125 7476 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
cannam@125 7477 # Dependencies to place before and after the object being linked:
cannam@125 7478 _LT_TAGVAR(predep_objects, $1)=
cannam@125 7479 _LT_TAGVAR(postdep_objects, $1)=
cannam@125 7480 _LT_TAGVAR(predeps, $1)=
cannam@125 7481 _LT_TAGVAR(postdeps, $1)=
cannam@125 7482 _LT_TAGVAR(compiler_lib_search_path, $1)=
cannam@125 7483
cannam@125 7484 dnl we can't use the lt_simple_compile_test_code here,
cannam@125 7485 dnl because it contains code intended for an executable,
cannam@125 7486 dnl not a library. It's possible we should let each
cannam@125 7487 dnl tag define a new lt_????_link_test_code variable,
cannam@125 7488 dnl but it's only used here...
cannam@125 7489 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
cannam@125 7490 int a;
cannam@125 7491 void foo (void) { a = 0; }
cannam@125 7492 _LT_EOF
cannam@125 7493 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
cannam@125 7494 class Foo
cannam@125 7495 {
cannam@125 7496 public:
cannam@125 7497 Foo (void) { a = 0; }
cannam@125 7498 private:
cannam@125 7499 int a;
cannam@125 7500 };
cannam@125 7501 _LT_EOF
cannam@125 7502 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
cannam@125 7503 subroutine foo
cannam@125 7504 implicit none
cannam@125 7505 integer*4 a
cannam@125 7506 a=0
cannam@125 7507 return
cannam@125 7508 end
cannam@125 7509 _LT_EOF
cannam@125 7510 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
cannam@125 7511 subroutine foo
cannam@125 7512 implicit none
cannam@125 7513 integer a
cannam@125 7514 a=0
cannam@125 7515 return
cannam@125 7516 end
cannam@125 7517 _LT_EOF
cannam@125 7518 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
cannam@125 7519 public class foo {
cannam@125 7520 private int a;
cannam@125 7521 public void bar (void) {
cannam@125 7522 a = 0;
cannam@125 7523 }
cannam@125 7524 };
cannam@125 7525 _LT_EOF
cannam@125 7526 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
cannam@125 7527 package foo
cannam@125 7528 func foo() {
cannam@125 7529 }
cannam@125 7530 _LT_EOF
cannam@125 7531 ])
cannam@125 7532
cannam@125 7533 _lt_libdeps_save_CFLAGS=$CFLAGS
cannam@125 7534 case "$CC $CFLAGS " in #(
cannam@125 7535 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
cannam@125 7536 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
cannam@125 7537 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
cannam@125 7538 esac
cannam@125 7539
cannam@125 7540 dnl Parse the compiler output and extract the necessary
cannam@125 7541 dnl objects, libraries and library flags.
cannam@125 7542 if AC_TRY_EVAL(ac_compile); then
cannam@125 7543 # Parse the compiler output and extract the necessary
cannam@125 7544 # objects, libraries and library flags.
cannam@125 7545
cannam@125 7546 # Sentinel used to keep track of whether or not we are before
cannam@125 7547 # the conftest object file.
cannam@125 7548 pre_test_object_deps_done=no
cannam@125 7549
cannam@125 7550 for p in `eval "$output_verbose_link_cmd"`; do
cannam@125 7551 case $prev$p in
cannam@125 7552
cannam@125 7553 -L* | -R* | -l*)
cannam@125 7554 # Some compilers place space between "-{L,R}" and the path.
cannam@125 7555 # Remove the space.
cannam@125 7556 if test x-L = "$p" ||
cannam@125 7557 test x-R = "$p"; then
cannam@125 7558 prev=$p
cannam@125 7559 continue
cannam@125 7560 fi
cannam@125 7561
cannam@125 7562 # Expand the sysroot to ease extracting the directories later.
cannam@125 7563 if test -z "$prev"; then
cannam@125 7564 case $p in
cannam@125 7565 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
cannam@125 7566 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
cannam@125 7567 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
cannam@125 7568 esac
cannam@125 7569 fi
cannam@125 7570 case $p in
cannam@125 7571 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
cannam@125 7572 esac
cannam@125 7573 if test no = "$pre_test_object_deps_done"; then
cannam@125 7574 case $prev in
cannam@125 7575 -L | -R)
cannam@125 7576 # Internal compiler library paths should come after those
cannam@125 7577 # provided the user. The postdeps already come after the
cannam@125 7578 # user supplied libs so there is no need to process them.
cannam@125 7579 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
cannam@125 7580 _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
cannam@125 7581 else
cannam@125 7582 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
cannam@125 7583 fi
cannam@125 7584 ;;
cannam@125 7585 # The "-l" case would never come before the object being
cannam@125 7586 # linked, so don't bother handling this case.
cannam@125 7587 esac
cannam@125 7588 else
cannam@125 7589 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
cannam@125 7590 _LT_TAGVAR(postdeps, $1)=$prev$p
cannam@125 7591 else
cannam@125 7592 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
cannam@125 7593 fi
cannam@125 7594 fi
cannam@125 7595 prev=
cannam@125 7596 ;;
cannam@125 7597
cannam@125 7598 *.lto.$objext) ;; # Ignore GCC LTO objects
cannam@125 7599 *.$objext)
cannam@125 7600 # This assumes that the test object file only shows up
cannam@125 7601 # once in the compiler output.
cannam@125 7602 if test "$p" = "conftest.$objext"; then
cannam@125 7603 pre_test_object_deps_done=yes
cannam@125 7604 continue
cannam@125 7605 fi
cannam@125 7606
cannam@125 7607 if test no = "$pre_test_object_deps_done"; then
cannam@125 7608 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
cannam@125 7609 _LT_TAGVAR(predep_objects, $1)=$p
cannam@125 7610 else
cannam@125 7611 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
cannam@125 7612 fi
cannam@125 7613 else
cannam@125 7614 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
cannam@125 7615 _LT_TAGVAR(postdep_objects, $1)=$p
cannam@125 7616 else
cannam@125 7617 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
cannam@125 7618 fi
cannam@125 7619 fi
cannam@125 7620 ;;
cannam@125 7621
cannam@125 7622 *) ;; # Ignore the rest.
cannam@125 7623
cannam@125 7624 esac
cannam@125 7625 done
cannam@125 7626
cannam@125 7627 # Clean up.
cannam@125 7628 rm -f a.out a.exe
cannam@125 7629 else
cannam@125 7630 echo "libtool.m4: error: problem compiling $1 test program"
cannam@125 7631 fi
cannam@125 7632
cannam@125 7633 $RM -f confest.$objext
cannam@125 7634 CFLAGS=$_lt_libdeps_save_CFLAGS
cannam@125 7635
cannam@125 7636 # PORTME: override above test on systems where it is broken
cannam@125 7637 m4_if([$1], [CXX],
cannam@125 7638 [case $host_os in
cannam@125 7639 interix[[3-9]]*)
cannam@125 7640 # Interix 3.5 installs completely hosed .la files for C++, so rather than
cannam@125 7641 # hack all around it, let's just trust "g++" to DTRT.
cannam@125 7642 _LT_TAGVAR(predep_objects,$1)=
cannam@125 7643 _LT_TAGVAR(postdep_objects,$1)=
cannam@125 7644 _LT_TAGVAR(postdeps,$1)=
cannam@125 7645 ;;
cannam@125 7646 esac
cannam@125 7647 ])
cannam@125 7648
cannam@125 7649 case " $_LT_TAGVAR(postdeps, $1) " in
cannam@125 7650 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
cannam@125 7651 esac
cannam@125 7652 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
cannam@125 7653 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
cannam@125 7654 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
cannam@125 7655 fi
cannam@125 7656 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
cannam@125 7657 [The directories searched by this compiler when creating a shared library])
cannam@125 7658 _LT_TAGDECL([], [predep_objects], [1],
cannam@125 7659 [Dependencies to place before and after the objects being linked to
cannam@125 7660 create a shared library])
cannam@125 7661 _LT_TAGDECL([], [postdep_objects], [1])
cannam@125 7662 _LT_TAGDECL([], [predeps], [1])
cannam@125 7663 _LT_TAGDECL([], [postdeps], [1])
cannam@125 7664 _LT_TAGDECL([], [compiler_lib_search_path], [1],
cannam@125 7665 [The library search path used internally by the compiler when linking
cannam@125 7666 a shared library])
cannam@125 7667 ])# _LT_SYS_HIDDEN_LIBDEPS
cannam@125 7668
cannam@125 7669
cannam@125 7670 # _LT_LANG_F77_CONFIG([TAG])
cannam@125 7671 # --------------------------
cannam@125 7672 # Ensure that the configuration variables for a Fortran 77 compiler are
cannam@125 7673 # suitably defined. These variables are subsequently used by _LT_CONFIG
cannam@125 7674 # to write the compiler configuration to 'libtool'.
cannam@125 7675 m4_defun([_LT_LANG_F77_CONFIG],
cannam@125 7676 [AC_LANG_PUSH(Fortran 77)
cannam@125 7677 if test -z "$F77" || test no = "$F77"; then
cannam@125 7678 _lt_disable_F77=yes
cannam@125 7679 fi
cannam@125 7680
cannam@125 7681 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@125 7682 _LT_TAGVAR(allow_undefined_flag, $1)=
cannam@125 7683 _LT_TAGVAR(always_export_symbols, $1)=no
cannam@125 7684 _LT_TAGVAR(archive_expsym_cmds, $1)=
cannam@125 7685 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
cannam@125 7686 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@125 7687 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
cannam@125 7688 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
cannam@125 7689 _LT_TAGVAR(hardcode_libdir_separator, $1)=
cannam@125 7690 _LT_TAGVAR(hardcode_minus_L, $1)=no
cannam@125 7691 _LT_TAGVAR(hardcode_automatic, $1)=no
cannam@125 7692 _LT_TAGVAR(inherit_rpath, $1)=no
cannam@125 7693 _LT_TAGVAR(module_cmds, $1)=
cannam@125 7694 _LT_TAGVAR(module_expsym_cmds, $1)=
cannam@125 7695 _LT_TAGVAR(link_all_deplibs, $1)=unknown
cannam@125 7696 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
cannam@125 7697 _LT_TAGVAR(reload_flag, $1)=$reload_flag
cannam@125 7698 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
cannam@125 7699 _LT_TAGVAR(no_undefined_flag, $1)=
cannam@125 7700 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@125 7701 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
cannam@125 7702
cannam@125 7703 # Source file extension for f77 test sources.
cannam@125 7704 ac_ext=f
cannam@125 7705
cannam@125 7706 # Object file extension for compiled f77 test sources.
cannam@125 7707 objext=o
cannam@125 7708 _LT_TAGVAR(objext, $1)=$objext
cannam@125 7709
cannam@125 7710 # No sense in running all these tests if we already determined that
cannam@125 7711 # the F77 compiler isn't working. Some variables (like enable_shared)
cannam@125 7712 # are currently assumed to apply to all compilers on this platform,
cannam@125 7713 # and will be corrupted by setting them based on a non-working compiler.
cannam@125 7714 if test yes != "$_lt_disable_F77"; then
cannam@125 7715 # Code to be used in simple compile tests
cannam@125 7716 lt_simple_compile_test_code="\
cannam@125 7717 subroutine t
cannam@125 7718 return
cannam@125 7719 end
cannam@125 7720 "
cannam@125 7721
cannam@125 7722 # Code to be used in simple link tests
cannam@125 7723 lt_simple_link_test_code="\
cannam@125 7724 program t
cannam@125 7725 end
cannam@125 7726 "
cannam@125 7727
cannam@125 7728 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
cannam@125 7729 _LT_TAG_COMPILER
cannam@125 7730
cannam@125 7731 # save warnings/boilerplate of simple test code
cannam@125 7732 _LT_COMPILER_BOILERPLATE
cannam@125 7733 _LT_LINKER_BOILERPLATE
cannam@125 7734
cannam@125 7735 # Allow CC to be a program name with arguments.
cannam@125 7736 lt_save_CC=$CC
cannam@125 7737 lt_save_GCC=$GCC
cannam@125 7738 lt_save_CFLAGS=$CFLAGS
cannam@125 7739 CC=${F77-"f77"}
cannam@125 7740 CFLAGS=$FFLAGS
cannam@125 7741 compiler=$CC
cannam@125 7742 _LT_TAGVAR(compiler, $1)=$CC
cannam@125 7743 _LT_CC_BASENAME([$compiler])
cannam@125 7744 GCC=$G77
cannam@125 7745 if test -n "$compiler"; then
cannam@125 7746 AC_MSG_CHECKING([if libtool supports shared libraries])
cannam@125 7747 AC_MSG_RESULT([$can_build_shared])
cannam@125 7748
cannam@125 7749 AC_MSG_CHECKING([whether to build shared libraries])
cannam@125 7750 test no = "$can_build_shared" && enable_shared=no
cannam@125 7751
cannam@125 7752 # On AIX, shared libraries and static libraries use the same namespace, and
cannam@125 7753 # are all built from PIC.
cannam@125 7754 case $host_os in
cannam@125 7755 aix3*)
cannam@125 7756 test yes = "$enable_shared" && enable_static=no
cannam@125 7757 if test -n "$RANLIB"; then
cannam@125 7758 archive_cmds="$archive_cmds~\$RANLIB \$lib"
cannam@125 7759 postinstall_cmds='$RANLIB $lib'
cannam@125 7760 fi
cannam@125 7761 ;;
cannam@125 7762 aix[[4-9]]*)
cannam@125 7763 if test ia64 != "$host_cpu"; then
cannam@125 7764 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
cannam@125 7765 yes,aix,yes) ;; # shared object as lib.so file only
cannam@125 7766 yes,svr4,*) ;; # shared object as lib.so archive member only
cannam@125 7767 yes,*) enable_static=no ;; # shared object in lib.a archive as well
cannam@125 7768 esac
cannam@125 7769 fi
cannam@125 7770 ;;
cannam@125 7771 esac
cannam@125 7772 AC_MSG_RESULT([$enable_shared])
cannam@125 7773
cannam@125 7774 AC_MSG_CHECKING([whether to build static libraries])
cannam@125 7775 # Make sure either enable_shared or enable_static is yes.
cannam@125 7776 test yes = "$enable_shared" || enable_static=yes
cannam@125 7777 AC_MSG_RESULT([$enable_static])
cannam@125 7778
cannam@125 7779 _LT_TAGVAR(GCC, $1)=$G77
cannam@125 7780 _LT_TAGVAR(LD, $1)=$LD
cannam@125 7781
cannam@125 7782 ## CAVEAT EMPTOR:
cannam@125 7783 ## There is no encapsulation within the following macros, do not change
cannam@125 7784 ## the running order or otherwise move them around unless you know exactly
cannam@125 7785 ## what you are doing...
cannam@125 7786 _LT_COMPILER_PIC($1)
cannam@125 7787 _LT_COMPILER_C_O($1)
cannam@125 7788 _LT_COMPILER_FILE_LOCKS($1)
cannam@125 7789 _LT_LINKER_SHLIBS($1)
cannam@125 7790 _LT_SYS_DYNAMIC_LINKER($1)
cannam@125 7791 _LT_LINKER_HARDCODE_LIBPATH($1)
cannam@125 7792
cannam@125 7793 _LT_CONFIG($1)
cannam@125 7794 fi # test -n "$compiler"
cannam@125 7795
cannam@125 7796 GCC=$lt_save_GCC
cannam@125 7797 CC=$lt_save_CC
cannam@125 7798 CFLAGS=$lt_save_CFLAGS
cannam@125 7799 fi # test yes != "$_lt_disable_F77"
cannam@125 7800
cannam@125 7801 AC_LANG_POP
cannam@125 7802 ])# _LT_LANG_F77_CONFIG
cannam@125 7803
cannam@125 7804
cannam@125 7805 # _LT_LANG_FC_CONFIG([TAG])
cannam@125 7806 # -------------------------
cannam@125 7807 # Ensure that the configuration variables for a Fortran compiler are
cannam@125 7808 # suitably defined. These variables are subsequently used by _LT_CONFIG
cannam@125 7809 # to write the compiler configuration to 'libtool'.
cannam@125 7810 m4_defun([_LT_LANG_FC_CONFIG],
cannam@125 7811 [AC_LANG_PUSH(Fortran)
cannam@125 7812
cannam@125 7813 if test -z "$FC" || test no = "$FC"; then
cannam@125 7814 _lt_disable_FC=yes
cannam@125 7815 fi
cannam@125 7816
cannam@125 7817 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@125 7818 _LT_TAGVAR(allow_undefined_flag, $1)=
cannam@125 7819 _LT_TAGVAR(always_export_symbols, $1)=no
cannam@125 7820 _LT_TAGVAR(archive_expsym_cmds, $1)=
cannam@125 7821 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
cannam@125 7822 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@125 7823 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
cannam@125 7824 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
cannam@125 7825 _LT_TAGVAR(hardcode_libdir_separator, $1)=
cannam@125 7826 _LT_TAGVAR(hardcode_minus_L, $1)=no
cannam@125 7827 _LT_TAGVAR(hardcode_automatic, $1)=no
cannam@125 7828 _LT_TAGVAR(inherit_rpath, $1)=no
cannam@125 7829 _LT_TAGVAR(module_cmds, $1)=
cannam@125 7830 _LT_TAGVAR(module_expsym_cmds, $1)=
cannam@125 7831 _LT_TAGVAR(link_all_deplibs, $1)=unknown
cannam@125 7832 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
cannam@125 7833 _LT_TAGVAR(reload_flag, $1)=$reload_flag
cannam@125 7834 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
cannam@125 7835 _LT_TAGVAR(no_undefined_flag, $1)=
cannam@125 7836 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@125 7837 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
cannam@125 7838
cannam@125 7839 # Source file extension for fc test sources.
cannam@125 7840 ac_ext=${ac_fc_srcext-f}
cannam@125 7841
cannam@125 7842 # Object file extension for compiled fc test sources.
cannam@125 7843 objext=o
cannam@125 7844 _LT_TAGVAR(objext, $1)=$objext
cannam@125 7845
cannam@125 7846 # No sense in running all these tests if we already determined that
cannam@125 7847 # the FC compiler isn't working. Some variables (like enable_shared)
cannam@125 7848 # are currently assumed to apply to all compilers on this platform,
cannam@125 7849 # and will be corrupted by setting them based on a non-working compiler.
cannam@125 7850 if test yes != "$_lt_disable_FC"; then
cannam@125 7851 # Code to be used in simple compile tests
cannam@125 7852 lt_simple_compile_test_code="\
cannam@125 7853 subroutine t
cannam@125 7854 return
cannam@125 7855 end
cannam@125 7856 "
cannam@125 7857
cannam@125 7858 # Code to be used in simple link tests
cannam@125 7859 lt_simple_link_test_code="\
cannam@125 7860 program t
cannam@125 7861 end
cannam@125 7862 "
cannam@125 7863
cannam@125 7864 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
cannam@125 7865 _LT_TAG_COMPILER
cannam@125 7866
cannam@125 7867 # save warnings/boilerplate of simple test code
cannam@125 7868 _LT_COMPILER_BOILERPLATE
cannam@125 7869 _LT_LINKER_BOILERPLATE
cannam@125 7870
cannam@125 7871 # Allow CC to be a program name with arguments.
cannam@125 7872 lt_save_CC=$CC
cannam@125 7873 lt_save_GCC=$GCC
cannam@125 7874 lt_save_CFLAGS=$CFLAGS
cannam@125 7875 CC=${FC-"f95"}
cannam@125 7876 CFLAGS=$FCFLAGS
cannam@125 7877 compiler=$CC
cannam@125 7878 GCC=$ac_cv_fc_compiler_gnu
cannam@125 7879
cannam@125 7880 _LT_TAGVAR(compiler, $1)=$CC
cannam@125 7881 _LT_CC_BASENAME([$compiler])
cannam@125 7882
cannam@125 7883 if test -n "$compiler"; then
cannam@125 7884 AC_MSG_CHECKING([if libtool supports shared libraries])
cannam@125 7885 AC_MSG_RESULT([$can_build_shared])
cannam@125 7886
cannam@125 7887 AC_MSG_CHECKING([whether to build shared libraries])
cannam@125 7888 test no = "$can_build_shared" && enable_shared=no
cannam@125 7889
cannam@125 7890 # On AIX, shared libraries and static libraries use the same namespace, and
cannam@125 7891 # are all built from PIC.
cannam@125 7892 case $host_os in
cannam@125 7893 aix3*)
cannam@125 7894 test yes = "$enable_shared" && enable_static=no
cannam@125 7895 if test -n "$RANLIB"; then
cannam@125 7896 archive_cmds="$archive_cmds~\$RANLIB \$lib"
cannam@125 7897 postinstall_cmds='$RANLIB $lib'
cannam@125 7898 fi
cannam@125 7899 ;;
cannam@125 7900 aix[[4-9]]*)
cannam@125 7901 if test ia64 != "$host_cpu"; then
cannam@125 7902 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
cannam@125 7903 yes,aix,yes) ;; # shared object as lib.so file only
cannam@125 7904 yes,svr4,*) ;; # shared object as lib.so archive member only
cannam@125 7905 yes,*) enable_static=no ;; # shared object in lib.a archive as well
cannam@125 7906 esac
cannam@125 7907 fi
cannam@125 7908 ;;
cannam@125 7909 esac
cannam@125 7910 AC_MSG_RESULT([$enable_shared])
cannam@125 7911
cannam@125 7912 AC_MSG_CHECKING([whether to build static libraries])
cannam@125 7913 # Make sure either enable_shared or enable_static is yes.
cannam@125 7914 test yes = "$enable_shared" || enable_static=yes
cannam@125 7915 AC_MSG_RESULT([$enable_static])
cannam@125 7916
cannam@125 7917 _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
cannam@125 7918 _LT_TAGVAR(LD, $1)=$LD
cannam@125 7919
cannam@125 7920 ## CAVEAT EMPTOR:
cannam@125 7921 ## There is no encapsulation within the following macros, do not change
cannam@125 7922 ## the running order or otherwise move them around unless you know exactly
cannam@125 7923 ## what you are doing...
cannam@125 7924 _LT_SYS_HIDDEN_LIBDEPS($1)
cannam@125 7925 _LT_COMPILER_PIC($1)
cannam@125 7926 _LT_COMPILER_C_O($1)
cannam@125 7927 _LT_COMPILER_FILE_LOCKS($1)
cannam@125 7928 _LT_LINKER_SHLIBS($1)
cannam@125 7929 _LT_SYS_DYNAMIC_LINKER($1)
cannam@125 7930 _LT_LINKER_HARDCODE_LIBPATH($1)
cannam@125 7931
cannam@125 7932 _LT_CONFIG($1)
cannam@125 7933 fi # test -n "$compiler"
cannam@125 7934
cannam@125 7935 GCC=$lt_save_GCC
cannam@125 7936 CC=$lt_save_CC
cannam@125 7937 CFLAGS=$lt_save_CFLAGS
cannam@125 7938 fi # test yes != "$_lt_disable_FC"
cannam@125 7939
cannam@125 7940 AC_LANG_POP
cannam@125 7941 ])# _LT_LANG_FC_CONFIG
cannam@125 7942
cannam@125 7943
cannam@125 7944 # _LT_LANG_GCJ_CONFIG([TAG])
cannam@125 7945 # --------------------------
cannam@125 7946 # Ensure that the configuration variables for the GNU Java Compiler compiler
cannam@125 7947 # are suitably defined. These variables are subsequently used by _LT_CONFIG
cannam@125 7948 # to write the compiler configuration to 'libtool'.
cannam@125 7949 m4_defun([_LT_LANG_GCJ_CONFIG],
cannam@125 7950 [AC_REQUIRE([LT_PROG_GCJ])dnl
cannam@125 7951 AC_LANG_SAVE
cannam@125 7952
cannam@125 7953 # Source file extension for Java test sources.
cannam@125 7954 ac_ext=java
cannam@125 7955
cannam@125 7956 # Object file extension for compiled Java test sources.
cannam@125 7957 objext=o
cannam@125 7958 _LT_TAGVAR(objext, $1)=$objext
cannam@125 7959
cannam@125 7960 # Code to be used in simple compile tests
cannam@125 7961 lt_simple_compile_test_code="class foo {}"
cannam@125 7962
cannam@125 7963 # Code to be used in simple link tests
cannam@125 7964 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
cannam@125 7965
cannam@125 7966 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
cannam@125 7967 _LT_TAG_COMPILER
cannam@125 7968
cannam@125 7969 # save warnings/boilerplate of simple test code
cannam@125 7970 _LT_COMPILER_BOILERPLATE
cannam@125 7971 _LT_LINKER_BOILERPLATE
cannam@125 7972
cannam@125 7973 # Allow CC to be a program name with arguments.
cannam@125 7974 lt_save_CC=$CC
cannam@125 7975 lt_save_CFLAGS=$CFLAGS
cannam@125 7976 lt_save_GCC=$GCC
cannam@125 7977 GCC=yes
cannam@125 7978 CC=${GCJ-"gcj"}
cannam@125 7979 CFLAGS=$GCJFLAGS
cannam@125 7980 compiler=$CC
cannam@125 7981 _LT_TAGVAR(compiler, $1)=$CC
cannam@125 7982 _LT_TAGVAR(LD, $1)=$LD
cannam@125 7983 _LT_CC_BASENAME([$compiler])
cannam@125 7984
cannam@125 7985 # GCJ did not exist at the time GCC didn't implicitly link libc in.
cannam@125 7986 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@125 7987
cannam@125 7988 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
cannam@125 7989 _LT_TAGVAR(reload_flag, $1)=$reload_flag
cannam@125 7990 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
cannam@125 7991
cannam@125 7992 ## CAVEAT EMPTOR:
cannam@125 7993 ## There is no encapsulation within the following macros, do not change
cannam@125 7994 ## the running order or otherwise move them around unless you know exactly
cannam@125 7995 ## what you are doing...
cannam@125 7996 if test -n "$compiler"; then
cannam@125 7997 _LT_COMPILER_NO_RTTI($1)
cannam@125 7998 _LT_COMPILER_PIC($1)
cannam@125 7999 _LT_COMPILER_C_O($1)
cannam@125 8000 _LT_COMPILER_FILE_LOCKS($1)
cannam@125 8001 _LT_LINKER_SHLIBS($1)
cannam@125 8002 _LT_LINKER_HARDCODE_LIBPATH($1)
cannam@125 8003
cannam@125 8004 _LT_CONFIG($1)
cannam@125 8005 fi
cannam@125 8006
cannam@125 8007 AC_LANG_RESTORE
cannam@125 8008
cannam@125 8009 GCC=$lt_save_GCC
cannam@125 8010 CC=$lt_save_CC
cannam@125 8011 CFLAGS=$lt_save_CFLAGS
cannam@125 8012 ])# _LT_LANG_GCJ_CONFIG
cannam@125 8013
cannam@125 8014
cannam@125 8015 # _LT_LANG_GO_CONFIG([TAG])
cannam@125 8016 # --------------------------
cannam@125 8017 # Ensure that the configuration variables for the GNU Go compiler
cannam@125 8018 # are suitably defined. These variables are subsequently used by _LT_CONFIG
cannam@125 8019 # to write the compiler configuration to 'libtool'.
cannam@125 8020 m4_defun([_LT_LANG_GO_CONFIG],
cannam@125 8021 [AC_REQUIRE([LT_PROG_GO])dnl
cannam@125 8022 AC_LANG_SAVE
cannam@125 8023
cannam@125 8024 # Source file extension for Go test sources.
cannam@125 8025 ac_ext=go
cannam@125 8026
cannam@125 8027 # Object file extension for compiled Go test sources.
cannam@125 8028 objext=o
cannam@125 8029 _LT_TAGVAR(objext, $1)=$objext
cannam@125 8030
cannam@125 8031 # Code to be used in simple compile tests
cannam@125 8032 lt_simple_compile_test_code="package main; func main() { }"
cannam@125 8033
cannam@125 8034 # Code to be used in simple link tests
cannam@125 8035 lt_simple_link_test_code='package main; func main() { }'
cannam@125 8036
cannam@125 8037 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
cannam@125 8038 _LT_TAG_COMPILER
cannam@125 8039
cannam@125 8040 # save warnings/boilerplate of simple test code
cannam@125 8041 _LT_COMPILER_BOILERPLATE
cannam@125 8042 _LT_LINKER_BOILERPLATE
cannam@125 8043
cannam@125 8044 # Allow CC to be a program name with arguments.
cannam@125 8045 lt_save_CC=$CC
cannam@125 8046 lt_save_CFLAGS=$CFLAGS
cannam@125 8047 lt_save_GCC=$GCC
cannam@125 8048 GCC=yes
cannam@125 8049 CC=${GOC-"gccgo"}
cannam@125 8050 CFLAGS=$GOFLAGS
cannam@125 8051 compiler=$CC
cannam@125 8052 _LT_TAGVAR(compiler, $1)=$CC
cannam@125 8053 _LT_TAGVAR(LD, $1)=$LD
cannam@125 8054 _LT_CC_BASENAME([$compiler])
cannam@125 8055
cannam@125 8056 # Go did not exist at the time GCC didn't implicitly link libc in.
cannam@125 8057 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@125 8058
cannam@125 8059 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
cannam@125 8060 _LT_TAGVAR(reload_flag, $1)=$reload_flag
cannam@125 8061 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
cannam@125 8062
cannam@125 8063 ## CAVEAT EMPTOR:
cannam@125 8064 ## There is no encapsulation within the following macros, do not change
cannam@125 8065 ## the running order or otherwise move them around unless you know exactly
cannam@125 8066 ## what you are doing...
cannam@125 8067 if test -n "$compiler"; then
cannam@125 8068 _LT_COMPILER_NO_RTTI($1)
cannam@125 8069 _LT_COMPILER_PIC($1)
cannam@125 8070 _LT_COMPILER_C_O($1)
cannam@125 8071 _LT_COMPILER_FILE_LOCKS($1)
cannam@125 8072 _LT_LINKER_SHLIBS($1)
cannam@125 8073 _LT_LINKER_HARDCODE_LIBPATH($1)
cannam@125 8074
cannam@125 8075 _LT_CONFIG($1)
cannam@125 8076 fi
cannam@125 8077
cannam@125 8078 AC_LANG_RESTORE
cannam@125 8079
cannam@125 8080 GCC=$lt_save_GCC
cannam@125 8081 CC=$lt_save_CC
cannam@125 8082 CFLAGS=$lt_save_CFLAGS
cannam@125 8083 ])# _LT_LANG_GO_CONFIG
cannam@125 8084
cannam@125 8085
cannam@125 8086 # _LT_LANG_RC_CONFIG([TAG])
cannam@125 8087 # -------------------------
cannam@125 8088 # Ensure that the configuration variables for the Windows resource compiler
cannam@125 8089 # are suitably defined. These variables are subsequently used by _LT_CONFIG
cannam@125 8090 # to write the compiler configuration to 'libtool'.
cannam@125 8091 m4_defun([_LT_LANG_RC_CONFIG],
cannam@125 8092 [AC_REQUIRE([LT_PROG_RC])dnl
cannam@125 8093 AC_LANG_SAVE
cannam@125 8094
cannam@125 8095 # Source file extension for RC test sources.
cannam@125 8096 ac_ext=rc
cannam@125 8097
cannam@125 8098 # Object file extension for compiled RC test sources.
cannam@125 8099 objext=o
cannam@125 8100 _LT_TAGVAR(objext, $1)=$objext
cannam@125 8101
cannam@125 8102 # Code to be used in simple compile tests
cannam@125 8103 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
cannam@125 8104
cannam@125 8105 # Code to be used in simple link tests
cannam@125 8106 lt_simple_link_test_code=$lt_simple_compile_test_code
cannam@125 8107
cannam@125 8108 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
cannam@125 8109 _LT_TAG_COMPILER
cannam@125 8110
cannam@125 8111 # save warnings/boilerplate of simple test code
cannam@125 8112 _LT_COMPILER_BOILERPLATE
cannam@125 8113 _LT_LINKER_BOILERPLATE
cannam@125 8114
cannam@125 8115 # Allow CC to be a program name with arguments.
cannam@125 8116 lt_save_CC=$CC
cannam@125 8117 lt_save_CFLAGS=$CFLAGS
cannam@125 8118 lt_save_GCC=$GCC
cannam@125 8119 GCC=
cannam@125 8120 CC=${RC-"windres"}
cannam@125 8121 CFLAGS=
cannam@125 8122 compiler=$CC
cannam@125 8123 _LT_TAGVAR(compiler, $1)=$CC
cannam@125 8124 _LT_CC_BASENAME([$compiler])
cannam@125 8125 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
cannam@125 8126
cannam@125 8127 if test -n "$compiler"; then
cannam@125 8128 :
cannam@125 8129 _LT_CONFIG($1)
cannam@125 8130 fi
cannam@125 8131
cannam@125 8132 GCC=$lt_save_GCC
cannam@125 8133 AC_LANG_RESTORE
cannam@125 8134 CC=$lt_save_CC
cannam@125 8135 CFLAGS=$lt_save_CFLAGS
cannam@125 8136 ])# _LT_LANG_RC_CONFIG
cannam@125 8137
cannam@125 8138
cannam@125 8139 # LT_PROG_GCJ
cannam@125 8140 # -----------
cannam@125 8141 AC_DEFUN([LT_PROG_GCJ],
cannam@125 8142 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
cannam@125 8143 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
cannam@125 8144 [AC_CHECK_TOOL(GCJ, gcj,)
cannam@125 8145 test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
cannam@125 8146 AC_SUBST(GCJFLAGS)])])[]dnl
cannam@125 8147 ])
cannam@125 8148
cannam@125 8149 # Old name:
cannam@125 8150 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
cannam@125 8151 dnl aclocal-1.4 backwards compatibility:
cannam@125 8152 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
cannam@125 8153
cannam@125 8154
cannam@125 8155 # LT_PROG_GO
cannam@125 8156 # ----------
cannam@125 8157 AC_DEFUN([LT_PROG_GO],
cannam@125 8158 [AC_CHECK_TOOL(GOC, gccgo,)
cannam@125 8159 ])
cannam@125 8160
cannam@125 8161
cannam@125 8162 # LT_PROG_RC
cannam@125 8163 # ----------
cannam@125 8164 AC_DEFUN([LT_PROG_RC],
cannam@125 8165 [AC_CHECK_TOOL(RC, windres,)
cannam@125 8166 ])
cannam@125 8167
cannam@125 8168 # Old name:
cannam@125 8169 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
cannam@125 8170 dnl aclocal-1.4 backwards compatibility:
cannam@125 8171 dnl AC_DEFUN([LT_AC_PROG_RC], [])
cannam@125 8172
cannam@125 8173
cannam@125 8174 # _LT_DECL_EGREP
cannam@125 8175 # --------------
cannam@125 8176 # If we don't have a new enough Autoconf to choose the best grep
cannam@125 8177 # available, choose the one first in the user's PATH.
cannam@125 8178 m4_defun([_LT_DECL_EGREP],
cannam@125 8179 [AC_REQUIRE([AC_PROG_EGREP])dnl
cannam@125 8180 AC_REQUIRE([AC_PROG_FGREP])dnl
cannam@125 8181 test -z "$GREP" && GREP=grep
cannam@125 8182 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
cannam@125 8183 _LT_DECL([], [EGREP], [1], [An ERE matcher])
cannam@125 8184 _LT_DECL([], [FGREP], [1], [A literal string matcher])
cannam@125 8185 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
cannam@125 8186 AC_SUBST([GREP])
cannam@125 8187 ])
cannam@125 8188
cannam@125 8189
cannam@125 8190 # _LT_DECL_OBJDUMP
cannam@125 8191 # --------------
cannam@125 8192 # If we don't have a new enough Autoconf to choose the best objdump
cannam@125 8193 # available, choose the one first in the user's PATH.
cannam@125 8194 m4_defun([_LT_DECL_OBJDUMP],
cannam@125 8195 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
cannam@125 8196 test -z "$OBJDUMP" && OBJDUMP=objdump
cannam@125 8197 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
cannam@125 8198 AC_SUBST([OBJDUMP])
cannam@125 8199 ])
cannam@125 8200
cannam@125 8201 # _LT_DECL_DLLTOOL
cannam@125 8202 # ----------------
cannam@125 8203 # Ensure DLLTOOL variable is set.
cannam@125 8204 m4_defun([_LT_DECL_DLLTOOL],
cannam@125 8205 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
cannam@125 8206 test -z "$DLLTOOL" && DLLTOOL=dlltool
cannam@125 8207 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
cannam@125 8208 AC_SUBST([DLLTOOL])
cannam@125 8209 ])
cannam@125 8210
cannam@125 8211 # _LT_DECL_SED
cannam@125 8212 # ------------
cannam@125 8213 # Check for a fully-functional sed program, that truncates
cannam@125 8214 # as few characters as possible. Prefer GNU sed if found.
cannam@125 8215 m4_defun([_LT_DECL_SED],
cannam@125 8216 [AC_PROG_SED
cannam@125 8217 test -z "$SED" && SED=sed
cannam@125 8218 Xsed="$SED -e 1s/^X//"
cannam@125 8219 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
cannam@125 8220 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
cannam@125 8221 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
cannam@125 8222 ])# _LT_DECL_SED
cannam@125 8223
cannam@125 8224 m4_ifndef([AC_PROG_SED], [
cannam@125 8225 ############################################################
cannam@125 8226 # NOTE: This macro has been submitted for inclusion into #
cannam@125 8227 # GNU Autoconf as AC_PROG_SED. When it is available in #
cannam@125 8228 # a released version of Autoconf we should remove this #
cannam@125 8229 # macro and use it instead. #
cannam@125 8230 ############################################################
cannam@125 8231
cannam@125 8232 m4_defun([AC_PROG_SED],
cannam@125 8233 [AC_MSG_CHECKING([for a sed that does not truncate output])
cannam@125 8234 AC_CACHE_VAL(lt_cv_path_SED,
cannam@125 8235 [# Loop through the user's path and test for sed and gsed.
cannam@125 8236 # Then use that list of sed's as ones to test for truncation.
cannam@125 8237 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
cannam@125 8238 for as_dir in $PATH
cannam@125 8239 do
cannam@125 8240 IFS=$as_save_IFS
cannam@125 8241 test -z "$as_dir" && as_dir=.
cannam@125 8242 for lt_ac_prog in sed gsed; do
cannam@125 8243 for ac_exec_ext in '' $ac_executable_extensions; do
cannam@125 8244 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
cannam@125 8245 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
cannam@125 8246 fi
cannam@125 8247 done
cannam@125 8248 done
cannam@125 8249 done
cannam@125 8250 IFS=$as_save_IFS
cannam@125 8251 lt_ac_max=0
cannam@125 8252 lt_ac_count=0
cannam@125 8253 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
cannam@125 8254 # along with /bin/sed that truncates output.
cannam@125 8255 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
cannam@125 8256 test ! -f "$lt_ac_sed" && continue
cannam@125 8257 cat /dev/null > conftest.in
cannam@125 8258 lt_ac_count=0
cannam@125 8259 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
cannam@125 8260 # Check for GNU sed and select it if it is found.
cannam@125 8261 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
cannam@125 8262 lt_cv_path_SED=$lt_ac_sed
cannam@125 8263 break
cannam@125 8264 fi
cannam@125 8265 while true; do
cannam@125 8266 cat conftest.in conftest.in >conftest.tmp
cannam@125 8267 mv conftest.tmp conftest.in
cannam@125 8268 cp conftest.in conftest.nl
cannam@125 8269 echo >>conftest.nl
cannam@125 8270 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
cannam@125 8271 cmp -s conftest.out conftest.nl || break
cannam@125 8272 # 10000 chars as input seems more than enough
cannam@125 8273 test 10 -lt "$lt_ac_count" && break
cannam@125 8274 lt_ac_count=`expr $lt_ac_count + 1`
cannam@125 8275 if test "$lt_ac_count" -gt "$lt_ac_max"; then
cannam@125 8276 lt_ac_max=$lt_ac_count
cannam@125 8277 lt_cv_path_SED=$lt_ac_sed
cannam@125 8278 fi
cannam@125 8279 done
cannam@125 8280 done
cannam@125 8281 ])
cannam@125 8282 SED=$lt_cv_path_SED
cannam@125 8283 AC_SUBST([SED])
cannam@125 8284 AC_MSG_RESULT([$SED])
cannam@125 8285 ])#AC_PROG_SED
cannam@125 8286 ])#m4_ifndef
cannam@125 8287
cannam@125 8288 # Old name:
cannam@125 8289 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
cannam@125 8290 dnl aclocal-1.4 backwards compatibility:
cannam@125 8291 dnl AC_DEFUN([LT_AC_PROG_SED], [])
cannam@125 8292
cannam@125 8293
cannam@125 8294 # _LT_CHECK_SHELL_FEATURES
cannam@125 8295 # ------------------------
cannam@125 8296 # Find out whether the shell is Bourne or XSI compatible,
cannam@125 8297 # or has some other useful features.
cannam@125 8298 m4_defun([_LT_CHECK_SHELL_FEATURES],
cannam@125 8299 [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
cannam@125 8300 lt_unset=unset
cannam@125 8301 else
cannam@125 8302 lt_unset=false
cannam@125 8303 fi
cannam@125 8304 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
cannam@125 8305
cannam@125 8306 # test EBCDIC or ASCII
cannam@125 8307 case `echo X|tr X '\101'` in
cannam@125 8308 A) # ASCII based system
cannam@125 8309 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
cannam@125 8310 lt_SP2NL='tr \040 \012'
cannam@125 8311 lt_NL2SP='tr \015\012 \040\040'
cannam@125 8312 ;;
cannam@125 8313 *) # EBCDIC based system
cannam@125 8314 lt_SP2NL='tr \100 \n'
cannam@125 8315 lt_NL2SP='tr \r\n \100\100'
cannam@125 8316 ;;
cannam@125 8317 esac
cannam@125 8318 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
cannam@125 8319 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
cannam@125 8320 ])# _LT_CHECK_SHELL_FEATURES
cannam@125 8321
cannam@125 8322
cannam@125 8323 # _LT_PATH_CONVERSION_FUNCTIONS
cannam@125 8324 # -----------------------------
cannam@125 8325 # Determine what file name conversion functions should be used by
cannam@125 8326 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
cannam@125 8327 # for certain cross-compile configurations and native mingw.
cannam@125 8328 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
cannam@125 8329 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
cannam@125 8330 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
cannam@125 8331 AC_MSG_CHECKING([how to convert $build file names to $host format])
cannam@125 8332 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
cannam@125 8333 [case $host in
cannam@125 8334 *-*-mingw* )
cannam@125 8335 case $build in
cannam@125 8336 *-*-mingw* ) # actually msys
cannam@125 8337 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
cannam@125 8338 ;;
cannam@125 8339 *-*-cygwin* )
cannam@125 8340 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
cannam@125 8341 ;;
cannam@125 8342 * ) # otherwise, assume *nix
cannam@125 8343 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
cannam@125 8344 ;;
cannam@125 8345 esac
cannam@125 8346 ;;
cannam@125 8347 *-*-cygwin* )
cannam@125 8348 case $build in
cannam@125 8349 *-*-mingw* ) # actually msys
cannam@125 8350 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
cannam@125 8351 ;;
cannam@125 8352 *-*-cygwin* )
cannam@125 8353 lt_cv_to_host_file_cmd=func_convert_file_noop
cannam@125 8354 ;;
cannam@125 8355 * ) # otherwise, assume *nix
cannam@125 8356 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
cannam@125 8357 ;;
cannam@125 8358 esac
cannam@125 8359 ;;
cannam@125 8360 * ) # unhandled hosts (and "normal" native builds)
cannam@125 8361 lt_cv_to_host_file_cmd=func_convert_file_noop
cannam@125 8362 ;;
cannam@125 8363 esac
cannam@125 8364 ])
cannam@125 8365 to_host_file_cmd=$lt_cv_to_host_file_cmd
cannam@125 8366 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
cannam@125 8367 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
cannam@125 8368 [0], [convert $build file names to $host format])dnl
cannam@125 8369
cannam@125 8370 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
cannam@125 8371 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
cannam@125 8372 [#assume ordinary cross tools, or native build.
cannam@125 8373 lt_cv_to_tool_file_cmd=func_convert_file_noop
cannam@125 8374 case $host in
cannam@125 8375 *-*-mingw* )
cannam@125 8376 case $build in
cannam@125 8377 *-*-mingw* ) # actually msys
cannam@125 8378 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
cannam@125 8379 ;;
cannam@125 8380 esac
cannam@125 8381 ;;
cannam@125 8382 esac
cannam@125 8383 ])
cannam@125 8384 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
cannam@125 8385 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
cannam@125 8386 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
cannam@125 8387 [0], [convert $build files to toolchain format])dnl
cannam@125 8388 ])# _LT_PATH_CONVERSION_FUNCTIONS