annotate src/libsamplerate-0.1.9/M4/libtool.m4 @ 129:90a976269628

Updated MSVC
author Chris Cannam <cannam@all-day-breakfast.com>
date Tue, 18 Oct 2016 15:58:42 +0100
parents 4a7071416412
children
rev   line source
cannam@126 1 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
cannam@126 2 #
cannam@126 3 # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
cannam@126 4 # Written by Gordon Matzigkeit, 1996
cannam@126 5 #
cannam@126 6 # This file is free software; the Free Software Foundation gives
cannam@126 7 # unlimited permission to copy and/or distribute it, with or without
cannam@126 8 # modifications, as long as this notice is preserved.
cannam@126 9
cannam@126 10 m4_define([_LT_COPYING], [dnl
cannam@126 11 # Copyright (C) 2014 Free Software Foundation, Inc.
cannam@126 12 # This is free software; see the source for copying conditions. There is NO
cannam@126 13 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
cannam@126 14
cannam@126 15 # GNU Libtool is free software; you can redistribute it and/or modify
cannam@126 16 # it under the terms of the GNU General Public License as published by
cannam@126 17 # the Free Software Foundation; either version 2 of of the License, or
cannam@126 18 # (at your option) any later version.
cannam@126 19 #
cannam@126 20 # As a special exception to the GNU General Public License, if you
cannam@126 21 # distribute this file as part of a program or library that is built
cannam@126 22 # using GNU Libtool, you may include this file under the same
cannam@126 23 # distribution terms that you use for the rest of that program.
cannam@126 24 #
cannam@126 25 # GNU Libtool is distributed in the hope that it will be useful, but
cannam@126 26 # WITHOUT ANY WARRANTY; without even the implied warranty of
cannam@126 27 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cannam@126 28 # GNU General Public License for more details.
cannam@126 29 #
cannam@126 30 # You should have received a copy of the GNU General Public License
cannam@126 31 # along with this program. If not, see <http://www.gnu.org/licenses/>.
cannam@126 32 ])
cannam@126 33
cannam@126 34 # serial 58 LT_INIT
cannam@126 35
cannam@126 36
cannam@126 37 # LT_PREREQ(VERSION)
cannam@126 38 # ------------------
cannam@126 39 # Complain and exit if this libtool version is less that VERSION.
cannam@126 40 m4_defun([LT_PREREQ],
cannam@126 41 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
cannam@126 42 [m4_default([$3],
cannam@126 43 [m4_fatal([Libtool version $1 or higher is required],
cannam@126 44 63)])],
cannam@126 45 [$2])])
cannam@126 46
cannam@126 47
cannam@126 48 # _LT_CHECK_BUILDDIR
cannam@126 49 # ------------------
cannam@126 50 # Complain if the absolute build directory name contains unusual characters
cannam@126 51 m4_defun([_LT_CHECK_BUILDDIR],
cannam@126 52 [case `pwd` in
cannam@126 53 *\ * | *\ *)
cannam@126 54 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
cannam@126 55 esac
cannam@126 56 ])
cannam@126 57
cannam@126 58
cannam@126 59 # LT_INIT([OPTIONS])
cannam@126 60 # ------------------
cannam@126 61 AC_DEFUN([LT_INIT],
cannam@126 62 [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
cannam@126 63 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
cannam@126 64 AC_BEFORE([$0], [LT_LANG])dnl
cannam@126 65 AC_BEFORE([$0], [LT_OUTPUT])dnl
cannam@126 66 AC_BEFORE([$0], [LTDL_INIT])dnl
cannam@126 67 m4_require([_LT_CHECK_BUILDDIR])dnl
cannam@126 68
cannam@126 69 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
cannam@126 70 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
cannam@126 71 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
cannam@126 72 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
cannam@126 73 dnl unless we require an AC_DEFUNed macro:
cannam@126 74 AC_REQUIRE([LTOPTIONS_VERSION])dnl
cannam@126 75 AC_REQUIRE([LTSUGAR_VERSION])dnl
cannam@126 76 AC_REQUIRE([LTVERSION_VERSION])dnl
cannam@126 77 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
cannam@126 78 m4_require([_LT_PROG_LTMAIN])dnl
cannam@126 79
cannam@126 80 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
cannam@126 81
cannam@126 82 dnl Parse OPTIONS
cannam@126 83 _LT_SET_OPTIONS([$0], [$1])
cannam@126 84
cannam@126 85 # This can be used to rebuild libtool when needed
cannam@126 86 LIBTOOL_DEPS=$ltmain
cannam@126 87
cannam@126 88 # Always use our own libtool.
cannam@126 89 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
cannam@126 90 AC_SUBST(LIBTOOL)dnl
cannam@126 91
cannam@126 92 _LT_SETUP
cannam@126 93
cannam@126 94 # Only expand once:
cannam@126 95 m4_define([LT_INIT])
cannam@126 96 ])# LT_INIT
cannam@126 97
cannam@126 98 # Old names:
cannam@126 99 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
cannam@126 100 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
cannam@126 101 dnl aclocal-1.4 backwards compatibility:
cannam@126 102 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
cannam@126 103 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
cannam@126 104
cannam@126 105
cannam@126 106 # _LT_PREPARE_CC_BASENAME
cannam@126 107 # -----------------------
cannam@126 108 m4_defun([_LT_PREPARE_CC_BASENAME], [
cannam@126 109 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
cannam@126 110 func_cc_basename ()
cannam@126 111 {
cannam@126 112 for cc_temp in @S|@*""; do
cannam@126 113 case $cc_temp in
cannam@126 114 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
cannam@126 115 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
cannam@126 116 \-*) ;;
cannam@126 117 *) break;;
cannam@126 118 esac
cannam@126 119 done
cannam@126 120 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
cannam@126 121 }
cannam@126 122 ])# _LT_PREPARE_CC_BASENAME
cannam@126 123
cannam@126 124
cannam@126 125 # _LT_CC_BASENAME(CC)
cannam@126 126 # -------------------
cannam@126 127 # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
cannam@126 128 # but that macro is also expanded into generated libtool script, which
cannam@126 129 # arranges for $SED and $ECHO to be set by different means.
cannam@126 130 m4_defun([_LT_CC_BASENAME],
cannam@126 131 [m4_require([_LT_PREPARE_CC_BASENAME])dnl
cannam@126 132 AC_REQUIRE([_LT_DECL_SED])dnl
cannam@126 133 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
cannam@126 134 func_cc_basename $1
cannam@126 135 cc_basename=$func_cc_basename_result
cannam@126 136 ])
cannam@126 137
cannam@126 138
cannam@126 139 # _LT_FILEUTILS_DEFAULTS
cannam@126 140 # ----------------------
cannam@126 141 # It is okay to use these file commands and assume they have been set
cannam@126 142 # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
cannam@126 143 m4_defun([_LT_FILEUTILS_DEFAULTS],
cannam@126 144 [: ${CP="cp -f"}
cannam@126 145 : ${MV="mv -f"}
cannam@126 146 : ${RM="rm -f"}
cannam@126 147 ])# _LT_FILEUTILS_DEFAULTS
cannam@126 148
cannam@126 149
cannam@126 150 # _LT_SETUP
cannam@126 151 # ---------
cannam@126 152 m4_defun([_LT_SETUP],
cannam@126 153 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
cannam@126 154 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
cannam@126 155 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
cannam@126 156 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
cannam@126 157
cannam@126 158 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
cannam@126 159 dnl
cannam@126 160 _LT_DECL([], [host_alias], [0], [The host system])dnl
cannam@126 161 _LT_DECL([], [host], [0])dnl
cannam@126 162 _LT_DECL([], [host_os], [0])dnl
cannam@126 163 dnl
cannam@126 164 _LT_DECL([], [build_alias], [0], [The build system])dnl
cannam@126 165 _LT_DECL([], [build], [0])dnl
cannam@126 166 _LT_DECL([], [build_os], [0])dnl
cannam@126 167 dnl
cannam@126 168 AC_REQUIRE([AC_PROG_CC])dnl
cannam@126 169 AC_REQUIRE([LT_PATH_LD])dnl
cannam@126 170 AC_REQUIRE([LT_PATH_NM])dnl
cannam@126 171 dnl
cannam@126 172 AC_REQUIRE([AC_PROG_LN_S])dnl
cannam@126 173 test -z "$LN_S" && LN_S="ln -s"
cannam@126 174 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
cannam@126 175 dnl
cannam@126 176 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
cannam@126 177 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
cannam@126 178 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
cannam@126 179 dnl
cannam@126 180 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@126 181 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
cannam@126 182 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
cannam@126 183 m4_require([_LT_CMD_RELOAD])dnl
cannam@126 184 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
cannam@126 185 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
cannam@126 186 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
cannam@126 187 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
cannam@126 188 m4_require([_LT_WITH_SYSROOT])dnl
cannam@126 189 m4_require([_LT_CMD_TRUNCATE])dnl
cannam@126 190
cannam@126 191 _LT_CONFIG_LIBTOOL_INIT([
cannam@126 192 # See if we are running on zsh, and set the options that allow our
cannam@126 193 # commands through without removal of \ escapes INIT.
cannam@126 194 if test -n "\${ZSH_VERSION+set}"; then
cannam@126 195 setopt NO_GLOB_SUBST
cannam@126 196 fi
cannam@126 197 ])
cannam@126 198 if test -n "${ZSH_VERSION+set}"; then
cannam@126 199 setopt NO_GLOB_SUBST
cannam@126 200 fi
cannam@126 201
cannam@126 202 _LT_CHECK_OBJDIR
cannam@126 203
cannam@126 204 m4_require([_LT_TAG_COMPILER])dnl
cannam@126 205
cannam@126 206 case $host_os in
cannam@126 207 aix3*)
cannam@126 208 # AIX sometimes has problems with the GCC collect2 program. For some
cannam@126 209 # reason, if we set the COLLECT_NAMES environment variable, the problems
cannam@126 210 # vanish in a puff of smoke.
cannam@126 211 if test set != "${COLLECT_NAMES+set}"; then
cannam@126 212 COLLECT_NAMES=
cannam@126 213 export COLLECT_NAMES
cannam@126 214 fi
cannam@126 215 ;;
cannam@126 216 esac
cannam@126 217
cannam@126 218 # Global variables:
cannam@126 219 ofile=libtool
cannam@126 220 can_build_shared=yes
cannam@126 221
cannam@126 222 # All known linkers require a '.a' archive for static linking (except MSVC,
cannam@126 223 # which needs '.lib').
cannam@126 224 libext=a
cannam@126 225
cannam@126 226 with_gnu_ld=$lt_cv_prog_gnu_ld
cannam@126 227
cannam@126 228 old_CC=$CC
cannam@126 229 old_CFLAGS=$CFLAGS
cannam@126 230
cannam@126 231 # Set sane defaults for various variables
cannam@126 232 test -z "$CC" && CC=cc
cannam@126 233 test -z "$LTCC" && LTCC=$CC
cannam@126 234 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
cannam@126 235 test -z "$LD" && LD=ld
cannam@126 236 test -z "$ac_objext" && ac_objext=o
cannam@126 237
cannam@126 238 _LT_CC_BASENAME([$compiler])
cannam@126 239
cannam@126 240 # Only perform the check for file, if the check method requires it
cannam@126 241 test -z "$MAGIC_CMD" && MAGIC_CMD=file
cannam@126 242 case $deplibs_check_method in
cannam@126 243 file_magic*)
cannam@126 244 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
cannam@126 245 _LT_PATH_MAGIC
cannam@126 246 fi
cannam@126 247 ;;
cannam@126 248 esac
cannam@126 249
cannam@126 250 # Use C for the default configuration in the libtool script
cannam@126 251 LT_SUPPORTED_TAG([CC])
cannam@126 252 _LT_LANG_C_CONFIG
cannam@126 253 _LT_LANG_DEFAULT_CONFIG
cannam@126 254 _LT_CONFIG_COMMANDS
cannam@126 255 ])# _LT_SETUP
cannam@126 256
cannam@126 257
cannam@126 258 # _LT_PREPARE_SED_QUOTE_VARS
cannam@126 259 # --------------------------
cannam@126 260 # Define a few sed substitution that help us do robust quoting.
cannam@126 261 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
cannam@126 262 [# Backslashify metacharacters that are still active within
cannam@126 263 # double-quoted strings.
cannam@126 264 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
cannam@126 265
cannam@126 266 # Same as above, but do not quote variable references.
cannam@126 267 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
cannam@126 268
cannam@126 269 # Sed substitution to delay expansion of an escaped shell variable in a
cannam@126 270 # double_quote_subst'ed string.
cannam@126 271 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
cannam@126 272
cannam@126 273 # Sed substitution to delay expansion of an escaped single quote.
cannam@126 274 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
cannam@126 275
cannam@126 276 # Sed substitution to avoid accidental globbing in evaled expressions
cannam@126 277 no_glob_subst='s/\*/\\\*/g'
cannam@126 278 ])
cannam@126 279
cannam@126 280 # _LT_PROG_LTMAIN
cannam@126 281 # ---------------
cannam@126 282 # Note that this code is called both from 'configure', and 'config.status'
cannam@126 283 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
cannam@126 284 # 'config.status' has no value for ac_aux_dir unless we are using Automake,
cannam@126 285 # so we pass a copy along to make sure it has a sensible value anyway.
cannam@126 286 m4_defun([_LT_PROG_LTMAIN],
cannam@126 287 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
cannam@126 288 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
cannam@126 289 ltmain=$ac_aux_dir/ltmain.sh
cannam@126 290 ])# _LT_PROG_LTMAIN
cannam@126 291
cannam@126 292
cannam@126 293 ## ------------------------------------- ##
cannam@126 294 ## Accumulate code for creating libtool. ##
cannam@126 295 ## ------------------------------------- ##
cannam@126 296
cannam@126 297 # So that we can recreate a full libtool script including additional
cannam@126 298 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
cannam@126 299 # in macros and then make a single call at the end using the 'libtool'
cannam@126 300 # label.
cannam@126 301
cannam@126 302
cannam@126 303 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
cannam@126 304 # ----------------------------------------
cannam@126 305 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
cannam@126 306 m4_define([_LT_CONFIG_LIBTOOL_INIT],
cannam@126 307 [m4_ifval([$1],
cannam@126 308 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
cannam@126 309 [$1
cannam@126 310 ])])])
cannam@126 311
cannam@126 312 # Initialize.
cannam@126 313 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
cannam@126 314
cannam@126 315
cannam@126 316 # _LT_CONFIG_LIBTOOL([COMMANDS])
cannam@126 317 # ------------------------------
cannam@126 318 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
cannam@126 319 m4_define([_LT_CONFIG_LIBTOOL],
cannam@126 320 [m4_ifval([$1],
cannam@126 321 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
cannam@126 322 [$1
cannam@126 323 ])])])
cannam@126 324
cannam@126 325 # Initialize.
cannam@126 326 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
cannam@126 327
cannam@126 328
cannam@126 329 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
cannam@126 330 # -----------------------------------------------------
cannam@126 331 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
cannam@126 332 [_LT_CONFIG_LIBTOOL([$1])
cannam@126 333 _LT_CONFIG_LIBTOOL_INIT([$2])
cannam@126 334 ])
cannam@126 335
cannam@126 336
cannam@126 337 # _LT_FORMAT_COMMENT([COMMENT])
cannam@126 338 # -----------------------------
cannam@126 339 # Add leading comment marks to the start of each line, and a trailing
cannam@126 340 # full-stop to the whole comment if one is not present already.
cannam@126 341 m4_define([_LT_FORMAT_COMMENT],
cannam@126 342 [m4_ifval([$1], [
cannam@126 343 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
cannam@126 344 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
cannam@126 345 )])
cannam@126 346
cannam@126 347
cannam@126 348
cannam@126 349 ## ------------------------ ##
cannam@126 350 ## FIXME: Eliminate VARNAME ##
cannam@126 351 ## ------------------------ ##
cannam@126 352
cannam@126 353
cannam@126 354 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
cannam@126 355 # -------------------------------------------------------------------
cannam@126 356 # CONFIGNAME is the name given to the value in the libtool script.
cannam@126 357 # VARNAME is the (base) name used in the configure script.
cannam@126 358 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
cannam@126 359 # VARNAME. Any other value will be used directly.
cannam@126 360 m4_define([_LT_DECL],
cannam@126 361 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
cannam@126 362 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
cannam@126 363 [m4_ifval([$1], [$1], [$2])])
cannam@126 364 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
cannam@126 365 m4_ifval([$4],
cannam@126 366 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
cannam@126 367 lt_dict_add_subkey([lt_decl_dict], [$2],
cannam@126 368 [tagged?], [m4_ifval([$5], [yes], [no])])])
cannam@126 369 ])
cannam@126 370
cannam@126 371
cannam@126 372 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
cannam@126 373 # --------------------------------------------------------
cannam@126 374 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
cannam@126 375
cannam@126 376
cannam@126 377 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
cannam@126 378 # ------------------------------------------------
cannam@126 379 m4_define([lt_decl_tag_varnames],
cannam@126 380 [_lt_decl_filter([tagged?], [yes], $@)])
cannam@126 381
cannam@126 382
cannam@126 383 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
cannam@126 384 # ---------------------------------------------------------
cannam@126 385 m4_define([_lt_decl_filter],
cannam@126 386 [m4_case([$#],
cannam@126 387 [0], [m4_fatal([$0: too few arguments: $#])],
cannam@126 388 [1], [m4_fatal([$0: too few arguments: $#: $1])],
cannam@126 389 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
cannam@126 390 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
cannam@126 391 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
cannam@126 392 ])
cannam@126 393
cannam@126 394
cannam@126 395 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
cannam@126 396 # --------------------------------------------------
cannam@126 397 m4_define([lt_decl_quote_varnames],
cannam@126 398 [_lt_decl_filter([value], [1], $@)])
cannam@126 399
cannam@126 400
cannam@126 401 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
cannam@126 402 # ---------------------------------------------------
cannam@126 403 m4_define([lt_decl_dquote_varnames],
cannam@126 404 [_lt_decl_filter([value], [2], $@)])
cannam@126 405
cannam@126 406
cannam@126 407 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
cannam@126 408 # ---------------------------------------------------
cannam@126 409 m4_define([lt_decl_varnames_tagged],
cannam@126 410 [m4_assert([$# <= 2])dnl
cannam@126 411 _$0(m4_quote(m4_default([$1], [[, ]])),
cannam@126 412 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
cannam@126 413 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
cannam@126 414 m4_define([_lt_decl_varnames_tagged],
cannam@126 415 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
cannam@126 416
cannam@126 417
cannam@126 418 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
cannam@126 419 # ------------------------------------------------
cannam@126 420 m4_define([lt_decl_all_varnames],
cannam@126 421 [_$0(m4_quote(m4_default([$1], [[, ]])),
cannam@126 422 m4_if([$2], [],
cannam@126 423 m4_quote(lt_decl_varnames),
cannam@126 424 m4_quote(m4_shift($@))))[]dnl
cannam@126 425 ])
cannam@126 426 m4_define([_lt_decl_all_varnames],
cannam@126 427 [lt_join($@, lt_decl_varnames_tagged([$1],
cannam@126 428 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
cannam@126 429 ])
cannam@126 430
cannam@126 431
cannam@126 432 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
cannam@126 433 # ------------------------------------
cannam@126 434 # Quote a variable value, and forward it to 'config.status' so that its
cannam@126 435 # declaration there will have the same value as in 'configure'. VARNAME
cannam@126 436 # must have a single quote delimited value for this to work.
cannam@126 437 m4_define([_LT_CONFIG_STATUS_DECLARE],
cannam@126 438 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
cannam@126 439
cannam@126 440
cannam@126 441 # _LT_CONFIG_STATUS_DECLARATIONS
cannam@126 442 # ------------------------------
cannam@126 443 # We delimit libtool config variables with single quotes, so when
cannam@126 444 # we write them to config.status, we have to be sure to quote all
cannam@126 445 # embedded single quotes properly. In configure, this macro expands
cannam@126 446 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
cannam@126 447 #
cannam@126 448 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
cannam@126 449 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
cannam@126 450 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
cannam@126 451 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
cannam@126 452
cannam@126 453
cannam@126 454 # _LT_LIBTOOL_TAGS
cannam@126 455 # ----------------
cannam@126 456 # Output comment and list of tags supported by the script
cannam@126 457 m4_defun([_LT_LIBTOOL_TAGS],
cannam@126 458 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
cannam@126 459 available_tags='_LT_TAGS'dnl
cannam@126 460 ])
cannam@126 461
cannam@126 462
cannam@126 463 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
cannam@126 464 # -----------------------------------
cannam@126 465 # Extract the dictionary values for VARNAME (optionally with TAG) and
cannam@126 466 # expand to a commented shell variable setting:
cannam@126 467 #
cannam@126 468 # # Some comment about what VAR is for.
cannam@126 469 # visible_name=$lt_internal_name
cannam@126 470 m4_define([_LT_LIBTOOL_DECLARE],
cannam@126 471 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
cannam@126 472 [description])))[]dnl
cannam@126 473 m4_pushdef([_libtool_name],
cannam@126 474 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
cannam@126 475 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
cannam@126 476 [0], [_libtool_name=[$]$1],
cannam@126 477 [1], [_libtool_name=$lt_[]$1],
cannam@126 478 [2], [_libtool_name=$lt_[]$1],
cannam@126 479 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
cannam@126 480 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
cannam@126 481 ])
cannam@126 482
cannam@126 483
cannam@126 484 # _LT_LIBTOOL_CONFIG_VARS
cannam@126 485 # -----------------------
cannam@126 486 # Produce commented declarations of non-tagged libtool config variables
cannam@126 487 # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
cannam@126 488 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
cannam@126 489 # section) are produced by _LT_LIBTOOL_TAG_VARS.
cannam@126 490 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
cannam@126 491 [m4_foreach([_lt_var],
cannam@126 492 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
cannam@126 493 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
cannam@126 494
cannam@126 495
cannam@126 496 # _LT_LIBTOOL_TAG_VARS(TAG)
cannam@126 497 # -------------------------
cannam@126 498 m4_define([_LT_LIBTOOL_TAG_VARS],
cannam@126 499 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
cannam@126 500 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
cannam@126 501
cannam@126 502
cannam@126 503 # _LT_TAGVAR(VARNAME, [TAGNAME])
cannam@126 504 # ------------------------------
cannam@126 505 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
cannam@126 506
cannam@126 507
cannam@126 508 # _LT_CONFIG_COMMANDS
cannam@126 509 # -------------------
cannam@126 510 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
cannam@126 511 # variables for single and double quote escaping we saved from calls
cannam@126 512 # to _LT_DECL, we can put quote escaped variables declarations
cannam@126 513 # into 'config.status', and then the shell code to quote escape them in
cannam@126 514 # for loops in 'config.status'. Finally, any additional code accumulated
cannam@126 515 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
cannam@126 516 m4_defun([_LT_CONFIG_COMMANDS],
cannam@126 517 [AC_PROVIDE_IFELSE([LT_OUTPUT],
cannam@126 518 dnl If the libtool generation code has been placed in $CONFIG_LT,
cannam@126 519 dnl instead of duplicating it all over again into config.status,
cannam@126 520 dnl then we will have config.status run $CONFIG_LT later, so it
cannam@126 521 dnl needs to know what name is stored there:
cannam@126 522 [AC_CONFIG_COMMANDS([libtool],
cannam@126 523 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
cannam@126 524 dnl If the libtool generation code is destined for config.status,
cannam@126 525 dnl expand the accumulated commands and init code now:
cannam@126 526 [AC_CONFIG_COMMANDS([libtool],
cannam@126 527 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
cannam@126 528 ])#_LT_CONFIG_COMMANDS
cannam@126 529
cannam@126 530
cannam@126 531 # Initialize.
cannam@126 532 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
cannam@126 533 [
cannam@126 534
cannam@126 535 # The HP-UX ksh and POSIX shell print the target directory to stdout
cannam@126 536 # if CDPATH is set.
cannam@126 537 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
cannam@126 538
cannam@126 539 sed_quote_subst='$sed_quote_subst'
cannam@126 540 double_quote_subst='$double_quote_subst'
cannam@126 541 delay_variable_subst='$delay_variable_subst'
cannam@126 542 _LT_CONFIG_STATUS_DECLARATIONS
cannam@126 543 LTCC='$LTCC'
cannam@126 544 LTCFLAGS='$LTCFLAGS'
cannam@126 545 compiler='$compiler_DEFAULT'
cannam@126 546
cannam@126 547 # A function that is used when there is no print builtin or printf.
cannam@126 548 func_fallback_echo ()
cannam@126 549 {
cannam@126 550 eval 'cat <<_LTECHO_EOF
cannam@126 551 \$[]1
cannam@126 552 _LTECHO_EOF'
cannam@126 553 }
cannam@126 554
cannam@126 555 # Quote evaled strings.
cannam@126 556 for var in lt_decl_all_varnames([[ \
cannam@126 557 ]], lt_decl_quote_varnames); do
cannam@126 558 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
cannam@126 559 *[[\\\\\\\`\\"\\\$]]*)
cannam@126 560 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
cannam@126 561 ;;
cannam@126 562 *)
cannam@126 563 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
cannam@126 564 ;;
cannam@126 565 esac
cannam@126 566 done
cannam@126 567
cannam@126 568 # Double-quote double-evaled strings.
cannam@126 569 for var in lt_decl_all_varnames([[ \
cannam@126 570 ]], lt_decl_dquote_varnames); do
cannam@126 571 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
cannam@126 572 *[[\\\\\\\`\\"\\\$]]*)
cannam@126 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@126 574 ;;
cannam@126 575 *)
cannam@126 576 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
cannam@126 577 ;;
cannam@126 578 esac
cannam@126 579 done
cannam@126 580
cannam@126 581 _LT_OUTPUT_LIBTOOL_INIT
cannam@126 582 ])
cannam@126 583
cannam@126 584 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
cannam@126 585 # ------------------------------------
cannam@126 586 # Generate a child script FILE with all initialization necessary to
cannam@126 587 # reuse the environment learned by the parent script, and make the
cannam@126 588 # file executable. If COMMENT is supplied, it is inserted after the
cannam@126 589 # '#!' sequence but before initialization text begins. After this
cannam@126 590 # macro, additional text can be appended to FILE to form the body of
cannam@126 591 # the child script. The macro ends with non-zero status if the
cannam@126 592 # file could not be fully written (such as if the disk is full).
cannam@126 593 m4_ifdef([AS_INIT_GENERATED],
cannam@126 594 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
cannam@126 595 [m4_defun([_LT_GENERATED_FILE_INIT],
cannam@126 596 [m4_require([AS_PREPARE])]dnl
cannam@126 597 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
cannam@126 598 [lt_write_fail=0
cannam@126 599 cat >$1 <<_ASEOF || lt_write_fail=1
cannam@126 600 #! $SHELL
cannam@126 601 # Generated by $as_me.
cannam@126 602 $2
cannam@126 603 SHELL=\${CONFIG_SHELL-$SHELL}
cannam@126 604 export SHELL
cannam@126 605 _ASEOF
cannam@126 606 cat >>$1 <<\_ASEOF || lt_write_fail=1
cannam@126 607 AS_SHELL_SANITIZE
cannam@126 608 _AS_PREPARE
cannam@126 609 exec AS_MESSAGE_FD>&1
cannam@126 610 _ASEOF
cannam@126 611 test 0 = "$lt_write_fail" && chmod +x $1[]dnl
cannam@126 612 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
cannam@126 613
cannam@126 614 # LT_OUTPUT
cannam@126 615 # ---------
cannam@126 616 # This macro allows early generation of the libtool script (before
cannam@126 617 # AC_OUTPUT is called), incase it is used in configure for compilation
cannam@126 618 # tests.
cannam@126 619 AC_DEFUN([LT_OUTPUT],
cannam@126 620 [: ${CONFIG_LT=./config.lt}
cannam@126 621 AC_MSG_NOTICE([creating $CONFIG_LT])
cannam@126 622 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
cannam@126 623 [# Run this file to recreate a libtool stub with the current configuration.])
cannam@126 624
cannam@126 625 cat >>"$CONFIG_LT" <<\_LTEOF
cannam@126 626 lt_cl_silent=false
cannam@126 627 exec AS_MESSAGE_LOG_FD>>config.log
cannam@126 628 {
cannam@126 629 echo
cannam@126 630 AS_BOX([Running $as_me.])
cannam@126 631 } >&AS_MESSAGE_LOG_FD
cannam@126 632
cannam@126 633 lt_cl_help="\
cannam@126 634 '$as_me' creates a local libtool stub from the current configuration,
cannam@126 635 for use in further configure time tests before the real libtool is
cannam@126 636 generated.
cannam@126 637
cannam@126 638 Usage: $[0] [[OPTIONS]]
cannam@126 639
cannam@126 640 -h, --help print this help, then exit
cannam@126 641 -V, --version print version number, then exit
cannam@126 642 -q, --quiet do not print progress messages
cannam@126 643 -d, --debug don't remove temporary files
cannam@126 644
cannam@126 645 Report bugs to <bug-libtool@gnu.org>."
cannam@126 646
cannam@126 647 lt_cl_version="\
cannam@126 648 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
cannam@126 649 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
cannam@126 650 configured by $[0], generated by m4_PACKAGE_STRING.
cannam@126 651
cannam@126 652 Copyright (C) 2011 Free Software Foundation, Inc.
cannam@126 653 This config.lt script is free software; the Free Software Foundation
cannam@126 654 gives unlimited permision to copy, distribute and modify it."
cannam@126 655
cannam@126 656 while test 0 != $[#]
cannam@126 657 do
cannam@126 658 case $[1] in
cannam@126 659 --version | --v* | -V )
cannam@126 660 echo "$lt_cl_version"; exit 0 ;;
cannam@126 661 --help | --h* | -h )
cannam@126 662 echo "$lt_cl_help"; exit 0 ;;
cannam@126 663 --debug | --d* | -d )
cannam@126 664 debug=: ;;
cannam@126 665 --quiet | --q* | --silent | --s* | -q )
cannam@126 666 lt_cl_silent=: ;;
cannam@126 667
cannam@126 668 -*) AC_MSG_ERROR([unrecognized option: $[1]
cannam@126 669 Try '$[0] --help' for more information.]) ;;
cannam@126 670
cannam@126 671 *) AC_MSG_ERROR([unrecognized argument: $[1]
cannam@126 672 Try '$[0] --help' for more information.]) ;;
cannam@126 673 esac
cannam@126 674 shift
cannam@126 675 done
cannam@126 676
cannam@126 677 if $lt_cl_silent; then
cannam@126 678 exec AS_MESSAGE_FD>/dev/null
cannam@126 679 fi
cannam@126 680 _LTEOF
cannam@126 681
cannam@126 682 cat >>"$CONFIG_LT" <<_LTEOF
cannam@126 683 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
cannam@126 684 _LTEOF
cannam@126 685
cannam@126 686 cat >>"$CONFIG_LT" <<\_LTEOF
cannam@126 687 AC_MSG_NOTICE([creating $ofile])
cannam@126 688 _LT_OUTPUT_LIBTOOL_COMMANDS
cannam@126 689 AS_EXIT(0)
cannam@126 690 _LTEOF
cannam@126 691 chmod +x "$CONFIG_LT"
cannam@126 692
cannam@126 693 # configure is writing to config.log, but config.lt does its own redirection,
cannam@126 694 # appending to config.log, which fails on DOS, as config.log is still kept
cannam@126 695 # open by configure. Here we exec the FD to /dev/null, effectively closing
cannam@126 696 # config.log, so it can be properly (re)opened and appended to by config.lt.
cannam@126 697 lt_cl_success=:
cannam@126 698 test yes = "$silent" &&
cannam@126 699 lt_config_lt_args="$lt_config_lt_args --quiet"
cannam@126 700 exec AS_MESSAGE_LOG_FD>/dev/null
cannam@126 701 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
cannam@126 702 exec AS_MESSAGE_LOG_FD>>config.log
cannam@126 703 $lt_cl_success || AS_EXIT(1)
cannam@126 704 ])# LT_OUTPUT
cannam@126 705
cannam@126 706
cannam@126 707 # _LT_CONFIG(TAG)
cannam@126 708 # ---------------
cannam@126 709 # If TAG is the built-in tag, create an initial libtool script with a
cannam@126 710 # default configuration from the untagged config vars. Otherwise add code
cannam@126 711 # to config.status for appending the configuration named by TAG from the
cannam@126 712 # matching tagged config vars.
cannam@126 713 m4_defun([_LT_CONFIG],
cannam@126 714 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@126 715 _LT_CONFIG_SAVE_COMMANDS([
cannam@126 716 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
cannam@126 717 m4_if(_LT_TAG, [C], [
cannam@126 718 # See if we are running on zsh, and set the options that allow our
cannam@126 719 # commands through without removal of \ escapes.
cannam@126 720 if test -n "${ZSH_VERSION+set}"; then
cannam@126 721 setopt NO_GLOB_SUBST
cannam@126 722 fi
cannam@126 723
cannam@126 724 cfgfile=${ofile}T
cannam@126 725 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
cannam@126 726 $RM "$cfgfile"
cannam@126 727
cannam@126 728 cat <<_LT_EOF >> "$cfgfile"
cannam@126 729 #! $SHELL
cannam@126 730 # Generated automatically by $as_me ($PACKAGE) $VERSION
cannam@126 731 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
cannam@126 732
cannam@126 733 # Provide generalized library-building support services.
cannam@126 734 # Written by Gordon Matzigkeit, 1996
cannam@126 735
cannam@126 736 _LT_COPYING
cannam@126 737 _LT_LIBTOOL_TAGS
cannam@126 738
cannam@126 739 # Configured defaults for sys_lib_dlsearch_path munging.
cannam@126 740 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
cannam@126 741
cannam@126 742 # ### BEGIN LIBTOOL CONFIG
cannam@126 743 _LT_LIBTOOL_CONFIG_VARS
cannam@126 744 _LT_LIBTOOL_TAG_VARS
cannam@126 745 # ### END LIBTOOL CONFIG
cannam@126 746
cannam@126 747 _LT_EOF
cannam@126 748
cannam@126 749 cat <<'_LT_EOF' >> "$cfgfile"
cannam@126 750
cannam@126 751 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
cannam@126 752
cannam@126 753 _LT_PREPARE_MUNGE_PATH_LIST
cannam@126 754 _LT_PREPARE_CC_BASENAME
cannam@126 755
cannam@126 756 # ### END FUNCTIONS SHARED WITH CONFIGURE
cannam@126 757
cannam@126 758 _LT_EOF
cannam@126 759
cannam@126 760 case $host_os in
cannam@126 761 aix3*)
cannam@126 762 cat <<\_LT_EOF >> "$cfgfile"
cannam@126 763 # AIX sometimes has problems with the GCC collect2 program. For some
cannam@126 764 # reason, if we set the COLLECT_NAMES environment variable, the problems
cannam@126 765 # vanish in a puff of smoke.
cannam@126 766 if test set != "${COLLECT_NAMES+set}"; then
cannam@126 767 COLLECT_NAMES=
cannam@126 768 export COLLECT_NAMES
cannam@126 769 fi
cannam@126 770 _LT_EOF
cannam@126 771 ;;
cannam@126 772 esac
cannam@126 773
cannam@126 774 _LT_PROG_LTMAIN
cannam@126 775
cannam@126 776 # We use sed instead of cat because bash on DJGPP gets confused if
cannam@126 777 # if finds mixed CR/LF and LF-only lines. Since sed operates in
cannam@126 778 # text mode, it properly converts lines to CR/LF. This bash problem
cannam@126 779 # is reportedly fixed, but why not run on old versions too?
cannam@126 780 sed '$q' "$ltmain" >> "$cfgfile" \
cannam@126 781 || (rm -f "$cfgfile"; exit 1)
cannam@126 782
cannam@126 783 mv -f "$cfgfile" "$ofile" ||
cannam@126 784 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
cannam@126 785 chmod +x "$ofile"
cannam@126 786 ],
cannam@126 787 [cat <<_LT_EOF >> "$ofile"
cannam@126 788
cannam@126 789 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
cannam@126 790 dnl in a comment (ie after a #).
cannam@126 791 # ### BEGIN LIBTOOL TAG CONFIG: $1
cannam@126 792 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
cannam@126 793 # ### END LIBTOOL TAG CONFIG: $1
cannam@126 794 _LT_EOF
cannam@126 795 ])dnl /m4_if
cannam@126 796 ],
cannam@126 797 [m4_if([$1], [], [
cannam@126 798 PACKAGE='$PACKAGE'
cannam@126 799 VERSION='$VERSION'
cannam@126 800 RM='$RM'
cannam@126 801 ofile='$ofile'], [])
cannam@126 802 ])dnl /_LT_CONFIG_SAVE_COMMANDS
cannam@126 803 ])# _LT_CONFIG
cannam@126 804
cannam@126 805
cannam@126 806 # LT_SUPPORTED_TAG(TAG)
cannam@126 807 # ---------------------
cannam@126 808 # Trace this macro to discover what tags are supported by the libtool
cannam@126 809 # --tag option, using:
cannam@126 810 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
cannam@126 811 AC_DEFUN([LT_SUPPORTED_TAG], [])
cannam@126 812
cannam@126 813
cannam@126 814 # C support is built-in for now
cannam@126 815 m4_define([_LT_LANG_C_enabled], [])
cannam@126 816 m4_define([_LT_TAGS], [])
cannam@126 817
cannam@126 818
cannam@126 819 # LT_LANG(LANG)
cannam@126 820 # -------------
cannam@126 821 # Enable libtool support for the given language if not already enabled.
cannam@126 822 AC_DEFUN([LT_LANG],
cannam@126 823 [AC_BEFORE([$0], [LT_OUTPUT])dnl
cannam@126 824 m4_case([$1],
cannam@126 825 [C], [_LT_LANG(C)],
cannam@126 826 [C++], [_LT_LANG(CXX)],
cannam@126 827 [Go], [_LT_LANG(GO)],
cannam@126 828 [Java], [_LT_LANG(GCJ)],
cannam@126 829 [Fortran 77], [_LT_LANG(F77)],
cannam@126 830 [Fortran], [_LT_LANG(FC)],
cannam@126 831 [Windows Resource], [_LT_LANG(RC)],
cannam@126 832 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
cannam@126 833 [_LT_LANG($1)],
cannam@126 834 [m4_fatal([$0: unsupported language: "$1"])])])dnl
cannam@126 835 ])# LT_LANG
cannam@126 836
cannam@126 837
cannam@126 838 # _LT_LANG(LANGNAME)
cannam@126 839 # ------------------
cannam@126 840 m4_defun([_LT_LANG],
cannam@126 841 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
cannam@126 842 [LT_SUPPORTED_TAG([$1])dnl
cannam@126 843 m4_append([_LT_TAGS], [$1 ])dnl
cannam@126 844 m4_define([_LT_LANG_]$1[_enabled], [])dnl
cannam@126 845 _LT_LANG_$1_CONFIG($1)])dnl
cannam@126 846 ])# _LT_LANG
cannam@126 847
cannam@126 848
cannam@126 849 m4_ifndef([AC_PROG_GO], [
cannam@126 850 ############################################################
cannam@126 851 # NOTE: This macro has been submitted for inclusion into #
cannam@126 852 # GNU Autoconf as AC_PROG_GO. When it is available in #
cannam@126 853 # a released version of Autoconf we should remove this #
cannam@126 854 # macro and use it instead. #
cannam@126 855 ############################################################
cannam@126 856 m4_defun([AC_PROG_GO],
cannam@126 857 [AC_LANG_PUSH(Go)dnl
cannam@126 858 AC_ARG_VAR([GOC], [Go compiler command])dnl
cannam@126 859 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
cannam@126 860 _AC_ARG_VAR_LDFLAGS()dnl
cannam@126 861 AC_CHECK_TOOL(GOC, gccgo)
cannam@126 862 if test -z "$GOC"; then
cannam@126 863 if test -n "$ac_tool_prefix"; then
cannam@126 864 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
cannam@126 865 fi
cannam@126 866 fi
cannam@126 867 if test -z "$GOC"; then
cannam@126 868 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
cannam@126 869 fi
cannam@126 870 ])#m4_defun
cannam@126 871 ])#m4_ifndef
cannam@126 872
cannam@126 873
cannam@126 874 # _LT_LANG_DEFAULT_CONFIG
cannam@126 875 # -----------------------
cannam@126 876 m4_defun([_LT_LANG_DEFAULT_CONFIG],
cannam@126 877 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
cannam@126 878 [LT_LANG(CXX)],
cannam@126 879 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
cannam@126 880
cannam@126 881 AC_PROVIDE_IFELSE([AC_PROG_F77],
cannam@126 882 [LT_LANG(F77)],
cannam@126 883 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
cannam@126 884
cannam@126 885 AC_PROVIDE_IFELSE([AC_PROG_FC],
cannam@126 886 [LT_LANG(FC)],
cannam@126 887 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
cannam@126 888
cannam@126 889 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
cannam@126 890 dnl pulling things in needlessly.
cannam@126 891 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
cannam@126 892 [LT_LANG(GCJ)],
cannam@126 893 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
cannam@126 894 [LT_LANG(GCJ)],
cannam@126 895 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
cannam@126 896 [LT_LANG(GCJ)],
cannam@126 897 [m4_ifdef([AC_PROG_GCJ],
cannam@126 898 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
cannam@126 899 m4_ifdef([A][M_PROG_GCJ],
cannam@126 900 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
cannam@126 901 m4_ifdef([LT_PROG_GCJ],
cannam@126 902 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
cannam@126 903
cannam@126 904 AC_PROVIDE_IFELSE([AC_PROG_GO],
cannam@126 905 [LT_LANG(GO)],
cannam@126 906 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
cannam@126 907
cannam@126 908 AC_PROVIDE_IFELSE([LT_PROG_RC],
cannam@126 909 [LT_LANG(RC)],
cannam@126 910 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
cannam@126 911 ])# _LT_LANG_DEFAULT_CONFIG
cannam@126 912
cannam@126 913 # Obsolete macros:
cannam@126 914 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
cannam@126 915 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
cannam@126 916 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
cannam@126 917 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
cannam@126 918 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
cannam@126 919 dnl aclocal-1.4 backwards compatibility:
cannam@126 920 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
cannam@126 921 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
cannam@126 922 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
cannam@126 923 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
cannam@126 924 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
cannam@126 925
cannam@126 926
cannam@126 927 # _LT_TAG_COMPILER
cannam@126 928 # ----------------
cannam@126 929 m4_defun([_LT_TAG_COMPILER],
cannam@126 930 [AC_REQUIRE([AC_PROG_CC])dnl
cannam@126 931
cannam@126 932 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
cannam@126 933 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
cannam@126 934 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
cannam@126 935 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
cannam@126 936
cannam@126 937 # If no C compiler was specified, use CC.
cannam@126 938 LTCC=${LTCC-"$CC"}
cannam@126 939
cannam@126 940 # If no C compiler flags were specified, use CFLAGS.
cannam@126 941 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
cannam@126 942
cannam@126 943 # Allow CC to be a program name with arguments.
cannam@126 944 compiler=$CC
cannam@126 945 ])# _LT_TAG_COMPILER
cannam@126 946
cannam@126 947
cannam@126 948 # _LT_COMPILER_BOILERPLATE
cannam@126 949 # ------------------------
cannam@126 950 # Check for compiler boilerplate output or warnings with
cannam@126 951 # the simple compiler test code.
cannam@126 952 m4_defun([_LT_COMPILER_BOILERPLATE],
cannam@126 953 [m4_require([_LT_DECL_SED])dnl
cannam@126 954 ac_outfile=conftest.$ac_objext
cannam@126 955 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
cannam@126 956 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
cannam@126 957 _lt_compiler_boilerplate=`cat conftest.err`
cannam@126 958 $RM conftest*
cannam@126 959 ])# _LT_COMPILER_BOILERPLATE
cannam@126 960
cannam@126 961
cannam@126 962 # _LT_LINKER_BOILERPLATE
cannam@126 963 # ----------------------
cannam@126 964 # Check for linker boilerplate output or warnings with
cannam@126 965 # the simple link test code.
cannam@126 966 m4_defun([_LT_LINKER_BOILERPLATE],
cannam@126 967 [m4_require([_LT_DECL_SED])dnl
cannam@126 968 ac_outfile=conftest.$ac_objext
cannam@126 969 echo "$lt_simple_link_test_code" >conftest.$ac_ext
cannam@126 970 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
cannam@126 971 _lt_linker_boilerplate=`cat conftest.err`
cannam@126 972 $RM -r conftest*
cannam@126 973 ])# _LT_LINKER_BOILERPLATE
cannam@126 974
cannam@126 975 # _LT_REQUIRED_DARWIN_CHECKS
cannam@126 976 # -------------------------
cannam@126 977 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
cannam@126 978 case $host_os in
cannam@126 979 rhapsody* | darwin*)
cannam@126 980 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
cannam@126 981 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
cannam@126 982 AC_CHECK_TOOL([LIPO], [lipo], [:])
cannam@126 983 AC_CHECK_TOOL([OTOOL], [otool], [:])
cannam@126 984 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
cannam@126 985 _LT_DECL([], [DSYMUTIL], [1],
cannam@126 986 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
cannam@126 987 _LT_DECL([], [NMEDIT], [1],
cannam@126 988 [Tool to change global to local symbols on Mac OS X])
cannam@126 989 _LT_DECL([], [LIPO], [1],
cannam@126 990 [Tool to manipulate fat objects and archives on Mac OS X])
cannam@126 991 _LT_DECL([], [OTOOL], [1],
cannam@126 992 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
cannam@126 993 _LT_DECL([], [OTOOL64], [1],
cannam@126 994 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
cannam@126 995
cannam@126 996 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
cannam@126 997 [lt_cv_apple_cc_single_mod=no
cannam@126 998 if test -z "$LT_MULTI_MODULE"; then
cannam@126 999 # By default we will add the -single_module flag. You can override
cannam@126 1000 # by either setting the environment variable LT_MULTI_MODULE
cannam@126 1001 # non-empty at configure time, or by adding -multi_module to the
cannam@126 1002 # link flags.
cannam@126 1003 rm -rf libconftest.dylib*
cannam@126 1004 echo "int foo(void){return 1;}" > conftest.c
cannam@126 1005 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
cannam@126 1006 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
cannam@126 1007 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
cannam@126 1008 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
cannam@126 1009 _lt_result=$?
cannam@126 1010 # If there is a non-empty error log, and "single_module"
cannam@126 1011 # appears in it, assume the flag caused a linker warning
cannam@126 1012 if test -s conftest.err && $GREP single_module conftest.err; then
cannam@126 1013 cat conftest.err >&AS_MESSAGE_LOG_FD
cannam@126 1014 # Otherwise, if the output was created with a 0 exit code from
cannam@126 1015 # the compiler, it worked.
cannam@126 1016 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
cannam@126 1017 lt_cv_apple_cc_single_mod=yes
cannam@126 1018 else
cannam@126 1019 cat conftest.err >&AS_MESSAGE_LOG_FD
cannam@126 1020 fi
cannam@126 1021 rm -rf libconftest.dylib*
cannam@126 1022 rm -f conftest.*
cannam@126 1023 fi])
cannam@126 1024
cannam@126 1025 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
cannam@126 1026 [lt_cv_ld_exported_symbols_list],
cannam@126 1027 [lt_cv_ld_exported_symbols_list=no
cannam@126 1028 save_LDFLAGS=$LDFLAGS
cannam@126 1029 echo "_main" > conftest.sym
cannam@126 1030 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
cannam@126 1031 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
cannam@126 1032 [lt_cv_ld_exported_symbols_list=yes],
cannam@126 1033 [lt_cv_ld_exported_symbols_list=no])
cannam@126 1034 LDFLAGS=$save_LDFLAGS
cannam@126 1035 ])
cannam@126 1036
cannam@126 1037 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
cannam@126 1038 [lt_cv_ld_force_load=no
cannam@126 1039 cat > conftest.c << _LT_EOF
cannam@126 1040 int forced_loaded() { return 2;}
cannam@126 1041 _LT_EOF
cannam@126 1042 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
cannam@126 1043 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
cannam@126 1044 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
cannam@126 1045 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
cannam@126 1046 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
cannam@126 1047 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
cannam@126 1048 cat > conftest.c << _LT_EOF
cannam@126 1049 int main() { return 0;}
cannam@126 1050 _LT_EOF
cannam@126 1051 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
cannam@126 1052 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
cannam@126 1053 _lt_result=$?
cannam@126 1054 if test -s conftest.err && $GREP force_load conftest.err; then
cannam@126 1055 cat conftest.err >&AS_MESSAGE_LOG_FD
cannam@126 1056 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
cannam@126 1057 lt_cv_ld_force_load=yes
cannam@126 1058 else
cannam@126 1059 cat conftest.err >&AS_MESSAGE_LOG_FD
cannam@126 1060 fi
cannam@126 1061 rm -f conftest.err libconftest.a conftest conftest.c
cannam@126 1062 rm -rf conftest.dSYM
cannam@126 1063 ])
cannam@126 1064 case $host_os in
cannam@126 1065 rhapsody* | darwin1.[[012]])
cannam@126 1066 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
cannam@126 1067 darwin1.*)
cannam@126 1068 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
cannam@126 1069 darwin*) # darwin 5.x on
cannam@126 1070 # if running on 10.5 or later, the deployment target defaults
cannam@126 1071 # to the OS version, if on x86, and 10.4, the deployment
cannam@126 1072 # target defaults to 10.4. Don't you love it?
cannam@126 1073 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
cannam@126 1074 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
cannam@126 1075 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
cannam@126 1076 10.[[012]][[,.]]*)
cannam@126 1077 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
cannam@126 1078 10.*)
cannam@126 1079 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
cannam@126 1080 esac
cannam@126 1081 ;;
cannam@126 1082 esac
cannam@126 1083 if test yes = "$lt_cv_apple_cc_single_mod"; then
cannam@126 1084 _lt_dar_single_mod='$single_module'
cannam@126 1085 fi
cannam@126 1086 if test yes = "$lt_cv_ld_exported_symbols_list"; then
cannam@126 1087 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
cannam@126 1088 else
cannam@126 1089 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
cannam@126 1090 fi
cannam@126 1091 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
cannam@126 1092 _lt_dsymutil='~$DSYMUTIL $lib || :'
cannam@126 1093 else
cannam@126 1094 _lt_dsymutil=
cannam@126 1095 fi
cannam@126 1096 ;;
cannam@126 1097 esac
cannam@126 1098 ])
cannam@126 1099
cannam@126 1100
cannam@126 1101 # _LT_DARWIN_LINKER_FEATURES([TAG])
cannam@126 1102 # ---------------------------------
cannam@126 1103 # Checks for linker and compiler features on darwin
cannam@126 1104 m4_defun([_LT_DARWIN_LINKER_FEATURES],
cannam@126 1105 [
cannam@126 1106 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
cannam@126 1107 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@126 1108 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@126 1109 _LT_TAGVAR(hardcode_automatic, $1)=yes
cannam@126 1110 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
cannam@126 1111 if test yes = "$lt_cv_ld_force_load"; then
cannam@126 1112 _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
cannam@126 1113 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
cannam@126 1114 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
cannam@126 1115 else
cannam@126 1116 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
cannam@126 1117 fi
cannam@126 1118 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@126 1119 _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
cannam@126 1120 case $cc_basename in
cannam@126 1121 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
cannam@126 1122 *) _lt_dar_can_shared=$GCC ;;
cannam@126 1123 esac
cannam@126 1124 if test yes = "$_lt_dar_can_shared"; then
cannam@126 1125 output_verbose_link_cmd=func_echo_all
cannam@126 1126 _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
cannam@126 1127 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
cannam@126 1128 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
cannam@126 1129 _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
cannam@126 1130 m4_if([$1], [CXX],
cannam@126 1131 [ if test yes != "$lt_cv_apple_cc_single_mod"; then
cannam@126 1132 _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
cannam@126 1133 _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
cannam@126 1134 fi
cannam@126 1135 ],[])
cannam@126 1136 else
cannam@126 1137 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 1138 fi
cannam@126 1139 ])
cannam@126 1140
cannam@126 1141 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
cannam@126 1142 # ----------------------------------
cannam@126 1143 # Links a minimal program and checks the executable
cannam@126 1144 # for the system default hardcoded library path. In most cases,
cannam@126 1145 # this is /usr/lib:/lib, but when the MPI compilers are used
cannam@126 1146 # the location of the communication and MPI libs are included too.
cannam@126 1147 # If we don't find anything, use the default library path according
cannam@126 1148 # to the aix ld manual.
cannam@126 1149 # Store the results from the different compilers for each TAGNAME.
cannam@126 1150 # Allow to override them for all tags through lt_cv_aix_libpath.
cannam@126 1151 m4_defun([_LT_SYS_MODULE_PATH_AIX],
cannam@126 1152 [m4_require([_LT_DECL_SED])dnl
cannam@126 1153 if test set = "${lt_cv_aix_libpath+set}"; then
cannam@126 1154 aix_libpath=$lt_cv_aix_libpath
cannam@126 1155 else
cannam@126 1156 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
cannam@126 1157 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
cannam@126 1158 lt_aix_libpath_sed='[
cannam@126 1159 /Import File Strings/,/^$/ {
cannam@126 1160 /^0/ {
cannam@126 1161 s/^0 *\([^ ]*\) *$/\1/
cannam@126 1162 p
cannam@126 1163 }
cannam@126 1164 }]'
cannam@126 1165 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
cannam@126 1166 # Check for a 64-bit object if we didn't find anything.
cannam@126 1167 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
cannam@126 1168 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
cannam@126 1169 fi],[])
cannam@126 1170 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
cannam@126 1171 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
cannam@126 1172 fi
cannam@126 1173 ])
cannam@126 1174 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
cannam@126 1175 fi
cannam@126 1176 ])# _LT_SYS_MODULE_PATH_AIX
cannam@126 1177
cannam@126 1178
cannam@126 1179 # _LT_SHELL_INIT(ARG)
cannam@126 1180 # -------------------
cannam@126 1181 m4_define([_LT_SHELL_INIT],
cannam@126 1182 [m4_divert_text([M4SH-INIT], [$1
cannam@126 1183 ])])# _LT_SHELL_INIT
cannam@126 1184
cannam@126 1185
cannam@126 1186
cannam@126 1187 # _LT_PROG_ECHO_BACKSLASH
cannam@126 1188 # -----------------------
cannam@126 1189 # Find how we can fake an echo command that does not interpret backslash.
cannam@126 1190 # In particular, with Autoconf 2.60 or later we add some code to the start
cannam@126 1191 # of the generated configure script that will find a shell with a builtin
cannam@126 1192 # printf (that we can use as an echo command).
cannam@126 1193 m4_defun([_LT_PROG_ECHO_BACKSLASH],
cannam@126 1194 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
cannam@126 1195 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
cannam@126 1196 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
cannam@126 1197
cannam@126 1198 AC_MSG_CHECKING([how to print strings])
cannam@126 1199 # Test print first, because it will be a builtin if present.
cannam@126 1200 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
cannam@126 1201 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
cannam@126 1202 ECHO='print -r --'
cannam@126 1203 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
cannam@126 1204 ECHO='printf %s\n'
cannam@126 1205 else
cannam@126 1206 # Use this function as a fallback that always works.
cannam@126 1207 func_fallback_echo ()
cannam@126 1208 {
cannam@126 1209 eval 'cat <<_LTECHO_EOF
cannam@126 1210 $[]1
cannam@126 1211 _LTECHO_EOF'
cannam@126 1212 }
cannam@126 1213 ECHO='func_fallback_echo'
cannam@126 1214 fi
cannam@126 1215
cannam@126 1216 # func_echo_all arg...
cannam@126 1217 # Invoke $ECHO with all args, space-separated.
cannam@126 1218 func_echo_all ()
cannam@126 1219 {
cannam@126 1220 $ECHO "$*"
cannam@126 1221 }
cannam@126 1222
cannam@126 1223 case $ECHO in
cannam@126 1224 printf*) AC_MSG_RESULT([printf]) ;;
cannam@126 1225 print*) AC_MSG_RESULT([print -r]) ;;
cannam@126 1226 *) AC_MSG_RESULT([cat]) ;;
cannam@126 1227 esac
cannam@126 1228
cannam@126 1229 m4_ifdef([_AS_DETECT_SUGGESTED],
cannam@126 1230 [_AS_DETECT_SUGGESTED([
cannam@126 1231 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
cannam@126 1232 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
cannam@126 1233 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
cannam@126 1234 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
cannam@126 1235 PATH=/empty FPATH=/empty; export PATH FPATH
cannam@126 1236 test "X`printf %s $ECHO`" = "X$ECHO" \
cannam@126 1237 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
cannam@126 1238
cannam@126 1239 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
cannam@126 1240 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
cannam@126 1241 ])# _LT_PROG_ECHO_BACKSLASH
cannam@126 1242
cannam@126 1243
cannam@126 1244 # _LT_WITH_SYSROOT
cannam@126 1245 # ----------------
cannam@126 1246 AC_DEFUN([_LT_WITH_SYSROOT],
cannam@126 1247 [AC_MSG_CHECKING([for sysroot])
cannam@126 1248 AC_ARG_WITH([sysroot],
cannam@126 1249 [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
cannam@126 1250 [Search for dependent libraries within DIR (or the compiler's sysroot
cannam@126 1251 if not specified).])],
cannam@126 1252 [], [with_sysroot=no])
cannam@126 1253
cannam@126 1254 dnl lt_sysroot will always be passed unquoted. We quote it here
cannam@126 1255 dnl in case the user passed a directory name.
cannam@126 1256 lt_sysroot=
cannam@126 1257 case $with_sysroot in #(
cannam@126 1258 yes)
cannam@126 1259 if test yes = "$GCC"; then
cannam@126 1260 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
cannam@126 1261 fi
cannam@126 1262 ;; #(
cannam@126 1263 /*)
cannam@126 1264 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
cannam@126 1265 ;; #(
cannam@126 1266 no|'')
cannam@126 1267 ;; #(
cannam@126 1268 *)
cannam@126 1269 AC_MSG_RESULT([$with_sysroot])
cannam@126 1270 AC_MSG_ERROR([The sysroot must be an absolute path.])
cannam@126 1271 ;;
cannam@126 1272 esac
cannam@126 1273
cannam@126 1274 AC_MSG_RESULT([${lt_sysroot:-no}])
cannam@126 1275 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
cannam@126 1276 [dependent libraries, and where our libraries should be installed.])])
cannam@126 1277
cannam@126 1278 # _LT_ENABLE_LOCK
cannam@126 1279 # ---------------
cannam@126 1280 m4_defun([_LT_ENABLE_LOCK],
cannam@126 1281 [AC_ARG_ENABLE([libtool-lock],
cannam@126 1282 [AS_HELP_STRING([--disable-libtool-lock],
cannam@126 1283 [avoid locking (might break parallel builds)])])
cannam@126 1284 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
cannam@126 1285
cannam@126 1286 # Some flags need to be propagated to the compiler or linker for good
cannam@126 1287 # libtool support.
cannam@126 1288 case $host in
cannam@126 1289 ia64-*-hpux*)
cannam@126 1290 # Find out what ABI is being produced by ac_compile, and set mode
cannam@126 1291 # options accordingly.
cannam@126 1292 echo 'int i;' > conftest.$ac_ext
cannam@126 1293 if AC_TRY_EVAL(ac_compile); then
cannam@126 1294 case `/usr/bin/file conftest.$ac_objext` in
cannam@126 1295 *ELF-32*)
cannam@126 1296 HPUX_IA64_MODE=32
cannam@126 1297 ;;
cannam@126 1298 *ELF-64*)
cannam@126 1299 HPUX_IA64_MODE=64
cannam@126 1300 ;;
cannam@126 1301 esac
cannam@126 1302 fi
cannam@126 1303 rm -rf conftest*
cannam@126 1304 ;;
cannam@126 1305 *-*-irix6*)
cannam@126 1306 # Find out what ABI is being produced by ac_compile, and set linker
cannam@126 1307 # options accordingly.
cannam@126 1308 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
cannam@126 1309 if AC_TRY_EVAL(ac_compile); then
cannam@126 1310 if test yes = "$lt_cv_prog_gnu_ld"; then
cannam@126 1311 case `/usr/bin/file conftest.$ac_objext` in
cannam@126 1312 *32-bit*)
cannam@126 1313 LD="${LD-ld} -melf32bsmip"
cannam@126 1314 ;;
cannam@126 1315 *N32*)
cannam@126 1316 LD="${LD-ld} -melf32bmipn32"
cannam@126 1317 ;;
cannam@126 1318 *64-bit*)
cannam@126 1319 LD="${LD-ld} -melf64bmip"
cannam@126 1320 ;;
cannam@126 1321 esac
cannam@126 1322 else
cannam@126 1323 case `/usr/bin/file conftest.$ac_objext` in
cannam@126 1324 *32-bit*)
cannam@126 1325 LD="${LD-ld} -32"
cannam@126 1326 ;;
cannam@126 1327 *N32*)
cannam@126 1328 LD="${LD-ld} -n32"
cannam@126 1329 ;;
cannam@126 1330 *64-bit*)
cannam@126 1331 LD="${LD-ld} -64"
cannam@126 1332 ;;
cannam@126 1333 esac
cannam@126 1334 fi
cannam@126 1335 fi
cannam@126 1336 rm -rf conftest*
cannam@126 1337 ;;
cannam@126 1338
cannam@126 1339 mips64*-*linux*)
cannam@126 1340 # Find out what ABI is being produced by ac_compile, and set linker
cannam@126 1341 # options accordingly.
cannam@126 1342 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
cannam@126 1343 if AC_TRY_EVAL(ac_compile); then
cannam@126 1344 emul=elf
cannam@126 1345 case `/usr/bin/file conftest.$ac_objext` in
cannam@126 1346 *32-bit*)
cannam@126 1347 emul="${emul}32"
cannam@126 1348 ;;
cannam@126 1349 *64-bit*)
cannam@126 1350 emul="${emul}64"
cannam@126 1351 ;;
cannam@126 1352 esac
cannam@126 1353 case `/usr/bin/file conftest.$ac_objext` in
cannam@126 1354 *MSB*)
cannam@126 1355 emul="${emul}btsmip"
cannam@126 1356 ;;
cannam@126 1357 *LSB*)
cannam@126 1358 emul="${emul}ltsmip"
cannam@126 1359 ;;
cannam@126 1360 esac
cannam@126 1361 case `/usr/bin/file conftest.$ac_objext` in
cannam@126 1362 *N32*)
cannam@126 1363 emul="${emul}n32"
cannam@126 1364 ;;
cannam@126 1365 esac
cannam@126 1366 LD="${LD-ld} -m $emul"
cannam@126 1367 fi
cannam@126 1368 rm -rf conftest*
cannam@126 1369 ;;
cannam@126 1370
cannam@126 1371 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
cannam@126 1372 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
cannam@126 1373 # Find out what ABI is being produced by ac_compile, and set linker
cannam@126 1374 # options accordingly. Note that the listed cases only cover the
cannam@126 1375 # situations where additional linker options are needed (such as when
cannam@126 1376 # doing 32-bit compilation for a host where ld defaults to 64-bit, or
cannam@126 1377 # vice versa); the common cases where no linker options are needed do
cannam@126 1378 # not appear in the list.
cannam@126 1379 echo 'int i;' > conftest.$ac_ext
cannam@126 1380 if AC_TRY_EVAL(ac_compile); then
cannam@126 1381 case `/usr/bin/file conftest.o` in
cannam@126 1382 *32-bit*)
cannam@126 1383 case $host in
cannam@126 1384 x86_64-*kfreebsd*-gnu)
cannam@126 1385 LD="${LD-ld} -m elf_i386_fbsd"
cannam@126 1386 ;;
cannam@126 1387 x86_64-*linux*)
cannam@126 1388 case `/usr/bin/file conftest.o` in
cannam@126 1389 *x86-64*)
cannam@126 1390 LD="${LD-ld} -m elf32_x86_64"
cannam@126 1391 ;;
cannam@126 1392 *)
cannam@126 1393 LD="${LD-ld} -m elf_i386"
cannam@126 1394 ;;
cannam@126 1395 esac
cannam@126 1396 ;;
cannam@126 1397 powerpc64le-*linux*)
cannam@126 1398 LD="${LD-ld} -m elf32lppclinux"
cannam@126 1399 ;;
cannam@126 1400 powerpc64-*linux*)
cannam@126 1401 LD="${LD-ld} -m elf32ppclinux"
cannam@126 1402 ;;
cannam@126 1403 s390x-*linux*)
cannam@126 1404 LD="${LD-ld} -m elf_s390"
cannam@126 1405 ;;
cannam@126 1406 sparc64-*linux*)
cannam@126 1407 LD="${LD-ld} -m elf32_sparc"
cannam@126 1408 ;;
cannam@126 1409 esac
cannam@126 1410 ;;
cannam@126 1411 *64-bit*)
cannam@126 1412 case $host in
cannam@126 1413 x86_64-*kfreebsd*-gnu)
cannam@126 1414 LD="${LD-ld} -m elf_x86_64_fbsd"
cannam@126 1415 ;;
cannam@126 1416 x86_64-*linux*)
cannam@126 1417 LD="${LD-ld} -m elf_x86_64"
cannam@126 1418 ;;
cannam@126 1419 powerpcle-*linux*)
cannam@126 1420 LD="${LD-ld} -m elf64lppc"
cannam@126 1421 ;;
cannam@126 1422 powerpc-*linux*)
cannam@126 1423 LD="${LD-ld} -m elf64ppc"
cannam@126 1424 ;;
cannam@126 1425 s390*-*linux*|s390*-*tpf*)
cannam@126 1426 LD="${LD-ld} -m elf64_s390"
cannam@126 1427 ;;
cannam@126 1428 sparc*-*linux*)
cannam@126 1429 LD="${LD-ld} -m elf64_sparc"
cannam@126 1430 ;;
cannam@126 1431 esac
cannam@126 1432 ;;
cannam@126 1433 esac
cannam@126 1434 fi
cannam@126 1435 rm -rf conftest*
cannam@126 1436 ;;
cannam@126 1437
cannam@126 1438 *-*-sco3.2v5*)
cannam@126 1439 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
cannam@126 1440 SAVE_CFLAGS=$CFLAGS
cannam@126 1441 CFLAGS="$CFLAGS -belf"
cannam@126 1442 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
cannam@126 1443 [AC_LANG_PUSH(C)
cannam@126 1444 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
cannam@126 1445 AC_LANG_POP])
cannam@126 1446 if test yes != "$lt_cv_cc_needs_belf"; then
cannam@126 1447 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
cannam@126 1448 CFLAGS=$SAVE_CFLAGS
cannam@126 1449 fi
cannam@126 1450 ;;
cannam@126 1451 *-*solaris*)
cannam@126 1452 # Find out what ABI is being produced by ac_compile, and set linker
cannam@126 1453 # options accordingly.
cannam@126 1454 echo 'int i;' > conftest.$ac_ext
cannam@126 1455 if AC_TRY_EVAL(ac_compile); then
cannam@126 1456 case `/usr/bin/file conftest.o` in
cannam@126 1457 *64-bit*)
cannam@126 1458 case $lt_cv_prog_gnu_ld in
cannam@126 1459 yes*)
cannam@126 1460 case $host in
cannam@126 1461 i?86-*-solaris*|x86_64-*-solaris*)
cannam@126 1462 LD="${LD-ld} -m elf_x86_64"
cannam@126 1463 ;;
cannam@126 1464 sparc*-*-solaris*)
cannam@126 1465 LD="${LD-ld} -m elf64_sparc"
cannam@126 1466 ;;
cannam@126 1467 esac
cannam@126 1468 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
cannam@126 1469 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
cannam@126 1470 LD=${LD-ld}_sol2
cannam@126 1471 fi
cannam@126 1472 ;;
cannam@126 1473 *)
cannam@126 1474 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
cannam@126 1475 LD="${LD-ld} -64"
cannam@126 1476 fi
cannam@126 1477 ;;
cannam@126 1478 esac
cannam@126 1479 ;;
cannam@126 1480 esac
cannam@126 1481 fi
cannam@126 1482 rm -rf conftest*
cannam@126 1483 ;;
cannam@126 1484 esac
cannam@126 1485
cannam@126 1486 need_locks=$enable_libtool_lock
cannam@126 1487 ])# _LT_ENABLE_LOCK
cannam@126 1488
cannam@126 1489
cannam@126 1490 # _LT_PROG_AR
cannam@126 1491 # -----------
cannam@126 1492 m4_defun([_LT_PROG_AR],
cannam@126 1493 [AC_CHECK_TOOLS(AR, [ar], false)
cannam@126 1494 : ${AR=ar}
cannam@126 1495 : ${AR_FLAGS=cru}
cannam@126 1496 _LT_DECL([], [AR], [1], [The archiver])
cannam@126 1497 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
cannam@126 1498
cannam@126 1499 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
cannam@126 1500 [lt_cv_ar_at_file=no
cannam@126 1501 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
cannam@126 1502 [echo conftest.$ac_objext > conftest.lst
cannam@126 1503 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
cannam@126 1504 AC_TRY_EVAL([lt_ar_try])
cannam@126 1505 if test 0 -eq "$ac_status"; then
cannam@126 1506 # Ensure the archiver fails upon bogus file names.
cannam@126 1507 rm -f conftest.$ac_objext libconftest.a
cannam@126 1508 AC_TRY_EVAL([lt_ar_try])
cannam@126 1509 if test 0 -ne "$ac_status"; then
cannam@126 1510 lt_cv_ar_at_file=@
cannam@126 1511 fi
cannam@126 1512 fi
cannam@126 1513 rm -f conftest.* libconftest.a
cannam@126 1514 ])
cannam@126 1515 ])
cannam@126 1516
cannam@126 1517 if test no = "$lt_cv_ar_at_file"; then
cannam@126 1518 archiver_list_spec=
cannam@126 1519 else
cannam@126 1520 archiver_list_spec=$lt_cv_ar_at_file
cannam@126 1521 fi
cannam@126 1522 _LT_DECL([], [archiver_list_spec], [1],
cannam@126 1523 [How to feed a file listing to the archiver])
cannam@126 1524 ])# _LT_PROG_AR
cannam@126 1525
cannam@126 1526
cannam@126 1527 # _LT_CMD_OLD_ARCHIVE
cannam@126 1528 # -------------------
cannam@126 1529 m4_defun([_LT_CMD_OLD_ARCHIVE],
cannam@126 1530 [_LT_PROG_AR
cannam@126 1531
cannam@126 1532 AC_CHECK_TOOL(STRIP, strip, :)
cannam@126 1533 test -z "$STRIP" && STRIP=:
cannam@126 1534 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
cannam@126 1535
cannam@126 1536 AC_CHECK_TOOL(RANLIB, ranlib, :)
cannam@126 1537 test -z "$RANLIB" && RANLIB=:
cannam@126 1538 _LT_DECL([], [RANLIB], [1],
cannam@126 1539 [Commands used to install an old-style archive])
cannam@126 1540
cannam@126 1541 # Determine commands to create old-style static archives.
cannam@126 1542 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
cannam@126 1543 old_postinstall_cmds='chmod 644 $oldlib'
cannam@126 1544 old_postuninstall_cmds=
cannam@126 1545
cannam@126 1546 if test -n "$RANLIB"; then
cannam@126 1547 case $host_os in
cannam@126 1548 bitrig* | openbsd*)
cannam@126 1549 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
cannam@126 1550 ;;
cannam@126 1551 *)
cannam@126 1552 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
cannam@126 1553 ;;
cannam@126 1554 esac
cannam@126 1555 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
cannam@126 1556 fi
cannam@126 1557
cannam@126 1558 case $host_os in
cannam@126 1559 darwin*)
cannam@126 1560 lock_old_archive_extraction=yes ;;
cannam@126 1561 *)
cannam@126 1562 lock_old_archive_extraction=no ;;
cannam@126 1563 esac
cannam@126 1564 _LT_DECL([], [old_postinstall_cmds], [2])
cannam@126 1565 _LT_DECL([], [old_postuninstall_cmds], [2])
cannam@126 1566 _LT_TAGDECL([], [old_archive_cmds], [2],
cannam@126 1567 [Commands used to build an old-style archive])
cannam@126 1568 _LT_DECL([], [lock_old_archive_extraction], [0],
cannam@126 1569 [Whether to use a lock for old archive extraction])
cannam@126 1570 ])# _LT_CMD_OLD_ARCHIVE
cannam@126 1571
cannam@126 1572
cannam@126 1573 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
cannam@126 1574 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
cannam@126 1575 # ----------------------------------------------------------------
cannam@126 1576 # Check whether the given compiler option works
cannam@126 1577 AC_DEFUN([_LT_COMPILER_OPTION],
cannam@126 1578 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@126 1579 m4_require([_LT_DECL_SED])dnl
cannam@126 1580 AC_CACHE_CHECK([$1], [$2],
cannam@126 1581 [$2=no
cannam@126 1582 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
cannam@126 1583 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
cannam@126 1584 lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
cannam@126 1585 # Insert the option either (1) after the last *FLAGS variable, or
cannam@126 1586 # (2) before a word containing "conftest.", or (3) at the end.
cannam@126 1587 # Note that $ac_compile itself does not contain backslashes and begins
cannam@126 1588 # with a dollar sign (not a hyphen), so the echo should work correctly.
cannam@126 1589 # The option is referenced via a variable to avoid confusing sed.
cannam@126 1590 lt_compile=`echo "$ac_compile" | $SED \
cannam@126 1591 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
cannam@126 1592 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
cannam@126 1593 -e 's:$: $lt_compiler_flag:'`
cannam@126 1594 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
cannam@126 1595 (eval "$lt_compile" 2>conftest.err)
cannam@126 1596 ac_status=$?
cannam@126 1597 cat conftest.err >&AS_MESSAGE_LOG_FD
cannam@126 1598 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
cannam@126 1599 if (exit $ac_status) && test -s "$ac_outfile"; then
cannam@126 1600 # The compiler can only warn and ignore the option if not recognized
cannam@126 1601 # So say no if there are warnings other than the usual output.
cannam@126 1602 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
cannam@126 1603 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
cannam@126 1604 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
cannam@126 1605 $2=yes
cannam@126 1606 fi
cannam@126 1607 fi
cannam@126 1608 $RM conftest*
cannam@126 1609 ])
cannam@126 1610
cannam@126 1611 if test yes = "[$]$2"; then
cannam@126 1612 m4_if([$5], , :, [$5])
cannam@126 1613 else
cannam@126 1614 m4_if([$6], , :, [$6])
cannam@126 1615 fi
cannam@126 1616 ])# _LT_COMPILER_OPTION
cannam@126 1617
cannam@126 1618 # Old name:
cannam@126 1619 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
cannam@126 1620 dnl aclocal-1.4 backwards compatibility:
cannam@126 1621 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
cannam@126 1622
cannam@126 1623
cannam@126 1624 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
cannam@126 1625 # [ACTION-SUCCESS], [ACTION-FAILURE])
cannam@126 1626 # ----------------------------------------------------
cannam@126 1627 # Check whether the given linker option works
cannam@126 1628 AC_DEFUN([_LT_LINKER_OPTION],
cannam@126 1629 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@126 1630 m4_require([_LT_DECL_SED])dnl
cannam@126 1631 AC_CACHE_CHECK([$1], [$2],
cannam@126 1632 [$2=no
cannam@126 1633 save_LDFLAGS=$LDFLAGS
cannam@126 1634 LDFLAGS="$LDFLAGS $3"
cannam@126 1635 echo "$lt_simple_link_test_code" > conftest.$ac_ext
cannam@126 1636 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
cannam@126 1637 # The linker can only warn and ignore the option if not recognized
cannam@126 1638 # So say no if there are warnings
cannam@126 1639 if test -s conftest.err; then
cannam@126 1640 # Append any errors to the config.log.
cannam@126 1641 cat conftest.err 1>&AS_MESSAGE_LOG_FD
cannam@126 1642 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
cannam@126 1643 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
cannam@126 1644 if diff conftest.exp conftest.er2 >/dev/null; then
cannam@126 1645 $2=yes
cannam@126 1646 fi
cannam@126 1647 else
cannam@126 1648 $2=yes
cannam@126 1649 fi
cannam@126 1650 fi
cannam@126 1651 $RM -r conftest*
cannam@126 1652 LDFLAGS=$save_LDFLAGS
cannam@126 1653 ])
cannam@126 1654
cannam@126 1655 if test yes = "[$]$2"; then
cannam@126 1656 m4_if([$4], , :, [$4])
cannam@126 1657 else
cannam@126 1658 m4_if([$5], , :, [$5])
cannam@126 1659 fi
cannam@126 1660 ])# _LT_LINKER_OPTION
cannam@126 1661
cannam@126 1662 # Old name:
cannam@126 1663 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
cannam@126 1664 dnl aclocal-1.4 backwards compatibility:
cannam@126 1665 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
cannam@126 1666
cannam@126 1667
cannam@126 1668 # LT_CMD_MAX_LEN
cannam@126 1669 #---------------
cannam@126 1670 AC_DEFUN([LT_CMD_MAX_LEN],
cannam@126 1671 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
cannam@126 1672 # find the maximum length of command line arguments
cannam@126 1673 AC_MSG_CHECKING([the maximum length of command line arguments])
cannam@126 1674 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
cannam@126 1675 i=0
cannam@126 1676 teststring=ABCD
cannam@126 1677
cannam@126 1678 case $build_os in
cannam@126 1679 msdosdjgpp*)
cannam@126 1680 # On DJGPP, this test can blow up pretty badly due to problems in libc
cannam@126 1681 # (any single argument exceeding 2000 bytes causes a buffer overrun
cannam@126 1682 # during glob expansion). Even if it were fixed, the result of this
cannam@126 1683 # check would be larger than it should be.
cannam@126 1684 lt_cv_sys_max_cmd_len=12288; # 12K is about right
cannam@126 1685 ;;
cannam@126 1686
cannam@126 1687 gnu*)
cannam@126 1688 # Under GNU Hurd, this test is not required because there is
cannam@126 1689 # no limit to the length of command line arguments.
cannam@126 1690 # Libtool will interpret -1 as no limit whatsoever
cannam@126 1691 lt_cv_sys_max_cmd_len=-1;
cannam@126 1692 ;;
cannam@126 1693
cannam@126 1694 cygwin* | mingw* | cegcc*)
cannam@126 1695 # On Win9x/ME, this test blows up -- it succeeds, but takes
cannam@126 1696 # about 5 minutes as the teststring grows exponentially.
cannam@126 1697 # Worse, since 9x/ME are not pre-emptively multitasking,
cannam@126 1698 # you end up with a "frozen" computer, even though with patience
cannam@126 1699 # the test eventually succeeds (with a max line length of 256k).
cannam@126 1700 # Instead, let's just punt: use the minimum linelength reported by
cannam@126 1701 # all of the supported platforms: 8192 (on NT/2K/XP).
cannam@126 1702 lt_cv_sys_max_cmd_len=8192;
cannam@126 1703 ;;
cannam@126 1704
cannam@126 1705 mint*)
cannam@126 1706 # On MiNT this can take a long time and run out of memory.
cannam@126 1707 lt_cv_sys_max_cmd_len=8192;
cannam@126 1708 ;;
cannam@126 1709
cannam@126 1710 amigaos*)
cannam@126 1711 # On AmigaOS with pdksh, this test takes hours, literally.
cannam@126 1712 # So we just punt and use a minimum line length of 8192.
cannam@126 1713 lt_cv_sys_max_cmd_len=8192;
cannam@126 1714 ;;
cannam@126 1715
cannam@126 1716 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
cannam@126 1717 # This has been around since 386BSD, at least. Likely further.
cannam@126 1718 if test -x /sbin/sysctl; then
cannam@126 1719 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
cannam@126 1720 elif test -x /usr/sbin/sysctl; then
cannam@126 1721 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
cannam@126 1722 else
cannam@126 1723 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
cannam@126 1724 fi
cannam@126 1725 # And add a safety zone
cannam@126 1726 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
cannam@126 1727 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
cannam@126 1728 ;;
cannam@126 1729
cannam@126 1730 interix*)
cannam@126 1731 # We know the value 262144 and hardcode it with a safety zone (like BSD)
cannam@126 1732 lt_cv_sys_max_cmd_len=196608
cannam@126 1733 ;;
cannam@126 1734
cannam@126 1735 os2*)
cannam@126 1736 # The test takes a long time on OS/2.
cannam@126 1737 lt_cv_sys_max_cmd_len=8192
cannam@126 1738 ;;
cannam@126 1739
cannam@126 1740 osf*)
cannam@126 1741 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
cannam@126 1742 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
cannam@126 1743 # nice to cause kernel panics so lets avoid the loop below.
cannam@126 1744 # First set a reasonable default.
cannam@126 1745 lt_cv_sys_max_cmd_len=16384
cannam@126 1746 #
cannam@126 1747 if test -x /sbin/sysconfig; then
cannam@126 1748 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
cannam@126 1749 *1*) lt_cv_sys_max_cmd_len=-1 ;;
cannam@126 1750 esac
cannam@126 1751 fi
cannam@126 1752 ;;
cannam@126 1753 sco3.2v5*)
cannam@126 1754 lt_cv_sys_max_cmd_len=102400
cannam@126 1755 ;;
cannam@126 1756 sysv5* | sco5v6* | sysv4.2uw2*)
cannam@126 1757 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
cannam@126 1758 if test -n "$kargmax"; then
cannam@126 1759 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
cannam@126 1760 else
cannam@126 1761 lt_cv_sys_max_cmd_len=32768
cannam@126 1762 fi
cannam@126 1763 ;;
cannam@126 1764 *)
cannam@126 1765 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
cannam@126 1766 if test -n "$lt_cv_sys_max_cmd_len" && \
cannam@126 1767 test undefined != "$lt_cv_sys_max_cmd_len"; then
cannam@126 1768 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
cannam@126 1769 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
cannam@126 1770 else
cannam@126 1771 # Make teststring a little bigger before we do anything with it.
cannam@126 1772 # a 1K string should be a reasonable start.
cannam@126 1773 for i in 1 2 3 4 5 6 7 8; do
cannam@126 1774 teststring=$teststring$teststring
cannam@126 1775 done
cannam@126 1776 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
cannam@126 1777 # If test is not a shell built-in, we'll probably end up computing a
cannam@126 1778 # maximum length that is only half of the actual maximum length, but
cannam@126 1779 # we can't tell.
cannam@126 1780 while { test X`env echo "$teststring$teststring" 2>/dev/null` \
cannam@126 1781 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
cannam@126 1782 test 17 != "$i" # 1/2 MB should be enough
cannam@126 1783 do
cannam@126 1784 i=`expr $i + 1`
cannam@126 1785 teststring=$teststring$teststring
cannam@126 1786 done
cannam@126 1787 # Only check the string length outside the loop.
cannam@126 1788 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
cannam@126 1789 teststring=
cannam@126 1790 # Add a significant safety factor because C++ compilers can tack on
cannam@126 1791 # massive amounts of additional arguments before passing them to the
cannam@126 1792 # linker. It appears as though 1/2 is a usable value.
cannam@126 1793 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
cannam@126 1794 fi
cannam@126 1795 ;;
cannam@126 1796 esac
cannam@126 1797 ])
cannam@126 1798 if test -n "$lt_cv_sys_max_cmd_len"; then
cannam@126 1799 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
cannam@126 1800 else
cannam@126 1801 AC_MSG_RESULT(none)
cannam@126 1802 fi
cannam@126 1803 max_cmd_len=$lt_cv_sys_max_cmd_len
cannam@126 1804 _LT_DECL([], [max_cmd_len], [0],
cannam@126 1805 [What is the maximum length of a command?])
cannam@126 1806 ])# LT_CMD_MAX_LEN
cannam@126 1807
cannam@126 1808 # Old name:
cannam@126 1809 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
cannam@126 1810 dnl aclocal-1.4 backwards compatibility:
cannam@126 1811 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
cannam@126 1812
cannam@126 1813
cannam@126 1814 # _LT_HEADER_DLFCN
cannam@126 1815 # ----------------
cannam@126 1816 m4_defun([_LT_HEADER_DLFCN],
cannam@126 1817 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
cannam@126 1818 ])# _LT_HEADER_DLFCN
cannam@126 1819
cannam@126 1820
cannam@126 1821 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
cannam@126 1822 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
cannam@126 1823 # ----------------------------------------------------------------
cannam@126 1824 m4_defun([_LT_TRY_DLOPEN_SELF],
cannam@126 1825 [m4_require([_LT_HEADER_DLFCN])dnl
cannam@126 1826 if test yes = "$cross_compiling"; then :
cannam@126 1827 [$4]
cannam@126 1828 else
cannam@126 1829 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
cannam@126 1830 lt_status=$lt_dlunknown
cannam@126 1831 cat > conftest.$ac_ext <<_LT_EOF
cannam@126 1832 [#line $LINENO "configure"
cannam@126 1833 #include "confdefs.h"
cannam@126 1834
cannam@126 1835 #if HAVE_DLFCN_H
cannam@126 1836 #include <dlfcn.h>
cannam@126 1837 #endif
cannam@126 1838
cannam@126 1839 #include <stdio.h>
cannam@126 1840
cannam@126 1841 #ifdef RTLD_GLOBAL
cannam@126 1842 # define LT_DLGLOBAL RTLD_GLOBAL
cannam@126 1843 #else
cannam@126 1844 # ifdef DL_GLOBAL
cannam@126 1845 # define LT_DLGLOBAL DL_GLOBAL
cannam@126 1846 # else
cannam@126 1847 # define LT_DLGLOBAL 0
cannam@126 1848 # endif
cannam@126 1849 #endif
cannam@126 1850
cannam@126 1851 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
cannam@126 1852 find out it does not work in some platform. */
cannam@126 1853 #ifndef LT_DLLAZY_OR_NOW
cannam@126 1854 # ifdef RTLD_LAZY
cannam@126 1855 # define LT_DLLAZY_OR_NOW RTLD_LAZY
cannam@126 1856 # else
cannam@126 1857 # ifdef DL_LAZY
cannam@126 1858 # define LT_DLLAZY_OR_NOW DL_LAZY
cannam@126 1859 # else
cannam@126 1860 # ifdef RTLD_NOW
cannam@126 1861 # define LT_DLLAZY_OR_NOW RTLD_NOW
cannam@126 1862 # else
cannam@126 1863 # ifdef DL_NOW
cannam@126 1864 # define LT_DLLAZY_OR_NOW DL_NOW
cannam@126 1865 # else
cannam@126 1866 # define LT_DLLAZY_OR_NOW 0
cannam@126 1867 # endif
cannam@126 1868 # endif
cannam@126 1869 # endif
cannam@126 1870 # endif
cannam@126 1871 #endif
cannam@126 1872
cannam@126 1873 /* When -fvisibility=hidden is used, assume the code has been annotated
cannam@126 1874 correspondingly for the symbols needed. */
cannam@126 1875 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
cannam@126 1876 int fnord () __attribute__((visibility("default")));
cannam@126 1877 #endif
cannam@126 1878
cannam@126 1879 int fnord () { return 42; }
cannam@126 1880 int main ()
cannam@126 1881 {
cannam@126 1882 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
cannam@126 1883 int status = $lt_dlunknown;
cannam@126 1884
cannam@126 1885 if (self)
cannam@126 1886 {
cannam@126 1887 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
cannam@126 1888 else
cannam@126 1889 {
cannam@126 1890 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
cannam@126 1891 else puts (dlerror ());
cannam@126 1892 }
cannam@126 1893 /* dlclose (self); */
cannam@126 1894 }
cannam@126 1895 else
cannam@126 1896 puts (dlerror ());
cannam@126 1897
cannam@126 1898 return status;
cannam@126 1899 }]
cannam@126 1900 _LT_EOF
cannam@126 1901 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
cannam@126 1902 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
cannam@126 1903 lt_status=$?
cannam@126 1904 case x$lt_status in
cannam@126 1905 x$lt_dlno_uscore) $1 ;;
cannam@126 1906 x$lt_dlneed_uscore) $2 ;;
cannam@126 1907 x$lt_dlunknown|x*) $3 ;;
cannam@126 1908 esac
cannam@126 1909 else :
cannam@126 1910 # compilation failed
cannam@126 1911 $3
cannam@126 1912 fi
cannam@126 1913 fi
cannam@126 1914 rm -fr conftest*
cannam@126 1915 ])# _LT_TRY_DLOPEN_SELF
cannam@126 1916
cannam@126 1917
cannam@126 1918 # LT_SYS_DLOPEN_SELF
cannam@126 1919 # ------------------
cannam@126 1920 AC_DEFUN([LT_SYS_DLOPEN_SELF],
cannam@126 1921 [m4_require([_LT_HEADER_DLFCN])dnl
cannam@126 1922 if test yes != "$enable_dlopen"; then
cannam@126 1923 enable_dlopen=unknown
cannam@126 1924 enable_dlopen_self=unknown
cannam@126 1925 enable_dlopen_self_static=unknown
cannam@126 1926 else
cannam@126 1927 lt_cv_dlopen=no
cannam@126 1928 lt_cv_dlopen_libs=
cannam@126 1929
cannam@126 1930 case $host_os in
cannam@126 1931 beos*)
cannam@126 1932 lt_cv_dlopen=load_add_on
cannam@126 1933 lt_cv_dlopen_libs=
cannam@126 1934 lt_cv_dlopen_self=yes
cannam@126 1935 ;;
cannam@126 1936
cannam@126 1937 mingw* | pw32* | cegcc*)
cannam@126 1938 lt_cv_dlopen=LoadLibrary
cannam@126 1939 lt_cv_dlopen_libs=
cannam@126 1940 ;;
cannam@126 1941
cannam@126 1942 cygwin*)
cannam@126 1943 lt_cv_dlopen=dlopen
cannam@126 1944 lt_cv_dlopen_libs=
cannam@126 1945 ;;
cannam@126 1946
cannam@126 1947 darwin*)
cannam@126 1948 # if libdl is installed we need to link against it
cannam@126 1949 AC_CHECK_LIB([dl], [dlopen],
cannam@126 1950 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
cannam@126 1951 lt_cv_dlopen=dyld
cannam@126 1952 lt_cv_dlopen_libs=
cannam@126 1953 lt_cv_dlopen_self=yes
cannam@126 1954 ])
cannam@126 1955 ;;
cannam@126 1956
cannam@126 1957 tpf*)
cannam@126 1958 # Don't try to run any link tests for TPF. We know it's impossible
cannam@126 1959 # because TPF is a cross-compiler, and we know how we open DSOs.
cannam@126 1960 lt_cv_dlopen=dlopen
cannam@126 1961 lt_cv_dlopen_libs=
cannam@126 1962 lt_cv_dlopen_self=no
cannam@126 1963 ;;
cannam@126 1964
cannam@126 1965 *)
cannam@126 1966 AC_CHECK_FUNC([shl_load],
cannam@126 1967 [lt_cv_dlopen=shl_load],
cannam@126 1968 [AC_CHECK_LIB([dld], [shl_load],
cannam@126 1969 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
cannam@126 1970 [AC_CHECK_FUNC([dlopen],
cannam@126 1971 [lt_cv_dlopen=dlopen],
cannam@126 1972 [AC_CHECK_LIB([dl], [dlopen],
cannam@126 1973 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
cannam@126 1974 [AC_CHECK_LIB([svld], [dlopen],
cannam@126 1975 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
cannam@126 1976 [AC_CHECK_LIB([dld], [dld_link],
cannam@126 1977 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
cannam@126 1978 ])
cannam@126 1979 ])
cannam@126 1980 ])
cannam@126 1981 ])
cannam@126 1982 ])
cannam@126 1983 ;;
cannam@126 1984 esac
cannam@126 1985
cannam@126 1986 if test no = "$lt_cv_dlopen"; then
cannam@126 1987 enable_dlopen=no
cannam@126 1988 else
cannam@126 1989 enable_dlopen=yes
cannam@126 1990 fi
cannam@126 1991
cannam@126 1992 case $lt_cv_dlopen in
cannam@126 1993 dlopen)
cannam@126 1994 save_CPPFLAGS=$CPPFLAGS
cannam@126 1995 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
cannam@126 1996
cannam@126 1997 save_LDFLAGS=$LDFLAGS
cannam@126 1998 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
cannam@126 1999
cannam@126 2000 save_LIBS=$LIBS
cannam@126 2001 LIBS="$lt_cv_dlopen_libs $LIBS"
cannam@126 2002
cannam@126 2003 AC_CACHE_CHECK([whether a program can dlopen itself],
cannam@126 2004 lt_cv_dlopen_self, [dnl
cannam@126 2005 _LT_TRY_DLOPEN_SELF(
cannam@126 2006 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
cannam@126 2007 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
cannam@126 2008 ])
cannam@126 2009
cannam@126 2010 if test yes = "$lt_cv_dlopen_self"; then
cannam@126 2011 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
cannam@126 2012 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
cannam@126 2013 lt_cv_dlopen_self_static, [dnl
cannam@126 2014 _LT_TRY_DLOPEN_SELF(
cannam@126 2015 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
cannam@126 2016 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
cannam@126 2017 ])
cannam@126 2018 fi
cannam@126 2019
cannam@126 2020 CPPFLAGS=$save_CPPFLAGS
cannam@126 2021 LDFLAGS=$save_LDFLAGS
cannam@126 2022 LIBS=$save_LIBS
cannam@126 2023 ;;
cannam@126 2024 esac
cannam@126 2025
cannam@126 2026 case $lt_cv_dlopen_self in
cannam@126 2027 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
cannam@126 2028 *) enable_dlopen_self=unknown ;;
cannam@126 2029 esac
cannam@126 2030
cannam@126 2031 case $lt_cv_dlopen_self_static in
cannam@126 2032 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
cannam@126 2033 *) enable_dlopen_self_static=unknown ;;
cannam@126 2034 esac
cannam@126 2035 fi
cannam@126 2036 _LT_DECL([dlopen_support], [enable_dlopen], [0],
cannam@126 2037 [Whether dlopen is supported])
cannam@126 2038 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
cannam@126 2039 [Whether dlopen of programs is supported])
cannam@126 2040 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
cannam@126 2041 [Whether dlopen of statically linked programs is supported])
cannam@126 2042 ])# LT_SYS_DLOPEN_SELF
cannam@126 2043
cannam@126 2044 # Old name:
cannam@126 2045 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
cannam@126 2046 dnl aclocal-1.4 backwards compatibility:
cannam@126 2047 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
cannam@126 2048
cannam@126 2049
cannam@126 2050 # _LT_COMPILER_C_O([TAGNAME])
cannam@126 2051 # ---------------------------
cannam@126 2052 # Check to see if options -c and -o are simultaneously supported by compiler.
cannam@126 2053 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
cannam@126 2054 m4_defun([_LT_COMPILER_C_O],
cannam@126 2055 [m4_require([_LT_DECL_SED])dnl
cannam@126 2056 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@126 2057 m4_require([_LT_TAG_COMPILER])dnl
cannam@126 2058 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
cannam@126 2059 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
cannam@126 2060 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
cannam@126 2061 $RM -r conftest 2>/dev/null
cannam@126 2062 mkdir conftest
cannam@126 2063 cd conftest
cannam@126 2064 mkdir out
cannam@126 2065 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
cannam@126 2066
cannam@126 2067 lt_compiler_flag="-o out/conftest2.$ac_objext"
cannam@126 2068 # Insert the option either (1) after the last *FLAGS variable, or
cannam@126 2069 # (2) before a word containing "conftest.", or (3) at the end.
cannam@126 2070 # Note that $ac_compile itself does not contain backslashes and begins
cannam@126 2071 # with a dollar sign (not a hyphen), so the echo should work correctly.
cannam@126 2072 lt_compile=`echo "$ac_compile" | $SED \
cannam@126 2073 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
cannam@126 2074 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
cannam@126 2075 -e 's:$: $lt_compiler_flag:'`
cannam@126 2076 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
cannam@126 2077 (eval "$lt_compile" 2>out/conftest.err)
cannam@126 2078 ac_status=$?
cannam@126 2079 cat out/conftest.err >&AS_MESSAGE_LOG_FD
cannam@126 2080 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
cannam@126 2081 if (exit $ac_status) && test -s out/conftest2.$ac_objext
cannam@126 2082 then
cannam@126 2083 # The compiler can only warn and ignore the option if not recognized
cannam@126 2084 # So say no if there are warnings
cannam@126 2085 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
cannam@126 2086 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
cannam@126 2087 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
cannam@126 2088 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
cannam@126 2089 fi
cannam@126 2090 fi
cannam@126 2091 chmod u+w . 2>&AS_MESSAGE_LOG_FD
cannam@126 2092 $RM conftest*
cannam@126 2093 # SGI C++ compiler will create directory out/ii_files/ for
cannam@126 2094 # template instantiation
cannam@126 2095 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
cannam@126 2096 $RM out/* && rmdir out
cannam@126 2097 cd ..
cannam@126 2098 $RM -r conftest
cannam@126 2099 $RM conftest*
cannam@126 2100 ])
cannam@126 2101 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
cannam@126 2102 [Does compiler simultaneously support -c and -o options?])
cannam@126 2103 ])# _LT_COMPILER_C_O
cannam@126 2104
cannam@126 2105
cannam@126 2106 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
cannam@126 2107 # ----------------------------------
cannam@126 2108 # Check to see if we can do hard links to lock some files if needed
cannam@126 2109 m4_defun([_LT_COMPILER_FILE_LOCKS],
cannam@126 2110 [m4_require([_LT_ENABLE_LOCK])dnl
cannam@126 2111 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@126 2112 _LT_COMPILER_C_O([$1])
cannam@126 2113
cannam@126 2114 hard_links=nottested
cannam@126 2115 if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
cannam@126 2116 # do not overwrite the value of need_locks provided by the user
cannam@126 2117 AC_MSG_CHECKING([if we can lock with hard links])
cannam@126 2118 hard_links=yes
cannam@126 2119 $RM conftest*
cannam@126 2120 ln conftest.a conftest.b 2>/dev/null && hard_links=no
cannam@126 2121 touch conftest.a
cannam@126 2122 ln conftest.a conftest.b 2>&5 || hard_links=no
cannam@126 2123 ln conftest.a conftest.b 2>/dev/null && hard_links=no
cannam@126 2124 AC_MSG_RESULT([$hard_links])
cannam@126 2125 if test no = "$hard_links"; then
cannam@126 2126 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
cannam@126 2127 need_locks=warn
cannam@126 2128 fi
cannam@126 2129 else
cannam@126 2130 need_locks=no
cannam@126 2131 fi
cannam@126 2132 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
cannam@126 2133 ])# _LT_COMPILER_FILE_LOCKS
cannam@126 2134
cannam@126 2135
cannam@126 2136 # _LT_CHECK_OBJDIR
cannam@126 2137 # ----------------
cannam@126 2138 m4_defun([_LT_CHECK_OBJDIR],
cannam@126 2139 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
cannam@126 2140 [rm -f .libs 2>/dev/null
cannam@126 2141 mkdir .libs 2>/dev/null
cannam@126 2142 if test -d .libs; then
cannam@126 2143 lt_cv_objdir=.libs
cannam@126 2144 else
cannam@126 2145 # MS-DOS does not allow filenames that begin with a dot.
cannam@126 2146 lt_cv_objdir=_libs
cannam@126 2147 fi
cannam@126 2148 rmdir .libs 2>/dev/null])
cannam@126 2149 objdir=$lt_cv_objdir
cannam@126 2150 _LT_DECL([], [objdir], [0],
cannam@126 2151 [The name of the directory that contains temporary libtool files])dnl
cannam@126 2152 m4_pattern_allow([LT_OBJDIR])dnl
cannam@126 2153 AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
cannam@126 2154 [Define to the sub-directory where libtool stores uninstalled libraries.])
cannam@126 2155 ])# _LT_CHECK_OBJDIR
cannam@126 2156
cannam@126 2157
cannam@126 2158 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
cannam@126 2159 # --------------------------------------
cannam@126 2160 # Check hardcoding attributes.
cannam@126 2161 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
cannam@126 2162 [AC_MSG_CHECKING([how to hardcode library paths into programs])
cannam@126 2163 _LT_TAGVAR(hardcode_action, $1)=
cannam@126 2164 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
cannam@126 2165 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
cannam@126 2166 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
cannam@126 2167
cannam@126 2168 # We can hardcode non-existent directories.
cannam@126 2169 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
cannam@126 2170 # If the only mechanism to avoid hardcoding is shlibpath_var, we
cannam@126 2171 # have to relink, otherwise we might link with an installed library
cannam@126 2172 # when we should be linking with a yet-to-be-installed one
cannam@126 2173 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
cannam@126 2174 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
cannam@126 2175 # Linking always hardcodes the temporary library directory.
cannam@126 2176 _LT_TAGVAR(hardcode_action, $1)=relink
cannam@126 2177 else
cannam@126 2178 # We can link without hardcoding, and we can hardcode nonexisting dirs.
cannam@126 2179 _LT_TAGVAR(hardcode_action, $1)=immediate
cannam@126 2180 fi
cannam@126 2181 else
cannam@126 2182 # We cannot hardcode anything, or else we can only hardcode existing
cannam@126 2183 # directories.
cannam@126 2184 _LT_TAGVAR(hardcode_action, $1)=unsupported
cannam@126 2185 fi
cannam@126 2186 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
cannam@126 2187
cannam@126 2188 if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
cannam@126 2189 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
cannam@126 2190 # Fast installation is not supported
cannam@126 2191 enable_fast_install=no
cannam@126 2192 elif test yes = "$shlibpath_overrides_runpath" ||
cannam@126 2193 test no = "$enable_shared"; then
cannam@126 2194 # Fast installation is not necessary
cannam@126 2195 enable_fast_install=needless
cannam@126 2196 fi
cannam@126 2197 _LT_TAGDECL([], [hardcode_action], [0],
cannam@126 2198 [How to hardcode a shared library path into an executable])
cannam@126 2199 ])# _LT_LINKER_HARDCODE_LIBPATH
cannam@126 2200
cannam@126 2201
cannam@126 2202 # _LT_CMD_STRIPLIB
cannam@126 2203 # ----------------
cannam@126 2204 m4_defun([_LT_CMD_STRIPLIB],
cannam@126 2205 [m4_require([_LT_DECL_EGREP])
cannam@126 2206 striplib=
cannam@126 2207 old_striplib=
cannam@126 2208 AC_MSG_CHECKING([whether stripping libraries is possible])
cannam@126 2209 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
cannam@126 2210 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
cannam@126 2211 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
cannam@126 2212 AC_MSG_RESULT([yes])
cannam@126 2213 else
cannam@126 2214 # FIXME - insert some real tests, host_os isn't really good enough
cannam@126 2215 case $host_os in
cannam@126 2216 darwin*)
cannam@126 2217 if test -n "$STRIP"; then
cannam@126 2218 striplib="$STRIP -x"
cannam@126 2219 old_striplib="$STRIP -S"
cannam@126 2220 AC_MSG_RESULT([yes])
cannam@126 2221 else
cannam@126 2222 AC_MSG_RESULT([no])
cannam@126 2223 fi
cannam@126 2224 ;;
cannam@126 2225 *)
cannam@126 2226 AC_MSG_RESULT([no])
cannam@126 2227 ;;
cannam@126 2228 esac
cannam@126 2229 fi
cannam@126 2230 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
cannam@126 2231 _LT_DECL([], [striplib], [1])
cannam@126 2232 ])# _LT_CMD_STRIPLIB
cannam@126 2233
cannam@126 2234
cannam@126 2235 # _LT_PREPARE_MUNGE_PATH_LIST
cannam@126 2236 # ---------------------------
cannam@126 2237 # Make sure func_munge_path_list() is defined correctly.
cannam@126 2238 m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
cannam@126 2239 [[# func_munge_path_list VARIABLE PATH
cannam@126 2240 # -----------------------------------
cannam@126 2241 # VARIABLE is name of variable containing _space_ separated list of
cannam@126 2242 # directories to be munged by the contents of PATH, which is string
cannam@126 2243 # having a format:
cannam@126 2244 # "DIR[:DIR]:"
cannam@126 2245 # string "DIR[ DIR]" will be prepended to VARIABLE
cannam@126 2246 # ":DIR[:DIR]"
cannam@126 2247 # string "DIR[ DIR]" will be appended to VARIABLE
cannam@126 2248 # "DIRP[:DIRP]::[DIRA:]DIRA"
cannam@126 2249 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
cannam@126 2250 # "DIRA[ DIRA]" will be appended to VARIABLE
cannam@126 2251 # "DIR[:DIR]"
cannam@126 2252 # VARIABLE will be replaced by "DIR[ DIR]"
cannam@126 2253 func_munge_path_list ()
cannam@126 2254 {
cannam@126 2255 case x@S|@2 in
cannam@126 2256 x)
cannam@126 2257 ;;
cannam@126 2258 *:)
cannam@126 2259 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
cannam@126 2260 ;;
cannam@126 2261 x:*)
cannam@126 2262 eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
cannam@126 2263 ;;
cannam@126 2264 *::*)
cannam@126 2265 eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
cannam@126 2266 eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
cannam@126 2267 ;;
cannam@126 2268 *)
cannam@126 2269 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
cannam@126 2270 ;;
cannam@126 2271 esac
cannam@126 2272 }
cannam@126 2273 ]])# _LT_PREPARE_PATH_LIST
cannam@126 2274
cannam@126 2275
cannam@126 2276 # _LT_SYS_DYNAMIC_LINKER([TAG])
cannam@126 2277 # -----------------------------
cannam@126 2278 # PORTME Fill in your ld.so characteristics
cannam@126 2279 m4_defun([_LT_SYS_DYNAMIC_LINKER],
cannam@126 2280 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
cannam@126 2281 m4_require([_LT_DECL_EGREP])dnl
cannam@126 2282 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@126 2283 m4_require([_LT_DECL_OBJDUMP])dnl
cannam@126 2284 m4_require([_LT_DECL_SED])dnl
cannam@126 2285 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
cannam@126 2286 m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
cannam@126 2287 AC_MSG_CHECKING([dynamic linker characteristics])
cannam@126 2288 m4_if([$1],
cannam@126 2289 [], [
cannam@126 2290 if test yes = "$GCC"; then
cannam@126 2291 case $host_os in
cannam@126 2292 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
cannam@126 2293 *) lt_awk_arg='/^libraries:/' ;;
cannam@126 2294 esac
cannam@126 2295 case $host_os in
cannam@126 2296 mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
cannam@126 2297 *) lt_sed_strip_eq='s|=/|/|g' ;;
cannam@126 2298 esac
cannam@126 2299 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
cannam@126 2300 case $lt_search_path_spec in
cannam@126 2301 *\;*)
cannam@126 2302 # if the path contains ";" then we assume it to be the separator
cannam@126 2303 # otherwise default to the standard path separator (i.e. ":") - it is
cannam@126 2304 # assumed that no part of a normal pathname contains ";" but that should
cannam@126 2305 # okay in the real world where ";" in dirpaths is itself problematic.
cannam@126 2306 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
cannam@126 2307 ;;
cannam@126 2308 *)
cannam@126 2309 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
cannam@126 2310 ;;
cannam@126 2311 esac
cannam@126 2312 # Ok, now we have the path, separated by spaces, we can step through it
cannam@126 2313 # and add multilib dir if necessary...
cannam@126 2314 lt_tmp_lt_search_path_spec=
cannam@126 2315 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
cannam@126 2316 # ...but if some path component already ends with the multilib dir we assume
cannam@126 2317 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
cannam@126 2318 case "$lt_multi_os_dir; $lt_search_path_spec " in
cannam@126 2319 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
cannam@126 2320 lt_multi_os_dir=
cannam@126 2321 ;;
cannam@126 2322 esac
cannam@126 2323 for lt_sys_path in $lt_search_path_spec; do
cannam@126 2324 if test -d "$lt_sys_path$lt_multi_os_dir"; then
cannam@126 2325 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
cannam@126 2326 elif test -n "$lt_multi_os_dir"; then
cannam@126 2327 test -d "$lt_sys_path" && \
cannam@126 2328 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
cannam@126 2329 fi
cannam@126 2330 done
cannam@126 2331 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
cannam@126 2332 BEGIN {RS = " "; FS = "/|\n";} {
cannam@126 2333 lt_foo = "";
cannam@126 2334 lt_count = 0;
cannam@126 2335 for (lt_i = NF; lt_i > 0; lt_i--) {
cannam@126 2336 if ($lt_i != "" && $lt_i != ".") {
cannam@126 2337 if ($lt_i == "..") {
cannam@126 2338 lt_count++;
cannam@126 2339 } else {
cannam@126 2340 if (lt_count == 0) {
cannam@126 2341 lt_foo = "/" $lt_i lt_foo;
cannam@126 2342 } else {
cannam@126 2343 lt_count--;
cannam@126 2344 }
cannam@126 2345 }
cannam@126 2346 }
cannam@126 2347 }
cannam@126 2348 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
cannam@126 2349 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
cannam@126 2350 }'`
cannam@126 2351 # AWK program above erroneously prepends '/' to C:/dos/paths
cannam@126 2352 # for these hosts.
cannam@126 2353 case $host_os in
cannam@126 2354 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
cannam@126 2355 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
cannam@126 2356 esac
cannam@126 2357 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
cannam@126 2358 else
cannam@126 2359 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
cannam@126 2360 fi])
cannam@126 2361 library_names_spec=
cannam@126 2362 libname_spec='lib$name'
cannam@126 2363 soname_spec=
cannam@126 2364 shrext_cmds=.so
cannam@126 2365 postinstall_cmds=
cannam@126 2366 postuninstall_cmds=
cannam@126 2367 finish_cmds=
cannam@126 2368 finish_eval=
cannam@126 2369 shlibpath_var=
cannam@126 2370 shlibpath_overrides_runpath=unknown
cannam@126 2371 version_type=none
cannam@126 2372 dynamic_linker="$host_os ld.so"
cannam@126 2373 sys_lib_dlsearch_path_spec="/lib /usr/lib"
cannam@126 2374 need_lib_prefix=unknown
cannam@126 2375 hardcode_into_libs=no
cannam@126 2376
cannam@126 2377 # when you set need_version to no, make sure it does not cause -set_version
cannam@126 2378 # flags to be left without arguments
cannam@126 2379 need_version=unknown
cannam@126 2380
cannam@126 2381 AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
cannam@126 2382 [User-defined run-time library search path.])
cannam@126 2383
cannam@126 2384 case $host_os in
cannam@126 2385 aix3*)
cannam@126 2386 version_type=linux # correct to gnu/linux during the next big refactor
cannam@126 2387 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
cannam@126 2388 shlibpath_var=LIBPATH
cannam@126 2389
cannam@126 2390 # AIX 3 has no versioning support, so we append a major version to the name.
cannam@126 2391 soname_spec='$libname$release$shared_ext$major'
cannam@126 2392 ;;
cannam@126 2393
cannam@126 2394 aix[[4-9]]*)
cannam@126 2395 version_type=linux # correct to gnu/linux during the next big refactor
cannam@126 2396 need_lib_prefix=no
cannam@126 2397 need_version=no
cannam@126 2398 hardcode_into_libs=yes
cannam@126 2399 if test ia64 = "$host_cpu"; then
cannam@126 2400 # AIX 5 supports IA64
cannam@126 2401 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
cannam@126 2402 shlibpath_var=LD_LIBRARY_PATH
cannam@126 2403 else
cannam@126 2404 # With GCC up to 2.95.x, collect2 would create an import file
cannam@126 2405 # for dependence libraries. The import file would start with
cannam@126 2406 # the line '#! .'. This would cause the generated library to
cannam@126 2407 # depend on '.', always an invalid library. This was fixed in
cannam@126 2408 # development snapshots of GCC prior to 3.0.
cannam@126 2409 case $host_os in
cannam@126 2410 aix4 | aix4.[[01]] | aix4.[[01]].*)
cannam@126 2411 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
cannam@126 2412 echo ' yes '
cannam@126 2413 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
cannam@126 2414 :
cannam@126 2415 else
cannam@126 2416 can_build_shared=no
cannam@126 2417 fi
cannam@126 2418 ;;
cannam@126 2419 esac
cannam@126 2420 # Using Import Files as archive members, it is possible to support
cannam@126 2421 # filename-based versioning of shared library archives on AIX. While
cannam@126 2422 # this would work for both with and without runtime linking, it will
cannam@126 2423 # prevent static linking of such archives. So we do filename-based
cannam@126 2424 # shared library versioning with .so extension only, which is used
cannam@126 2425 # when both runtime linking and shared linking is enabled.
cannam@126 2426 # Unfortunately, runtime linking may impact performance, so we do
cannam@126 2427 # not want this to be the default eventually. Also, we use the
cannam@126 2428 # versioned .so libs for executables only if there is the -brtl
cannam@126 2429 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
cannam@126 2430 # To allow for filename-based versioning support, we need to create
cannam@126 2431 # libNAME.so.V as an archive file, containing:
cannam@126 2432 # *) an Import File, referring to the versioned filename of the
cannam@126 2433 # archive as well as the shared archive member, telling the
cannam@126 2434 # bitwidth (32 or 64) of that shared object, and providing the
cannam@126 2435 # list of exported symbols of that shared object, eventually
cannam@126 2436 # decorated with the 'weak' keyword
cannam@126 2437 # *) the shared object with the F_LOADONLY flag set, to really avoid
cannam@126 2438 # it being seen by the linker.
cannam@126 2439 # At run time we better use the real file rather than another symlink,
cannam@126 2440 # but for link time we create the symlink libNAME.so -> libNAME.so.V
cannam@126 2441
cannam@126 2442 case $with_aix_soname,$aix_use_runtimelinking in
cannam@126 2443 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
cannam@126 2444 # soname into executable. Probably we can add versioning support to
cannam@126 2445 # collect2, so additional links can be useful in future.
cannam@126 2446 aix,yes) # traditional libtool
cannam@126 2447 dynamic_linker='AIX unversionable lib.so'
cannam@126 2448 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
cannam@126 2449 # instead of lib<name>.a to let people know that these are not
cannam@126 2450 # typical AIX shared libraries.
cannam@126 2451 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@126 2452 ;;
cannam@126 2453 aix,no) # traditional AIX only
cannam@126 2454 dynamic_linker='AIX lib.a[(]lib.so.V[)]'
cannam@126 2455 # We preserve .a as extension for shared libraries through AIX4.2
cannam@126 2456 # and later when we are not doing run time linking.
cannam@126 2457 library_names_spec='$libname$release.a $libname.a'
cannam@126 2458 soname_spec='$libname$release$shared_ext$major'
cannam@126 2459 ;;
cannam@126 2460 svr4,*) # full svr4 only
cannam@126 2461 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
cannam@126 2462 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
cannam@126 2463 # We do not specify a path in Import Files, so LIBPATH fires.
cannam@126 2464 shlibpath_overrides_runpath=yes
cannam@126 2465 ;;
cannam@126 2466 *,yes) # both, prefer svr4
cannam@126 2467 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
cannam@126 2468 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
cannam@126 2469 # unpreferred sharedlib libNAME.a needs extra handling
cannam@126 2470 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
cannam@126 2471 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
cannam@126 2472 # We do not specify a path in Import Files, so LIBPATH fires.
cannam@126 2473 shlibpath_overrides_runpath=yes
cannam@126 2474 ;;
cannam@126 2475 *,no) # both, prefer aix
cannam@126 2476 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
cannam@126 2477 library_names_spec='$libname$release.a $libname.a'
cannam@126 2478 soname_spec='$libname$release$shared_ext$major'
cannam@126 2479 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
cannam@126 2480 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
cannam@126 2481 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
cannam@126 2482 ;;
cannam@126 2483 esac
cannam@126 2484 shlibpath_var=LIBPATH
cannam@126 2485 fi
cannam@126 2486 ;;
cannam@126 2487
cannam@126 2488 amigaos*)
cannam@126 2489 case $host_cpu in
cannam@126 2490 powerpc)
cannam@126 2491 # Since July 2007 AmigaOS4 officially supports .so libraries.
cannam@126 2492 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
cannam@126 2493 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@126 2494 ;;
cannam@126 2495 m68k)
cannam@126 2496 library_names_spec='$libname.ixlibrary $libname.a'
cannam@126 2497 # Create ${libname}_ixlibrary.a entries in /sys/libs.
cannam@126 2498 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
cannam@126 2499 ;;
cannam@126 2500 esac
cannam@126 2501 ;;
cannam@126 2502
cannam@126 2503 beos*)
cannam@126 2504 library_names_spec='$libname$shared_ext'
cannam@126 2505 dynamic_linker="$host_os ld.so"
cannam@126 2506 shlibpath_var=LIBRARY_PATH
cannam@126 2507 ;;
cannam@126 2508
cannam@126 2509 bsdi[[45]]*)
cannam@126 2510 version_type=linux # correct to gnu/linux during the next big refactor
cannam@126 2511 need_version=no
cannam@126 2512 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@126 2513 soname_spec='$libname$release$shared_ext$major'
cannam@126 2514 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
cannam@126 2515 shlibpath_var=LD_LIBRARY_PATH
cannam@126 2516 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
cannam@126 2517 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
cannam@126 2518 # the default ld.so.conf also contains /usr/contrib/lib and
cannam@126 2519 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
cannam@126 2520 # libtool to hard-code these into programs
cannam@126 2521 ;;
cannam@126 2522
cannam@126 2523 cygwin* | mingw* | pw32* | cegcc*)
cannam@126 2524 version_type=windows
cannam@126 2525 shrext_cmds=.dll
cannam@126 2526 need_version=no
cannam@126 2527 need_lib_prefix=no
cannam@126 2528
cannam@126 2529 case $GCC,$cc_basename in
cannam@126 2530 yes,*)
cannam@126 2531 # gcc
cannam@126 2532 library_names_spec='$libname.dll.a'
cannam@126 2533 # DLL is installed to $(libdir)/../bin by postinstall_cmds
cannam@126 2534 postinstall_cmds='base_file=`basename \$file`~
cannam@126 2535 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
cannam@126 2536 dldir=$destdir/`dirname \$dlpath`~
cannam@126 2537 test -d \$dldir || mkdir -p \$dldir~
cannam@126 2538 $install_prog $dir/$dlname \$dldir/$dlname~
cannam@126 2539 chmod a+x \$dldir/$dlname~
cannam@126 2540 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
cannam@126 2541 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
cannam@126 2542 fi'
cannam@126 2543 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
cannam@126 2544 dlpath=$dir/\$dldll~
cannam@126 2545 $RM \$dlpath'
cannam@126 2546 shlibpath_overrides_runpath=yes
cannam@126 2547
cannam@126 2548 case $host_os in
cannam@126 2549 cygwin*)
cannam@126 2550 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
cannam@126 2551 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
cannam@126 2552 m4_if([$1], [],[
cannam@126 2553 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
cannam@126 2554 ;;
cannam@126 2555 mingw* | cegcc*)
cannam@126 2556 # MinGW DLLs use traditional 'lib' prefix
cannam@126 2557 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
cannam@126 2558 ;;
cannam@126 2559 pw32*)
cannam@126 2560 # pw32 DLLs use 'pw' prefix rather than 'lib'
cannam@126 2561 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
cannam@126 2562 ;;
cannam@126 2563 esac
cannam@126 2564 dynamic_linker='Win32 ld.exe'
cannam@126 2565 ;;
cannam@126 2566
cannam@126 2567 *,cl*)
cannam@126 2568 # Native MSVC
cannam@126 2569 libname_spec='$name'
cannam@126 2570 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
cannam@126 2571 library_names_spec='$libname.dll.lib'
cannam@126 2572
cannam@126 2573 case $build_os in
cannam@126 2574 mingw*)
cannam@126 2575 sys_lib_search_path_spec=
cannam@126 2576 lt_save_ifs=$IFS
cannam@126 2577 IFS=';'
cannam@126 2578 for lt_path in $LIB
cannam@126 2579 do
cannam@126 2580 IFS=$lt_save_ifs
cannam@126 2581 # Let DOS variable expansion print the short 8.3 style file name.
cannam@126 2582 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
cannam@126 2583 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
cannam@126 2584 done
cannam@126 2585 IFS=$lt_save_ifs
cannam@126 2586 # Convert to MSYS style.
cannam@126 2587 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
cannam@126 2588 ;;
cannam@126 2589 cygwin*)
cannam@126 2590 # Convert to unix form, then to dos form, then back to unix form
cannam@126 2591 # but this time dos style (no spaces!) so that the unix form looks
cannam@126 2592 # like /cygdrive/c/PROGRA~1:/cygdr...
cannam@126 2593 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
cannam@126 2594 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
cannam@126 2595 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
cannam@126 2596 ;;
cannam@126 2597 *)
cannam@126 2598 sys_lib_search_path_spec=$LIB
cannam@126 2599 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
cannam@126 2600 # It is most probably a Windows format PATH.
cannam@126 2601 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
cannam@126 2602 else
cannam@126 2603 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
cannam@126 2604 fi
cannam@126 2605 # FIXME: find the short name or the path components, as spaces are
cannam@126 2606 # common. (e.g. "Program Files" -> "PROGRA~1")
cannam@126 2607 ;;
cannam@126 2608 esac
cannam@126 2609
cannam@126 2610 # DLL is installed to $(libdir)/../bin by postinstall_cmds
cannam@126 2611 postinstall_cmds='base_file=`basename \$file`~
cannam@126 2612 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
cannam@126 2613 dldir=$destdir/`dirname \$dlpath`~
cannam@126 2614 test -d \$dldir || mkdir -p \$dldir~
cannam@126 2615 $install_prog $dir/$dlname \$dldir/$dlname'
cannam@126 2616 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
cannam@126 2617 dlpath=$dir/\$dldll~
cannam@126 2618 $RM \$dlpath'
cannam@126 2619 shlibpath_overrides_runpath=yes
cannam@126 2620 dynamic_linker='Win32 link.exe'
cannam@126 2621 ;;
cannam@126 2622
cannam@126 2623 *)
cannam@126 2624 # Assume MSVC wrapper
cannam@126 2625 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
cannam@126 2626 dynamic_linker='Win32 ld.exe'
cannam@126 2627 ;;
cannam@126 2628 esac
cannam@126 2629 # FIXME: first we should search . and the directory the executable is in
cannam@126 2630 shlibpath_var=PATH
cannam@126 2631 ;;
cannam@126 2632
cannam@126 2633 darwin* | rhapsody*)
cannam@126 2634 dynamic_linker="$host_os dyld"
cannam@126 2635 version_type=darwin
cannam@126 2636 need_lib_prefix=no
cannam@126 2637 need_version=no
cannam@126 2638 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
cannam@126 2639 soname_spec='$libname$release$major$shared_ext'
cannam@126 2640 shlibpath_overrides_runpath=yes
cannam@126 2641 shlibpath_var=DYLD_LIBRARY_PATH
cannam@126 2642 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
cannam@126 2643 m4_if([$1], [],[
cannam@126 2644 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
cannam@126 2645 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
cannam@126 2646 ;;
cannam@126 2647
cannam@126 2648 dgux*)
cannam@126 2649 version_type=linux # correct to gnu/linux during the next big refactor
cannam@126 2650 need_lib_prefix=no
cannam@126 2651 need_version=no
cannam@126 2652 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@126 2653 soname_spec='$libname$release$shared_ext$major'
cannam@126 2654 shlibpath_var=LD_LIBRARY_PATH
cannam@126 2655 ;;
cannam@126 2656
cannam@126 2657 freebsd* | dragonfly*)
cannam@126 2658 # DragonFly does not have aout. When/if they implement a new
cannam@126 2659 # versioning mechanism, adjust this.
cannam@126 2660 if test -x /usr/bin/objformat; then
cannam@126 2661 objformat=`/usr/bin/objformat`
cannam@126 2662 else
cannam@126 2663 case $host_os in
cannam@126 2664 freebsd[[23]].*) objformat=aout ;;
cannam@126 2665 *) objformat=elf ;;
cannam@126 2666 esac
cannam@126 2667 fi
cannam@126 2668 version_type=freebsd-$objformat
cannam@126 2669 case $version_type in
cannam@126 2670 freebsd-elf*)
cannam@126 2671 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@126 2672 soname_spec='$libname$release$shared_ext$major'
cannam@126 2673 need_version=no
cannam@126 2674 need_lib_prefix=no
cannam@126 2675 ;;
cannam@126 2676 freebsd-*)
cannam@126 2677 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
cannam@126 2678 need_version=yes
cannam@126 2679 ;;
cannam@126 2680 esac
cannam@126 2681 shlibpath_var=LD_LIBRARY_PATH
cannam@126 2682 case $host_os in
cannam@126 2683 freebsd2.*)
cannam@126 2684 shlibpath_overrides_runpath=yes
cannam@126 2685 ;;
cannam@126 2686 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
cannam@126 2687 shlibpath_overrides_runpath=yes
cannam@126 2688 hardcode_into_libs=yes
cannam@126 2689 ;;
cannam@126 2690 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
cannam@126 2691 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
cannam@126 2692 shlibpath_overrides_runpath=no
cannam@126 2693 hardcode_into_libs=yes
cannam@126 2694 ;;
cannam@126 2695 *) # from 4.6 on, and DragonFly
cannam@126 2696 shlibpath_overrides_runpath=yes
cannam@126 2697 hardcode_into_libs=yes
cannam@126 2698 ;;
cannam@126 2699 esac
cannam@126 2700 ;;
cannam@126 2701
cannam@126 2702 haiku*)
cannam@126 2703 version_type=linux # correct to gnu/linux during the next big refactor
cannam@126 2704 need_lib_prefix=no
cannam@126 2705 need_version=no
cannam@126 2706 dynamic_linker="$host_os runtime_loader"
cannam@126 2707 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@126 2708 soname_spec='$libname$release$shared_ext$major'
cannam@126 2709 shlibpath_var=LIBRARY_PATH
cannam@126 2710 shlibpath_overrides_runpath=no
cannam@126 2711 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
cannam@126 2712 hardcode_into_libs=yes
cannam@126 2713 ;;
cannam@126 2714
cannam@126 2715 hpux9* | hpux10* | hpux11*)
cannam@126 2716 # Give a soname corresponding to the major version so that dld.sl refuses to
cannam@126 2717 # link against other versions.
cannam@126 2718 version_type=sunos
cannam@126 2719 need_lib_prefix=no
cannam@126 2720 need_version=no
cannam@126 2721 case $host_cpu in
cannam@126 2722 ia64*)
cannam@126 2723 shrext_cmds='.so'
cannam@126 2724 hardcode_into_libs=yes
cannam@126 2725 dynamic_linker="$host_os dld.so"
cannam@126 2726 shlibpath_var=LD_LIBRARY_PATH
cannam@126 2727 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
cannam@126 2728 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@126 2729 soname_spec='$libname$release$shared_ext$major'
cannam@126 2730 if test 32 = "$HPUX_IA64_MODE"; then
cannam@126 2731 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
cannam@126 2732 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
cannam@126 2733 else
cannam@126 2734 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
cannam@126 2735 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
cannam@126 2736 fi
cannam@126 2737 ;;
cannam@126 2738 hppa*64*)
cannam@126 2739 shrext_cmds='.sl'
cannam@126 2740 hardcode_into_libs=yes
cannam@126 2741 dynamic_linker="$host_os dld.sl"
cannam@126 2742 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
cannam@126 2743 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
cannam@126 2744 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@126 2745 soname_spec='$libname$release$shared_ext$major'
cannam@126 2746 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
cannam@126 2747 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
cannam@126 2748 ;;
cannam@126 2749 *)
cannam@126 2750 shrext_cmds='.sl'
cannam@126 2751 dynamic_linker="$host_os dld.sl"
cannam@126 2752 shlibpath_var=SHLIB_PATH
cannam@126 2753 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
cannam@126 2754 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@126 2755 soname_spec='$libname$release$shared_ext$major'
cannam@126 2756 ;;
cannam@126 2757 esac
cannam@126 2758 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
cannam@126 2759 postinstall_cmds='chmod 555 $lib'
cannam@126 2760 # or fails outright, so override atomically:
cannam@126 2761 install_override_mode=555
cannam@126 2762 ;;
cannam@126 2763
cannam@126 2764 interix[[3-9]]*)
cannam@126 2765 version_type=linux # correct to gnu/linux during the next big refactor
cannam@126 2766 need_lib_prefix=no
cannam@126 2767 need_version=no
cannam@126 2768 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@126 2769 soname_spec='$libname$release$shared_ext$major'
cannam@126 2770 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
cannam@126 2771 shlibpath_var=LD_LIBRARY_PATH
cannam@126 2772 shlibpath_overrides_runpath=no
cannam@126 2773 hardcode_into_libs=yes
cannam@126 2774 ;;
cannam@126 2775
cannam@126 2776 irix5* | irix6* | nonstopux*)
cannam@126 2777 case $host_os in
cannam@126 2778 nonstopux*) version_type=nonstopux ;;
cannam@126 2779 *)
cannam@126 2780 if test yes = "$lt_cv_prog_gnu_ld"; then
cannam@126 2781 version_type=linux # correct to gnu/linux during the next big refactor
cannam@126 2782 else
cannam@126 2783 version_type=irix
cannam@126 2784 fi ;;
cannam@126 2785 esac
cannam@126 2786 need_lib_prefix=no
cannam@126 2787 need_version=no
cannam@126 2788 soname_spec='$libname$release$shared_ext$major'
cannam@126 2789 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
cannam@126 2790 case $host_os in
cannam@126 2791 irix5* | nonstopux*)
cannam@126 2792 libsuff= shlibsuff=
cannam@126 2793 ;;
cannam@126 2794 *)
cannam@126 2795 case $LD in # libtool.m4 will add one of these switches to LD
cannam@126 2796 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
cannam@126 2797 libsuff= shlibsuff= libmagic=32-bit;;
cannam@126 2798 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
cannam@126 2799 libsuff=32 shlibsuff=N32 libmagic=N32;;
cannam@126 2800 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
cannam@126 2801 libsuff=64 shlibsuff=64 libmagic=64-bit;;
cannam@126 2802 *) libsuff= shlibsuff= libmagic=never-match;;
cannam@126 2803 esac
cannam@126 2804 ;;
cannam@126 2805 esac
cannam@126 2806 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
cannam@126 2807 shlibpath_overrides_runpath=no
cannam@126 2808 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
cannam@126 2809 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
cannam@126 2810 hardcode_into_libs=yes
cannam@126 2811 ;;
cannam@126 2812
cannam@126 2813 # No shared lib support for Linux oldld, aout, or coff.
cannam@126 2814 linux*oldld* | linux*aout* | linux*coff*)
cannam@126 2815 dynamic_linker=no
cannam@126 2816 ;;
cannam@126 2817
cannam@126 2818 linux*android*)
cannam@126 2819 version_type=none # Android doesn't support versioned libraries.
cannam@126 2820 need_lib_prefix=no
cannam@126 2821 need_version=no
cannam@126 2822 library_names_spec='$libname$release$shared_ext'
cannam@126 2823 soname_spec='$libname$release$shared_ext'
cannam@126 2824 finish_cmds=
cannam@126 2825 shlibpath_var=LD_LIBRARY_PATH
cannam@126 2826 shlibpath_overrides_runpath=yes
cannam@126 2827
cannam@126 2828 # This implies no fast_install, which is unacceptable.
cannam@126 2829 # Some rework will be needed to allow for fast_install
cannam@126 2830 # before this can be enabled.
cannam@126 2831 hardcode_into_libs=yes
cannam@126 2832
cannam@126 2833 dynamic_linker='Android linker'
cannam@126 2834 # Don't embed -rpath directories since the linker doesn't support them.
cannam@126 2835 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@126 2836 ;;
cannam@126 2837
cannam@126 2838 # This must be glibc/ELF.
cannam@126 2839 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
cannam@126 2840 version_type=linux # correct to gnu/linux during the next big refactor
cannam@126 2841 need_lib_prefix=no
cannam@126 2842 need_version=no
cannam@126 2843 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@126 2844 soname_spec='$libname$release$shared_ext$major'
cannam@126 2845 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
cannam@126 2846 shlibpath_var=LD_LIBRARY_PATH
cannam@126 2847 shlibpath_overrides_runpath=no
cannam@126 2848
cannam@126 2849 # Some binutils ld are patched to set DT_RUNPATH
cannam@126 2850 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
cannam@126 2851 [lt_cv_shlibpath_overrides_runpath=no
cannam@126 2852 save_LDFLAGS=$LDFLAGS
cannam@126 2853 save_libdir=$libdir
cannam@126 2854 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
cannam@126 2855 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
cannam@126 2856 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
cannam@126 2857 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
cannam@126 2858 [lt_cv_shlibpath_overrides_runpath=yes])])
cannam@126 2859 LDFLAGS=$save_LDFLAGS
cannam@126 2860 libdir=$save_libdir
cannam@126 2861 ])
cannam@126 2862 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
cannam@126 2863
cannam@126 2864 # This implies no fast_install, which is unacceptable.
cannam@126 2865 # Some rework will be needed to allow for fast_install
cannam@126 2866 # before this can be enabled.
cannam@126 2867 hardcode_into_libs=yes
cannam@126 2868
cannam@126 2869 # Ideally, we could use ldconfig to report *all* directores which are
cannam@126 2870 # searched for libraries, however this is still not possible. Aside from not
cannam@126 2871 # being certain /sbin/ldconfig is available, command
cannam@126 2872 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
cannam@126 2873 # even though it is searched at run-time. Try to do the best guess by
cannam@126 2874 # appending ld.so.conf contents (and includes) to the search path.
cannam@126 2875 if test -f /etc/ld.so.conf; then
cannam@126 2876 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
cannam@126 2877 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
cannam@126 2878 fi
cannam@126 2879
cannam@126 2880 # We used to test for /lib/ld.so.1 and disable shared libraries on
cannam@126 2881 # powerpc, because MkLinux only supported shared libraries with the
cannam@126 2882 # GNU dynamic linker. Since this was broken with cross compilers,
cannam@126 2883 # most powerpc-linux boxes support dynamic linking these days and
cannam@126 2884 # people can always --disable-shared, the test was removed, and we
cannam@126 2885 # assume the GNU/Linux dynamic linker is in use.
cannam@126 2886 dynamic_linker='GNU/Linux ld.so'
cannam@126 2887 ;;
cannam@126 2888
cannam@126 2889 netbsdelf*-gnu)
cannam@126 2890 version_type=linux
cannam@126 2891 need_lib_prefix=no
cannam@126 2892 need_version=no
cannam@126 2893 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
cannam@126 2894 soname_spec='${libname}${release}${shared_ext}$major'
cannam@126 2895 shlibpath_var=LD_LIBRARY_PATH
cannam@126 2896 shlibpath_overrides_runpath=no
cannam@126 2897 hardcode_into_libs=yes
cannam@126 2898 dynamic_linker='NetBSD ld.elf_so'
cannam@126 2899 ;;
cannam@126 2900
cannam@126 2901 netbsd*)
cannam@126 2902 version_type=sunos
cannam@126 2903 need_lib_prefix=no
cannam@126 2904 need_version=no
cannam@126 2905 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
cannam@126 2906 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
cannam@126 2907 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
cannam@126 2908 dynamic_linker='NetBSD (a.out) ld.so'
cannam@126 2909 else
cannam@126 2910 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@126 2911 soname_spec='$libname$release$shared_ext$major'
cannam@126 2912 dynamic_linker='NetBSD ld.elf_so'
cannam@126 2913 fi
cannam@126 2914 shlibpath_var=LD_LIBRARY_PATH
cannam@126 2915 shlibpath_overrides_runpath=yes
cannam@126 2916 hardcode_into_libs=yes
cannam@126 2917 ;;
cannam@126 2918
cannam@126 2919 newsos6)
cannam@126 2920 version_type=linux # correct to gnu/linux during the next big refactor
cannam@126 2921 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@126 2922 shlibpath_var=LD_LIBRARY_PATH
cannam@126 2923 shlibpath_overrides_runpath=yes
cannam@126 2924 ;;
cannam@126 2925
cannam@126 2926 *nto* | *qnx*)
cannam@126 2927 version_type=qnx
cannam@126 2928 need_lib_prefix=no
cannam@126 2929 need_version=no
cannam@126 2930 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@126 2931 soname_spec='$libname$release$shared_ext$major'
cannam@126 2932 shlibpath_var=LD_LIBRARY_PATH
cannam@126 2933 shlibpath_overrides_runpath=no
cannam@126 2934 hardcode_into_libs=yes
cannam@126 2935 dynamic_linker='ldqnx.so'
cannam@126 2936 ;;
cannam@126 2937
cannam@126 2938 openbsd* | bitrig*)
cannam@126 2939 version_type=sunos
cannam@126 2940 sys_lib_dlsearch_path_spec=/usr/lib
cannam@126 2941 need_lib_prefix=no
cannam@126 2942 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
cannam@126 2943 need_version=no
cannam@126 2944 else
cannam@126 2945 need_version=yes
cannam@126 2946 fi
cannam@126 2947 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
cannam@126 2948 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
cannam@126 2949 shlibpath_var=LD_LIBRARY_PATH
cannam@126 2950 shlibpath_overrides_runpath=yes
cannam@126 2951 ;;
cannam@126 2952
cannam@126 2953 os2*)
cannam@126 2954 libname_spec='$name'
cannam@126 2955 version_type=windows
cannam@126 2956 shrext_cmds=.dll
cannam@126 2957 need_version=no
cannam@126 2958 need_lib_prefix=no
cannam@126 2959 # OS/2 can only load a DLL with a base name of 8 characters or less.
cannam@126 2960 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
cannam@126 2961 v=$($ECHO $release$versuffix | tr -d .-);
cannam@126 2962 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
cannam@126 2963 $ECHO $n$v`$shared_ext'
cannam@126 2964 library_names_spec='${libname}_dll.$libext'
cannam@126 2965 dynamic_linker='OS/2 ld.exe'
cannam@126 2966 shlibpath_var=BEGINLIBPATH
cannam@126 2967 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
cannam@126 2968 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
cannam@126 2969 postinstall_cmds='base_file=`basename \$file`~
cannam@126 2970 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
cannam@126 2971 dldir=$destdir/`dirname \$dlpath`~
cannam@126 2972 test -d \$dldir || mkdir -p \$dldir~
cannam@126 2973 $install_prog $dir/$dlname \$dldir/$dlname~
cannam@126 2974 chmod a+x \$dldir/$dlname~
cannam@126 2975 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
cannam@126 2976 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
cannam@126 2977 fi'
cannam@126 2978 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
cannam@126 2979 dlpath=$dir/\$dldll~
cannam@126 2980 $RM \$dlpath'
cannam@126 2981 ;;
cannam@126 2982
cannam@126 2983 osf3* | osf4* | osf5*)
cannam@126 2984 version_type=osf
cannam@126 2985 need_lib_prefix=no
cannam@126 2986 need_version=no
cannam@126 2987 soname_spec='$libname$release$shared_ext$major'
cannam@126 2988 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@126 2989 shlibpath_var=LD_LIBRARY_PATH
cannam@126 2990 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
cannam@126 2991 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
cannam@126 2992 ;;
cannam@126 2993
cannam@126 2994 rdos*)
cannam@126 2995 dynamic_linker=no
cannam@126 2996 ;;
cannam@126 2997
cannam@126 2998 solaris*)
cannam@126 2999 version_type=linux # correct to gnu/linux during the next big refactor
cannam@126 3000 need_lib_prefix=no
cannam@126 3001 need_version=no
cannam@126 3002 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@126 3003 soname_spec='$libname$release$shared_ext$major'
cannam@126 3004 shlibpath_var=LD_LIBRARY_PATH
cannam@126 3005 shlibpath_overrides_runpath=yes
cannam@126 3006 hardcode_into_libs=yes
cannam@126 3007 # ldd complains unless libraries are executable
cannam@126 3008 postinstall_cmds='chmod +x $lib'
cannam@126 3009 ;;
cannam@126 3010
cannam@126 3011 sunos4*)
cannam@126 3012 version_type=sunos
cannam@126 3013 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
cannam@126 3014 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
cannam@126 3015 shlibpath_var=LD_LIBRARY_PATH
cannam@126 3016 shlibpath_overrides_runpath=yes
cannam@126 3017 if test yes = "$with_gnu_ld"; then
cannam@126 3018 need_lib_prefix=no
cannam@126 3019 fi
cannam@126 3020 need_version=yes
cannam@126 3021 ;;
cannam@126 3022
cannam@126 3023 sysv4 | sysv4.3*)
cannam@126 3024 version_type=linux # correct to gnu/linux during the next big refactor
cannam@126 3025 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@126 3026 soname_spec='$libname$release$shared_ext$major'
cannam@126 3027 shlibpath_var=LD_LIBRARY_PATH
cannam@126 3028 case $host_vendor in
cannam@126 3029 sni)
cannam@126 3030 shlibpath_overrides_runpath=no
cannam@126 3031 need_lib_prefix=no
cannam@126 3032 runpath_var=LD_RUN_PATH
cannam@126 3033 ;;
cannam@126 3034 siemens)
cannam@126 3035 need_lib_prefix=no
cannam@126 3036 ;;
cannam@126 3037 motorola)
cannam@126 3038 need_lib_prefix=no
cannam@126 3039 need_version=no
cannam@126 3040 shlibpath_overrides_runpath=no
cannam@126 3041 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
cannam@126 3042 ;;
cannam@126 3043 esac
cannam@126 3044 ;;
cannam@126 3045
cannam@126 3046 sysv4*MP*)
cannam@126 3047 if test -d /usr/nec; then
cannam@126 3048 version_type=linux # correct to gnu/linux during the next big refactor
cannam@126 3049 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
cannam@126 3050 soname_spec='$libname$shared_ext.$major'
cannam@126 3051 shlibpath_var=LD_LIBRARY_PATH
cannam@126 3052 fi
cannam@126 3053 ;;
cannam@126 3054
cannam@126 3055 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
cannam@126 3056 version_type=sco
cannam@126 3057 need_lib_prefix=no
cannam@126 3058 need_version=no
cannam@126 3059 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
cannam@126 3060 soname_spec='$libname$release$shared_ext$major'
cannam@126 3061 shlibpath_var=LD_LIBRARY_PATH
cannam@126 3062 shlibpath_overrides_runpath=yes
cannam@126 3063 hardcode_into_libs=yes
cannam@126 3064 if test yes = "$with_gnu_ld"; then
cannam@126 3065 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
cannam@126 3066 else
cannam@126 3067 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
cannam@126 3068 case $host_os in
cannam@126 3069 sco3.2v5*)
cannam@126 3070 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
cannam@126 3071 ;;
cannam@126 3072 esac
cannam@126 3073 fi
cannam@126 3074 sys_lib_dlsearch_path_spec='/usr/lib'
cannam@126 3075 ;;
cannam@126 3076
cannam@126 3077 tpf*)
cannam@126 3078 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
cannam@126 3079 version_type=linux # correct to gnu/linux during the next big refactor
cannam@126 3080 need_lib_prefix=no
cannam@126 3081 need_version=no
cannam@126 3082 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@126 3083 shlibpath_var=LD_LIBRARY_PATH
cannam@126 3084 shlibpath_overrides_runpath=no
cannam@126 3085 hardcode_into_libs=yes
cannam@126 3086 ;;
cannam@126 3087
cannam@126 3088 uts4*)
cannam@126 3089 version_type=linux # correct to gnu/linux during the next big refactor
cannam@126 3090 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@126 3091 soname_spec='$libname$release$shared_ext$major'
cannam@126 3092 shlibpath_var=LD_LIBRARY_PATH
cannam@126 3093 ;;
cannam@126 3094
cannam@126 3095 *)
cannam@126 3096 dynamic_linker=no
cannam@126 3097 ;;
cannam@126 3098 esac
cannam@126 3099 AC_MSG_RESULT([$dynamic_linker])
cannam@126 3100 test no = "$dynamic_linker" && can_build_shared=no
cannam@126 3101
cannam@126 3102 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
cannam@126 3103 if test yes = "$GCC"; then
cannam@126 3104 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
cannam@126 3105 fi
cannam@126 3106
cannam@126 3107 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
cannam@126 3108 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
cannam@126 3109 fi
cannam@126 3110
cannam@126 3111 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
cannam@126 3112 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
cannam@126 3113 fi
cannam@126 3114
cannam@126 3115 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
cannam@126 3116 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
cannam@126 3117
cannam@126 3118 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
cannam@126 3119 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
cannam@126 3120
cannam@126 3121 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
cannam@126 3122 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
cannam@126 3123
cannam@126 3124 _LT_DECL([], [variables_saved_for_relink], [1],
cannam@126 3125 [Variables whose values should be saved in libtool wrapper scripts and
cannam@126 3126 restored at link time])
cannam@126 3127 _LT_DECL([], [need_lib_prefix], [0],
cannam@126 3128 [Do we need the "lib" prefix for modules?])
cannam@126 3129 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
cannam@126 3130 _LT_DECL([], [version_type], [0], [Library versioning type])
cannam@126 3131 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
cannam@126 3132 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
cannam@126 3133 _LT_DECL([], [shlibpath_overrides_runpath], [0],
cannam@126 3134 [Is shlibpath searched before the hard-coded library search path?])
cannam@126 3135 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
cannam@126 3136 _LT_DECL([], [library_names_spec], [1],
cannam@126 3137 [[List of archive names. First name is the real one, the rest are links.
cannam@126 3138 The last name is the one that the linker finds with -lNAME]])
cannam@126 3139 _LT_DECL([], [soname_spec], [1],
cannam@126 3140 [[The coded name of the library, if different from the real name]])
cannam@126 3141 _LT_DECL([], [install_override_mode], [1],
cannam@126 3142 [Permission mode override for installation of shared libraries])
cannam@126 3143 _LT_DECL([], [postinstall_cmds], [2],
cannam@126 3144 [Command to use after installation of a shared archive])
cannam@126 3145 _LT_DECL([], [postuninstall_cmds], [2],
cannam@126 3146 [Command to use after uninstallation of a shared archive])
cannam@126 3147 _LT_DECL([], [finish_cmds], [2],
cannam@126 3148 [Commands used to finish a libtool library installation in a directory])
cannam@126 3149 _LT_DECL([], [finish_eval], [1],
cannam@126 3150 [[As "finish_cmds", except a single script fragment to be evaled but
cannam@126 3151 not shown]])
cannam@126 3152 _LT_DECL([], [hardcode_into_libs], [0],
cannam@126 3153 [Whether we should hardcode library paths into libraries])
cannam@126 3154 _LT_DECL([], [sys_lib_search_path_spec], [2],
cannam@126 3155 [Compile-time system search path for libraries])
cannam@126 3156 _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
cannam@126 3157 [Detected run-time system search path for libraries])
cannam@126 3158 _LT_DECL([], [configure_time_lt_sys_library_path], [2],
cannam@126 3159 [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
cannam@126 3160 ])# _LT_SYS_DYNAMIC_LINKER
cannam@126 3161
cannam@126 3162
cannam@126 3163 # _LT_PATH_TOOL_PREFIX(TOOL)
cannam@126 3164 # --------------------------
cannam@126 3165 # find a file program that can recognize shared library
cannam@126 3166 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
cannam@126 3167 [m4_require([_LT_DECL_EGREP])dnl
cannam@126 3168 AC_MSG_CHECKING([for $1])
cannam@126 3169 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
cannam@126 3170 [case $MAGIC_CMD in
cannam@126 3171 [[\\/*] | ?:[\\/]*])
cannam@126 3172 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
cannam@126 3173 ;;
cannam@126 3174 *)
cannam@126 3175 lt_save_MAGIC_CMD=$MAGIC_CMD
cannam@126 3176 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
cannam@126 3177 dnl $ac_dummy forces splitting on constant user-supplied paths.
cannam@126 3178 dnl POSIX.2 word splitting is done only on the output of word expansions,
cannam@126 3179 dnl not every word. This closes a longstanding sh security hole.
cannam@126 3180 ac_dummy="m4_if([$2], , $PATH, [$2])"
cannam@126 3181 for ac_dir in $ac_dummy; do
cannam@126 3182 IFS=$lt_save_ifs
cannam@126 3183 test -z "$ac_dir" && ac_dir=.
cannam@126 3184 if test -f "$ac_dir/$1"; then
cannam@126 3185 lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
cannam@126 3186 if test -n "$file_magic_test_file"; then
cannam@126 3187 case $deplibs_check_method in
cannam@126 3188 "file_magic "*)
cannam@126 3189 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
cannam@126 3190 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
cannam@126 3191 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
cannam@126 3192 $EGREP "$file_magic_regex" > /dev/null; then
cannam@126 3193 :
cannam@126 3194 else
cannam@126 3195 cat <<_LT_EOF 1>&2
cannam@126 3196
cannam@126 3197 *** Warning: the command libtool uses to detect shared libraries,
cannam@126 3198 *** $file_magic_cmd, produces output that libtool cannot recognize.
cannam@126 3199 *** The result is that libtool may fail to recognize shared libraries
cannam@126 3200 *** as such. This will affect the creation of libtool libraries that
cannam@126 3201 *** depend on shared libraries, but programs linked with such libtool
cannam@126 3202 *** libraries will work regardless of this problem. Nevertheless, you
cannam@126 3203 *** may want to report the problem to your system manager and/or to
cannam@126 3204 *** bug-libtool@gnu.org
cannam@126 3205
cannam@126 3206 _LT_EOF
cannam@126 3207 fi ;;
cannam@126 3208 esac
cannam@126 3209 fi
cannam@126 3210 break
cannam@126 3211 fi
cannam@126 3212 done
cannam@126 3213 IFS=$lt_save_ifs
cannam@126 3214 MAGIC_CMD=$lt_save_MAGIC_CMD
cannam@126 3215 ;;
cannam@126 3216 esac])
cannam@126 3217 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
cannam@126 3218 if test -n "$MAGIC_CMD"; then
cannam@126 3219 AC_MSG_RESULT($MAGIC_CMD)
cannam@126 3220 else
cannam@126 3221 AC_MSG_RESULT(no)
cannam@126 3222 fi
cannam@126 3223 _LT_DECL([], [MAGIC_CMD], [0],
cannam@126 3224 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
cannam@126 3225 ])# _LT_PATH_TOOL_PREFIX
cannam@126 3226
cannam@126 3227 # Old name:
cannam@126 3228 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
cannam@126 3229 dnl aclocal-1.4 backwards compatibility:
cannam@126 3230 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
cannam@126 3231
cannam@126 3232
cannam@126 3233 # _LT_PATH_MAGIC
cannam@126 3234 # --------------
cannam@126 3235 # find a file program that can recognize a shared library
cannam@126 3236 m4_defun([_LT_PATH_MAGIC],
cannam@126 3237 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
cannam@126 3238 if test -z "$lt_cv_path_MAGIC_CMD"; then
cannam@126 3239 if test -n "$ac_tool_prefix"; then
cannam@126 3240 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
cannam@126 3241 else
cannam@126 3242 MAGIC_CMD=:
cannam@126 3243 fi
cannam@126 3244 fi
cannam@126 3245 ])# _LT_PATH_MAGIC
cannam@126 3246
cannam@126 3247
cannam@126 3248 # LT_PATH_LD
cannam@126 3249 # ----------
cannam@126 3250 # find the pathname to the GNU or non-GNU linker
cannam@126 3251 AC_DEFUN([LT_PATH_LD],
cannam@126 3252 [AC_REQUIRE([AC_PROG_CC])dnl
cannam@126 3253 AC_REQUIRE([AC_CANONICAL_HOST])dnl
cannam@126 3254 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
cannam@126 3255 m4_require([_LT_DECL_SED])dnl
cannam@126 3256 m4_require([_LT_DECL_EGREP])dnl
cannam@126 3257 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
cannam@126 3258
cannam@126 3259 AC_ARG_WITH([gnu-ld],
cannam@126 3260 [AS_HELP_STRING([--with-gnu-ld],
cannam@126 3261 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
cannam@126 3262 [test no = "$withval" || with_gnu_ld=yes],
cannam@126 3263 [with_gnu_ld=no])dnl
cannam@126 3264
cannam@126 3265 ac_prog=ld
cannam@126 3266 if test yes = "$GCC"; then
cannam@126 3267 # Check if gcc -print-prog-name=ld gives a path.
cannam@126 3268 AC_MSG_CHECKING([for ld used by $CC])
cannam@126 3269 case $host in
cannam@126 3270 *-*-mingw*)
cannam@126 3271 # gcc leaves a trailing carriage return, which upsets mingw
cannam@126 3272 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
cannam@126 3273 *)
cannam@126 3274 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
cannam@126 3275 esac
cannam@126 3276 case $ac_prog in
cannam@126 3277 # Accept absolute paths.
cannam@126 3278 [[\\/]]* | ?:[[\\/]]*)
cannam@126 3279 re_direlt='/[[^/]][[^/]]*/\.\./'
cannam@126 3280 # Canonicalize the pathname of ld
cannam@126 3281 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
cannam@126 3282 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
cannam@126 3283 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
cannam@126 3284 done
cannam@126 3285 test -z "$LD" && LD=$ac_prog
cannam@126 3286 ;;
cannam@126 3287 "")
cannam@126 3288 # If it fails, then pretend we aren't using GCC.
cannam@126 3289 ac_prog=ld
cannam@126 3290 ;;
cannam@126 3291 *)
cannam@126 3292 # If it is relative, then search for the first ld in PATH.
cannam@126 3293 with_gnu_ld=unknown
cannam@126 3294 ;;
cannam@126 3295 esac
cannam@126 3296 elif test yes = "$with_gnu_ld"; then
cannam@126 3297 AC_MSG_CHECKING([for GNU ld])
cannam@126 3298 else
cannam@126 3299 AC_MSG_CHECKING([for non-GNU ld])
cannam@126 3300 fi
cannam@126 3301 AC_CACHE_VAL(lt_cv_path_LD,
cannam@126 3302 [if test -z "$LD"; then
cannam@126 3303 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
cannam@126 3304 for ac_dir in $PATH; do
cannam@126 3305 IFS=$lt_save_ifs
cannam@126 3306 test -z "$ac_dir" && ac_dir=.
cannam@126 3307 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
cannam@126 3308 lt_cv_path_LD=$ac_dir/$ac_prog
cannam@126 3309 # Check to see if the program is GNU ld. I'd rather use --version,
cannam@126 3310 # but apparently some variants of GNU ld only accept -v.
cannam@126 3311 # Break only if it was the GNU/non-GNU ld that we prefer.
cannam@126 3312 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
cannam@126 3313 *GNU* | *'with BFD'*)
cannam@126 3314 test no != "$with_gnu_ld" && break
cannam@126 3315 ;;
cannam@126 3316 *)
cannam@126 3317 test yes != "$with_gnu_ld" && break
cannam@126 3318 ;;
cannam@126 3319 esac
cannam@126 3320 fi
cannam@126 3321 done
cannam@126 3322 IFS=$lt_save_ifs
cannam@126 3323 else
cannam@126 3324 lt_cv_path_LD=$LD # Let the user override the test with a path.
cannam@126 3325 fi])
cannam@126 3326 LD=$lt_cv_path_LD
cannam@126 3327 if test -n "$LD"; then
cannam@126 3328 AC_MSG_RESULT($LD)
cannam@126 3329 else
cannam@126 3330 AC_MSG_RESULT(no)
cannam@126 3331 fi
cannam@126 3332 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
cannam@126 3333 _LT_PATH_LD_GNU
cannam@126 3334 AC_SUBST([LD])
cannam@126 3335
cannam@126 3336 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
cannam@126 3337 ])# LT_PATH_LD
cannam@126 3338
cannam@126 3339 # Old names:
cannam@126 3340 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
cannam@126 3341 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
cannam@126 3342 dnl aclocal-1.4 backwards compatibility:
cannam@126 3343 dnl AC_DEFUN([AM_PROG_LD], [])
cannam@126 3344 dnl AC_DEFUN([AC_PROG_LD], [])
cannam@126 3345
cannam@126 3346
cannam@126 3347 # _LT_PATH_LD_GNU
cannam@126 3348 #- --------------
cannam@126 3349 m4_defun([_LT_PATH_LD_GNU],
cannam@126 3350 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
cannam@126 3351 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
cannam@126 3352 case `$LD -v 2>&1 </dev/null` in
cannam@126 3353 *GNU* | *'with BFD'*)
cannam@126 3354 lt_cv_prog_gnu_ld=yes
cannam@126 3355 ;;
cannam@126 3356 *)
cannam@126 3357 lt_cv_prog_gnu_ld=no
cannam@126 3358 ;;
cannam@126 3359 esac])
cannam@126 3360 with_gnu_ld=$lt_cv_prog_gnu_ld
cannam@126 3361 ])# _LT_PATH_LD_GNU
cannam@126 3362
cannam@126 3363
cannam@126 3364 # _LT_CMD_RELOAD
cannam@126 3365 # --------------
cannam@126 3366 # find reload flag for linker
cannam@126 3367 # -- PORTME Some linkers may need a different reload flag.
cannam@126 3368 m4_defun([_LT_CMD_RELOAD],
cannam@126 3369 [AC_CACHE_CHECK([for $LD option to reload object files],
cannam@126 3370 lt_cv_ld_reload_flag,
cannam@126 3371 [lt_cv_ld_reload_flag='-r'])
cannam@126 3372 reload_flag=$lt_cv_ld_reload_flag
cannam@126 3373 case $reload_flag in
cannam@126 3374 "" | " "*) ;;
cannam@126 3375 *) reload_flag=" $reload_flag" ;;
cannam@126 3376 esac
cannam@126 3377 reload_cmds='$LD$reload_flag -o $output$reload_objs'
cannam@126 3378 case $host_os in
cannam@126 3379 cygwin* | mingw* | pw32* | cegcc*)
cannam@126 3380 if test yes != "$GCC"; then
cannam@126 3381 reload_cmds=false
cannam@126 3382 fi
cannam@126 3383 ;;
cannam@126 3384 darwin*)
cannam@126 3385 if test yes = "$GCC"; then
cannam@126 3386 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
cannam@126 3387 else
cannam@126 3388 reload_cmds='$LD$reload_flag -o $output$reload_objs'
cannam@126 3389 fi
cannam@126 3390 ;;
cannam@126 3391 esac
cannam@126 3392 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
cannam@126 3393 _LT_TAGDECL([], [reload_cmds], [2])dnl
cannam@126 3394 ])# _LT_CMD_RELOAD
cannam@126 3395
cannam@126 3396
cannam@126 3397 # _LT_PATH_DD
cannam@126 3398 # -----------
cannam@126 3399 # find a working dd
cannam@126 3400 m4_defun([_LT_PATH_DD],
cannam@126 3401 [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
cannam@126 3402 [printf 0123456789abcdef0123456789abcdef >conftest.i
cannam@126 3403 cat conftest.i conftest.i >conftest2.i
cannam@126 3404 : ${lt_DD:=$DD}
cannam@126 3405 AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
cannam@126 3406 [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
cannam@126 3407 cmp -s conftest.i conftest.out \
cannam@126 3408 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
cannam@126 3409 fi])
cannam@126 3410 rm -f conftest.i conftest2.i conftest.out])
cannam@126 3411 ])# _LT_PATH_DD
cannam@126 3412
cannam@126 3413
cannam@126 3414 # _LT_CMD_TRUNCATE
cannam@126 3415 # ----------------
cannam@126 3416 # find command to truncate a binary pipe
cannam@126 3417 m4_defun([_LT_CMD_TRUNCATE],
cannam@126 3418 [m4_require([_LT_PATH_DD])
cannam@126 3419 AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
cannam@126 3420 [printf 0123456789abcdef0123456789abcdef >conftest.i
cannam@126 3421 cat conftest.i conftest.i >conftest2.i
cannam@126 3422 lt_cv_truncate_bin=
cannam@126 3423 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
cannam@126 3424 cmp -s conftest.i conftest.out \
cannam@126 3425 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
cannam@126 3426 fi
cannam@126 3427 rm -f conftest.i conftest2.i conftest.out
cannam@126 3428 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
cannam@126 3429 _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
cannam@126 3430 [Command to truncate a binary pipe])
cannam@126 3431 ])# _LT_CMD_TRUNCATE
cannam@126 3432
cannam@126 3433
cannam@126 3434 # _LT_CHECK_MAGIC_METHOD
cannam@126 3435 # ----------------------
cannam@126 3436 # how to check for library dependencies
cannam@126 3437 # -- PORTME fill in with the dynamic library characteristics
cannam@126 3438 m4_defun([_LT_CHECK_MAGIC_METHOD],
cannam@126 3439 [m4_require([_LT_DECL_EGREP])
cannam@126 3440 m4_require([_LT_DECL_OBJDUMP])
cannam@126 3441 AC_CACHE_CHECK([how to recognize dependent libraries],
cannam@126 3442 lt_cv_deplibs_check_method,
cannam@126 3443 [lt_cv_file_magic_cmd='$MAGIC_CMD'
cannam@126 3444 lt_cv_file_magic_test_file=
cannam@126 3445 lt_cv_deplibs_check_method='unknown'
cannam@126 3446 # Need to set the preceding variable on all platforms that support
cannam@126 3447 # interlibrary dependencies.
cannam@126 3448 # 'none' -- dependencies not supported.
cannam@126 3449 # 'unknown' -- same as none, but documents that we really don't know.
cannam@126 3450 # 'pass_all' -- all dependencies passed with no checks.
cannam@126 3451 # 'test_compile' -- check by making test program.
cannam@126 3452 # 'file_magic [[regex]]' -- check by looking for files in library path
cannam@126 3453 # that responds to the $file_magic_cmd with a given extended regex.
cannam@126 3454 # If you have 'file' or equivalent on your system and you're not sure
cannam@126 3455 # whether 'pass_all' will *always* work, you probably want this one.
cannam@126 3456
cannam@126 3457 case $host_os in
cannam@126 3458 aix[[4-9]]*)
cannam@126 3459 lt_cv_deplibs_check_method=pass_all
cannam@126 3460 ;;
cannam@126 3461
cannam@126 3462 beos*)
cannam@126 3463 lt_cv_deplibs_check_method=pass_all
cannam@126 3464 ;;
cannam@126 3465
cannam@126 3466 bsdi[[45]]*)
cannam@126 3467 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
cannam@126 3468 lt_cv_file_magic_cmd='/usr/bin/file -L'
cannam@126 3469 lt_cv_file_magic_test_file=/shlib/libc.so
cannam@126 3470 ;;
cannam@126 3471
cannam@126 3472 cygwin*)
cannam@126 3473 # func_win32_libid is a shell function defined in ltmain.sh
cannam@126 3474 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
cannam@126 3475 lt_cv_file_magic_cmd='func_win32_libid'
cannam@126 3476 ;;
cannam@126 3477
cannam@126 3478 mingw* | pw32*)
cannam@126 3479 # Base MSYS/MinGW do not provide the 'file' command needed by
cannam@126 3480 # func_win32_libid shell function, so use a weaker test based on 'objdump',
cannam@126 3481 # unless we find 'file', for example because we are cross-compiling.
cannam@126 3482 if ( file / ) >/dev/null 2>&1; then
cannam@126 3483 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
cannam@126 3484 lt_cv_file_magic_cmd='func_win32_libid'
cannam@126 3485 else
cannam@126 3486 # Keep this pattern in sync with the one in func_win32_libid.
cannam@126 3487 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
cannam@126 3488 lt_cv_file_magic_cmd='$OBJDUMP -f'
cannam@126 3489 fi
cannam@126 3490 ;;
cannam@126 3491
cannam@126 3492 cegcc*)
cannam@126 3493 # use the weaker test based on 'objdump'. See mingw*.
cannam@126 3494 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
cannam@126 3495 lt_cv_file_magic_cmd='$OBJDUMP -f'
cannam@126 3496 ;;
cannam@126 3497
cannam@126 3498 darwin* | rhapsody*)
cannam@126 3499 lt_cv_deplibs_check_method=pass_all
cannam@126 3500 ;;
cannam@126 3501
cannam@126 3502 freebsd* | dragonfly*)
cannam@126 3503 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
cannam@126 3504 case $host_cpu in
cannam@126 3505 i*86 )
cannam@126 3506 # Not sure whether the presence of OpenBSD here was a mistake.
cannam@126 3507 # Let's accept both of them until this is cleared up.
cannam@126 3508 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
cannam@126 3509 lt_cv_file_magic_cmd=/usr/bin/file
cannam@126 3510 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
cannam@126 3511 ;;
cannam@126 3512 esac
cannam@126 3513 else
cannam@126 3514 lt_cv_deplibs_check_method=pass_all
cannam@126 3515 fi
cannam@126 3516 ;;
cannam@126 3517
cannam@126 3518 haiku*)
cannam@126 3519 lt_cv_deplibs_check_method=pass_all
cannam@126 3520 ;;
cannam@126 3521
cannam@126 3522 hpux10.20* | hpux11*)
cannam@126 3523 lt_cv_file_magic_cmd=/usr/bin/file
cannam@126 3524 case $host_cpu in
cannam@126 3525 ia64*)
cannam@126 3526 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
cannam@126 3527 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
cannam@126 3528 ;;
cannam@126 3529 hppa*64*)
cannam@126 3530 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
cannam@126 3531 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
cannam@126 3532 ;;
cannam@126 3533 *)
cannam@126 3534 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
cannam@126 3535 lt_cv_file_magic_test_file=/usr/lib/libc.sl
cannam@126 3536 ;;
cannam@126 3537 esac
cannam@126 3538 ;;
cannam@126 3539
cannam@126 3540 interix[[3-9]]*)
cannam@126 3541 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
cannam@126 3542 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
cannam@126 3543 ;;
cannam@126 3544
cannam@126 3545 irix5* | irix6* | nonstopux*)
cannam@126 3546 case $LD in
cannam@126 3547 *-32|*"-32 ") libmagic=32-bit;;
cannam@126 3548 *-n32|*"-n32 ") libmagic=N32;;
cannam@126 3549 *-64|*"-64 ") libmagic=64-bit;;
cannam@126 3550 *) libmagic=never-match;;
cannam@126 3551 esac
cannam@126 3552 lt_cv_deplibs_check_method=pass_all
cannam@126 3553 ;;
cannam@126 3554
cannam@126 3555 # This must be glibc/ELF.
cannam@126 3556 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
cannam@126 3557 lt_cv_deplibs_check_method=pass_all
cannam@126 3558 ;;
cannam@126 3559
cannam@126 3560 netbsd* | netbsdelf*-gnu)
cannam@126 3561 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
cannam@126 3562 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
cannam@126 3563 else
cannam@126 3564 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
cannam@126 3565 fi
cannam@126 3566 ;;
cannam@126 3567
cannam@126 3568 newos6*)
cannam@126 3569 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
cannam@126 3570 lt_cv_file_magic_cmd=/usr/bin/file
cannam@126 3571 lt_cv_file_magic_test_file=/usr/lib/libnls.so
cannam@126 3572 ;;
cannam@126 3573
cannam@126 3574 *nto* | *qnx*)
cannam@126 3575 lt_cv_deplibs_check_method=pass_all
cannam@126 3576 ;;
cannam@126 3577
cannam@126 3578 openbsd* | bitrig*)
cannam@126 3579 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
cannam@126 3580 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
cannam@126 3581 else
cannam@126 3582 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
cannam@126 3583 fi
cannam@126 3584 ;;
cannam@126 3585
cannam@126 3586 osf3* | osf4* | osf5*)
cannam@126 3587 lt_cv_deplibs_check_method=pass_all
cannam@126 3588 ;;
cannam@126 3589
cannam@126 3590 rdos*)
cannam@126 3591 lt_cv_deplibs_check_method=pass_all
cannam@126 3592 ;;
cannam@126 3593
cannam@126 3594 solaris*)
cannam@126 3595 lt_cv_deplibs_check_method=pass_all
cannam@126 3596 ;;
cannam@126 3597
cannam@126 3598 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
cannam@126 3599 lt_cv_deplibs_check_method=pass_all
cannam@126 3600 ;;
cannam@126 3601
cannam@126 3602 sysv4 | sysv4.3*)
cannam@126 3603 case $host_vendor in
cannam@126 3604 motorola)
cannam@126 3605 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
cannam@126 3606 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
cannam@126 3607 ;;
cannam@126 3608 ncr)
cannam@126 3609 lt_cv_deplibs_check_method=pass_all
cannam@126 3610 ;;
cannam@126 3611 sequent)
cannam@126 3612 lt_cv_file_magic_cmd='/bin/file'
cannam@126 3613 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
cannam@126 3614 ;;
cannam@126 3615 sni)
cannam@126 3616 lt_cv_file_magic_cmd='/bin/file'
cannam@126 3617 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
cannam@126 3618 lt_cv_file_magic_test_file=/lib/libc.so
cannam@126 3619 ;;
cannam@126 3620 siemens)
cannam@126 3621 lt_cv_deplibs_check_method=pass_all
cannam@126 3622 ;;
cannam@126 3623 pc)
cannam@126 3624 lt_cv_deplibs_check_method=pass_all
cannam@126 3625 ;;
cannam@126 3626 esac
cannam@126 3627 ;;
cannam@126 3628
cannam@126 3629 tpf*)
cannam@126 3630 lt_cv_deplibs_check_method=pass_all
cannam@126 3631 ;;
cannam@126 3632 os2*)
cannam@126 3633 lt_cv_deplibs_check_method=pass_all
cannam@126 3634 ;;
cannam@126 3635 esac
cannam@126 3636 ])
cannam@126 3637
cannam@126 3638 file_magic_glob=
cannam@126 3639 want_nocaseglob=no
cannam@126 3640 if test "$build" = "$host"; then
cannam@126 3641 case $host_os in
cannam@126 3642 mingw* | pw32*)
cannam@126 3643 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
cannam@126 3644 want_nocaseglob=yes
cannam@126 3645 else
cannam@126 3646 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
cannam@126 3647 fi
cannam@126 3648 ;;
cannam@126 3649 esac
cannam@126 3650 fi
cannam@126 3651
cannam@126 3652 file_magic_cmd=$lt_cv_file_magic_cmd
cannam@126 3653 deplibs_check_method=$lt_cv_deplibs_check_method
cannam@126 3654 test -z "$deplibs_check_method" && deplibs_check_method=unknown
cannam@126 3655
cannam@126 3656 _LT_DECL([], [deplibs_check_method], [1],
cannam@126 3657 [Method to check whether dependent libraries are shared objects])
cannam@126 3658 _LT_DECL([], [file_magic_cmd], [1],
cannam@126 3659 [Command to use when deplibs_check_method = "file_magic"])
cannam@126 3660 _LT_DECL([], [file_magic_glob], [1],
cannam@126 3661 [How to find potential files when deplibs_check_method = "file_magic"])
cannam@126 3662 _LT_DECL([], [want_nocaseglob], [1],
cannam@126 3663 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
cannam@126 3664 ])# _LT_CHECK_MAGIC_METHOD
cannam@126 3665
cannam@126 3666
cannam@126 3667 # LT_PATH_NM
cannam@126 3668 # ----------
cannam@126 3669 # find the pathname to a BSD- or MS-compatible name lister
cannam@126 3670 AC_DEFUN([LT_PATH_NM],
cannam@126 3671 [AC_REQUIRE([AC_PROG_CC])dnl
cannam@126 3672 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
cannam@126 3673 [if test -n "$NM"; then
cannam@126 3674 # Let the user override the test.
cannam@126 3675 lt_cv_path_NM=$NM
cannam@126 3676 else
cannam@126 3677 lt_nm_to_check=${ac_tool_prefix}nm
cannam@126 3678 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
cannam@126 3679 lt_nm_to_check="$lt_nm_to_check nm"
cannam@126 3680 fi
cannam@126 3681 for lt_tmp_nm in $lt_nm_to_check; do
cannam@126 3682 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
cannam@126 3683 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
cannam@126 3684 IFS=$lt_save_ifs
cannam@126 3685 test -z "$ac_dir" && ac_dir=.
cannam@126 3686 tmp_nm=$ac_dir/$lt_tmp_nm
cannam@126 3687 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
cannam@126 3688 # Check to see if the nm accepts a BSD-compat flag.
cannam@126 3689 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
cannam@126 3690 # nm: unknown option "B" ignored
cannam@126 3691 # Tru64's nm complains that /dev/null is an invalid object file
cannam@126 3692 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
cannam@126 3693 case $build_os in
cannam@126 3694 mingw*) lt_bad_file=conftest.nm/nofile ;;
cannam@126 3695 *) lt_bad_file=/dev/null ;;
cannam@126 3696 esac
cannam@126 3697 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
cannam@126 3698 *$lt_bad_file* | *'Invalid file or object type'*)
cannam@126 3699 lt_cv_path_NM="$tmp_nm -B"
cannam@126 3700 break 2
cannam@126 3701 ;;
cannam@126 3702 *)
cannam@126 3703 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
cannam@126 3704 */dev/null*)
cannam@126 3705 lt_cv_path_NM="$tmp_nm -p"
cannam@126 3706 break 2
cannam@126 3707 ;;
cannam@126 3708 *)
cannam@126 3709 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
cannam@126 3710 continue # so that we can try to find one that supports BSD flags
cannam@126 3711 ;;
cannam@126 3712 esac
cannam@126 3713 ;;
cannam@126 3714 esac
cannam@126 3715 fi
cannam@126 3716 done
cannam@126 3717 IFS=$lt_save_ifs
cannam@126 3718 done
cannam@126 3719 : ${lt_cv_path_NM=no}
cannam@126 3720 fi])
cannam@126 3721 if test no != "$lt_cv_path_NM"; then
cannam@126 3722 NM=$lt_cv_path_NM
cannam@126 3723 else
cannam@126 3724 # Didn't find any BSD compatible name lister, look for dumpbin.
cannam@126 3725 if test -n "$DUMPBIN"; then :
cannam@126 3726 # Let the user override the test.
cannam@126 3727 else
cannam@126 3728 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
cannam@126 3729 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
cannam@126 3730 *COFF*)
cannam@126 3731 DUMPBIN="$DUMPBIN -symbols -headers"
cannam@126 3732 ;;
cannam@126 3733 *)
cannam@126 3734 DUMPBIN=:
cannam@126 3735 ;;
cannam@126 3736 esac
cannam@126 3737 fi
cannam@126 3738 AC_SUBST([DUMPBIN])
cannam@126 3739 if test : != "$DUMPBIN"; then
cannam@126 3740 NM=$DUMPBIN
cannam@126 3741 fi
cannam@126 3742 fi
cannam@126 3743 test -z "$NM" && NM=nm
cannam@126 3744 AC_SUBST([NM])
cannam@126 3745 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
cannam@126 3746
cannam@126 3747 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
cannam@126 3748 [lt_cv_nm_interface="BSD nm"
cannam@126 3749 echo "int some_variable = 0;" > conftest.$ac_ext
cannam@126 3750 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
cannam@126 3751 (eval "$ac_compile" 2>conftest.err)
cannam@126 3752 cat conftest.err >&AS_MESSAGE_LOG_FD
cannam@126 3753 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
cannam@126 3754 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cannam@126 3755 cat conftest.err >&AS_MESSAGE_LOG_FD
cannam@126 3756 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
cannam@126 3757 cat conftest.out >&AS_MESSAGE_LOG_FD
cannam@126 3758 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
cannam@126 3759 lt_cv_nm_interface="MS dumpbin"
cannam@126 3760 fi
cannam@126 3761 rm -f conftest*])
cannam@126 3762 ])# LT_PATH_NM
cannam@126 3763
cannam@126 3764 # Old names:
cannam@126 3765 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
cannam@126 3766 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
cannam@126 3767 dnl aclocal-1.4 backwards compatibility:
cannam@126 3768 dnl AC_DEFUN([AM_PROG_NM], [])
cannam@126 3769 dnl AC_DEFUN([AC_PROG_NM], [])
cannam@126 3770
cannam@126 3771 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
cannam@126 3772 # --------------------------------
cannam@126 3773 # how to determine the name of the shared library
cannam@126 3774 # associated with a specific link library.
cannam@126 3775 # -- PORTME fill in with the dynamic library characteristics
cannam@126 3776 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
cannam@126 3777 [m4_require([_LT_DECL_EGREP])
cannam@126 3778 m4_require([_LT_DECL_OBJDUMP])
cannam@126 3779 m4_require([_LT_DECL_DLLTOOL])
cannam@126 3780 AC_CACHE_CHECK([how to associate runtime and link libraries],
cannam@126 3781 lt_cv_sharedlib_from_linklib_cmd,
cannam@126 3782 [lt_cv_sharedlib_from_linklib_cmd='unknown'
cannam@126 3783
cannam@126 3784 case $host_os in
cannam@126 3785 cygwin* | mingw* | pw32* | cegcc*)
cannam@126 3786 # two different shell functions defined in ltmain.sh;
cannam@126 3787 # decide which one to use based on capabilities of $DLLTOOL
cannam@126 3788 case `$DLLTOOL --help 2>&1` in
cannam@126 3789 *--identify-strict*)
cannam@126 3790 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
cannam@126 3791 ;;
cannam@126 3792 *)
cannam@126 3793 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
cannam@126 3794 ;;
cannam@126 3795 esac
cannam@126 3796 ;;
cannam@126 3797 *)
cannam@126 3798 # fallback: assume linklib IS sharedlib
cannam@126 3799 lt_cv_sharedlib_from_linklib_cmd=$ECHO
cannam@126 3800 ;;
cannam@126 3801 esac
cannam@126 3802 ])
cannam@126 3803 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
cannam@126 3804 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
cannam@126 3805
cannam@126 3806 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
cannam@126 3807 [Command to associate shared and link libraries])
cannam@126 3808 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
cannam@126 3809
cannam@126 3810
cannam@126 3811 # _LT_PATH_MANIFEST_TOOL
cannam@126 3812 # ----------------------
cannam@126 3813 # locate the manifest tool
cannam@126 3814 m4_defun([_LT_PATH_MANIFEST_TOOL],
cannam@126 3815 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
cannam@126 3816 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
cannam@126 3817 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
cannam@126 3818 [lt_cv_path_mainfest_tool=no
cannam@126 3819 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
cannam@126 3820 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
cannam@126 3821 cat conftest.err >&AS_MESSAGE_LOG_FD
cannam@126 3822 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
cannam@126 3823 lt_cv_path_mainfest_tool=yes
cannam@126 3824 fi
cannam@126 3825 rm -f conftest*])
cannam@126 3826 if test yes != "$lt_cv_path_mainfest_tool"; then
cannam@126 3827 MANIFEST_TOOL=:
cannam@126 3828 fi
cannam@126 3829 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
cannam@126 3830 ])# _LT_PATH_MANIFEST_TOOL
cannam@126 3831
cannam@126 3832
cannam@126 3833 # _LT_DLL_DEF_P([FILE])
cannam@126 3834 # ---------------------
cannam@126 3835 # True iff FILE is a Windows DLL '.def' file.
cannam@126 3836 # Keep in sync with func_dll_def_p in the libtool script
cannam@126 3837 AC_DEFUN([_LT_DLL_DEF_P],
cannam@126 3838 [dnl
cannam@126 3839 test DEF = "`$SED -n dnl
cannam@126 3840 -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
cannam@126 3841 -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
cannam@126 3842 -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
cannam@126 3843 -e q dnl Only consider the first "real" line
cannam@126 3844 $1`" dnl
cannam@126 3845 ])# _LT_DLL_DEF_P
cannam@126 3846
cannam@126 3847
cannam@126 3848 # LT_LIB_M
cannam@126 3849 # --------
cannam@126 3850 # check for math library
cannam@126 3851 AC_DEFUN([LT_LIB_M],
cannam@126 3852 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
cannam@126 3853 LIBM=
cannam@126 3854 case $host in
cannam@126 3855 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
cannam@126 3856 # These system don't have libm, or don't need it
cannam@126 3857 ;;
cannam@126 3858 *-ncr-sysv4.3*)
cannam@126 3859 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
cannam@126 3860 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
cannam@126 3861 ;;
cannam@126 3862 *)
cannam@126 3863 AC_CHECK_LIB(m, cos, LIBM=-lm)
cannam@126 3864 ;;
cannam@126 3865 esac
cannam@126 3866 AC_SUBST([LIBM])
cannam@126 3867 ])# LT_LIB_M
cannam@126 3868
cannam@126 3869 # Old name:
cannam@126 3870 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
cannam@126 3871 dnl aclocal-1.4 backwards compatibility:
cannam@126 3872 dnl AC_DEFUN([AC_CHECK_LIBM], [])
cannam@126 3873
cannam@126 3874
cannam@126 3875 # _LT_COMPILER_NO_RTTI([TAGNAME])
cannam@126 3876 # -------------------------------
cannam@126 3877 m4_defun([_LT_COMPILER_NO_RTTI],
cannam@126 3878 [m4_require([_LT_TAG_COMPILER])dnl
cannam@126 3879
cannam@126 3880 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
cannam@126 3881
cannam@126 3882 if test yes = "$GCC"; then
cannam@126 3883 case $cc_basename in
cannam@126 3884 nvcc*)
cannam@126 3885 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
cannam@126 3886 *)
cannam@126 3887 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
cannam@126 3888 esac
cannam@126 3889
cannam@126 3890 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
cannam@126 3891 lt_cv_prog_compiler_rtti_exceptions,
cannam@126 3892 [-fno-rtti -fno-exceptions], [],
cannam@126 3893 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
cannam@126 3894 fi
cannam@126 3895 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
cannam@126 3896 [Compiler flag to turn off builtin functions])
cannam@126 3897 ])# _LT_COMPILER_NO_RTTI
cannam@126 3898
cannam@126 3899
cannam@126 3900 # _LT_CMD_GLOBAL_SYMBOLS
cannam@126 3901 # ----------------------
cannam@126 3902 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
cannam@126 3903 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
cannam@126 3904 AC_REQUIRE([AC_PROG_CC])dnl
cannam@126 3905 AC_REQUIRE([AC_PROG_AWK])dnl
cannam@126 3906 AC_REQUIRE([LT_PATH_NM])dnl
cannam@126 3907 AC_REQUIRE([LT_PATH_LD])dnl
cannam@126 3908 m4_require([_LT_DECL_SED])dnl
cannam@126 3909 m4_require([_LT_DECL_EGREP])dnl
cannam@126 3910 m4_require([_LT_TAG_COMPILER])dnl
cannam@126 3911
cannam@126 3912 # Check for command to grab the raw symbol name followed by C symbol from nm.
cannam@126 3913 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
cannam@126 3914 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
cannam@126 3915 [
cannam@126 3916 # These are sane defaults that work on at least a few old systems.
cannam@126 3917 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
cannam@126 3918
cannam@126 3919 # Character class describing NM global symbol codes.
cannam@126 3920 symcode='[[BCDEGRST]]'
cannam@126 3921
cannam@126 3922 # Regexp to match symbols that can be accessed directly from C.
cannam@126 3923 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
cannam@126 3924
cannam@126 3925 # Define system-specific variables.
cannam@126 3926 case $host_os in
cannam@126 3927 aix*)
cannam@126 3928 symcode='[[BCDT]]'
cannam@126 3929 ;;
cannam@126 3930 cygwin* | mingw* | pw32* | cegcc*)
cannam@126 3931 symcode='[[ABCDGISTW]]'
cannam@126 3932 ;;
cannam@126 3933 hpux*)
cannam@126 3934 if test ia64 = "$host_cpu"; then
cannam@126 3935 symcode='[[ABCDEGRST]]'
cannam@126 3936 fi
cannam@126 3937 ;;
cannam@126 3938 irix* | nonstopux*)
cannam@126 3939 symcode='[[BCDEGRST]]'
cannam@126 3940 ;;
cannam@126 3941 osf*)
cannam@126 3942 symcode='[[BCDEGQRST]]'
cannam@126 3943 ;;
cannam@126 3944 solaris*)
cannam@126 3945 symcode='[[BDRT]]'
cannam@126 3946 ;;
cannam@126 3947 sco3.2v5*)
cannam@126 3948 symcode='[[DT]]'
cannam@126 3949 ;;
cannam@126 3950 sysv4.2uw2*)
cannam@126 3951 symcode='[[DT]]'
cannam@126 3952 ;;
cannam@126 3953 sysv5* | sco5v6* | unixware* | OpenUNIX*)
cannam@126 3954 symcode='[[ABDT]]'
cannam@126 3955 ;;
cannam@126 3956 sysv4)
cannam@126 3957 symcode='[[DFNSTU]]'
cannam@126 3958 ;;
cannam@126 3959 esac
cannam@126 3960
cannam@126 3961 # If we're using GNU nm, then use its standard symbol codes.
cannam@126 3962 case `$NM -V 2>&1` in
cannam@126 3963 *GNU* | *'with BFD'*)
cannam@126 3964 symcode='[[ABCDGIRSTW]]' ;;
cannam@126 3965 esac
cannam@126 3966
cannam@126 3967 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
cannam@126 3968 # Gets list of data symbols to import.
cannam@126 3969 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
cannam@126 3970 # Adjust the below global symbol transforms to fixup imported variables.
cannam@126 3971 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
cannam@126 3972 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
cannam@126 3973 lt_c_name_lib_hook="\
cannam@126 3974 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
cannam@126 3975 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
cannam@126 3976 else
cannam@126 3977 # Disable hooks by default.
cannam@126 3978 lt_cv_sys_global_symbol_to_import=
cannam@126 3979 lt_cdecl_hook=
cannam@126 3980 lt_c_name_hook=
cannam@126 3981 lt_c_name_lib_hook=
cannam@126 3982 fi
cannam@126 3983
cannam@126 3984 # Transform an extracted symbol line into a proper C declaration.
cannam@126 3985 # Some systems (esp. on ia64) link data and code symbols differently,
cannam@126 3986 # so use this general approach.
cannam@126 3987 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
cannam@126 3988 $lt_cdecl_hook\
cannam@126 3989 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
cannam@126 3990 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
cannam@126 3991
cannam@126 3992 # Transform an extracted symbol line into symbol name and symbol address
cannam@126 3993 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
cannam@126 3994 $lt_c_name_hook\
cannam@126 3995 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
cannam@126 3996 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
cannam@126 3997
cannam@126 3998 # Transform an extracted symbol line into symbol name with lib prefix and
cannam@126 3999 # symbol address.
cannam@126 4000 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
cannam@126 4001 $lt_c_name_lib_hook\
cannam@126 4002 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
cannam@126 4003 " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
cannam@126 4004 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
cannam@126 4005
cannam@126 4006 # Handle CRLF in mingw tool chain
cannam@126 4007 opt_cr=
cannam@126 4008 case $build_os in
cannam@126 4009 mingw*)
cannam@126 4010 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
cannam@126 4011 ;;
cannam@126 4012 esac
cannam@126 4013
cannam@126 4014 # Try without a prefix underscore, then with it.
cannam@126 4015 for ac_symprfx in "" "_"; do
cannam@126 4016
cannam@126 4017 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
cannam@126 4018 symxfrm="\\1 $ac_symprfx\\2 \\2"
cannam@126 4019
cannam@126 4020 # Write the raw and C identifiers.
cannam@126 4021 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
cannam@126 4022 # Fake it for dumpbin and say T for any non-static function,
cannam@126 4023 # D for any global variable and I for any imported variable.
cannam@126 4024 # Also find C++ and __fastcall symbols from MSVC++,
cannam@126 4025 # which start with @ or ?.
cannam@126 4026 lt_cv_sys_global_symbol_pipe="$AWK ['"\
cannam@126 4027 " {last_section=section; section=\$ 3};"\
cannam@126 4028 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
cannam@126 4029 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
cannam@126 4030 " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
cannam@126 4031 " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
cannam@126 4032 " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
cannam@126 4033 " \$ 0!~/External *\|/{next};"\
cannam@126 4034 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
cannam@126 4035 " {if(hide[section]) next};"\
cannam@126 4036 " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
cannam@126 4037 " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
cannam@126 4038 " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
cannam@126 4039 " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
cannam@126 4040 " ' prfx=^$ac_symprfx]"
cannam@126 4041 else
cannam@126 4042 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
cannam@126 4043 fi
cannam@126 4044 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
cannam@126 4045
cannam@126 4046 # Check to see that the pipe works correctly.
cannam@126 4047 pipe_works=no
cannam@126 4048
cannam@126 4049 rm -f conftest*
cannam@126 4050 cat > conftest.$ac_ext <<_LT_EOF
cannam@126 4051 #ifdef __cplusplus
cannam@126 4052 extern "C" {
cannam@126 4053 #endif
cannam@126 4054 char nm_test_var;
cannam@126 4055 void nm_test_func(void);
cannam@126 4056 void nm_test_func(void){}
cannam@126 4057 #ifdef __cplusplus
cannam@126 4058 }
cannam@126 4059 #endif
cannam@126 4060 int main(){nm_test_var='a';nm_test_func();return(0);}
cannam@126 4061 _LT_EOF
cannam@126 4062
cannam@126 4063 if AC_TRY_EVAL(ac_compile); then
cannam@126 4064 # Now try to grab the symbols.
cannam@126 4065 nlist=conftest.nm
cannam@126 4066 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
cannam@126 4067 # Try sorting and uniquifying the output.
cannam@126 4068 if sort "$nlist" | uniq > "$nlist"T; then
cannam@126 4069 mv -f "$nlist"T "$nlist"
cannam@126 4070 else
cannam@126 4071 rm -f "$nlist"T
cannam@126 4072 fi
cannam@126 4073
cannam@126 4074 # Make sure that we snagged all the symbols we need.
cannam@126 4075 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
cannam@126 4076 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
cannam@126 4077 cat <<_LT_EOF > conftest.$ac_ext
cannam@126 4078 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
cannam@126 4079 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
cannam@126 4080 /* DATA imports from DLLs on WIN32 can't be const, because runtime
cannam@126 4081 relocations are performed -- see ld's documentation on pseudo-relocs. */
cannam@126 4082 # define LT@&t@_DLSYM_CONST
cannam@126 4083 #elif defined __osf__
cannam@126 4084 /* This system does not cope well with relocations in const data. */
cannam@126 4085 # define LT@&t@_DLSYM_CONST
cannam@126 4086 #else
cannam@126 4087 # define LT@&t@_DLSYM_CONST const
cannam@126 4088 #endif
cannam@126 4089
cannam@126 4090 #ifdef __cplusplus
cannam@126 4091 extern "C" {
cannam@126 4092 #endif
cannam@126 4093
cannam@126 4094 _LT_EOF
cannam@126 4095 # Now generate the symbol file.
cannam@126 4096 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
cannam@126 4097
cannam@126 4098 cat <<_LT_EOF >> conftest.$ac_ext
cannam@126 4099
cannam@126 4100 /* The mapping between symbol names and symbols. */
cannam@126 4101 LT@&t@_DLSYM_CONST struct {
cannam@126 4102 const char *name;
cannam@126 4103 void *address;
cannam@126 4104 }
cannam@126 4105 lt__PROGRAM__LTX_preloaded_symbols[[]] =
cannam@126 4106 {
cannam@126 4107 { "@PROGRAM@", (void *) 0 },
cannam@126 4108 _LT_EOF
cannam@126 4109 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
cannam@126 4110 cat <<\_LT_EOF >> conftest.$ac_ext
cannam@126 4111 {0, (void *) 0}
cannam@126 4112 };
cannam@126 4113
cannam@126 4114 /* This works around a problem in FreeBSD linker */
cannam@126 4115 #ifdef FREEBSD_WORKAROUND
cannam@126 4116 static const void *lt_preloaded_setup() {
cannam@126 4117 return lt__PROGRAM__LTX_preloaded_symbols;
cannam@126 4118 }
cannam@126 4119 #endif
cannam@126 4120
cannam@126 4121 #ifdef __cplusplus
cannam@126 4122 }
cannam@126 4123 #endif
cannam@126 4124 _LT_EOF
cannam@126 4125 # Now try linking the two files.
cannam@126 4126 mv conftest.$ac_objext conftstm.$ac_objext
cannam@126 4127 lt_globsym_save_LIBS=$LIBS
cannam@126 4128 lt_globsym_save_CFLAGS=$CFLAGS
cannam@126 4129 LIBS=conftstm.$ac_objext
cannam@126 4130 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
cannam@126 4131 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
cannam@126 4132 pipe_works=yes
cannam@126 4133 fi
cannam@126 4134 LIBS=$lt_globsym_save_LIBS
cannam@126 4135 CFLAGS=$lt_globsym_save_CFLAGS
cannam@126 4136 else
cannam@126 4137 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
cannam@126 4138 fi
cannam@126 4139 else
cannam@126 4140 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
cannam@126 4141 fi
cannam@126 4142 else
cannam@126 4143 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
cannam@126 4144 fi
cannam@126 4145 else
cannam@126 4146 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
cannam@126 4147 cat conftest.$ac_ext >&5
cannam@126 4148 fi
cannam@126 4149 rm -rf conftest* conftst*
cannam@126 4150
cannam@126 4151 # Do not use the global_symbol_pipe unless it works.
cannam@126 4152 if test yes = "$pipe_works"; then
cannam@126 4153 break
cannam@126 4154 else
cannam@126 4155 lt_cv_sys_global_symbol_pipe=
cannam@126 4156 fi
cannam@126 4157 done
cannam@126 4158 ])
cannam@126 4159 if test -z "$lt_cv_sys_global_symbol_pipe"; then
cannam@126 4160 lt_cv_sys_global_symbol_to_cdecl=
cannam@126 4161 fi
cannam@126 4162 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
cannam@126 4163 AC_MSG_RESULT(failed)
cannam@126 4164 else
cannam@126 4165 AC_MSG_RESULT(ok)
cannam@126 4166 fi
cannam@126 4167
cannam@126 4168 # Response file support.
cannam@126 4169 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
cannam@126 4170 nm_file_list_spec='@'
cannam@126 4171 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
cannam@126 4172 nm_file_list_spec='@'
cannam@126 4173 fi
cannam@126 4174
cannam@126 4175 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
cannam@126 4176 [Take the output of nm and produce a listing of raw symbols and C names])
cannam@126 4177 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
cannam@126 4178 [Transform the output of nm in a proper C declaration])
cannam@126 4179 _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
cannam@126 4180 [Transform the output of nm into a list of symbols to manually relocate])
cannam@126 4181 _LT_DECL([global_symbol_to_c_name_address],
cannam@126 4182 [lt_cv_sys_global_symbol_to_c_name_address], [1],
cannam@126 4183 [Transform the output of nm in a C name address pair])
cannam@126 4184 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
cannam@126 4185 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
cannam@126 4186 [Transform the output of nm in a C name address pair when lib prefix is needed])
cannam@126 4187 _LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
cannam@126 4188 [The name lister interface])
cannam@126 4189 _LT_DECL([], [nm_file_list_spec], [1],
cannam@126 4190 [Specify filename containing input files for $NM])
cannam@126 4191 ]) # _LT_CMD_GLOBAL_SYMBOLS
cannam@126 4192
cannam@126 4193
cannam@126 4194 # _LT_COMPILER_PIC([TAGNAME])
cannam@126 4195 # ---------------------------
cannam@126 4196 m4_defun([_LT_COMPILER_PIC],
cannam@126 4197 [m4_require([_LT_TAG_COMPILER])dnl
cannam@126 4198 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
cannam@126 4199 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
cannam@126 4200 _LT_TAGVAR(lt_prog_compiler_static, $1)=
cannam@126 4201
cannam@126 4202 m4_if([$1], [CXX], [
cannam@126 4203 # C++ specific cases for pic, static, wl, etc.
cannam@126 4204 if test yes = "$GXX"; then
cannam@126 4205 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@126 4206 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@126 4207
cannam@126 4208 case $host_os in
cannam@126 4209 aix*)
cannam@126 4210 # All AIX code is PIC.
cannam@126 4211 if test ia64 = "$host_cpu"; then
cannam@126 4212 # AIX 5 now supports IA64 processor
cannam@126 4213 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@126 4214 fi
cannam@126 4215 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@126 4216 ;;
cannam@126 4217
cannam@126 4218 amigaos*)
cannam@126 4219 case $host_cpu in
cannam@126 4220 powerpc)
cannam@126 4221 # see comment about AmigaOS4 .so support
cannam@126 4222 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@126 4223 ;;
cannam@126 4224 m68k)
cannam@126 4225 # FIXME: we need at least 68020 code to build shared libraries, but
cannam@126 4226 # adding the '-m68020' flag to GCC prevents building anything better,
cannam@126 4227 # like '-m68040'.
cannam@126 4228 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
cannam@126 4229 ;;
cannam@126 4230 esac
cannam@126 4231 ;;
cannam@126 4232
cannam@126 4233 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
cannam@126 4234 # PIC is the default for these OSes.
cannam@126 4235 ;;
cannam@126 4236 mingw* | cygwin* | os2* | pw32* | cegcc*)
cannam@126 4237 # This hack is so that the source file can tell whether it is being
cannam@126 4238 # built for inclusion in a dll (and should export symbols for example).
cannam@126 4239 # Although the cygwin gcc ignores -fPIC, still need this for old-style
cannam@126 4240 # (--disable-auto-import) libraries
cannam@126 4241 m4_if([$1], [GCJ], [],
cannam@126 4242 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
cannam@126 4243 case $host_os in
cannam@126 4244 os2*)
cannam@126 4245 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
cannam@126 4246 ;;
cannam@126 4247 esac
cannam@126 4248 ;;
cannam@126 4249 darwin* | rhapsody*)
cannam@126 4250 # PIC is the default on this platform
cannam@126 4251 # Common symbols not allowed in MH_DYLIB files
cannam@126 4252 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
cannam@126 4253 ;;
cannam@126 4254 *djgpp*)
cannam@126 4255 # DJGPP does not support shared libraries at all
cannam@126 4256 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
cannam@126 4257 ;;
cannam@126 4258 haiku*)
cannam@126 4259 # PIC is the default for Haiku.
cannam@126 4260 # The "-static" flag exists, but is broken.
cannam@126 4261 _LT_TAGVAR(lt_prog_compiler_static, $1)=
cannam@126 4262 ;;
cannam@126 4263 interix[[3-9]]*)
cannam@126 4264 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
cannam@126 4265 # Instead, we relocate shared libraries at runtime.
cannam@126 4266 ;;
cannam@126 4267 sysv4*MP*)
cannam@126 4268 if test -d /usr/nec; then
cannam@126 4269 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
cannam@126 4270 fi
cannam@126 4271 ;;
cannam@126 4272 hpux*)
cannam@126 4273 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
cannam@126 4274 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
cannam@126 4275 # sets the default TLS model and affects inlining.
cannam@126 4276 case $host_cpu in
cannam@126 4277 hppa*64*)
cannam@126 4278 ;;
cannam@126 4279 *)
cannam@126 4280 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@126 4281 ;;
cannam@126 4282 esac
cannam@126 4283 ;;
cannam@126 4284 *qnx* | *nto*)
cannam@126 4285 # QNX uses GNU C++, but need to define -shared option too, otherwise
cannam@126 4286 # it will coredump.
cannam@126 4287 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
cannam@126 4288 ;;
cannam@126 4289 *)
cannam@126 4290 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@126 4291 ;;
cannam@126 4292 esac
cannam@126 4293 else
cannam@126 4294 case $host_os in
cannam@126 4295 aix[[4-9]]*)
cannam@126 4296 # All AIX code is PIC.
cannam@126 4297 if test ia64 = "$host_cpu"; then
cannam@126 4298 # AIX 5 now supports IA64 processor
cannam@126 4299 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@126 4300 else
cannam@126 4301 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
cannam@126 4302 fi
cannam@126 4303 ;;
cannam@126 4304 chorus*)
cannam@126 4305 case $cc_basename in
cannam@126 4306 cxch68*)
cannam@126 4307 # Green Hills C++ Compiler
cannam@126 4308 # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
cannam@126 4309 ;;
cannam@126 4310 esac
cannam@126 4311 ;;
cannam@126 4312 mingw* | cygwin* | os2* | pw32* | cegcc*)
cannam@126 4313 # This hack is so that the source file can tell whether it is being
cannam@126 4314 # built for inclusion in a dll (and should export symbols for example).
cannam@126 4315 m4_if([$1], [GCJ], [],
cannam@126 4316 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
cannam@126 4317 ;;
cannam@126 4318 dgux*)
cannam@126 4319 case $cc_basename in
cannam@126 4320 ec++*)
cannam@126 4321 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@126 4322 ;;
cannam@126 4323 ghcx*)
cannam@126 4324 # Green Hills C++ Compiler
cannam@126 4325 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
cannam@126 4326 ;;
cannam@126 4327 *)
cannam@126 4328 ;;
cannam@126 4329 esac
cannam@126 4330 ;;
cannam@126 4331 freebsd* | dragonfly*)
cannam@126 4332 # FreeBSD uses GNU C++
cannam@126 4333 ;;
cannam@126 4334 hpux9* | hpux10* | hpux11*)
cannam@126 4335 case $cc_basename in
cannam@126 4336 CC*)
cannam@126 4337 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@126 4338 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
cannam@126 4339 if test ia64 != "$host_cpu"; then
cannam@126 4340 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
cannam@126 4341 fi
cannam@126 4342 ;;
cannam@126 4343 aCC*)
cannam@126 4344 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@126 4345 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
cannam@126 4346 case $host_cpu in
cannam@126 4347 hppa*64*|ia64*)
cannam@126 4348 # +Z the default
cannam@126 4349 ;;
cannam@126 4350 *)
cannam@126 4351 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
cannam@126 4352 ;;
cannam@126 4353 esac
cannam@126 4354 ;;
cannam@126 4355 *)
cannam@126 4356 ;;
cannam@126 4357 esac
cannam@126 4358 ;;
cannam@126 4359 interix*)
cannam@126 4360 # This is c89, which is MS Visual C++ (no shared libs)
cannam@126 4361 # Anyone wants to do a port?
cannam@126 4362 ;;
cannam@126 4363 irix5* | irix6* | nonstopux*)
cannam@126 4364 case $cc_basename in
cannam@126 4365 CC*)
cannam@126 4366 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@126 4367 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@126 4368 # CC pic flag -KPIC is the default.
cannam@126 4369 ;;
cannam@126 4370 *)
cannam@126 4371 ;;
cannam@126 4372 esac
cannam@126 4373 ;;
cannam@126 4374 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
cannam@126 4375 case $cc_basename in
cannam@126 4376 KCC*)
cannam@126 4377 # KAI C++ Compiler
cannam@126 4378 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
cannam@126 4379 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@126 4380 ;;
cannam@126 4381 ecpc* )
cannam@126 4382 # old Intel C++ for x86_64, which still supported -KPIC.
cannam@126 4383 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@126 4384 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@126 4385 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@126 4386 ;;
cannam@126 4387 icpc* )
cannam@126 4388 # Intel C++, used to be incompatible with GCC.
cannam@126 4389 # ICC 10 doesn't accept -KPIC any more.
cannam@126 4390 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@126 4391 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@126 4392 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@126 4393 ;;
cannam@126 4394 pgCC* | pgcpp*)
cannam@126 4395 # Portland Group C++ compiler
cannam@126 4396 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@126 4397 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
cannam@126 4398 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@126 4399 ;;
cannam@126 4400 cxx*)
cannam@126 4401 # Compaq C++
cannam@126 4402 # Make sure the PIC flag is empty. It appears that all Alpha
cannam@126 4403 # Linux and Compaq Tru64 Unix objects are PIC.
cannam@126 4404 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
cannam@126 4405 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@126 4406 ;;
cannam@126 4407 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
cannam@126 4408 # IBM XL 8.0, 9.0 on PPC and BlueGene
cannam@126 4409 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@126 4410 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
cannam@126 4411 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
cannam@126 4412 ;;
cannam@126 4413 *)
cannam@126 4414 case `$CC -V 2>&1 | sed 5q` in
cannam@126 4415 *Sun\ C*)
cannam@126 4416 # Sun C++ 5.9
cannam@126 4417 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@126 4418 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@126 4419 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
cannam@126 4420 ;;
cannam@126 4421 esac
cannam@126 4422 ;;
cannam@126 4423 esac
cannam@126 4424 ;;
cannam@126 4425 lynxos*)
cannam@126 4426 ;;
cannam@126 4427 m88k*)
cannam@126 4428 ;;
cannam@126 4429 mvs*)
cannam@126 4430 case $cc_basename in
cannam@126 4431 cxx*)
cannam@126 4432 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
cannam@126 4433 ;;
cannam@126 4434 *)
cannam@126 4435 ;;
cannam@126 4436 esac
cannam@126 4437 ;;
cannam@126 4438 netbsd* | netbsdelf*-gnu)
cannam@126 4439 ;;
cannam@126 4440 *qnx* | *nto*)
cannam@126 4441 # QNX uses GNU C++, but need to define -shared option too, otherwise
cannam@126 4442 # it will coredump.
cannam@126 4443 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
cannam@126 4444 ;;
cannam@126 4445 osf3* | osf4* | osf5*)
cannam@126 4446 case $cc_basename in
cannam@126 4447 KCC*)
cannam@126 4448 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
cannam@126 4449 ;;
cannam@126 4450 RCC*)
cannam@126 4451 # Rational C++ 2.4.1
cannam@126 4452 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
cannam@126 4453 ;;
cannam@126 4454 cxx*)
cannam@126 4455 # Digital/Compaq C++
cannam@126 4456 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@126 4457 # Make sure the PIC flag is empty. It appears that all Alpha
cannam@126 4458 # Linux and Compaq Tru64 Unix objects are PIC.
cannam@126 4459 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
cannam@126 4460 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@126 4461 ;;
cannam@126 4462 *)
cannam@126 4463 ;;
cannam@126 4464 esac
cannam@126 4465 ;;
cannam@126 4466 psos*)
cannam@126 4467 ;;
cannam@126 4468 solaris*)
cannam@126 4469 case $cc_basename in
cannam@126 4470 CC* | sunCC*)
cannam@126 4471 # Sun C++ 4.2, 5.x and Centerline C++
cannam@126 4472 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@126 4473 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@126 4474 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
cannam@126 4475 ;;
cannam@126 4476 gcx*)
cannam@126 4477 # Green Hills C++ Compiler
cannam@126 4478 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
cannam@126 4479 ;;
cannam@126 4480 *)
cannam@126 4481 ;;
cannam@126 4482 esac
cannam@126 4483 ;;
cannam@126 4484 sunos4*)
cannam@126 4485 case $cc_basename in
cannam@126 4486 CC*)
cannam@126 4487 # Sun C++ 4.x
cannam@126 4488 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
cannam@126 4489 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@126 4490 ;;
cannam@126 4491 lcc*)
cannam@126 4492 # Lucid
cannam@126 4493 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
cannam@126 4494 ;;
cannam@126 4495 *)
cannam@126 4496 ;;
cannam@126 4497 esac
cannam@126 4498 ;;
cannam@126 4499 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
cannam@126 4500 case $cc_basename in
cannam@126 4501 CC*)
cannam@126 4502 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@126 4503 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@126 4504 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@126 4505 ;;
cannam@126 4506 esac
cannam@126 4507 ;;
cannam@126 4508 tandem*)
cannam@126 4509 case $cc_basename in
cannam@126 4510 NCC*)
cannam@126 4511 # NonStop-UX NCC 3.20
cannam@126 4512 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@126 4513 ;;
cannam@126 4514 *)
cannam@126 4515 ;;
cannam@126 4516 esac
cannam@126 4517 ;;
cannam@126 4518 vxworks*)
cannam@126 4519 ;;
cannam@126 4520 *)
cannam@126 4521 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
cannam@126 4522 ;;
cannam@126 4523 esac
cannam@126 4524 fi
cannam@126 4525 ],
cannam@126 4526 [
cannam@126 4527 if test yes = "$GCC"; then
cannam@126 4528 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@126 4529 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@126 4530
cannam@126 4531 case $host_os in
cannam@126 4532 aix*)
cannam@126 4533 # All AIX code is PIC.
cannam@126 4534 if test ia64 = "$host_cpu"; then
cannam@126 4535 # AIX 5 now supports IA64 processor
cannam@126 4536 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@126 4537 fi
cannam@126 4538 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@126 4539 ;;
cannam@126 4540
cannam@126 4541 amigaos*)
cannam@126 4542 case $host_cpu in
cannam@126 4543 powerpc)
cannam@126 4544 # see comment about AmigaOS4 .so support
cannam@126 4545 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@126 4546 ;;
cannam@126 4547 m68k)
cannam@126 4548 # FIXME: we need at least 68020 code to build shared libraries, but
cannam@126 4549 # adding the '-m68020' flag to GCC prevents building anything better,
cannam@126 4550 # like '-m68040'.
cannam@126 4551 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
cannam@126 4552 ;;
cannam@126 4553 esac
cannam@126 4554 ;;
cannam@126 4555
cannam@126 4556 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
cannam@126 4557 # PIC is the default for these OSes.
cannam@126 4558 ;;
cannam@126 4559
cannam@126 4560 mingw* | cygwin* | pw32* | os2* | cegcc*)
cannam@126 4561 # This hack is so that the source file can tell whether it is being
cannam@126 4562 # built for inclusion in a dll (and should export symbols for example).
cannam@126 4563 # Although the cygwin gcc ignores -fPIC, still need this for old-style
cannam@126 4564 # (--disable-auto-import) libraries
cannam@126 4565 m4_if([$1], [GCJ], [],
cannam@126 4566 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
cannam@126 4567 case $host_os in
cannam@126 4568 os2*)
cannam@126 4569 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
cannam@126 4570 ;;
cannam@126 4571 esac
cannam@126 4572 ;;
cannam@126 4573
cannam@126 4574 darwin* | rhapsody*)
cannam@126 4575 # PIC is the default on this platform
cannam@126 4576 # Common symbols not allowed in MH_DYLIB files
cannam@126 4577 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
cannam@126 4578 ;;
cannam@126 4579
cannam@126 4580 haiku*)
cannam@126 4581 # PIC is the default for Haiku.
cannam@126 4582 # The "-static" flag exists, but is broken.
cannam@126 4583 _LT_TAGVAR(lt_prog_compiler_static, $1)=
cannam@126 4584 ;;
cannam@126 4585
cannam@126 4586 hpux*)
cannam@126 4587 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
cannam@126 4588 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
cannam@126 4589 # sets the default TLS model and affects inlining.
cannam@126 4590 case $host_cpu in
cannam@126 4591 hppa*64*)
cannam@126 4592 # +Z the default
cannam@126 4593 ;;
cannam@126 4594 *)
cannam@126 4595 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@126 4596 ;;
cannam@126 4597 esac
cannam@126 4598 ;;
cannam@126 4599
cannam@126 4600 interix[[3-9]]*)
cannam@126 4601 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
cannam@126 4602 # Instead, we relocate shared libraries at runtime.
cannam@126 4603 ;;
cannam@126 4604
cannam@126 4605 msdosdjgpp*)
cannam@126 4606 # Just because we use GCC doesn't mean we suddenly get shared libraries
cannam@126 4607 # on systems that don't support them.
cannam@126 4608 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
cannam@126 4609 enable_shared=no
cannam@126 4610 ;;
cannam@126 4611
cannam@126 4612 *nto* | *qnx*)
cannam@126 4613 # QNX uses GNU C++, but need to define -shared option too, otherwise
cannam@126 4614 # it will coredump.
cannam@126 4615 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
cannam@126 4616 ;;
cannam@126 4617
cannam@126 4618 sysv4*MP*)
cannam@126 4619 if test -d /usr/nec; then
cannam@126 4620 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
cannam@126 4621 fi
cannam@126 4622 ;;
cannam@126 4623
cannam@126 4624 *)
cannam@126 4625 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@126 4626 ;;
cannam@126 4627 esac
cannam@126 4628
cannam@126 4629 case $cc_basename in
cannam@126 4630 nvcc*) # Cuda Compiler Driver 2.2
cannam@126 4631 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
cannam@126 4632 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
cannam@126 4633 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
cannam@126 4634 fi
cannam@126 4635 ;;
cannam@126 4636 esac
cannam@126 4637 else
cannam@126 4638 # PORTME Check for flag to pass linker flags through the system compiler.
cannam@126 4639 case $host_os in
cannam@126 4640 aix*)
cannam@126 4641 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@126 4642 if test ia64 = "$host_cpu"; then
cannam@126 4643 # AIX 5 now supports IA64 processor
cannam@126 4644 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@126 4645 else
cannam@126 4646 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
cannam@126 4647 fi
cannam@126 4648 ;;
cannam@126 4649
cannam@126 4650 darwin* | rhapsody*)
cannam@126 4651 # PIC is the default on this platform
cannam@126 4652 # Common symbols not allowed in MH_DYLIB files
cannam@126 4653 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
cannam@126 4654 case $cc_basename in
cannam@126 4655 nagfor*)
cannam@126 4656 # NAG Fortran compiler
cannam@126 4657 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
cannam@126 4658 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
cannam@126 4659 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@126 4660 ;;
cannam@126 4661 esac
cannam@126 4662 ;;
cannam@126 4663
cannam@126 4664 mingw* | cygwin* | pw32* | os2* | cegcc*)
cannam@126 4665 # This hack is so that the source file can tell whether it is being
cannam@126 4666 # built for inclusion in a dll (and should export symbols for example).
cannam@126 4667 m4_if([$1], [GCJ], [],
cannam@126 4668 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
cannam@126 4669 case $host_os in
cannam@126 4670 os2*)
cannam@126 4671 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
cannam@126 4672 ;;
cannam@126 4673 esac
cannam@126 4674 ;;
cannam@126 4675
cannam@126 4676 hpux9* | hpux10* | hpux11*)
cannam@126 4677 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@126 4678 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
cannam@126 4679 # not for PA HP-UX.
cannam@126 4680 case $host_cpu in
cannam@126 4681 hppa*64*|ia64*)
cannam@126 4682 # +Z the default
cannam@126 4683 ;;
cannam@126 4684 *)
cannam@126 4685 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
cannam@126 4686 ;;
cannam@126 4687 esac
cannam@126 4688 # Is there a better lt_prog_compiler_static that works with the bundled CC?
cannam@126 4689 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
cannam@126 4690 ;;
cannam@126 4691
cannam@126 4692 irix5* | irix6* | nonstopux*)
cannam@126 4693 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@126 4694 # PIC (with -KPIC) is the default.
cannam@126 4695 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@126 4696 ;;
cannam@126 4697
cannam@126 4698 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
cannam@126 4699 case $cc_basename in
cannam@126 4700 # old Intel for x86_64, which still supported -KPIC.
cannam@126 4701 ecc*)
cannam@126 4702 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@126 4703 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@126 4704 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@126 4705 ;;
cannam@126 4706 # icc used to be incompatible with GCC.
cannam@126 4707 # ICC 10 doesn't accept -KPIC any more.
cannam@126 4708 icc* | ifort*)
cannam@126 4709 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@126 4710 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@126 4711 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@126 4712 ;;
cannam@126 4713 # Lahey Fortran 8.1.
cannam@126 4714 lf95*)
cannam@126 4715 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@126 4716 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
cannam@126 4717 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
cannam@126 4718 ;;
cannam@126 4719 nagfor*)
cannam@126 4720 # NAG Fortran compiler
cannam@126 4721 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
cannam@126 4722 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
cannam@126 4723 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@126 4724 ;;
cannam@126 4725 tcc*)
cannam@126 4726 # Fabrice Bellard et al's Tiny C Compiler
cannam@126 4727 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@126 4728 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@126 4729 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@126 4730 ;;
cannam@126 4731 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
cannam@126 4732 # Portland Group compilers (*not* the Pentium gcc compiler,
cannam@126 4733 # which looks to be a dead project)
cannam@126 4734 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@126 4735 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
cannam@126 4736 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@126 4737 ;;
cannam@126 4738 ccc*)
cannam@126 4739 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@126 4740 # All Alpha code is PIC.
cannam@126 4741 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@126 4742 ;;
cannam@126 4743 xl* | bgxl* | bgf* | mpixl*)
cannam@126 4744 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
cannam@126 4745 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@126 4746 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
cannam@126 4747 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
cannam@126 4748 ;;
cannam@126 4749 *)
cannam@126 4750 case `$CC -V 2>&1 | sed 5q` in
cannam@126 4751 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
cannam@126 4752 # Sun Fortran 8.3 passes all unrecognized flags to the linker
cannam@126 4753 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@126 4754 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@126 4755 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
cannam@126 4756 ;;
cannam@126 4757 *Sun\ F* | *Sun*Fortran*)
cannam@126 4758 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@126 4759 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@126 4760 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
cannam@126 4761 ;;
cannam@126 4762 *Sun\ C*)
cannam@126 4763 # Sun C 5.9
cannam@126 4764 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@126 4765 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@126 4766 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@126 4767 ;;
cannam@126 4768 *Intel*\ [[CF]]*Compiler*)
cannam@126 4769 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@126 4770 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@126 4771 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@126 4772 ;;
cannam@126 4773 *Portland\ Group*)
cannam@126 4774 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@126 4775 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
cannam@126 4776 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@126 4777 ;;
cannam@126 4778 esac
cannam@126 4779 ;;
cannam@126 4780 esac
cannam@126 4781 ;;
cannam@126 4782
cannam@126 4783 newsos6)
cannam@126 4784 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@126 4785 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@126 4786 ;;
cannam@126 4787
cannam@126 4788 *nto* | *qnx*)
cannam@126 4789 # QNX uses GNU C++, but need to define -shared option too, otherwise
cannam@126 4790 # it will coredump.
cannam@126 4791 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
cannam@126 4792 ;;
cannam@126 4793
cannam@126 4794 osf3* | osf4* | osf5*)
cannam@126 4795 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@126 4796 # All OSF/1 code is PIC.
cannam@126 4797 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@126 4798 ;;
cannam@126 4799
cannam@126 4800 rdos*)
cannam@126 4801 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@126 4802 ;;
cannam@126 4803
cannam@126 4804 solaris*)
cannam@126 4805 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@126 4806 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@126 4807 case $cc_basename in
cannam@126 4808 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
cannam@126 4809 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
cannam@126 4810 *)
cannam@126 4811 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
cannam@126 4812 esac
cannam@126 4813 ;;
cannam@126 4814
cannam@126 4815 sunos4*)
cannam@126 4816 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
cannam@126 4817 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
cannam@126 4818 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@126 4819 ;;
cannam@126 4820
cannam@126 4821 sysv4 | sysv4.2uw2* | sysv4.3*)
cannam@126 4822 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@126 4823 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@126 4824 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@126 4825 ;;
cannam@126 4826
cannam@126 4827 sysv4*MP*)
cannam@126 4828 if test -d /usr/nec; then
cannam@126 4829 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
cannam@126 4830 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@126 4831 fi
cannam@126 4832 ;;
cannam@126 4833
cannam@126 4834 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
cannam@126 4835 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@126 4836 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@126 4837 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@126 4838 ;;
cannam@126 4839
cannam@126 4840 unicos*)
cannam@126 4841 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@126 4842 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
cannam@126 4843 ;;
cannam@126 4844
cannam@126 4845 uts4*)
cannam@126 4846 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
cannam@126 4847 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@126 4848 ;;
cannam@126 4849
cannam@126 4850 *)
cannam@126 4851 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
cannam@126 4852 ;;
cannam@126 4853 esac
cannam@126 4854 fi
cannam@126 4855 ])
cannam@126 4856 case $host_os in
cannam@126 4857 # For platforms that do not support PIC, -DPIC is meaningless:
cannam@126 4858 *djgpp*)
cannam@126 4859 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
cannam@126 4860 ;;
cannam@126 4861 *)
cannam@126 4862 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
cannam@126 4863 ;;
cannam@126 4864 esac
cannam@126 4865
cannam@126 4866 AC_CACHE_CHECK([for $compiler option to produce PIC],
cannam@126 4867 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
cannam@126 4868 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
cannam@126 4869 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
cannam@126 4870
cannam@126 4871 #
cannam@126 4872 # Check to make sure the PIC flag actually works.
cannam@126 4873 #
cannam@126 4874 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
cannam@126 4875 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
cannam@126 4876 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
cannam@126 4877 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
cannam@126 4878 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
cannam@126 4879 "" | " "*) ;;
cannam@126 4880 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
cannam@126 4881 esac],
cannam@126 4882 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
cannam@126 4883 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
cannam@126 4884 fi
cannam@126 4885 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
cannam@126 4886 [Additional compiler flags for building library objects])
cannam@126 4887
cannam@126 4888 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
cannam@126 4889 [How to pass a linker flag through the compiler])
cannam@126 4890 #
cannam@126 4891 # Check to make sure the static flag actually works.
cannam@126 4892 #
cannam@126 4893 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
cannam@126 4894 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
cannam@126 4895 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
cannam@126 4896 $lt_tmp_static_flag,
cannam@126 4897 [],
cannam@126 4898 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
cannam@126 4899 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
cannam@126 4900 [Compiler flag to prevent dynamic linking])
cannam@126 4901 ])# _LT_COMPILER_PIC
cannam@126 4902
cannam@126 4903
cannam@126 4904 # _LT_LINKER_SHLIBS([TAGNAME])
cannam@126 4905 # ----------------------------
cannam@126 4906 # See if the linker supports building shared libraries.
cannam@126 4907 m4_defun([_LT_LINKER_SHLIBS],
cannam@126 4908 [AC_REQUIRE([LT_PATH_LD])dnl
cannam@126 4909 AC_REQUIRE([LT_PATH_NM])dnl
cannam@126 4910 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
cannam@126 4911 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@126 4912 m4_require([_LT_DECL_EGREP])dnl
cannam@126 4913 m4_require([_LT_DECL_SED])dnl
cannam@126 4914 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
cannam@126 4915 m4_require([_LT_TAG_COMPILER])dnl
cannam@126 4916 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
cannam@126 4917 m4_if([$1], [CXX], [
cannam@126 4918 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
cannam@126 4919 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
cannam@126 4920 case $host_os in
cannam@126 4921 aix[[4-9]]*)
cannam@126 4922 # If we're using GNU nm, then we don't want the "-C" option.
cannam@126 4923 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
cannam@126 4924 # Without the "-l" option, or with the "-B" option, AIX nm treats
cannam@126 4925 # weak defined symbols like other global defined symbols, whereas
cannam@126 4926 # GNU nm marks them as "W".
cannam@126 4927 # While the 'weak' keyword is ignored in the Export File, we need
cannam@126 4928 # it in the Import File for the 'aix-soname' feature, so we have
cannam@126 4929 # to replace the "-B" option with "-P" for AIX nm.
cannam@126 4930 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
cannam@126 4931 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
cannam@126 4932 else
cannam@126 4933 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
cannam@126 4934 fi
cannam@126 4935 ;;
cannam@126 4936 pw32*)
cannam@126 4937 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
cannam@126 4938 ;;
cannam@126 4939 cygwin* | mingw* | cegcc*)
cannam@126 4940 case $cc_basename in
cannam@126 4941 cl*)
cannam@126 4942 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
cannam@126 4943 ;;
cannam@126 4944 *)
cannam@126 4945 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
cannam@126 4946 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
cannam@126 4947 ;;
cannam@126 4948 esac
cannam@126 4949 ;;
cannam@126 4950 linux* | k*bsd*-gnu | gnu*)
cannam@126 4951 _LT_TAGVAR(link_all_deplibs, $1)=no
cannam@126 4952 ;;
cannam@126 4953 *)
cannam@126 4954 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
cannam@126 4955 ;;
cannam@126 4956 esac
cannam@126 4957 ], [
cannam@126 4958 runpath_var=
cannam@126 4959 _LT_TAGVAR(allow_undefined_flag, $1)=
cannam@126 4960 _LT_TAGVAR(always_export_symbols, $1)=no
cannam@126 4961 _LT_TAGVAR(archive_cmds, $1)=
cannam@126 4962 _LT_TAGVAR(archive_expsym_cmds, $1)=
cannam@126 4963 _LT_TAGVAR(compiler_needs_object, $1)=no
cannam@126 4964 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
cannam@126 4965 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
cannam@126 4966 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
cannam@126 4967 _LT_TAGVAR(hardcode_automatic, $1)=no
cannam@126 4968 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@126 4969 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
cannam@126 4970 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
cannam@126 4971 _LT_TAGVAR(hardcode_libdir_separator, $1)=
cannam@126 4972 _LT_TAGVAR(hardcode_minus_L, $1)=no
cannam@126 4973 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
cannam@126 4974 _LT_TAGVAR(inherit_rpath, $1)=no
cannam@126 4975 _LT_TAGVAR(link_all_deplibs, $1)=unknown
cannam@126 4976 _LT_TAGVAR(module_cmds, $1)=
cannam@126 4977 _LT_TAGVAR(module_expsym_cmds, $1)=
cannam@126 4978 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
cannam@126 4979 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
cannam@126 4980 _LT_TAGVAR(thread_safe_flag_spec, $1)=
cannam@126 4981 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@126 4982 # include_expsyms should be a list of space-separated symbols to be *always*
cannam@126 4983 # included in the symbol list
cannam@126 4984 _LT_TAGVAR(include_expsyms, $1)=
cannam@126 4985 # exclude_expsyms can be an extended regexp of symbols to exclude
cannam@126 4986 # it will be wrapped by ' (' and ')$', so one must not match beginning or
cannam@126 4987 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
cannam@126 4988 # as well as any symbol that contains 'd'.
cannam@126 4989 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
cannam@126 4990 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
cannam@126 4991 # platforms (ab)use it in PIC code, but their linkers get confused if
cannam@126 4992 # the symbol is explicitly referenced. Since portable code cannot
cannam@126 4993 # rely on this symbol name, it's probably fine to never include it in
cannam@126 4994 # preloaded symbol tables.
cannam@126 4995 # Exclude shared library initialization/finalization symbols.
cannam@126 4996 dnl Note also adjust exclude_expsyms for C++ above.
cannam@126 4997 extract_expsyms_cmds=
cannam@126 4998
cannam@126 4999 case $host_os in
cannam@126 5000 cygwin* | mingw* | pw32* | cegcc*)
cannam@126 5001 # FIXME: the MSVC++ port hasn't been tested in a loooong time
cannam@126 5002 # When not using gcc, we currently assume that we are using
cannam@126 5003 # Microsoft Visual C++.
cannam@126 5004 if test yes != "$GCC"; then
cannam@126 5005 with_gnu_ld=no
cannam@126 5006 fi
cannam@126 5007 ;;
cannam@126 5008 interix*)
cannam@126 5009 # we just hope/assume this is gcc and not c89 (= MSVC++)
cannam@126 5010 with_gnu_ld=yes
cannam@126 5011 ;;
cannam@126 5012 openbsd* | bitrig*)
cannam@126 5013 with_gnu_ld=no
cannam@126 5014 ;;
cannam@126 5015 linux* | k*bsd*-gnu | gnu*)
cannam@126 5016 _LT_TAGVAR(link_all_deplibs, $1)=no
cannam@126 5017 ;;
cannam@126 5018 esac
cannam@126 5019
cannam@126 5020 _LT_TAGVAR(ld_shlibs, $1)=yes
cannam@126 5021
cannam@126 5022 # On some targets, GNU ld is compatible enough with the native linker
cannam@126 5023 # that we're better off using the native interface for both.
cannam@126 5024 lt_use_gnu_ld_interface=no
cannam@126 5025 if test yes = "$with_gnu_ld"; then
cannam@126 5026 case $host_os in
cannam@126 5027 aix*)
cannam@126 5028 # The AIX port of GNU ld has always aspired to compatibility
cannam@126 5029 # with the native linker. However, as the warning in the GNU ld
cannam@126 5030 # block says, versions before 2.19.5* couldn't really create working
cannam@126 5031 # shared libraries, regardless of the interface used.
cannam@126 5032 case `$LD -v 2>&1` in
cannam@126 5033 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
cannam@126 5034 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
cannam@126 5035 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
cannam@126 5036 *)
cannam@126 5037 lt_use_gnu_ld_interface=yes
cannam@126 5038 ;;
cannam@126 5039 esac
cannam@126 5040 ;;
cannam@126 5041 *)
cannam@126 5042 lt_use_gnu_ld_interface=yes
cannam@126 5043 ;;
cannam@126 5044 esac
cannam@126 5045 fi
cannam@126 5046
cannam@126 5047 if test yes = "$lt_use_gnu_ld_interface"; then
cannam@126 5048 # If archive_cmds runs LD, not CC, wlarc should be empty
cannam@126 5049 wlarc='$wl'
cannam@126 5050
cannam@126 5051 # Set some defaults for GNU ld with shared library support. These
cannam@126 5052 # are reset later if shared libraries are not supported. Putting them
cannam@126 5053 # here allows them to be overridden if necessary.
cannam@126 5054 runpath_var=LD_RUN_PATH
cannam@126 5055 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@126 5056 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
cannam@126 5057 # ancient GNU ld didn't support --whole-archive et. al.
cannam@126 5058 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
cannam@126 5059 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
cannam@126 5060 else
cannam@126 5061 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@126 5062 fi
cannam@126 5063 supports_anon_versioning=no
cannam@126 5064 case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
cannam@126 5065 *GNU\ gold*) supports_anon_versioning=yes ;;
cannam@126 5066 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
cannam@126 5067 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
cannam@126 5068 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
cannam@126 5069 *\ 2.11.*) ;; # other 2.11 versions
cannam@126 5070 *) supports_anon_versioning=yes ;;
cannam@126 5071 esac
cannam@126 5072
cannam@126 5073 # See if GNU ld supports shared libraries.
cannam@126 5074 case $host_os in
cannam@126 5075 aix[[3-9]]*)
cannam@126 5076 # On AIX/PPC, the GNU linker is very broken
cannam@126 5077 if test ia64 != "$host_cpu"; then
cannam@126 5078 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 5079 cat <<_LT_EOF 1>&2
cannam@126 5080
cannam@126 5081 *** Warning: the GNU linker, at least up to release 2.19, is reported
cannam@126 5082 *** to be unable to reliably create shared libraries on AIX.
cannam@126 5083 *** Therefore, libtool is disabling shared libraries support. If you
cannam@126 5084 *** really care for shared libraries, you may want to install binutils
cannam@126 5085 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
cannam@126 5086 *** You will then need to restart the configuration process.
cannam@126 5087
cannam@126 5088 _LT_EOF
cannam@126 5089 fi
cannam@126 5090 ;;
cannam@126 5091
cannam@126 5092 amigaos*)
cannam@126 5093 case $host_cpu in
cannam@126 5094 powerpc)
cannam@126 5095 # see comment about AmigaOS4 .so support
cannam@126 5096 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@126 5097 _LT_TAGVAR(archive_expsym_cmds, $1)=''
cannam@126 5098 ;;
cannam@126 5099 m68k)
cannam@126 5100 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
cannam@126 5101 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@126 5102 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@126 5103 ;;
cannam@126 5104 esac
cannam@126 5105 ;;
cannam@126 5106
cannam@126 5107 beos*)
cannam@126 5108 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
cannam@126 5109 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@126 5110 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
cannam@126 5111 # support --undefined. This deserves some investigation. FIXME
cannam@126 5112 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@126 5113 else
cannam@126 5114 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 5115 fi
cannam@126 5116 ;;
cannam@126 5117
cannam@126 5118 cygwin* | mingw* | pw32* | cegcc*)
cannam@126 5119 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
cannam@126 5120 # as there is no search path for DLLs.
cannam@126 5121 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@126 5122 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
cannam@126 5123 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@126 5124 _LT_TAGVAR(always_export_symbols, $1)=no
cannam@126 5125 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@126 5126 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
cannam@126 5127 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
cannam@126 5128
cannam@126 5129 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
cannam@126 5130 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
cannam@126 5131 # If the export-symbols file already is a .def file, use it as
cannam@126 5132 # is; otherwise, prepend EXPORTS...
cannam@126 5133 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
cannam@126 5134 cp $export_symbols $output_objdir/$soname.def;
cannam@126 5135 else
cannam@126 5136 echo EXPORTS > $output_objdir/$soname.def;
cannam@126 5137 cat $export_symbols >> $output_objdir/$soname.def;
cannam@126 5138 fi~
cannam@126 5139 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
cannam@126 5140 else
cannam@126 5141 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 5142 fi
cannam@126 5143 ;;
cannam@126 5144
cannam@126 5145 haiku*)
cannam@126 5146 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@126 5147 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@126 5148 ;;
cannam@126 5149
cannam@126 5150 os2*)
cannam@126 5151 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@126 5152 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@126 5153 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@126 5154 shrext_cmds=.dll
cannam@126 5155 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
cannam@126 5156 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
cannam@126 5157 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
cannam@126 5158 $ECHO EXPORTS >> $output_objdir/$libname.def~
cannam@126 5159 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
cannam@126 5160 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
cannam@126 5161 emximp -o $lib $output_objdir/$libname.def'
cannam@126 5162 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
cannam@126 5163 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
cannam@126 5164 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
cannam@126 5165 $ECHO EXPORTS >> $output_objdir/$libname.def~
cannam@126 5166 prefix_cmds="$SED"~
cannam@126 5167 if test EXPORTS = "`$SED 1q $export_symbols`"; then
cannam@126 5168 prefix_cmds="$prefix_cmds -e 1d";
cannam@126 5169 fi~
cannam@126 5170 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
cannam@126 5171 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
cannam@126 5172 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
cannam@126 5173 emximp -o $lib $output_objdir/$libname.def'
cannam@126 5174 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
cannam@126 5175 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@126 5176 ;;
cannam@126 5177
cannam@126 5178 interix[[3-9]]*)
cannam@126 5179 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@126 5180 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@126 5181 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
cannam@126 5182 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
cannam@126 5183 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
cannam@126 5184 # Instead, shared libraries are loaded at an image base (0x10000000 by
cannam@126 5185 # default) and relocated if they conflict, which is a slow very memory
cannam@126 5186 # consuming and fragmenting process. To avoid this, we pick a random,
cannam@126 5187 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
cannam@126 5188 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
cannam@126 5189 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
cannam@126 5190 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
cannam@126 5191 ;;
cannam@126 5192
cannam@126 5193 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
cannam@126 5194 tmp_diet=no
cannam@126 5195 if test linux-dietlibc = "$host_os"; then
cannam@126 5196 case $cc_basename in
cannam@126 5197 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
cannam@126 5198 esac
cannam@126 5199 fi
cannam@126 5200 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
cannam@126 5201 && test no = "$tmp_diet"
cannam@126 5202 then
cannam@126 5203 tmp_addflag=' $pic_flag'
cannam@126 5204 tmp_sharedflag='-shared'
cannam@126 5205 case $cc_basename,$host_cpu in
cannam@126 5206 pgcc*) # Portland Group C compiler
cannam@126 5207 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
cannam@126 5208 tmp_addflag=' $pic_flag'
cannam@126 5209 ;;
cannam@126 5210 pgf77* | pgf90* | pgf95* | pgfortran*)
cannam@126 5211 # Portland Group f77 and f90 compilers
cannam@126 5212 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
cannam@126 5213 tmp_addflag=' $pic_flag -Mnomain' ;;
cannam@126 5214 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
cannam@126 5215 tmp_addflag=' -i_dynamic' ;;
cannam@126 5216 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
cannam@126 5217 tmp_addflag=' -i_dynamic -nofor_main' ;;
cannam@126 5218 ifc* | ifort*) # Intel Fortran compiler
cannam@126 5219 tmp_addflag=' -nofor_main' ;;
cannam@126 5220 lf95*) # Lahey Fortran 8.1
cannam@126 5221 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@126 5222 tmp_sharedflag='--shared' ;;
cannam@126 5223 nagfor*) # NAGFOR 5.3
cannam@126 5224 tmp_sharedflag='-Wl,-shared' ;;
cannam@126 5225 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
cannam@126 5226 tmp_sharedflag='-qmkshrobj'
cannam@126 5227 tmp_addflag= ;;
cannam@126 5228 nvcc*) # Cuda Compiler Driver 2.2
cannam@126 5229 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
cannam@126 5230 _LT_TAGVAR(compiler_needs_object, $1)=yes
cannam@126 5231 ;;
cannam@126 5232 esac
cannam@126 5233 case `$CC -V 2>&1 | sed 5q` in
cannam@126 5234 *Sun\ C*) # Sun C 5.9
cannam@126 5235 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
cannam@126 5236 _LT_TAGVAR(compiler_needs_object, $1)=yes
cannam@126 5237 tmp_sharedflag='-G' ;;
cannam@126 5238 *Sun\ F*) # Sun Fortran 8.3
cannam@126 5239 tmp_sharedflag='-G' ;;
cannam@126 5240 esac
cannam@126 5241 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@126 5242
cannam@126 5243 if test yes = "$supports_anon_versioning"; then
cannam@126 5244 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
cannam@126 5245 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
cannam@126 5246 echo "local: *; };" >> $output_objdir/$libname.ver~
cannam@126 5247 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
cannam@126 5248 fi
cannam@126 5249
cannam@126 5250 case $cc_basename in
cannam@126 5251 tcc*)
cannam@126 5252 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
cannam@126 5253 ;;
cannam@126 5254 xlf* | bgf* | bgxlf* | mpixlf*)
cannam@126 5255 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
cannam@126 5256 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
cannam@126 5257 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@126 5258 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
cannam@126 5259 if test yes = "$supports_anon_versioning"; then
cannam@126 5260 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
cannam@126 5261 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
cannam@126 5262 echo "local: *; };" >> $output_objdir/$libname.ver~
cannam@126 5263 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
cannam@126 5264 fi
cannam@126 5265 ;;
cannam@126 5266 esac
cannam@126 5267 else
cannam@126 5268 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 5269 fi
cannam@126 5270 ;;
cannam@126 5271
cannam@126 5272 netbsd* | netbsdelf*-gnu)
cannam@126 5273 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
cannam@126 5274 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
cannam@126 5275 wlarc=
cannam@126 5276 else
cannam@126 5277 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@126 5278 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
cannam@126 5279 fi
cannam@126 5280 ;;
cannam@126 5281
cannam@126 5282 solaris*)
cannam@126 5283 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
cannam@126 5284 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 5285 cat <<_LT_EOF 1>&2
cannam@126 5286
cannam@126 5287 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
cannam@126 5288 *** create shared libraries on Solaris systems. Therefore, libtool
cannam@126 5289 *** is disabling shared libraries support. We urge you to upgrade GNU
cannam@126 5290 *** binutils to release 2.9.1 or newer. Another option is to modify
cannam@126 5291 *** your PATH or compiler configuration so that the native linker is
cannam@126 5292 *** used, and then restart.
cannam@126 5293
cannam@126 5294 _LT_EOF
cannam@126 5295 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
cannam@126 5296 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@126 5297 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
cannam@126 5298 else
cannam@126 5299 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 5300 fi
cannam@126 5301 ;;
cannam@126 5302
cannam@126 5303 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
cannam@126 5304 case `$LD -v 2>&1` in
cannam@126 5305 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
cannam@126 5306 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 5307 cat <<_LT_EOF 1>&2
cannam@126 5308
cannam@126 5309 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
cannam@126 5310 *** reliably create shared libraries on SCO systems. Therefore, libtool
cannam@126 5311 *** is disabling shared libraries support. We urge you to upgrade GNU
cannam@126 5312 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
cannam@126 5313 *** your PATH or compiler configuration so that the native linker is
cannam@126 5314 *** used, and then restart.
cannam@126 5315
cannam@126 5316 _LT_EOF
cannam@126 5317 ;;
cannam@126 5318 *)
cannam@126 5319 # For security reasons, it is highly recommended that you always
cannam@126 5320 # use absolute paths for naming shared libraries, and exclude the
cannam@126 5321 # DT_RUNPATH tag from executables and libraries. But doing so
cannam@126 5322 # requires that you compile everything twice, which is a pain.
cannam@126 5323 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
cannam@126 5324 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@126 5325 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@126 5326 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
cannam@126 5327 else
cannam@126 5328 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 5329 fi
cannam@126 5330 ;;
cannam@126 5331 esac
cannam@126 5332 ;;
cannam@126 5333
cannam@126 5334 sunos4*)
cannam@126 5335 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
cannam@126 5336 wlarc=
cannam@126 5337 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@126 5338 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@126 5339 ;;
cannam@126 5340
cannam@126 5341 *)
cannam@126 5342 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
cannam@126 5343 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@126 5344 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
cannam@126 5345 else
cannam@126 5346 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 5347 fi
cannam@126 5348 ;;
cannam@126 5349 esac
cannam@126 5350
cannam@126 5351 if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
cannam@126 5352 runpath_var=
cannam@126 5353 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
cannam@126 5354 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
cannam@126 5355 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@126 5356 fi
cannam@126 5357 else
cannam@126 5358 # PORTME fill in a description of your system's linker (not GNU ld)
cannam@126 5359 case $host_os in
cannam@126 5360 aix3*)
cannam@126 5361 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@126 5362 _LT_TAGVAR(always_export_symbols, $1)=yes
cannam@126 5363 _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
cannam@126 5364 # Note: this linker hardcodes the directories in LIBPATH if there
cannam@126 5365 # are no directories specified by -L.
cannam@126 5366 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@126 5367 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
cannam@126 5368 # Neither direct hardcoding nor static linking is supported with a
cannam@126 5369 # broken collect2.
cannam@126 5370 _LT_TAGVAR(hardcode_direct, $1)=unsupported
cannam@126 5371 fi
cannam@126 5372 ;;
cannam@126 5373
cannam@126 5374 aix[[4-9]]*)
cannam@126 5375 if test ia64 = "$host_cpu"; then
cannam@126 5376 # On IA64, the linker does run time linking by default, so we don't
cannam@126 5377 # have to do anything special.
cannam@126 5378 aix_use_runtimelinking=no
cannam@126 5379 exp_sym_flag='-Bexport'
cannam@126 5380 no_entry_flag=
cannam@126 5381 else
cannam@126 5382 # If we're using GNU nm, then we don't want the "-C" option.
cannam@126 5383 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
cannam@126 5384 # Without the "-l" option, or with the "-B" option, AIX nm treats
cannam@126 5385 # weak defined symbols like other global defined symbols, whereas
cannam@126 5386 # GNU nm marks them as "W".
cannam@126 5387 # While the 'weak' keyword is ignored in the Export File, we need
cannam@126 5388 # it in the Import File for the 'aix-soname' feature, so we have
cannam@126 5389 # to replace the "-B" option with "-P" for AIX nm.
cannam@126 5390 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
cannam@126 5391 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
cannam@126 5392 else
cannam@126 5393 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
cannam@126 5394 fi
cannam@126 5395 aix_use_runtimelinking=no
cannam@126 5396
cannam@126 5397 # Test if we are trying to use run time linking or normal
cannam@126 5398 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
cannam@126 5399 # have runtime linking enabled, and use it for executables.
cannam@126 5400 # For shared libraries, we enable/disable runtime linking
cannam@126 5401 # depending on the kind of the shared library created -
cannam@126 5402 # when "with_aix_soname,aix_use_runtimelinking" is:
cannam@126 5403 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
cannam@126 5404 # "aix,yes" lib.so shared, rtl:yes, for executables
cannam@126 5405 # lib.a static archive
cannam@126 5406 # "both,no" lib.so.V(shr.o) shared, rtl:yes
cannam@126 5407 # lib.a(lib.so.V) shared, rtl:no, for executables
cannam@126 5408 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
cannam@126 5409 # lib.a(lib.so.V) shared, rtl:no
cannam@126 5410 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
cannam@126 5411 # lib.a static archive
cannam@126 5412 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
cannam@126 5413 for ld_flag in $LDFLAGS; do
cannam@126 5414 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
cannam@126 5415 aix_use_runtimelinking=yes
cannam@126 5416 break
cannam@126 5417 fi
cannam@126 5418 done
cannam@126 5419 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
cannam@126 5420 # With aix-soname=svr4, we create the lib.so.V shared archives only,
cannam@126 5421 # so we don't have lib.a shared libs to link our executables.
cannam@126 5422 # We have to force runtime linking in this case.
cannam@126 5423 aix_use_runtimelinking=yes
cannam@126 5424 LDFLAGS="$LDFLAGS -Wl,-brtl"
cannam@126 5425 fi
cannam@126 5426 ;;
cannam@126 5427 esac
cannam@126 5428
cannam@126 5429 exp_sym_flag='-bexport'
cannam@126 5430 no_entry_flag='-bnoentry'
cannam@126 5431 fi
cannam@126 5432
cannam@126 5433 # When large executables or shared objects are built, AIX ld can
cannam@126 5434 # have problems creating the table of contents. If linking a library
cannam@126 5435 # or program results in "error TOC overflow" add -mminimal-toc to
cannam@126 5436 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
cannam@126 5437 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
cannam@126 5438
cannam@126 5439 _LT_TAGVAR(archive_cmds, $1)=''
cannam@126 5440 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@126 5441 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
cannam@126 5442 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
cannam@126 5443 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@126 5444 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
cannam@126 5445 case $with_aix_soname,$aix_use_runtimelinking in
cannam@126 5446 aix,*) ;; # traditional, no import file
cannam@126 5447 svr4,* | *,yes) # use import file
cannam@126 5448 # The Import File defines what to hardcode.
cannam@126 5449 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@126 5450 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
cannam@126 5451 ;;
cannam@126 5452 esac
cannam@126 5453
cannam@126 5454 if test yes = "$GCC"; then
cannam@126 5455 case $host_os in aix4.[[012]]|aix4.[[012]].*)
cannam@126 5456 # We only want to do this on AIX 4.2 and lower, the check
cannam@126 5457 # below for broken collect2 doesn't work under 4.3+
cannam@126 5458 collect2name=`$CC -print-prog-name=collect2`
cannam@126 5459 if test -f "$collect2name" &&
cannam@126 5460 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
cannam@126 5461 then
cannam@126 5462 # We have reworked collect2
cannam@126 5463 :
cannam@126 5464 else
cannam@126 5465 # We have old collect2
cannam@126 5466 _LT_TAGVAR(hardcode_direct, $1)=unsupported
cannam@126 5467 # It fails to find uninstalled libraries when the uninstalled
cannam@126 5468 # path is not listed in the libpath. Setting hardcode_minus_L
cannam@126 5469 # to unsupported forces relinking
cannam@126 5470 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@126 5471 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@126 5472 _LT_TAGVAR(hardcode_libdir_separator, $1)=
cannam@126 5473 fi
cannam@126 5474 ;;
cannam@126 5475 esac
cannam@126 5476 shared_flag='-shared'
cannam@126 5477 if test yes = "$aix_use_runtimelinking"; then
cannam@126 5478 shared_flag="$shared_flag "'$wl-G'
cannam@126 5479 fi
cannam@126 5480 # Need to ensure runtime linking is disabled for the traditional
cannam@126 5481 # shared library, or the linker may eventually find shared libraries
cannam@126 5482 # /with/ Import File - we do not want to mix them.
cannam@126 5483 shared_flag_aix='-shared'
cannam@126 5484 shared_flag_svr4='-shared $wl-G'
cannam@126 5485 else
cannam@126 5486 # not using gcc
cannam@126 5487 if test ia64 = "$host_cpu"; then
cannam@126 5488 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
cannam@126 5489 # chokes on -Wl,-G. The following line is correct:
cannam@126 5490 shared_flag='-G'
cannam@126 5491 else
cannam@126 5492 if test yes = "$aix_use_runtimelinking"; then
cannam@126 5493 shared_flag='$wl-G'
cannam@126 5494 else
cannam@126 5495 shared_flag='$wl-bM:SRE'
cannam@126 5496 fi
cannam@126 5497 shared_flag_aix='$wl-bM:SRE'
cannam@126 5498 shared_flag_svr4='$wl-G'
cannam@126 5499 fi
cannam@126 5500 fi
cannam@126 5501
cannam@126 5502 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
cannam@126 5503 # It seems that -bexpall does not export symbols beginning with
cannam@126 5504 # underscore (_), so it is better to generate a list of symbols to export.
cannam@126 5505 _LT_TAGVAR(always_export_symbols, $1)=yes
cannam@126 5506 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
cannam@126 5507 # Warning - without using the other runtime loading flags (-brtl),
cannam@126 5508 # -berok will link without error, but may produce a broken library.
cannam@126 5509 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
cannam@126 5510 # Determine the default libpath from the value encoded in an
cannam@126 5511 # empty executable.
cannam@126 5512 _LT_SYS_MODULE_PATH_AIX([$1])
cannam@126 5513 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
cannam@126 5514 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
cannam@126 5515 else
cannam@126 5516 if test ia64 = "$host_cpu"; then
cannam@126 5517 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
cannam@126 5518 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
cannam@126 5519 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
cannam@126 5520 else
cannam@126 5521 # Determine the default libpath from the value encoded in an
cannam@126 5522 # empty executable.
cannam@126 5523 _LT_SYS_MODULE_PATH_AIX([$1])
cannam@126 5524 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
cannam@126 5525 # Warning - without using the other run time loading flags,
cannam@126 5526 # -berok will link without error, but may produce a broken library.
cannam@126 5527 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
cannam@126 5528 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
cannam@126 5529 if test yes = "$with_gnu_ld"; then
cannam@126 5530 # We only use this code for GNU lds that support --whole-archive.
cannam@126 5531 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
cannam@126 5532 else
cannam@126 5533 # Exported symbols can be pulled into shared objects from archives
cannam@126 5534 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
cannam@126 5535 fi
cannam@126 5536 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
cannam@126 5537 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
cannam@126 5538 # -brtl affects multiple linker settings, -berok does not and is overridden later
cannam@126 5539 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
cannam@126 5540 if test svr4 != "$with_aix_soname"; then
cannam@126 5541 # This is similar to how AIX traditionally builds its shared libraries.
cannam@126 5542 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
cannam@126 5543 fi
cannam@126 5544 if test aix != "$with_aix_soname"; then
cannam@126 5545 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
cannam@126 5546 else
cannam@126 5547 # used by -dlpreopen to get the symbols
cannam@126 5548 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
cannam@126 5549 fi
cannam@126 5550 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
cannam@126 5551 fi
cannam@126 5552 fi
cannam@126 5553 ;;
cannam@126 5554
cannam@126 5555 amigaos*)
cannam@126 5556 case $host_cpu in
cannam@126 5557 powerpc)
cannam@126 5558 # see comment about AmigaOS4 .so support
cannam@126 5559 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@126 5560 _LT_TAGVAR(archive_expsym_cmds, $1)=''
cannam@126 5561 ;;
cannam@126 5562 m68k)
cannam@126 5563 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
cannam@126 5564 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@126 5565 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@126 5566 ;;
cannam@126 5567 esac
cannam@126 5568 ;;
cannam@126 5569
cannam@126 5570 bsdi[[45]]*)
cannam@126 5571 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
cannam@126 5572 ;;
cannam@126 5573
cannam@126 5574 cygwin* | mingw* | pw32* | cegcc*)
cannam@126 5575 # When not using gcc, we currently assume that we are using
cannam@126 5576 # Microsoft Visual C++.
cannam@126 5577 # hardcode_libdir_flag_spec is actually meaningless, as there is
cannam@126 5578 # no search path for DLLs.
cannam@126 5579 case $cc_basename in
cannam@126 5580 cl*)
cannam@126 5581 # Native MSVC
cannam@126 5582 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
cannam@126 5583 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@126 5584 _LT_TAGVAR(always_export_symbols, $1)=yes
cannam@126 5585 _LT_TAGVAR(file_list_spec, $1)='@'
cannam@126 5586 # Tell ltmain to make .lib files, not .a files.
cannam@126 5587 libext=lib
cannam@126 5588 # Tell ltmain to make .dll files, not .so files.
cannam@126 5589 shrext_cmds=.dll
cannam@126 5590 # FIXME: Setting linknames here is a bad hack.
cannam@126 5591 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
cannam@126 5592 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
cannam@126 5593 cp "$export_symbols" "$output_objdir/$soname.def";
cannam@126 5594 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
cannam@126 5595 else
cannam@126 5596 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
cannam@126 5597 fi~
cannam@126 5598 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
cannam@126 5599 linknames='
cannam@126 5600 # The linker will not automatically build a static lib if we build a DLL.
cannam@126 5601 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
cannam@126 5602 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@126 5603 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
cannam@126 5604 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
cannam@126 5605 # Don't use ranlib
cannam@126 5606 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
cannam@126 5607 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
cannam@126 5608 lt_tool_outputfile="@TOOL_OUTPUT@"~
cannam@126 5609 case $lt_outputfile in
cannam@126 5610 *.exe|*.EXE) ;;
cannam@126 5611 *)
cannam@126 5612 lt_outputfile=$lt_outputfile.exe
cannam@126 5613 lt_tool_outputfile=$lt_tool_outputfile.exe
cannam@126 5614 ;;
cannam@126 5615 esac~
cannam@126 5616 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
cannam@126 5617 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
cannam@126 5618 $RM "$lt_outputfile.manifest";
cannam@126 5619 fi'
cannam@126 5620 ;;
cannam@126 5621 *)
cannam@126 5622 # Assume MSVC wrapper
cannam@126 5623 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
cannam@126 5624 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@126 5625 # Tell ltmain to make .lib files, not .a files.
cannam@126 5626 libext=lib
cannam@126 5627 # Tell ltmain to make .dll files, not .so files.
cannam@126 5628 shrext_cmds=.dll
cannam@126 5629 # FIXME: Setting linknames here is a bad hack.
cannam@126 5630 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
cannam@126 5631 # The linker will automatically build a .lib file if we build a DLL.
cannam@126 5632 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
cannam@126 5633 # FIXME: Should let the user specify the lib program.
cannam@126 5634 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
cannam@126 5635 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@126 5636 ;;
cannam@126 5637 esac
cannam@126 5638 ;;
cannam@126 5639
cannam@126 5640 darwin* | rhapsody*)
cannam@126 5641 _LT_DARWIN_LINKER_FEATURES($1)
cannam@126 5642 ;;
cannam@126 5643
cannam@126 5644 dgux*)
cannam@126 5645 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@126 5646 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@126 5647 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@126 5648 ;;
cannam@126 5649
cannam@126 5650 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
cannam@126 5651 # support. Future versions do this automatically, but an explicit c++rt0.o
cannam@126 5652 # does not break anything, and helps significantly (at the cost of a little
cannam@126 5653 # extra space).
cannam@126 5654 freebsd2.2*)
cannam@126 5655 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
cannam@126 5656 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@126 5657 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@126 5658 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@126 5659 ;;
cannam@126 5660
cannam@126 5661 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
cannam@126 5662 freebsd2.*)
cannam@126 5663 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
cannam@126 5664 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@126 5665 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@126 5666 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@126 5667 ;;
cannam@126 5668
cannam@126 5669 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
cannam@126 5670 freebsd* | dragonfly*)
cannam@126 5671 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
cannam@126 5672 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@126 5673 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@126 5674 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@126 5675 ;;
cannam@126 5676
cannam@126 5677 hpux9*)
cannam@126 5678 if test yes = "$GCC"; then
cannam@126 5679 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
cannam@126 5680 else
cannam@126 5681 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
cannam@126 5682 fi
cannam@126 5683 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
cannam@126 5684 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@126 5685 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@126 5686
cannam@126 5687 # hardcode_minus_L: Not really in the search PATH,
cannam@126 5688 # but as the default location of the library.
cannam@126 5689 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@126 5690 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
cannam@126 5691 ;;
cannam@126 5692
cannam@126 5693 hpux10*)
cannam@126 5694 if test yes,no = "$GCC,$with_gnu_ld"; then
cannam@126 5695 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
cannam@126 5696 else
cannam@126 5697 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
cannam@126 5698 fi
cannam@126 5699 if test no = "$with_gnu_ld"; then
cannam@126 5700 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
cannam@126 5701 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@126 5702 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@126 5703 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
cannam@126 5704 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
cannam@126 5705 # hardcode_minus_L: Not really in the search PATH,
cannam@126 5706 # but as the default location of the library.
cannam@126 5707 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@126 5708 fi
cannam@126 5709 ;;
cannam@126 5710
cannam@126 5711 hpux11*)
cannam@126 5712 if test yes,no = "$GCC,$with_gnu_ld"; then
cannam@126 5713 case $host_cpu in
cannam@126 5714 hppa*64*)
cannam@126 5715 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@126 5716 ;;
cannam@126 5717 ia64*)
cannam@126 5718 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
cannam@126 5719 ;;
cannam@126 5720 *)
cannam@126 5721 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
cannam@126 5722 ;;
cannam@126 5723 esac
cannam@126 5724 else
cannam@126 5725 case $host_cpu in
cannam@126 5726 hppa*64*)
cannam@126 5727 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@126 5728 ;;
cannam@126 5729 ia64*)
cannam@126 5730 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
cannam@126 5731 ;;
cannam@126 5732 *)
cannam@126 5733 m4_if($1, [], [
cannam@126 5734 # Older versions of the 11.00 compiler do not understand -b yet
cannam@126 5735 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
cannam@126 5736 _LT_LINKER_OPTION([if $CC understands -b],
cannam@126 5737 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
cannam@126 5738 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
cannam@126 5739 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
cannam@126 5740 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
cannam@126 5741 ;;
cannam@126 5742 esac
cannam@126 5743 fi
cannam@126 5744 if test no = "$with_gnu_ld"; then
cannam@126 5745 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
cannam@126 5746 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@126 5747
cannam@126 5748 case $host_cpu in
cannam@126 5749 hppa*64*|ia64*)
cannam@126 5750 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@126 5751 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@126 5752 ;;
cannam@126 5753 *)
cannam@126 5754 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@126 5755 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
cannam@126 5756 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
cannam@126 5757
cannam@126 5758 # hardcode_minus_L: Not really in the search PATH,
cannam@126 5759 # but as the default location of the library.
cannam@126 5760 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@126 5761 ;;
cannam@126 5762 esac
cannam@126 5763 fi
cannam@126 5764 ;;
cannam@126 5765
cannam@126 5766 irix5* | irix6* | nonstopux*)
cannam@126 5767 if test yes = "$GCC"; then
cannam@126 5768 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
cannam@126 5769 # Try to use the -exported_symbol ld option, if it does not
cannam@126 5770 # work, assume that -exports_file does not work either and
cannam@126 5771 # implicitly export all symbols.
cannam@126 5772 # This should be the same for all languages, so no per-tag cache variable.
cannam@126 5773 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
cannam@126 5774 [lt_cv_irix_exported_symbol],
cannam@126 5775 [save_LDFLAGS=$LDFLAGS
cannam@126 5776 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
cannam@126 5777 AC_LINK_IFELSE(
cannam@126 5778 [AC_LANG_SOURCE(
cannam@126 5779 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
cannam@126 5780 [C++], [[int foo (void) { return 0; }]],
cannam@126 5781 [Fortran 77], [[
cannam@126 5782 subroutine foo
cannam@126 5783 end]],
cannam@126 5784 [Fortran], [[
cannam@126 5785 subroutine foo
cannam@126 5786 end]])])],
cannam@126 5787 [lt_cv_irix_exported_symbol=yes],
cannam@126 5788 [lt_cv_irix_exported_symbol=no])
cannam@126 5789 LDFLAGS=$save_LDFLAGS])
cannam@126 5790 if test yes = "$lt_cv_irix_exported_symbol"; then
cannam@126 5791 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
cannam@126 5792 fi
cannam@126 5793 _LT_TAGVAR(link_all_deplibs, $1)=no
cannam@126 5794 else
cannam@126 5795 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
cannam@126 5796 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
cannam@126 5797 fi
cannam@126 5798 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
cannam@126 5799 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@126 5800 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@126 5801 _LT_TAGVAR(inherit_rpath, $1)=yes
cannam@126 5802 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@126 5803 ;;
cannam@126 5804
cannam@126 5805 linux*)
cannam@126 5806 case $cc_basename in
cannam@126 5807 tcc*)
cannam@126 5808 # Fabrice Bellard et al's Tiny C Compiler
cannam@126 5809 _LT_TAGVAR(ld_shlibs, $1)=yes
cannam@126 5810 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
cannam@126 5811 ;;
cannam@126 5812 esac
cannam@126 5813 ;;
cannam@126 5814
cannam@126 5815 netbsd* | netbsdelf*-gnu)
cannam@126 5816 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
cannam@126 5817 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
cannam@126 5818 else
cannam@126 5819 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
cannam@126 5820 fi
cannam@126 5821 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@126 5822 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@126 5823 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@126 5824 ;;
cannam@126 5825
cannam@126 5826 newsos6)
cannam@126 5827 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@126 5828 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@126 5829 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@126 5830 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@126 5831 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@126 5832 ;;
cannam@126 5833
cannam@126 5834 *nto* | *qnx*)
cannam@126 5835 ;;
cannam@126 5836
cannam@126 5837 openbsd* | bitrig*)
cannam@126 5838 if test -f /usr/libexec/ld.so; then
cannam@126 5839 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@126 5840 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@126 5841 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
cannam@126 5842 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
cannam@126 5843 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
cannam@126 5844 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
cannam@126 5845 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
cannam@126 5846 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
cannam@126 5847 else
cannam@126 5848 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
cannam@126 5849 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
cannam@126 5850 fi
cannam@126 5851 else
cannam@126 5852 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 5853 fi
cannam@126 5854 ;;
cannam@126 5855
cannam@126 5856 os2*)
cannam@126 5857 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@126 5858 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@126 5859 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@126 5860 shrext_cmds=.dll
cannam@126 5861 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
cannam@126 5862 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
cannam@126 5863 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
cannam@126 5864 $ECHO EXPORTS >> $output_objdir/$libname.def~
cannam@126 5865 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
cannam@126 5866 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
cannam@126 5867 emximp -o $lib $output_objdir/$libname.def'
cannam@126 5868 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
cannam@126 5869 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
cannam@126 5870 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
cannam@126 5871 $ECHO EXPORTS >> $output_objdir/$libname.def~
cannam@126 5872 prefix_cmds="$SED"~
cannam@126 5873 if test EXPORTS = "`$SED 1q $export_symbols`"; then
cannam@126 5874 prefix_cmds="$prefix_cmds -e 1d";
cannam@126 5875 fi~
cannam@126 5876 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
cannam@126 5877 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
cannam@126 5878 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
cannam@126 5879 emximp -o $lib $output_objdir/$libname.def'
cannam@126 5880 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
cannam@126 5881 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@126 5882 ;;
cannam@126 5883
cannam@126 5884 osf3*)
cannam@126 5885 if test yes = "$GCC"; then
cannam@126 5886 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
cannam@126 5887 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
cannam@126 5888 else
cannam@126 5889 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
cannam@126 5890 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
cannam@126 5891 fi
cannam@126 5892 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
cannam@126 5893 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@126 5894 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@126 5895 ;;
cannam@126 5896
cannam@126 5897 osf4* | osf5*) # as osf3* with the addition of -msym flag
cannam@126 5898 if test yes = "$GCC"; then
cannam@126 5899 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
cannam@126 5900 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
cannam@126 5901 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@126 5902 else
cannam@126 5903 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
cannam@126 5904 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
cannam@126 5905 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
cannam@126 5906 $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
cannam@126 5907
cannam@126 5908 # Both c and cxx compiler support -rpath directly
cannam@126 5909 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
cannam@126 5910 fi
cannam@126 5911 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
cannam@126 5912 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@126 5913 ;;
cannam@126 5914
cannam@126 5915 solaris*)
cannam@126 5916 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
cannam@126 5917 if test yes = "$GCC"; then
cannam@126 5918 wlarc='$wl'
cannam@126 5919 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@126 5920 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
cannam@126 5921 $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
cannam@126 5922 else
cannam@126 5923 case `$CC -V 2>&1` in
cannam@126 5924 *"Compilers 5.0"*)
cannam@126 5925 wlarc=''
cannam@126 5926 _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@126 5927 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
cannam@126 5928 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
cannam@126 5929 ;;
cannam@126 5930 *)
cannam@126 5931 wlarc='$wl'
cannam@126 5932 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@126 5933 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
cannam@126 5934 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
cannam@126 5935 ;;
cannam@126 5936 esac
cannam@126 5937 fi
cannam@126 5938 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@126 5939 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@126 5940 case $host_os in
cannam@126 5941 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
cannam@126 5942 *)
cannam@126 5943 # The compiler driver will combine and reorder linker options,
cannam@126 5944 # but understands '-z linker_flag'. GCC discards it without '$wl',
cannam@126 5945 # but is careful enough not to reorder.
cannam@126 5946 # Supported since Solaris 2.6 (maybe 2.5.1?)
cannam@126 5947 if test yes = "$GCC"; then
cannam@126 5948 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
cannam@126 5949 else
cannam@126 5950 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
cannam@126 5951 fi
cannam@126 5952 ;;
cannam@126 5953 esac
cannam@126 5954 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@126 5955 ;;
cannam@126 5956
cannam@126 5957 sunos4*)
cannam@126 5958 if test sequent = "$host_vendor"; then
cannam@126 5959 # Use $CC to link under sequent, because it throws in some extra .o
cannam@126 5960 # files that make .init and .fini sections work.
cannam@126 5961 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@126 5962 else
cannam@126 5963 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
cannam@126 5964 fi
cannam@126 5965 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@126 5966 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@126 5967 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@126 5968 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@126 5969 ;;
cannam@126 5970
cannam@126 5971 sysv4)
cannam@126 5972 case $host_vendor in
cannam@126 5973 sni)
cannam@126 5974 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@126 5975 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
cannam@126 5976 ;;
cannam@126 5977 siemens)
cannam@126 5978 ## LD is ld it makes a PLAMLIB
cannam@126 5979 ## CC just makes a GrossModule.
cannam@126 5980 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
cannam@126 5981 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
cannam@126 5982 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@126 5983 ;;
cannam@126 5984 motorola)
cannam@126 5985 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@126 5986 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
cannam@126 5987 ;;
cannam@126 5988 esac
cannam@126 5989 runpath_var='LD_RUN_PATH'
cannam@126 5990 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@126 5991 ;;
cannam@126 5992
cannam@126 5993 sysv4.3*)
cannam@126 5994 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@126 5995 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@126 5996 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
cannam@126 5997 ;;
cannam@126 5998
cannam@126 5999 sysv4*MP*)
cannam@126 6000 if test -d /usr/nec; then
cannam@126 6001 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@126 6002 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@126 6003 runpath_var=LD_RUN_PATH
cannam@126 6004 hardcode_runpath_var=yes
cannam@126 6005 _LT_TAGVAR(ld_shlibs, $1)=yes
cannam@126 6006 fi
cannam@126 6007 ;;
cannam@126 6008
cannam@126 6009 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
cannam@126 6010 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
cannam@126 6011 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@126 6012 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@126 6013 runpath_var='LD_RUN_PATH'
cannam@126 6014
cannam@126 6015 if test yes = "$GCC"; then
cannam@126 6016 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@126 6017 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@126 6018 else
cannam@126 6019 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@126 6020 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@126 6021 fi
cannam@126 6022 ;;
cannam@126 6023
cannam@126 6024 sysv5* | sco3.2v5* | sco5v6*)
cannam@126 6025 # Note: We CANNOT use -z defs as we might desire, because we do not
cannam@126 6026 # link with -lc, and that would cause any symbols used from libc to
cannam@126 6027 # always be unresolved, which means just about no library would
cannam@126 6028 # ever link correctly. If we're not using GNU ld we use -z text
cannam@126 6029 # though, which does catch some bad symbols but isn't as heavy-handed
cannam@126 6030 # as -z defs.
cannam@126 6031 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
cannam@126 6032 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
cannam@126 6033 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@126 6034 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@126 6035 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
cannam@126 6036 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
cannam@126 6037 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@126 6038 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
cannam@126 6039 runpath_var='LD_RUN_PATH'
cannam@126 6040
cannam@126 6041 if test yes = "$GCC"; then
cannam@126 6042 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@126 6043 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@126 6044 else
cannam@126 6045 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@126 6046 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@126 6047 fi
cannam@126 6048 ;;
cannam@126 6049
cannam@126 6050 uts4*)
cannam@126 6051 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@126 6052 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@126 6053 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@126 6054 ;;
cannam@126 6055
cannam@126 6056 *)
cannam@126 6057 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 6058 ;;
cannam@126 6059 esac
cannam@126 6060
cannam@126 6061 if test sni = "$host_vendor"; then
cannam@126 6062 case $host in
cannam@126 6063 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
cannam@126 6064 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
cannam@126 6065 ;;
cannam@126 6066 esac
cannam@126 6067 fi
cannam@126 6068 fi
cannam@126 6069 ])
cannam@126 6070 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
cannam@126 6071 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
cannam@126 6072
cannam@126 6073 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
cannam@126 6074
cannam@126 6075 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
cannam@126 6076 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
cannam@126 6077 _LT_DECL([], [extract_expsyms_cmds], [2],
cannam@126 6078 [The commands to extract the exported symbol list from a shared archive])
cannam@126 6079
cannam@126 6080 #
cannam@126 6081 # Do we need to explicitly link libc?
cannam@126 6082 #
cannam@126 6083 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
cannam@126 6084 x|xyes)
cannam@126 6085 # Assume -lc should be added
cannam@126 6086 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
cannam@126 6087
cannam@126 6088 if test yes,yes = "$GCC,$enable_shared"; then
cannam@126 6089 case $_LT_TAGVAR(archive_cmds, $1) in
cannam@126 6090 *'~'*)
cannam@126 6091 # FIXME: we may have to deal with multi-command sequences.
cannam@126 6092 ;;
cannam@126 6093 '$CC '*)
cannam@126 6094 # Test whether the compiler implicitly links with -lc since on some
cannam@126 6095 # systems, -lgcc has to come before -lc. If gcc already passes -lc
cannam@126 6096 # to ld, don't add -lc before -lgcc.
cannam@126 6097 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
cannam@126 6098 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
cannam@126 6099 [$RM conftest*
cannam@126 6100 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
cannam@126 6101
cannam@126 6102 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
cannam@126 6103 soname=conftest
cannam@126 6104 lib=conftest
cannam@126 6105 libobjs=conftest.$ac_objext
cannam@126 6106 deplibs=
cannam@126 6107 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
cannam@126 6108 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
cannam@126 6109 compiler_flags=-v
cannam@126 6110 linker_flags=-v
cannam@126 6111 verstring=
cannam@126 6112 output_objdir=.
cannam@126 6113 libname=conftest
cannam@126 6114 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
cannam@126 6115 _LT_TAGVAR(allow_undefined_flag, $1)=
cannam@126 6116 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
cannam@126 6117 then
cannam@126 6118 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@126 6119 else
cannam@126 6120 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
cannam@126 6121 fi
cannam@126 6122 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
cannam@126 6123 else
cannam@126 6124 cat conftest.err 1>&5
cannam@126 6125 fi
cannam@126 6126 $RM conftest*
cannam@126 6127 ])
cannam@126 6128 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
cannam@126 6129 ;;
cannam@126 6130 esac
cannam@126 6131 fi
cannam@126 6132 ;;
cannam@126 6133 esac
cannam@126 6134
cannam@126 6135 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
cannam@126 6136 [Whether or not to add -lc for building shared libraries])
cannam@126 6137 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
cannam@126 6138 [enable_shared_with_static_runtimes], [0],
cannam@126 6139 [Whether or not to disallow shared libs when runtime libs are static])
cannam@126 6140 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
cannam@126 6141 [Compiler flag to allow reflexive dlopens])
cannam@126 6142 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
cannam@126 6143 [Compiler flag to generate shared objects directly from archives])
cannam@126 6144 _LT_TAGDECL([], [compiler_needs_object], [1],
cannam@126 6145 [Whether the compiler copes with passing no objects directly])
cannam@126 6146 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
cannam@126 6147 [Create an old-style archive from a shared archive])
cannam@126 6148 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
cannam@126 6149 [Create a temporary old-style archive to link instead of a shared archive])
cannam@126 6150 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
cannam@126 6151 _LT_TAGDECL([], [archive_expsym_cmds], [2])
cannam@126 6152 _LT_TAGDECL([], [module_cmds], [2],
cannam@126 6153 [Commands used to build a loadable module if different from building
cannam@126 6154 a shared archive.])
cannam@126 6155 _LT_TAGDECL([], [module_expsym_cmds], [2])
cannam@126 6156 _LT_TAGDECL([], [with_gnu_ld], [1],
cannam@126 6157 [Whether we are building with GNU ld or not])
cannam@126 6158 _LT_TAGDECL([], [allow_undefined_flag], [1],
cannam@126 6159 [Flag that allows shared libraries with undefined symbols to be built])
cannam@126 6160 _LT_TAGDECL([], [no_undefined_flag], [1],
cannam@126 6161 [Flag that enforces no undefined symbols])
cannam@126 6162 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
cannam@126 6163 [Flag to hardcode $libdir into a binary during linking.
cannam@126 6164 This must work even if $libdir does not exist])
cannam@126 6165 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
cannam@126 6166 [Whether we need a single "-rpath" flag with a separated argument])
cannam@126 6167 _LT_TAGDECL([], [hardcode_direct], [0],
cannam@126 6168 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
cannam@126 6169 DIR into the resulting binary])
cannam@126 6170 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
cannam@126 6171 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
cannam@126 6172 DIR into the resulting binary and the resulting library dependency is
cannam@126 6173 "absolute", i.e impossible to change by setting $shlibpath_var if the
cannam@126 6174 library is relocated])
cannam@126 6175 _LT_TAGDECL([], [hardcode_minus_L], [0],
cannam@126 6176 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
cannam@126 6177 into the resulting binary])
cannam@126 6178 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
cannam@126 6179 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
cannam@126 6180 into the resulting binary])
cannam@126 6181 _LT_TAGDECL([], [hardcode_automatic], [0],
cannam@126 6182 [Set to "yes" if building a shared library automatically hardcodes DIR
cannam@126 6183 into the library and all subsequent libraries and executables linked
cannam@126 6184 against it])
cannam@126 6185 _LT_TAGDECL([], [inherit_rpath], [0],
cannam@126 6186 [Set to yes if linker adds runtime paths of dependent libraries
cannam@126 6187 to runtime path list])
cannam@126 6188 _LT_TAGDECL([], [link_all_deplibs], [0],
cannam@126 6189 [Whether libtool must link a program against all its dependency libraries])
cannam@126 6190 _LT_TAGDECL([], [always_export_symbols], [0],
cannam@126 6191 [Set to "yes" if exported symbols are required])
cannam@126 6192 _LT_TAGDECL([], [export_symbols_cmds], [2],
cannam@126 6193 [The commands to list exported symbols])
cannam@126 6194 _LT_TAGDECL([], [exclude_expsyms], [1],
cannam@126 6195 [Symbols that should not be listed in the preloaded symbols])
cannam@126 6196 _LT_TAGDECL([], [include_expsyms], [1],
cannam@126 6197 [Symbols that must always be exported])
cannam@126 6198 _LT_TAGDECL([], [prelink_cmds], [2],
cannam@126 6199 [Commands necessary for linking programs (against libraries) with templates])
cannam@126 6200 _LT_TAGDECL([], [postlink_cmds], [2],
cannam@126 6201 [Commands necessary for finishing linking programs])
cannam@126 6202 _LT_TAGDECL([], [file_list_spec], [1],
cannam@126 6203 [Specify filename containing input files])
cannam@126 6204 dnl FIXME: Not yet implemented
cannam@126 6205 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
cannam@126 6206 dnl [Compiler flag to generate thread safe objects])
cannam@126 6207 ])# _LT_LINKER_SHLIBS
cannam@126 6208
cannam@126 6209
cannam@126 6210 # _LT_LANG_C_CONFIG([TAG])
cannam@126 6211 # ------------------------
cannam@126 6212 # Ensure that the configuration variables for a C compiler are suitably
cannam@126 6213 # defined. These variables are subsequently used by _LT_CONFIG to write
cannam@126 6214 # the compiler configuration to 'libtool'.
cannam@126 6215 m4_defun([_LT_LANG_C_CONFIG],
cannam@126 6216 [m4_require([_LT_DECL_EGREP])dnl
cannam@126 6217 lt_save_CC=$CC
cannam@126 6218 AC_LANG_PUSH(C)
cannam@126 6219
cannam@126 6220 # Source file extension for C test sources.
cannam@126 6221 ac_ext=c
cannam@126 6222
cannam@126 6223 # Object file extension for compiled C test sources.
cannam@126 6224 objext=o
cannam@126 6225 _LT_TAGVAR(objext, $1)=$objext
cannam@126 6226
cannam@126 6227 # Code to be used in simple compile tests
cannam@126 6228 lt_simple_compile_test_code="int some_variable = 0;"
cannam@126 6229
cannam@126 6230 # Code to be used in simple link tests
cannam@126 6231 lt_simple_link_test_code='int main(){return(0);}'
cannam@126 6232
cannam@126 6233 _LT_TAG_COMPILER
cannam@126 6234 # Save the default compiler, since it gets overwritten when the other
cannam@126 6235 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
cannam@126 6236 compiler_DEFAULT=$CC
cannam@126 6237
cannam@126 6238 # save warnings/boilerplate of simple test code
cannam@126 6239 _LT_COMPILER_BOILERPLATE
cannam@126 6240 _LT_LINKER_BOILERPLATE
cannam@126 6241
cannam@126 6242 ## CAVEAT EMPTOR:
cannam@126 6243 ## There is no encapsulation within the following macros, do not change
cannam@126 6244 ## the running order or otherwise move them around unless you know exactly
cannam@126 6245 ## what you are doing...
cannam@126 6246 if test -n "$compiler"; then
cannam@126 6247 _LT_COMPILER_NO_RTTI($1)
cannam@126 6248 _LT_COMPILER_PIC($1)
cannam@126 6249 _LT_COMPILER_C_O($1)
cannam@126 6250 _LT_COMPILER_FILE_LOCKS($1)
cannam@126 6251 _LT_LINKER_SHLIBS($1)
cannam@126 6252 _LT_SYS_DYNAMIC_LINKER($1)
cannam@126 6253 _LT_LINKER_HARDCODE_LIBPATH($1)
cannam@126 6254 LT_SYS_DLOPEN_SELF
cannam@126 6255 _LT_CMD_STRIPLIB
cannam@126 6256
cannam@126 6257 # Report what library types will actually be built
cannam@126 6258 AC_MSG_CHECKING([if libtool supports shared libraries])
cannam@126 6259 AC_MSG_RESULT([$can_build_shared])
cannam@126 6260
cannam@126 6261 AC_MSG_CHECKING([whether to build shared libraries])
cannam@126 6262 test no = "$can_build_shared" && enable_shared=no
cannam@126 6263
cannam@126 6264 # On AIX, shared libraries and static libraries use the same namespace, and
cannam@126 6265 # are all built from PIC.
cannam@126 6266 case $host_os in
cannam@126 6267 aix3*)
cannam@126 6268 test yes = "$enable_shared" && enable_static=no
cannam@126 6269 if test -n "$RANLIB"; then
cannam@126 6270 archive_cmds="$archive_cmds~\$RANLIB \$lib"
cannam@126 6271 postinstall_cmds='$RANLIB $lib'
cannam@126 6272 fi
cannam@126 6273 ;;
cannam@126 6274
cannam@126 6275 aix[[4-9]]*)
cannam@126 6276 if test ia64 != "$host_cpu"; then
cannam@126 6277 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
cannam@126 6278 yes,aix,yes) ;; # shared object as lib.so file only
cannam@126 6279 yes,svr4,*) ;; # shared object as lib.so archive member only
cannam@126 6280 yes,*) enable_static=no ;; # shared object in lib.a archive as well
cannam@126 6281 esac
cannam@126 6282 fi
cannam@126 6283 ;;
cannam@126 6284 esac
cannam@126 6285 AC_MSG_RESULT([$enable_shared])
cannam@126 6286
cannam@126 6287 AC_MSG_CHECKING([whether to build static libraries])
cannam@126 6288 # Make sure either enable_shared or enable_static is yes.
cannam@126 6289 test yes = "$enable_shared" || enable_static=yes
cannam@126 6290 AC_MSG_RESULT([$enable_static])
cannam@126 6291
cannam@126 6292 _LT_CONFIG($1)
cannam@126 6293 fi
cannam@126 6294 AC_LANG_POP
cannam@126 6295 CC=$lt_save_CC
cannam@126 6296 ])# _LT_LANG_C_CONFIG
cannam@126 6297
cannam@126 6298
cannam@126 6299 # _LT_LANG_CXX_CONFIG([TAG])
cannam@126 6300 # --------------------------
cannam@126 6301 # Ensure that the configuration variables for a C++ compiler are suitably
cannam@126 6302 # defined. These variables are subsequently used by _LT_CONFIG to write
cannam@126 6303 # the compiler configuration to 'libtool'.
cannam@126 6304 m4_defun([_LT_LANG_CXX_CONFIG],
cannam@126 6305 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@126 6306 m4_require([_LT_DECL_EGREP])dnl
cannam@126 6307 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
cannam@126 6308 if test -n "$CXX" && ( test no != "$CXX" &&
cannam@126 6309 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
cannam@126 6310 (test g++ != "$CXX"))); then
cannam@126 6311 AC_PROG_CXXCPP
cannam@126 6312 else
cannam@126 6313 _lt_caught_CXX_error=yes
cannam@126 6314 fi
cannam@126 6315
cannam@126 6316 AC_LANG_PUSH(C++)
cannam@126 6317 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@126 6318 _LT_TAGVAR(allow_undefined_flag, $1)=
cannam@126 6319 _LT_TAGVAR(always_export_symbols, $1)=no
cannam@126 6320 _LT_TAGVAR(archive_expsym_cmds, $1)=
cannam@126 6321 _LT_TAGVAR(compiler_needs_object, $1)=no
cannam@126 6322 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
cannam@126 6323 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@126 6324 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
cannam@126 6325 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
cannam@126 6326 _LT_TAGVAR(hardcode_libdir_separator, $1)=
cannam@126 6327 _LT_TAGVAR(hardcode_minus_L, $1)=no
cannam@126 6328 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
cannam@126 6329 _LT_TAGVAR(hardcode_automatic, $1)=no
cannam@126 6330 _LT_TAGVAR(inherit_rpath, $1)=no
cannam@126 6331 _LT_TAGVAR(module_cmds, $1)=
cannam@126 6332 _LT_TAGVAR(module_expsym_cmds, $1)=
cannam@126 6333 _LT_TAGVAR(link_all_deplibs, $1)=unknown
cannam@126 6334 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
cannam@126 6335 _LT_TAGVAR(reload_flag, $1)=$reload_flag
cannam@126 6336 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
cannam@126 6337 _LT_TAGVAR(no_undefined_flag, $1)=
cannam@126 6338 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@126 6339 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
cannam@126 6340
cannam@126 6341 # Source file extension for C++ test sources.
cannam@126 6342 ac_ext=cpp
cannam@126 6343
cannam@126 6344 # Object file extension for compiled C++ test sources.
cannam@126 6345 objext=o
cannam@126 6346 _LT_TAGVAR(objext, $1)=$objext
cannam@126 6347
cannam@126 6348 # No sense in running all these tests if we already determined that
cannam@126 6349 # the CXX compiler isn't working. Some variables (like enable_shared)
cannam@126 6350 # are currently assumed to apply to all compilers on this platform,
cannam@126 6351 # and will be corrupted by setting them based on a non-working compiler.
cannam@126 6352 if test yes != "$_lt_caught_CXX_error"; then
cannam@126 6353 # Code to be used in simple compile tests
cannam@126 6354 lt_simple_compile_test_code="int some_variable = 0;"
cannam@126 6355
cannam@126 6356 # Code to be used in simple link tests
cannam@126 6357 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
cannam@126 6358
cannam@126 6359 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
cannam@126 6360 _LT_TAG_COMPILER
cannam@126 6361
cannam@126 6362 # save warnings/boilerplate of simple test code
cannam@126 6363 _LT_COMPILER_BOILERPLATE
cannam@126 6364 _LT_LINKER_BOILERPLATE
cannam@126 6365
cannam@126 6366 # Allow CC to be a program name with arguments.
cannam@126 6367 lt_save_CC=$CC
cannam@126 6368 lt_save_CFLAGS=$CFLAGS
cannam@126 6369 lt_save_LD=$LD
cannam@126 6370 lt_save_GCC=$GCC
cannam@126 6371 GCC=$GXX
cannam@126 6372 lt_save_with_gnu_ld=$with_gnu_ld
cannam@126 6373 lt_save_path_LD=$lt_cv_path_LD
cannam@126 6374 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
cannam@126 6375 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
cannam@126 6376 else
cannam@126 6377 $as_unset lt_cv_prog_gnu_ld
cannam@126 6378 fi
cannam@126 6379 if test -n "${lt_cv_path_LDCXX+set}"; then
cannam@126 6380 lt_cv_path_LD=$lt_cv_path_LDCXX
cannam@126 6381 else
cannam@126 6382 $as_unset lt_cv_path_LD
cannam@126 6383 fi
cannam@126 6384 test -z "${LDCXX+set}" || LD=$LDCXX
cannam@126 6385 CC=${CXX-"c++"}
cannam@126 6386 CFLAGS=$CXXFLAGS
cannam@126 6387 compiler=$CC
cannam@126 6388 _LT_TAGVAR(compiler, $1)=$CC
cannam@126 6389 _LT_CC_BASENAME([$compiler])
cannam@126 6390
cannam@126 6391 if test -n "$compiler"; then
cannam@126 6392 # We don't want -fno-exception when compiling C++ code, so set the
cannam@126 6393 # no_builtin_flag separately
cannam@126 6394 if test yes = "$GXX"; then
cannam@126 6395 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
cannam@126 6396 else
cannam@126 6397 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
cannam@126 6398 fi
cannam@126 6399
cannam@126 6400 if test yes = "$GXX"; then
cannam@126 6401 # Set up default GNU C++ configuration
cannam@126 6402
cannam@126 6403 LT_PATH_LD
cannam@126 6404
cannam@126 6405 # Check if GNU C++ uses GNU ld as the underlying linker, since the
cannam@126 6406 # archiving commands below assume that GNU ld is being used.
cannam@126 6407 if test yes = "$with_gnu_ld"; then
cannam@126 6408 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@126 6409 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
cannam@126 6410
cannam@126 6411 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@126 6412 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
cannam@126 6413
cannam@126 6414 # If archive_cmds runs LD, not CC, wlarc should be empty
cannam@126 6415 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
cannam@126 6416 # investigate it a little bit more. (MM)
cannam@126 6417 wlarc='$wl'
cannam@126 6418
cannam@126 6419 # ancient GNU ld didn't support --whole-archive et. al.
cannam@126 6420 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
cannam@126 6421 $GREP 'no-whole-archive' > /dev/null; then
cannam@126 6422 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
cannam@126 6423 else
cannam@126 6424 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@126 6425 fi
cannam@126 6426 else
cannam@126 6427 with_gnu_ld=no
cannam@126 6428 wlarc=
cannam@126 6429
cannam@126 6430 # A generic and very simple default shared library creation
cannam@126 6431 # command for GNU C++ for the case where it uses the native
cannam@126 6432 # linker, instead of GNU ld. If possible, this setting should
cannam@126 6433 # overridden to take advantage of the native linker features on
cannam@126 6434 # the platform it is being used on.
cannam@126 6435 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
cannam@126 6436 fi
cannam@126 6437
cannam@126 6438 # Commands to make compiler produce verbose output that lists
cannam@126 6439 # what "hidden" libraries, object files and flags are used when
cannam@126 6440 # linking a shared library.
cannam@126 6441 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
cannam@126 6442
cannam@126 6443 else
cannam@126 6444 GXX=no
cannam@126 6445 with_gnu_ld=no
cannam@126 6446 wlarc=
cannam@126 6447 fi
cannam@126 6448
cannam@126 6449 # PORTME: fill in a description of your system's C++ link characteristics
cannam@126 6450 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
cannam@126 6451 _LT_TAGVAR(ld_shlibs, $1)=yes
cannam@126 6452 case $host_os in
cannam@126 6453 aix3*)
cannam@126 6454 # FIXME: insert proper C++ library support
cannam@126 6455 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 6456 ;;
cannam@126 6457 aix[[4-9]]*)
cannam@126 6458 if test ia64 = "$host_cpu"; then
cannam@126 6459 # On IA64, the linker does run time linking by default, so we don't
cannam@126 6460 # have to do anything special.
cannam@126 6461 aix_use_runtimelinking=no
cannam@126 6462 exp_sym_flag='-Bexport'
cannam@126 6463 no_entry_flag=
cannam@126 6464 else
cannam@126 6465 aix_use_runtimelinking=no
cannam@126 6466
cannam@126 6467 # Test if we are trying to use run time linking or normal
cannam@126 6468 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
cannam@126 6469 # have runtime linking enabled, and use it for executables.
cannam@126 6470 # For shared libraries, we enable/disable runtime linking
cannam@126 6471 # depending on the kind of the shared library created -
cannam@126 6472 # when "with_aix_soname,aix_use_runtimelinking" is:
cannam@126 6473 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
cannam@126 6474 # "aix,yes" lib.so shared, rtl:yes, for executables
cannam@126 6475 # lib.a static archive
cannam@126 6476 # "both,no" lib.so.V(shr.o) shared, rtl:yes
cannam@126 6477 # lib.a(lib.so.V) shared, rtl:no, for executables
cannam@126 6478 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
cannam@126 6479 # lib.a(lib.so.V) shared, rtl:no
cannam@126 6480 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
cannam@126 6481 # lib.a static archive
cannam@126 6482 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
cannam@126 6483 for ld_flag in $LDFLAGS; do
cannam@126 6484 case $ld_flag in
cannam@126 6485 *-brtl*)
cannam@126 6486 aix_use_runtimelinking=yes
cannam@126 6487 break
cannam@126 6488 ;;
cannam@126 6489 esac
cannam@126 6490 done
cannam@126 6491 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
cannam@126 6492 # With aix-soname=svr4, we create the lib.so.V shared archives only,
cannam@126 6493 # so we don't have lib.a shared libs to link our executables.
cannam@126 6494 # We have to force runtime linking in this case.
cannam@126 6495 aix_use_runtimelinking=yes
cannam@126 6496 LDFLAGS="$LDFLAGS -Wl,-brtl"
cannam@126 6497 fi
cannam@126 6498 ;;
cannam@126 6499 esac
cannam@126 6500
cannam@126 6501 exp_sym_flag='-bexport'
cannam@126 6502 no_entry_flag='-bnoentry'
cannam@126 6503 fi
cannam@126 6504
cannam@126 6505 # When large executables or shared objects are built, AIX ld can
cannam@126 6506 # have problems creating the table of contents. If linking a library
cannam@126 6507 # or program results in "error TOC overflow" add -mminimal-toc to
cannam@126 6508 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
cannam@126 6509 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
cannam@126 6510
cannam@126 6511 _LT_TAGVAR(archive_cmds, $1)=''
cannam@126 6512 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@126 6513 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
cannam@126 6514 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
cannam@126 6515 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@126 6516 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
cannam@126 6517 case $with_aix_soname,$aix_use_runtimelinking in
cannam@126 6518 aix,*) ;; # no import file
cannam@126 6519 svr4,* | *,yes) # use import file
cannam@126 6520 # The Import File defines what to hardcode.
cannam@126 6521 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@126 6522 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
cannam@126 6523 ;;
cannam@126 6524 esac
cannam@126 6525
cannam@126 6526 if test yes = "$GXX"; then
cannam@126 6527 case $host_os in aix4.[[012]]|aix4.[[012]].*)
cannam@126 6528 # We only want to do this on AIX 4.2 and lower, the check
cannam@126 6529 # below for broken collect2 doesn't work under 4.3+
cannam@126 6530 collect2name=`$CC -print-prog-name=collect2`
cannam@126 6531 if test -f "$collect2name" &&
cannam@126 6532 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
cannam@126 6533 then
cannam@126 6534 # We have reworked collect2
cannam@126 6535 :
cannam@126 6536 else
cannam@126 6537 # We have old collect2
cannam@126 6538 _LT_TAGVAR(hardcode_direct, $1)=unsupported
cannam@126 6539 # It fails to find uninstalled libraries when the uninstalled
cannam@126 6540 # path is not listed in the libpath. Setting hardcode_minus_L
cannam@126 6541 # to unsupported forces relinking
cannam@126 6542 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@126 6543 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@126 6544 _LT_TAGVAR(hardcode_libdir_separator, $1)=
cannam@126 6545 fi
cannam@126 6546 esac
cannam@126 6547 shared_flag='-shared'
cannam@126 6548 if test yes = "$aix_use_runtimelinking"; then
cannam@126 6549 shared_flag=$shared_flag' $wl-G'
cannam@126 6550 fi
cannam@126 6551 # Need to ensure runtime linking is disabled for the traditional
cannam@126 6552 # shared library, or the linker may eventually find shared libraries
cannam@126 6553 # /with/ Import File - we do not want to mix them.
cannam@126 6554 shared_flag_aix='-shared'
cannam@126 6555 shared_flag_svr4='-shared $wl-G'
cannam@126 6556 else
cannam@126 6557 # not using gcc
cannam@126 6558 if test ia64 = "$host_cpu"; then
cannam@126 6559 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
cannam@126 6560 # chokes on -Wl,-G. The following line is correct:
cannam@126 6561 shared_flag='-G'
cannam@126 6562 else
cannam@126 6563 if test yes = "$aix_use_runtimelinking"; then
cannam@126 6564 shared_flag='$wl-G'
cannam@126 6565 else
cannam@126 6566 shared_flag='$wl-bM:SRE'
cannam@126 6567 fi
cannam@126 6568 shared_flag_aix='$wl-bM:SRE'
cannam@126 6569 shared_flag_svr4='$wl-G'
cannam@126 6570 fi
cannam@126 6571 fi
cannam@126 6572
cannam@126 6573 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
cannam@126 6574 # It seems that -bexpall does not export symbols beginning with
cannam@126 6575 # underscore (_), so it is better to generate a list of symbols to
cannam@126 6576 # export.
cannam@126 6577 _LT_TAGVAR(always_export_symbols, $1)=yes
cannam@126 6578 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
cannam@126 6579 # Warning - without using the other runtime loading flags (-brtl),
cannam@126 6580 # -berok will link without error, but may produce a broken library.
cannam@126 6581 # The "-G" linker flag allows undefined symbols.
cannam@126 6582 _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
cannam@126 6583 # Determine the default libpath from the value encoded in an empty
cannam@126 6584 # executable.
cannam@126 6585 _LT_SYS_MODULE_PATH_AIX([$1])
cannam@126 6586 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
cannam@126 6587
cannam@126 6588 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
cannam@126 6589 else
cannam@126 6590 if test ia64 = "$host_cpu"; then
cannam@126 6591 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
cannam@126 6592 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
cannam@126 6593 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
cannam@126 6594 else
cannam@126 6595 # Determine the default libpath from the value encoded in an
cannam@126 6596 # empty executable.
cannam@126 6597 _LT_SYS_MODULE_PATH_AIX([$1])
cannam@126 6598 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
cannam@126 6599 # Warning - without using the other run time loading flags,
cannam@126 6600 # -berok will link without error, but may produce a broken library.
cannam@126 6601 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
cannam@126 6602 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
cannam@126 6603 if test yes = "$with_gnu_ld"; then
cannam@126 6604 # We only use this code for GNU lds that support --whole-archive.
cannam@126 6605 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
cannam@126 6606 else
cannam@126 6607 # Exported symbols can be pulled into shared objects from archives
cannam@126 6608 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
cannam@126 6609 fi
cannam@126 6610 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
cannam@126 6611 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
cannam@126 6612 # -brtl affects multiple linker settings, -berok does not and is overridden later
cannam@126 6613 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
cannam@126 6614 if test svr4 != "$with_aix_soname"; then
cannam@126 6615 # This is similar to how AIX traditionally builds its shared
cannam@126 6616 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
cannam@126 6617 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
cannam@126 6618 fi
cannam@126 6619 if test aix != "$with_aix_soname"; then
cannam@126 6620 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
cannam@126 6621 else
cannam@126 6622 # used by -dlpreopen to get the symbols
cannam@126 6623 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
cannam@126 6624 fi
cannam@126 6625 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
cannam@126 6626 fi
cannam@126 6627 fi
cannam@126 6628 ;;
cannam@126 6629
cannam@126 6630 beos*)
cannam@126 6631 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
cannam@126 6632 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@126 6633 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
cannam@126 6634 # support --undefined. This deserves some investigation. FIXME
cannam@126 6635 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@126 6636 else
cannam@126 6637 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 6638 fi
cannam@126 6639 ;;
cannam@126 6640
cannam@126 6641 chorus*)
cannam@126 6642 case $cc_basename in
cannam@126 6643 *)
cannam@126 6644 # FIXME: insert proper C++ library support
cannam@126 6645 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 6646 ;;
cannam@126 6647 esac
cannam@126 6648 ;;
cannam@126 6649
cannam@126 6650 cygwin* | mingw* | pw32* | cegcc*)
cannam@126 6651 case $GXX,$cc_basename in
cannam@126 6652 ,cl* | no,cl*)
cannam@126 6653 # Native MSVC
cannam@126 6654 # hardcode_libdir_flag_spec is actually meaningless, as there is
cannam@126 6655 # no search path for DLLs.
cannam@126 6656 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
cannam@126 6657 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@126 6658 _LT_TAGVAR(always_export_symbols, $1)=yes
cannam@126 6659 _LT_TAGVAR(file_list_spec, $1)='@'
cannam@126 6660 # Tell ltmain to make .lib files, not .a files.
cannam@126 6661 libext=lib
cannam@126 6662 # Tell ltmain to make .dll files, not .so files.
cannam@126 6663 shrext_cmds=.dll
cannam@126 6664 # FIXME: Setting linknames here is a bad hack.
cannam@126 6665 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
cannam@126 6666 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
cannam@126 6667 cp "$export_symbols" "$output_objdir/$soname.def";
cannam@126 6668 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
cannam@126 6669 else
cannam@126 6670 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
cannam@126 6671 fi~
cannam@126 6672 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
cannam@126 6673 linknames='
cannam@126 6674 # The linker will not automatically build a static lib if we build a DLL.
cannam@126 6675 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
cannam@126 6676 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@126 6677 # Don't use ranlib
cannam@126 6678 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
cannam@126 6679 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
cannam@126 6680 lt_tool_outputfile="@TOOL_OUTPUT@"~
cannam@126 6681 case $lt_outputfile in
cannam@126 6682 *.exe|*.EXE) ;;
cannam@126 6683 *)
cannam@126 6684 lt_outputfile=$lt_outputfile.exe
cannam@126 6685 lt_tool_outputfile=$lt_tool_outputfile.exe
cannam@126 6686 ;;
cannam@126 6687 esac~
cannam@126 6688 func_to_tool_file "$lt_outputfile"~
cannam@126 6689 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
cannam@126 6690 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
cannam@126 6691 $RM "$lt_outputfile.manifest";
cannam@126 6692 fi'
cannam@126 6693 ;;
cannam@126 6694 *)
cannam@126 6695 # g++
cannam@126 6696 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
cannam@126 6697 # as there is no search path for DLLs.
cannam@126 6698 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@126 6699 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
cannam@126 6700 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@126 6701 _LT_TAGVAR(always_export_symbols, $1)=no
cannam@126 6702 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@126 6703
cannam@126 6704 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
cannam@126 6705 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
cannam@126 6706 # If the export-symbols file already is a .def file, use it as
cannam@126 6707 # is; otherwise, prepend EXPORTS...
cannam@126 6708 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
cannam@126 6709 cp $export_symbols $output_objdir/$soname.def;
cannam@126 6710 else
cannam@126 6711 echo EXPORTS > $output_objdir/$soname.def;
cannam@126 6712 cat $export_symbols >> $output_objdir/$soname.def;
cannam@126 6713 fi~
cannam@126 6714 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
cannam@126 6715 else
cannam@126 6716 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 6717 fi
cannam@126 6718 ;;
cannam@126 6719 esac
cannam@126 6720 ;;
cannam@126 6721 darwin* | rhapsody*)
cannam@126 6722 _LT_DARWIN_LINKER_FEATURES($1)
cannam@126 6723 ;;
cannam@126 6724
cannam@126 6725 os2*)
cannam@126 6726 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@126 6727 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@126 6728 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@126 6729 shrext_cmds=.dll
cannam@126 6730 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
cannam@126 6731 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
cannam@126 6732 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
cannam@126 6733 $ECHO EXPORTS >> $output_objdir/$libname.def~
cannam@126 6734 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
cannam@126 6735 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
cannam@126 6736 emximp -o $lib $output_objdir/$libname.def'
cannam@126 6737 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
cannam@126 6738 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
cannam@126 6739 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
cannam@126 6740 $ECHO EXPORTS >> $output_objdir/$libname.def~
cannam@126 6741 prefix_cmds="$SED"~
cannam@126 6742 if test EXPORTS = "`$SED 1q $export_symbols`"; then
cannam@126 6743 prefix_cmds="$prefix_cmds -e 1d";
cannam@126 6744 fi~
cannam@126 6745 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
cannam@126 6746 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
cannam@126 6747 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
cannam@126 6748 emximp -o $lib $output_objdir/$libname.def'
cannam@126 6749 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
cannam@126 6750 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@126 6751 ;;
cannam@126 6752
cannam@126 6753 dgux*)
cannam@126 6754 case $cc_basename in
cannam@126 6755 ec++*)
cannam@126 6756 # FIXME: insert proper C++ library support
cannam@126 6757 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 6758 ;;
cannam@126 6759 ghcx*)
cannam@126 6760 # Green Hills C++ Compiler
cannam@126 6761 # FIXME: insert proper C++ library support
cannam@126 6762 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 6763 ;;
cannam@126 6764 *)
cannam@126 6765 # FIXME: insert proper C++ library support
cannam@126 6766 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 6767 ;;
cannam@126 6768 esac
cannam@126 6769 ;;
cannam@126 6770
cannam@126 6771 freebsd2.*)
cannam@126 6772 # C++ shared libraries reported to be fairly broken before
cannam@126 6773 # switch to ELF
cannam@126 6774 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 6775 ;;
cannam@126 6776
cannam@126 6777 freebsd-elf*)
cannam@126 6778 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@126 6779 ;;
cannam@126 6780
cannam@126 6781 freebsd* | dragonfly*)
cannam@126 6782 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
cannam@126 6783 # conventions
cannam@126 6784 _LT_TAGVAR(ld_shlibs, $1)=yes
cannam@126 6785 ;;
cannam@126 6786
cannam@126 6787 haiku*)
cannam@126 6788 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@126 6789 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@126 6790 ;;
cannam@126 6791
cannam@126 6792 hpux9*)
cannam@126 6793 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
cannam@126 6794 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@126 6795 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
cannam@126 6796 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@126 6797 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
cannam@126 6798 # but as the default
cannam@126 6799 # location of the library.
cannam@126 6800
cannam@126 6801 case $cc_basename in
cannam@126 6802 CC*)
cannam@126 6803 # FIXME: insert proper C++ library support
cannam@126 6804 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 6805 ;;
cannam@126 6806 aCC*)
cannam@126 6807 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
cannam@126 6808 # Commands to make compiler produce verbose output that lists
cannam@126 6809 # what "hidden" libraries, object files and flags are used when
cannam@126 6810 # linking a shared library.
cannam@126 6811 #
cannam@126 6812 # There doesn't appear to be a way to prevent this compiler from
cannam@126 6813 # explicitly linking system object files so we need to strip them
cannam@126 6814 # from the output so that they don't get included in the library
cannam@126 6815 # dependencies.
cannam@126 6816 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
cannam@126 6817 ;;
cannam@126 6818 *)
cannam@126 6819 if test yes = "$GXX"; then
cannam@126 6820 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
cannam@126 6821 else
cannam@126 6822 # FIXME: insert proper C++ library support
cannam@126 6823 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 6824 fi
cannam@126 6825 ;;
cannam@126 6826 esac
cannam@126 6827 ;;
cannam@126 6828
cannam@126 6829 hpux10*|hpux11*)
cannam@126 6830 if test no = "$with_gnu_ld"; then
cannam@126 6831 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
cannam@126 6832 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@126 6833
cannam@126 6834 case $host_cpu in
cannam@126 6835 hppa*64*|ia64*)
cannam@126 6836 ;;
cannam@126 6837 *)
cannam@126 6838 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
cannam@126 6839 ;;
cannam@126 6840 esac
cannam@126 6841 fi
cannam@126 6842 case $host_cpu in
cannam@126 6843 hppa*64*|ia64*)
cannam@126 6844 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@126 6845 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@126 6846 ;;
cannam@126 6847 *)
cannam@126 6848 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@126 6849 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
cannam@126 6850 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
cannam@126 6851 # but as the default
cannam@126 6852 # location of the library.
cannam@126 6853 ;;
cannam@126 6854 esac
cannam@126 6855
cannam@126 6856 case $cc_basename in
cannam@126 6857 CC*)
cannam@126 6858 # FIXME: insert proper C++ library support
cannam@126 6859 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 6860 ;;
cannam@126 6861 aCC*)
cannam@126 6862 case $host_cpu in
cannam@126 6863 hppa*64*)
cannam@126 6864 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
cannam@126 6865 ;;
cannam@126 6866 ia64*)
cannam@126 6867 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
cannam@126 6868 ;;
cannam@126 6869 *)
cannam@126 6870 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
cannam@126 6871 ;;
cannam@126 6872 esac
cannam@126 6873 # Commands to make compiler produce verbose output that lists
cannam@126 6874 # what "hidden" libraries, object files and flags are used when
cannam@126 6875 # linking a shared library.
cannam@126 6876 #
cannam@126 6877 # There doesn't appear to be a way to prevent this compiler from
cannam@126 6878 # explicitly linking system object files so we need to strip them
cannam@126 6879 # from the output so that they don't get included in the library
cannam@126 6880 # dependencies.
cannam@126 6881 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
cannam@126 6882 ;;
cannam@126 6883 *)
cannam@126 6884 if test yes = "$GXX"; then
cannam@126 6885 if test no = "$with_gnu_ld"; then
cannam@126 6886 case $host_cpu in
cannam@126 6887 hppa*64*)
cannam@126 6888 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
cannam@126 6889 ;;
cannam@126 6890 ia64*)
cannam@126 6891 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
cannam@126 6892 ;;
cannam@126 6893 *)
cannam@126 6894 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
cannam@126 6895 ;;
cannam@126 6896 esac
cannam@126 6897 fi
cannam@126 6898 else
cannam@126 6899 # FIXME: insert proper C++ library support
cannam@126 6900 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 6901 fi
cannam@126 6902 ;;
cannam@126 6903 esac
cannam@126 6904 ;;
cannam@126 6905
cannam@126 6906 interix[[3-9]]*)
cannam@126 6907 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@126 6908 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@126 6909 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
cannam@126 6910 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
cannam@126 6911 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
cannam@126 6912 # Instead, shared libraries are loaded at an image base (0x10000000 by
cannam@126 6913 # default) and relocated if they conflict, which is a slow very memory
cannam@126 6914 # consuming and fragmenting process. To avoid this, we pick a random,
cannam@126 6915 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
cannam@126 6916 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
cannam@126 6917 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
cannam@126 6918 _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
cannam@126 6919 ;;
cannam@126 6920 irix5* | irix6*)
cannam@126 6921 case $cc_basename in
cannam@126 6922 CC*)
cannam@126 6923 # SGI C++
cannam@126 6924 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
cannam@126 6925
cannam@126 6926 # Archives containing C++ object files must be created using
cannam@126 6927 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
cannam@126 6928 # necessary to make sure instantiated templates are included
cannam@126 6929 # in the archive.
cannam@126 6930 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
cannam@126 6931 ;;
cannam@126 6932 *)
cannam@126 6933 if test yes = "$GXX"; then
cannam@126 6934 if test no = "$with_gnu_ld"; then
cannam@126 6935 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
cannam@126 6936 else
cannam@126 6937 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
cannam@126 6938 fi
cannam@126 6939 fi
cannam@126 6940 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@126 6941 ;;
cannam@126 6942 esac
cannam@126 6943 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@126 6944 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@126 6945 _LT_TAGVAR(inherit_rpath, $1)=yes
cannam@126 6946 ;;
cannam@126 6947
cannam@126 6948 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
cannam@126 6949 case $cc_basename in
cannam@126 6950 KCC*)
cannam@126 6951 # Kuck and Associates, Inc. (KAI) C++ Compiler
cannam@126 6952
cannam@126 6953 # KCC will only create a shared library if the output file
cannam@126 6954 # ends with ".so" (or ".sl" for HP-UX), so rename the library
cannam@126 6955 # to its proper name (with version) after linking.
cannam@126 6956 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
cannam@126 6957 _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
cannam@126 6958 # Commands to make compiler produce verbose output that lists
cannam@126 6959 # what "hidden" libraries, object files and flags are used when
cannam@126 6960 # linking a shared library.
cannam@126 6961 #
cannam@126 6962 # There doesn't appear to be a way to prevent this compiler from
cannam@126 6963 # explicitly linking system object files so we need to strip them
cannam@126 6964 # from the output so that they don't get included in the library
cannam@126 6965 # dependencies.
cannam@126 6966 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
cannam@126 6967
cannam@126 6968 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
cannam@126 6969 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
cannam@126 6970
cannam@126 6971 # Archives containing C++ object files must be created using
cannam@126 6972 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
cannam@126 6973 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
cannam@126 6974 ;;
cannam@126 6975 icpc* | ecpc* )
cannam@126 6976 # Intel C++
cannam@126 6977 with_gnu_ld=yes
cannam@126 6978 # version 8.0 and above of icpc choke on multiply defined symbols
cannam@126 6979 # if we add $predep_objects and $postdep_objects, however 7.1 and
cannam@126 6980 # earlier do not add the objects themselves.
cannam@126 6981 case `$CC -V 2>&1` in
cannam@126 6982 *"Version 7."*)
cannam@126 6983 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@126 6984 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
cannam@126 6985 ;;
cannam@126 6986 *) # Version 8.0 or newer
cannam@126 6987 tmp_idyn=
cannam@126 6988 case $host_cpu in
cannam@126 6989 ia64*) tmp_idyn=' -i_dynamic';;
cannam@126 6990 esac
cannam@126 6991 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@126 6992 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
cannam@126 6993 ;;
cannam@126 6994 esac
cannam@126 6995 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@126 6996 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
cannam@126 6997 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
cannam@126 6998 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
cannam@126 6999 ;;
cannam@126 7000 pgCC* | pgcpp*)
cannam@126 7001 # Portland Group C++ compiler
cannam@126 7002 case `$CC -V` in
cannam@126 7003 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
cannam@126 7004 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
cannam@126 7005 rm -rf $tpldir~
cannam@126 7006 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
cannam@126 7007 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
cannam@126 7008 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
cannam@126 7009 rm -rf $tpldir~
cannam@126 7010 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
cannam@126 7011 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
cannam@126 7012 $RANLIB $oldlib'
cannam@126 7013 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
cannam@126 7014 rm -rf $tpldir~
cannam@126 7015 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
cannam@126 7016 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@126 7017 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
cannam@126 7018 rm -rf $tpldir~
cannam@126 7019 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
cannam@126 7020 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
cannam@126 7021 ;;
cannam@126 7022 *) # Version 6 and above use weak symbols
cannam@126 7023 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@126 7024 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
cannam@126 7025 ;;
cannam@126 7026 esac
cannam@126 7027
cannam@126 7028 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
cannam@126 7029 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
cannam@126 7030 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
cannam@126 7031 ;;
cannam@126 7032 cxx*)
cannam@126 7033 # Compaq C++
cannam@126 7034 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@126 7035 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols'
cannam@126 7036
cannam@126 7037 runpath_var=LD_RUN_PATH
cannam@126 7038 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
cannam@126 7039 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@126 7040
cannam@126 7041 # Commands to make compiler produce verbose output that lists
cannam@126 7042 # what "hidden" libraries, object files and flags are used when
cannam@126 7043 # linking a shared library.
cannam@126 7044 #
cannam@126 7045 # There doesn't appear to be a way to prevent this compiler from
cannam@126 7046 # explicitly linking system object files so we need to strip them
cannam@126 7047 # from the output so that they don't get included in the library
cannam@126 7048 # dependencies.
cannam@126 7049 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
cannam@126 7050 ;;
cannam@126 7051 xl* | mpixl* | bgxl*)
cannam@126 7052 # IBM XL 8.0 on PPC, with GNU ld
cannam@126 7053 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@126 7054 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
cannam@126 7055 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@126 7056 if test yes = "$supports_anon_versioning"; then
cannam@126 7057 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
cannam@126 7058 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
cannam@126 7059 echo "local: *; };" >> $output_objdir/$libname.ver~
cannam@126 7060 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
cannam@126 7061 fi
cannam@126 7062 ;;
cannam@126 7063 *)
cannam@126 7064 case `$CC -V 2>&1 | sed 5q` in
cannam@126 7065 *Sun\ C*)
cannam@126 7066 # Sun C++ 5.9
cannam@126 7067 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
cannam@126 7068 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
cannam@126 7069 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
cannam@126 7070 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@126 7071 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
cannam@126 7072 _LT_TAGVAR(compiler_needs_object, $1)=yes
cannam@126 7073
cannam@126 7074 # Not sure whether something based on
cannam@126 7075 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
cannam@126 7076 # would be better.
cannam@126 7077 output_verbose_link_cmd='func_echo_all'
cannam@126 7078
cannam@126 7079 # Archives containing C++ object files must be created using
cannam@126 7080 # "CC -xar", where "CC" is the Sun C++ compiler. This is
cannam@126 7081 # necessary to make sure instantiated templates are included
cannam@126 7082 # in the archive.
cannam@126 7083 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
cannam@126 7084 ;;
cannam@126 7085 esac
cannam@126 7086 ;;
cannam@126 7087 esac
cannam@126 7088 ;;
cannam@126 7089
cannam@126 7090 lynxos*)
cannam@126 7091 # FIXME: insert proper C++ library support
cannam@126 7092 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 7093 ;;
cannam@126 7094
cannam@126 7095 m88k*)
cannam@126 7096 # FIXME: insert proper C++ library support
cannam@126 7097 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 7098 ;;
cannam@126 7099
cannam@126 7100 mvs*)
cannam@126 7101 case $cc_basename in
cannam@126 7102 cxx*)
cannam@126 7103 # FIXME: insert proper C++ library support
cannam@126 7104 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 7105 ;;
cannam@126 7106 *)
cannam@126 7107 # FIXME: insert proper C++ library support
cannam@126 7108 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 7109 ;;
cannam@126 7110 esac
cannam@126 7111 ;;
cannam@126 7112
cannam@126 7113 netbsd*)
cannam@126 7114 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
cannam@126 7115 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
cannam@126 7116 wlarc=
cannam@126 7117 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@126 7118 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@126 7119 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@126 7120 fi
cannam@126 7121 # Workaround some broken pre-1.5 toolchains
cannam@126 7122 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
cannam@126 7123 ;;
cannam@126 7124
cannam@126 7125 *nto* | *qnx*)
cannam@126 7126 _LT_TAGVAR(ld_shlibs, $1)=yes
cannam@126 7127 ;;
cannam@126 7128
cannam@126 7129 openbsd* | bitrig*)
cannam@126 7130 if test -f /usr/libexec/ld.so; then
cannam@126 7131 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@126 7132 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@126 7133 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
cannam@126 7134 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
cannam@126 7135 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
cannam@126 7136 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
cannam@126 7137 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
cannam@126 7138 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
cannam@126 7139 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
cannam@126 7140 fi
cannam@126 7141 output_verbose_link_cmd=func_echo_all
cannam@126 7142 else
cannam@126 7143 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 7144 fi
cannam@126 7145 ;;
cannam@126 7146
cannam@126 7147 osf3* | osf4* | osf5*)
cannam@126 7148 case $cc_basename in
cannam@126 7149 KCC*)
cannam@126 7150 # Kuck and Associates, Inc. (KAI) C++ Compiler
cannam@126 7151
cannam@126 7152 # KCC will only create a shared library if the output file
cannam@126 7153 # ends with ".so" (or ".sl" for HP-UX), so rename the library
cannam@126 7154 # to its proper name (with version) after linking.
cannam@126 7155 _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
cannam@126 7156
cannam@126 7157 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
cannam@126 7158 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@126 7159
cannam@126 7160 # Archives containing C++ object files must be created using
cannam@126 7161 # the KAI C++ compiler.
cannam@126 7162 case $host in
cannam@126 7163 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
cannam@126 7164 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
cannam@126 7165 esac
cannam@126 7166 ;;
cannam@126 7167 RCC*)
cannam@126 7168 # Rational C++ 2.4.1
cannam@126 7169 # FIXME: insert proper C++ library support
cannam@126 7170 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 7171 ;;
cannam@126 7172 cxx*)
cannam@126 7173 case $host in
cannam@126 7174 osf3*)
cannam@126 7175 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
cannam@126 7176 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
cannam@126 7177 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@126 7178 ;;
cannam@126 7179 *)
cannam@126 7180 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
cannam@126 7181 _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
cannam@126 7182 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
cannam@126 7183 echo "-hidden">> $lib.exp~
cannam@126 7184 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
cannam@126 7185 $RM $lib.exp'
cannam@126 7186 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
cannam@126 7187 ;;
cannam@126 7188 esac
cannam@126 7189
cannam@126 7190 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@126 7191
cannam@126 7192 # Commands to make compiler produce verbose output that lists
cannam@126 7193 # what "hidden" libraries, object files and flags are used when
cannam@126 7194 # linking a shared library.
cannam@126 7195 #
cannam@126 7196 # There doesn't appear to be a way to prevent this compiler from
cannam@126 7197 # explicitly linking system object files so we need to strip them
cannam@126 7198 # from the output so that they don't get included in the library
cannam@126 7199 # dependencies.
cannam@126 7200 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
cannam@126 7201 ;;
cannam@126 7202 *)
cannam@126 7203 if test yes,no = "$GXX,$with_gnu_ld"; then
cannam@126 7204 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
cannam@126 7205 case $host in
cannam@126 7206 osf3*)
cannam@126 7207 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
cannam@126 7208 ;;
cannam@126 7209 *)
cannam@126 7210 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
cannam@126 7211 ;;
cannam@126 7212 esac
cannam@126 7213
cannam@126 7214 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@126 7215 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@126 7216
cannam@126 7217 # Commands to make compiler produce verbose output that lists
cannam@126 7218 # what "hidden" libraries, object files and flags are used when
cannam@126 7219 # linking a shared library.
cannam@126 7220 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
cannam@126 7221
cannam@126 7222 else
cannam@126 7223 # FIXME: insert proper C++ library support
cannam@126 7224 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 7225 fi
cannam@126 7226 ;;
cannam@126 7227 esac
cannam@126 7228 ;;
cannam@126 7229
cannam@126 7230 psos*)
cannam@126 7231 # FIXME: insert proper C++ library support
cannam@126 7232 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 7233 ;;
cannam@126 7234
cannam@126 7235 sunos4*)
cannam@126 7236 case $cc_basename in
cannam@126 7237 CC*)
cannam@126 7238 # Sun C++ 4.x
cannam@126 7239 # FIXME: insert proper C++ library support
cannam@126 7240 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 7241 ;;
cannam@126 7242 lcc*)
cannam@126 7243 # Lucid
cannam@126 7244 # FIXME: insert proper C++ library support
cannam@126 7245 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 7246 ;;
cannam@126 7247 *)
cannam@126 7248 # FIXME: insert proper C++ library support
cannam@126 7249 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 7250 ;;
cannam@126 7251 esac
cannam@126 7252 ;;
cannam@126 7253
cannam@126 7254 solaris*)
cannam@126 7255 case $cc_basename in
cannam@126 7256 CC* | sunCC*)
cannam@126 7257 # Sun C++ 4.2, 5.x and Centerline C++
cannam@126 7258 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
cannam@126 7259 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
cannam@126 7260 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
cannam@126 7261 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
cannam@126 7262 $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
cannam@126 7263
cannam@126 7264 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@126 7265 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@126 7266 case $host_os in
cannam@126 7267 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
cannam@126 7268 *)
cannam@126 7269 # The compiler driver will combine and reorder linker options,
cannam@126 7270 # but understands '-z linker_flag'.
cannam@126 7271 # Supported since Solaris 2.6 (maybe 2.5.1?)
cannam@126 7272 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
cannam@126 7273 ;;
cannam@126 7274 esac
cannam@126 7275 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@126 7276
cannam@126 7277 output_verbose_link_cmd='func_echo_all'
cannam@126 7278
cannam@126 7279 # Archives containing C++ object files must be created using
cannam@126 7280 # "CC -xar", where "CC" is the Sun C++ compiler. This is
cannam@126 7281 # necessary to make sure instantiated templates are included
cannam@126 7282 # in the archive.
cannam@126 7283 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
cannam@126 7284 ;;
cannam@126 7285 gcx*)
cannam@126 7286 # Green Hills C++ Compiler
cannam@126 7287 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
cannam@126 7288
cannam@126 7289 # The C++ compiler must be used to create the archive.
cannam@126 7290 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
cannam@126 7291 ;;
cannam@126 7292 *)
cannam@126 7293 # GNU C++ compiler with Solaris linker
cannam@126 7294 if test yes,no = "$GXX,$with_gnu_ld"; then
cannam@126 7295 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
cannam@126 7296 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
cannam@126 7297 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
cannam@126 7298 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
cannam@126 7299 $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
cannam@126 7300
cannam@126 7301 # Commands to make compiler produce verbose output that lists
cannam@126 7302 # what "hidden" libraries, object files and flags are used when
cannam@126 7303 # linking a shared library.
cannam@126 7304 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
cannam@126 7305 else
cannam@126 7306 # g++ 2.7 appears to require '-G' NOT '-shared' on this
cannam@126 7307 # platform.
cannam@126 7308 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
cannam@126 7309 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
cannam@126 7310 $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
cannam@126 7311
cannam@126 7312 # Commands to make compiler produce verbose output that lists
cannam@126 7313 # what "hidden" libraries, object files and flags are used when
cannam@126 7314 # linking a shared library.
cannam@126 7315 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
cannam@126 7316 fi
cannam@126 7317
cannam@126 7318 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
cannam@126 7319 case $host_os in
cannam@126 7320 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
cannam@126 7321 *)
cannam@126 7322 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
cannam@126 7323 ;;
cannam@126 7324 esac
cannam@126 7325 fi
cannam@126 7326 ;;
cannam@126 7327 esac
cannam@126 7328 ;;
cannam@126 7329
cannam@126 7330 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
cannam@126 7331 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
cannam@126 7332 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@126 7333 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@126 7334 runpath_var='LD_RUN_PATH'
cannam@126 7335
cannam@126 7336 case $cc_basename in
cannam@126 7337 CC*)
cannam@126 7338 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@126 7339 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@126 7340 ;;
cannam@126 7341 *)
cannam@126 7342 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@126 7343 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@126 7344 ;;
cannam@126 7345 esac
cannam@126 7346 ;;
cannam@126 7347
cannam@126 7348 sysv5* | sco3.2v5* | sco5v6*)
cannam@126 7349 # Note: We CANNOT use -z defs as we might desire, because we do not
cannam@126 7350 # link with -lc, and that would cause any symbols used from libc to
cannam@126 7351 # always be unresolved, which means just about no library would
cannam@126 7352 # ever link correctly. If we're not using GNU ld we use -z text
cannam@126 7353 # though, which does catch some bad symbols but isn't as heavy-handed
cannam@126 7354 # as -z defs.
cannam@126 7355 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
cannam@126 7356 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
cannam@126 7357 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@126 7358 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@126 7359 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
cannam@126 7360 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
cannam@126 7361 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@126 7362 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
cannam@126 7363 runpath_var='LD_RUN_PATH'
cannam@126 7364
cannam@126 7365 case $cc_basename in
cannam@126 7366 CC*)
cannam@126 7367 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@126 7368 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@126 7369 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
cannam@126 7370 '"$_LT_TAGVAR(old_archive_cmds, $1)"
cannam@126 7371 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
cannam@126 7372 '"$_LT_TAGVAR(reload_cmds, $1)"
cannam@126 7373 ;;
cannam@126 7374 *)
cannam@126 7375 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@126 7376 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@126 7377 ;;
cannam@126 7378 esac
cannam@126 7379 ;;
cannam@126 7380
cannam@126 7381 tandem*)
cannam@126 7382 case $cc_basename in
cannam@126 7383 NCC*)
cannam@126 7384 # NonStop-UX NCC 3.20
cannam@126 7385 # FIXME: insert proper C++ library support
cannam@126 7386 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 7387 ;;
cannam@126 7388 *)
cannam@126 7389 # FIXME: insert proper C++ library support
cannam@126 7390 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 7391 ;;
cannam@126 7392 esac
cannam@126 7393 ;;
cannam@126 7394
cannam@126 7395 vxworks*)
cannam@126 7396 # FIXME: insert proper C++ library support
cannam@126 7397 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 7398 ;;
cannam@126 7399
cannam@126 7400 *)
cannam@126 7401 # FIXME: insert proper C++ library support
cannam@126 7402 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@126 7403 ;;
cannam@126 7404 esac
cannam@126 7405
cannam@126 7406 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
cannam@126 7407 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
cannam@126 7408
cannam@126 7409 _LT_TAGVAR(GCC, $1)=$GXX
cannam@126 7410 _LT_TAGVAR(LD, $1)=$LD
cannam@126 7411
cannam@126 7412 ## CAVEAT EMPTOR:
cannam@126 7413 ## There is no encapsulation within the following macros, do not change
cannam@126 7414 ## the running order or otherwise move them around unless you know exactly
cannam@126 7415 ## what you are doing...
cannam@126 7416 _LT_SYS_HIDDEN_LIBDEPS($1)
cannam@126 7417 _LT_COMPILER_PIC($1)
cannam@126 7418 _LT_COMPILER_C_O($1)
cannam@126 7419 _LT_COMPILER_FILE_LOCKS($1)
cannam@126 7420 _LT_LINKER_SHLIBS($1)
cannam@126 7421 _LT_SYS_DYNAMIC_LINKER($1)
cannam@126 7422 _LT_LINKER_HARDCODE_LIBPATH($1)
cannam@126 7423
cannam@126 7424 _LT_CONFIG($1)
cannam@126 7425 fi # test -n "$compiler"
cannam@126 7426
cannam@126 7427 CC=$lt_save_CC
cannam@126 7428 CFLAGS=$lt_save_CFLAGS
cannam@126 7429 LDCXX=$LD
cannam@126 7430 LD=$lt_save_LD
cannam@126 7431 GCC=$lt_save_GCC
cannam@126 7432 with_gnu_ld=$lt_save_with_gnu_ld
cannam@126 7433 lt_cv_path_LDCXX=$lt_cv_path_LD
cannam@126 7434 lt_cv_path_LD=$lt_save_path_LD
cannam@126 7435 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
cannam@126 7436 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
cannam@126 7437 fi # test yes != "$_lt_caught_CXX_error"
cannam@126 7438
cannam@126 7439 AC_LANG_POP
cannam@126 7440 ])# _LT_LANG_CXX_CONFIG
cannam@126 7441
cannam@126 7442
cannam@126 7443 # _LT_FUNC_STRIPNAME_CNF
cannam@126 7444 # ----------------------
cannam@126 7445 # func_stripname_cnf prefix suffix name
cannam@126 7446 # strip PREFIX and SUFFIX off of NAME.
cannam@126 7447 # PREFIX and SUFFIX must not contain globbing or regex special
cannam@126 7448 # characters, hashes, percent signs, but SUFFIX may contain a leading
cannam@126 7449 # dot (in which case that matches only a dot).
cannam@126 7450 #
cannam@126 7451 # This function is identical to the (non-XSI) version of func_stripname,
cannam@126 7452 # except this one can be used by m4 code that may be executed by configure,
cannam@126 7453 # rather than the libtool script.
cannam@126 7454 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
cannam@126 7455 AC_REQUIRE([_LT_DECL_SED])
cannam@126 7456 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
cannam@126 7457 func_stripname_cnf ()
cannam@126 7458 {
cannam@126 7459 case @S|@2 in
cannam@126 7460 .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
cannam@126 7461 *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
cannam@126 7462 esac
cannam@126 7463 } # func_stripname_cnf
cannam@126 7464 ])# _LT_FUNC_STRIPNAME_CNF
cannam@126 7465
cannam@126 7466
cannam@126 7467 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
cannam@126 7468 # ---------------------------------
cannam@126 7469 # Figure out "hidden" library dependencies from verbose
cannam@126 7470 # compiler output when linking a shared library.
cannam@126 7471 # Parse the compiler output and extract the necessary
cannam@126 7472 # objects, libraries and library flags.
cannam@126 7473 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
cannam@126 7474 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@126 7475 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
cannam@126 7476 # Dependencies to place before and after the object being linked:
cannam@126 7477 _LT_TAGVAR(predep_objects, $1)=
cannam@126 7478 _LT_TAGVAR(postdep_objects, $1)=
cannam@126 7479 _LT_TAGVAR(predeps, $1)=
cannam@126 7480 _LT_TAGVAR(postdeps, $1)=
cannam@126 7481 _LT_TAGVAR(compiler_lib_search_path, $1)=
cannam@126 7482
cannam@126 7483 dnl we can't use the lt_simple_compile_test_code here,
cannam@126 7484 dnl because it contains code intended for an executable,
cannam@126 7485 dnl not a library. It's possible we should let each
cannam@126 7486 dnl tag define a new lt_????_link_test_code variable,
cannam@126 7487 dnl but it's only used here...
cannam@126 7488 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
cannam@126 7489 int a;
cannam@126 7490 void foo (void) { a = 0; }
cannam@126 7491 _LT_EOF
cannam@126 7492 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
cannam@126 7493 class Foo
cannam@126 7494 {
cannam@126 7495 public:
cannam@126 7496 Foo (void) { a = 0; }
cannam@126 7497 private:
cannam@126 7498 int a;
cannam@126 7499 };
cannam@126 7500 _LT_EOF
cannam@126 7501 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
cannam@126 7502 subroutine foo
cannam@126 7503 implicit none
cannam@126 7504 integer*4 a
cannam@126 7505 a=0
cannam@126 7506 return
cannam@126 7507 end
cannam@126 7508 _LT_EOF
cannam@126 7509 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
cannam@126 7510 subroutine foo
cannam@126 7511 implicit none
cannam@126 7512 integer a
cannam@126 7513 a=0
cannam@126 7514 return
cannam@126 7515 end
cannam@126 7516 _LT_EOF
cannam@126 7517 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
cannam@126 7518 public class foo {
cannam@126 7519 private int a;
cannam@126 7520 public void bar (void) {
cannam@126 7521 a = 0;
cannam@126 7522 }
cannam@126 7523 };
cannam@126 7524 _LT_EOF
cannam@126 7525 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
cannam@126 7526 package foo
cannam@126 7527 func foo() {
cannam@126 7528 }
cannam@126 7529 _LT_EOF
cannam@126 7530 ])
cannam@126 7531
cannam@126 7532 _lt_libdeps_save_CFLAGS=$CFLAGS
cannam@126 7533 case "$CC $CFLAGS " in #(
cannam@126 7534 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
cannam@126 7535 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
cannam@126 7536 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
cannam@126 7537 esac
cannam@126 7538
cannam@126 7539 dnl Parse the compiler output and extract the necessary
cannam@126 7540 dnl objects, libraries and library flags.
cannam@126 7541 if AC_TRY_EVAL(ac_compile); then
cannam@126 7542 # Parse the compiler output and extract the necessary
cannam@126 7543 # objects, libraries and library flags.
cannam@126 7544
cannam@126 7545 # Sentinel used to keep track of whether or not we are before
cannam@126 7546 # the conftest object file.
cannam@126 7547 pre_test_object_deps_done=no
cannam@126 7548
cannam@126 7549 for p in `eval "$output_verbose_link_cmd"`; do
cannam@126 7550 case $prev$p in
cannam@126 7551
cannam@126 7552 -L* | -R* | -l*)
cannam@126 7553 # Some compilers place space between "-{L,R}" and the path.
cannam@126 7554 # Remove the space.
cannam@126 7555 if test x-L = "$p" ||
cannam@126 7556 test x-R = "$p"; then
cannam@126 7557 prev=$p
cannam@126 7558 continue
cannam@126 7559 fi
cannam@126 7560
cannam@126 7561 # Expand the sysroot to ease extracting the directories later.
cannam@126 7562 if test -z "$prev"; then
cannam@126 7563 case $p in
cannam@126 7564 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
cannam@126 7565 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
cannam@126 7566 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
cannam@126 7567 esac
cannam@126 7568 fi
cannam@126 7569 case $p in
cannam@126 7570 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
cannam@126 7571 esac
cannam@126 7572 if test no = "$pre_test_object_deps_done"; then
cannam@126 7573 case $prev in
cannam@126 7574 -L | -R)
cannam@126 7575 # Internal compiler library paths should come after those
cannam@126 7576 # provided the user. The postdeps already come after the
cannam@126 7577 # user supplied libs so there is no need to process them.
cannam@126 7578 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
cannam@126 7579 _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
cannam@126 7580 else
cannam@126 7581 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
cannam@126 7582 fi
cannam@126 7583 ;;
cannam@126 7584 # The "-l" case would never come before the object being
cannam@126 7585 # linked, so don't bother handling this case.
cannam@126 7586 esac
cannam@126 7587 else
cannam@126 7588 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
cannam@126 7589 _LT_TAGVAR(postdeps, $1)=$prev$p
cannam@126 7590 else
cannam@126 7591 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
cannam@126 7592 fi
cannam@126 7593 fi
cannam@126 7594 prev=
cannam@126 7595 ;;
cannam@126 7596
cannam@126 7597 *.lto.$objext) ;; # Ignore GCC LTO objects
cannam@126 7598 *.$objext)
cannam@126 7599 # This assumes that the test object file only shows up
cannam@126 7600 # once in the compiler output.
cannam@126 7601 if test "$p" = "conftest.$objext"; then
cannam@126 7602 pre_test_object_deps_done=yes
cannam@126 7603 continue
cannam@126 7604 fi
cannam@126 7605
cannam@126 7606 if test no = "$pre_test_object_deps_done"; then
cannam@126 7607 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
cannam@126 7608 _LT_TAGVAR(predep_objects, $1)=$p
cannam@126 7609 else
cannam@126 7610 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
cannam@126 7611 fi
cannam@126 7612 else
cannam@126 7613 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
cannam@126 7614 _LT_TAGVAR(postdep_objects, $1)=$p
cannam@126 7615 else
cannam@126 7616 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
cannam@126 7617 fi
cannam@126 7618 fi
cannam@126 7619 ;;
cannam@126 7620
cannam@126 7621 *) ;; # Ignore the rest.
cannam@126 7622
cannam@126 7623 esac
cannam@126 7624 done
cannam@126 7625
cannam@126 7626 # Clean up.
cannam@126 7627 rm -f a.out a.exe
cannam@126 7628 else
cannam@126 7629 echo "libtool.m4: error: problem compiling $1 test program"
cannam@126 7630 fi
cannam@126 7631
cannam@126 7632 $RM -f confest.$objext
cannam@126 7633 CFLAGS=$_lt_libdeps_save_CFLAGS
cannam@126 7634
cannam@126 7635 # PORTME: override above test on systems where it is broken
cannam@126 7636 m4_if([$1], [CXX],
cannam@126 7637 [case $host_os in
cannam@126 7638 interix[[3-9]]*)
cannam@126 7639 # Interix 3.5 installs completely hosed .la files for C++, so rather than
cannam@126 7640 # hack all around it, let's just trust "g++" to DTRT.
cannam@126 7641 _LT_TAGVAR(predep_objects,$1)=
cannam@126 7642 _LT_TAGVAR(postdep_objects,$1)=
cannam@126 7643 _LT_TAGVAR(postdeps,$1)=
cannam@126 7644 ;;
cannam@126 7645 esac
cannam@126 7646 ])
cannam@126 7647
cannam@126 7648 case " $_LT_TAGVAR(postdeps, $1) " in
cannam@126 7649 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
cannam@126 7650 esac
cannam@126 7651 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
cannam@126 7652 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
cannam@126 7653 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
cannam@126 7654 fi
cannam@126 7655 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
cannam@126 7656 [The directories searched by this compiler when creating a shared library])
cannam@126 7657 _LT_TAGDECL([], [predep_objects], [1],
cannam@126 7658 [Dependencies to place before and after the objects being linked to
cannam@126 7659 create a shared library])
cannam@126 7660 _LT_TAGDECL([], [postdep_objects], [1])
cannam@126 7661 _LT_TAGDECL([], [predeps], [1])
cannam@126 7662 _LT_TAGDECL([], [postdeps], [1])
cannam@126 7663 _LT_TAGDECL([], [compiler_lib_search_path], [1],
cannam@126 7664 [The library search path used internally by the compiler when linking
cannam@126 7665 a shared library])
cannam@126 7666 ])# _LT_SYS_HIDDEN_LIBDEPS
cannam@126 7667
cannam@126 7668
cannam@126 7669 # _LT_LANG_F77_CONFIG([TAG])
cannam@126 7670 # --------------------------
cannam@126 7671 # Ensure that the configuration variables for a Fortran 77 compiler are
cannam@126 7672 # suitably defined. These variables are subsequently used by _LT_CONFIG
cannam@126 7673 # to write the compiler configuration to 'libtool'.
cannam@126 7674 m4_defun([_LT_LANG_F77_CONFIG],
cannam@126 7675 [AC_LANG_PUSH(Fortran 77)
cannam@126 7676 if test -z "$F77" || test no = "$F77"; then
cannam@126 7677 _lt_disable_F77=yes
cannam@126 7678 fi
cannam@126 7679
cannam@126 7680 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@126 7681 _LT_TAGVAR(allow_undefined_flag, $1)=
cannam@126 7682 _LT_TAGVAR(always_export_symbols, $1)=no
cannam@126 7683 _LT_TAGVAR(archive_expsym_cmds, $1)=
cannam@126 7684 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
cannam@126 7685 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@126 7686 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
cannam@126 7687 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
cannam@126 7688 _LT_TAGVAR(hardcode_libdir_separator, $1)=
cannam@126 7689 _LT_TAGVAR(hardcode_minus_L, $1)=no
cannam@126 7690 _LT_TAGVAR(hardcode_automatic, $1)=no
cannam@126 7691 _LT_TAGVAR(inherit_rpath, $1)=no
cannam@126 7692 _LT_TAGVAR(module_cmds, $1)=
cannam@126 7693 _LT_TAGVAR(module_expsym_cmds, $1)=
cannam@126 7694 _LT_TAGVAR(link_all_deplibs, $1)=unknown
cannam@126 7695 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
cannam@126 7696 _LT_TAGVAR(reload_flag, $1)=$reload_flag
cannam@126 7697 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
cannam@126 7698 _LT_TAGVAR(no_undefined_flag, $1)=
cannam@126 7699 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@126 7700 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
cannam@126 7701
cannam@126 7702 # Source file extension for f77 test sources.
cannam@126 7703 ac_ext=f
cannam@126 7704
cannam@126 7705 # Object file extension for compiled f77 test sources.
cannam@126 7706 objext=o
cannam@126 7707 _LT_TAGVAR(objext, $1)=$objext
cannam@126 7708
cannam@126 7709 # No sense in running all these tests if we already determined that
cannam@126 7710 # the F77 compiler isn't working. Some variables (like enable_shared)
cannam@126 7711 # are currently assumed to apply to all compilers on this platform,
cannam@126 7712 # and will be corrupted by setting them based on a non-working compiler.
cannam@126 7713 if test yes != "$_lt_disable_F77"; then
cannam@126 7714 # Code to be used in simple compile tests
cannam@126 7715 lt_simple_compile_test_code="\
cannam@126 7716 subroutine t
cannam@126 7717 return
cannam@126 7718 end
cannam@126 7719 "
cannam@126 7720
cannam@126 7721 # Code to be used in simple link tests
cannam@126 7722 lt_simple_link_test_code="\
cannam@126 7723 program t
cannam@126 7724 end
cannam@126 7725 "
cannam@126 7726
cannam@126 7727 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
cannam@126 7728 _LT_TAG_COMPILER
cannam@126 7729
cannam@126 7730 # save warnings/boilerplate of simple test code
cannam@126 7731 _LT_COMPILER_BOILERPLATE
cannam@126 7732 _LT_LINKER_BOILERPLATE
cannam@126 7733
cannam@126 7734 # Allow CC to be a program name with arguments.
cannam@126 7735 lt_save_CC=$CC
cannam@126 7736 lt_save_GCC=$GCC
cannam@126 7737 lt_save_CFLAGS=$CFLAGS
cannam@126 7738 CC=${F77-"f77"}
cannam@126 7739 CFLAGS=$FFLAGS
cannam@126 7740 compiler=$CC
cannam@126 7741 _LT_TAGVAR(compiler, $1)=$CC
cannam@126 7742 _LT_CC_BASENAME([$compiler])
cannam@126 7743 GCC=$G77
cannam@126 7744 if test -n "$compiler"; then
cannam@126 7745 AC_MSG_CHECKING([if libtool supports shared libraries])
cannam@126 7746 AC_MSG_RESULT([$can_build_shared])
cannam@126 7747
cannam@126 7748 AC_MSG_CHECKING([whether to build shared libraries])
cannam@126 7749 test no = "$can_build_shared" && enable_shared=no
cannam@126 7750
cannam@126 7751 # On AIX, shared libraries and static libraries use the same namespace, and
cannam@126 7752 # are all built from PIC.
cannam@126 7753 case $host_os in
cannam@126 7754 aix3*)
cannam@126 7755 test yes = "$enable_shared" && enable_static=no
cannam@126 7756 if test -n "$RANLIB"; then
cannam@126 7757 archive_cmds="$archive_cmds~\$RANLIB \$lib"
cannam@126 7758 postinstall_cmds='$RANLIB $lib'
cannam@126 7759 fi
cannam@126 7760 ;;
cannam@126 7761 aix[[4-9]]*)
cannam@126 7762 if test ia64 != "$host_cpu"; then
cannam@126 7763 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
cannam@126 7764 yes,aix,yes) ;; # shared object as lib.so file only
cannam@126 7765 yes,svr4,*) ;; # shared object as lib.so archive member only
cannam@126 7766 yes,*) enable_static=no ;; # shared object in lib.a archive as well
cannam@126 7767 esac
cannam@126 7768 fi
cannam@126 7769 ;;
cannam@126 7770 esac
cannam@126 7771 AC_MSG_RESULT([$enable_shared])
cannam@126 7772
cannam@126 7773 AC_MSG_CHECKING([whether to build static libraries])
cannam@126 7774 # Make sure either enable_shared or enable_static is yes.
cannam@126 7775 test yes = "$enable_shared" || enable_static=yes
cannam@126 7776 AC_MSG_RESULT([$enable_static])
cannam@126 7777
cannam@126 7778 _LT_TAGVAR(GCC, $1)=$G77
cannam@126 7779 _LT_TAGVAR(LD, $1)=$LD
cannam@126 7780
cannam@126 7781 ## CAVEAT EMPTOR:
cannam@126 7782 ## There is no encapsulation within the following macros, do not change
cannam@126 7783 ## the running order or otherwise move them around unless you know exactly
cannam@126 7784 ## what you are doing...
cannam@126 7785 _LT_COMPILER_PIC($1)
cannam@126 7786 _LT_COMPILER_C_O($1)
cannam@126 7787 _LT_COMPILER_FILE_LOCKS($1)
cannam@126 7788 _LT_LINKER_SHLIBS($1)
cannam@126 7789 _LT_SYS_DYNAMIC_LINKER($1)
cannam@126 7790 _LT_LINKER_HARDCODE_LIBPATH($1)
cannam@126 7791
cannam@126 7792 _LT_CONFIG($1)
cannam@126 7793 fi # test -n "$compiler"
cannam@126 7794
cannam@126 7795 GCC=$lt_save_GCC
cannam@126 7796 CC=$lt_save_CC
cannam@126 7797 CFLAGS=$lt_save_CFLAGS
cannam@126 7798 fi # test yes != "$_lt_disable_F77"
cannam@126 7799
cannam@126 7800 AC_LANG_POP
cannam@126 7801 ])# _LT_LANG_F77_CONFIG
cannam@126 7802
cannam@126 7803
cannam@126 7804 # _LT_LANG_FC_CONFIG([TAG])
cannam@126 7805 # -------------------------
cannam@126 7806 # Ensure that the configuration variables for a Fortran compiler are
cannam@126 7807 # suitably defined. These variables are subsequently used by _LT_CONFIG
cannam@126 7808 # to write the compiler configuration to 'libtool'.
cannam@126 7809 m4_defun([_LT_LANG_FC_CONFIG],
cannam@126 7810 [AC_LANG_PUSH(Fortran)
cannam@126 7811
cannam@126 7812 if test -z "$FC" || test no = "$FC"; then
cannam@126 7813 _lt_disable_FC=yes
cannam@126 7814 fi
cannam@126 7815
cannam@126 7816 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@126 7817 _LT_TAGVAR(allow_undefined_flag, $1)=
cannam@126 7818 _LT_TAGVAR(always_export_symbols, $1)=no
cannam@126 7819 _LT_TAGVAR(archive_expsym_cmds, $1)=
cannam@126 7820 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
cannam@126 7821 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@126 7822 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
cannam@126 7823 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
cannam@126 7824 _LT_TAGVAR(hardcode_libdir_separator, $1)=
cannam@126 7825 _LT_TAGVAR(hardcode_minus_L, $1)=no
cannam@126 7826 _LT_TAGVAR(hardcode_automatic, $1)=no
cannam@126 7827 _LT_TAGVAR(inherit_rpath, $1)=no
cannam@126 7828 _LT_TAGVAR(module_cmds, $1)=
cannam@126 7829 _LT_TAGVAR(module_expsym_cmds, $1)=
cannam@126 7830 _LT_TAGVAR(link_all_deplibs, $1)=unknown
cannam@126 7831 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
cannam@126 7832 _LT_TAGVAR(reload_flag, $1)=$reload_flag
cannam@126 7833 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
cannam@126 7834 _LT_TAGVAR(no_undefined_flag, $1)=
cannam@126 7835 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@126 7836 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
cannam@126 7837
cannam@126 7838 # Source file extension for fc test sources.
cannam@126 7839 ac_ext=${ac_fc_srcext-f}
cannam@126 7840
cannam@126 7841 # Object file extension for compiled fc test sources.
cannam@126 7842 objext=o
cannam@126 7843 _LT_TAGVAR(objext, $1)=$objext
cannam@126 7844
cannam@126 7845 # No sense in running all these tests if we already determined that
cannam@126 7846 # the FC compiler isn't working. Some variables (like enable_shared)
cannam@126 7847 # are currently assumed to apply to all compilers on this platform,
cannam@126 7848 # and will be corrupted by setting them based on a non-working compiler.
cannam@126 7849 if test yes != "$_lt_disable_FC"; then
cannam@126 7850 # Code to be used in simple compile tests
cannam@126 7851 lt_simple_compile_test_code="\
cannam@126 7852 subroutine t
cannam@126 7853 return
cannam@126 7854 end
cannam@126 7855 "
cannam@126 7856
cannam@126 7857 # Code to be used in simple link tests
cannam@126 7858 lt_simple_link_test_code="\
cannam@126 7859 program t
cannam@126 7860 end
cannam@126 7861 "
cannam@126 7862
cannam@126 7863 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
cannam@126 7864 _LT_TAG_COMPILER
cannam@126 7865
cannam@126 7866 # save warnings/boilerplate of simple test code
cannam@126 7867 _LT_COMPILER_BOILERPLATE
cannam@126 7868 _LT_LINKER_BOILERPLATE
cannam@126 7869
cannam@126 7870 # Allow CC to be a program name with arguments.
cannam@126 7871 lt_save_CC=$CC
cannam@126 7872 lt_save_GCC=$GCC
cannam@126 7873 lt_save_CFLAGS=$CFLAGS
cannam@126 7874 CC=${FC-"f95"}
cannam@126 7875 CFLAGS=$FCFLAGS
cannam@126 7876 compiler=$CC
cannam@126 7877 GCC=$ac_cv_fc_compiler_gnu
cannam@126 7878
cannam@126 7879 _LT_TAGVAR(compiler, $1)=$CC
cannam@126 7880 _LT_CC_BASENAME([$compiler])
cannam@126 7881
cannam@126 7882 if test -n "$compiler"; then
cannam@126 7883 AC_MSG_CHECKING([if libtool supports shared libraries])
cannam@126 7884 AC_MSG_RESULT([$can_build_shared])
cannam@126 7885
cannam@126 7886 AC_MSG_CHECKING([whether to build shared libraries])
cannam@126 7887 test no = "$can_build_shared" && enable_shared=no
cannam@126 7888
cannam@126 7889 # On AIX, shared libraries and static libraries use the same namespace, and
cannam@126 7890 # are all built from PIC.
cannam@126 7891 case $host_os in
cannam@126 7892 aix3*)
cannam@126 7893 test yes = "$enable_shared" && enable_static=no
cannam@126 7894 if test -n "$RANLIB"; then
cannam@126 7895 archive_cmds="$archive_cmds~\$RANLIB \$lib"
cannam@126 7896 postinstall_cmds='$RANLIB $lib'
cannam@126 7897 fi
cannam@126 7898 ;;
cannam@126 7899 aix[[4-9]]*)
cannam@126 7900 if test ia64 != "$host_cpu"; then
cannam@126 7901 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
cannam@126 7902 yes,aix,yes) ;; # shared object as lib.so file only
cannam@126 7903 yes,svr4,*) ;; # shared object as lib.so archive member only
cannam@126 7904 yes,*) enable_static=no ;; # shared object in lib.a archive as well
cannam@126 7905 esac
cannam@126 7906 fi
cannam@126 7907 ;;
cannam@126 7908 esac
cannam@126 7909 AC_MSG_RESULT([$enable_shared])
cannam@126 7910
cannam@126 7911 AC_MSG_CHECKING([whether to build static libraries])
cannam@126 7912 # Make sure either enable_shared or enable_static is yes.
cannam@126 7913 test yes = "$enable_shared" || enable_static=yes
cannam@126 7914 AC_MSG_RESULT([$enable_static])
cannam@126 7915
cannam@126 7916 _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
cannam@126 7917 _LT_TAGVAR(LD, $1)=$LD
cannam@126 7918
cannam@126 7919 ## CAVEAT EMPTOR:
cannam@126 7920 ## There is no encapsulation within the following macros, do not change
cannam@126 7921 ## the running order or otherwise move them around unless you know exactly
cannam@126 7922 ## what you are doing...
cannam@126 7923 _LT_SYS_HIDDEN_LIBDEPS($1)
cannam@126 7924 _LT_COMPILER_PIC($1)
cannam@126 7925 _LT_COMPILER_C_O($1)
cannam@126 7926 _LT_COMPILER_FILE_LOCKS($1)
cannam@126 7927 _LT_LINKER_SHLIBS($1)
cannam@126 7928 _LT_SYS_DYNAMIC_LINKER($1)
cannam@126 7929 _LT_LINKER_HARDCODE_LIBPATH($1)
cannam@126 7930
cannam@126 7931 _LT_CONFIG($1)
cannam@126 7932 fi # test -n "$compiler"
cannam@126 7933
cannam@126 7934 GCC=$lt_save_GCC
cannam@126 7935 CC=$lt_save_CC
cannam@126 7936 CFLAGS=$lt_save_CFLAGS
cannam@126 7937 fi # test yes != "$_lt_disable_FC"
cannam@126 7938
cannam@126 7939 AC_LANG_POP
cannam@126 7940 ])# _LT_LANG_FC_CONFIG
cannam@126 7941
cannam@126 7942
cannam@126 7943 # _LT_LANG_GCJ_CONFIG([TAG])
cannam@126 7944 # --------------------------
cannam@126 7945 # Ensure that the configuration variables for the GNU Java Compiler compiler
cannam@126 7946 # are suitably defined. These variables are subsequently used by _LT_CONFIG
cannam@126 7947 # to write the compiler configuration to 'libtool'.
cannam@126 7948 m4_defun([_LT_LANG_GCJ_CONFIG],
cannam@126 7949 [AC_REQUIRE([LT_PROG_GCJ])dnl
cannam@126 7950 AC_LANG_SAVE
cannam@126 7951
cannam@126 7952 # Source file extension for Java test sources.
cannam@126 7953 ac_ext=java
cannam@126 7954
cannam@126 7955 # Object file extension for compiled Java test sources.
cannam@126 7956 objext=o
cannam@126 7957 _LT_TAGVAR(objext, $1)=$objext
cannam@126 7958
cannam@126 7959 # Code to be used in simple compile tests
cannam@126 7960 lt_simple_compile_test_code="class foo {}"
cannam@126 7961
cannam@126 7962 # Code to be used in simple link tests
cannam@126 7963 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
cannam@126 7964
cannam@126 7965 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
cannam@126 7966 _LT_TAG_COMPILER
cannam@126 7967
cannam@126 7968 # save warnings/boilerplate of simple test code
cannam@126 7969 _LT_COMPILER_BOILERPLATE
cannam@126 7970 _LT_LINKER_BOILERPLATE
cannam@126 7971
cannam@126 7972 # Allow CC to be a program name with arguments.
cannam@126 7973 lt_save_CC=$CC
cannam@126 7974 lt_save_CFLAGS=$CFLAGS
cannam@126 7975 lt_save_GCC=$GCC
cannam@126 7976 GCC=yes
cannam@126 7977 CC=${GCJ-"gcj"}
cannam@126 7978 CFLAGS=$GCJFLAGS
cannam@126 7979 compiler=$CC
cannam@126 7980 _LT_TAGVAR(compiler, $1)=$CC
cannam@126 7981 _LT_TAGVAR(LD, $1)=$LD
cannam@126 7982 _LT_CC_BASENAME([$compiler])
cannam@126 7983
cannam@126 7984 # GCJ did not exist at the time GCC didn't implicitly link libc in.
cannam@126 7985 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@126 7986
cannam@126 7987 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
cannam@126 7988 _LT_TAGVAR(reload_flag, $1)=$reload_flag
cannam@126 7989 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
cannam@126 7990
cannam@126 7991 ## CAVEAT EMPTOR:
cannam@126 7992 ## There is no encapsulation within the following macros, do not change
cannam@126 7993 ## the running order or otherwise move them around unless you know exactly
cannam@126 7994 ## what you are doing...
cannam@126 7995 if test -n "$compiler"; then
cannam@126 7996 _LT_COMPILER_NO_RTTI($1)
cannam@126 7997 _LT_COMPILER_PIC($1)
cannam@126 7998 _LT_COMPILER_C_O($1)
cannam@126 7999 _LT_COMPILER_FILE_LOCKS($1)
cannam@126 8000 _LT_LINKER_SHLIBS($1)
cannam@126 8001 _LT_LINKER_HARDCODE_LIBPATH($1)
cannam@126 8002
cannam@126 8003 _LT_CONFIG($1)
cannam@126 8004 fi
cannam@126 8005
cannam@126 8006 AC_LANG_RESTORE
cannam@126 8007
cannam@126 8008 GCC=$lt_save_GCC
cannam@126 8009 CC=$lt_save_CC
cannam@126 8010 CFLAGS=$lt_save_CFLAGS
cannam@126 8011 ])# _LT_LANG_GCJ_CONFIG
cannam@126 8012
cannam@126 8013
cannam@126 8014 # _LT_LANG_GO_CONFIG([TAG])
cannam@126 8015 # --------------------------
cannam@126 8016 # Ensure that the configuration variables for the GNU Go compiler
cannam@126 8017 # are suitably defined. These variables are subsequently used by _LT_CONFIG
cannam@126 8018 # to write the compiler configuration to 'libtool'.
cannam@126 8019 m4_defun([_LT_LANG_GO_CONFIG],
cannam@126 8020 [AC_REQUIRE([LT_PROG_GO])dnl
cannam@126 8021 AC_LANG_SAVE
cannam@126 8022
cannam@126 8023 # Source file extension for Go test sources.
cannam@126 8024 ac_ext=go
cannam@126 8025
cannam@126 8026 # Object file extension for compiled Go test sources.
cannam@126 8027 objext=o
cannam@126 8028 _LT_TAGVAR(objext, $1)=$objext
cannam@126 8029
cannam@126 8030 # Code to be used in simple compile tests
cannam@126 8031 lt_simple_compile_test_code="package main; func main() { }"
cannam@126 8032
cannam@126 8033 # Code to be used in simple link tests
cannam@126 8034 lt_simple_link_test_code='package main; func main() { }'
cannam@126 8035
cannam@126 8036 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
cannam@126 8037 _LT_TAG_COMPILER
cannam@126 8038
cannam@126 8039 # save warnings/boilerplate of simple test code
cannam@126 8040 _LT_COMPILER_BOILERPLATE
cannam@126 8041 _LT_LINKER_BOILERPLATE
cannam@126 8042
cannam@126 8043 # Allow CC to be a program name with arguments.
cannam@126 8044 lt_save_CC=$CC
cannam@126 8045 lt_save_CFLAGS=$CFLAGS
cannam@126 8046 lt_save_GCC=$GCC
cannam@126 8047 GCC=yes
cannam@126 8048 CC=${GOC-"gccgo"}
cannam@126 8049 CFLAGS=$GOFLAGS
cannam@126 8050 compiler=$CC
cannam@126 8051 _LT_TAGVAR(compiler, $1)=$CC
cannam@126 8052 _LT_TAGVAR(LD, $1)=$LD
cannam@126 8053 _LT_CC_BASENAME([$compiler])
cannam@126 8054
cannam@126 8055 # Go did not exist at the time GCC didn't implicitly link libc in.
cannam@126 8056 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@126 8057
cannam@126 8058 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
cannam@126 8059 _LT_TAGVAR(reload_flag, $1)=$reload_flag
cannam@126 8060 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
cannam@126 8061
cannam@126 8062 ## CAVEAT EMPTOR:
cannam@126 8063 ## There is no encapsulation within the following macros, do not change
cannam@126 8064 ## the running order or otherwise move them around unless you know exactly
cannam@126 8065 ## what you are doing...
cannam@126 8066 if test -n "$compiler"; then
cannam@126 8067 _LT_COMPILER_NO_RTTI($1)
cannam@126 8068 _LT_COMPILER_PIC($1)
cannam@126 8069 _LT_COMPILER_C_O($1)
cannam@126 8070 _LT_COMPILER_FILE_LOCKS($1)
cannam@126 8071 _LT_LINKER_SHLIBS($1)
cannam@126 8072 _LT_LINKER_HARDCODE_LIBPATH($1)
cannam@126 8073
cannam@126 8074 _LT_CONFIG($1)
cannam@126 8075 fi
cannam@126 8076
cannam@126 8077 AC_LANG_RESTORE
cannam@126 8078
cannam@126 8079 GCC=$lt_save_GCC
cannam@126 8080 CC=$lt_save_CC
cannam@126 8081 CFLAGS=$lt_save_CFLAGS
cannam@126 8082 ])# _LT_LANG_GO_CONFIG
cannam@126 8083
cannam@126 8084
cannam@126 8085 # _LT_LANG_RC_CONFIG([TAG])
cannam@126 8086 # -------------------------
cannam@126 8087 # Ensure that the configuration variables for the Windows resource compiler
cannam@126 8088 # are suitably defined. These variables are subsequently used by _LT_CONFIG
cannam@126 8089 # to write the compiler configuration to 'libtool'.
cannam@126 8090 m4_defun([_LT_LANG_RC_CONFIG],
cannam@126 8091 [AC_REQUIRE([LT_PROG_RC])dnl
cannam@126 8092 AC_LANG_SAVE
cannam@126 8093
cannam@126 8094 # Source file extension for RC test sources.
cannam@126 8095 ac_ext=rc
cannam@126 8096
cannam@126 8097 # Object file extension for compiled RC test sources.
cannam@126 8098 objext=o
cannam@126 8099 _LT_TAGVAR(objext, $1)=$objext
cannam@126 8100
cannam@126 8101 # Code to be used in simple compile tests
cannam@126 8102 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
cannam@126 8103
cannam@126 8104 # Code to be used in simple link tests
cannam@126 8105 lt_simple_link_test_code=$lt_simple_compile_test_code
cannam@126 8106
cannam@126 8107 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
cannam@126 8108 _LT_TAG_COMPILER
cannam@126 8109
cannam@126 8110 # save warnings/boilerplate of simple test code
cannam@126 8111 _LT_COMPILER_BOILERPLATE
cannam@126 8112 _LT_LINKER_BOILERPLATE
cannam@126 8113
cannam@126 8114 # Allow CC to be a program name with arguments.
cannam@126 8115 lt_save_CC=$CC
cannam@126 8116 lt_save_CFLAGS=$CFLAGS
cannam@126 8117 lt_save_GCC=$GCC
cannam@126 8118 GCC=
cannam@126 8119 CC=${RC-"windres"}
cannam@126 8120 CFLAGS=
cannam@126 8121 compiler=$CC
cannam@126 8122 _LT_TAGVAR(compiler, $1)=$CC
cannam@126 8123 _LT_CC_BASENAME([$compiler])
cannam@126 8124 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
cannam@126 8125
cannam@126 8126 if test -n "$compiler"; then
cannam@126 8127 :
cannam@126 8128 _LT_CONFIG($1)
cannam@126 8129 fi
cannam@126 8130
cannam@126 8131 GCC=$lt_save_GCC
cannam@126 8132 AC_LANG_RESTORE
cannam@126 8133 CC=$lt_save_CC
cannam@126 8134 CFLAGS=$lt_save_CFLAGS
cannam@126 8135 ])# _LT_LANG_RC_CONFIG
cannam@126 8136
cannam@126 8137
cannam@126 8138 # LT_PROG_GCJ
cannam@126 8139 # -----------
cannam@126 8140 AC_DEFUN([LT_PROG_GCJ],
cannam@126 8141 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
cannam@126 8142 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
cannam@126 8143 [AC_CHECK_TOOL(GCJ, gcj,)
cannam@126 8144 test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
cannam@126 8145 AC_SUBST(GCJFLAGS)])])[]dnl
cannam@126 8146 ])
cannam@126 8147
cannam@126 8148 # Old name:
cannam@126 8149 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
cannam@126 8150 dnl aclocal-1.4 backwards compatibility:
cannam@126 8151 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
cannam@126 8152
cannam@126 8153
cannam@126 8154 # LT_PROG_GO
cannam@126 8155 # ----------
cannam@126 8156 AC_DEFUN([LT_PROG_GO],
cannam@126 8157 [AC_CHECK_TOOL(GOC, gccgo,)
cannam@126 8158 ])
cannam@126 8159
cannam@126 8160
cannam@126 8161 # LT_PROG_RC
cannam@126 8162 # ----------
cannam@126 8163 AC_DEFUN([LT_PROG_RC],
cannam@126 8164 [AC_CHECK_TOOL(RC, windres,)
cannam@126 8165 ])
cannam@126 8166
cannam@126 8167 # Old name:
cannam@126 8168 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
cannam@126 8169 dnl aclocal-1.4 backwards compatibility:
cannam@126 8170 dnl AC_DEFUN([LT_AC_PROG_RC], [])
cannam@126 8171
cannam@126 8172
cannam@126 8173 # _LT_DECL_EGREP
cannam@126 8174 # --------------
cannam@126 8175 # If we don't have a new enough Autoconf to choose the best grep
cannam@126 8176 # available, choose the one first in the user's PATH.
cannam@126 8177 m4_defun([_LT_DECL_EGREP],
cannam@126 8178 [AC_REQUIRE([AC_PROG_EGREP])dnl
cannam@126 8179 AC_REQUIRE([AC_PROG_FGREP])dnl
cannam@126 8180 test -z "$GREP" && GREP=grep
cannam@126 8181 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
cannam@126 8182 _LT_DECL([], [EGREP], [1], [An ERE matcher])
cannam@126 8183 _LT_DECL([], [FGREP], [1], [A literal string matcher])
cannam@126 8184 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
cannam@126 8185 AC_SUBST([GREP])
cannam@126 8186 ])
cannam@126 8187
cannam@126 8188
cannam@126 8189 # _LT_DECL_OBJDUMP
cannam@126 8190 # --------------
cannam@126 8191 # If we don't have a new enough Autoconf to choose the best objdump
cannam@126 8192 # available, choose the one first in the user's PATH.
cannam@126 8193 m4_defun([_LT_DECL_OBJDUMP],
cannam@126 8194 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
cannam@126 8195 test -z "$OBJDUMP" && OBJDUMP=objdump
cannam@126 8196 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
cannam@126 8197 AC_SUBST([OBJDUMP])
cannam@126 8198 ])
cannam@126 8199
cannam@126 8200 # _LT_DECL_DLLTOOL
cannam@126 8201 # ----------------
cannam@126 8202 # Ensure DLLTOOL variable is set.
cannam@126 8203 m4_defun([_LT_DECL_DLLTOOL],
cannam@126 8204 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
cannam@126 8205 test -z "$DLLTOOL" && DLLTOOL=dlltool
cannam@126 8206 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
cannam@126 8207 AC_SUBST([DLLTOOL])
cannam@126 8208 ])
cannam@126 8209
cannam@126 8210 # _LT_DECL_SED
cannam@126 8211 # ------------
cannam@126 8212 # Check for a fully-functional sed program, that truncates
cannam@126 8213 # as few characters as possible. Prefer GNU sed if found.
cannam@126 8214 m4_defun([_LT_DECL_SED],
cannam@126 8215 [AC_PROG_SED
cannam@126 8216 test -z "$SED" && SED=sed
cannam@126 8217 Xsed="$SED -e 1s/^X//"
cannam@126 8218 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
cannam@126 8219 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
cannam@126 8220 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
cannam@126 8221 ])# _LT_DECL_SED
cannam@126 8222
cannam@126 8223 m4_ifndef([AC_PROG_SED], [
cannam@126 8224 ############################################################
cannam@126 8225 # NOTE: This macro has been submitted for inclusion into #
cannam@126 8226 # GNU Autoconf as AC_PROG_SED. When it is available in #
cannam@126 8227 # a released version of Autoconf we should remove this #
cannam@126 8228 # macro and use it instead. #
cannam@126 8229 ############################################################
cannam@126 8230
cannam@126 8231 m4_defun([AC_PROG_SED],
cannam@126 8232 [AC_MSG_CHECKING([for a sed that does not truncate output])
cannam@126 8233 AC_CACHE_VAL(lt_cv_path_SED,
cannam@126 8234 [# Loop through the user's path and test for sed and gsed.
cannam@126 8235 # Then use that list of sed's as ones to test for truncation.
cannam@126 8236 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
cannam@126 8237 for as_dir in $PATH
cannam@126 8238 do
cannam@126 8239 IFS=$as_save_IFS
cannam@126 8240 test -z "$as_dir" && as_dir=.
cannam@126 8241 for lt_ac_prog in sed gsed; do
cannam@126 8242 for ac_exec_ext in '' $ac_executable_extensions; do
cannam@126 8243 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
cannam@126 8244 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
cannam@126 8245 fi
cannam@126 8246 done
cannam@126 8247 done
cannam@126 8248 done
cannam@126 8249 IFS=$as_save_IFS
cannam@126 8250 lt_ac_max=0
cannam@126 8251 lt_ac_count=0
cannam@126 8252 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
cannam@126 8253 # along with /bin/sed that truncates output.
cannam@126 8254 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
cannam@126 8255 test ! -f "$lt_ac_sed" && continue
cannam@126 8256 cat /dev/null > conftest.in
cannam@126 8257 lt_ac_count=0
cannam@126 8258 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
cannam@126 8259 # Check for GNU sed and select it if it is found.
cannam@126 8260 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
cannam@126 8261 lt_cv_path_SED=$lt_ac_sed
cannam@126 8262 break
cannam@126 8263 fi
cannam@126 8264 while true; do
cannam@126 8265 cat conftest.in conftest.in >conftest.tmp
cannam@126 8266 mv conftest.tmp conftest.in
cannam@126 8267 cp conftest.in conftest.nl
cannam@126 8268 echo >>conftest.nl
cannam@126 8269 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
cannam@126 8270 cmp -s conftest.out conftest.nl || break
cannam@126 8271 # 10000 chars as input seems more than enough
cannam@126 8272 test 10 -lt "$lt_ac_count" && break
cannam@126 8273 lt_ac_count=`expr $lt_ac_count + 1`
cannam@126 8274 if test "$lt_ac_count" -gt "$lt_ac_max"; then
cannam@126 8275 lt_ac_max=$lt_ac_count
cannam@126 8276 lt_cv_path_SED=$lt_ac_sed
cannam@126 8277 fi
cannam@126 8278 done
cannam@126 8279 done
cannam@126 8280 ])
cannam@126 8281 SED=$lt_cv_path_SED
cannam@126 8282 AC_SUBST([SED])
cannam@126 8283 AC_MSG_RESULT([$SED])
cannam@126 8284 ])#AC_PROG_SED
cannam@126 8285 ])#m4_ifndef
cannam@126 8286
cannam@126 8287 # Old name:
cannam@126 8288 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
cannam@126 8289 dnl aclocal-1.4 backwards compatibility:
cannam@126 8290 dnl AC_DEFUN([LT_AC_PROG_SED], [])
cannam@126 8291
cannam@126 8292
cannam@126 8293 # _LT_CHECK_SHELL_FEATURES
cannam@126 8294 # ------------------------
cannam@126 8295 # Find out whether the shell is Bourne or XSI compatible,
cannam@126 8296 # or has some other useful features.
cannam@126 8297 m4_defun([_LT_CHECK_SHELL_FEATURES],
cannam@126 8298 [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
cannam@126 8299 lt_unset=unset
cannam@126 8300 else
cannam@126 8301 lt_unset=false
cannam@126 8302 fi
cannam@126 8303 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
cannam@126 8304
cannam@126 8305 # test EBCDIC or ASCII
cannam@126 8306 case `echo X|tr X '\101'` in
cannam@126 8307 A) # ASCII based system
cannam@126 8308 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
cannam@126 8309 lt_SP2NL='tr \040 \012'
cannam@126 8310 lt_NL2SP='tr \015\012 \040\040'
cannam@126 8311 ;;
cannam@126 8312 *) # EBCDIC based system
cannam@126 8313 lt_SP2NL='tr \100 \n'
cannam@126 8314 lt_NL2SP='tr \r\n \100\100'
cannam@126 8315 ;;
cannam@126 8316 esac
cannam@126 8317 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
cannam@126 8318 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
cannam@126 8319 ])# _LT_CHECK_SHELL_FEATURES
cannam@126 8320
cannam@126 8321
cannam@126 8322 # _LT_PATH_CONVERSION_FUNCTIONS
cannam@126 8323 # -----------------------------
cannam@126 8324 # Determine what file name conversion functions should be used by
cannam@126 8325 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
cannam@126 8326 # for certain cross-compile configurations and native mingw.
cannam@126 8327 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
cannam@126 8328 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
cannam@126 8329 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
cannam@126 8330 AC_MSG_CHECKING([how to convert $build file names to $host format])
cannam@126 8331 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
cannam@126 8332 [case $host in
cannam@126 8333 *-*-mingw* )
cannam@126 8334 case $build in
cannam@126 8335 *-*-mingw* ) # actually msys
cannam@126 8336 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
cannam@126 8337 ;;
cannam@126 8338 *-*-cygwin* )
cannam@126 8339 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
cannam@126 8340 ;;
cannam@126 8341 * ) # otherwise, assume *nix
cannam@126 8342 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
cannam@126 8343 ;;
cannam@126 8344 esac
cannam@126 8345 ;;
cannam@126 8346 *-*-cygwin* )
cannam@126 8347 case $build in
cannam@126 8348 *-*-mingw* ) # actually msys
cannam@126 8349 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
cannam@126 8350 ;;
cannam@126 8351 *-*-cygwin* )
cannam@126 8352 lt_cv_to_host_file_cmd=func_convert_file_noop
cannam@126 8353 ;;
cannam@126 8354 * ) # otherwise, assume *nix
cannam@126 8355 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
cannam@126 8356 ;;
cannam@126 8357 esac
cannam@126 8358 ;;
cannam@126 8359 * ) # unhandled hosts (and "normal" native builds)
cannam@126 8360 lt_cv_to_host_file_cmd=func_convert_file_noop
cannam@126 8361 ;;
cannam@126 8362 esac
cannam@126 8363 ])
cannam@126 8364 to_host_file_cmd=$lt_cv_to_host_file_cmd
cannam@126 8365 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
cannam@126 8366 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
cannam@126 8367 [0], [convert $build file names to $host format])dnl
cannam@126 8368
cannam@126 8369 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
cannam@126 8370 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
cannam@126 8371 [#assume ordinary cross tools, or native build.
cannam@126 8372 lt_cv_to_tool_file_cmd=func_convert_file_noop
cannam@126 8373 case $host in
cannam@126 8374 *-*-mingw* )
cannam@126 8375 case $build in
cannam@126 8376 *-*-mingw* ) # actually msys
cannam@126 8377 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
cannam@126 8378 ;;
cannam@126 8379 esac
cannam@126 8380 ;;
cannam@126 8381 esac
cannam@126 8382 ])
cannam@126 8383 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
cannam@126 8384 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
cannam@126 8385 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
cannam@126 8386 [0], [convert $build files to toolchain format])dnl
cannam@126 8387 ])# _LT_PATH_CONVERSION_FUNCTIONS