annotate src/fftw-3.3.8/m4/libtool.m4 @ 169:223a55898ab9 tip default

Add null config files
author Chris Cannam <cannam@all-day-breakfast.com>
date Mon, 02 Mar 2020 14:03:47 +0000
parents bd3cc4d1df30
children
rev   line source
cannam@167 1 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
cannam@167 2 #
cannam@167 3 # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
cannam@167 4 # Written by Gordon Matzigkeit, 1996
cannam@167 5 #
cannam@167 6 # This file is free software; the Free Software Foundation gives
cannam@167 7 # unlimited permission to copy and/or distribute it, with or without
cannam@167 8 # modifications, as long as this notice is preserved.
cannam@167 9
cannam@167 10 m4_define([_LT_COPYING], [dnl
cannam@167 11 # Copyright (C) 2014 Free Software Foundation, Inc.
cannam@167 12 # This is free software; see the source for copying conditions. There is NO
cannam@167 13 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
cannam@167 14
cannam@167 15 # GNU Libtool is free software; you can redistribute it and/or modify
cannam@167 16 # it under the terms of the GNU General Public License as published by
cannam@167 17 # the Free Software Foundation; either version 2 of of the License, or
cannam@167 18 # (at your option) any later version.
cannam@167 19 #
cannam@167 20 # As a special exception to the GNU General Public License, if you
cannam@167 21 # distribute this file as part of a program or library that is built
cannam@167 22 # using GNU Libtool, you may include this file under the same
cannam@167 23 # distribution terms that you use for the rest of that program.
cannam@167 24 #
cannam@167 25 # GNU Libtool is distributed in the hope that it will be useful, but
cannam@167 26 # WITHOUT ANY WARRANTY; without even the implied warranty of
cannam@167 27 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cannam@167 28 # GNU General Public License for more details.
cannam@167 29 #
cannam@167 30 # You should have received a copy of the GNU General Public License
cannam@167 31 # along with this program. If not, see <http://www.gnu.org/licenses/>.
cannam@167 32 ])
cannam@167 33
cannam@167 34 # serial 58 LT_INIT
cannam@167 35
cannam@167 36
cannam@167 37 # LT_PREREQ(VERSION)
cannam@167 38 # ------------------
cannam@167 39 # Complain and exit if this libtool version is less that VERSION.
cannam@167 40 m4_defun([LT_PREREQ],
cannam@167 41 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
cannam@167 42 [m4_default([$3],
cannam@167 43 [m4_fatal([Libtool version $1 or higher is required],
cannam@167 44 63)])],
cannam@167 45 [$2])])
cannam@167 46
cannam@167 47
cannam@167 48 # _LT_CHECK_BUILDDIR
cannam@167 49 # ------------------
cannam@167 50 # Complain if the absolute build directory name contains unusual characters
cannam@167 51 m4_defun([_LT_CHECK_BUILDDIR],
cannam@167 52 [case `pwd` in
cannam@167 53 *\ * | *\ *)
cannam@167 54 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
cannam@167 55 esac
cannam@167 56 ])
cannam@167 57
cannam@167 58
cannam@167 59 # LT_INIT([OPTIONS])
cannam@167 60 # ------------------
cannam@167 61 AC_DEFUN([LT_INIT],
cannam@167 62 [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
cannam@167 63 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
cannam@167 64 AC_BEFORE([$0], [LT_LANG])dnl
cannam@167 65 AC_BEFORE([$0], [LT_OUTPUT])dnl
cannam@167 66 AC_BEFORE([$0], [LTDL_INIT])dnl
cannam@167 67 m4_require([_LT_CHECK_BUILDDIR])dnl
cannam@167 68
cannam@167 69 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
cannam@167 70 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
cannam@167 71 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
cannam@167 72 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
cannam@167 73 dnl unless we require an AC_DEFUNed macro:
cannam@167 74 AC_REQUIRE([LTOPTIONS_VERSION])dnl
cannam@167 75 AC_REQUIRE([LTSUGAR_VERSION])dnl
cannam@167 76 AC_REQUIRE([LTVERSION_VERSION])dnl
cannam@167 77 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
cannam@167 78 m4_require([_LT_PROG_LTMAIN])dnl
cannam@167 79
cannam@167 80 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
cannam@167 81
cannam@167 82 dnl Parse OPTIONS
cannam@167 83 _LT_SET_OPTIONS([$0], [$1])
cannam@167 84
cannam@167 85 # This can be used to rebuild libtool when needed
cannam@167 86 LIBTOOL_DEPS=$ltmain
cannam@167 87
cannam@167 88 # Always use our own libtool.
cannam@167 89 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
cannam@167 90 AC_SUBST(LIBTOOL)dnl
cannam@167 91
cannam@167 92 _LT_SETUP
cannam@167 93
cannam@167 94 # Only expand once:
cannam@167 95 m4_define([LT_INIT])
cannam@167 96 ])# LT_INIT
cannam@167 97
cannam@167 98 # Old names:
cannam@167 99 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
cannam@167 100 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
cannam@167 101 dnl aclocal-1.4 backwards compatibility:
cannam@167 102 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
cannam@167 103 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
cannam@167 104
cannam@167 105
cannam@167 106 # _LT_PREPARE_CC_BASENAME
cannam@167 107 # -----------------------
cannam@167 108 m4_defun([_LT_PREPARE_CC_BASENAME], [
cannam@167 109 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
cannam@167 110 func_cc_basename ()
cannam@167 111 {
cannam@167 112 for cc_temp in @S|@*""; do
cannam@167 113 case $cc_temp in
cannam@167 114 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
cannam@167 115 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
cannam@167 116 \-*) ;;
cannam@167 117 *) break;;
cannam@167 118 esac
cannam@167 119 done
cannam@167 120 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
cannam@167 121 }
cannam@167 122 ])# _LT_PREPARE_CC_BASENAME
cannam@167 123
cannam@167 124
cannam@167 125 # _LT_CC_BASENAME(CC)
cannam@167 126 # -------------------
cannam@167 127 # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
cannam@167 128 # but that macro is also expanded into generated libtool script, which
cannam@167 129 # arranges for $SED and $ECHO to be set by different means.
cannam@167 130 m4_defun([_LT_CC_BASENAME],
cannam@167 131 [m4_require([_LT_PREPARE_CC_BASENAME])dnl
cannam@167 132 AC_REQUIRE([_LT_DECL_SED])dnl
cannam@167 133 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
cannam@167 134 func_cc_basename $1
cannam@167 135 cc_basename=$func_cc_basename_result
cannam@167 136 ])
cannam@167 137
cannam@167 138
cannam@167 139 # _LT_FILEUTILS_DEFAULTS
cannam@167 140 # ----------------------
cannam@167 141 # It is okay to use these file commands and assume they have been set
cannam@167 142 # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
cannam@167 143 m4_defun([_LT_FILEUTILS_DEFAULTS],
cannam@167 144 [: ${CP="cp -f"}
cannam@167 145 : ${MV="mv -f"}
cannam@167 146 : ${RM="rm -f"}
cannam@167 147 ])# _LT_FILEUTILS_DEFAULTS
cannam@167 148
cannam@167 149
cannam@167 150 # _LT_SETUP
cannam@167 151 # ---------
cannam@167 152 m4_defun([_LT_SETUP],
cannam@167 153 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
cannam@167 154 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
cannam@167 155 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
cannam@167 156 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
cannam@167 157
cannam@167 158 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
cannam@167 159 dnl
cannam@167 160 _LT_DECL([], [host_alias], [0], [The host system])dnl
cannam@167 161 _LT_DECL([], [host], [0])dnl
cannam@167 162 _LT_DECL([], [host_os], [0])dnl
cannam@167 163 dnl
cannam@167 164 _LT_DECL([], [build_alias], [0], [The build system])dnl
cannam@167 165 _LT_DECL([], [build], [0])dnl
cannam@167 166 _LT_DECL([], [build_os], [0])dnl
cannam@167 167 dnl
cannam@167 168 AC_REQUIRE([AC_PROG_CC])dnl
cannam@167 169 AC_REQUIRE([LT_PATH_LD])dnl
cannam@167 170 AC_REQUIRE([LT_PATH_NM])dnl
cannam@167 171 dnl
cannam@167 172 AC_REQUIRE([AC_PROG_LN_S])dnl
cannam@167 173 test -z "$LN_S" && LN_S="ln -s"
cannam@167 174 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
cannam@167 175 dnl
cannam@167 176 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
cannam@167 177 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
cannam@167 178 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
cannam@167 179 dnl
cannam@167 180 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@167 181 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
cannam@167 182 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
cannam@167 183 m4_require([_LT_CMD_RELOAD])dnl
cannam@167 184 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
cannam@167 185 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
cannam@167 186 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
cannam@167 187 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
cannam@167 188 m4_require([_LT_WITH_SYSROOT])dnl
cannam@167 189 m4_require([_LT_CMD_TRUNCATE])dnl
cannam@167 190
cannam@167 191 _LT_CONFIG_LIBTOOL_INIT([
cannam@167 192 # See if we are running on zsh, and set the options that allow our
cannam@167 193 # commands through without removal of \ escapes INIT.
cannam@167 194 if test -n "\${ZSH_VERSION+set}"; then
cannam@167 195 setopt NO_GLOB_SUBST
cannam@167 196 fi
cannam@167 197 ])
cannam@167 198 if test -n "${ZSH_VERSION+set}"; then
cannam@167 199 setopt NO_GLOB_SUBST
cannam@167 200 fi
cannam@167 201
cannam@167 202 _LT_CHECK_OBJDIR
cannam@167 203
cannam@167 204 m4_require([_LT_TAG_COMPILER])dnl
cannam@167 205
cannam@167 206 case $host_os in
cannam@167 207 aix3*)
cannam@167 208 # AIX sometimes has problems with the GCC collect2 program. For some
cannam@167 209 # reason, if we set the COLLECT_NAMES environment variable, the problems
cannam@167 210 # vanish in a puff of smoke.
cannam@167 211 if test set != "${COLLECT_NAMES+set}"; then
cannam@167 212 COLLECT_NAMES=
cannam@167 213 export COLLECT_NAMES
cannam@167 214 fi
cannam@167 215 ;;
cannam@167 216 esac
cannam@167 217
cannam@167 218 # Global variables:
cannam@167 219 ofile=libtool
cannam@167 220 can_build_shared=yes
cannam@167 221
cannam@167 222 # All known linkers require a '.a' archive for static linking (except MSVC,
cannam@167 223 # which needs '.lib').
cannam@167 224 libext=a
cannam@167 225
cannam@167 226 with_gnu_ld=$lt_cv_prog_gnu_ld
cannam@167 227
cannam@167 228 old_CC=$CC
cannam@167 229 old_CFLAGS=$CFLAGS
cannam@167 230
cannam@167 231 # Set sane defaults for various variables
cannam@167 232 test -z "$CC" && CC=cc
cannam@167 233 test -z "$LTCC" && LTCC=$CC
cannam@167 234 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
cannam@167 235 test -z "$LD" && LD=ld
cannam@167 236 test -z "$ac_objext" && ac_objext=o
cannam@167 237
cannam@167 238 _LT_CC_BASENAME([$compiler])
cannam@167 239
cannam@167 240 # Only perform the check for file, if the check method requires it
cannam@167 241 test -z "$MAGIC_CMD" && MAGIC_CMD=file
cannam@167 242 case $deplibs_check_method in
cannam@167 243 file_magic*)
cannam@167 244 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
cannam@167 245 _LT_PATH_MAGIC
cannam@167 246 fi
cannam@167 247 ;;
cannam@167 248 esac
cannam@167 249
cannam@167 250 # Use C for the default configuration in the libtool script
cannam@167 251 LT_SUPPORTED_TAG([CC])
cannam@167 252 _LT_LANG_C_CONFIG
cannam@167 253 _LT_LANG_DEFAULT_CONFIG
cannam@167 254 _LT_CONFIG_COMMANDS
cannam@167 255 ])# _LT_SETUP
cannam@167 256
cannam@167 257
cannam@167 258 # _LT_PREPARE_SED_QUOTE_VARS
cannam@167 259 # --------------------------
cannam@167 260 # Define a few sed substitution that help us do robust quoting.
cannam@167 261 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
cannam@167 262 [# Backslashify metacharacters that are still active within
cannam@167 263 # double-quoted strings.
cannam@167 264 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
cannam@167 265
cannam@167 266 # Same as above, but do not quote variable references.
cannam@167 267 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
cannam@167 268
cannam@167 269 # Sed substitution to delay expansion of an escaped shell variable in a
cannam@167 270 # double_quote_subst'ed string.
cannam@167 271 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
cannam@167 272
cannam@167 273 # Sed substitution to delay expansion of an escaped single quote.
cannam@167 274 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
cannam@167 275
cannam@167 276 # Sed substitution to avoid accidental globbing in evaled expressions
cannam@167 277 no_glob_subst='s/\*/\\\*/g'
cannam@167 278 ])
cannam@167 279
cannam@167 280 # _LT_PROG_LTMAIN
cannam@167 281 # ---------------
cannam@167 282 # Note that this code is called both from 'configure', and 'config.status'
cannam@167 283 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
cannam@167 284 # 'config.status' has no value for ac_aux_dir unless we are using Automake,
cannam@167 285 # so we pass a copy along to make sure it has a sensible value anyway.
cannam@167 286 m4_defun([_LT_PROG_LTMAIN],
cannam@167 287 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
cannam@167 288 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
cannam@167 289 ltmain=$ac_aux_dir/ltmain.sh
cannam@167 290 ])# _LT_PROG_LTMAIN
cannam@167 291
cannam@167 292
cannam@167 293 ## ------------------------------------- ##
cannam@167 294 ## Accumulate code for creating libtool. ##
cannam@167 295 ## ------------------------------------- ##
cannam@167 296
cannam@167 297 # So that we can recreate a full libtool script including additional
cannam@167 298 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
cannam@167 299 # in macros and then make a single call at the end using the 'libtool'
cannam@167 300 # label.
cannam@167 301
cannam@167 302
cannam@167 303 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
cannam@167 304 # ----------------------------------------
cannam@167 305 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
cannam@167 306 m4_define([_LT_CONFIG_LIBTOOL_INIT],
cannam@167 307 [m4_ifval([$1],
cannam@167 308 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
cannam@167 309 [$1
cannam@167 310 ])])])
cannam@167 311
cannam@167 312 # Initialize.
cannam@167 313 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
cannam@167 314
cannam@167 315
cannam@167 316 # _LT_CONFIG_LIBTOOL([COMMANDS])
cannam@167 317 # ------------------------------
cannam@167 318 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
cannam@167 319 m4_define([_LT_CONFIG_LIBTOOL],
cannam@167 320 [m4_ifval([$1],
cannam@167 321 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
cannam@167 322 [$1
cannam@167 323 ])])])
cannam@167 324
cannam@167 325 # Initialize.
cannam@167 326 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
cannam@167 327
cannam@167 328
cannam@167 329 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
cannam@167 330 # -----------------------------------------------------
cannam@167 331 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
cannam@167 332 [_LT_CONFIG_LIBTOOL([$1])
cannam@167 333 _LT_CONFIG_LIBTOOL_INIT([$2])
cannam@167 334 ])
cannam@167 335
cannam@167 336
cannam@167 337 # _LT_FORMAT_COMMENT([COMMENT])
cannam@167 338 # -----------------------------
cannam@167 339 # Add leading comment marks to the start of each line, and a trailing
cannam@167 340 # full-stop to the whole comment if one is not present already.
cannam@167 341 m4_define([_LT_FORMAT_COMMENT],
cannam@167 342 [m4_ifval([$1], [
cannam@167 343 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
cannam@167 344 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
cannam@167 345 )])
cannam@167 346
cannam@167 347
cannam@167 348
cannam@167 349 ## ------------------------ ##
cannam@167 350 ## FIXME: Eliminate VARNAME ##
cannam@167 351 ## ------------------------ ##
cannam@167 352
cannam@167 353
cannam@167 354 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
cannam@167 355 # -------------------------------------------------------------------
cannam@167 356 # CONFIGNAME is the name given to the value in the libtool script.
cannam@167 357 # VARNAME is the (base) name used in the configure script.
cannam@167 358 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
cannam@167 359 # VARNAME. Any other value will be used directly.
cannam@167 360 m4_define([_LT_DECL],
cannam@167 361 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
cannam@167 362 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
cannam@167 363 [m4_ifval([$1], [$1], [$2])])
cannam@167 364 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
cannam@167 365 m4_ifval([$4],
cannam@167 366 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
cannam@167 367 lt_dict_add_subkey([lt_decl_dict], [$2],
cannam@167 368 [tagged?], [m4_ifval([$5], [yes], [no])])])
cannam@167 369 ])
cannam@167 370
cannam@167 371
cannam@167 372 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
cannam@167 373 # --------------------------------------------------------
cannam@167 374 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
cannam@167 375
cannam@167 376
cannam@167 377 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
cannam@167 378 # ------------------------------------------------
cannam@167 379 m4_define([lt_decl_tag_varnames],
cannam@167 380 [_lt_decl_filter([tagged?], [yes], $@)])
cannam@167 381
cannam@167 382
cannam@167 383 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
cannam@167 384 # ---------------------------------------------------------
cannam@167 385 m4_define([_lt_decl_filter],
cannam@167 386 [m4_case([$#],
cannam@167 387 [0], [m4_fatal([$0: too few arguments: $#])],
cannam@167 388 [1], [m4_fatal([$0: too few arguments: $#: $1])],
cannam@167 389 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
cannam@167 390 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
cannam@167 391 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
cannam@167 392 ])
cannam@167 393
cannam@167 394
cannam@167 395 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
cannam@167 396 # --------------------------------------------------
cannam@167 397 m4_define([lt_decl_quote_varnames],
cannam@167 398 [_lt_decl_filter([value], [1], $@)])
cannam@167 399
cannam@167 400
cannam@167 401 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
cannam@167 402 # ---------------------------------------------------
cannam@167 403 m4_define([lt_decl_dquote_varnames],
cannam@167 404 [_lt_decl_filter([value], [2], $@)])
cannam@167 405
cannam@167 406
cannam@167 407 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
cannam@167 408 # ---------------------------------------------------
cannam@167 409 m4_define([lt_decl_varnames_tagged],
cannam@167 410 [m4_assert([$# <= 2])dnl
cannam@167 411 _$0(m4_quote(m4_default([$1], [[, ]])),
cannam@167 412 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
cannam@167 413 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
cannam@167 414 m4_define([_lt_decl_varnames_tagged],
cannam@167 415 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
cannam@167 416
cannam@167 417
cannam@167 418 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
cannam@167 419 # ------------------------------------------------
cannam@167 420 m4_define([lt_decl_all_varnames],
cannam@167 421 [_$0(m4_quote(m4_default([$1], [[, ]])),
cannam@167 422 m4_if([$2], [],
cannam@167 423 m4_quote(lt_decl_varnames),
cannam@167 424 m4_quote(m4_shift($@))))[]dnl
cannam@167 425 ])
cannam@167 426 m4_define([_lt_decl_all_varnames],
cannam@167 427 [lt_join($@, lt_decl_varnames_tagged([$1],
cannam@167 428 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
cannam@167 429 ])
cannam@167 430
cannam@167 431
cannam@167 432 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
cannam@167 433 # ------------------------------------
cannam@167 434 # Quote a variable value, and forward it to 'config.status' so that its
cannam@167 435 # declaration there will have the same value as in 'configure'. VARNAME
cannam@167 436 # must have a single quote delimited value for this to work.
cannam@167 437 m4_define([_LT_CONFIG_STATUS_DECLARE],
cannam@167 438 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
cannam@167 439
cannam@167 440
cannam@167 441 # _LT_CONFIG_STATUS_DECLARATIONS
cannam@167 442 # ------------------------------
cannam@167 443 # We delimit libtool config variables with single quotes, so when
cannam@167 444 # we write them to config.status, we have to be sure to quote all
cannam@167 445 # embedded single quotes properly. In configure, this macro expands
cannam@167 446 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
cannam@167 447 #
cannam@167 448 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
cannam@167 449 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
cannam@167 450 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
cannam@167 451 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
cannam@167 452
cannam@167 453
cannam@167 454 # _LT_LIBTOOL_TAGS
cannam@167 455 # ----------------
cannam@167 456 # Output comment and list of tags supported by the script
cannam@167 457 m4_defun([_LT_LIBTOOL_TAGS],
cannam@167 458 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
cannam@167 459 available_tags='_LT_TAGS'dnl
cannam@167 460 ])
cannam@167 461
cannam@167 462
cannam@167 463 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
cannam@167 464 # -----------------------------------
cannam@167 465 # Extract the dictionary values for VARNAME (optionally with TAG) and
cannam@167 466 # expand to a commented shell variable setting:
cannam@167 467 #
cannam@167 468 # # Some comment about what VAR is for.
cannam@167 469 # visible_name=$lt_internal_name
cannam@167 470 m4_define([_LT_LIBTOOL_DECLARE],
cannam@167 471 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
cannam@167 472 [description])))[]dnl
cannam@167 473 m4_pushdef([_libtool_name],
cannam@167 474 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
cannam@167 475 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
cannam@167 476 [0], [_libtool_name=[$]$1],
cannam@167 477 [1], [_libtool_name=$lt_[]$1],
cannam@167 478 [2], [_libtool_name=$lt_[]$1],
cannam@167 479 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
cannam@167 480 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
cannam@167 481 ])
cannam@167 482
cannam@167 483
cannam@167 484 # _LT_LIBTOOL_CONFIG_VARS
cannam@167 485 # -----------------------
cannam@167 486 # Produce commented declarations of non-tagged libtool config variables
cannam@167 487 # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
cannam@167 488 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
cannam@167 489 # section) are produced by _LT_LIBTOOL_TAG_VARS.
cannam@167 490 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
cannam@167 491 [m4_foreach([_lt_var],
cannam@167 492 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
cannam@167 493 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
cannam@167 494
cannam@167 495
cannam@167 496 # _LT_LIBTOOL_TAG_VARS(TAG)
cannam@167 497 # -------------------------
cannam@167 498 m4_define([_LT_LIBTOOL_TAG_VARS],
cannam@167 499 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
cannam@167 500 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
cannam@167 501
cannam@167 502
cannam@167 503 # _LT_TAGVAR(VARNAME, [TAGNAME])
cannam@167 504 # ------------------------------
cannam@167 505 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
cannam@167 506
cannam@167 507
cannam@167 508 # _LT_CONFIG_COMMANDS
cannam@167 509 # -------------------
cannam@167 510 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
cannam@167 511 # variables for single and double quote escaping we saved from calls
cannam@167 512 # to _LT_DECL, we can put quote escaped variables declarations
cannam@167 513 # into 'config.status', and then the shell code to quote escape them in
cannam@167 514 # for loops in 'config.status'. Finally, any additional code accumulated
cannam@167 515 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
cannam@167 516 m4_defun([_LT_CONFIG_COMMANDS],
cannam@167 517 [AC_PROVIDE_IFELSE([LT_OUTPUT],
cannam@167 518 dnl If the libtool generation code has been placed in $CONFIG_LT,
cannam@167 519 dnl instead of duplicating it all over again into config.status,
cannam@167 520 dnl then we will have config.status run $CONFIG_LT later, so it
cannam@167 521 dnl needs to know what name is stored there:
cannam@167 522 [AC_CONFIG_COMMANDS([libtool],
cannam@167 523 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
cannam@167 524 dnl If the libtool generation code is destined for config.status,
cannam@167 525 dnl expand the accumulated commands and init code now:
cannam@167 526 [AC_CONFIG_COMMANDS([libtool],
cannam@167 527 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
cannam@167 528 ])#_LT_CONFIG_COMMANDS
cannam@167 529
cannam@167 530
cannam@167 531 # Initialize.
cannam@167 532 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
cannam@167 533 [
cannam@167 534
cannam@167 535 # The HP-UX ksh and POSIX shell print the target directory to stdout
cannam@167 536 # if CDPATH is set.
cannam@167 537 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
cannam@167 538
cannam@167 539 sed_quote_subst='$sed_quote_subst'
cannam@167 540 double_quote_subst='$double_quote_subst'
cannam@167 541 delay_variable_subst='$delay_variable_subst'
cannam@167 542 _LT_CONFIG_STATUS_DECLARATIONS
cannam@167 543 LTCC='$LTCC'
cannam@167 544 LTCFLAGS='$LTCFLAGS'
cannam@167 545 compiler='$compiler_DEFAULT'
cannam@167 546
cannam@167 547 # A function that is used when there is no print builtin or printf.
cannam@167 548 func_fallback_echo ()
cannam@167 549 {
cannam@167 550 eval 'cat <<_LTECHO_EOF
cannam@167 551 \$[]1
cannam@167 552 _LTECHO_EOF'
cannam@167 553 }
cannam@167 554
cannam@167 555 # Quote evaled strings.
cannam@167 556 for var in lt_decl_all_varnames([[ \
cannam@167 557 ]], lt_decl_quote_varnames); do
cannam@167 558 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
cannam@167 559 *[[\\\\\\\`\\"\\\$]]*)
cannam@167 560 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
cannam@167 561 ;;
cannam@167 562 *)
cannam@167 563 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
cannam@167 564 ;;
cannam@167 565 esac
cannam@167 566 done
cannam@167 567
cannam@167 568 # Double-quote double-evaled strings.
cannam@167 569 for var in lt_decl_all_varnames([[ \
cannam@167 570 ]], lt_decl_dquote_varnames); do
cannam@167 571 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
cannam@167 572 *[[\\\\\\\`\\"\\\$]]*)
cannam@167 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@167 574 ;;
cannam@167 575 *)
cannam@167 576 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
cannam@167 577 ;;
cannam@167 578 esac
cannam@167 579 done
cannam@167 580
cannam@167 581 _LT_OUTPUT_LIBTOOL_INIT
cannam@167 582 ])
cannam@167 583
cannam@167 584 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
cannam@167 585 # ------------------------------------
cannam@167 586 # Generate a child script FILE with all initialization necessary to
cannam@167 587 # reuse the environment learned by the parent script, and make the
cannam@167 588 # file executable. If COMMENT is supplied, it is inserted after the
cannam@167 589 # '#!' sequence but before initialization text begins. After this
cannam@167 590 # macro, additional text can be appended to FILE to form the body of
cannam@167 591 # the child script. The macro ends with non-zero status if the
cannam@167 592 # file could not be fully written (such as if the disk is full).
cannam@167 593 m4_ifdef([AS_INIT_GENERATED],
cannam@167 594 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
cannam@167 595 [m4_defun([_LT_GENERATED_FILE_INIT],
cannam@167 596 [m4_require([AS_PREPARE])]dnl
cannam@167 597 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
cannam@167 598 [lt_write_fail=0
cannam@167 599 cat >$1 <<_ASEOF || lt_write_fail=1
cannam@167 600 #! $SHELL
cannam@167 601 # Generated by $as_me.
cannam@167 602 $2
cannam@167 603 SHELL=\${CONFIG_SHELL-$SHELL}
cannam@167 604 export SHELL
cannam@167 605 _ASEOF
cannam@167 606 cat >>$1 <<\_ASEOF || lt_write_fail=1
cannam@167 607 AS_SHELL_SANITIZE
cannam@167 608 _AS_PREPARE
cannam@167 609 exec AS_MESSAGE_FD>&1
cannam@167 610 _ASEOF
cannam@167 611 test 0 = "$lt_write_fail" && chmod +x $1[]dnl
cannam@167 612 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
cannam@167 613
cannam@167 614 # LT_OUTPUT
cannam@167 615 # ---------
cannam@167 616 # This macro allows early generation of the libtool script (before
cannam@167 617 # AC_OUTPUT is called), incase it is used in configure for compilation
cannam@167 618 # tests.
cannam@167 619 AC_DEFUN([LT_OUTPUT],
cannam@167 620 [: ${CONFIG_LT=./config.lt}
cannam@167 621 AC_MSG_NOTICE([creating $CONFIG_LT])
cannam@167 622 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
cannam@167 623 [# Run this file to recreate a libtool stub with the current configuration.])
cannam@167 624
cannam@167 625 cat >>"$CONFIG_LT" <<\_LTEOF
cannam@167 626 lt_cl_silent=false
cannam@167 627 exec AS_MESSAGE_LOG_FD>>config.log
cannam@167 628 {
cannam@167 629 echo
cannam@167 630 AS_BOX([Running $as_me.])
cannam@167 631 } >&AS_MESSAGE_LOG_FD
cannam@167 632
cannam@167 633 lt_cl_help="\
cannam@167 634 '$as_me' creates a local libtool stub from the current configuration,
cannam@167 635 for use in further configure time tests before the real libtool is
cannam@167 636 generated.
cannam@167 637
cannam@167 638 Usage: $[0] [[OPTIONS]]
cannam@167 639
cannam@167 640 -h, --help print this help, then exit
cannam@167 641 -V, --version print version number, then exit
cannam@167 642 -q, --quiet do not print progress messages
cannam@167 643 -d, --debug don't remove temporary files
cannam@167 644
cannam@167 645 Report bugs to <bug-libtool@gnu.org>."
cannam@167 646
cannam@167 647 lt_cl_version="\
cannam@167 648 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
cannam@167 649 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
cannam@167 650 configured by $[0], generated by m4_PACKAGE_STRING.
cannam@167 651
cannam@167 652 Copyright (C) 2011 Free Software Foundation, Inc.
cannam@167 653 This config.lt script is free software; the Free Software Foundation
cannam@167 654 gives unlimited permision to copy, distribute and modify it."
cannam@167 655
cannam@167 656 while test 0 != $[#]
cannam@167 657 do
cannam@167 658 case $[1] in
cannam@167 659 --version | --v* | -V )
cannam@167 660 echo "$lt_cl_version"; exit 0 ;;
cannam@167 661 --help | --h* | -h )
cannam@167 662 echo "$lt_cl_help"; exit 0 ;;
cannam@167 663 --debug | --d* | -d )
cannam@167 664 debug=: ;;
cannam@167 665 --quiet | --q* | --silent | --s* | -q )
cannam@167 666 lt_cl_silent=: ;;
cannam@167 667
cannam@167 668 -*) AC_MSG_ERROR([unrecognized option: $[1]
cannam@167 669 Try '$[0] --help' for more information.]) ;;
cannam@167 670
cannam@167 671 *) AC_MSG_ERROR([unrecognized argument: $[1]
cannam@167 672 Try '$[0] --help' for more information.]) ;;
cannam@167 673 esac
cannam@167 674 shift
cannam@167 675 done
cannam@167 676
cannam@167 677 if $lt_cl_silent; then
cannam@167 678 exec AS_MESSAGE_FD>/dev/null
cannam@167 679 fi
cannam@167 680 _LTEOF
cannam@167 681
cannam@167 682 cat >>"$CONFIG_LT" <<_LTEOF
cannam@167 683 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
cannam@167 684 _LTEOF
cannam@167 685
cannam@167 686 cat >>"$CONFIG_LT" <<\_LTEOF
cannam@167 687 AC_MSG_NOTICE([creating $ofile])
cannam@167 688 _LT_OUTPUT_LIBTOOL_COMMANDS
cannam@167 689 AS_EXIT(0)
cannam@167 690 _LTEOF
cannam@167 691 chmod +x "$CONFIG_LT"
cannam@167 692
cannam@167 693 # configure is writing to config.log, but config.lt does its own redirection,
cannam@167 694 # appending to config.log, which fails on DOS, as config.log is still kept
cannam@167 695 # open by configure. Here we exec the FD to /dev/null, effectively closing
cannam@167 696 # config.log, so it can be properly (re)opened and appended to by config.lt.
cannam@167 697 lt_cl_success=:
cannam@167 698 test yes = "$silent" &&
cannam@167 699 lt_config_lt_args="$lt_config_lt_args --quiet"
cannam@167 700 exec AS_MESSAGE_LOG_FD>/dev/null
cannam@167 701 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
cannam@167 702 exec AS_MESSAGE_LOG_FD>>config.log
cannam@167 703 $lt_cl_success || AS_EXIT(1)
cannam@167 704 ])# LT_OUTPUT
cannam@167 705
cannam@167 706
cannam@167 707 # _LT_CONFIG(TAG)
cannam@167 708 # ---------------
cannam@167 709 # If TAG is the built-in tag, create an initial libtool script with a
cannam@167 710 # default configuration from the untagged config vars. Otherwise add code
cannam@167 711 # to config.status for appending the configuration named by TAG from the
cannam@167 712 # matching tagged config vars.
cannam@167 713 m4_defun([_LT_CONFIG],
cannam@167 714 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@167 715 _LT_CONFIG_SAVE_COMMANDS([
cannam@167 716 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
cannam@167 717 m4_if(_LT_TAG, [C], [
cannam@167 718 # See if we are running on zsh, and set the options that allow our
cannam@167 719 # commands through without removal of \ escapes.
cannam@167 720 if test -n "${ZSH_VERSION+set}"; then
cannam@167 721 setopt NO_GLOB_SUBST
cannam@167 722 fi
cannam@167 723
cannam@167 724 cfgfile=${ofile}T
cannam@167 725 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
cannam@167 726 $RM "$cfgfile"
cannam@167 727
cannam@167 728 cat <<_LT_EOF >> "$cfgfile"
cannam@167 729 #! $SHELL
cannam@167 730 # Generated automatically by $as_me ($PACKAGE) $VERSION
cannam@167 731 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
cannam@167 732
cannam@167 733 # Provide generalized library-building support services.
cannam@167 734 # Written by Gordon Matzigkeit, 1996
cannam@167 735
cannam@167 736 _LT_COPYING
cannam@167 737 _LT_LIBTOOL_TAGS
cannam@167 738
cannam@167 739 # Configured defaults for sys_lib_dlsearch_path munging.
cannam@167 740 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
cannam@167 741
cannam@167 742 # ### BEGIN LIBTOOL CONFIG
cannam@167 743 _LT_LIBTOOL_CONFIG_VARS
cannam@167 744 _LT_LIBTOOL_TAG_VARS
cannam@167 745 # ### END LIBTOOL CONFIG
cannam@167 746
cannam@167 747 _LT_EOF
cannam@167 748
cannam@167 749 cat <<'_LT_EOF' >> "$cfgfile"
cannam@167 750
cannam@167 751 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
cannam@167 752
cannam@167 753 _LT_PREPARE_MUNGE_PATH_LIST
cannam@167 754 _LT_PREPARE_CC_BASENAME
cannam@167 755
cannam@167 756 # ### END FUNCTIONS SHARED WITH CONFIGURE
cannam@167 757
cannam@167 758 _LT_EOF
cannam@167 759
cannam@167 760 case $host_os in
cannam@167 761 aix3*)
cannam@167 762 cat <<\_LT_EOF >> "$cfgfile"
cannam@167 763 # AIX sometimes has problems with the GCC collect2 program. For some
cannam@167 764 # reason, if we set the COLLECT_NAMES environment variable, the problems
cannam@167 765 # vanish in a puff of smoke.
cannam@167 766 if test set != "${COLLECT_NAMES+set}"; then
cannam@167 767 COLLECT_NAMES=
cannam@167 768 export COLLECT_NAMES
cannam@167 769 fi
cannam@167 770 _LT_EOF
cannam@167 771 ;;
cannam@167 772 esac
cannam@167 773
cannam@167 774 _LT_PROG_LTMAIN
cannam@167 775
cannam@167 776 # We use sed instead of cat because bash on DJGPP gets confused if
cannam@167 777 # if finds mixed CR/LF and LF-only lines. Since sed operates in
cannam@167 778 # text mode, it properly converts lines to CR/LF. This bash problem
cannam@167 779 # is reportedly fixed, but why not run on old versions too?
cannam@167 780 sed '$q' "$ltmain" >> "$cfgfile" \
cannam@167 781 || (rm -f "$cfgfile"; exit 1)
cannam@167 782
cannam@167 783 mv -f "$cfgfile" "$ofile" ||
cannam@167 784 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
cannam@167 785 chmod +x "$ofile"
cannam@167 786 ],
cannam@167 787 [cat <<_LT_EOF >> "$ofile"
cannam@167 788
cannam@167 789 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
cannam@167 790 dnl in a comment (ie after a #).
cannam@167 791 # ### BEGIN LIBTOOL TAG CONFIG: $1
cannam@167 792 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
cannam@167 793 # ### END LIBTOOL TAG CONFIG: $1
cannam@167 794 _LT_EOF
cannam@167 795 ])dnl /m4_if
cannam@167 796 ],
cannam@167 797 [m4_if([$1], [], [
cannam@167 798 PACKAGE='$PACKAGE'
cannam@167 799 VERSION='$VERSION'
cannam@167 800 RM='$RM'
cannam@167 801 ofile='$ofile'], [])
cannam@167 802 ])dnl /_LT_CONFIG_SAVE_COMMANDS
cannam@167 803 ])# _LT_CONFIG
cannam@167 804
cannam@167 805
cannam@167 806 # LT_SUPPORTED_TAG(TAG)
cannam@167 807 # ---------------------
cannam@167 808 # Trace this macro to discover what tags are supported by the libtool
cannam@167 809 # --tag option, using:
cannam@167 810 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
cannam@167 811 AC_DEFUN([LT_SUPPORTED_TAG], [])
cannam@167 812
cannam@167 813
cannam@167 814 # C support is built-in for now
cannam@167 815 m4_define([_LT_LANG_C_enabled], [])
cannam@167 816 m4_define([_LT_TAGS], [])
cannam@167 817
cannam@167 818
cannam@167 819 # LT_LANG(LANG)
cannam@167 820 # -------------
cannam@167 821 # Enable libtool support for the given language if not already enabled.
cannam@167 822 AC_DEFUN([LT_LANG],
cannam@167 823 [AC_BEFORE([$0], [LT_OUTPUT])dnl
cannam@167 824 m4_case([$1],
cannam@167 825 [C], [_LT_LANG(C)],
cannam@167 826 [C++], [_LT_LANG(CXX)],
cannam@167 827 [Go], [_LT_LANG(GO)],
cannam@167 828 [Java], [_LT_LANG(GCJ)],
cannam@167 829 [Fortran 77], [_LT_LANG(F77)],
cannam@167 830 [Fortran], [_LT_LANG(FC)],
cannam@167 831 [Windows Resource], [_LT_LANG(RC)],
cannam@167 832 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
cannam@167 833 [_LT_LANG($1)],
cannam@167 834 [m4_fatal([$0: unsupported language: "$1"])])])dnl
cannam@167 835 ])# LT_LANG
cannam@167 836
cannam@167 837
cannam@167 838 # _LT_LANG(LANGNAME)
cannam@167 839 # ------------------
cannam@167 840 m4_defun([_LT_LANG],
cannam@167 841 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
cannam@167 842 [LT_SUPPORTED_TAG([$1])dnl
cannam@167 843 m4_append([_LT_TAGS], [$1 ])dnl
cannam@167 844 m4_define([_LT_LANG_]$1[_enabled], [])dnl
cannam@167 845 _LT_LANG_$1_CONFIG($1)])dnl
cannam@167 846 ])# _LT_LANG
cannam@167 847
cannam@167 848
cannam@167 849 m4_ifndef([AC_PROG_GO], [
cannam@167 850 ############################################################
cannam@167 851 # NOTE: This macro has been submitted for inclusion into #
cannam@167 852 # GNU Autoconf as AC_PROG_GO. When it is available in #
cannam@167 853 # a released version of Autoconf we should remove this #
cannam@167 854 # macro and use it instead. #
cannam@167 855 ############################################################
cannam@167 856 m4_defun([AC_PROG_GO],
cannam@167 857 [AC_LANG_PUSH(Go)dnl
cannam@167 858 AC_ARG_VAR([GOC], [Go compiler command])dnl
cannam@167 859 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
cannam@167 860 _AC_ARG_VAR_LDFLAGS()dnl
cannam@167 861 AC_CHECK_TOOL(GOC, gccgo)
cannam@167 862 if test -z "$GOC"; then
cannam@167 863 if test -n "$ac_tool_prefix"; then
cannam@167 864 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
cannam@167 865 fi
cannam@167 866 fi
cannam@167 867 if test -z "$GOC"; then
cannam@167 868 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
cannam@167 869 fi
cannam@167 870 ])#m4_defun
cannam@167 871 ])#m4_ifndef
cannam@167 872
cannam@167 873
cannam@167 874 # _LT_LANG_DEFAULT_CONFIG
cannam@167 875 # -----------------------
cannam@167 876 m4_defun([_LT_LANG_DEFAULT_CONFIG],
cannam@167 877 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
cannam@167 878 [LT_LANG(CXX)],
cannam@167 879 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
cannam@167 880
cannam@167 881 AC_PROVIDE_IFELSE([AC_PROG_F77],
cannam@167 882 [LT_LANG(F77)],
cannam@167 883 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
cannam@167 884
cannam@167 885 AC_PROVIDE_IFELSE([AC_PROG_FC],
cannam@167 886 [LT_LANG(FC)],
cannam@167 887 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
cannam@167 888
cannam@167 889 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
cannam@167 890 dnl pulling things in needlessly.
cannam@167 891 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
cannam@167 892 [LT_LANG(GCJ)],
cannam@167 893 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
cannam@167 894 [LT_LANG(GCJ)],
cannam@167 895 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
cannam@167 896 [LT_LANG(GCJ)],
cannam@167 897 [m4_ifdef([AC_PROG_GCJ],
cannam@167 898 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
cannam@167 899 m4_ifdef([A][M_PROG_GCJ],
cannam@167 900 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
cannam@167 901 m4_ifdef([LT_PROG_GCJ],
cannam@167 902 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
cannam@167 903
cannam@167 904 AC_PROVIDE_IFELSE([AC_PROG_GO],
cannam@167 905 [LT_LANG(GO)],
cannam@167 906 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
cannam@167 907
cannam@167 908 AC_PROVIDE_IFELSE([LT_PROG_RC],
cannam@167 909 [LT_LANG(RC)],
cannam@167 910 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
cannam@167 911 ])# _LT_LANG_DEFAULT_CONFIG
cannam@167 912
cannam@167 913 # Obsolete macros:
cannam@167 914 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
cannam@167 915 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
cannam@167 916 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
cannam@167 917 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
cannam@167 918 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
cannam@167 919 dnl aclocal-1.4 backwards compatibility:
cannam@167 920 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
cannam@167 921 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
cannam@167 922 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
cannam@167 923 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
cannam@167 924 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
cannam@167 925
cannam@167 926
cannam@167 927 # _LT_TAG_COMPILER
cannam@167 928 # ----------------
cannam@167 929 m4_defun([_LT_TAG_COMPILER],
cannam@167 930 [AC_REQUIRE([AC_PROG_CC])dnl
cannam@167 931
cannam@167 932 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
cannam@167 933 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
cannam@167 934 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
cannam@167 935 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
cannam@167 936
cannam@167 937 # If no C compiler was specified, use CC.
cannam@167 938 LTCC=${LTCC-"$CC"}
cannam@167 939
cannam@167 940 # If no C compiler flags were specified, use CFLAGS.
cannam@167 941 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
cannam@167 942
cannam@167 943 # Allow CC to be a program name with arguments.
cannam@167 944 compiler=$CC
cannam@167 945 ])# _LT_TAG_COMPILER
cannam@167 946
cannam@167 947
cannam@167 948 # _LT_COMPILER_BOILERPLATE
cannam@167 949 # ------------------------
cannam@167 950 # Check for compiler boilerplate output or warnings with
cannam@167 951 # the simple compiler test code.
cannam@167 952 m4_defun([_LT_COMPILER_BOILERPLATE],
cannam@167 953 [m4_require([_LT_DECL_SED])dnl
cannam@167 954 ac_outfile=conftest.$ac_objext
cannam@167 955 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
cannam@167 956 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
cannam@167 957 _lt_compiler_boilerplate=`cat conftest.err`
cannam@167 958 $RM conftest*
cannam@167 959 ])# _LT_COMPILER_BOILERPLATE
cannam@167 960
cannam@167 961
cannam@167 962 # _LT_LINKER_BOILERPLATE
cannam@167 963 # ----------------------
cannam@167 964 # Check for linker boilerplate output or warnings with
cannam@167 965 # the simple link test code.
cannam@167 966 m4_defun([_LT_LINKER_BOILERPLATE],
cannam@167 967 [m4_require([_LT_DECL_SED])dnl
cannam@167 968 ac_outfile=conftest.$ac_objext
cannam@167 969 echo "$lt_simple_link_test_code" >conftest.$ac_ext
cannam@167 970 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
cannam@167 971 _lt_linker_boilerplate=`cat conftest.err`
cannam@167 972 $RM -r conftest*
cannam@167 973 ])# _LT_LINKER_BOILERPLATE
cannam@167 974
cannam@167 975 # _LT_REQUIRED_DARWIN_CHECKS
cannam@167 976 # -------------------------
cannam@167 977 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
cannam@167 978 case $host_os in
cannam@167 979 rhapsody* | darwin*)
cannam@167 980 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
cannam@167 981 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
cannam@167 982 AC_CHECK_TOOL([LIPO], [lipo], [:])
cannam@167 983 AC_CHECK_TOOL([OTOOL], [otool], [:])
cannam@167 984 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
cannam@167 985 _LT_DECL([], [DSYMUTIL], [1],
cannam@167 986 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
cannam@167 987 _LT_DECL([], [NMEDIT], [1],
cannam@167 988 [Tool to change global to local symbols on Mac OS X])
cannam@167 989 _LT_DECL([], [LIPO], [1],
cannam@167 990 [Tool to manipulate fat objects and archives on Mac OS X])
cannam@167 991 _LT_DECL([], [OTOOL], [1],
cannam@167 992 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
cannam@167 993 _LT_DECL([], [OTOOL64], [1],
cannam@167 994 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
cannam@167 995
cannam@167 996 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
cannam@167 997 [lt_cv_apple_cc_single_mod=no
cannam@167 998 if test -z "$LT_MULTI_MODULE"; then
cannam@167 999 # By default we will add the -single_module flag. You can override
cannam@167 1000 # by either setting the environment variable LT_MULTI_MODULE
cannam@167 1001 # non-empty at configure time, or by adding -multi_module to the
cannam@167 1002 # link flags.
cannam@167 1003 rm -rf libconftest.dylib*
cannam@167 1004 echo "int foo(void){return 1;}" > conftest.c
cannam@167 1005 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
cannam@167 1006 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
cannam@167 1007 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
cannam@167 1008 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
cannam@167 1009 _lt_result=$?
cannam@167 1010 # If there is a non-empty error log, and "single_module"
cannam@167 1011 # appears in it, assume the flag caused a linker warning
cannam@167 1012 if test -s conftest.err && $GREP single_module conftest.err; then
cannam@167 1013 cat conftest.err >&AS_MESSAGE_LOG_FD
cannam@167 1014 # Otherwise, if the output was created with a 0 exit code from
cannam@167 1015 # the compiler, it worked.
cannam@167 1016 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
cannam@167 1017 lt_cv_apple_cc_single_mod=yes
cannam@167 1018 else
cannam@167 1019 cat conftest.err >&AS_MESSAGE_LOG_FD
cannam@167 1020 fi
cannam@167 1021 rm -rf libconftest.dylib*
cannam@167 1022 rm -f conftest.*
cannam@167 1023 fi])
cannam@167 1024
cannam@167 1025 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
cannam@167 1026 [lt_cv_ld_exported_symbols_list],
cannam@167 1027 [lt_cv_ld_exported_symbols_list=no
cannam@167 1028 save_LDFLAGS=$LDFLAGS
cannam@167 1029 echo "_main" > conftest.sym
cannam@167 1030 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
cannam@167 1031 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
cannam@167 1032 [lt_cv_ld_exported_symbols_list=yes],
cannam@167 1033 [lt_cv_ld_exported_symbols_list=no])
cannam@167 1034 LDFLAGS=$save_LDFLAGS
cannam@167 1035 ])
cannam@167 1036
cannam@167 1037 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
cannam@167 1038 [lt_cv_ld_force_load=no
cannam@167 1039 cat > conftest.c << _LT_EOF
cannam@167 1040 int forced_loaded() { return 2;}
cannam@167 1041 _LT_EOF
cannam@167 1042 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
cannam@167 1043 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
cannam@167 1044 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
cannam@167 1045 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
cannam@167 1046 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
cannam@167 1047 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
cannam@167 1048 cat > conftest.c << _LT_EOF
cannam@167 1049 int main() { return 0;}
cannam@167 1050 _LT_EOF
cannam@167 1051 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
cannam@167 1052 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
cannam@167 1053 _lt_result=$?
cannam@167 1054 if test -s conftest.err && $GREP force_load conftest.err; then
cannam@167 1055 cat conftest.err >&AS_MESSAGE_LOG_FD
cannam@167 1056 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
cannam@167 1057 lt_cv_ld_force_load=yes
cannam@167 1058 else
cannam@167 1059 cat conftest.err >&AS_MESSAGE_LOG_FD
cannam@167 1060 fi
cannam@167 1061 rm -f conftest.err libconftest.a conftest conftest.c
cannam@167 1062 rm -rf conftest.dSYM
cannam@167 1063 ])
cannam@167 1064 case $host_os in
cannam@167 1065 rhapsody* | darwin1.[[012]])
cannam@167 1066 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
cannam@167 1067 darwin1.*)
cannam@167 1068 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
cannam@167 1069 darwin*) # darwin 5.x on
cannam@167 1070 # if running on 10.5 or later, the deployment target defaults
cannam@167 1071 # to the OS version, if on x86, and 10.4, the deployment
cannam@167 1072 # target defaults to 10.4. Don't you love it?
cannam@167 1073 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
cannam@167 1074 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
cannam@167 1075 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
cannam@167 1076 10.[[012]][[,.]]*)
cannam@167 1077 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
cannam@167 1078 10.*)
cannam@167 1079 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
cannam@167 1080 esac
cannam@167 1081 ;;
cannam@167 1082 esac
cannam@167 1083 if test yes = "$lt_cv_apple_cc_single_mod"; then
cannam@167 1084 _lt_dar_single_mod='$single_module'
cannam@167 1085 fi
cannam@167 1086 if test yes = "$lt_cv_ld_exported_symbols_list"; then
cannam@167 1087 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
cannam@167 1088 else
cannam@167 1089 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
cannam@167 1090 fi
cannam@167 1091 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
cannam@167 1092 _lt_dsymutil='~$DSYMUTIL $lib || :'
cannam@167 1093 else
cannam@167 1094 _lt_dsymutil=
cannam@167 1095 fi
cannam@167 1096 ;;
cannam@167 1097 esac
cannam@167 1098 ])
cannam@167 1099
cannam@167 1100
cannam@167 1101 # _LT_DARWIN_LINKER_FEATURES([TAG])
cannam@167 1102 # ---------------------------------
cannam@167 1103 # Checks for linker and compiler features on darwin
cannam@167 1104 m4_defun([_LT_DARWIN_LINKER_FEATURES],
cannam@167 1105 [
cannam@167 1106 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
cannam@167 1107 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@167 1108 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@167 1109 _LT_TAGVAR(hardcode_automatic, $1)=yes
cannam@167 1110 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
cannam@167 1111 if test yes = "$lt_cv_ld_force_load"; then
cannam@167 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@167 1113 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
cannam@167 1114 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
cannam@167 1115 else
cannam@167 1116 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
cannam@167 1117 fi
cannam@167 1118 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@167 1119 _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
cannam@167 1120 case $cc_basename in
cannam@167 1121 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
cannam@167 1122 *) _lt_dar_can_shared=$GCC ;;
cannam@167 1123 esac
cannam@167 1124 if test yes = "$_lt_dar_can_shared"; then
cannam@167 1125 output_verbose_link_cmd=func_echo_all
cannam@167 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@167 1127 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
cannam@167 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@167 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@167 1130 m4_if([$1], [CXX],
cannam@167 1131 [ if test yes != "$lt_cv_apple_cc_single_mod"; then
cannam@167 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@167 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@167 1134 fi
cannam@167 1135 ],[])
cannam@167 1136 else
cannam@167 1137 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 1138 fi
cannam@167 1139 ])
cannam@167 1140
cannam@167 1141 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
cannam@167 1142 # ----------------------------------
cannam@167 1143 # Links a minimal program and checks the executable
cannam@167 1144 # for the system default hardcoded library path. In most cases,
cannam@167 1145 # this is /usr/lib:/lib, but when the MPI compilers are used
cannam@167 1146 # the location of the communication and MPI libs are included too.
cannam@167 1147 # If we don't find anything, use the default library path according
cannam@167 1148 # to the aix ld manual.
cannam@167 1149 # Store the results from the different compilers for each TAGNAME.
cannam@167 1150 # Allow to override them for all tags through lt_cv_aix_libpath.
cannam@167 1151 m4_defun([_LT_SYS_MODULE_PATH_AIX],
cannam@167 1152 [m4_require([_LT_DECL_SED])dnl
cannam@167 1153 if test set = "${lt_cv_aix_libpath+set}"; then
cannam@167 1154 aix_libpath=$lt_cv_aix_libpath
cannam@167 1155 else
cannam@167 1156 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
cannam@167 1157 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
cannam@167 1158 lt_aix_libpath_sed='[
cannam@167 1159 /Import File Strings/,/^$/ {
cannam@167 1160 /^0/ {
cannam@167 1161 s/^0 *\([^ ]*\) *$/\1/
cannam@167 1162 p
cannam@167 1163 }
cannam@167 1164 }]'
cannam@167 1165 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
cannam@167 1166 # Check for a 64-bit object if we didn't find anything.
cannam@167 1167 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
cannam@167 1168 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
cannam@167 1169 fi],[])
cannam@167 1170 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
cannam@167 1171 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
cannam@167 1172 fi
cannam@167 1173 ])
cannam@167 1174 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
cannam@167 1175 fi
cannam@167 1176 ])# _LT_SYS_MODULE_PATH_AIX
cannam@167 1177
cannam@167 1178
cannam@167 1179 # _LT_SHELL_INIT(ARG)
cannam@167 1180 # -------------------
cannam@167 1181 m4_define([_LT_SHELL_INIT],
cannam@167 1182 [m4_divert_text([M4SH-INIT], [$1
cannam@167 1183 ])])# _LT_SHELL_INIT
cannam@167 1184
cannam@167 1185
cannam@167 1186
cannam@167 1187 # _LT_PROG_ECHO_BACKSLASH
cannam@167 1188 # -----------------------
cannam@167 1189 # Find how we can fake an echo command that does not interpret backslash.
cannam@167 1190 # In particular, with Autoconf 2.60 or later we add some code to the start
cannam@167 1191 # of the generated configure script that will find a shell with a builtin
cannam@167 1192 # printf (that we can use as an echo command).
cannam@167 1193 m4_defun([_LT_PROG_ECHO_BACKSLASH],
cannam@167 1194 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
cannam@167 1195 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
cannam@167 1196 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
cannam@167 1197
cannam@167 1198 AC_MSG_CHECKING([how to print strings])
cannam@167 1199 # Test print first, because it will be a builtin if present.
cannam@167 1200 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
cannam@167 1201 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
cannam@167 1202 ECHO='print -r --'
cannam@167 1203 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
cannam@167 1204 ECHO='printf %s\n'
cannam@167 1205 else
cannam@167 1206 # Use this function as a fallback that always works.
cannam@167 1207 func_fallback_echo ()
cannam@167 1208 {
cannam@167 1209 eval 'cat <<_LTECHO_EOF
cannam@167 1210 $[]1
cannam@167 1211 _LTECHO_EOF'
cannam@167 1212 }
cannam@167 1213 ECHO='func_fallback_echo'
cannam@167 1214 fi
cannam@167 1215
cannam@167 1216 # func_echo_all arg...
cannam@167 1217 # Invoke $ECHO with all args, space-separated.
cannam@167 1218 func_echo_all ()
cannam@167 1219 {
cannam@167 1220 $ECHO "$*"
cannam@167 1221 }
cannam@167 1222
cannam@167 1223 case $ECHO in
cannam@167 1224 printf*) AC_MSG_RESULT([printf]) ;;
cannam@167 1225 print*) AC_MSG_RESULT([print -r]) ;;
cannam@167 1226 *) AC_MSG_RESULT([cat]) ;;
cannam@167 1227 esac
cannam@167 1228
cannam@167 1229 m4_ifdef([_AS_DETECT_SUGGESTED],
cannam@167 1230 [_AS_DETECT_SUGGESTED([
cannam@167 1231 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
cannam@167 1232 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
cannam@167 1233 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
cannam@167 1234 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
cannam@167 1235 PATH=/empty FPATH=/empty; export PATH FPATH
cannam@167 1236 test "X`printf %s $ECHO`" = "X$ECHO" \
cannam@167 1237 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
cannam@167 1238
cannam@167 1239 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
cannam@167 1240 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
cannam@167 1241 ])# _LT_PROG_ECHO_BACKSLASH
cannam@167 1242
cannam@167 1243
cannam@167 1244 # _LT_WITH_SYSROOT
cannam@167 1245 # ----------------
cannam@167 1246 AC_DEFUN([_LT_WITH_SYSROOT],
cannam@167 1247 [AC_MSG_CHECKING([for sysroot])
cannam@167 1248 AC_ARG_WITH([sysroot],
cannam@167 1249 [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
cannam@167 1250 [Search for dependent libraries within DIR (or the compiler's sysroot
cannam@167 1251 if not specified).])],
cannam@167 1252 [], [with_sysroot=no])
cannam@167 1253
cannam@167 1254 dnl lt_sysroot will always be passed unquoted. We quote it here
cannam@167 1255 dnl in case the user passed a directory name.
cannam@167 1256 lt_sysroot=
cannam@167 1257 case $with_sysroot in #(
cannam@167 1258 yes)
cannam@167 1259 if test yes = "$GCC"; then
cannam@167 1260 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
cannam@167 1261 fi
cannam@167 1262 ;; #(
cannam@167 1263 /*)
cannam@167 1264 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
cannam@167 1265 ;; #(
cannam@167 1266 no|'')
cannam@167 1267 ;; #(
cannam@167 1268 *)
cannam@167 1269 AC_MSG_RESULT([$with_sysroot])
cannam@167 1270 AC_MSG_ERROR([The sysroot must be an absolute path.])
cannam@167 1271 ;;
cannam@167 1272 esac
cannam@167 1273
cannam@167 1274 AC_MSG_RESULT([${lt_sysroot:-no}])
cannam@167 1275 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
cannam@167 1276 [dependent libraries, and where our libraries should be installed.])])
cannam@167 1277
cannam@167 1278 # _LT_ENABLE_LOCK
cannam@167 1279 # ---------------
cannam@167 1280 m4_defun([_LT_ENABLE_LOCK],
cannam@167 1281 [AC_ARG_ENABLE([libtool-lock],
cannam@167 1282 [AS_HELP_STRING([--disable-libtool-lock],
cannam@167 1283 [avoid locking (might break parallel builds)])])
cannam@167 1284 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
cannam@167 1285
cannam@167 1286 # Some flags need to be propagated to the compiler or linker for good
cannam@167 1287 # libtool support.
cannam@167 1288 case $host in
cannam@167 1289 ia64-*-hpux*)
cannam@167 1290 # Find out what ABI is being produced by ac_compile, and set mode
cannam@167 1291 # options accordingly.
cannam@167 1292 echo 'int i;' > conftest.$ac_ext
cannam@167 1293 if AC_TRY_EVAL(ac_compile); then
cannam@167 1294 case `/usr/bin/file conftest.$ac_objext` in
cannam@167 1295 *ELF-32*)
cannam@167 1296 HPUX_IA64_MODE=32
cannam@167 1297 ;;
cannam@167 1298 *ELF-64*)
cannam@167 1299 HPUX_IA64_MODE=64
cannam@167 1300 ;;
cannam@167 1301 esac
cannam@167 1302 fi
cannam@167 1303 rm -rf conftest*
cannam@167 1304 ;;
cannam@167 1305 *-*-irix6*)
cannam@167 1306 # Find out what ABI is being produced by ac_compile, and set linker
cannam@167 1307 # options accordingly.
cannam@167 1308 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
cannam@167 1309 if AC_TRY_EVAL(ac_compile); then
cannam@167 1310 if test yes = "$lt_cv_prog_gnu_ld"; then
cannam@167 1311 case `/usr/bin/file conftest.$ac_objext` in
cannam@167 1312 *32-bit*)
cannam@167 1313 LD="${LD-ld} -melf32bsmip"
cannam@167 1314 ;;
cannam@167 1315 *N32*)
cannam@167 1316 LD="${LD-ld} -melf32bmipn32"
cannam@167 1317 ;;
cannam@167 1318 *64-bit*)
cannam@167 1319 LD="${LD-ld} -melf64bmip"
cannam@167 1320 ;;
cannam@167 1321 esac
cannam@167 1322 else
cannam@167 1323 case `/usr/bin/file conftest.$ac_objext` in
cannam@167 1324 *32-bit*)
cannam@167 1325 LD="${LD-ld} -32"
cannam@167 1326 ;;
cannam@167 1327 *N32*)
cannam@167 1328 LD="${LD-ld} -n32"
cannam@167 1329 ;;
cannam@167 1330 *64-bit*)
cannam@167 1331 LD="${LD-ld} -64"
cannam@167 1332 ;;
cannam@167 1333 esac
cannam@167 1334 fi
cannam@167 1335 fi
cannam@167 1336 rm -rf conftest*
cannam@167 1337 ;;
cannam@167 1338
cannam@167 1339 mips64*-*linux*)
cannam@167 1340 # Find out what ABI is being produced by ac_compile, and set linker
cannam@167 1341 # options accordingly.
cannam@167 1342 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
cannam@167 1343 if AC_TRY_EVAL(ac_compile); then
cannam@167 1344 emul=elf
cannam@167 1345 case `/usr/bin/file conftest.$ac_objext` in
cannam@167 1346 *32-bit*)
cannam@167 1347 emul="${emul}32"
cannam@167 1348 ;;
cannam@167 1349 *64-bit*)
cannam@167 1350 emul="${emul}64"
cannam@167 1351 ;;
cannam@167 1352 esac
cannam@167 1353 case `/usr/bin/file conftest.$ac_objext` in
cannam@167 1354 *MSB*)
cannam@167 1355 emul="${emul}btsmip"
cannam@167 1356 ;;
cannam@167 1357 *LSB*)
cannam@167 1358 emul="${emul}ltsmip"
cannam@167 1359 ;;
cannam@167 1360 esac
cannam@167 1361 case `/usr/bin/file conftest.$ac_objext` in
cannam@167 1362 *N32*)
cannam@167 1363 emul="${emul}n32"
cannam@167 1364 ;;
cannam@167 1365 esac
cannam@167 1366 LD="${LD-ld} -m $emul"
cannam@167 1367 fi
cannam@167 1368 rm -rf conftest*
cannam@167 1369 ;;
cannam@167 1370
cannam@167 1371 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
cannam@167 1372 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
cannam@167 1373 # Find out what ABI is being produced by ac_compile, and set linker
cannam@167 1374 # options accordingly. Note that the listed cases only cover the
cannam@167 1375 # situations where additional linker options are needed (such as when
cannam@167 1376 # doing 32-bit compilation for a host where ld defaults to 64-bit, or
cannam@167 1377 # vice versa); the common cases where no linker options are needed do
cannam@167 1378 # not appear in the list.
cannam@167 1379 echo 'int i;' > conftest.$ac_ext
cannam@167 1380 if AC_TRY_EVAL(ac_compile); then
cannam@167 1381 case `/usr/bin/file conftest.o` in
cannam@167 1382 *32-bit*)
cannam@167 1383 case $host in
cannam@167 1384 x86_64-*kfreebsd*-gnu)
cannam@167 1385 LD="${LD-ld} -m elf_i386_fbsd"
cannam@167 1386 ;;
cannam@167 1387 x86_64-*linux*)
cannam@167 1388 case `/usr/bin/file conftest.o` in
cannam@167 1389 *x86-64*)
cannam@167 1390 LD="${LD-ld} -m elf32_x86_64"
cannam@167 1391 ;;
cannam@167 1392 *)
cannam@167 1393 LD="${LD-ld} -m elf_i386"
cannam@167 1394 ;;
cannam@167 1395 esac
cannam@167 1396 ;;
cannam@167 1397 powerpc64le-*linux*)
cannam@167 1398 LD="${LD-ld} -m elf32lppclinux"
cannam@167 1399 ;;
cannam@167 1400 powerpc64-*linux*)
cannam@167 1401 LD="${LD-ld} -m elf32ppclinux"
cannam@167 1402 ;;
cannam@167 1403 s390x-*linux*)
cannam@167 1404 LD="${LD-ld} -m elf_s390"
cannam@167 1405 ;;
cannam@167 1406 sparc64-*linux*)
cannam@167 1407 LD="${LD-ld} -m elf32_sparc"
cannam@167 1408 ;;
cannam@167 1409 esac
cannam@167 1410 ;;
cannam@167 1411 *64-bit*)
cannam@167 1412 case $host in
cannam@167 1413 x86_64-*kfreebsd*-gnu)
cannam@167 1414 LD="${LD-ld} -m elf_x86_64_fbsd"
cannam@167 1415 ;;
cannam@167 1416 x86_64-*linux*)
cannam@167 1417 LD="${LD-ld} -m elf_x86_64"
cannam@167 1418 ;;
cannam@167 1419 powerpcle-*linux*)
cannam@167 1420 LD="${LD-ld} -m elf64lppc"
cannam@167 1421 ;;
cannam@167 1422 powerpc-*linux*)
cannam@167 1423 LD="${LD-ld} -m elf64ppc"
cannam@167 1424 ;;
cannam@167 1425 s390*-*linux*|s390*-*tpf*)
cannam@167 1426 LD="${LD-ld} -m elf64_s390"
cannam@167 1427 ;;
cannam@167 1428 sparc*-*linux*)
cannam@167 1429 LD="${LD-ld} -m elf64_sparc"
cannam@167 1430 ;;
cannam@167 1431 esac
cannam@167 1432 ;;
cannam@167 1433 esac
cannam@167 1434 fi
cannam@167 1435 rm -rf conftest*
cannam@167 1436 ;;
cannam@167 1437
cannam@167 1438 *-*-sco3.2v5*)
cannam@167 1439 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
cannam@167 1440 SAVE_CFLAGS=$CFLAGS
cannam@167 1441 CFLAGS="$CFLAGS -belf"
cannam@167 1442 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
cannam@167 1443 [AC_LANG_PUSH(C)
cannam@167 1444 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
cannam@167 1445 AC_LANG_POP])
cannam@167 1446 if test yes != "$lt_cv_cc_needs_belf"; then
cannam@167 1447 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
cannam@167 1448 CFLAGS=$SAVE_CFLAGS
cannam@167 1449 fi
cannam@167 1450 ;;
cannam@167 1451 *-*solaris*)
cannam@167 1452 # Find out what ABI is being produced by ac_compile, and set linker
cannam@167 1453 # options accordingly.
cannam@167 1454 echo 'int i;' > conftest.$ac_ext
cannam@167 1455 if AC_TRY_EVAL(ac_compile); then
cannam@167 1456 case `/usr/bin/file conftest.o` in
cannam@167 1457 *64-bit*)
cannam@167 1458 case $lt_cv_prog_gnu_ld in
cannam@167 1459 yes*)
cannam@167 1460 case $host in
cannam@167 1461 i?86-*-solaris*|x86_64-*-solaris*)
cannam@167 1462 LD="${LD-ld} -m elf_x86_64"
cannam@167 1463 ;;
cannam@167 1464 sparc*-*-solaris*)
cannam@167 1465 LD="${LD-ld} -m elf64_sparc"
cannam@167 1466 ;;
cannam@167 1467 esac
cannam@167 1468 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
cannam@167 1469 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
cannam@167 1470 LD=${LD-ld}_sol2
cannam@167 1471 fi
cannam@167 1472 ;;
cannam@167 1473 *)
cannam@167 1474 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
cannam@167 1475 LD="${LD-ld} -64"
cannam@167 1476 fi
cannam@167 1477 ;;
cannam@167 1478 esac
cannam@167 1479 ;;
cannam@167 1480 esac
cannam@167 1481 fi
cannam@167 1482 rm -rf conftest*
cannam@167 1483 ;;
cannam@167 1484 esac
cannam@167 1485
cannam@167 1486 need_locks=$enable_libtool_lock
cannam@167 1487 ])# _LT_ENABLE_LOCK
cannam@167 1488
cannam@167 1489
cannam@167 1490 # _LT_PROG_AR
cannam@167 1491 # -----------
cannam@167 1492 m4_defun([_LT_PROG_AR],
cannam@167 1493 [AC_CHECK_TOOLS(AR, [ar], false)
cannam@167 1494 : ${AR=ar}
cannam@167 1495 : ${AR_FLAGS=cru}
cannam@167 1496 _LT_DECL([], [AR], [1], [The archiver])
cannam@167 1497 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
cannam@167 1498
cannam@167 1499 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
cannam@167 1500 [lt_cv_ar_at_file=no
cannam@167 1501 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
cannam@167 1502 [echo conftest.$ac_objext > conftest.lst
cannam@167 1503 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
cannam@167 1504 AC_TRY_EVAL([lt_ar_try])
cannam@167 1505 if test 0 -eq "$ac_status"; then
cannam@167 1506 # Ensure the archiver fails upon bogus file names.
cannam@167 1507 rm -f conftest.$ac_objext libconftest.a
cannam@167 1508 AC_TRY_EVAL([lt_ar_try])
cannam@167 1509 if test 0 -ne "$ac_status"; then
cannam@167 1510 lt_cv_ar_at_file=@
cannam@167 1511 fi
cannam@167 1512 fi
cannam@167 1513 rm -f conftest.* libconftest.a
cannam@167 1514 ])
cannam@167 1515 ])
cannam@167 1516
cannam@167 1517 if test no = "$lt_cv_ar_at_file"; then
cannam@167 1518 archiver_list_spec=
cannam@167 1519 else
cannam@167 1520 archiver_list_spec=$lt_cv_ar_at_file
cannam@167 1521 fi
cannam@167 1522 _LT_DECL([], [archiver_list_spec], [1],
cannam@167 1523 [How to feed a file listing to the archiver])
cannam@167 1524 ])# _LT_PROG_AR
cannam@167 1525
cannam@167 1526
cannam@167 1527 # _LT_CMD_OLD_ARCHIVE
cannam@167 1528 # -------------------
cannam@167 1529 m4_defun([_LT_CMD_OLD_ARCHIVE],
cannam@167 1530 [_LT_PROG_AR
cannam@167 1531
cannam@167 1532 AC_CHECK_TOOL(STRIP, strip, :)
cannam@167 1533 test -z "$STRIP" && STRIP=:
cannam@167 1534 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
cannam@167 1535
cannam@167 1536 AC_CHECK_TOOL(RANLIB, ranlib, :)
cannam@167 1537 test -z "$RANLIB" && RANLIB=:
cannam@167 1538 _LT_DECL([], [RANLIB], [1],
cannam@167 1539 [Commands used to install an old-style archive])
cannam@167 1540
cannam@167 1541 # Determine commands to create old-style static archives.
cannam@167 1542 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
cannam@167 1543 old_postinstall_cmds='chmod 644 $oldlib'
cannam@167 1544 old_postuninstall_cmds=
cannam@167 1545
cannam@167 1546 if test -n "$RANLIB"; then
cannam@167 1547 case $host_os in
cannam@167 1548 bitrig* | openbsd*)
cannam@167 1549 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
cannam@167 1550 ;;
cannam@167 1551 *)
cannam@167 1552 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
cannam@167 1553 ;;
cannam@167 1554 esac
cannam@167 1555 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
cannam@167 1556 fi
cannam@167 1557
cannam@167 1558 case $host_os in
cannam@167 1559 darwin*)
cannam@167 1560 lock_old_archive_extraction=yes ;;
cannam@167 1561 *)
cannam@167 1562 lock_old_archive_extraction=no ;;
cannam@167 1563 esac
cannam@167 1564 _LT_DECL([], [old_postinstall_cmds], [2])
cannam@167 1565 _LT_DECL([], [old_postuninstall_cmds], [2])
cannam@167 1566 _LT_TAGDECL([], [old_archive_cmds], [2],
cannam@167 1567 [Commands used to build an old-style archive])
cannam@167 1568 _LT_DECL([], [lock_old_archive_extraction], [0],
cannam@167 1569 [Whether to use a lock for old archive extraction])
cannam@167 1570 ])# _LT_CMD_OLD_ARCHIVE
cannam@167 1571
cannam@167 1572
cannam@167 1573 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
cannam@167 1574 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
cannam@167 1575 # ----------------------------------------------------------------
cannam@167 1576 # Check whether the given compiler option works
cannam@167 1577 AC_DEFUN([_LT_COMPILER_OPTION],
cannam@167 1578 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@167 1579 m4_require([_LT_DECL_SED])dnl
cannam@167 1580 AC_CACHE_CHECK([$1], [$2],
cannam@167 1581 [$2=no
cannam@167 1582 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
cannam@167 1583 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
cannam@167 1584 lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
cannam@167 1585 # Insert the option either (1) after the last *FLAGS variable, or
cannam@167 1586 # (2) before a word containing "conftest.", or (3) at the end.
cannam@167 1587 # Note that $ac_compile itself does not contain backslashes and begins
cannam@167 1588 # with a dollar sign (not a hyphen), so the echo should work correctly.
cannam@167 1589 # The option is referenced via a variable to avoid confusing sed.
cannam@167 1590 lt_compile=`echo "$ac_compile" | $SED \
cannam@167 1591 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
cannam@167 1592 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
cannam@167 1593 -e 's:$: $lt_compiler_flag:'`
cannam@167 1594 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
cannam@167 1595 (eval "$lt_compile" 2>conftest.err)
cannam@167 1596 ac_status=$?
cannam@167 1597 cat conftest.err >&AS_MESSAGE_LOG_FD
cannam@167 1598 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
cannam@167 1599 if (exit $ac_status) && test -s "$ac_outfile"; then
cannam@167 1600 # The compiler can only warn and ignore the option if not recognized
cannam@167 1601 # So say no if there are warnings other than the usual output.
cannam@167 1602 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
cannam@167 1603 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
cannam@167 1604 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
cannam@167 1605 $2=yes
cannam@167 1606 fi
cannam@167 1607 fi
cannam@167 1608 $RM conftest*
cannam@167 1609 ])
cannam@167 1610
cannam@167 1611 if test yes = "[$]$2"; then
cannam@167 1612 m4_if([$5], , :, [$5])
cannam@167 1613 else
cannam@167 1614 m4_if([$6], , :, [$6])
cannam@167 1615 fi
cannam@167 1616 ])# _LT_COMPILER_OPTION
cannam@167 1617
cannam@167 1618 # Old name:
cannam@167 1619 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
cannam@167 1620 dnl aclocal-1.4 backwards compatibility:
cannam@167 1621 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
cannam@167 1622
cannam@167 1623
cannam@167 1624 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
cannam@167 1625 # [ACTION-SUCCESS], [ACTION-FAILURE])
cannam@167 1626 # ----------------------------------------------------
cannam@167 1627 # Check whether the given linker option works
cannam@167 1628 AC_DEFUN([_LT_LINKER_OPTION],
cannam@167 1629 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@167 1630 m4_require([_LT_DECL_SED])dnl
cannam@167 1631 AC_CACHE_CHECK([$1], [$2],
cannam@167 1632 [$2=no
cannam@167 1633 save_LDFLAGS=$LDFLAGS
cannam@167 1634 LDFLAGS="$LDFLAGS $3"
cannam@167 1635 echo "$lt_simple_link_test_code" > conftest.$ac_ext
cannam@167 1636 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
cannam@167 1637 # The linker can only warn and ignore the option if not recognized
cannam@167 1638 # So say no if there are warnings
cannam@167 1639 if test -s conftest.err; then
cannam@167 1640 # Append any errors to the config.log.
cannam@167 1641 cat conftest.err 1>&AS_MESSAGE_LOG_FD
cannam@167 1642 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
cannam@167 1643 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
cannam@167 1644 if diff conftest.exp conftest.er2 >/dev/null; then
cannam@167 1645 $2=yes
cannam@167 1646 fi
cannam@167 1647 else
cannam@167 1648 $2=yes
cannam@167 1649 fi
cannam@167 1650 fi
cannam@167 1651 $RM -r conftest*
cannam@167 1652 LDFLAGS=$save_LDFLAGS
cannam@167 1653 ])
cannam@167 1654
cannam@167 1655 if test yes = "[$]$2"; then
cannam@167 1656 m4_if([$4], , :, [$4])
cannam@167 1657 else
cannam@167 1658 m4_if([$5], , :, [$5])
cannam@167 1659 fi
cannam@167 1660 ])# _LT_LINKER_OPTION
cannam@167 1661
cannam@167 1662 # Old name:
cannam@167 1663 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
cannam@167 1664 dnl aclocal-1.4 backwards compatibility:
cannam@167 1665 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
cannam@167 1666
cannam@167 1667
cannam@167 1668 # LT_CMD_MAX_LEN
cannam@167 1669 #---------------
cannam@167 1670 AC_DEFUN([LT_CMD_MAX_LEN],
cannam@167 1671 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
cannam@167 1672 # find the maximum length of command line arguments
cannam@167 1673 AC_MSG_CHECKING([the maximum length of command line arguments])
cannam@167 1674 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
cannam@167 1675 i=0
cannam@167 1676 teststring=ABCD
cannam@167 1677
cannam@167 1678 case $build_os in
cannam@167 1679 msdosdjgpp*)
cannam@167 1680 # On DJGPP, this test can blow up pretty badly due to problems in libc
cannam@167 1681 # (any single argument exceeding 2000 bytes causes a buffer overrun
cannam@167 1682 # during glob expansion). Even if it were fixed, the result of this
cannam@167 1683 # check would be larger than it should be.
cannam@167 1684 lt_cv_sys_max_cmd_len=12288; # 12K is about right
cannam@167 1685 ;;
cannam@167 1686
cannam@167 1687 gnu*)
cannam@167 1688 # Under GNU Hurd, this test is not required because there is
cannam@167 1689 # no limit to the length of command line arguments.
cannam@167 1690 # Libtool will interpret -1 as no limit whatsoever
cannam@167 1691 lt_cv_sys_max_cmd_len=-1;
cannam@167 1692 ;;
cannam@167 1693
cannam@167 1694 cygwin* | mingw* | cegcc*)
cannam@167 1695 # On Win9x/ME, this test blows up -- it succeeds, but takes
cannam@167 1696 # about 5 minutes as the teststring grows exponentially.
cannam@167 1697 # Worse, since 9x/ME are not pre-emptively multitasking,
cannam@167 1698 # you end up with a "frozen" computer, even though with patience
cannam@167 1699 # the test eventually succeeds (with a max line length of 256k).
cannam@167 1700 # Instead, let's just punt: use the minimum linelength reported by
cannam@167 1701 # all of the supported platforms: 8192 (on NT/2K/XP).
cannam@167 1702 lt_cv_sys_max_cmd_len=8192;
cannam@167 1703 ;;
cannam@167 1704
cannam@167 1705 mint*)
cannam@167 1706 # On MiNT this can take a long time and run out of memory.
cannam@167 1707 lt_cv_sys_max_cmd_len=8192;
cannam@167 1708 ;;
cannam@167 1709
cannam@167 1710 amigaos*)
cannam@167 1711 # On AmigaOS with pdksh, this test takes hours, literally.
cannam@167 1712 # So we just punt and use a minimum line length of 8192.
cannam@167 1713 lt_cv_sys_max_cmd_len=8192;
cannam@167 1714 ;;
cannam@167 1715
cannam@167 1716 bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
cannam@167 1717 # This has been around since 386BSD, at least. Likely further.
cannam@167 1718 if test -x /sbin/sysctl; then
cannam@167 1719 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
cannam@167 1720 elif test -x /usr/sbin/sysctl; then
cannam@167 1721 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
cannam@167 1722 else
cannam@167 1723 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
cannam@167 1724 fi
cannam@167 1725 # And add a safety zone
cannam@167 1726 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
cannam@167 1727 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
cannam@167 1728 ;;
cannam@167 1729
cannam@167 1730 interix*)
cannam@167 1731 # We know the value 262144 and hardcode it with a safety zone (like BSD)
cannam@167 1732 lt_cv_sys_max_cmd_len=196608
cannam@167 1733 ;;
cannam@167 1734
cannam@167 1735 os2*)
cannam@167 1736 # The test takes a long time on OS/2.
cannam@167 1737 lt_cv_sys_max_cmd_len=8192
cannam@167 1738 ;;
cannam@167 1739
cannam@167 1740 osf*)
cannam@167 1741 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
cannam@167 1742 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
cannam@167 1743 # nice to cause kernel panics so lets avoid the loop below.
cannam@167 1744 # First set a reasonable default.
cannam@167 1745 lt_cv_sys_max_cmd_len=16384
cannam@167 1746 #
cannam@167 1747 if test -x /sbin/sysconfig; then
cannam@167 1748 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
cannam@167 1749 *1*) lt_cv_sys_max_cmd_len=-1 ;;
cannam@167 1750 esac
cannam@167 1751 fi
cannam@167 1752 ;;
cannam@167 1753 sco3.2v5*)
cannam@167 1754 lt_cv_sys_max_cmd_len=102400
cannam@167 1755 ;;
cannam@167 1756 sysv5* | sco5v6* | sysv4.2uw2*)
cannam@167 1757 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
cannam@167 1758 if test -n "$kargmax"; then
cannam@167 1759 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
cannam@167 1760 else
cannam@167 1761 lt_cv_sys_max_cmd_len=32768
cannam@167 1762 fi
cannam@167 1763 ;;
cannam@167 1764 *)
cannam@167 1765 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
cannam@167 1766 if test -n "$lt_cv_sys_max_cmd_len" && \
cannam@167 1767 test undefined != "$lt_cv_sys_max_cmd_len"; then
cannam@167 1768 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
cannam@167 1769 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
cannam@167 1770 else
cannam@167 1771 # Make teststring a little bigger before we do anything with it.
cannam@167 1772 # a 1K string should be a reasonable start.
cannam@167 1773 for i in 1 2 3 4 5 6 7 8; do
cannam@167 1774 teststring=$teststring$teststring
cannam@167 1775 done
cannam@167 1776 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
cannam@167 1777 # If test is not a shell built-in, we'll probably end up computing a
cannam@167 1778 # maximum length that is only half of the actual maximum length, but
cannam@167 1779 # we can't tell.
cannam@167 1780 while { test X`env echo "$teststring$teststring" 2>/dev/null` \
cannam@167 1781 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
cannam@167 1782 test 17 != "$i" # 1/2 MB should be enough
cannam@167 1783 do
cannam@167 1784 i=`expr $i + 1`
cannam@167 1785 teststring=$teststring$teststring
cannam@167 1786 done
cannam@167 1787 # Only check the string length outside the loop.
cannam@167 1788 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
cannam@167 1789 teststring=
cannam@167 1790 # Add a significant safety factor because C++ compilers can tack on
cannam@167 1791 # massive amounts of additional arguments before passing them to the
cannam@167 1792 # linker. It appears as though 1/2 is a usable value.
cannam@167 1793 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
cannam@167 1794 fi
cannam@167 1795 ;;
cannam@167 1796 esac
cannam@167 1797 ])
cannam@167 1798 if test -n "$lt_cv_sys_max_cmd_len"; then
cannam@167 1799 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
cannam@167 1800 else
cannam@167 1801 AC_MSG_RESULT(none)
cannam@167 1802 fi
cannam@167 1803 max_cmd_len=$lt_cv_sys_max_cmd_len
cannam@167 1804 _LT_DECL([], [max_cmd_len], [0],
cannam@167 1805 [What is the maximum length of a command?])
cannam@167 1806 ])# LT_CMD_MAX_LEN
cannam@167 1807
cannam@167 1808 # Old name:
cannam@167 1809 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
cannam@167 1810 dnl aclocal-1.4 backwards compatibility:
cannam@167 1811 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
cannam@167 1812
cannam@167 1813
cannam@167 1814 # _LT_HEADER_DLFCN
cannam@167 1815 # ----------------
cannam@167 1816 m4_defun([_LT_HEADER_DLFCN],
cannam@167 1817 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
cannam@167 1818 ])# _LT_HEADER_DLFCN
cannam@167 1819
cannam@167 1820
cannam@167 1821 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
cannam@167 1822 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
cannam@167 1823 # ----------------------------------------------------------------
cannam@167 1824 m4_defun([_LT_TRY_DLOPEN_SELF],
cannam@167 1825 [m4_require([_LT_HEADER_DLFCN])dnl
cannam@167 1826 if test yes = "$cross_compiling"; then :
cannam@167 1827 [$4]
cannam@167 1828 else
cannam@167 1829 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
cannam@167 1830 lt_status=$lt_dlunknown
cannam@167 1831 cat > conftest.$ac_ext <<_LT_EOF
cannam@167 1832 [#line $LINENO "configure"
cannam@167 1833 #include "confdefs.h"
cannam@167 1834
cannam@167 1835 #if HAVE_DLFCN_H
cannam@167 1836 #include <dlfcn.h>
cannam@167 1837 #endif
cannam@167 1838
cannam@167 1839 #include <stdio.h>
cannam@167 1840
cannam@167 1841 #ifdef RTLD_GLOBAL
cannam@167 1842 # define LT_DLGLOBAL RTLD_GLOBAL
cannam@167 1843 #else
cannam@167 1844 # ifdef DL_GLOBAL
cannam@167 1845 # define LT_DLGLOBAL DL_GLOBAL
cannam@167 1846 # else
cannam@167 1847 # define LT_DLGLOBAL 0
cannam@167 1848 # endif
cannam@167 1849 #endif
cannam@167 1850
cannam@167 1851 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
cannam@167 1852 find out it does not work in some platform. */
cannam@167 1853 #ifndef LT_DLLAZY_OR_NOW
cannam@167 1854 # ifdef RTLD_LAZY
cannam@167 1855 # define LT_DLLAZY_OR_NOW RTLD_LAZY
cannam@167 1856 # else
cannam@167 1857 # ifdef DL_LAZY
cannam@167 1858 # define LT_DLLAZY_OR_NOW DL_LAZY
cannam@167 1859 # else
cannam@167 1860 # ifdef RTLD_NOW
cannam@167 1861 # define LT_DLLAZY_OR_NOW RTLD_NOW
cannam@167 1862 # else
cannam@167 1863 # ifdef DL_NOW
cannam@167 1864 # define LT_DLLAZY_OR_NOW DL_NOW
cannam@167 1865 # else
cannam@167 1866 # define LT_DLLAZY_OR_NOW 0
cannam@167 1867 # endif
cannam@167 1868 # endif
cannam@167 1869 # endif
cannam@167 1870 # endif
cannam@167 1871 #endif
cannam@167 1872
cannam@167 1873 /* When -fvisibility=hidden is used, assume the code has been annotated
cannam@167 1874 correspondingly for the symbols needed. */
cannam@167 1875 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
cannam@167 1876 int fnord () __attribute__((visibility("default")));
cannam@167 1877 #endif
cannam@167 1878
cannam@167 1879 int fnord () { return 42; }
cannam@167 1880 int main ()
cannam@167 1881 {
cannam@167 1882 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
cannam@167 1883 int status = $lt_dlunknown;
cannam@167 1884
cannam@167 1885 if (self)
cannam@167 1886 {
cannam@167 1887 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
cannam@167 1888 else
cannam@167 1889 {
cannam@167 1890 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
cannam@167 1891 else puts (dlerror ());
cannam@167 1892 }
cannam@167 1893 /* dlclose (self); */
cannam@167 1894 }
cannam@167 1895 else
cannam@167 1896 puts (dlerror ());
cannam@167 1897
cannam@167 1898 return status;
cannam@167 1899 }]
cannam@167 1900 _LT_EOF
cannam@167 1901 if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
cannam@167 1902 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
cannam@167 1903 lt_status=$?
cannam@167 1904 case x$lt_status in
cannam@167 1905 x$lt_dlno_uscore) $1 ;;
cannam@167 1906 x$lt_dlneed_uscore) $2 ;;
cannam@167 1907 x$lt_dlunknown|x*) $3 ;;
cannam@167 1908 esac
cannam@167 1909 else :
cannam@167 1910 # compilation failed
cannam@167 1911 $3
cannam@167 1912 fi
cannam@167 1913 fi
cannam@167 1914 rm -fr conftest*
cannam@167 1915 ])# _LT_TRY_DLOPEN_SELF
cannam@167 1916
cannam@167 1917
cannam@167 1918 # LT_SYS_DLOPEN_SELF
cannam@167 1919 # ------------------
cannam@167 1920 AC_DEFUN([LT_SYS_DLOPEN_SELF],
cannam@167 1921 [m4_require([_LT_HEADER_DLFCN])dnl
cannam@167 1922 if test yes != "$enable_dlopen"; then
cannam@167 1923 enable_dlopen=unknown
cannam@167 1924 enable_dlopen_self=unknown
cannam@167 1925 enable_dlopen_self_static=unknown
cannam@167 1926 else
cannam@167 1927 lt_cv_dlopen=no
cannam@167 1928 lt_cv_dlopen_libs=
cannam@167 1929
cannam@167 1930 case $host_os in
cannam@167 1931 beos*)
cannam@167 1932 lt_cv_dlopen=load_add_on
cannam@167 1933 lt_cv_dlopen_libs=
cannam@167 1934 lt_cv_dlopen_self=yes
cannam@167 1935 ;;
cannam@167 1936
cannam@167 1937 mingw* | pw32* | cegcc*)
cannam@167 1938 lt_cv_dlopen=LoadLibrary
cannam@167 1939 lt_cv_dlopen_libs=
cannam@167 1940 ;;
cannam@167 1941
cannam@167 1942 cygwin*)
cannam@167 1943 lt_cv_dlopen=dlopen
cannam@167 1944 lt_cv_dlopen_libs=
cannam@167 1945 ;;
cannam@167 1946
cannam@167 1947 darwin*)
cannam@167 1948 # if libdl is installed we need to link against it
cannam@167 1949 AC_CHECK_LIB([dl], [dlopen],
cannam@167 1950 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
cannam@167 1951 lt_cv_dlopen=dyld
cannam@167 1952 lt_cv_dlopen_libs=
cannam@167 1953 lt_cv_dlopen_self=yes
cannam@167 1954 ])
cannam@167 1955 ;;
cannam@167 1956
cannam@167 1957 tpf*)
cannam@167 1958 # Don't try to run any link tests for TPF. We know it's impossible
cannam@167 1959 # because TPF is a cross-compiler, and we know how we open DSOs.
cannam@167 1960 lt_cv_dlopen=dlopen
cannam@167 1961 lt_cv_dlopen_libs=
cannam@167 1962 lt_cv_dlopen_self=no
cannam@167 1963 ;;
cannam@167 1964
cannam@167 1965 *)
cannam@167 1966 AC_CHECK_FUNC([shl_load],
cannam@167 1967 [lt_cv_dlopen=shl_load],
cannam@167 1968 [AC_CHECK_LIB([dld], [shl_load],
cannam@167 1969 [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
cannam@167 1970 [AC_CHECK_FUNC([dlopen],
cannam@167 1971 [lt_cv_dlopen=dlopen],
cannam@167 1972 [AC_CHECK_LIB([dl], [dlopen],
cannam@167 1973 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
cannam@167 1974 [AC_CHECK_LIB([svld], [dlopen],
cannam@167 1975 [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
cannam@167 1976 [AC_CHECK_LIB([dld], [dld_link],
cannam@167 1977 [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
cannam@167 1978 ])
cannam@167 1979 ])
cannam@167 1980 ])
cannam@167 1981 ])
cannam@167 1982 ])
cannam@167 1983 ;;
cannam@167 1984 esac
cannam@167 1985
cannam@167 1986 if test no = "$lt_cv_dlopen"; then
cannam@167 1987 enable_dlopen=no
cannam@167 1988 else
cannam@167 1989 enable_dlopen=yes
cannam@167 1990 fi
cannam@167 1991
cannam@167 1992 case $lt_cv_dlopen in
cannam@167 1993 dlopen)
cannam@167 1994 save_CPPFLAGS=$CPPFLAGS
cannam@167 1995 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
cannam@167 1996
cannam@167 1997 save_LDFLAGS=$LDFLAGS
cannam@167 1998 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
cannam@167 1999
cannam@167 2000 save_LIBS=$LIBS
cannam@167 2001 LIBS="$lt_cv_dlopen_libs $LIBS"
cannam@167 2002
cannam@167 2003 AC_CACHE_CHECK([whether a program can dlopen itself],
cannam@167 2004 lt_cv_dlopen_self, [dnl
cannam@167 2005 _LT_TRY_DLOPEN_SELF(
cannam@167 2006 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
cannam@167 2007 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
cannam@167 2008 ])
cannam@167 2009
cannam@167 2010 if test yes = "$lt_cv_dlopen_self"; then
cannam@167 2011 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
cannam@167 2012 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
cannam@167 2013 lt_cv_dlopen_self_static, [dnl
cannam@167 2014 _LT_TRY_DLOPEN_SELF(
cannam@167 2015 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
cannam@167 2016 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
cannam@167 2017 ])
cannam@167 2018 fi
cannam@167 2019
cannam@167 2020 CPPFLAGS=$save_CPPFLAGS
cannam@167 2021 LDFLAGS=$save_LDFLAGS
cannam@167 2022 LIBS=$save_LIBS
cannam@167 2023 ;;
cannam@167 2024 esac
cannam@167 2025
cannam@167 2026 case $lt_cv_dlopen_self in
cannam@167 2027 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
cannam@167 2028 *) enable_dlopen_self=unknown ;;
cannam@167 2029 esac
cannam@167 2030
cannam@167 2031 case $lt_cv_dlopen_self_static in
cannam@167 2032 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
cannam@167 2033 *) enable_dlopen_self_static=unknown ;;
cannam@167 2034 esac
cannam@167 2035 fi
cannam@167 2036 _LT_DECL([dlopen_support], [enable_dlopen], [0],
cannam@167 2037 [Whether dlopen is supported])
cannam@167 2038 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
cannam@167 2039 [Whether dlopen of programs is supported])
cannam@167 2040 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
cannam@167 2041 [Whether dlopen of statically linked programs is supported])
cannam@167 2042 ])# LT_SYS_DLOPEN_SELF
cannam@167 2043
cannam@167 2044 # Old name:
cannam@167 2045 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
cannam@167 2046 dnl aclocal-1.4 backwards compatibility:
cannam@167 2047 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
cannam@167 2048
cannam@167 2049
cannam@167 2050 # _LT_COMPILER_C_O([TAGNAME])
cannam@167 2051 # ---------------------------
cannam@167 2052 # Check to see if options -c and -o are simultaneously supported by compiler.
cannam@167 2053 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
cannam@167 2054 m4_defun([_LT_COMPILER_C_O],
cannam@167 2055 [m4_require([_LT_DECL_SED])dnl
cannam@167 2056 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@167 2057 m4_require([_LT_TAG_COMPILER])dnl
cannam@167 2058 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
cannam@167 2059 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
cannam@167 2060 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
cannam@167 2061 $RM -r conftest 2>/dev/null
cannam@167 2062 mkdir conftest
cannam@167 2063 cd conftest
cannam@167 2064 mkdir out
cannam@167 2065 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
cannam@167 2066
cannam@167 2067 lt_compiler_flag="-o out/conftest2.$ac_objext"
cannam@167 2068 # Insert the option either (1) after the last *FLAGS variable, or
cannam@167 2069 # (2) before a word containing "conftest.", or (3) at the end.
cannam@167 2070 # Note that $ac_compile itself does not contain backslashes and begins
cannam@167 2071 # with a dollar sign (not a hyphen), so the echo should work correctly.
cannam@167 2072 lt_compile=`echo "$ac_compile" | $SED \
cannam@167 2073 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
cannam@167 2074 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
cannam@167 2075 -e 's:$: $lt_compiler_flag:'`
cannam@167 2076 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
cannam@167 2077 (eval "$lt_compile" 2>out/conftest.err)
cannam@167 2078 ac_status=$?
cannam@167 2079 cat out/conftest.err >&AS_MESSAGE_LOG_FD
cannam@167 2080 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
cannam@167 2081 if (exit $ac_status) && test -s out/conftest2.$ac_objext
cannam@167 2082 then
cannam@167 2083 # The compiler can only warn and ignore the option if not recognized
cannam@167 2084 # So say no if there are warnings
cannam@167 2085 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
cannam@167 2086 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
cannam@167 2087 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
cannam@167 2088 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
cannam@167 2089 fi
cannam@167 2090 fi
cannam@167 2091 chmod u+w . 2>&AS_MESSAGE_LOG_FD
cannam@167 2092 $RM conftest*
cannam@167 2093 # SGI C++ compiler will create directory out/ii_files/ for
cannam@167 2094 # template instantiation
cannam@167 2095 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
cannam@167 2096 $RM out/* && rmdir out
cannam@167 2097 cd ..
cannam@167 2098 $RM -r conftest
cannam@167 2099 $RM conftest*
cannam@167 2100 ])
cannam@167 2101 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
cannam@167 2102 [Does compiler simultaneously support -c and -o options?])
cannam@167 2103 ])# _LT_COMPILER_C_O
cannam@167 2104
cannam@167 2105
cannam@167 2106 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
cannam@167 2107 # ----------------------------------
cannam@167 2108 # Check to see if we can do hard links to lock some files if needed
cannam@167 2109 m4_defun([_LT_COMPILER_FILE_LOCKS],
cannam@167 2110 [m4_require([_LT_ENABLE_LOCK])dnl
cannam@167 2111 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@167 2112 _LT_COMPILER_C_O([$1])
cannam@167 2113
cannam@167 2114 hard_links=nottested
cannam@167 2115 if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
cannam@167 2116 # do not overwrite the value of need_locks provided by the user
cannam@167 2117 AC_MSG_CHECKING([if we can lock with hard links])
cannam@167 2118 hard_links=yes
cannam@167 2119 $RM conftest*
cannam@167 2120 ln conftest.a conftest.b 2>/dev/null && hard_links=no
cannam@167 2121 touch conftest.a
cannam@167 2122 ln conftest.a conftest.b 2>&5 || hard_links=no
cannam@167 2123 ln conftest.a conftest.b 2>/dev/null && hard_links=no
cannam@167 2124 AC_MSG_RESULT([$hard_links])
cannam@167 2125 if test no = "$hard_links"; then
cannam@167 2126 AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
cannam@167 2127 need_locks=warn
cannam@167 2128 fi
cannam@167 2129 else
cannam@167 2130 need_locks=no
cannam@167 2131 fi
cannam@167 2132 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
cannam@167 2133 ])# _LT_COMPILER_FILE_LOCKS
cannam@167 2134
cannam@167 2135
cannam@167 2136 # _LT_CHECK_OBJDIR
cannam@167 2137 # ----------------
cannam@167 2138 m4_defun([_LT_CHECK_OBJDIR],
cannam@167 2139 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
cannam@167 2140 [rm -f .libs 2>/dev/null
cannam@167 2141 mkdir .libs 2>/dev/null
cannam@167 2142 if test -d .libs; then
cannam@167 2143 lt_cv_objdir=.libs
cannam@167 2144 else
cannam@167 2145 # MS-DOS does not allow filenames that begin with a dot.
cannam@167 2146 lt_cv_objdir=_libs
cannam@167 2147 fi
cannam@167 2148 rmdir .libs 2>/dev/null])
cannam@167 2149 objdir=$lt_cv_objdir
cannam@167 2150 _LT_DECL([], [objdir], [0],
cannam@167 2151 [The name of the directory that contains temporary libtool files])dnl
cannam@167 2152 m4_pattern_allow([LT_OBJDIR])dnl
cannam@167 2153 AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
cannam@167 2154 [Define to the sub-directory where libtool stores uninstalled libraries.])
cannam@167 2155 ])# _LT_CHECK_OBJDIR
cannam@167 2156
cannam@167 2157
cannam@167 2158 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
cannam@167 2159 # --------------------------------------
cannam@167 2160 # Check hardcoding attributes.
cannam@167 2161 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
cannam@167 2162 [AC_MSG_CHECKING([how to hardcode library paths into programs])
cannam@167 2163 _LT_TAGVAR(hardcode_action, $1)=
cannam@167 2164 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
cannam@167 2165 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
cannam@167 2166 test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
cannam@167 2167
cannam@167 2168 # We can hardcode non-existent directories.
cannam@167 2169 if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
cannam@167 2170 # If the only mechanism to avoid hardcoding is shlibpath_var, we
cannam@167 2171 # have to relink, otherwise we might link with an installed library
cannam@167 2172 # when we should be linking with a yet-to-be-installed one
cannam@167 2173 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
cannam@167 2174 test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
cannam@167 2175 # Linking always hardcodes the temporary library directory.
cannam@167 2176 _LT_TAGVAR(hardcode_action, $1)=relink
cannam@167 2177 else
cannam@167 2178 # We can link without hardcoding, and we can hardcode nonexisting dirs.
cannam@167 2179 _LT_TAGVAR(hardcode_action, $1)=immediate
cannam@167 2180 fi
cannam@167 2181 else
cannam@167 2182 # We cannot hardcode anything, or else we can only hardcode existing
cannam@167 2183 # directories.
cannam@167 2184 _LT_TAGVAR(hardcode_action, $1)=unsupported
cannam@167 2185 fi
cannam@167 2186 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
cannam@167 2187
cannam@167 2188 if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
cannam@167 2189 test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
cannam@167 2190 # Fast installation is not supported
cannam@167 2191 enable_fast_install=no
cannam@167 2192 elif test yes = "$shlibpath_overrides_runpath" ||
cannam@167 2193 test no = "$enable_shared"; then
cannam@167 2194 # Fast installation is not necessary
cannam@167 2195 enable_fast_install=needless
cannam@167 2196 fi
cannam@167 2197 _LT_TAGDECL([], [hardcode_action], [0],
cannam@167 2198 [How to hardcode a shared library path into an executable])
cannam@167 2199 ])# _LT_LINKER_HARDCODE_LIBPATH
cannam@167 2200
cannam@167 2201
cannam@167 2202 # _LT_CMD_STRIPLIB
cannam@167 2203 # ----------------
cannam@167 2204 m4_defun([_LT_CMD_STRIPLIB],
cannam@167 2205 [m4_require([_LT_DECL_EGREP])
cannam@167 2206 striplib=
cannam@167 2207 old_striplib=
cannam@167 2208 AC_MSG_CHECKING([whether stripping libraries is possible])
cannam@167 2209 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
cannam@167 2210 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
cannam@167 2211 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
cannam@167 2212 AC_MSG_RESULT([yes])
cannam@167 2213 else
cannam@167 2214 # FIXME - insert some real tests, host_os isn't really good enough
cannam@167 2215 case $host_os in
cannam@167 2216 darwin*)
cannam@167 2217 if test -n "$STRIP"; then
cannam@167 2218 striplib="$STRIP -x"
cannam@167 2219 old_striplib="$STRIP -S"
cannam@167 2220 AC_MSG_RESULT([yes])
cannam@167 2221 else
cannam@167 2222 AC_MSG_RESULT([no])
cannam@167 2223 fi
cannam@167 2224 ;;
cannam@167 2225 *)
cannam@167 2226 AC_MSG_RESULT([no])
cannam@167 2227 ;;
cannam@167 2228 esac
cannam@167 2229 fi
cannam@167 2230 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
cannam@167 2231 _LT_DECL([], [striplib], [1])
cannam@167 2232 ])# _LT_CMD_STRIPLIB
cannam@167 2233
cannam@167 2234
cannam@167 2235 # _LT_PREPARE_MUNGE_PATH_LIST
cannam@167 2236 # ---------------------------
cannam@167 2237 # Make sure func_munge_path_list() is defined correctly.
cannam@167 2238 m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
cannam@167 2239 [[# func_munge_path_list VARIABLE PATH
cannam@167 2240 # -----------------------------------
cannam@167 2241 # VARIABLE is name of variable containing _space_ separated list of
cannam@167 2242 # directories to be munged by the contents of PATH, which is string
cannam@167 2243 # having a format:
cannam@167 2244 # "DIR[:DIR]:"
cannam@167 2245 # string "DIR[ DIR]" will be prepended to VARIABLE
cannam@167 2246 # ":DIR[:DIR]"
cannam@167 2247 # string "DIR[ DIR]" will be appended to VARIABLE
cannam@167 2248 # "DIRP[:DIRP]::[DIRA:]DIRA"
cannam@167 2249 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
cannam@167 2250 # "DIRA[ DIRA]" will be appended to VARIABLE
cannam@167 2251 # "DIR[:DIR]"
cannam@167 2252 # VARIABLE will be replaced by "DIR[ DIR]"
cannam@167 2253 func_munge_path_list ()
cannam@167 2254 {
cannam@167 2255 case x@S|@2 in
cannam@167 2256 x)
cannam@167 2257 ;;
cannam@167 2258 *:)
cannam@167 2259 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
cannam@167 2260 ;;
cannam@167 2261 x:*)
cannam@167 2262 eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
cannam@167 2263 ;;
cannam@167 2264 *::*)
cannam@167 2265 eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
cannam@167 2266 eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
cannam@167 2267 ;;
cannam@167 2268 *)
cannam@167 2269 eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
cannam@167 2270 ;;
cannam@167 2271 esac
cannam@167 2272 }
cannam@167 2273 ]])# _LT_PREPARE_PATH_LIST
cannam@167 2274
cannam@167 2275
cannam@167 2276 # _LT_SYS_DYNAMIC_LINKER([TAG])
cannam@167 2277 # -----------------------------
cannam@167 2278 # PORTME Fill in your ld.so characteristics
cannam@167 2279 m4_defun([_LT_SYS_DYNAMIC_LINKER],
cannam@167 2280 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
cannam@167 2281 m4_require([_LT_DECL_EGREP])dnl
cannam@167 2282 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@167 2283 m4_require([_LT_DECL_OBJDUMP])dnl
cannam@167 2284 m4_require([_LT_DECL_SED])dnl
cannam@167 2285 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
cannam@167 2286 m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
cannam@167 2287 AC_MSG_CHECKING([dynamic linker characteristics])
cannam@167 2288 m4_if([$1],
cannam@167 2289 [], [
cannam@167 2290 if test yes = "$GCC"; then
cannam@167 2291 case $host_os in
cannam@167 2292 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
cannam@167 2293 *) lt_awk_arg='/^libraries:/' ;;
cannam@167 2294 esac
cannam@167 2295 case $host_os in
cannam@167 2296 mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
cannam@167 2297 *) lt_sed_strip_eq='s|=/|/|g' ;;
cannam@167 2298 esac
cannam@167 2299 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
cannam@167 2300 case $lt_search_path_spec in
cannam@167 2301 *\;*)
cannam@167 2302 # if the path contains ";" then we assume it to be the separator
cannam@167 2303 # otherwise default to the standard path separator (i.e. ":") - it is
cannam@167 2304 # assumed that no part of a normal pathname contains ";" but that should
cannam@167 2305 # okay in the real world where ";" in dirpaths is itself problematic.
cannam@167 2306 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
cannam@167 2307 ;;
cannam@167 2308 *)
cannam@167 2309 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
cannam@167 2310 ;;
cannam@167 2311 esac
cannam@167 2312 # Ok, now we have the path, separated by spaces, we can step through it
cannam@167 2313 # and add multilib dir if necessary...
cannam@167 2314 lt_tmp_lt_search_path_spec=
cannam@167 2315 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
cannam@167 2316 # ...but if some path component already ends with the multilib dir we assume
cannam@167 2317 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
cannam@167 2318 case "$lt_multi_os_dir; $lt_search_path_spec " in
cannam@167 2319 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
cannam@167 2320 lt_multi_os_dir=
cannam@167 2321 ;;
cannam@167 2322 esac
cannam@167 2323 for lt_sys_path in $lt_search_path_spec; do
cannam@167 2324 if test -d "$lt_sys_path$lt_multi_os_dir"; then
cannam@167 2325 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
cannam@167 2326 elif test -n "$lt_multi_os_dir"; then
cannam@167 2327 test -d "$lt_sys_path" && \
cannam@167 2328 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
cannam@167 2329 fi
cannam@167 2330 done
cannam@167 2331 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
cannam@167 2332 BEGIN {RS = " "; FS = "/|\n";} {
cannam@167 2333 lt_foo = "";
cannam@167 2334 lt_count = 0;
cannam@167 2335 for (lt_i = NF; lt_i > 0; lt_i--) {
cannam@167 2336 if ($lt_i != "" && $lt_i != ".") {
cannam@167 2337 if ($lt_i == "..") {
cannam@167 2338 lt_count++;
cannam@167 2339 } else {
cannam@167 2340 if (lt_count == 0) {
cannam@167 2341 lt_foo = "/" $lt_i lt_foo;
cannam@167 2342 } else {
cannam@167 2343 lt_count--;
cannam@167 2344 }
cannam@167 2345 }
cannam@167 2346 }
cannam@167 2347 }
cannam@167 2348 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
cannam@167 2349 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
cannam@167 2350 }'`
cannam@167 2351 # AWK program above erroneously prepends '/' to C:/dos/paths
cannam@167 2352 # for these hosts.
cannam@167 2353 case $host_os in
cannam@167 2354 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
cannam@167 2355 $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
cannam@167 2356 esac
cannam@167 2357 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
cannam@167 2358 else
cannam@167 2359 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
cannam@167 2360 fi])
cannam@167 2361 library_names_spec=
cannam@167 2362 libname_spec='lib$name'
cannam@167 2363 soname_spec=
cannam@167 2364 shrext_cmds=.so
cannam@167 2365 postinstall_cmds=
cannam@167 2366 postuninstall_cmds=
cannam@167 2367 finish_cmds=
cannam@167 2368 finish_eval=
cannam@167 2369 shlibpath_var=
cannam@167 2370 shlibpath_overrides_runpath=unknown
cannam@167 2371 version_type=none
cannam@167 2372 dynamic_linker="$host_os ld.so"
cannam@167 2373 sys_lib_dlsearch_path_spec="/lib /usr/lib"
cannam@167 2374 need_lib_prefix=unknown
cannam@167 2375 hardcode_into_libs=no
cannam@167 2376
cannam@167 2377 # when you set need_version to no, make sure it does not cause -set_version
cannam@167 2378 # flags to be left without arguments
cannam@167 2379 need_version=unknown
cannam@167 2380
cannam@167 2381 AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
cannam@167 2382 [User-defined run-time library search path.])
cannam@167 2383
cannam@167 2384 case $host_os in
cannam@167 2385 aix3*)
cannam@167 2386 version_type=linux # correct to gnu/linux during the next big refactor
cannam@167 2387 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
cannam@167 2388 shlibpath_var=LIBPATH
cannam@167 2389
cannam@167 2390 # AIX 3 has no versioning support, so we append a major version to the name.
cannam@167 2391 soname_spec='$libname$release$shared_ext$major'
cannam@167 2392 ;;
cannam@167 2393
cannam@167 2394 aix[[4-9]]*)
cannam@167 2395 version_type=linux # correct to gnu/linux during the next big refactor
cannam@167 2396 need_lib_prefix=no
cannam@167 2397 need_version=no
cannam@167 2398 hardcode_into_libs=yes
cannam@167 2399 if test ia64 = "$host_cpu"; then
cannam@167 2400 # AIX 5 supports IA64
cannam@167 2401 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
cannam@167 2402 shlibpath_var=LD_LIBRARY_PATH
cannam@167 2403 else
cannam@167 2404 # With GCC up to 2.95.x, collect2 would create an import file
cannam@167 2405 # for dependence libraries. The import file would start with
cannam@167 2406 # the line '#! .'. This would cause the generated library to
cannam@167 2407 # depend on '.', always an invalid library. This was fixed in
cannam@167 2408 # development snapshots of GCC prior to 3.0.
cannam@167 2409 case $host_os in
cannam@167 2410 aix4 | aix4.[[01]] | aix4.[[01]].*)
cannam@167 2411 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
cannam@167 2412 echo ' yes '
cannam@167 2413 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
cannam@167 2414 :
cannam@167 2415 else
cannam@167 2416 can_build_shared=no
cannam@167 2417 fi
cannam@167 2418 ;;
cannam@167 2419 esac
cannam@167 2420 # Using Import Files as archive members, it is possible to support
cannam@167 2421 # filename-based versioning of shared library archives on AIX. While
cannam@167 2422 # this would work for both with and without runtime linking, it will
cannam@167 2423 # prevent static linking of such archives. So we do filename-based
cannam@167 2424 # shared library versioning with .so extension only, which is used
cannam@167 2425 # when both runtime linking and shared linking is enabled.
cannam@167 2426 # Unfortunately, runtime linking may impact performance, so we do
cannam@167 2427 # not want this to be the default eventually. Also, we use the
cannam@167 2428 # versioned .so libs for executables only if there is the -brtl
cannam@167 2429 # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
cannam@167 2430 # To allow for filename-based versioning support, we need to create
cannam@167 2431 # libNAME.so.V as an archive file, containing:
cannam@167 2432 # *) an Import File, referring to the versioned filename of the
cannam@167 2433 # archive as well as the shared archive member, telling the
cannam@167 2434 # bitwidth (32 or 64) of that shared object, and providing the
cannam@167 2435 # list of exported symbols of that shared object, eventually
cannam@167 2436 # decorated with the 'weak' keyword
cannam@167 2437 # *) the shared object with the F_LOADONLY flag set, to really avoid
cannam@167 2438 # it being seen by the linker.
cannam@167 2439 # At run time we better use the real file rather than another symlink,
cannam@167 2440 # but for link time we create the symlink libNAME.so -> libNAME.so.V
cannam@167 2441
cannam@167 2442 case $with_aix_soname,$aix_use_runtimelinking in
cannam@167 2443 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
cannam@167 2444 # soname into executable. Probably we can add versioning support to
cannam@167 2445 # collect2, so additional links can be useful in future.
cannam@167 2446 aix,yes) # traditional libtool
cannam@167 2447 dynamic_linker='AIX unversionable lib.so'
cannam@167 2448 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
cannam@167 2449 # instead of lib<name>.a to let people know that these are not
cannam@167 2450 # typical AIX shared libraries.
cannam@167 2451 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@167 2452 ;;
cannam@167 2453 aix,no) # traditional AIX only
cannam@167 2454 dynamic_linker='AIX lib.a[(]lib.so.V[)]'
cannam@167 2455 # We preserve .a as extension for shared libraries through AIX4.2
cannam@167 2456 # and later when we are not doing run time linking.
cannam@167 2457 library_names_spec='$libname$release.a $libname.a'
cannam@167 2458 soname_spec='$libname$release$shared_ext$major'
cannam@167 2459 ;;
cannam@167 2460 svr4,*) # full svr4 only
cannam@167 2461 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
cannam@167 2462 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
cannam@167 2463 # We do not specify a path in Import Files, so LIBPATH fires.
cannam@167 2464 shlibpath_overrides_runpath=yes
cannam@167 2465 ;;
cannam@167 2466 *,yes) # both, prefer svr4
cannam@167 2467 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
cannam@167 2468 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
cannam@167 2469 # unpreferred sharedlib libNAME.a needs extra handling
cannam@167 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@167 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@167 2472 # We do not specify a path in Import Files, so LIBPATH fires.
cannam@167 2473 shlibpath_overrides_runpath=yes
cannam@167 2474 ;;
cannam@167 2475 *,no) # both, prefer aix
cannam@167 2476 dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
cannam@167 2477 library_names_spec='$libname$release.a $libname.a'
cannam@167 2478 soname_spec='$libname$release$shared_ext$major'
cannam@167 2479 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
cannam@167 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@167 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@167 2482 ;;
cannam@167 2483 esac
cannam@167 2484 shlibpath_var=LIBPATH
cannam@167 2485 fi
cannam@167 2486 ;;
cannam@167 2487
cannam@167 2488 amigaos*)
cannam@167 2489 case $host_cpu in
cannam@167 2490 powerpc)
cannam@167 2491 # Since July 2007 AmigaOS4 officially supports .so libraries.
cannam@167 2492 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
cannam@167 2493 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@167 2494 ;;
cannam@167 2495 m68k)
cannam@167 2496 library_names_spec='$libname.ixlibrary $libname.a'
cannam@167 2497 # Create ${libname}_ixlibrary.a entries in /sys/libs.
cannam@167 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@167 2499 ;;
cannam@167 2500 esac
cannam@167 2501 ;;
cannam@167 2502
cannam@167 2503 beos*)
cannam@167 2504 library_names_spec='$libname$shared_ext'
cannam@167 2505 dynamic_linker="$host_os ld.so"
cannam@167 2506 shlibpath_var=LIBRARY_PATH
cannam@167 2507 ;;
cannam@167 2508
cannam@167 2509 bsdi[[45]]*)
cannam@167 2510 version_type=linux # correct to gnu/linux during the next big refactor
cannam@167 2511 need_version=no
cannam@167 2512 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@167 2513 soname_spec='$libname$release$shared_ext$major'
cannam@167 2514 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
cannam@167 2515 shlibpath_var=LD_LIBRARY_PATH
cannam@167 2516 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
cannam@167 2517 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
cannam@167 2518 # the default ld.so.conf also contains /usr/contrib/lib and
cannam@167 2519 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
cannam@167 2520 # libtool to hard-code these into programs
cannam@167 2521 ;;
cannam@167 2522
cannam@167 2523 cygwin* | mingw* | pw32* | cegcc*)
cannam@167 2524 version_type=windows
cannam@167 2525 shrext_cmds=.dll
cannam@167 2526 need_version=no
cannam@167 2527 need_lib_prefix=no
cannam@167 2528
cannam@167 2529 case $GCC,$cc_basename in
cannam@167 2530 yes,*)
cannam@167 2531 # gcc
cannam@167 2532 library_names_spec='$libname.dll.a'
cannam@167 2533 # DLL is installed to $(libdir)/../bin by postinstall_cmds
cannam@167 2534 postinstall_cmds='base_file=`basename \$file`~
cannam@167 2535 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
cannam@167 2536 dldir=$destdir/`dirname \$dlpath`~
cannam@167 2537 test -d \$dldir || mkdir -p \$dldir~
cannam@167 2538 $install_prog $dir/$dlname \$dldir/$dlname~
cannam@167 2539 chmod a+x \$dldir/$dlname~
cannam@167 2540 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
cannam@167 2541 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
cannam@167 2542 fi'
cannam@167 2543 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
cannam@167 2544 dlpath=$dir/\$dldll~
cannam@167 2545 $RM \$dlpath'
cannam@167 2546 shlibpath_overrides_runpath=yes
cannam@167 2547
cannam@167 2548 case $host_os in
cannam@167 2549 cygwin*)
cannam@167 2550 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
cannam@167 2551 soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
cannam@167 2552 m4_if([$1], [],[
cannam@167 2553 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
cannam@167 2554 ;;
cannam@167 2555 mingw* | cegcc*)
cannam@167 2556 # MinGW DLLs use traditional 'lib' prefix
cannam@167 2557 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
cannam@167 2558 ;;
cannam@167 2559 pw32*)
cannam@167 2560 # pw32 DLLs use 'pw' prefix rather than 'lib'
cannam@167 2561 library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
cannam@167 2562 ;;
cannam@167 2563 esac
cannam@167 2564 dynamic_linker='Win32 ld.exe'
cannam@167 2565 ;;
cannam@167 2566
cannam@167 2567 *,cl*)
cannam@167 2568 # Native MSVC
cannam@167 2569 libname_spec='$name'
cannam@167 2570 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
cannam@167 2571 library_names_spec='$libname.dll.lib'
cannam@167 2572
cannam@167 2573 case $build_os in
cannam@167 2574 mingw*)
cannam@167 2575 sys_lib_search_path_spec=
cannam@167 2576 lt_save_ifs=$IFS
cannam@167 2577 IFS=';'
cannam@167 2578 for lt_path in $LIB
cannam@167 2579 do
cannam@167 2580 IFS=$lt_save_ifs
cannam@167 2581 # Let DOS variable expansion print the short 8.3 style file name.
cannam@167 2582 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
cannam@167 2583 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
cannam@167 2584 done
cannam@167 2585 IFS=$lt_save_ifs
cannam@167 2586 # Convert to MSYS style.
cannam@167 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@167 2588 ;;
cannam@167 2589 cygwin*)
cannam@167 2590 # Convert to unix form, then to dos form, then back to unix form
cannam@167 2591 # but this time dos style (no spaces!) so that the unix form looks
cannam@167 2592 # like /cygdrive/c/PROGRA~1:/cygdr...
cannam@167 2593 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
cannam@167 2594 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
cannam@167 2595 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
cannam@167 2596 ;;
cannam@167 2597 *)
cannam@167 2598 sys_lib_search_path_spec=$LIB
cannam@167 2599 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
cannam@167 2600 # It is most probably a Windows format PATH.
cannam@167 2601 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
cannam@167 2602 else
cannam@167 2603 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
cannam@167 2604 fi
cannam@167 2605 # FIXME: find the short name or the path components, as spaces are
cannam@167 2606 # common. (e.g. "Program Files" -> "PROGRA~1")
cannam@167 2607 ;;
cannam@167 2608 esac
cannam@167 2609
cannam@167 2610 # DLL is installed to $(libdir)/../bin by postinstall_cmds
cannam@167 2611 postinstall_cmds='base_file=`basename \$file`~
cannam@167 2612 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
cannam@167 2613 dldir=$destdir/`dirname \$dlpath`~
cannam@167 2614 test -d \$dldir || mkdir -p \$dldir~
cannam@167 2615 $install_prog $dir/$dlname \$dldir/$dlname'
cannam@167 2616 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
cannam@167 2617 dlpath=$dir/\$dldll~
cannam@167 2618 $RM \$dlpath'
cannam@167 2619 shlibpath_overrides_runpath=yes
cannam@167 2620 dynamic_linker='Win32 link.exe'
cannam@167 2621 ;;
cannam@167 2622
cannam@167 2623 *)
cannam@167 2624 # Assume MSVC wrapper
cannam@167 2625 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
cannam@167 2626 dynamic_linker='Win32 ld.exe'
cannam@167 2627 ;;
cannam@167 2628 esac
cannam@167 2629 # FIXME: first we should search . and the directory the executable is in
cannam@167 2630 shlibpath_var=PATH
cannam@167 2631 ;;
cannam@167 2632
cannam@167 2633 darwin* | rhapsody*)
cannam@167 2634 dynamic_linker="$host_os dyld"
cannam@167 2635 version_type=darwin
cannam@167 2636 need_lib_prefix=no
cannam@167 2637 need_version=no
cannam@167 2638 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
cannam@167 2639 soname_spec='$libname$release$major$shared_ext'
cannam@167 2640 shlibpath_overrides_runpath=yes
cannam@167 2641 shlibpath_var=DYLD_LIBRARY_PATH
cannam@167 2642 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
cannam@167 2643 m4_if([$1], [],[
cannam@167 2644 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
cannam@167 2645 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
cannam@167 2646 ;;
cannam@167 2647
cannam@167 2648 dgux*)
cannam@167 2649 version_type=linux # correct to gnu/linux during the next big refactor
cannam@167 2650 need_lib_prefix=no
cannam@167 2651 need_version=no
cannam@167 2652 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@167 2653 soname_spec='$libname$release$shared_ext$major'
cannam@167 2654 shlibpath_var=LD_LIBRARY_PATH
cannam@167 2655 ;;
cannam@167 2656
cannam@167 2657 freebsd* | dragonfly*)
cannam@167 2658 # DragonFly does not have aout. When/if they implement a new
cannam@167 2659 # versioning mechanism, adjust this.
cannam@167 2660 if test -x /usr/bin/objformat; then
cannam@167 2661 objformat=`/usr/bin/objformat`
cannam@167 2662 else
cannam@167 2663 case $host_os in
cannam@167 2664 freebsd[[23]].*) objformat=aout ;;
cannam@167 2665 *) objformat=elf ;;
cannam@167 2666 esac
cannam@167 2667 fi
cannam@167 2668 version_type=freebsd-$objformat
cannam@167 2669 case $version_type in
cannam@167 2670 freebsd-elf*)
cannam@167 2671 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@167 2672 soname_spec='$libname$release$shared_ext$major'
cannam@167 2673 need_version=no
cannam@167 2674 need_lib_prefix=no
cannam@167 2675 ;;
cannam@167 2676 freebsd-*)
cannam@167 2677 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
cannam@167 2678 need_version=yes
cannam@167 2679 ;;
cannam@167 2680 esac
cannam@167 2681 shlibpath_var=LD_LIBRARY_PATH
cannam@167 2682 case $host_os in
cannam@167 2683 freebsd2.*)
cannam@167 2684 shlibpath_overrides_runpath=yes
cannam@167 2685 ;;
cannam@167 2686 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
cannam@167 2687 shlibpath_overrides_runpath=yes
cannam@167 2688 hardcode_into_libs=yes
cannam@167 2689 ;;
cannam@167 2690 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
cannam@167 2691 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
cannam@167 2692 shlibpath_overrides_runpath=no
cannam@167 2693 hardcode_into_libs=yes
cannam@167 2694 ;;
cannam@167 2695 *) # from 4.6 on, and DragonFly
cannam@167 2696 shlibpath_overrides_runpath=yes
cannam@167 2697 hardcode_into_libs=yes
cannam@167 2698 ;;
cannam@167 2699 esac
cannam@167 2700 ;;
cannam@167 2701
cannam@167 2702 haiku*)
cannam@167 2703 version_type=linux # correct to gnu/linux during the next big refactor
cannam@167 2704 need_lib_prefix=no
cannam@167 2705 need_version=no
cannam@167 2706 dynamic_linker="$host_os runtime_loader"
cannam@167 2707 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@167 2708 soname_spec='$libname$release$shared_ext$major'
cannam@167 2709 shlibpath_var=LIBRARY_PATH
cannam@167 2710 shlibpath_overrides_runpath=no
cannam@167 2711 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
cannam@167 2712 hardcode_into_libs=yes
cannam@167 2713 ;;
cannam@167 2714
cannam@167 2715 hpux9* | hpux10* | hpux11*)
cannam@167 2716 # Give a soname corresponding to the major version so that dld.sl refuses to
cannam@167 2717 # link against other versions.
cannam@167 2718 version_type=sunos
cannam@167 2719 need_lib_prefix=no
cannam@167 2720 need_version=no
cannam@167 2721 case $host_cpu in
cannam@167 2722 ia64*)
cannam@167 2723 shrext_cmds='.so'
cannam@167 2724 hardcode_into_libs=yes
cannam@167 2725 dynamic_linker="$host_os dld.so"
cannam@167 2726 shlibpath_var=LD_LIBRARY_PATH
cannam@167 2727 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
cannam@167 2728 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@167 2729 soname_spec='$libname$release$shared_ext$major'
cannam@167 2730 if test 32 = "$HPUX_IA64_MODE"; then
cannam@167 2731 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
cannam@167 2732 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
cannam@167 2733 else
cannam@167 2734 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
cannam@167 2735 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
cannam@167 2736 fi
cannam@167 2737 ;;
cannam@167 2738 hppa*64*)
cannam@167 2739 shrext_cmds='.sl'
cannam@167 2740 hardcode_into_libs=yes
cannam@167 2741 dynamic_linker="$host_os dld.sl"
cannam@167 2742 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
cannam@167 2743 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
cannam@167 2744 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@167 2745 soname_spec='$libname$release$shared_ext$major'
cannam@167 2746 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
cannam@167 2747 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
cannam@167 2748 ;;
cannam@167 2749 *)
cannam@167 2750 shrext_cmds='.sl'
cannam@167 2751 dynamic_linker="$host_os dld.sl"
cannam@167 2752 shlibpath_var=SHLIB_PATH
cannam@167 2753 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
cannam@167 2754 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@167 2755 soname_spec='$libname$release$shared_ext$major'
cannam@167 2756 ;;
cannam@167 2757 esac
cannam@167 2758 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
cannam@167 2759 postinstall_cmds='chmod 555 $lib'
cannam@167 2760 # or fails outright, so override atomically:
cannam@167 2761 install_override_mode=555
cannam@167 2762 ;;
cannam@167 2763
cannam@167 2764 interix[[3-9]]*)
cannam@167 2765 version_type=linux # correct to gnu/linux during the next big refactor
cannam@167 2766 need_lib_prefix=no
cannam@167 2767 need_version=no
cannam@167 2768 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@167 2769 soname_spec='$libname$release$shared_ext$major'
cannam@167 2770 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
cannam@167 2771 shlibpath_var=LD_LIBRARY_PATH
cannam@167 2772 shlibpath_overrides_runpath=no
cannam@167 2773 hardcode_into_libs=yes
cannam@167 2774 ;;
cannam@167 2775
cannam@167 2776 irix5* | irix6* | nonstopux*)
cannam@167 2777 case $host_os in
cannam@167 2778 nonstopux*) version_type=nonstopux ;;
cannam@167 2779 *)
cannam@167 2780 if test yes = "$lt_cv_prog_gnu_ld"; then
cannam@167 2781 version_type=linux # correct to gnu/linux during the next big refactor
cannam@167 2782 else
cannam@167 2783 version_type=irix
cannam@167 2784 fi ;;
cannam@167 2785 esac
cannam@167 2786 need_lib_prefix=no
cannam@167 2787 need_version=no
cannam@167 2788 soname_spec='$libname$release$shared_ext$major'
cannam@167 2789 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
cannam@167 2790 case $host_os in
cannam@167 2791 irix5* | nonstopux*)
cannam@167 2792 libsuff= shlibsuff=
cannam@167 2793 ;;
cannam@167 2794 *)
cannam@167 2795 case $LD in # libtool.m4 will add one of these switches to LD
cannam@167 2796 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
cannam@167 2797 libsuff= shlibsuff= libmagic=32-bit;;
cannam@167 2798 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
cannam@167 2799 libsuff=32 shlibsuff=N32 libmagic=N32;;
cannam@167 2800 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
cannam@167 2801 libsuff=64 shlibsuff=64 libmagic=64-bit;;
cannam@167 2802 *) libsuff= shlibsuff= libmagic=never-match;;
cannam@167 2803 esac
cannam@167 2804 ;;
cannam@167 2805 esac
cannam@167 2806 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
cannam@167 2807 shlibpath_overrides_runpath=no
cannam@167 2808 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
cannam@167 2809 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
cannam@167 2810 hardcode_into_libs=yes
cannam@167 2811 ;;
cannam@167 2812
cannam@167 2813 # No shared lib support for Linux oldld, aout, or coff.
cannam@167 2814 linux*oldld* | linux*aout* | linux*coff*)
cannam@167 2815 dynamic_linker=no
cannam@167 2816 ;;
cannam@167 2817
cannam@167 2818 linux*android*)
cannam@167 2819 version_type=none # Android doesn't support versioned libraries.
cannam@167 2820 need_lib_prefix=no
cannam@167 2821 need_version=no
cannam@167 2822 library_names_spec='$libname$release$shared_ext'
cannam@167 2823 soname_spec='$libname$release$shared_ext'
cannam@167 2824 finish_cmds=
cannam@167 2825 shlibpath_var=LD_LIBRARY_PATH
cannam@167 2826 shlibpath_overrides_runpath=yes
cannam@167 2827
cannam@167 2828 # This implies no fast_install, which is unacceptable.
cannam@167 2829 # Some rework will be needed to allow for fast_install
cannam@167 2830 # before this can be enabled.
cannam@167 2831 hardcode_into_libs=yes
cannam@167 2832
cannam@167 2833 dynamic_linker='Android linker'
cannam@167 2834 # Don't embed -rpath directories since the linker doesn't support them.
cannam@167 2835 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@167 2836 ;;
cannam@167 2837
cannam@167 2838 # This must be glibc/ELF.
cannam@167 2839 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
cannam@167 2840 version_type=linux # correct to gnu/linux during the next big refactor
cannam@167 2841 need_lib_prefix=no
cannam@167 2842 need_version=no
cannam@167 2843 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@167 2844 soname_spec='$libname$release$shared_ext$major'
cannam@167 2845 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
cannam@167 2846 shlibpath_var=LD_LIBRARY_PATH
cannam@167 2847 shlibpath_overrides_runpath=no
cannam@167 2848
cannam@167 2849 # Some binutils ld are patched to set DT_RUNPATH
cannam@167 2850 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
cannam@167 2851 [lt_cv_shlibpath_overrides_runpath=no
cannam@167 2852 save_LDFLAGS=$LDFLAGS
cannam@167 2853 save_libdir=$libdir
cannam@167 2854 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
cannam@167 2855 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
cannam@167 2856 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
cannam@167 2857 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
cannam@167 2858 [lt_cv_shlibpath_overrides_runpath=yes])])
cannam@167 2859 LDFLAGS=$save_LDFLAGS
cannam@167 2860 libdir=$save_libdir
cannam@167 2861 ])
cannam@167 2862 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
cannam@167 2863
cannam@167 2864 # This implies no fast_install, which is unacceptable.
cannam@167 2865 # Some rework will be needed to allow for fast_install
cannam@167 2866 # before this can be enabled.
cannam@167 2867 hardcode_into_libs=yes
cannam@167 2868
cannam@167 2869 # Ideally, we could use ldconfig to report *all* directores which are
cannam@167 2870 # searched for libraries, however this is still not possible. Aside from not
cannam@167 2871 # being certain /sbin/ldconfig is available, command
cannam@167 2872 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
cannam@167 2873 # even though it is searched at run-time. Try to do the best guess by
cannam@167 2874 # appending ld.so.conf contents (and includes) to the search path.
cannam@167 2875 if test -f /etc/ld.so.conf; then
cannam@167 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@167 2877 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
cannam@167 2878 fi
cannam@167 2879
cannam@167 2880 # We used to test for /lib/ld.so.1 and disable shared libraries on
cannam@167 2881 # powerpc, because MkLinux only supported shared libraries with the
cannam@167 2882 # GNU dynamic linker. Since this was broken with cross compilers,
cannam@167 2883 # most powerpc-linux boxes support dynamic linking these days and
cannam@167 2884 # people can always --disable-shared, the test was removed, and we
cannam@167 2885 # assume the GNU/Linux dynamic linker is in use.
cannam@167 2886 dynamic_linker='GNU/Linux ld.so'
cannam@167 2887 ;;
cannam@167 2888
cannam@167 2889 netbsdelf*-gnu)
cannam@167 2890 version_type=linux
cannam@167 2891 need_lib_prefix=no
cannam@167 2892 need_version=no
cannam@167 2893 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
cannam@167 2894 soname_spec='${libname}${release}${shared_ext}$major'
cannam@167 2895 shlibpath_var=LD_LIBRARY_PATH
cannam@167 2896 shlibpath_overrides_runpath=no
cannam@167 2897 hardcode_into_libs=yes
cannam@167 2898 dynamic_linker='NetBSD ld.elf_so'
cannam@167 2899 ;;
cannam@167 2900
cannam@167 2901 netbsd*)
cannam@167 2902 version_type=sunos
cannam@167 2903 need_lib_prefix=no
cannam@167 2904 need_version=no
cannam@167 2905 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
cannam@167 2906 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
cannam@167 2907 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
cannam@167 2908 dynamic_linker='NetBSD (a.out) ld.so'
cannam@167 2909 else
cannam@167 2910 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@167 2911 soname_spec='$libname$release$shared_ext$major'
cannam@167 2912 dynamic_linker='NetBSD ld.elf_so'
cannam@167 2913 fi
cannam@167 2914 shlibpath_var=LD_LIBRARY_PATH
cannam@167 2915 shlibpath_overrides_runpath=yes
cannam@167 2916 hardcode_into_libs=yes
cannam@167 2917 ;;
cannam@167 2918
cannam@167 2919 newsos6)
cannam@167 2920 version_type=linux # correct to gnu/linux during the next big refactor
cannam@167 2921 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@167 2922 shlibpath_var=LD_LIBRARY_PATH
cannam@167 2923 shlibpath_overrides_runpath=yes
cannam@167 2924 ;;
cannam@167 2925
cannam@167 2926 *nto* | *qnx*)
cannam@167 2927 version_type=qnx
cannam@167 2928 need_lib_prefix=no
cannam@167 2929 need_version=no
cannam@167 2930 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@167 2931 soname_spec='$libname$release$shared_ext$major'
cannam@167 2932 shlibpath_var=LD_LIBRARY_PATH
cannam@167 2933 shlibpath_overrides_runpath=no
cannam@167 2934 hardcode_into_libs=yes
cannam@167 2935 dynamic_linker='ldqnx.so'
cannam@167 2936 ;;
cannam@167 2937
cannam@167 2938 openbsd* | bitrig*)
cannam@167 2939 version_type=sunos
cannam@167 2940 sys_lib_dlsearch_path_spec=/usr/lib
cannam@167 2941 need_lib_prefix=no
cannam@167 2942 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
cannam@167 2943 need_version=no
cannam@167 2944 else
cannam@167 2945 need_version=yes
cannam@167 2946 fi
cannam@167 2947 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
cannam@167 2948 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
cannam@167 2949 shlibpath_var=LD_LIBRARY_PATH
cannam@167 2950 shlibpath_overrides_runpath=yes
cannam@167 2951 ;;
cannam@167 2952
cannam@167 2953 os2*)
cannam@167 2954 libname_spec='$name'
cannam@167 2955 version_type=windows
cannam@167 2956 shrext_cmds=.dll
cannam@167 2957 need_version=no
cannam@167 2958 need_lib_prefix=no
cannam@167 2959 # OS/2 can only load a DLL with a base name of 8 characters or less.
cannam@167 2960 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
cannam@167 2961 v=$($ECHO $release$versuffix | tr -d .-);
cannam@167 2962 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
cannam@167 2963 $ECHO $n$v`$shared_ext'
cannam@167 2964 library_names_spec='${libname}_dll.$libext'
cannam@167 2965 dynamic_linker='OS/2 ld.exe'
cannam@167 2966 shlibpath_var=BEGINLIBPATH
cannam@167 2967 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
cannam@167 2968 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
cannam@167 2969 postinstall_cmds='base_file=`basename \$file`~
cannam@167 2970 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
cannam@167 2971 dldir=$destdir/`dirname \$dlpath`~
cannam@167 2972 test -d \$dldir || mkdir -p \$dldir~
cannam@167 2973 $install_prog $dir/$dlname \$dldir/$dlname~
cannam@167 2974 chmod a+x \$dldir/$dlname~
cannam@167 2975 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
cannam@167 2976 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
cannam@167 2977 fi'
cannam@167 2978 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
cannam@167 2979 dlpath=$dir/\$dldll~
cannam@167 2980 $RM \$dlpath'
cannam@167 2981 ;;
cannam@167 2982
cannam@167 2983 osf3* | osf4* | osf5*)
cannam@167 2984 version_type=osf
cannam@167 2985 need_lib_prefix=no
cannam@167 2986 need_version=no
cannam@167 2987 soname_spec='$libname$release$shared_ext$major'
cannam@167 2988 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@167 2989 shlibpath_var=LD_LIBRARY_PATH
cannam@167 2990 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
cannam@167 2991 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
cannam@167 2992 ;;
cannam@167 2993
cannam@167 2994 rdos*)
cannam@167 2995 dynamic_linker=no
cannam@167 2996 ;;
cannam@167 2997
cannam@167 2998 solaris*)
cannam@167 2999 version_type=linux # correct to gnu/linux during the next big refactor
cannam@167 3000 need_lib_prefix=no
cannam@167 3001 need_version=no
cannam@167 3002 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@167 3003 soname_spec='$libname$release$shared_ext$major'
cannam@167 3004 shlibpath_var=LD_LIBRARY_PATH
cannam@167 3005 shlibpath_overrides_runpath=yes
cannam@167 3006 hardcode_into_libs=yes
cannam@167 3007 # ldd complains unless libraries are executable
cannam@167 3008 postinstall_cmds='chmod +x $lib'
cannam@167 3009 ;;
cannam@167 3010
cannam@167 3011 sunos4*)
cannam@167 3012 version_type=sunos
cannam@167 3013 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
cannam@167 3014 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
cannam@167 3015 shlibpath_var=LD_LIBRARY_PATH
cannam@167 3016 shlibpath_overrides_runpath=yes
cannam@167 3017 if test yes = "$with_gnu_ld"; then
cannam@167 3018 need_lib_prefix=no
cannam@167 3019 fi
cannam@167 3020 need_version=yes
cannam@167 3021 ;;
cannam@167 3022
cannam@167 3023 sysv4 | sysv4.3*)
cannam@167 3024 version_type=linux # correct to gnu/linux during the next big refactor
cannam@167 3025 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@167 3026 soname_spec='$libname$release$shared_ext$major'
cannam@167 3027 shlibpath_var=LD_LIBRARY_PATH
cannam@167 3028 case $host_vendor in
cannam@167 3029 sni)
cannam@167 3030 shlibpath_overrides_runpath=no
cannam@167 3031 need_lib_prefix=no
cannam@167 3032 runpath_var=LD_RUN_PATH
cannam@167 3033 ;;
cannam@167 3034 siemens)
cannam@167 3035 need_lib_prefix=no
cannam@167 3036 ;;
cannam@167 3037 motorola)
cannam@167 3038 need_lib_prefix=no
cannam@167 3039 need_version=no
cannam@167 3040 shlibpath_overrides_runpath=no
cannam@167 3041 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
cannam@167 3042 ;;
cannam@167 3043 esac
cannam@167 3044 ;;
cannam@167 3045
cannam@167 3046 sysv4*MP*)
cannam@167 3047 if test -d /usr/nec; then
cannam@167 3048 version_type=linux # correct to gnu/linux during the next big refactor
cannam@167 3049 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
cannam@167 3050 soname_spec='$libname$shared_ext.$major'
cannam@167 3051 shlibpath_var=LD_LIBRARY_PATH
cannam@167 3052 fi
cannam@167 3053 ;;
cannam@167 3054
cannam@167 3055 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
cannam@167 3056 version_type=sco
cannam@167 3057 need_lib_prefix=no
cannam@167 3058 need_version=no
cannam@167 3059 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
cannam@167 3060 soname_spec='$libname$release$shared_ext$major'
cannam@167 3061 shlibpath_var=LD_LIBRARY_PATH
cannam@167 3062 shlibpath_overrides_runpath=yes
cannam@167 3063 hardcode_into_libs=yes
cannam@167 3064 if test yes = "$with_gnu_ld"; then
cannam@167 3065 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
cannam@167 3066 else
cannam@167 3067 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
cannam@167 3068 case $host_os in
cannam@167 3069 sco3.2v5*)
cannam@167 3070 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
cannam@167 3071 ;;
cannam@167 3072 esac
cannam@167 3073 fi
cannam@167 3074 sys_lib_dlsearch_path_spec='/usr/lib'
cannam@167 3075 ;;
cannam@167 3076
cannam@167 3077 tpf*)
cannam@167 3078 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
cannam@167 3079 version_type=linux # correct to gnu/linux during the next big refactor
cannam@167 3080 need_lib_prefix=no
cannam@167 3081 need_version=no
cannam@167 3082 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@167 3083 shlibpath_var=LD_LIBRARY_PATH
cannam@167 3084 shlibpath_overrides_runpath=no
cannam@167 3085 hardcode_into_libs=yes
cannam@167 3086 ;;
cannam@167 3087
cannam@167 3088 uts4*)
cannam@167 3089 version_type=linux # correct to gnu/linux during the next big refactor
cannam@167 3090 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
cannam@167 3091 soname_spec='$libname$release$shared_ext$major'
cannam@167 3092 shlibpath_var=LD_LIBRARY_PATH
cannam@167 3093 ;;
cannam@167 3094
cannam@167 3095 *)
cannam@167 3096 dynamic_linker=no
cannam@167 3097 ;;
cannam@167 3098 esac
cannam@167 3099 AC_MSG_RESULT([$dynamic_linker])
cannam@167 3100 test no = "$dynamic_linker" && can_build_shared=no
cannam@167 3101
cannam@167 3102 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
cannam@167 3103 if test yes = "$GCC"; then
cannam@167 3104 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
cannam@167 3105 fi
cannam@167 3106
cannam@167 3107 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
cannam@167 3108 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
cannam@167 3109 fi
cannam@167 3110
cannam@167 3111 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
cannam@167 3112 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
cannam@167 3113 fi
cannam@167 3114
cannam@167 3115 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
cannam@167 3116 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
cannam@167 3117
cannam@167 3118 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
cannam@167 3119 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
cannam@167 3120
cannam@167 3121 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
cannam@167 3122 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
cannam@167 3123
cannam@167 3124 _LT_DECL([], [variables_saved_for_relink], [1],
cannam@167 3125 [Variables whose values should be saved in libtool wrapper scripts and
cannam@167 3126 restored at link time])
cannam@167 3127 _LT_DECL([], [need_lib_prefix], [0],
cannam@167 3128 [Do we need the "lib" prefix for modules?])
cannam@167 3129 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
cannam@167 3130 _LT_DECL([], [version_type], [0], [Library versioning type])
cannam@167 3131 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
cannam@167 3132 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
cannam@167 3133 _LT_DECL([], [shlibpath_overrides_runpath], [0],
cannam@167 3134 [Is shlibpath searched before the hard-coded library search path?])
cannam@167 3135 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
cannam@167 3136 _LT_DECL([], [library_names_spec], [1],
cannam@167 3137 [[List of archive names. First name is the real one, the rest are links.
cannam@167 3138 The last name is the one that the linker finds with -lNAME]])
cannam@167 3139 _LT_DECL([], [soname_spec], [1],
cannam@167 3140 [[The coded name of the library, if different from the real name]])
cannam@167 3141 _LT_DECL([], [install_override_mode], [1],
cannam@167 3142 [Permission mode override for installation of shared libraries])
cannam@167 3143 _LT_DECL([], [postinstall_cmds], [2],
cannam@167 3144 [Command to use after installation of a shared archive])
cannam@167 3145 _LT_DECL([], [postuninstall_cmds], [2],
cannam@167 3146 [Command to use after uninstallation of a shared archive])
cannam@167 3147 _LT_DECL([], [finish_cmds], [2],
cannam@167 3148 [Commands used to finish a libtool library installation in a directory])
cannam@167 3149 _LT_DECL([], [finish_eval], [1],
cannam@167 3150 [[As "finish_cmds", except a single script fragment to be evaled but
cannam@167 3151 not shown]])
cannam@167 3152 _LT_DECL([], [hardcode_into_libs], [0],
cannam@167 3153 [Whether we should hardcode library paths into libraries])
cannam@167 3154 _LT_DECL([], [sys_lib_search_path_spec], [2],
cannam@167 3155 [Compile-time system search path for libraries])
cannam@167 3156 _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
cannam@167 3157 [Detected run-time system search path for libraries])
cannam@167 3158 _LT_DECL([], [configure_time_lt_sys_library_path], [2],
cannam@167 3159 [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
cannam@167 3160 ])# _LT_SYS_DYNAMIC_LINKER
cannam@167 3161
cannam@167 3162
cannam@167 3163 # _LT_PATH_TOOL_PREFIX(TOOL)
cannam@167 3164 # --------------------------
cannam@167 3165 # find a file program that can recognize shared library
cannam@167 3166 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
cannam@167 3167 [m4_require([_LT_DECL_EGREP])dnl
cannam@167 3168 AC_MSG_CHECKING([for $1])
cannam@167 3169 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
cannam@167 3170 [case $MAGIC_CMD in
cannam@167 3171 [[\\/*] | ?:[\\/]*])
cannam@167 3172 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
cannam@167 3173 ;;
cannam@167 3174 *)
cannam@167 3175 lt_save_MAGIC_CMD=$MAGIC_CMD
cannam@167 3176 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
cannam@167 3177 dnl $ac_dummy forces splitting on constant user-supplied paths.
cannam@167 3178 dnl POSIX.2 word splitting is done only on the output of word expansions,
cannam@167 3179 dnl not every word. This closes a longstanding sh security hole.
cannam@167 3180 ac_dummy="m4_if([$2], , $PATH, [$2])"
cannam@167 3181 for ac_dir in $ac_dummy; do
cannam@167 3182 IFS=$lt_save_ifs
cannam@167 3183 test -z "$ac_dir" && ac_dir=.
cannam@167 3184 if test -f "$ac_dir/$1"; then
cannam@167 3185 lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
cannam@167 3186 if test -n "$file_magic_test_file"; then
cannam@167 3187 case $deplibs_check_method in
cannam@167 3188 "file_magic "*)
cannam@167 3189 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
cannam@167 3190 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
cannam@167 3191 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
cannam@167 3192 $EGREP "$file_magic_regex" > /dev/null; then
cannam@167 3193 :
cannam@167 3194 else
cannam@167 3195 cat <<_LT_EOF 1>&2
cannam@167 3196
cannam@167 3197 *** Warning: the command libtool uses to detect shared libraries,
cannam@167 3198 *** $file_magic_cmd, produces output that libtool cannot recognize.
cannam@167 3199 *** The result is that libtool may fail to recognize shared libraries
cannam@167 3200 *** as such. This will affect the creation of libtool libraries that
cannam@167 3201 *** depend on shared libraries, but programs linked with such libtool
cannam@167 3202 *** libraries will work regardless of this problem. Nevertheless, you
cannam@167 3203 *** may want to report the problem to your system manager and/or to
cannam@167 3204 *** bug-libtool@gnu.org
cannam@167 3205
cannam@167 3206 _LT_EOF
cannam@167 3207 fi ;;
cannam@167 3208 esac
cannam@167 3209 fi
cannam@167 3210 break
cannam@167 3211 fi
cannam@167 3212 done
cannam@167 3213 IFS=$lt_save_ifs
cannam@167 3214 MAGIC_CMD=$lt_save_MAGIC_CMD
cannam@167 3215 ;;
cannam@167 3216 esac])
cannam@167 3217 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
cannam@167 3218 if test -n "$MAGIC_CMD"; then
cannam@167 3219 AC_MSG_RESULT($MAGIC_CMD)
cannam@167 3220 else
cannam@167 3221 AC_MSG_RESULT(no)
cannam@167 3222 fi
cannam@167 3223 _LT_DECL([], [MAGIC_CMD], [0],
cannam@167 3224 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
cannam@167 3225 ])# _LT_PATH_TOOL_PREFIX
cannam@167 3226
cannam@167 3227 # Old name:
cannam@167 3228 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
cannam@167 3229 dnl aclocal-1.4 backwards compatibility:
cannam@167 3230 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
cannam@167 3231
cannam@167 3232
cannam@167 3233 # _LT_PATH_MAGIC
cannam@167 3234 # --------------
cannam@167 3235 # find a file program that can recognize a shared library
cannam@167 3236 m4_defun([_LT_PATH_MAGIC],
cannam@167 3237 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
cannam@167 3238 if test -z "$lt_cv_path_MAGIC_CMD"; then
cannam@167 3239 if test -n "$ac_tool_prefix"; then
cannam@167 3240 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
cannam@167 3241 else
cannam@167 3242 MAGIC_CMD=:
cannam@167 3243 fi
cannam@167 3244 fi
cannam@167 3245 ])# _LT_PATH_MAGIC
cannam@167 3246
cannam@167 3247
cannam@167 3248 # LT_PATH_LD
cannam@167 3249 # ----------
cannam@167 3250 # find the pathname to the GNU or non-GNU linker
cannam@167 3251 AC_DEFUN([LT_PATH_LD],
cannam@167 3252 [AC_REQUIRE([AC_PROG_CC])dnl
cannam@167 3253 AC_REQUIRE([AC_CANONICAL_HOST])dnl
cannam@167 3254 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
cannam@167 3255 m4_require([_LT_DECL_SED])dnl
cannam@167 3256 m4_require([_LT_DECL_EGREP])dnl
cannam@167 3257 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
cannam@167 3258
cannam@167 3259 AC_ARG_WITH([gnu-ld],
cannam@167 3260 [AS_HELP_STRING([--with-gnu-ld],
cannam@167 3261 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
cannam@167 3262 [test no = "$withval" || with_gnu_ld=yes],
cannam@167 3263 [with_gnu_ld=no])dnl
cannam@167 3264
cannam@167 3265 ac_prog=ld
cannam@167 3266 if test yes = "$GCC"; then
cannam@167 3267 # Check if gcc -print-prog-name=ld gives a path.
cannam@167 3268 AC_MSG_CHECKING([for ld used by $CC])
cannam@167 3269 case $host in
cannam@167 3270 *-*-mingw*)
cannam@167 3271 # gcc leaves a trailing carriage return, which upsets mingw
cannam@167 3272 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
cannam@167 3273 *)
cannam@167 3274 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
cannam@167 3275 esac
cannam@167 3276 case $ac_prog in
cannam@167 3277 # Accept absolute paths.
cannam@167 3278 [[\\/]]* | ?:[[\\/]]*)
cannam@167 3279 re_direlt='/[[^/]][[^/]]*/\.\./'
cannam@167 3280 # Canonicalize the pathname of ld
cannam@167 3281 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
cannam@167 3282 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
cannam@167 3283 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
cannam@167 3284 done
cannam@167 3285 test -z "$LD" && LD=$ac_prog
cannam@167 3286 ;;
cannam@167 3287 "")
cannam@167 3288 # If it fails, then pretend we aren't using GCC.
cannam@167 3289 ac_prog=ld
cannam@167 3290 ;;
cannam@167 3291 *)
cannam@167 3292 # If it is relative, then search for the first ld in PATH.
cannam@167 3293 with_gnu_ld=unknown
cannam@167 3294 ;;
cannam@167 3295 esac
cannam@167 3296 elif test yes = "$with_gnu_ld"; then
cannam@167 3297 AC_MSG_CHECKING([for GNU ld])
cannam@167 3298 else
cannam@167 3299 AC_MSG_CHECKING([for non-GNU ld])
cannam@167 3300 fi
cannam@167 3301 AC_CACHE_VAL(lt_cv_path_LD,
cannam@167 3302 [if test -z "$LD"; then
cannam@167 3303 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
cannam@167 3304 for ac_dir in $PATH; do
cannam@167 3305 IFS=$lt_save_ifs
cannam@167 3306 test -z "$ac_dir" && ac_dir=.
cannam@167 3307 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
cannam@167 3308 lt_cv_path_LD=$ac_dir/$ac_prog
cannam@167 3309 # Check to see if the program is GNU ld. I'd rather use --version,
cannam@167 3310 # but apparently some variants of GNU ld only accept -v.
cannam@167 3311 # Break only if it was the GNU/non-GNU ld that we prefer.
cannam@167 3312 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
cannam@167 3313 *GNU* | *'with BFD'*)
cannam@167 3314 test no != "$with_gnu_ld" && break
cannam@167 3315 ;;
cannam@167 3316 *)
cannam@167 3317 test yes != "$with_gnu_ld" && break
cannam@167 3318 ;;
cannam@167 3319 esac
cannam@167 3320 fi
cannam@167 3321 done
cannam@167 3322 IFS=$lt_save_ifs
cannam@167 3323 else
cannam@167 3324 lt_cv_path_LD=$LD # Let the user override the test with a path.
cannam@167 3325 fi])
cannam@167 3326 LD=$lt_cv_path_LD
cannam@167 3327 if test -n "$LD"; then
cannam@167 3328 AC_MSG_RESULT($LD)
cannam@167 3329 else
cannam@167 3330 AC_MSG_RESULT(no)
cannam@167 3331 fi
cannam@167 3332 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
cannam@167 3333 _LT_PATH_LD_GNU
cannam@167 3334 AC_SUBST([LD])
cannam@167 3335
cannam@167 3336 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
cannam@167 3337 ])# LT_PATH_LD
cannam@167 3338
cannam@167 3339 # Old names:
cannam@167 3340 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
cannam@167 3341 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
cannam@167 3342 dnl aclocal-1.4 backwards compatibility:
cannam@167 3343 dnl AC_DEFUN([AM_PROG_LD], [])
cannam@167 3344 dnl AC_DEFUN([AC_PROG_LD], [])
cannam@167 3345
cannam@167 3346
cannam@167 3347 # _LT_PATH_LD_GNU
cannam@167 3348 #- --------------
cannam@167 3349 m4_defun([_LT_PATH_LD_GNU],
cannam@167 3350 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
cannam@167 3351 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
cannam@167 3352 case `$LD -v 2>&1 </dev/null` in
cannam@167 3353 *GNU* | *'with BFD'*)
cannam@167 3354 lt_cv_prog_gnu_ld=yes
cannam@167 3355 ;;
cannam@167 3356 *)
cannam@167 3357 lt_cv_prog_gnu_ld=no
cannam@167 3358 ;;
cannam@167 3359 esac])
cannam@167 3360 with_gnu_ld=$lt_cv_prog_gnu_ld
cannam@167 3361 ])# _LT_PATH_LD_GNU
cannam@167 3362
cannam@167 3363
cannam@167 3364 # _LT_CMD_RELOAD
cannam@167 3365 # --------------
cannam@167 3366 # find reload flag for linker
cannam@167 3367 # -- PORTME Some linkers may need a different reload flag.
cannam@167 3368 m4_defun([_LT_CMD_RELOAD],
cannam@167 3369 [AC_CACHE_CHECK([for $LD option to reload object files],
cannam@167 3370 lt_cv_ld_reload_flag,
cannam@167 3371 [lt_cv_ld_reload_flag='-r'])
cannam@167 3372 reload_flag=$lt_cv_ld_reload_flag
cannam@167 3373 case $reload_flag in
cannam@167 3374 "" | " "*) ;;
cannam@167 3375 *) reload_flag=" $reload_flag" ;;
cannam@167 3376 esac
cannam@167 3377 reload_cmds='$LD$reload_flag -o $output$reload_objs'
cannam@167 3378 case $host_os in
cannam@167 3379 cygwin* | mingw* | pw32* | cegcc*)
cannam@167 3380 if test yes != "$GCC"; then
cannam@167 3381 reload_cmds=false
cannam@167 3382 fi
cannam@167 3383 ;;
cannam@167 3384 darwin*)
cannam@167 3385 if test yes = "$GCC"; then
cannam@167 3386 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
cannam@167 3387 else
cannam@167 3388 reload_cmds='$LD$reload_flag -o $output$reload_objs'
cannam@167 3389 fi
cannam@167 3390 ;;
cannam@167 3391 esac
cannam@167 3392 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
cannam@167 3393 _LT_TAGDECL([], [reload_cmds], [2])dnl
cannam@167 3394 ])# _LT_CMD_RELOAD
cannam@167 3395
cannam@167 3396
cannam@167 3397 # _LT_PATH_DD
cannam@167 3398 # -----------
cannam@167 3399 # find a working dd
cannam@167 3400 m4_defun([_LT_PATH_DD],
cannam@167 3401 [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
cannam@167 3402 [printf 0123456789abcdef0123456789abcdef >conftest.i
cannam@167 3403 cat conftest.i conftest.i >conftest2.i
cannam@167 3404 : ${lt_DD:=$DD}
cannam@167 3405 AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
cannam@167 3406 [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
cannam@167 3407 cmp -s conftest.i conftest.out \
cannam@167 3408 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
cannam@167 3409 fi])
cannam@167 3410 rm -f conftest.i conftest2.i conftest.out])
cannam@167 3411 ])# _LT_PATH_DD
cannam@167 3412
cannam@167 3413
cannam@167 3414 # _LT_CMD_TRUNCATE
cannam@167 3415 # ----------------
cannam@167 3416 # find command to truncate a binary pipe
cannam@167 3417 m4_defun([_LT_CMD_TRUNCATE],
cannam@167 3418 [m4_require([_LT_PATH_DD])
cannam@167 3419 AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
cannam@167 3420 [printf 0123456789abcdef0123456789abcdef >conftest.i
cannam@167 3421 cat conftest.i conftest.i >conftest2.i
cannam@167 3422 lt_cv_truncate_bin=
cannam@167 3423 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
cannam@167 3424 cmp -s conftest.i conftest.out \
cannam@167 3425 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
cannam@167 3426 fi
cannam@167 3427 rm -f conftest.i conftest2.i conftest.out
cannam@167 3428 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
cannam@167 3429 _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
cannam@167 3430 [Command to truncate a binary pipe])
cannam@167 3431 ])# _LT_CMD_TRUNCATE
cannam@167 3432
cannam@167 3433
cannam@167 3434 # _LT_CHECK_MAGIC_METHOD
cannam@167 3435 # ----------------------
cannam@167 3436 # how to check for library dependencies
cannam@167 3437 # -- PORTME fill in with the dynamic library characteristics
cannam@167 3438 m4_defun([_LT_CHECK_MAGIC_METHOD],
cannam@167 3439 [m4_require([_LT_DECL_EGREP])
cannam@167 3440 m4_require([_LT_DECL_OBJDUMP])
cannam@167 3441 AC_CACHE_CHECK([how to recognize dependent libraries],
cannam@167 3442 lt_cv_deplibs_check_method,
cannam@167 3443 [lt_cv_file_magic_cmd='$MAGIC_CMD'
cannam@167 3444 lt_cv_file_magic_test_file=
cannam@167 3445 lt_cv_deplibs_check_method='unknown'
cannam@167 3446 # Need to set the preceding variable on all platforms that support
cannam@167 3447 # interlibrary dependencies.
cannam@167 3448 # 'none' -- dependencies not supported.
cannam@167 3449 # 'unknown' -- same as none, but documents that we really don't know.
cannam@167 3450 # 'pass_all' -- all dependencies passed with no checks.
cannam@167 3451 # 'test_compile' -- check by making test program.
cannam@167 3452 # 'file_magic [[regex]]' -- check by looking for files in library path
cannam@167 3453 # that responds to the $file_magic_cmd with a given extended regex.
cannam@167 3454 # If you have 'file' or equivalent on your system and you're not sure
cannam@167 3455 # whether 'pass_all' will *always* work, you probably want this one.
cannam@167 3456
cannam@167 3457 case $host_os in
cannam@167 3458 aix[[4-9]]*)
cannam@167 3459 lt_cv_deplibs_check_method=pass_all
cannam@167 3460 ;;
cannam@167 3461
cannam@167 3462 beos*)
cannam@167 3463 lt_cv_deplibs_check_method=pass_all
cannam@167 3464 ;;
cannam@167 3465
cannam@167 3466 bsdi[[45]]*)
cannam@167 3467 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
cannam@167 3468 lt_cv_file_magic_cmd='/usr/bin/file -L'
cannam@167 3469 lt_cv_file_magic_test_file=/shlib/libc.so
cannam@167 3470 ;;
cannam@167 3471
cannam@167 3472 cygwin*)
cannam@167 3473 # func_win32_libid is a shell function defined in ltmain.sh
cannam@167 3474 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
cannam@167 3475 lt_cv_file_magic_cmd='func_win32_libid'
cannam@167 3476 ;;
cannam@167 3477
cannam@167 3478 mingw* | pw32*)
cannam@167 3479 # Base MSYS/MinGW do not provide the 'file' command needed by
cannam@167 3480 # func_win32_libid shell function, so use a weaker test based on 'objdump',
cannam@167 3481 # unless we find 'file', for example because we are cross-compiling.
cannam@167 3482 if ( file / ) >/dev/null 2>&1; then
cannam@167 3483 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
cannam@167 3484 lt_cv_file_magic_cmd='func_win32_libid'
cannam@167 3485 else
cannam@167 3486 # Keep this pattern in sync with the one in func_win32_libid.
cannam@167 3487 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
cannam@167 3488 lt_cv_file_magic_cmd='$OBJDUMP -f'
cannam@167 3489 fi
cannam@167 3490 ;;
cannam@167 3491
cannam@167 3492 cegcc*)
cannam@167 3493 # use the weaker test based on 'objdump'. See mingw*.
cannam@167 3494 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
cannam@167 3495 lt_cv_file_magic_cmd='$OBJDUMP -f'
cannam@167 3496 ;;
cannam@167 3497
cannam@167 3498 darwin* | rhapsody*)
cannam@167 3499 lt_cv_deplibs_check_method=pass_all
cannam@167 3500 ;;
cannam@167 3501
cannam@167 3502 freebsd* | dragonfly*)
cannam@167 3503 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
cannam@167 3504 case $host_cpu in
cannam@167 3505 i*86 )
cannam@167 3506 # Not sure whether the presence of OpenBSD here was a mistake.
cannam@167 3507 # Let's accept both of them until this is cleared up.
cannam@167 3508 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
cannam@167 3509 lt_cv_file_magic_cmd=/usr/bin/file
cannam@167 3510 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
cannam@167 3511 ;;
cannam@167 3512 esac
cannam@167 3513 else
cannam@167 3514 lt_cv_deplibs_check_method=pass_all
cannam@167 3515 fi
cannam@167 3516 ;;
cannam@167 3517
cannam@167 3518 haiku*)
cannam@167 3519 lt_cv_deplibs_check_method=pass_all
cannam@167 3520 ;;
cannam@167 3521
cannam@167 3522 hpux10.20* | hpux11*)
cannam@167 3523 lt_cv_file_magic_cmd=/usr/bin/file
cannam@167 3524 case $host_cpu in
cannam@167 3525 ia64*)
cannam@167 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@167 3527 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
cannam@167 3528 ;;
cannam@167 3529 hppa*64*)
cannam@167 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@167 3531 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
cannam@167 3532 ;;
cannam@167 3533 *)
cannam@167 3534 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
cannam@167 3535 lt_cv_file_magic_test_file=/usr/lib/libc.sl
cannam@167 3536 ;;
cannam@167 3537 esac
cannam@167 3538 ;;
cannam@167 3539
cannam@167 3540 interix[[3-9]]*)
cannam@167 3541 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
cannam@167 3542 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
cannam@167 3543 ;;
cannam@167 3544
cannam@167 3545 irix5* | irix6* | nonstopux*)
cannam@167 3546 case $LD in
cannam@167 3547 *-32|*"-32 ") libmagic=32-bit;;
cannam@167 3548 *-n32|*"-n32 ") libmagic=N32;;
cannam@167 3549 *-64|*"-64 ") libmagic=64-bit;;
cannam@167 3550 *) libmagic=never-match;;
cannam@167 3551 esac
cannam@167 3552 lt_cv_deplibs_check_method=pass_all
cannam@167 3553 ;;
cannam@167 3554
cannam@167 3555 # This must be glibc/ELF.
cannam@167 3556 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
cannam@167 3557 lt_cv_deplibs_check_method=pass_all
cannam@167 3558 ;;
cannam@167 3559
cannam@167 3560 netbsd* | netbsdelf*-gnu)
cannam@167 3561 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
cannam@167 3562 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
cannam@167 3563 else
cannam@167 3564 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
cannam@167 3565 fi
cannam@167 3566 ;;
cannam@167 3567
cannam@167 3568 newos6*)
cannam@167 3569 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
cannam@167 3570 lt_cv_file_magic_cmd=/usr/bin/file
cannam@167 3571 lt_cv_file_magic_test_file=/usr/lib/libnls.so
cannam@167 3572 ;;
cannam@167 3573
cannam@167 3574 *nto* | *qnx*)
cannam@167 3575 lt_cv_deplibs_check_method=pass_all
cannam@167 3576 ;;
cannam@167 3577
cannam@167 3578 openbsd* | bitrig*)
cannam@167 3579 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
cannam@167 3580 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
cannam@167 3581 else
cannam@167 3582 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
cannam@167 3583 fi
cannam@167 3584 ;;
cannam@167 3585
cannam@167 3586 osf3* | osf4* | osf5*)
cannam@167 3587 lt_cv_deplibs_check_method=pass_all
cannam@167 3588 ;;
cannam@167 3589
cannam@167 3590 rdos*)
cannam@167 3591 lt_cv_deplibs_check_method=pass_all
cannam@167 3592 ;;
cannam@167 3593
cannam@167 3594 solaris*)
cannam@167 3595 lt_cv_deplibs_check_method=pass_all
cannam@167 3596 ;;
cannam@167 3597
cannam@167 3598 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
cannam@167 3599 lt_cv_deplibs_check_method=pass_all
cannam@167 3600 ;;
cannam@167 3601
cannam@167 3602 sysv4 | sysv4.3*)
cannam@167 3603 case $host_vendor in
cannam@167 3604 motorola)
cannam@167 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@167 3606 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
cannam@167 3607 ;;
cannam@167 3608 ncr)
cannam@167 3609 lt_cv_deplibs_check_method=pass_all
cannam@167 3610 ;;
cannam@167 3611 sequent)
cannam@167 3612 lt_cv_file_magic_cmd='/bin/file'
cannam@167 3613 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
cannam@167 3614 ;;
cannam@167 3615 sni)
cannam@167 3616 lt_cv_file_magic_cmd='/bin/file'
cannam@167 3617 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
cannam@167 3618 lt_cv_file_magic_test_file=/lib/libc.so
cannam@167 3619 ;;
cannam@167 3620 siemens)
cannam@167 3621 lt_cv_deplibs_check_method=pass_all
cannam@167 3622 ;;
cannam@167 3623 pc)
cannam@167 3624 lt_cv_deplibs_check_method=pass_all
cannam@167 3625 ;;
cannam@167 3626 esac
cannam@167 3627 ;;
cannam@167 3628
cannam@167 3629 tpf*)
cannam@167 3630 lt_cv_deplibs_check_method=pass_all
cannam@167 3631 ;;
cannam@167 3632 os2*)
cannam@167 3633 lt_cv_deplibs_check_method=pass_all
cannam@167 3634 ;;
cannam@167 3635 esac
cannam@167 3636 ])
cannam@167 3637
cannam@167 3638 file_magic_glob=
cannam@167 3639 want_nocaseglob=no
cannam@167 3640 if test "$build" = "$host"; then
cannam@167 3641 case $host_os in
cannam@167 3642 mingw* | pw32*)
cannam@167 3643 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
cannam@167 3644 want_nocaseglob=yes
cannam@167 3645 else
cannam@167 3646 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
cannam@167 3647 fi
cannam@167 3648 ;;
cannam@167 3649 esac
cannam@167 3650 fi
cannam@167 3651
cannam@167 3652 file_magic_cmd=$lt_cv_file_magic_cmd
cannam@167 3653 deplibs_check_method=$lt_cv_deplibs_check_method
cannam@167 3654 test -z "$deplibs_check_method" && deplibs_check_method=unknown
cannam@167 3655
cannam@167 3656 _LT_DECL([], [deplibs_check_method], [1],
cannam@167 3657 [Method to check whether dependent libraries are shared objects])
cannam@167 3658 _LT_DECL([], [file_magic_cmd], [1],
cannam@167 3659 [Command to use when deplibs_check_method = "file_magic"])
cannam@167 3660 _LT_DECL([], [file_magic_glob], [1],
cannam@167 3661 [How to find potential files when deplibs_check_method = "file_magic"])
cannam@167 3662 _LT_DECL([], [want_nocaseglob], [1],
cannam@167 3663 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
cannam@167 3664 ])# _LT_CHECK_MAGIC_METHOD
cannam@167 3665
cannam@167 3666
cannam@167 3667 # LT_PATH_NM
cannam@167 3668 # ----------
cannam@167 3669 # find the pathname to a BSD- or MS-compatible name lister
cannam@167 3670 AC_DEFUN([LT_PATH_NM],
cannam@167 3671 [AC_REQUIRE([AC_PROG_CC])dnl
cannam@167 3672 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
cannam@167 3673 [if test -n "$NM"; then
cannam@167 3674 # Let the user override the test.
cannam@167 3675 lt_cv_path_NM=$NM
cannam@167 3676 else
cannam@167 3677 lt_nm_to_check=${ac_tool_prefix}nm
cannam@167 3678 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
cannam@167 3679 lt_nm_to_check="$lt_nm_to_check nm"
cannam@167 3680 fi
cannam@167 3681 for lt_tmp_nm in $lt_nm_to_check; do
cannam@167 3682 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
cannam@167 3683 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
cannam@167 3684 IFS=$lt_save_ifs
cannam@167 3685 test -z "$ac_dir" && ac_dir=.
cannam@167 3686 tmp_nm=$ac_dir/$lt_tmp_nm
cannam@167 3687 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
cannam@167 3688 # Check to see if the nm accepts a BSD-compat flag.
cannam@167 3689 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
cannam@167 3690 # nm: unknown option "B" ignored
cannam@167 3691 # Tru64's nm complains that /dev/null is an invalid object file
cannam@167 3692 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
cannam@167 3693 case $build_os in
cannam@167 3694 mingw*) lt_bad_file=conftest.nm/nofile ;;
cannam@167 3695 *) lt_bad_file=/dev/null ;;
cannam@167 3696 esac
cannam@167 3697 case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
cannam@167 3698 *$lt_bad_file* | *'Invalid file or object type'*)
cannam@167 3699 lt_cv_path_NM="$tmp_nm -B"
cannam@167 3700 break 2
cannam@167 3701 ;;
cannam@167 3702 *)
cannam@167 3703 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
cannam@167 3704 */dev/null*)
cannam@167 3705 lt_cv_path_NM="$tmp_nm -p"
cannam@167 3706 break 2
cannam@167 3707 ;;
cannam@167 3708 *)
cannam@167 3709 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
cannam@167 3710 continue # so that we can try to find one that supports BSD flags
cannam@167 3711 ;;
cannam@167 3712 esac
cannam@167 3713 ;;
cannam@167 3714 esac
cannam@167 3715 fi
cannam@167 3716 done
cannam@167 3717 IFS=$lt_save_ifs
cannam@167 3718 done
cannam@167 3719 : ${lt_cv_path_NM=no}
cannam@167 3720 fi])
cannam@167 3721 if test no != "$lt_cv_path_NM"; then
cannam@167 3722 NM=$lt_cv_path_NM
cannam@167 3723 else
cannam@167 3724 # Didn't find any BSD compatible name lister, look for dumpbin.
cannam@167 3725 if test -n "$DUMPBIN"; then :
cannam@167 3726 # Let the user override the test.
cannam@167 3727 else
cannam@167 3728 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
cannam@167 3729 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
cannam@167 3730 *COFF*)
cannam@167 3731 DUMPBIN="$DUMPBIN -symbols -headers"
cannam@167 3732 ;;
cannam@167 3733 *)
cannam@167 3734 DUMPBIN=:
cannam@167 3735 ;;
cannam@167 3736 esac
cannam@167 3737 fi
cannam@167 3738 AC_SUBST([DUMPBIN])
cannam@167 3739 if test : != "$DUMPBIN"; then
cannam@167 3740 NM=$DUMPBIN
cannam@167 3741 fi
cannam@167 3742 fi
cannam@167 3743 test -z "$NM" && NM=nm
cannam@167 3744 AC_SUBST([NM])
cannam@167 3745 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
cannam@167 3746
cannam@167 3747 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
cannam@167 3748 [lt_cv_nm_interface="BSD nm"
cannam@167 3749 echo "int some_variable = 0;" > conftest.$ac_ext
cannam@167 3750 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
cannam@167 3751 (eval "$ac_compile" 2>conftest.err)
cannam@167 3752 cat conftest.err >&AS_MESSAGE_LOG_FD
cannam@167 3753 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
cannam@167 3754 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cannam@167 3755 cat conftest.err >&AS_MESSAGE_LOG_FD
cannam@167 3756 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
cannam@167 3757 cat conftest.out >&AS_MESSAGE_LOG_FD
cannam@167 3758 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
cannam@167 3759 lt_cv_nm_interface="MS dumpbin"
cannam@167 3760 fi
cannam@167 3761 rm -f conftest*])
cannam@167 3762 ])# LT_PATH_NM
cannam@167 3763
cannam@167 3764 # Old names:
cannam@167 3765 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
cannam@167 3766 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
cannam@167 3767 dnl aclocal-1.4 backwards compatibility:
cannam@167 3768 dnl AC_DEFUN([AM_PROG_NM], [])
cannam@167 3769 dnl AC_DEFUN([AC_PROG_NM], [])
cannam@167 3770
cannam@167 3771 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
cannam@167 3772 # --------------------------------
cannam@167 3773 # how to determine the name of the shared library
cannam@167 3774 # associated with a specific link library.
cannam@167 3775 # -- PORTME fill in with the dynamic library characteristics
cannam@167 3776 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
cannam@167 3777 [m4_require([_LT_DECL_EGREP])
cannam@167 3778 m4_require([_LT_DECL_OBJDUMP])
cannam@167 3779 m4_require([_LT_DECL_DLLTOOL])
cannam@167 3780 AC_CACHE_CHECK([how to associate runtime and link libraries],
cannam@167 3781 lt_cv_sharedlib_from_linklib_cmd,
cannam@167 3782 [lt_cv_sharedlib_from_linklib_cmd='unknown'
cannam@167 3783
cannam@167 3784 case $host_os in
cannam@167 3785 cygwin* | mingw* | pw32* | cegcc*)
cannam@167 3786 # two different shell functions defined in ltmain.sh;
cannam@167 3787 # decide which one to use based on capabilities of $DLLTOOL
cannam@167 3788 case `$DLLTOOL --help 2>&1` in
cannam@167 3789 *--identify-strict*)
cannam@167 3790 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
cannam@167 3791 ;;
cannam@167 3792 *)
cannam@167 3793 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
cannam@167 3794 ;;
cannam@167 3795 esac
cannam@167 3796 ;;
cannam@167 3797 *)
cannam@167 3798 # fallback: assume linklib IS sharedlib
cannam@167 3799 lt_cv_sharedlib_from_linklib_cmd=$ECHO
cannam@167 3800 ;;
cannam@167 3801 esac
cannam@167 3802 ])
cannam@167 3803 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
cannam@167 3804 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
cannam@167 3805
cannam@167 3806 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
cannam@167 3807 [Command to associate shared and link libraries])
cannam@167 3808 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
cannam@167 3809
cannam@167 3810
cannam@167 3811 # _LT_PATH_MANIFEST_TOOL
cannam@167 3812 # ----------------------
cannam@167 3813 # locate the manifest tool
cannam@167 3814 m4_defun([_LT_PATH_MANIFEST_TOOL],
cannam@167 3815 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
cannam@167 3816 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
cannam@167 3817 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
cannam@167 3818 [lt_cv_path_mainfest_tool=no
cannam@167 3819 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
cannam@167 3820 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
cannam@167 3821 cat conftest.err >&AS_MESSAGE_LOG_FD
cannam@167 3822 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
cannam@167 3823 lt_cv_path_mainfest_tool=yes
cannam@167 3824 fi
cannam@167 3825 rm -f conftest*])
cannam@167 3826 if test yes != "$lt_cv_path_mainfest_tool"; then
cannam@167 3827 MANIFEST_TOOL=:
cannam@167 3828 fi
cannam@167 3829 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
cannam@167 3830 ])# _LT_PATH_MANIFEST_TOOL
cannam@167 3831
cannam@167 3832
cannam@167 3833 # _LT_DLL_DEF_P([FILE])
cannam@167 3834 # ---------------------
cannam@167 3835 # True iff FILE is a Windows DLL '.def' file.
cannam@167 3836 # Keep in sync with func_dll_def_p in the libtool script
cannam@167 3837 AC_DEFUN([_LT_DLL_DEF_P],
cannam@167 3838 [dnl
cannam@167 3839 test DEF = "`$SED -n dnl
cannam@167 3840 -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
cannam@167 3841 -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
cannam@167 3842 -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
cannam@167 3843 -e q dnl Only consider the first "real" line
cannam@167 3844 $1`" dnl
cannam@167 3845 ])# _LT_DLL_DEF_P
cannam@167 3846
cannam@167 3847
cannam@167 3848 # LT_LIB_M
cannam@167 3849 # --------
cannam@167 3850 # check for math library
cannam@167 3851 AC_DEFUN([LT_LIB_M],
cannam@167 3852 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
cannam@167 3853 LIBM=
cannam@167 3854 case $host in
cannam@167 3855 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
cannam@167 3856 # These system don't have libm, or don't need it
cannam@167 3857 ;;
cannam@167 3858 *-ncr-sysv4.3*)
cannam@167 3859 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
cannam@167 3860 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
cannam@167 3861 ;;
cannam@167 3862 *)
cannam@167 3863 AC_CHECK_LIB(m, cos, LIBM=-lm)
cannam@167 3864 ;;
cannam@167 3865 esac
cannam@167 3866 AC_SUBST([LIBM])
cannam@167 3867 ])# LT_LIB_M
cannam@167 3868
cannam@167 3869 # Old name:
cannam@167 3870 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
cannam@167 3871 dnl aclocal-1.4 backwards compatibility:
cannam@167 3872 dnl AC_DEFUN([AC_CHECK_LIBM], [])
cannam@167 3873
cannam@167 3874
cannam@167 3875 # _LT_COMPILER_NO_RTTI([TAGNAME])
cannam@167 3876 # -------------------------------
cannam@167 3877 m4_defun([_LT_COMPILER_NO_RTTI],
cannam@167 3878 [m4_require([_LT_TAG_COMPILER])dnl
cannam@167 3879
cannam@167 3880 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
cannam@167 3881
cannam@167 3882 if test yes = "$GCC"; then
cannam@167 3883 case $cc_basename in
cannam@167 3884 nvcc*)
cannam@167 3885 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
cannam@167 3886 *)
cannam@167 3887 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
cannam@167 3888 esac
cannam@167 3889
cannam@167 3890 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
cannam@167 3891 lt_cv_prog_compiler_rtti_exceptions,
cannam@167 3892 [-fno-rtti -fno-exceptions], [],
cannam@167 3893 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
cannam@167 3894 fi
cannam@167 3895 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
cannam@167 3896 [Compiler flag to turn off builtin functions])
cannam@167 3897 ])# _LT_COMPILER_NO_RTTI
cannam@167 3898
cannam@167 3899
cannam@167 3900 # _LT_CMD_GLOBAL_SYMBOLS
cannam@167 3901 # ----------------------
cannam@167 3902 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
cannam@167 3903 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
cannam@167 3904 AC_REQUIRE([AC_PROG_CC])dnl
cannam@167 3905 AC_REQUIRE([AC_PROG_AWK])dnl
cannam@167 3906 AC_REQUIRE([LT_PATH_NM])dnl
cannam@167 3907 AC_REQUIRE([LT_PATH_LD])dnl
cannam@167 3908 m4_require([_LT_DECL_SED])dnl
cannam@167 3909 m4_require([_LT_DECL_EGREP])dnl
cannam@167 3910 m4_require([_LT_TAG_COMPILER])dnl
cannam@167 3911
cannam@167 3912 # Check for command to grab the raw symbol name followed by C symbol from nm.
cannam@167 3913 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
cannam@167 3914 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
cannam@167 3915 [
cannam@167 3916 # These are sane defaults that work on at least a few old systems.
cannam@167 3917 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
cannam@167 3918
cannam@167 3919 # Character class describing NM global symbol codes.
cannam@167 3920 symcode='[[BCDEGRST]]'
cannam@167 3921
cannam@167 3922 # Regexp to match symbols that can be accessed directly from C.
cannam@167 3923 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
cannam@167 3924
cannam@167 3925 # Define system-specific variables.
cannam@167 3926 case $host_os in
cannam@167 3927 aix*)
cannam@167 3928 symcode='[[BCDT]]'
cannam@167 3929 ;;
cannam@167 3930 cygwin* | mingw* | pw32* | cegcc*)
cannam@167 3931 symcode='[[ABCDGISTW]]'
cannam@167 3932 ;;
cannam@167 3933 hpux*)
cannam@167 3934 if test ia64 = "$host_cpu"; then
cannam@167 3935 symcode='[[ABCDEGRST]]'
cannam@167 3936 fi
cannam@167 3937 ;;
cannam@167 3938 irix* | nonstopux*)
cannam@167 3939 symcode='[[BCDEGRST]]'
cannam@167 3940 ;;
cannam@167 3941 osf*)
cannam@167 3942 symcode='[[BCDEGQRST]]'
cannam@167 3943 ;;
cannam@167 3944 solaris*)
cannam@167 3945 symcode='[[BDRT]]'
cannam@167 3946 ;;
cannam@167 3947 sco3.2v5*)
cannam@167 3948 symcode='[[DT]]'
cannam@167 3949 ;;
cannam@167 3950 sysv4.2uw2*)
cannam@167 3951 symcode='[[DT]]'
cannam@167 3952 ;;
cannam@167 3953 sysv5* | sco5v6* | unixware* | OpenUNIX*)
cannam@167 3954 symcode='[[ABDT]]'
cannam@167 3955 ;;
cannam@167 3956 sysv4)
cannam@167 3957 symcode='[[DFNSTU]]'
cannam@167 3958 ;;
cannam@167 3959 esac
cannam@167 3960
cannam@167 3961 # If we're using GNU nm, then use its standard symbol codes.
cannam@167 3962 case `$NM -V 2>&1` in
cannam@167 3963 *GNU* | *'with BFD'*)
cannam@167 3964 symcode='[[ABCDGIRSTW]]' ;;
cannam@167 3965 esac
cannam@167 3966
cannam@167 3967 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
cannam@167 3968 # Gets list of data symbols to import.
cannam@167 3969 lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
cannam@167 3970 # Adjust the below global symbol transforms to fixup imported variables.
cannam@167 3971 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
cannam@167 3972 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
cannam@167 3973 lt_c_name_lib_hook="\
cannam@167 3974 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
cannam@167 3975 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
cannam@167 3976 else
cannam@167 3977 # Disable hooks by default.
cannam@167 3978 lt_cv_sys_global_symbol_to_import=
cannam@167 3979 lt_cdecl_hook=
cannam@167 3980 lt_c_name_hook=
cannam@167 3981 lt_c_name_lib_hook=
cannam@167 3982 fi
cannam@167 3983
cannam@167 3984 # Transform an extracted symbol line into a proper C declaration.
cannam@167 3985 # Some systems (esp. on ia64) link data and code symbols differently,
cannam@167 3986 # so use this general approach.
cannam@167 3987 lt_cv_sys_global_symbol_to_cdecl="sed -n"\
cannam@167 3988 $lt_cdecl_hook\
cannam@167 3989 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
cannam@167 3990 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
cannam@167 3991
cannam@167 3992 # Transform an extracted symbol line into symbol name and symbol address
cannam@167 3993 lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
cannam@167 3994 $lt_c_name_hook\
cannam@167 3995 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
cannam@167 3996 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
cannam@167 3997
cannam@167 3998 # Transform an extracted symbol line into symbol name with lib prefix and
cannam@167 3999 # symbol address.
cannam@167 4000 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
cannam@167 4001 $lt_c_name_lib_hook\
cannam@167 4002 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
cannam@167 4003 " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
cannam@167 4004 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
cannam@167 4005
cannam@167 4006 # Handle CRLF in mingw tool chain
cannam@167 4007 opt_cr=
cannam@167 4008 case $build_os in
cannam@167 4009 mingw*)
cannam@167 4010 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
cannam@167 4011 ;;
cannam@167 4012 esac
cannam@167 4013
cannam@167 4014 # Try without a prefix underscore, then with it.
cannam@167 4015 for ac_symprfx in "" "_"; do
cannam@167 4016
cannam@167 4017 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
cannam@167 4018 symxfrm="\\1 $ac_symprfx\\2 \\2"
cannam@167 4019
cannam@167 4020 # Write the raw and C identifiers.
cannam@167 4021 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
cannam@167 4022 # Fake it for dumpbin and say T for any non-static function,
cannam@167 4023 # D for any global variable and I for any imported variable.
cannam@167 4024 # Also find C++ and __fastcall symbols from MSVC++,
cannam@167 4025 # which start with @ or ?.
cannam@167 4026 lt_cv_sys_global_symbol_pipe="$AWK ['"\
cannam@167 4027 " {last_section=section; section=\$ 3};"\
cannam@167 4028 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
cannam@167 4029 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
cannam@167 4030 " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
cannam@167 4031 " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
cannam@167 4032 " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
cannam@167 4033 " \$ 0!~/External *\|/{next};"\
cannam@167 4034 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
cannam@167 4035 " {if(hide[section]) next};"\
cannam@167 4036 " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
cannam@167 4037 " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
cannam@167 4038 " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
cannam@167 4039 " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
cannam@167 4040 " ' prfx=^$ac_symprfx]"
cannam@167 4041 else
cannam@167 4042 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
cannam@167 4043 fi
cannam@167 4044 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
cannam@167 4045
cannam@167 4046 # Check to see that the pipe works correctly.
cannam@167 4047 pipe_works=no
cannam@167 4048
cannam@167 4049 rm -f conftest*
cannam@167 4050 cat > conftest.$ac_ext <<_LT_EOF
cannam@167 4051 #ifdef __cplusplus
cannam@167 4052 extern "C" {
cannam@167 4053 #endif
cannam@167 4054 char nm_test_var;
cannam@167 4055 void nm_test_func(void);
cannam@167 4056 void nm_test_func(void){}
cannam@167 4057 #ifdef __cplusplus
cannam@167 4058 }
cannam@167 4059 #endif
cannam@167 4060 int main(){nm_test_var='a';nm_test_func();return(0);}
cannam@167 4061 _LT_EOF
cannam@167 4062
cannam@167 4063 if AC_TRY_EVAL(ac_compile); then
cannam@167 4064 # Now try to grab the symbols.
cannam@167 4065 nlist=conftest.nm
cannam@167 4066 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
cannam@167 4067 # Try sorting and uniquifying the output.
cannam@167 4068 if sort "$nlist" | uniq > "$nlist"T; then
cannam@167 4069 mv -f "$nlist"T "$nlist"
cannam@167 4070 else
cannam@167 4071 rm -f "$nlist"T
cannam@167 4072 fi
cannam@167 4073
cannam@167 4074 # Make sure that we snagged all the symbols we need.
cannam@167 4075 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
cannam@167 4076 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
cannam@167 4077 cat <<_LT_EOF > conftest.$ac_ext
cannam@167 4078 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
cannam@167 4079 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
cannam@167 4080 /* DATA imports from DLLs on WIN32 can't be const, because runtime
cannam@167 4081 relocations are performed -- see ld's documentation on pseudo-relocs. */
cannam@167 4082 # define LT@&t@_DLSYM_CONST
cannam@167 4083 #elif defined __osf__
cannam@167 4084 /* This system does not cope well with relocations in const data. */
cannam@167 4085 # define LT@&t@_DLSYM_CONST
cannam@167 4086 #else
cannam@167 4087 # define LT@&t@_DLSYM_CONST const
cannam@167 4088 #endif
cannam@167 4089
cannam@167 4090 #ifdef __cplusplus
cannam@167 4091 extern "C" {
cannam@167 4092 #endif
cannam@167 4093
cannam@167 4094 _LT_EOF
cannam@167 4095 # Now generate the symbol file.
cannam@167 4096 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
cannam@167 4097
cannam@167 4098 cat <<_LT_EOF >> conftest.$ac_ext
cannam@167 4099
cannam@167 4100 /* The mapping between symbol names and symbols. */
cannam@167 4101 LT@&t@_DLSYM_CONST struct {
cannam@167 4102 const char *name;
cannam@167 4103 void *address;
cannam@167 4104 }
cannam@167 4105 lt__PROGRAM__LTX_preloaded_symbols[[]] =
cannam@167 4106 {
cannam@167 4107 { "@PROGRAM@", (void *) 0 },
cannam@167 4108 _LT_EOF
cannam@167 4109 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
cannam@167 4110 cat <<\_LT_EOF >> conftest.$ac_ext
cannam@167 4111 {0, (void *) 0}
cannam@167 4112 };
cannam@167 4113
cannam@167 4114 /* This works around a problem in FreeBSD linker */
cannam@167 4115 #ifdef FREEBSD_WORKAROUND
cannam@167 4116 static const void *lt_preloaded_setup() {
cannam@167 4117 return lt__PROGRAM__LTX_preloaded_symbols;
cannam@167 4118 }
cannam@167 4119 #endif
cannam@167 4120
cannam@167 4121 #ifdef __cplusplus
cannam@167 4122 }
cannam@167 4123 #endif
cannam@167 4124 _LT_EOF
cannam@167 4125 # Now try linking the two files.
cannam@167 4126 mv conftest.$ac_objext conftstm.$ac_objext
cannam@167 4127 lt_globsym_save_LIBS=$LIBS
cannam@167 4128 lt_globsym_save_CFLAGS=$CFLAGS
cannam@167 4129 LIBS=conftstm.$ac_objext
cannam@167 4130 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
cannam@167 4131 if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
cannam@167 4132 pipe_works=yes
cannam@167 4133 fi
cannam@167 4134 LIBS=$lt_globsym_save_LIBS
cannam@167 4135 CFLAGS=$lt_globsym_save_CFLAGS
cannam@167 4136 else
cannam@167 4137 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
cannam@167 4138 fi
cannam@167 4139 else
cannam@167 4140 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
cannam@167 4141 fi
cannam@167 4142 else
cannam@167 4143 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
cannam@167 4144 fi
cannam@167 4145 else
cannam@167 4146 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
cannam@167 4147 cat conftest.$ac_ext >&5
cannam@167 4148 fi
cannam@167 4149 rm -rf conftest* conftst*
cannam@167 4150
cannam@167 4151 # Do not use the global_symbol_pipe unless it works.
cannam@167 4152 if test yes = "$pipe_works"; then
cannam@167 4153 break
cannam@167 4154 else
cannam@167 4155 lt_cv_sys_global_symbol_pipe=
cannam@167 4156 fi
cannam@167 4157 done
cannam@167 4158 ])
cannam@167 4159 if test -z "$lt_cv_sys_global_symbol_pipe"; then
cannam@167 4160 lt_cv_sys_global_symbol_to_cdecl=
cannam@167 4161 fi
cannam@167 4162 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
cannam@167 4163 AC_MSG_RESULT(failed)
cannam@167 4164 else
cannam@167 4165 AC_MSG_RESULT(ok)
cannam@167 4166 fi
cannam@167 4167
cannam@167 4168 # Response file support.
cannam@167 4169 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
cannam@167 4170 nm_file_list_spec='@'
cannam@167 4171 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
cannam@167 4172 nm_file_list_spec='@'
cannam@167 4173 fi
cannam@167 4174
cannam@167 4175 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
cannam@167 4176 [Take the output of nm and produce a listing of raw symbols and C names])
cannam@167 4177 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
cannam@167 4178 [Transform the output of nm in a proper C declaration])
cannam@167 4179 _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
cannam@167 4180 [Transform the output of nm into a list of symbols to manually relocate])
cannam@167 4181 _LT_DECL([global_symbol_to_c_name_address],
cannam@167 4182 [lt_cv_sys_global_symbol_to_c_name_address], [1],
cannam@167 4183 [Transform the output of nm in a C name address pair])
cannam@167 4184 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
cannam@167 4185 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
cannam@167 4186 [Transform the output of nm in a C name address pair when lib prefix is needed])
cannam@167 4187 _LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
cannam@167 4188 [The name lister interface])
cannam@167 4189 _LT_DECL([], [nm_file_list_spec], [1],
cannam@167 4190 [Specify filename containing input files for $NM])
cannam@167 4191 ]) # _LT_CMD_GLOBAL_SYMBOLS
cannam@167 4192
cannam@167 4193
cannam@167 4194 # _LT_COMPILER_PIC([TAGNAME])
cannam@167 4195 # ---------------------------
cannam@167 4196 m4_defun([_LT_COMPILER_PIC],
cannam@167 4197 [m4_require([_LT_TAG_COMPILER])dnl
cannam@167 4198 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
cannam@167 4199 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
cannam@167 4200 _LT_TAGVAR(lt_prog_compiler_static, $1)=
cannam@167 4201
cannam@167 4202 m4_if([$1], [CXX], [
cannam@167 4203 # C++ specific cases for pic, static, wl, etc.
cannam@167 4204 if test yes = "$GXX"; then
cannam@167 4205 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@167 4206 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@167 4207
cannam@167 4208 case $host_os in
cannam@167 4209 aix*)
cannam@167 4210 # All AIX code is PIC.
cannam@167 4211 if test ia64 = "$host_cpu"; then
cannam@167 4212 # AIX 5 now supports IA64 processor
cannam@167 4213 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@167 4214 fi
cannam@167 4215 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@167 4216 ;;
cannam@167 4217
cannam@167 4218 amigaos*)
cannam@167 4219 case $host_cpu in
cannam@167 4220 powerpc)
cannam@167 4221 # see comment about AmigaOS4 .so support
cannam@167 4222 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@167 4223 ;;
cannam@167 4224 m68k)
cannam@167 4225 # FIXME: we need at least 68020 code to build shared libraries, but
cannam@167 4226 # adding the '-m68020' flag to GCC prevents building anything better,
cannam@167 4227 # like '-m68040'.
cannam@167 4228 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
cannam@167 4229 ;;
cannam@167 4230 esac
cannam@167 4231 ;;
cannam@167 4232
cannam@167 4233 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
cannam@167 4234 # PIC is the default for these OSes.
cannam@167 4235 ;;
cannam@167 4236 mingw* | cygwin* | os2* | pw32* | cegcc*)
cannam@167 4237 # This hack is so that the source file can tell whether it is being
cannam@167 4238 # built for inclusion in a dll (and should export symbols for example).
cannam@167 4239 # Although the cygwin gcc ignores -fPIC, still need this for old-style
cannam@167 4240 # (--disable-auto-import) libraries
cannam@167 4241 m4_if([$1], [GCJ], [],
cannam@167 4242 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
cannam@167 4243 case $host_os in
cannam@167 4244 os2*)
cannam@167 4245 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
cannam@167 4246 ;;
cannam@167 4247 esac
cannam@167 4248 ;;
cannam@167 4249 darwin* | rhapsody*)
cannam@167 4250 # PIC is the default on this platform
cannam@167 4251 # Common symbols not allowed in MH_DYLIB files
cannam@167 4252 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
cannam@167 4253 ;;
cannam@167 4254 *djgpp*)
cannam@167 4255 # DJGPP does not support shared libraries at all
cannam@167 4256 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
cannam@167 4257 ;;
cannam@167 4258 haiku*)
cannam@167 4259 # PIC is the default for Haiku.
cannam@167 4260 # The "-static" flag exists, but is broken.
cannam@167 4261 _LT_TAGVAR(lt_prog_compiler_static, $1)=
cannam@167 4262 ;;
cannam@167 4263 interix[[3-9]]*)
cannam@167 4264 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
cannam@167 4265 # Instead, we relocate shared libraries at runtime.
cannam@167 4266 ;;
cannam@167 4267 sysv4*MP*)
cannam@167 4268 if test -d /usr/nec; then
cannam@167 4269 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
cannam@167 4270 fi
cannam@167 4271 ;;
cannam@167 4272 hpux*)
cannam@167 4273 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
cannam@167 4274 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
cannam@167 4275 # sets the default TLS model and affects inlining.
cannam@167 4276 case $host_cpu in
cannam@167 4277 hppa*64*)
cannam@167 4278 ;;
cannam@167 4279 *)
cannam@167 4280 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@167 4281 ;;
cannam@167 4282 esac
cannam@167 4283 ;;
cannam@167 4284 *qnx* | *nto*)
cannam@167 4285 # QNX uses GNU C++, but need to define -shared option too, otherwise
cannam@167 4286 # it will coredump.
cannam@167 4287 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
cannam@167 4288 ;;
cannam@167 4289 *)
cannam@167 4290 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@167 4291 ;;
cannam@167 4292 esac
cannam@167 4293 else
cannam@167 4294 case $host_os in
cannam@167 4295 aix[[4-9]]*)
cannam@167 4296 # All AIX code is PIC.
cannam@167 4297 if test ia64 = "$host_cpu"; then
cannam@167 4298 # AIX 5 now supports IA64 processor
cannam@167 4299 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@167 4300 else
cannam@167 4301 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
cannam@167 4302 fi
cannam@167 4303 ;;
cannam@167 4304 chorus*)
cannam@167 4305 case $cc_basename in
cannam@167 4306 cxch68*)
cannam@167 4307 # Green Hills C++ Compiler
cannam@167 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@167 4309 ;;
cannam@167 4310 esac
cannam@167 4311 ;;
cannam@167 4312 mingw* | cygwin* | os2* | pw32* | cegcc*)
cannam@167 4313 # This hack is so that the source file can tell whether it is being
cannam@167 4314 # built for inclusion in a dll (and should export symbols for example).
cannam@167 4315 m4_if([$1], [GCJ], [],
cannam@167 4316 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
cannam@167 4317 ;;
cannam@167 4318 dgux*)
cannam@167 4319 case $cc_basename in
cannam@167 4320 ec++*)
cannam@167 4321 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@167 4322 ;;
cannam@167 4323 ghcx*)
cannam@167 4324 # Green Hills C++ Compiler
cannam@167 4325 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
cannam@167 4326 ;;
cannam@167 4327 *)
cannam@167 4328 ;;
cannam@167 4329 esac
cannam@167 4330 ;;
cannam@167 4331 freebsd* | dragonfly*)
cannam@167 4332 # FreeBSD uses GNU C++
cannam@167 4333 ;;
cannam@167 4334 hpux9* | hpux10* | hpux11*)
cannam@167 4335 case $cc_basename in
cannam@167 4336 CC*)
cannam@167 4337 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@167 4338 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
cannam@167 4339 if test ia64 != "$host_cpu"; then
cannam@167 4340 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
cannam@167 4341 fi
cannam@167 4342 ;;
cannam@167 4343 aCC*)
cannam@167 4344 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@167 4345 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
cannam@167 4346 case $host_cpu in
cannam@167 4347 hppa*64*|ia64*)
cannam@167 4348 # +Z the default
cannam@167 4349 ;;
cannam@167 4350 *)
cannam@167 4351 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
cannam@167 4352 ;;
cannam@167 4353 esac
cannam@167 4354 ;;
cannam@167 4355 *)
cannam@167 4356 ;;
cannam@167 4357 esac
cannam@167 4358 ;;
cannam@167 4359 interix*)
cannam@167 4360 # This is c89, which is MS Visual C++ (no shared libs)
cannam@167 4361 # Anyone wants to do a port?
cannam@167 4362 ;;
cannam@167 4363 irix5* | irix6* | nonstopux*)
cannam@167 4364 case $cc_basename in
cannam@167 4365 CC*)
cannam@167 4366 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@167 4367 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@167 4368 # CC pic flag -KPIC is the default.
cannam@167 4369 ;;
cannam@167 4370 *)
cannam@167 4371 ;;
cannam@167 4372 esac
cannam@167 4373 ;;
cannam@167 4374 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
cannam@167 4375 case $cc_basename in
cannam@167 4376 KCC*)
cannam@167 4377 # KAI C++ Compiler
cannam@167 4378 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
cannam@167 4379 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@167 4380 ;;
cannam@167 4381 ecpc* )
cannam@167 4382 # old Intel C++ for x86_64, which still supported -KPIC.
cannam@167 4383 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@167 4384 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@167 4385 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@167 4386 ;;
cannam@167 4387 icpc* )
cannam@167 4388 # Intel C++, used to be incompatible with GCC.
cannam@167 4389 # ICC 10 doesn't accept -KPIC any more.
cannam@167 4390 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@167 4391 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@167 4392 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@167 4393 ;;
cannam@167 4394 pgCC* | pgcpp*)
cannam@167 4395 # Portland Group C++ compiler
cannam@167 4396 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@167 4397 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
cannam@167 4398 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@167 4399 ;;
cannam@167 4400 cxx*)
cannam@167 4401 # Compaq C++
cannam@167 4402 # Make sure the PIC flag is empty. It appears that all Alpha
cannam@167 4403 # Linux and Compaq Tru64 Unix objects are PIC.
cannam@167 4404 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
cannam@167 4405 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@167 4406 ;;
cannam@167 4407 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
cannam@167 4408 # IBM XL 8.0, 9.0 on PPC and BlueGene
cannam@167 4409 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@167 4410 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
cannam@167 4411 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
cannam@167 4412 ;;
cannam@167 4413 *)
cannam@167 4414 case `$CC -V 2>&1 | sed 5q` in
cannam@167 4415 *Sun\ C*)
cannam@167 4416 # Sun C++ 5.9
cannam@167 4417 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@167 4418 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@167 4419 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
cannam@167 4420 ;;
cannam@167 4421 esac
cannam@167 4422 ;;
cannam@167 4423 esac
cannam@167 4424 ;;
cannam@167 4425 lynxos*)
cannam@167 4426 ;;
cannam@167 4427 m88k*)
cannam@167 4428 ;;
cannam@167 4429 mvs*)
cannam@167 4430 case $cc_basename in
cannam@167 4431 cxx*)
cannam@167 4432 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
cannam@167 4433 ;;
cannam@167 4434 *)
cannam@167 4435 ;;
cannam@167 4436 esac
cannam@167 4437 ;;
cannam@167 4438 netbsd* | netbsdelf*-gnu)
cannam@167 4439 ;;
cannam@167 4440 *qnx* | *nto*)
cannam@167 4441 # QNX uses GNU C++, but need to define -shared option too, otherwise
cannam@167 4442 # it will coredump.
cannam@167 4443 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
cannam@167 4444 ;;
cannam@167 4445 osf3* | osf4* | osf5*)
cannam@167 4446 case $cc_basename in
cannam@167 4447 KCC*)
cannam@167 4448 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
cannam@167 4449 ;;
cannam@167 4450 RCC*)
cannam@167 4451 # Rational C++ 2.4.1
cannam@167 4452 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
cannam@167 4453 ;;
cannam@167 4454 cxx*)
cannam@167 4455 # Digital/Compaq C++
cannam@167 4456 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@167 4457 # Make sure the PIC flag is empty. It appears that all Alpha
cannam@167 4458 # Linux and Compaq Tru64 Unix objects are PIC.
cannam@167 4459 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
cannam@167 4460 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@167 4461 ;;
cannam@167 4462 *)
cannam@167 4463 ;;
cannam@167 4464 esac
cannam@167 4465 ;;
cannam@167 4466 psos*)
cannam@167 4467 ;;
cannam@167 4468 solaris*)
cannam@167 4469 case $cc_basename in
cannam@167 4470 CC* | sunCC*)
cannam@167 4471 # Sun C++ 4.2, 5.x and Centerline C++
cannam@167 4472 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@167 4473 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@167 4474 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
cannam@167 4475 ;;
cannam@167 4476 gcx*)
cannam@167 4477 # Green Hills C++ Compiler
cannam@167 4478 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
cannam@167 4479 ;;
cannam@167 4480 *)
cannam@167 4481 ;;
cannam@167 4482 esac
cannam@167 4483 ;;
cannam@167 4484 sunos4*)
cannam@167 4485 case $cc_basename in
cannam@167 4486 CC*)
cannam@167 4487 # Sun C++ 4.x
cannam@167 4488 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
cannam@167 4489 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@167 4490 ;;
cannam@167 4491 lcc*)
cannam@167 4492 # Lucid
cannam@167 4493 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
cannam@167 4494 ;;
cannam@167 4495 *)
cannam@167 4496 ;;
cannam@167 4497 esac
cannam@167 4498 ;;
cannam@167 4499 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
cannam@167 4500 case $cc_basename in
cannam@167 4501 CC*)
cannam@167 4502 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@167 4503 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@167 4504 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@167 4505 ;;
cannam@167 4506 esac
cannam@167 4507 ;;
cannam@167 4508 tandem*)
cannam@167 4509 case $cc_basename in
cannam@167 4510 NCC*)
cannam@167 4511 # NonStop-UX NCC 3.20
cannam@167 4512 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@167 4513 ;;
cannam@167 4514 *)
cannam@167 4515 ;;
cannam@167 4516 esac
cannam@167 4517 ;;
cannam@167 4518 vxworks*)
cannam@167 4519 ;;
cannam@167 4520 *)
cannam@167 4521 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
cannam@167 4522 ;;
cannam@167 4523 esac
cannam@167 4524 fi
cannam@167 4525 ],
cannam@167 4526 [
cannam@167 4527 if test yes = "$GCC"; then
cannam@167 4528 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@167 4529 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@167 4530
cannam@167 4531 case $host_os in
cannam@167 4532 aix*)
cannam@167 4533 # All AIX code is PIC.
cannam@167 4534 if test ia64 = "$host_cpu"; then
cannam@167 4535 # AIX 5 now supports IA64 processor
cannam@167 4536 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@167 4537 fi
cannam@167 4538 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@167 4539 ;;
cannam@167 4540
cannam@167 4541 amigaos*)
cannam@167 4542 case $host_cpu in
cannam@167 4543 powerpc)
cannam@167 4544 # see comment about AmigaOS4 .so support
cannam@167 4545 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@167 4546 ;;
cannam@167 4547 m68k)
cannam@167 4548 # FIXME: we need at least 68020 code to build shared libraries, but
cannam@167 4549 # adding the '-m68020' flag to GCC prevents building anything better,
cannam@167 4550 # like '-m68040'.
cannam@167 4551 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
cannam@167 4552 ;;
cannam@167 4553 esac
cannam@167 4554 ;;
cannam@167 4555
cannam@167 4556 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
cannam@167 4557 # PIC is the default for these OSes.
cannam@167 4558 ;;
cannam@167 4559
cannam@167 4560 mingw* | cygwin* | pw32* | os2* | cegcc*)
cannam@167 4561 # This hack is so that the source file can tell whether it is being
cannam@167 4562 # built for inclusion in a dll (and should export symbols for example).
cannam@167 4563 # Although the cygwin gcc ignores -fPIC, still need this for old-style
cannam@167 4564 # (--disable-auto-import) libraries
cannam@167 4565 m4_if([$1], [GCJ], [],
cannam@167 4566 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
cannam@167 4567 case $host_os in
cannam@167 4568 os2*)
cannam@167 4569 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
cannam@167 4570 ;;
cannam@167 4571 esac
cannam@167 4572 ;;
cannam@167 4573
cannam@167 4574 darwin* | rhapsody*)
cannam@167 4575 # PIC is the default on this platform
cannam@167 4576 # Common symbols not allowed in MH_DYLIB files
cannam@167 4577 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
cannam@167 4578 ;;
cannam@167 4579
cannam@167 4580 haiku*)
cannam@167 4581 # PIC is the default for Haiku.
cannam@167 4582 # The "-static" flag exists, but is broken.
cannam@167 4583 _LT_TAGVAR(lt_prog_compiler_static, $1)=
cannam@167 4584 ;;
cannam@167 4585
cannam@167 4586 hpux*)
cannam@167 4587 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
cannam@167 4588 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
cannam@167 4589 # sets the default TLS model and affects inlining.
cannam@167 4590 case $host_cpu in
cannam@167 4591 hppa*64*)
cannam@167 4592 # +Z the default
cannam@167 4593 ;;
cannam@167 4594 *)
cannam@167 4595 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@167 4596 ;;
cannam@167 4597 esac
cannam@167 4598 ;;
cannam@167 4599
cannam@167 4600 interix[[3-9]]*)
cannam@167 4601 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
cannam@167 4602 # Instead, we relocate shared libraries at runtime.
cannam@167 4603 ;;
cannam@167 4604
cannam@167 4605 msdosdjgpp*)
cannam@167 4606 # Just because we use GCC doesn't mean we suddenly get shared libraries
cannam@167 4607 # on systems that don't support them.
cannam@167 4608 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
cannam@167 4609 enable_shared=no
cannam@167 4610 ;;
cannam@167 4611
cannam@167 4612 *nto* | *qnx*)
cannam@167 4613 # QNX uses GNU C++, but need to define -shared option too, otherwise
cannam@167 4614 # it will coredump.
cannam@167 4615 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
cannam@167 4616 ;;
cannam@167 4617
cannam@167 4618 sysv4*MP*)
cannam@167 4619 if test -d /usr/nec; then
cannam@167 4620 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
cannam@167 4621 fi
cannam@167 4622 ;;
cannam@167 4623
cannam@167 4624 *)
cannam@167 4625 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@167 4626 ;;
cannam@167 4627 esac
cannam@167 4628
cannam@167 4629 case $cc_basename in
cannam@167 4630 nvcc*) # Cuda Compiler Driver 2.2
cannam@167 4631 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
cannam@167 4632 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
cannam@167 4633 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
cannam@167 4634 fi
cannam@167 4635 ;;
cannam@167 4636 esac
cannam@167 4637 else
cannam@167 4638 # PORTME Check for flag to pass linker flags through the system compiler.
cannam@167 4639 case $host_os in
cannam@167 4640 aix*)
cannam@167 4641 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@167 4642 if test ia64 = "$host_cpu"; then
cannam@167 4643 # AIX 5 now supports IA64 processor
cannam@167 4644 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@167 4645 else
cannam@167 4646 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
cannam@167 4647 fi
cannam@167 4648 ;;
cannam@167 4649
cannam@167 4650 darwin* | rhapsody*)
cannam@167 4651 # PIC is the default on this platform
cannam@167 4652 # Common symbols not allowed in MH_DYLIB files
cannam@167 4653 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
cannam@167 4654 case $cc_basename in
cannam@167 4655 nagfor*)
cannam@167 4656 # NAG Fortran compiler
cannam@167 4657 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
cannam@167 4658 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
cannam@167 4659 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@167 4660 ;;
cannam@167 4661 esac
cannam@167 4662 ;;
cannam@167 4663
cannam@167 4664 mingw* | cygwin* | pw32* | os2* | cegcc*)
cannam@167 4665 # This hack is so that the source file can tell whether it is being
cannam@167 4666 # built for inclusion in a dll (and should export symbols for example).
cannam@167 4667 m4_if([$1], [GCJ], [],
cannam@167 4668 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
cannam@167 4669 case $host_os in
cannam@167 4670 os2*)
cannam@167 4671 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
cannam@167 4672 ;;
cannam@167 4673 esac
cannam@167 4674 ;;
cannam@167 4675
cannam@167 4676 hpux9* | hpux10* | hpux11*)
cannam@167 4677 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@167 4678 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
cannam@167 4679 # not for PA HP-UX.
cannam@167 4680 case $host_cpu in
cannam@167 4681 hppa*64*|ia64*)
cannam@167 4682 # +Z the default
cannam@167 4683 ;;
cannam@167 4684 *)
cannam@167 4685 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
cannam@167 4686 ;;
cannam@167 4687 esac
cannam@167 4688 # Is there a better lt_prog_compiler_static that works with the bundled CC?
cannam@167 4689 _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
cannam@167 4690 ;;
cannam@167 4691
cannam@167 4692 irix5* | irix6* | nonstopux*)
cannam@167 4693 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@167 4694 # PIC (with -KPIC) is the default.
cannam@167 4695 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@167 4696 ;;
cannam@167 4697
cannam@167 4698 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
cannam@167 4699 case $cc_basename in
cannam@167 4700 # old Intel for x86_64, which still supported -KPIC.
cannam@167 4701 ecc*)
cannam@167 4702 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@167 4703 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@167 4704 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@167 4705 ;;
cannam@167 4706 # icc used to be incompatible with GCC.
cannam@167 4707 # ICC 10 doesn't accept -KPIC any more.
cannam@167 4708 icc* | ifort*)
cannam@167 4709 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@167 4710 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@167 4711 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@167 4712 ;;
cannam@167 4713 # Lahey Fortran 8.1.
cannam@167 4714 lf95*)
cannam@167 4715 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@167 4716 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
cannam@167 4717 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
cannam@167 4718 ;;
cannam@167 4719 nagfor*)
cannam@167 4720 # NAG Fortran compiler
cannam@167 4721 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
cannam@167 4722 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
cannam@167 4723 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@167 4724 ;;
cannam@167 4725 tcc*)
cannam@167 4726 # Fabrice Bellard et al's Tiny C Compiler
cannam@167 4727 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@167 4728 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@167 4729 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@167 4730 ;;
cannam@167 4731 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
cannam@167 4732 # Portland Group compilers (*not* the Pentium gcc compiler,
cannam@167 4733 # which looks to be a dead project)
cannam@167 4734 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@167 4735 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
cannam@167 4736 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@167 4737 ;;
cannam@167 4738 ccc*)
cannam@167 4739 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@167 4740 # All Alpha code is PIC.
cannam@167 4741 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@167 4742 ;;
cannam@167 4743 xl* | bgxl* | bgf* | mpixl*)
cannam@167 4744 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
cannam@167 4745 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@167 4746 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
cannam@167 4747 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
cannam@167 4748 ;;
cannam@167 4749 *)
cannam@167 4750 case `$CC -V 2>&1 | sed 5q` in
cannam@167 4751 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
cannam@167 4752 # Sun Fortran 8.3 passes all unrecognized flags to the linker
cannam@167 4753 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@167 4754 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@167 4755 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
cannam@167 4756 ;;
cannam@167 4757 *Sun\ F* | *Sun*Fortran*)
cannam@167 4758 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@167 4759 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@167 4760 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
cannam@167 4761 ;;
cannam@167 4762 *Sun\ C*)
cannam@167 4763 # Sun C 5.9
cannam@167 4764 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@167 4765 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@167 4766 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@167 4767 ;;
cannam@167 4768 *Intel*\ [[CF]]*Compiler*)
cannam@167 4769 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@167 4770 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@167 4771 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@167 4772 ;;
cannam@167 4773 *Portland\ Group*)
cannam@167 4774 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@167 4775 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
cannam@167 4776 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@167 4777 ;;
cannam@167 4778 esac
cannam@167 4779 ;;
cannam@167 4780 esac
cannam@167 4781 ;;
cannam@167 4782
cannam@167 4783 newsos6)
cannam@167 4784 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@167 4785 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@167 4786 ;;
cannam@167 4787
cannam@167 4788 *nto* | *qnx*)
cannam@167 4789 # QNX uses GNU C++, but need to define -shared option too, otherwise
cannam@167 4790 # it will coredump.
cannam@167 4791 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
cannam@167 4792 ;;
cannam@167 4793
cannam@167 4794 osf3* | osf4* | osf5*)
cannam@167 4795 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@167 4796 # All OSF/1 code is PIC.
cannam@167 4797 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@167 4798 ;;
cannam@167 4799
cannam@167 4800 rdos*)
cannam@167 4801 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@167 4802 ;;
cannam@167 4803
cannam@167 4804 solaris*)
cannam@167 4805 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@167 4806 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@167 4807 case $cc_basename in
cannam@167 4808 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
cannam@167 4809 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
cannam@167 4810 *)
cannam@167 4811 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
cannam@167 4812 esac
cannam@167 4813 ;;
cannam@167 4814
cannam@167 4815 sunos4*)
cannam@167 4816 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
cannam@167 4817 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
cannam@167 4818 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@167 4819 ;;
cannam@167 4820
cannam@167 4821 sysv4 | sysv4.2uw2* | sysv4.3*)
cannam@167 4822 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@167 4823 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@167 4824 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@167 4825 ;;
cannam@167 4826
cannam@167 4827 sysv4*MP*)
cannam@167 4828 if test -d /usr/nec; then
cannam@167 4829 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
cannam@167 4830 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@167 4831 fi
cannam@167 4832 ;;
cannam@167 4833
cannam@167 4834 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
cannam@167 4835 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@167 4836 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@167 4837 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@167 4838 ;;
cannam@167 4839
cannam@167 4840 unicos*)
cannam@167 4841 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@167 4842 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
cannam@167 4843 ;;
cannam@167 4844
cannam@167 4845 uts4*)
cannam@167 4846 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
cannam@167 4847 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@167 4848 ;;
cannam@167 4849
cannam@167 4850 *)
cannam@167 4851 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
cannam@167 4852 ;;
cannam@167 4853 esac
cannam@167 4854 fi
cannam@167 4855 ])
cannam@167 4856 case $host_os in
cannam@167 4857 # For platforms that do not support PIC, -DPIC is meaningless:
cannam@167 4858 *djgpp*)
cannam@167 4859 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
cannam@167 4860 ;;
cannam@167 4861 *)
cannam@167 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@167 4863 ;;
cannam@167 4864 esac
cannam@167 4865
cannam@167 4866 AC_CACHE_CHECK([for $compiler option to produce PIC],
cannam@167 4867 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
cannam@167 4868 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
cannam@167 4869 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
cannam@167 4870
cannam@167 4871 #
cannam@167 4872 # Check to make sure the PIC flag actually works.
cannam@167 4873 #
cannam@167 4874 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
cannam@167 4875 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
cannam@167 4876 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
cannam@167 4877 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
cannam@167 4878 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
cannam@167 4879 "" | " "*) ;;
cannam@167 4880 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
cannam@167 4881 esac],
cannam@167 4882 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
cannam@167 4883 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
cannam@167 4884 fi
cannam@167 4885 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
cannam@167 4886 [Additional compiler flags for building library objects])
cannam@167 4887
cannam@167 4888 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
cannam@167 4889 [How to pass a linker flag through the compiler])
cannam@167 4890 #
cannam@167 4891 # Check to make sure the static flag actually works.
cannam@167 4892 #
cannam@167 4893 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
cannam@167 4894 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
cannam@167 4895 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
cannam@167 4896 $lt_tmp_static_flag,
cannam@167 4897 [],
cannam@167 4898 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
cannam@167 4899 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
cannam@167 4900 [Compiler flag to prevent dynamic linking])
cannam@167 4901 ])# _LT_COMPILER_PIC
cannam@167 4902
cannam@167 4903
cannam@167 4904 # _LT_LINKER_SHLIBS([TAGNAME])
cannam@167 4905 # ----------------------------
cannam@167 4906 # See if the linker supports building shared libraries.
cannam@167 4907 m4_defun([_LT_LINKER_SHLIBS],
cannam@167 4908 [AC_REQUIRE([LT_PATH_LD])dnl
cannam@167 4909 AC_REQUIRE([LT_PATH_NM])dnl
cannam@167 4910 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
cannam@167 4911 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@167 4912 m4_require([_LT_DECL_EGREP])dnl
cannam@167 4913 m4_require([_LT_DECL_SED])dnl
cannam@167 4914 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
cannam@167 4915 m4_require([_LT_TAG_COMPILER])dnl
cannam@167 4916 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
cannam@167 4917 m4_if([$1], [CXX], [
cannam@167 4918 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
cannam@167 4919 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
cannam@167 4920 case $host_os in
cannam@167 4921 aix[[4-9]]*)
cannam@167 4922 # If we're using GNU nm, then we don't want the "-C" option.
cannam@167 4923 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
cannam@167 4924 # Without the "-l" option, or with the "-B" option, AIX nm treats
cannam@167 4925 # weak defined symbols like other global defined symbols, whereas
cannam@167 4926 # GNU nm marks them as "W".
cannam@167 4927 # While the 'weak' keyword is ignored in the Export File, we need
cannam@167 4928 # it in the Import File for the 'aix-soname' feature, so we have
cannam@167 4929 # to replace the "-B" option with "-P" for AIX nm.
cannam@167 4930 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
cannam@167 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@167 4932 else
cannam@167 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@167 4934 fi
cannam@167 4935 ;;
cannam@167 4936 pw32*)
cannam@167 4937 _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
cannam@167 4938 ;;
cannam@167 4939 cygwin* | mingw* | cegcc*)
cannam@167 4940 case $cc_basename in
cannam@167 4941 cl*)
cannam@167 4942 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
cannam@167 4943 ;;
cannam@167 4944 *)
cannam@167 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@167 4946 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
cannam@167 4947 ;;
cannam@167 4948 esac
cannam@167 4949 ;;
cannam@167 4950 linux* | k*bsd*-gnu | gnu*)
cannam@167 4951 _LT_TAGVAR(link_all_deplibs, $1)=no
cannam@167 4952 ;;
cannam@167 4953 *)
cannam@167 4954 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
cannam@167 4955 ;;
cannam@167 4956 esac
cannam@167 4957 ], [
cannam@167 4958 runpath_var=
cannam@167 4959 _LT_TAGVAR(allow_undefined_flag, $1)=
cannam@167 4960 _LT_TAGVAR(always_export_symbols, $1)=no
cannam@167 4961 _LT_TAGVAR(archive_cmds, $1)=
cannam@167 4962 _LT_TAGVAR(archive_expsym_cmds, $1)=
cannam@167 4963 _LT_TAGVAR(compiler_needs_object, $1)=no
cannam@167 4964 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
cannam@167 4965 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
cannam@167 4966 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
cannam@167 4967 _LT_TAGVAR(hardcode_automatic, $1)=no
cannam@167 4968 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@167 4969 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
cannam@167 4970 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
cannam@167 4971 _LT_TAGVAR(hardcode_libdir_separator, $1)=
cannam@167 4972 _LT_TAGVAR(hardcode_minus_L, $1)=no
cannam@167 4973 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
cannam@167 4974 _LT_TAGVAR(inherit_rpath, $1)=no
cannam@167 4975 _LT_TAGVAR(link_all_deplibs, $1)=unknown
cannam@167 4976 _LT_TAGVAR(module_cmds, $1)=
cannam@167 4977 _LT_TAGVAR(module_expsym_cmds, $1)=
cannam@167 4978 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
cannam@167 4979 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
cannam@167 4980 _LT_TAGVAR(thread_safe_flag_spec, $1)=
cannam@167 4981 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@167 4982 # include_expsyms should be a list of space-separated symbols to be *always*
cannam@167 4983 # included in the symbol list
cannam@167 4984 _LT_TAGVAR(include_expsyms, $1)=
cannam@167 4985 # exclude_expsyms can be an extended regexp of symbols to exclude
cannam@167 4986 # it will be wrapped by ' (' and ')$', so one must not match beginning or
cannam@167 4987 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
cannam@167 4988 # as well as any symbol that contains 'd'.
cannam@167 4989 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
cannam@167 4990 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
cannam@167 4991 # platforms (ab)use it in PIC code, but their linkers get confused if
cannam@167 4992 # the symbol is explicitly referenced. Since portable code cannot
cannam@167 4993 # rely on this symbol name, it's probably fine to never include it in
cannam@167 4994 # preloaded symbol tables.
cannam@167 4995 # Exclude shared library initialization/finalization symbols.
cannam@167 4996 dnl Note also adjust exclude_expsyms for C++ above.
cannam@167 4997 extract_expsyms_cmds=
cannam@167 4998
cannam@167 4999 case $host_os in
cannam@167 5000 cygwin* | mingw* | pw32* | cegcc*)
cannam@167 5001 # FIXME: the MSVC++ port hasn't been tested in a loooong time
cannam@167 5002 # When not using gcc, we currently assume that we are using
cannam@167 5003 # Microsoft Visual C++.
cannam@167 5004 if test yes != "$GCC"; then
cannam@167 5005 with_gnu_ld=no
cannam@167 5006 fi
cannam@167 5007 ;;
cannam@167 5008 interix*)
cannam@167 5009 # we just hope/assume this is gcc and not c89 (= MSVC++)
cannam@167 5010 with_gnu_ld=yes
cannam@167 5011 ;;
cannam@167 5012 openbsd* | bitrig*)
cannam@167 5013 with_gnu_ld=no
cannam@167 5014 ;;
cannam@167 5015 linux* | k*bsd*-gnu | gnu*)
cannam@167 5016 _LT_TAGVAR(link_all_deplibs, $1)=no
cannam@167 5017 ;;
cannam@167 5018 esac
cannam@167 5019
cannam@167 5020 _LT_TAGVAR(ld_shlibs, $1)=yes
cannam@167 5021
cannam@167 5022 # On some targets, GNU ld is compatible enough with the native linker
cannam@167 5023 # that we're better off using the native interface for both.
cannam@167 5024 lt_use_gnu_ld_interface=no
cannam@167 5025 if test yes = "$with_gnu_ld"; then
cannam@167 5026 case $host_os in
cannam@167 5027 aix*)
cannam@167 5028 # The AIX port of GNU ld has always aspired to compatibility
cannam@167 5029 # with the native linker. However, as the warning in the GNU ld
cannam@167 5030 # block says, versions before 2.19.5* couldn't really create working
cannam@167 5031 # shared libraries, regardless of the interface used.
cannam@167 5032 case `$LD -v 2>&1` in
cannam@167 5033 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
cannam@167 5034 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
cannam@167 5035 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
cannam@167 5036 *)
cannam@167 5037 lt_use_gnu_ld_interface=yes
cannam@167 5038 ;;
cannam@167 5039 esac
cannam@167 5040 ;;
cannam@167 5041 *)
cannam@167 5042 lt_use_gnu_ld_interface=yes
cannam@167 5043 ;;
cannam@167 5044 esac
cannam@167 5045 fi
cannam@167 5046
cannam@167 5047 if test yes = "$lt_use_gnu_ld_interface"; then
cannam@167 5048 # If archive_cmds runs LD, not CC, wlarc should be empty
cannam@167 5049 wlarc='$wl'
cannam@167 5050
cannam@167 5051 # Set some defaults for GNU ld with shared library support. These
cannam@167 5052 # are reset later if shared libraries are not supported. Putting them
cannam@167 5053 # here allows them to be overridden if necessary.
cannam@167 5054 runpath_var=LD_RUN_PATH
cannam@167 5055 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@167 5056 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
cannam@167 5057 # ancient GNU ld didn't support --whole-archive et. al.
cannam@167 5058 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
cannam@167 5059 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
cannam@167 5060 else
cannam@167 5061 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@167 5062 fi
cannam@167 5063 supports_anon_versioning=no
cannam@167 5064 case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
cannam@167 5065 *GNU\ gold*) supports_anon_versioning=yes ;;
cannam@167 5066 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
cannam@167 5067 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
cannam@167 5068 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
cannam@167 5069 *\ 2.11.*) ;; # other 2.11 versions
cannam@167 5070 *) supports_anon_versioning=yes ;;
cannam@167 5071 esac
cannam@167 5072
cannam@167 5073 # See if GNU ld supports shared libraries.
cannam@167 5074 case $host_os in
cannam@167 5075 aix[[3-9]]*)
cannam@167 5076 # On AIX/PPC, the GNU linker is very broken
cannam@167 5077 if test ia64 != "$host_cpu"; then
cannam@167 5078 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 5079 cat <<_LT_EOF 1>&2
cannam@167 5080
cannam@167 5081 *** Warning: the GNU linker, at least up to release 2.19, is reported
cannam@167 5082 *** to be unable to reliably create shared libraries on AIX.
cannam@167 5083 *** Therefore, libtool is disabling shared libraries support. If you
cannam@167 5084 *** really care for shared libraries, you may want to install binutils
cannam@167 5085 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
cannam@167 5086 *** You will then need to restart the configuration process.
cannam@167 5087
cannam@167 5088 _LT_EOF
cannam@167 5089 fi
cannam@167 5090 ;;
cannam@167 5091
cannam@167 5092 amigaos*)
cannam@167 5093 case $host_cpu in
cannam@167 5094 powerpc)
cannam@167 5095 # see comment about AmigaOS4 .so support
cannam@167 5096 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@167 5097 _LT_TAGVAR(archive_expsym_cmds, $1)=''
cannam@167 5098 ;;
cannam@167 5099 m68k)
cannam@167 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@167 5101 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@167 5102 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@167 5103 ;;
cannam@167 5104 esac
cannam@167 5105 ;;
cannam@167 5106
cannam@167 5107 beos*)
cannam@167 5108 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
cannam@167 5109 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@167 5110 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
cannam@167 5111 # support --undefined. This deserves some investigation. FIXME
cannam@167 5112 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@167 5113 else
cannam@167 5114 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 5115 fi
cannam@167 5116 ;;
cannam@167 5117
cannam@167 5118 cygwin* | mingw* | pw32* | cegcc*)
cannam@167 5119 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
cannam@167 5120 # as there is no search path for DLLs.
cannam@167 5121 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@167 5122 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
cannam@167 5123 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@167 5124 _LT_TAGVAR(always_export_symbols, $1)=no
cannam@167 5125 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@167 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@167 5127 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
cannam@167 5128
cannam@167 5129 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
cannam@167 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@167 5131 # If the export-symbols file already is a .def file, use it as
cannam@167 5132 # is; otherwise, prepend EXPORTS...
cannam@167 5133 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
cannam@167 5134 cp $export_symbols $output_objdir/$soname.def;
cannam@167 5135 else
cannam@167 5136 echo EXPORTS > $output_objdir/$soname.def;
cannam@167 5137 cat $export_symbols >> $output_objdir/$soname.def;
cannam@167 5138 fi~
cannam@167 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@167 5140 else
cannam@167 5141 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 5142 fi
cannam@167 5143 ;;
cannam@167 5144
cannam@167 5145 haiku*)
cannam@167 5146 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@167 5147 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@167 5148 ;;
cannam@167 5149
cannam@167 5150 os2*)
cannam@167 5151 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@167 5152 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@167 5153 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@167 5154 shrext_cmds=.dll
cannam@167 5155 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
cannam@167 5156 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
cannam@167 5157 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
cannam@167 5158 $ECHO EXPORTS >> $output_objdir/$libname.def~
cannam@167 5159 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
cannam@167 5160 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
cannam@167 5161 emximp -o $lib $output_objdir/$libname.def'
cannam@167 5162 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
cannam@167 5163 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
cannam@167 5164 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
cannam@167 5165 $ECHO EXPORTS >> $output_objdir/$libname.def~
cannam@167 5166 prefix_cmds="$SED"~
cannam@167 5167 if test EXPORTS = "`$SED 1q $export_symbols`"; then
cannam@167 5168 prefix_cmds="$prefix_cmds -e 1d";
cannam@167 5169 fi~
cannam@167 5170 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
cannam@167 5171 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
cannam@167 5172 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
cannam@167 5173 emximp -o $lib $output_objdir/$libname.def'
cannam@167 5174 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
cannam@167 5175 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@167 5176 ;;
cannam@167 5177
cannam@167 5178 interix[[3-9]]*)
cannam@167 5179 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@167 5180 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@167 5181 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
cannam@167 5182 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
cannam@167 5183 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
cannam@167 5184 # Instead, shared libraries are loaded at an image base (0x10000000 by
cannam@167 5185 # default) and relocated if they conflict, which is a slow very memory
cannam@167 5186 # consuming and fragmenting process. To avoid this, we pick a random,
cannam@167 5187 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
cannam@167 5188 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
cannam@167 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@167 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@167 5191 ;;
cannam@167 5192
cannam@167 5193 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
cannam@167 5194 tmp_diet=no
cannam@167 5195 if test linux-dietlibc = "$host_os"; then
cannam@167 5196 case $cc_basename in
cannam@167 5197 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
cannam@167 5198 esac
cannam@167 5199 fi
cannam@167 5200 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
cannam@167 5201 && test no = "$tmp_diet"
cannam@167 5202 then
cannam@167 5203 tmp_addflag=' $pic_flag'
cannam@167 5204 tmp_sharedflag='-shared'
cannam@167 5205 case $cc_basename,$host_cpu in
cannam@167 5206 pgcc*) # Portland Group C compiler
cannam@167 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@167 5208 tmp_addflag=' $pic_flag'
cannam@167 5209 ;;
cannam@167 5210 pgf77* | pgf90* | pgf95* | pgfortran*)
cannam@167 5211 # Portland Group f77 and f90 compilers
cannam@167 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@167 5213 tmp_addflag=' $pic_flag -Mnomain' ;;
cannam@167 5214 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
cannam@167 5215 tmp_addflag=' -i_dynamic' ;;
cannam@167 5216 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
cannam@167 5217 tmp_addflag=' -i_dynamic -nofor_main' ;;
cannam@167 5218 ifc* | ifort*) # Intel Fortran compiler
cannam@167 5219 tmp_addflag=' -nofor_main' ;;
cannam@167 5220 lf95*) # Lahey Fortran 8.1
cannam@167 5221 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@167 5222 tmp_sharedflag='--shared' ;;
cannam@167 5223 nagfor*) # NAGFOR 5.3
cannam@167 5224 tmp_sharedflag='-Wl,-shared' ;;
cannam@167 5225 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
cannam@167 5226 tmp_sharedflag='-qmkshrobj'
cannam@167 5227 tmp_addflag= ;;
cannam@167 5228 nvcc*) # Cuda Compiler Driver 2.2
cannam@167 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@167 5230 _LT_TAGVAR(compiler_needs_object, $1)=yes
cannam@167 5231 ;;
cannam@167 5232 esac
cannam@167 5233 case `$CC -V 2>&1 | sed 5q` in
cannam@167 5234 *Sun\ C*) # Sun C 5.9
cannam@167 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@167 5236 _LT_TAGVAR(compiler_needs_object, $1)=yes
cannam@167 5237 tmp_sharedflag='-G' ;;
cannam@167 5238 *Sun\ F*) # Sun Fortran 8.3
cannam@167 5239 tmp_sharedflag='-G' ;;
cannam@167 5240 esac
cannam@167 5241 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@167 5242
cannam@167 5243 if test yes = "$supports_anon_versioning"; then
cannam@167 5244 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
cannam@167 5245 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
cannam@167 5246 echo "local: *; };" >> $output_objdir/$libname.ver~
cannam@167 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@167 5248 fi
cannam@167 5249
cannam@167 5250 case $cc_basename in
cannam@167 5251 tcc*)
cannam@167 5252 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
cannam@167 5253 ;;
cannam@167 5254 xlf* | bgf* | bgxlf* | mpixlf*)
cannam@167 5255 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
cannam@167 5256 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
cannam@167 5257 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@167 5258 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
cannam@167 5259 if test yes = "$supports_anon_versioning"; then
cannam@167 5260 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
cannam@167 5261 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
cannam@167 5262 echo "local: *; };" >> $output_objdir/$libname.ver~
cannam@167 5263 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
cannam@167 5264 fi
cannam@167 5265 ;;
cannam@167 5266 esac
cannam@167 5267 else
cannam@167 5268 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 5269 fi
cannam@167 5270 ;;
cannam@167 5271
cannam@167 5272 netbsd* | netbsdelf*-gnu)
cannam@167 5273 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
cannam@167 5274 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
cannam@167 5275 wlarc=
cannam@167 5276 else
cannam@167 5277 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@167 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@167 5279 fi
cannam@167 5280 ;;
cannam@167 5281
cannam@167 5282 solaris*)
cannam@167 5283 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
cannam@167 5284 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 5285 cat <<_LT_EOF 1>&2
cannam@167 5286
cannam@167 5287 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
cannam@167 5288 *** create shared libraries on Solaris systems. Therefore, libtool
cannam@167 5289 *** is disabling shared libraries support. We urge you to upgrade GNU
cannam@167 5290 *** binutils to release 2.9.1 or newer. Another option is to modify
cannam@167 5291 *** your PATH or compiler configuration so that the native linker is
cannam@167 5292 *** used, and then restart.
cannam@167 5293
cannam@167 5294 _LT_EOF
cannam@167 5295 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
cannam@167 5296 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@167 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@167 5298 else
cannam@167 5299 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 5300 fi
cannam@167 5301 ;;
cannam@167 5302
cannam@167 5303 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
cannam@167 5304 case `$LD -v 2>&1` in
cannam@167 5305 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
cannam@167 5306 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 5307 cat <<_LT_EOF 1>&2
cannam@167 5308
cannam@167 5309 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
cannam@167 5310 *** reliably create shared libraries on SCO systems. Therefore, libtool
cannam@167 5311 *** is disabling shared libraries support. We urge you to upgrade GNU
cannam@167 5312 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
cannam@167 5313 *** your PATH or compiler configuration so that the native linker is
cannam@167 5314 *** used, and then restart.
cannam@167 5315
cannam@167 5316 _LT_EOF
cannam@167 5317 ;;
cannam@167 5318 *)
cannam@167 5319 # For security reasons, it is highly recommended that you always
cannam@167 5320 # use absolute paths for naming shared libraries, and exclude the
cannam@167 5321 # DT_RUNPATH tag from executables and libraries. But doing so
cannam@167 5322 # requires that you compile everything twice, which is a pain.
cannam@167 5323 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
cannam@167 5324 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@167 5325 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@167 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@167 5327 else
cannam@167 5328 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 5329 fi
cannam@167 5330 ;;
cannam@167 5331 esac
cannam@167 5332 ;;
cannam@167 5333
cannam@167 5334 sunos4*)
cannam@167 5335 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
cannam@167 5336 wlarc=
cannam@167 5337 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@167 5338 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@167 5339 ;;
cannam@167 5340
cannam@167 5341 *)
cannam@167 5342 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
cannam@167 5343 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@167 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@167 5345 else
cannam@167 5346 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 5347 fi
cannam@167 5348 ;;
cannam@167 5349 esac
cannam@167 5350
cannam@167 5351 if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
cannam@167 5352 runpath_var=
cannam@167 5353 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
cannam@167 5354 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
cannam@167 5355 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@167 5356 fi
cannam@167 5357 else
cannam@167 5358 # PORTME fill in a description of your system's linker (not GNU ld)
cannam@167 5359 case $host_os in
cannam@167 5360 aix3*)
cannam@167 5361 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@167 5362 _LT_TAGVAR(always_export_symbols, $1)=yes
cannam@167 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@167 5364 # Note: this linker hardcodes the directories in LIBPATH if there
cannam@167 5365 # are no directories specified by -L.
cannam@167 5366 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@167 5367 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
cannam@167 5368 # Neither direct hardcoding nor static linking is supported with a
cannam@167 5369 # broken collect2.
cannam@167 5370 _LT_TAGVAR(hardcode_direct, $1)=unsupported
cannam@167 5371 fi
cannam@167 5372 ;;
cannam@167 5373
cannam@167 5374 aix[[4-9]]*)
cannam@167 5375 if test ia64 = "$host_cpu"; then
cannam@167 5376 # On IA64, the linker does run time linking by default, so we don't
cannam@167 5377 # have to do anything special.
cannam@167 5378 aix_use_runtimelinking=no
cannam@167 5379 exp_sym_flag='-Bexport'
cannam@167 5380 no_entry_flag=
cannam@167 5381 else
cannam@167 5382 # If we're using GNU nm, then we don't want the "-C" option.
cannam@167 5383 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
cannam@167 5384 # Without the "-l" option, or with the "-B" option, AIX nm treats
cannam@167 5385 # weak defined symbols like other global defined symbols, whereas
cannam@167 5386 # GNU nm marks them as "W".
cannam@167 5387 # While the 'weak' keyword is ignored in the Export File, we need
cannam@167 5388 # it in the Import File for the 'aix-soname' feature, so we have
cannam@167 5389 # to replace the "-B" option with "-P" for AIX nm.
cannam@167 5390 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
cannam@167 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@167 5392 else
cannam@167 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@167 5394 fi
cannam@167 5395 aix_use_runtimelinking=no
cannam@167 5396
cannam@167 5397 # Test if we are trying to use run time linking or normal
cannam@167 5398 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
cannam@167 5399 # have runtime linking enabled, and use it for executables.
cannam@167 5400 # For shared libraries, we enable/disable runtime linking
cannam@167 5401 # depending on the kind of the shared library created -
cannam@167 5402 # when "with_aix_soname,aix_use_runtimelinking" is:
cannam@167 5403 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
cannam@167 5404 # "aix,yes" lib.so shared, rtl:yes, for executables
cannam@167 5405 # lib.a static archive
cannam@167 5406 # "both,no" lib.so.V(shr.o) shared, rtl:yes
cannam@167 5407 # lib.a(lib.so.V) shared, rtl:no, for executables
cannam@167 5408 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
cannam@167 5409 # lib.a(lib.so.V) shared, rtl:no
cannam@167 5410 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
cannam@167 5411 # lib.a static archive
cannam@167 5412 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
cannam@167 5413 for ld_flag in $LDFLAGS; do
cannam@167 5414 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
cannam@167 5415 aix_use_runtimelinking=yes
cannam@167 5416 break
cannam@167 5417 fi
cannam@167 5418 done
cannam@167 5419 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
cannam@167 5420 # With aix-soname=svr4, we create the lib.so.V shared archives only,
cannam@167 5421 # so we don't have lib.a shared libs to link our executables.
cannam@167 5422 # We have to force runtime linking in this case.
cannam@167 5423 aix_use_runtimelinking=yes
cannam@167 5424 LDFLAGS="$LDFLAGS -Wl,-brtl"
cannam@167 5425 fi
cannam@167 5426 ;;
cannam@167 5427 esac
cannam@167 5428
cannam@167 5429 exp_sym_flag='-bexport'
cannam@167 5430 no_entry_flag='-bnoentry'
cannam@167 5431 fi
cannam@167 5432
cannam@167 5433 # When large executables or shared objects are built, AIX ld can
cannam@167 5434 # have problems creating the table of contents. If linking a library
cannam@167 5435 # or program results in "error TOC overflow" add -mminimal-toc to
cannam@167 5436 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
cannam@167 5437 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
cannam@167 5438
cannam@167 5439 _LT_TAGVAR(archive_cmds, $1)=''
cannam@167 5440 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@167 5441 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
cannam@167 5442 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
cannam@167 5443 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@167 5444 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
cannam@167 5445 case $with_aix_soname,$aix_use_runtimelinking in
cannam@167 5446 aix,*) ;; # traditional, no import file
cannam@167 5447 svr4,* | *,yes) # use import file
cannam@167 5448 # The Import File defines what to hardcode.
cannam@167 5449 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@167 5450 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
cannam@167 5451 ;;
cannam@167 5452 esac
cannam@167 5453
cannam@167 5454 if test yes = "$GCC"; then
cannam@167 5455 case $host_os in aix4.[[012]]|aix4.[[012]].*)
cannam@167 5456 # We only want to do this on AIX 4.2 and lower, the check
cannam@167 5457 # below for broken collect2 doesn't work under 4.3+
cannam@167 5458 collect2name=`$CC -print-prog-name=collect2`
cannam@167 5459 if test -f "$collect2name" &&
cannam@167 5460 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
cannam@167 5461 then
cannam@167 5462 # We have reworked collect2
cannam@167 5463 :
cannam@167 5464 else
cannam@167 5465 # We have old collect2
cannam@167 5466 _LT_TAGVAR(hardcode_direct, $1)=unsupported
cannam@167 5467 # It fails to find uninstalled libraries when the uninstalled
cannam@167 5468 # path is not listed in the libpath. Setting hardcode_minus_L
cannam@167 5469 # to unsupported forces relinking
cannam@167 5470 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@167 5471 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@167 5472 _LT_TAGVAR(hardcode_libdir_separator, $1)=
cannam@167 5473 fi
cannam@167 5474 ;;
cannam@167 5475 esac
cannam@167 5476 shared_flag='-shared'
cannam@167 5477 if test yes = "$aix_use_runtimelinking"; then
cannam@167 5478 shared_flag="$shared_flag "'$wl-G'
cannam@167 5479 fi
cannam@167 5480 # Need to ensure runtime linking is disabled for the traditional
cannam@167 5481 # shared library, or the linker may eventually find shared libraries
cannam@167 5482 # /with/ Import File - we do not want to mix them.
cannam@167 5483 shared_flag_aix='-shared'
cannam@167 5484 shared_flag_svr4='-shared $wl-G'
cannam@167 5485 else
cannam@167 5486 # not using gcc
cannam@167 5487 if test ia64 = "$host_cpu"; then
cannam@167 5488 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
cannam@167 5489 # chokes on -Wl,-G. The following line is correct:
cannam@167 5490 shared_flag='-G'
cannam@167 5491 else
cannam@167 5492 if test yes = "$aix_use_runtimelinking"; then
cannam@167 5493 shared_flag='$wl-G'
cannam@167 5494 else
cannam@167 5495 shared_flag='$wl-bM:SRE'
cannam@167 5496 fi
cannam@167 5497 shared_flag_aix='$wl-bM:SRE'
cannam@167 5498 shared_flag_svr4='$wl-G'
cannam@167 5499 fi
cannam@167 5500 fi
cannam@167 5501
cannam@167 5502 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
cannam@167 5503 # It seems that -bexpall does not export symbols beginning with
cannam@167 5504 # underscore (_), so it is better to generate a list of symbols to export.
cannam@167 5505 _LT_TAGVAR(always_export_symbols, $1)=yes
cannam@167 5506 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
cannam@167 5507 # Warning - without using the other runtime loading flags (-brtl),
cannam@167 5508 # -berok will link without error, but may produce a broken library.
cannam@167 5509 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
cannam@167 5510 # Determine the default libpath from the value encoded in an
cannam@167 5511 # empty executable.
cannam@167 5512 _LT_SYS_MODULE_PATH_AIX([$1])
cannam@167 5513 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
cannam@167 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@167 5515 else
cannam@167 5516 if test ia64 = "$host_cpu"; then
cannam@167 5517 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
cannam@167 5518 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
cannam@167 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@167 5520 else
cannam@167 5521 # Determine the default libpath from the value encoded in an
cannam@167 5522 # empty executable.
cannam@167 5523 _LT_SYS_MODULE_PATH_AIX([$1])
cannam@167 5524 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
cannam@167 5525 # Warning - without using the other run time loading flags,
cannam@167 5526 # -berok will link without error, but may produce a broken library.
cannam@167 5527 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
cannam@167 5528 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
cannam@167 5529 if test yes = "$with_gnu_ld"; then
cannam@167 5530 # We only use this code for GNU lds that support --whole-archive.
cannam@167 5531 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
cannam@167 5532 else
cannam@167 5533 # Exported symbols can be pulled into shared objects from archives
cannam@167 5534 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
cannam@167 5535 fi
cannam@167 5536 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
cannam@167 5537 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
cannam@167 5538 # -brtl affects multiple linker settings, -berok does not and is overridden later
cannam@167 5539 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
cannam@167 5540 if test svr4 != "$with_aix_soname"; then
cannam@167 5541 # This is similar to how AIX traditionally builds its shared libraries.
cannam@167 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@167 5543 fi
cannam@167 5544 if test aix != "$with_aix_soname"; then
cannam@167 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@167 5546 else
cannam@167 5547 # used by -dlpreopen to get the symbols
cannam@167 5548 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
cannam@167 5549 fi
cannam@167 5550 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
cannam@167 5551 fi
cannam@167 5552 fi
cannam@167 5553 ;;
cannam@167 5554
cannam@167 5555 amigaos*)
cannam@167 5556 case $host_cpu in
cannam@167 5557 powerpc)
cannam@167 5558 # see comment about AmigaOS4 .so support
cannam@167 5559 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@167 5560 _LT_TAGVAR(archive_expsym_cmds, $1)=''
cannam@167 5561 ;;
cannam@167 5562 m68k)
cannam@167 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@167 5564 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@167 5565 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@167 5566 ;;
cannam@167 5567 esac
cannam@167 5568 ;;
cannam@167 5569
cannam@167 5570 bsdi[[45]]*)
cannam@167 5571 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
cannam@167 5572 ;;
cannam@167 5573
cannam@167 5574 cygwin* | mingw* | pw32* | cegcc*)
cannam@167 5575 # When not using gcc, we currently assume that we are using
cannam@167 5576 # Microsoft Visual C++.
cannam@167 5577 # hardcode_libdir_flag_spec is actually meaningless, as there is
cannam@167 5578 # no search path for DLLs.
cannam@167 5579 case $cc_basename in
cannam@167 5580 cl*)
cannam@167 5581 # Native MSVC
cannam@167 5582 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
cannam@167 5583 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@167 5584 _LT_TAGVAR(always_export_symbols, $1)=yes
cannam@167 5585 _LT_TAGVAR(file_list_spec, $1)='@'
cannam@167 5586 # Tell ltmain to make .lib files, not .a files.
cannam@167 5587 libext=lib
cannam@167 5588 # Tell ltmain to make .dll files, not .so files.
cannam@167 5589 shrext_cmds=.dll
cannam@167 5590 # FIXME: Setting linknames here is a bad hack.
cannam@167 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@167 5592 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
cannam@167 5593 cp "$export_symbols" "$output_objdir/$soname.def";
cannam@167 5594 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
cannam@167 5595 else
cannam@167 5596 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
cannam@167 5597 fi~
cannam@167 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@167 5599 linknames='
cannam@167 5600 # The linker will not automatically build a static lib if we build a DLL.
cannam@167 5601 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
cannam@167 5602 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@167 5603 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
cannam@167 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@167 5605 # Don't use ranlib
cannam@167 5606 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
cannam@167 5607 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
cannam@167 5608 lt_tool_outputfile="@TOOL_OUTPUT@"~
cannam@167 5609 case $lt_outputfile in
cannam@167 5610 *.exe|*.EXE) ;;
cannam@167 5611 *)
cannam@167 5612 lt_outputfile=$lt_outputfile.exe
cannam@167 5613 lt_tool_outputfile=$lt_tool_outputfile.exe
cannam@167 5614 ;;
cannam@167 5615 esac~
cannam@167 5616 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
cannam@167 5617 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
cannam@167 5618 $RM "$lt_outputfile.manifest";
cannam@167 5619 fi'
cannam@167 5620 ;;
cannam@167 5621 *)
cannam@167 5622 # Assume MSVC wrapper
cannam@167 5623 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
cannam@167 5624 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@167 5625 # Tell ltmain to make .lib files, not .a files.
cannam@167 5626 libext=lib
cannam@167 5627 # Tell ltmain to make .dll files, not .so files.
cannam@167 5628 shrext_cmds=.dll
cannam@167 5629 # FIXME: Setting linknames here is a bad hack.
cannam@167 5630 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
cannam@167 5631 # The linker will automatically build a .lib file if we build a DLL.
cannam@167 5632 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
cannam@167 5633 # FIXME: Should let the user specify the lib program.
cannam@167 5634 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
cannam@167 5635 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@167 5636 ;;
cannam@167 5637 esac
cannam@167 5638 ;;
cannam@167 5639
cannam@167 5640 darwin* | rhapsody*)
cannam@167 5641 _LT_DARWIN_LINKER_FEATURES($1)
cannam@167 5642 ;;
cannam@167 5643
cannam@167 5644 dgux*)
cannam@167 5645 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@167 5646 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@167 5647 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@167 5648 ;;
cannam@167 5649
cannam@167 5650 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
cannam@167 5651 # support. Future versions do this automatically, but an explicit c++rt0.o
cannam@167 5652 # does not break anything, and helps significantly (at the cost of a little
cannam@167 5653 # extra space).
cannam@167 5654 freebsd2.2*)
cannam@167 5655 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
cannam@167 5656 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@167 5657 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@167 5658 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@167 5659 ;;
cannam@167 5660
cannam@167 5661 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
cannam@167 5662 freebsd2.*)
cannam@167 5663 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
cannam@167 5664 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@167 5665 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@167 5666 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@167 5667 ;;
cannam@167 5668
cannam@167 5669 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
cannam@167 5670 freebsd* | dragonfly*)
cannam@167 5671 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
cannam@167 5672 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@167 5673 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@167 5674 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@167 5675 ;;
cannam@167 5676
cannam@167 5677 hpux9*)
cannam@167 5678 if test yes = "$GCC"; then
cannam@167 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@167 5680 else
cannam@167 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@167 5682 fi
cannam@167 5683 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
cannam@167 5684 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@167 5685 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@167 5686
cannam@167 5687 # hardcode_minus_L: Not really in the search PATH,
cannam@167 5688 # but as the default location of the library.
cannam@167 5689 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@167 5690 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
cannam@167 5691 ;;
cannam@167 5692
cannam@167 5693 hpux10*)
cannam@167 5694 if test yes,no = "$GCC,$with_gnu_ld"; then
cannam@167 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@167 5696 else
cannam@167 5697 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
cannam@167 5698 fi
cannam@167 5699 if test no = "$with_gnu_ld"; then
cannam@167 5700 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
cannam@167 5701 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@167 5702 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@167 5703 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
cannam@167 5704 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
cannam@167 5705 # hardcode_minus_L: Not really in the search PATH,
cannam@167 5706 # but as the default location of the library.
cannam@167 5707 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@167 5708 fi
cannam@167 5709 ;;
cannam@167 5710
cannam@167 5711 hpux11*)
cannam@167 5712 if test yes,no = "$GCC,$with_gnu_ld"; then
cannam@167 5713 case $host_cpu in
cannam@167 5714 hppa*64*)
cannam@167 5715 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@167 5716 ;;
cannam@167 5717 ia64*)
cannam@167 5718 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
cannam@167 5719 ;;
cannam@167 5720 *)
cannam@167 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@167 5722 ;;
cannam@167 5723 esac
cannam@167 5724 else
cannam@167 5725 case $host_cpu in
cannam@167 5726 hppa*64*)
cannam@167 5727 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@167 5728 ;;
cannam@167 5729 ia64*)
cannam@167 5730 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
cannam@167 5731 ;;
cannam@167 5732 *)
cannam@167 5733 m4_if($1, [], [
cannam@167 5734 # Older versions of the 11.00 compiler do not understand -b yet
cannam@167 5735 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
cannam@167 5736 _LT_LINKER_OPTION([if $CC understands -b],
cannam@167 5737 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
cannam@167 5738 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
cannam@167 5739 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
cannam@167 5740 [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
cannam@167 5741 ;;
cannam@167 5742 esac
cannam@167 5743 fi
cannam@167 5744 if test no = "$with_gnu_ld"; then
cannam@167 5745 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
cannam@167 5746 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@167 5747
cannam@167 5748 case $host_cpu in
cannam@167 5749 hppa*64*|ia64*)
cannam@167 5750 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@167 5751 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@167 5752 ;;
cannam@167 5753 *)
cannam@167 5754 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@167 5755 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
cannam@167 5756 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
cannam@167 5757
cannam@167 5758 # hardcode_minus_L: Not really in the search PATH,
cannam@167 5759 # but as the default location of the library.
cannam@167 5760 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@167 5761 ;;
cannam@167 5762 esac
cannam@167 5763 fi
cannam@167 5764 ;;
cannam@167 5765
cannam@167 5766 irix5* | irix6* | nonstopux*)
cannam@167 5767 if test yes = "$GCC"; then
cannam@167 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@167 5769 # Try to use the -exported_symbol ld option, if it does not
cannam@167 5770 # work, assume that -exports_file does not work either and
cannam@167 5771 # implicitly export all symbols.
cannam@167 5772 # This should be the same for all languages, so no per-tag cache variable.
cannam@167 5773 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
cannam@167 5774 [lt_cv_irix_exported_symbol],
cannam@167 5775 [save_LDFLAGS=$LDFLAGS
cannam@167 5776 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
cannam@167 5777 AC_LINK_IFELSE(
cannam@167 5778 [AC_LANG_SOURCE(
cannam@167 5779 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
cannam@167 5780 [C++], [[int foo (void) { return 0; }]],
cannam@167 5781 [Fortran 77], [[
cannam@167 5782 subroutine foo
cannam@167 5783 end]],
cannam@167 5784 [Fortran], [[
cannam@167 5785 subroutine foo
cannam@167 5786 end]])])],
cannam@167 5787 [lt_cv_irix_exported_symbol=yes],
cannam@167 5788 [lt_cv_irix_exported_symbol=no])
cannam@167 5789 LDFLAGS=$save_LDFLAGS])
cannam@167 5790 if test yes = "$lt_cv_irix_exported_symbol"; then
cannam@167 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@167 5792 fi
cannam@167 5793 _LT_TAGVAR(link_all_deplibs, $1)=no
cannam@167 5794 else
cannam@167 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@167 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@167 5797 fi
cannam@167 5798 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
cannam@167 5799 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@167 5800 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@167 5801 _LT_TAGVAR(inherit_rpath, $1)=yes
cannam@167 5802 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@167 5803 ;;
cannam@167 5804
cannam@167 5805 linux*)
cannam@167 5806 case $cc_basename in
cannam@167 5807 tcc*)
cannam@167 5808 # Fabrice Bellard et al's Tiny C Compiler
cannam@167 5809 _LT_TAGVAR(ld_shlibs, $1)=yes
cannam@167 5810 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
cannam@167 5811 ;;
cannam@167 5812 esac
cannam@167 5813 ;;
cannam@167 5814
cannam@167 5815 netbsd* | netbsdelf*-gnu)
cannam@167 5816 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
cannam@167 5817 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
cannam@167 5818 else
cannam@167 5819 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
cannam@167 5820 fi
cannam@167 5821 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@167 5822 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@167 5823 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@167 5824 ;;
cannam@167 5825
cannam@167 5826 newsos6)
cannam@167 5827 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@167 5828 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@167 5829 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@167 5830 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@167 5831 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@167 5832 ;;
cannam@167 5833
cannam@167 5834 *nto* | *qnx*)
cannam@167 5835 ;;
cannam@167 5836
cannam@167 5837 openbsd* | bitrig*)
cannam@167 5838 if test -f /usr/libexec/ld.so; then
cannam@167 5839 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@167 5840 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@167 5841 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
cannam@167 5842 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
cannam@167 5843 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
cannam@167 5844 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
cannam@167 5845 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
cannam@167 5846 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
cannam@167 5847 else
cannam@167 5848 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
cannam@167 5849 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
cannam@167 5850 fi
cannam@167 5851 else
cannam@167 5852 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 5853 fi
cannam@167 5854 ;;
cannam@167 5855
cannam@167 5856 os2*)
cannam@167 5857 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@167 5858 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@167 5859 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@167 5860 shrext_cmds=.dll
cannam@167 5861 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
cannam@167 5862 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
cannam@167 5863 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
cannam@167 5864 $ECHO EXPORTS >> $output_objdir/$libname.def~
cannam@167 5865 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
cannam@167 5866 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
cannam@167 5867 emximp -o $lib $output_objdir/$libname.def'
cannam@167 5868 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
cannam@167 5869 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
cannam@167 5870 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
cannam@167 5871 $ECHO EXPORTS >> $output_objdir/$libname.def~
cannam@167 5872 prefix_cmds="$SED"~
cannam@167 5873 if test EXPORTS = "`$SED 1q $export_symbols`"; then
cannam@167 5874 prefix_cmds="$prefix_cmds -e 1d";
cannam@167 5875 fi~
cannam@167 5876 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
cannam@167 5877 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
cannam@167 5878 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
cannam@167 5879 emximp -o $lib $output_objdir/$libname.def'
cannam@167 5880 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
cannam@167 5881 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@167 5882 ;;
cannam@167 5883
cannam@167 5884 osf3*)
cannam@167 5885 if test yes = "$GCC"; then
cannam@167 5886 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
cannam@167 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@167 5888 else
cannam@167 5889 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
cannam@167 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@167 5891 fi
cannam@167 5892 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
cannam@167 5893 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@167 5894 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@167 5895 ;;
cannam@167 5896
cannam@167 5897 osf4* | osf5*) # as osf3* with the addition of -msym flag
cannam@167 5898 if test yes = "$GCC"; then
cannam@167 5899 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
cannam@167 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@167 5901 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@167 5902 else
cannam@167 5903 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
cannam@167 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@167 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@167 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@167 5907
cannam@167 5908 # Both c and cxx compiler support -rpath directly
cannam@167 5909 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
cannam@167 5910 fi
cannam@167 5911 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
cannam@167 5912 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@167 5913 ;;
cannam@167 5914
cannam@167 5915 solaris*)
cannam@167 5916 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
cannam@167 5917 if test yes = "$GCC"; then
cannam@167 5918 wlarc='$wl'
cannam@167 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@167 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@167 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@167 5922 else
cannam@167 5923 case `$CC -V 2>&1` in
cannam@167 5924 *"Compilers 5.0"*)
cannam@167 5925 wlarc=''
cannam@167 5926 _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@167 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@167 5928 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
cannam@167 5929 ;;
cannam@167 5930 *)
cannam@167 5931 wlarc='$wl'
cannam@167 5932 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@167 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@167 5934 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
cannam@167 5935 ;;
cannam@167 5936 esac
cannam@167 5937 fi
cannam@167 5938 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@167 5939 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@167 5940 case $host_os in
cannam@167 5941 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
cannam@167 5942 *)
cannam@167 5943 # The compiler driver will combine and reorder linker options,
cannam@167 5944 # but understands '-z linker_flag'. GCC discards it without '$wl',
cannam@167 5945 # but is careful enough not to reorder.
cannam@167 5946 # Supported since Solaris 2.6 (maybe 2.5.1?)
cannam@167 5947 if test yes = "$GCC"; then
cannam@167 5948 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
cannam@167 5949 else
cannam@167 5950 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
cannam@167 5951 fi
cannam@167 5952 ;;
cannam@167 5953 esac
cannam@167 5954 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@167 5955 ;;
cannam@167 5956
cannam@167 5957 sunos4*)
cannam@167 5958 if test sequent = "$host_vendor"; then
cannam@167 5959 # Use $CC to link under sequent, because it throws in some extra .o
cannam@167 5960 # files that make .init and .fini sections work.
cannam@167 5961 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@167 5962 else
cannam@167 5963 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
cannam@167 5964 fi
cannam@167 5965 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@167 5966 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@167 5967 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@167 5968 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@167 5969 ;;
cannam@167 5970
cannam@167 5971 sysv4)
cannam@167 5972 case $host_vendor in
cannam@167 5973 sni)
cannam@167 5974 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@167 5975 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
cannam@167 5976 ;;
cannam@167 5977 siemens)
cannam@167 5978 ## LD is ld it makes a PLAMLIB
cannam@167 5979 ## CC just makes a GrossModule.
cannam@167 5980 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
cannam@167 5981 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
cannam@167 5982 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@167 5983 ;;
cannam@167 5984 motorola)
cannam@167 5985 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@167 5986 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
cannam@167 5987 ;;
cannam@167 5988 esac
cannam@167 5989 runpath_var='LD_RUN_PATH'
cannam@167 5990 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@167 5991 ;;
cannam@167 5992
cannam@167 5993 sysv4.3*)
cannam@167 5994 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@167 5995 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@167 5996 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
cannam@167 5997 ;;
cannam@167 5998
cannam@167 5999 sysv4*MP*)
cannam@167 6000 if test -d /usr/nec; then
cannam@167 6001 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@167 6002 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@167 6003 runpath_var=LD_RUN_PATH
cannam@167 6004 hardcode_runpath_var=yes
cannam@167 6005 _LT_TAGVAR(ld_shlibs, $1)=yes
cannam@167 6006 fi
cannam@167 6007 ;;
cannam@167 6008
cannam@167 6009 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
cannam@167 6010 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
cannam@167 6011 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@167 6012 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@167 6013 runpath_var='LD_RUN_PATH'
cannam@167 6014
cannam@167 6015 if test yes = "$GCC"; then
cannam@167 6016 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@167 6017 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@167 6018 else
cannam@167 6019 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@167 6020 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@167 6021 fi
cannam@167 6022 ;;
cannam@167 6023
cannam@167 6024 sysv5* | sco3.2v5* | sco5v6*)
cannam@167 6025 # Note: We CANNOT use -z defs as we might desire, because we do not
cannam@167 6026 # link with -lc, and that would cause any symbols used from libc to
cannam@167 6027 # always be unresolved, which means just about no library would
cannam@167 6028 # ever link correctly. If we're not using GNU ld we use -z text
cannam@167 6029 # though, which does catch some bad symbols but isn't as heavy-handed
cannam@167 6030 # as -z defs.
cannam@167 6031 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
cannam@167 6032 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
cannam@167 6033 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@167 6034 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@167 6035 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
cannam@167 6036 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
cannam@167 6037 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@167 6038 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
cannam@167 6039 runpath_var='LD_RUN_PATH'
cannam@167 6040
cannam@167 6041 if test yes = "$GCC"; then
cannam@167 6042 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@167 6043 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@167 6044 else
cannam@167 6045 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@167 6046 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@167 6047 fi
cannam@167 6048 ;;
cannam@167 6049
cannam@167 6050 uts4*)
cannam@167 6051 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@167 6052 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@167 6053 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@167 6054 ;;
cannam@167 6055
cannam@167 6056 *)
cannam@167 6057 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 6058 ;;
cannam@167 6059 esac
cannam@167 6060
cannam@167 6061 if test sni = "$host_vendor"; then
cannam@167 6062 case $host in
cannam@167 6063 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
cannam@167 6064 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
cannam@167 6065 ;;
cannam@167 6066 esac
cannam@167 6067 fi
cannam@167 6068 fi
cannam@167 6069 ])
cannam@167 6070 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
cannam@167 6071 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
cannam@167 6072
cannam@167 6073 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
cannam@167 6074
cannam@167 6075 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
cannam@167 6076 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
cannam@167 6077 _LT_DECL([], [extract_expsyms_cmds], [2],
cannam@167 6078 [The commands to extract the exported symbol list from a shared archive])
cannam@167 6079
cannam@167 6080 #
cannam@167 6081 # Do we need to explicitly link libc?
cannam@167 6082 #
cannam@167 6083 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
cannam@167 6084 x|xyes)
cannam@167 6085 # Assume -lc should be added
cannam@167 6086 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
cannam@167 6087
cannam@167 6088 if test yes,yes = "$GCC,$enable_shared"; then
cannam@167 6089 case $_LT_TAGVAR(archive_cmds, $1) in
cannam@167 6090 *'~'*)
cannam@167 6091 # FIXME: we may have to deal with multi-command sequences.
cannam@167 6092 ;;
cannam@167 6093 '$CC '*)
cannam@167 6094 # Test whether the compiler implicitly links with -lc since on some
cannam@167 6095 # systems, -lgcc has to come before -lc. If gcc already passes -lc
cannam@167 6096 # to ld, don't add -lc before -lgcc.
cannam@167 6097 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
cannam@167 6098 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
cannam@167 6099 [$RM conftest*
cannam@167 6100 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
cannam@167 6101
cannam@167 6102 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
cannam@167 6103 soname=conftest
cannam@167 6104 lib=conftest
cannam@167 6105 libobjs=conftest.$ac_objext
cannam@167 6106 deplibs=
cannam@167 6107 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
cannam@167 6108 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
cannam@167 6109 compiler_flags=-v
cannam@167 6110 linker_flags=-v
cannam@167 6111 verstring=
cannam@167 6112 output_objdir=.
cannam@167 6113 libname=conftest
cannam@167 6114 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
cannam@167 6115 _LT_TAGVAR(allow_undefined_flag, $1)=
cannam@167 6116 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
cannam@167 6117 then
cannam@167 6118 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@167 6119 else
cannam@167 6120 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
cannam@167 6121 fi
cannam@167 6122 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
cannam@167 6123 else
cannam@167 6124 cat conftest.err 1>&5
cannam@167 6125 fi
cannam@167 6126 $RM conftest*
cannam@167 6127 ])
cannam@167 6128 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
cannam@167 6129 ;;
cannam@167 6130 esac
cannam@167 6131 fi
cannam@167 6132 ;;
cannam@167 6133 esac
cannam@167 6134
cannam@167 6135 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
cannam@167 6136 [Whether or not to add -lc for building shared libraries])
cannam@167 6137 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
cannam@167 6138 [enable_shared_with_static_runtimes], [0],
cannam@167 6139 [Whether or not to disallow shared libs when runtime libs are static])
cannam@167 6140 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
cannam@167 6141 [Compiler flag to allow reflexive dlopens])
cannam@167 6142 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
cannam@167 6143 [Compiler flag to generate shared objects directly from archives])
cannam@167 6144 _LT_TAGDECL([], [compiler_needs_object], [1],
cannam@167 6145 [Whether the compiler copes with passing no objects directly])
cannam@167 6146 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
cannam@167 6147 [Create an old-style archive from a shared archive])
cannam@167 6148 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
cannam@167 6149 [Create a temporary old-style archive to link instead of a shared archive])
cannam@167 6150 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
cannam@167 6151 _LT_TAGDECL([], [archive_expsym_cmds], [2])
cannam@167 6152 _LT_TAGDECL([], [module_cmds], [2],
cannam@167 6153 [Commands used to build a loadable module if different from building
cannam@167 6154 a shared archive.])
cannam@167 6155 _LT_TAGDECL([], [module_expsym_cmds], [2])
cannam@167 6156 _LT_TAGDECL([], [with_gnu_ld], [1],
cannam@167 6157 [Whether we are building with GNU ld or not])
cannam@167 6158 _LT_TAGDECL([], [allow_undefined_flag], [1],
cannam@167 6159 [Flag that allows shared libraries with undefined symbols to be built])
cannam@167 6160 _LT_TAGDECL([], [no_undefined_flag], [1],
cannam@167 6161 [Flag that enforces no undefined symbols])
cannam@167 6162 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
cannam@167 6163 [Flag to hardcode $libdir into a binary during linking.
cannam@167 6164 This must work even if $libdir does not exist])
cannam@167 6165 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
cannam@167 6166 [Whether we need a single "-rpath" flag with a separated argument])
cannam@167 6167 _LT_TAGDECL([], [hardcode_direct], [0],
cannam@167 6168 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
cannam@167 6169 DIR into the resulting binary])
cannam@167 6170 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
cannam@167 6171 [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
cannam@167 6172 DIR into the resulting binary and the resulting library dependency is
cannam@167 6173 "absolute", i.e impossible to change by setting $shlibpath_var if the
cannam@167 6174 library is relocated])
cannam@167 6175 _LT_TAGDECL([], [hardcode_minus_L], [0],
cannam@167 6176 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
cannam@167 6177 into the resulting binary])
cannam@167 6178 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
cannam@167 6179 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
cannam@167 6180 into the resulting binary])
cannam@167 6181 _LT_TAGDECL([], [hardcode_automatic], [0],
cannam@167 6182 [Set to "yes" if building a shared library automatically hardcodes DIR
cannam@167 6183 into the library and all subsequent libraries and executables linked
cannam@167 6184 against it])
cannam@167 6185 _LT_TAGDECL([], [inherit_rpath], [0],
cannam@167 6186 [Set to yes if linker adds runtime paths of dependent libraries
cannam@167 6187 to runtime path list])
cannam@167 6188 _LT_TAGDECL([], [link_all_deplibs], [0],
cannam@167 6189 [Whether libtool must link a program against all its dependency libraries])
cannam@167 6190 _LT_TAGDECL([], [always_export_symbols], [0],
cannam@167 6191 [Set to "yes" if exported symbols are required])
cannam@167 6192 _LT_TAGDECL([], [export_symbols_cmds], [2],
cannam@167 6193 [The commands to list exported symbols])
cannam@167 6194 _LT_TAGDECL([], [exclude_expsyms], [1],
cannam@167 6195 [Symbols that should not be listed in the preloaded symbols])
cannam@167 6196 _LT_TAGDECL([], [include_expsyms], [1],
cannam@167 6197 [Symbols that must always be exported])
cannam@167 6198 _LT_TAGDECL([], [prelink_cmds], [2],
cannam@167 6199 [Commands necessary for linking programs (against libraries) with templates])
cannam@167 6200 _LT_TAGDECL([], [postlink_cmds], [2],
cannam@167 6201 [Commands necessary for finishing linking programs])
cannam@167 6202 _LT_TAGDECL([], [file_list_spec], [1],
cannam@167 6203 [Specify filename containing input files])
cannam@167 6204 dnl FIXME: Not yet implemented
cannam@167 6205 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
cannam@167 6206 dnl [Compiler flag to generate thread safe objects])
cannam@167 6207 ])# _LT_LINKER_SHLIBS
cannam@167 6208
cannam@167 6209
cannam@167 6210 # _LT_LANG_C_CONFIG([TAG])
cannam@167 6211 # ------------------------
cannam@167 6212 # Ensure that the configuration variables for a C compiler are suitably
cannam@167 6213 # defined. These variables are subsequently used by _LT_CONFIG to write
cannam@167 6214 # the compiler configuration to 'libtool'.
cannam@167 6215 m4_defun([_LT_LANG_C_CONFIG],
cannam@167 6216 [m4_require([_LT_DECL_EGREP])dnl
cannam@167 6217 lt_save_CC=$CC
cannam@167 6218 AC_LANG_PUSH(C)
cannam@167 6219
cannam@167 6220 # Source file extension for C test sources.
cannam@167 6221 ac_ext=c
cannam@167 6222
cannam@167 6223 # Object file extension for compiled C test sources.
cannam@167 6224 objext=o
cannam@167 6225 _LT_TAGVAR(objext, $1)=$objext
cannam@167 6226
cannam@167 6227 # Code to be used in simple compile tests
cannam@167 6228 lt_simple_compile_test_code="int some_variable = 0;"
cannam@167 6229
cannam@167 6230 # Code to be used in simple link tests
cannam@167 6231 lt_simple_link_test_code='int main(){return(0);}'
cannam@167 6232
cannam@167 6233 _LT_TAG_COMPILER
cannam@167 6234 # Save the default compiler, since it gets overwritten when the other
cannam@167 6235 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
cannam@167 6236 compiler_DEFAULT=$CC
cannam@167 6237
cannam@167 6238 # save warnings/boilerplate of simple test code
cannam@167 6239 _LT_COMPILER_BOILERPLATE
cannam@167 6240 _LT_LINKER_BOILERPLATE
cannam@167 6241
cannam@167 6242 ## CAVEAT EMPTOR:
cannam@167 6243 ## There is no encapsulation within the following macros, do not change
cannam@167 6244 ## the running order or otherwise move them around unless you know exactly
cannam@167 6245 ## what you are doing...
cannam@167 6246 if test -n "$compiler"; then
cannam@167 6247 _LT_COMPILER_NO_RTTI($1)
cannam@167 6248 _LT_COMPILER_PIC($1)
cannam@167 6249 _LT_COMPILER_C_O($1)
cannam@167 6250 _LT_COMPILER_FILE_LOCKS($1)
cannam@167 6251 _LT_LINKER_SHLIBS($1)
cannam@167 6252 _LT_SYS_DYNAMIC_LINKER($1)
cannam@167 6253 _LT_LINKER_HARDCODE_LIBPATH($1)
cannam@167 6254 LT_SYS_DLOPEN_SELF
cannam@167 6255 _LT_CMD_STRIPLIB
cannam@167 6256
cannam@167 6257 # Report what library types will actually be built
cannam@167 6258 AC_MSG_CHECKING([if libtool supports shared libraries])
cannam@167 6259 AC_MSG_RESULT([$can_build_shared])
cannam@167 6260
cannam@167 6261 AC_MSG_CHECKING([whether to build shared libraries])
cannam@167 6262 test no = "$can_build_shared" && enable_shared=no
cannam@167 6263
cannam@167 6264 # On AIX, shared libraries and static libraries use the same namespace, and
cannam@167 6265 # are all built from PIC.
cannam@167 6266 case $host_os in
cannam@167 6267 aix3*)
cannam@167 6268 test yes = "$enable_shared" && enable_static=no
cannam@167 6269 if test -n "$RANLIB"; then
cannam@167 6270 archive_cmds="$archive_cmds~\$RANLIB \$lib"
cannam@167 6271 postinstall_cmds='$RANLIB $lib'
cannam@167 6272 fi
cannam@167 6273 ;;
cannam@167 6274
cannam@167 6275 aix[[4-9]]*)
cannam@167 6276 if test ia64 != "$host_cpu"; then
cannam@167 6277 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
cannam@167 6278 yes,aix,yes) ;; # shared object as lib.so file only
cannam@167 6279 yes,svr4,*) ;; # shared object as lib.so archive member only
cannam@167 6280 yes,*) enable_static=no ;; # shared object in lib.a archive as well
cannam@167 6281 esac
cannam@167 6282 fi
cannam@167 6283 ;;
cannam@167 6284 esac
cannam@167 6285 AC_MSG_RESULT([$enable_shared])
cannam@167 6286
cannam@167 6287 AC_MSG_CHECKING([whether to build static libraries])
cannam@167 6288 # Make sure either enable_shared or enable_static is yes.
cannam@167 6289 test yes = "$enable_shared" || enable_static=yes
cannam@167 6290 AC_MSG_RESULT([$enable_static])
cannam@167 6291
cannam@167 6292 _LT_CONFIG($1)
cannam@167 6293 fi
cannam@167 6294 AC_LANG_POP
cannam@167 6295 CC=$lt_save_CC
cannam@167 6296 ])# _LT_LANG_C_CONFIG
cannam@167 6297
cannam@167 6298
cannam@167 6299 # _LT_LANG_CXX_CONFIG([TAG])
cannam@167 6300 # --------------------------
cannam@167 6301 # Ensure that the configuration variables for a C++ compiler are suitably
cannam@167 6302 # defined. These variables are subsequently used by _LT_CONFIG to write
cannam@167 6303 # the compiler configuration to 'libtool'.
cannam@167 6304 m4_defun([_LT_LANG_CXX_CONFIG],
cannam@167 6305 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@167 6306 m4_require([_LT_DECL_EGREP])dnl
cannam@167 6307 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
cannam@167 6308 if test -n "$CXX" && ( test no != "$CXX" &&
cannam@167 6309 ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
cannam@167 6310 (test g++ != "$CXX"))); then
cannam@167 6311 AC_PROG_CXXCPP
cannam@167 6312 else
cannam@167 6313 _lt_caught_CXX_error=yes
cannam@167 6314 fi
cannam@167 6315
cannam@167 6316 AC_LANG_PUSH(C++)
cannam@167 6317 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@167 6318 _LT_TAGVAR(allow_undefined_flag, $1)=
cannam@167 6319 _LT_TAGVAR(always_export_symbols, $1)=no
cannam@167 6320 _LT_TAGVAR(archive_expsym_cmds, $1)=
cannam@167 6321 _LT_TAGVAR(compiler_needs_object, $1)=no
cannam@167 6322 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
cannam@167 6323 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@167 6324 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
cannam@167 6325 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
cannam@167 6326 _LT_TAGVAR(hardcode_libdir_separator, $1)=
cannam@167 6327 _LT_TAGVAR(hardcode_minus_L, $1)=no
cannam@167 6328 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
cannam@167 6329 _LT_TAGVAR(hardcode_automatic, $1)=no
cannam@167 6330 _LT_TAGVAR(inherit_rpath, $1)=no
cannam@167 6331 _LT_TAGVAR(module_cmds, $1)=
cannam@167 6332 _LT_TAGVAR(module_expsym_cmds, $1)=
cannam@167 6333 _LT_TAGVAR(link_all_deplibs, $1)=unknown
cannam@167 6334 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
cannam@167 6335 _LT_TAGVAR(reload_flag, $1)=$reload_flag
cannam@167 6336 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
cannam@167 6337 _LT_TAGVAR(no_undefined_flag, $1)=
cannam@167 6338 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@167 6339 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
cannam@167 6340
cannam@167 6341 # Source file extension for C++ test sources.
cannam@167 6342 ac_ext=cpp
cannam@167 6343
cannam@167 6344 # Object file extension for compiled C++ test sources.
cannam@167 6345 objext=o
cannam@167 6346 _LT_TAGVAR(objext, $1)=$objext
cannam@167 6347
cannam@167 6348 # No sense in running all these tests if we already determined that
cannam@167 6349 # the CXX compiler isn't working. Some variables (like enable_shared)
cannam@167 6350 # are currently assumed to apply to all compilers on this platform,
cannam@167 6351 # and will be corrupted by setting them based on a non-working compiler.
cannam@167 6352 if test yes != "$_lt_caught_CXX_error"; then
cannam@167 6353 # Code to be used in simple compile tests
cannam@167 6354 lt_simple_compile_test_code="int some_variable = 0;"
cannam@167 6355
cannam@167 6356 # Code to be used in simple link tests
cannam@167 6357 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
cannam@167 6358
cannam@167 6359 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
cannam@167 6360 _LT_TAG_COMPILER
cannam@167 6361
cannam@167 6362 # save warnings/boilerplate of simple test code
cannam@167 6363 _LT_COMPILER_BOILERPLATE
cannam@167 6364 _LT_LINKER_BOILERPLATE
cannam@167 6365
cannam@167 6366 # Allow CC to be a program name with arguments.
cannam@167 6367 lt_save_CC=$CC
cannam@167 6368 lt_save_CFLAGS=$CFLAGS
cannam@167 6369 lt_save_LD=$LD
cannam@167 6370 lt_save_GCC=$GCC
cannam@167 6371 GCC=$GXX
cannam@167 6372 lt_save_with_gnu_ld=$with_gnu_ld
cannam@167 6373 lt_save_path_LD=$lt_cv_path_LD
cannam@167 6374 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
cannam@167 6375 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
cannam@167 6376 else
cannam@167 6377 $as_unset lt_cv_prog_gnu_ld
cannam@167 6378 fi
cannam@167 6379 if test -n "${lt_cv_path_LDCXX+set}"; then
cannam@167 6380 lt_cv_path_LD=$lt_cv_path_LDCXX
cannam@167 6381 else
cannam@167 6382 $as_unset lt_cv_path_LD
cannam@167 6383 fi
cannam@167 6384 test -z "${LDCXX+set}" || LD=$LDCXX
cannam@167 6385 CC=${CXX-"c++"}
cannam@167 6386 CFLAGS=$CXXFLAGS
cannam@167 6387 compiler=$CC
cannam@167 6388 _LT_TAGVAR(compiler, $1)=$CC
cannam@167 6389 _LT_CC_BASENAME([$compiler])
cannam@167 6390
cannam@167 6391 if test -n "$compiler"; then
cannam@167 6392 # We don't want -fno-exception when compiling C++ code, so set the
cannam@167 6393 # no_builtin_flag separately
cannam@167 6394 if test yes = "$GXX"; then
cannam@167 6395 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
cannam@167 6396 else
cannam@167 6397 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
cannam@167 6398 fi
cannam@167 6399
cannam@167 6400 if test yes = "$GXX"; then
cannam@167 6401 # Set up default GNU C++ configuration
cannam@167 6402
cannam@167 6403 LT_PATH_LD
cannam@167 6404
cannam@167 6405 # Check if GNU C++ uses GNU ld as the underlying linker, since the
cannam@167 6406 # archiving commands below assume that GNU ld is being used.
cannam@167 6407 if test yes = "$with_gnu_ld"; then
cannam@167 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@167 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@167 6410
cannam@167 6411 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@167 6412 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
cannam@167 6413
cannam@167 6414 # If archive_cmds runs LD, not CC, wlarc should be empty
cannam@167 6415 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
cannam@167 6416 # investigate it a little bit more. (MM)
cannam@167 6417 wlarc='$wl'
cannam@167 6418
cannam@167 6419 # ancient GNU ld didn't support --whole-archive et. al.
cannam@167 6420 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
cannam@167 6421 $GREP 'no-whole-archive' > /dev/null; then
cannam@167 6422 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
cannam@167 6423 else
cannam@167 6424 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@167 6425 fi
cannam@167 6426 else
cannam@167 6427 with_gnu_ld=no
cannam@167 6428 wlarc=
cannam@167 6429
cannam@167 6430 # A generic and very simple default shared library creation
cannam@167 6431 # command for GNU C++ for the case where it uses the native
cannam@167 6432 # linker, instead of GNU ld. If possible, this setting should
cannam@167 6433 # overridden to take advantage of the native linker features on
cannam@167 6434 # the platform it is being used on.
cannam@167 6435 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
cannam@167 6436 fi
cannam@167 6437
cannam@167 6438 # Commands to make compiler produce verbose output that lists
cannam@167 6439 # what "hidden" libraries, object files and flags are used when
cannam@167 6440 # linking a shared library.
cannam@167 6441 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
cannam@167 6442
cannam@167 6443 else
cannam@167 6444 GXX=no
cannam@167 6445 with_gnu_ld=no
cannam@167 6446 wlarc=
cannam@167 6447 fi
cannam@167 6448
cannam@167 6449 # PORTME: fill in a description of your system's C++ link characteristics
cannam@167 6450 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
cannam@167 6451 _LT_TAGVAR(ld_shlibs, $1)=yes
cannam@167 6452 case $host_os in
cannam@167 6453 aix3*)
cannam@167 6454 # FIXME: insert proper C++ library support
cannam@167 6455 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 6456 ;;
cannam@167 6457 aix[[4-9]]*)
cannam@167 6458 if test ia64 = "$host_cpu"; then
cannam@167 6459 # On IA64, the linker does run time linking by default, so we don't
cannam@167 6460 # have to do anything special.
cannam@167 6461 aix_use_runtimelinking=no
cannam@167 6462 exp_sym_flag='-Bexport'
cannam@167 6463 no_entry_flag=
cannam@167 6464 else
cannam@167 6465 aix_use_runtimelinking=no
cannam@167 6466
cannam@167 6467 # Test if we are trying to use run time linking or normal
cannam@167 6468 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
cannam@167 6469 # have runtime linking enabled, and use it for executables.
cannam@167 6470 # For shared libraries, we enable/disable runtime linking
cannam@167 6471 # depending on the kind of the shared library created -
cannam@167 6472 # when "with_aix_soname,aix_use_runtimelinking" is:
cannam@167 6473 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
cannam@167 6474 # "aix,yes" lib.so shared, rtl:yes, for executables
cannam@167 6475 # lib.a static archive
cannam@167 6476 # "both,no" lib.so.V(shr.o) shared, rtl:yes
cannam@167 6477 # lib.a(lib.so.V) shared, rtl:no, for executables
cannam@167 6478 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
cannam@167 6479 # lib.a(lib.so.V) shared, rtl:no
cannam@167 6480 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
cannam@167 6481 # lib.a static archive
cannam@167 6482 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
cannam@167 6483 for ld_flag in $LDFLAGS; do
cannam@167 6484 case $ld_flag in
cannam@167 6485 *-brtl*)
cannam@167 6486 aix_use_runtimelinking=yes
cannam@167 6487 break
cannam@167 6488 ;;
cannam@167 6489 esac
cannam@167 6490 done
cannam@167 6491 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
cannam@167 6492 # With aix-soname=svr4, we create the lib.so.V shared archives only,
cannam@167 6493 # so we don't have lib.a shared libs to link our executables.
cannam@167 6494 # We have to force runtime linking in this case.
cannam@167 6495 aix_use_runtimelinking=yes
cannam@167 6496 LDFLAGS="$LDFLAGS -Wl,-brtl"
cannam@167 6497 fi
cannam@167 6498 ;;
cannam@167 6499 esac
cannam@167 6500
cannam@167 6501 exp_sym_flag='-bexport'
cannam@167 6502 no_entry_flag='-bnoentry'
cannam@167 6503 fi
cannam@167 6504
cannam@167 6505 # When large executables or shared objects are built, AIX ld can
cannam@167 6506 # have problems creating the table of contents. If linking a library
cannam@167 6507 # or program results in "error TOC overflow" add -mminimal-toc to
cannam@167 6508 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
cannam@167 6509 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
cannam@167 6510
cannam@167 6511 _LT_TAGVAR(archive_cmds, $1)=''
cannam@167 6512 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@167 6513 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
cannam@167 6514 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
cannam@167 6515 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@167 6516 _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
cannam@167 6517 case $with_aix_soname,$aix_use_runtimelinking in
cannam@167 6518 aix,*) ;; # no import file
cannam@167 6519 svr4,* | *,yes) # use import file
cannam@167 6520 # The Import File defines what to hardcode.
cannam@167 6521 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@167 6522 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
cannam@167 6523 ;;
cannam@167 6524 esac
cannam@167 6525
cannam@167 6526 if test yes = "$GXX"; then
cannam@167 6527 case $host_os in aix4.[[012]]|aix4.[[012]].*)
cannam@167 6528 # We only want to do this on AIX 4.2 and lower, the check
cannam@167 6529 # below for broken collect2 doesn't work under 4.3+
cannam@167 6530 collect2name=`$CC -print-prog-name=collect2`
cannam@167 6531 if test -f "$collect2name" &&
cannam@167 6532 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
cannam@167 6533 then
cannam@167 6534 # We have reworked collect2
cannam@167 6535 :
cannam@167 6536 else
cannam@167 6537 # We have old collect2
cannam@167 6538 _LT_TAGVAR(hardcode_direct, $1)=unsupported
cannam@167 6539 # It fails to find uninstalled libraries when the uninstalled
cannam@167 6540 # path is not listed in the libpath. Setting hardcode_minus_L
cannam@167 6541 # to unsupported forces relinking
cannam@167 6542 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@167 6543 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@167 6544 _LT_TAGVAR(hardcode_libdir_separator, $1)=
cannam@167 6545 fi
cannam@167 6546 esac
cannam@167 6547 shared_flag='-shared'
cannam@167 6548 if test yes = "$aix_use_runtimelinking"; then
cannam@167 6549 shared_flag=$shared_flag' $wl-G'
cannam@167 6550 fi
cannam@167 6551 # Need to ensure runtime linking is disabled for the traditional
cannam@167 6552 # shared library, or the linker may eventually find shared libraries
cannam@167 6553 # /with/ Import File - we do not want to mix them.
cannam@167 6554 shared_flag_aix='-shared'
cannam@167 6555 shared_flag_svr4='-shared $wl-G'
cannam@167 6556 else
cannam@167 6557 # not using gcc
cannam@167 6558 if test ia64 = "$host_cpu"; then
cannam@167 6559 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
cannam@167 6560 # chokes on -Wl,-G. The following line is correct:
cannam@167 6561 shared_flag='-G'
cannam@167 6562 else
cannam@167 6563 if test yes = "$aix_use_runtimelinking"; then
cannam@167 6564 shared_flag='$wl-G'
cannam@167 6565 else
cannam@167 6566 shared_flag='$wl-bM:SRE'
cannam@167 6567 fi
cannam@167 6568 shared_flag_aix='$wl-bM:SRE'
cannam@167 6569 shared_flag_svr4='$wl-G'
cannam@167 6570 fi
cannam@167 6571 fi
cannam@167 6572
cannam@167 6573 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
cannam@167 6574 # It seems that -bexpall does not export symbols beginning with
cannam@167 6575 # underscore (_), so it is better to generate a list of symbols to
cannam@167 6576 # export.
cannam@167 6577 _LT_TAGVAR(always_export_symbols, $1)=yes
cannam@167 6578 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
cannam@167 6579 # Warning - without using the other runtime loading flags (-brtl),
cannam@167 6580 # -berok will link without error, but may produce a broken library.
cannam@167 6581 # The "-G" linker flag allows undefined symbols.
cannam@167 6582 _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
cannam@167 6583 # Determine the default libpath from the value encoded in an empty
cannam@167 6584 # executable.
cannam@167 6585 _LT_SYS_MODULE_PATH_AIX([$1])
cannam@167 6586 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
cannam@167 6587
cannam@167 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@167 6589 else
cannam@167 6590 if test ia64 = "$host_cpu"; then
cannam@167 6591 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
cannam@167 6592 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
cannam@167 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@167 6594 else
cannam@167 6595 # Determine the default libpath from the value encoded in an
cannam@167 6596 # empty executable.
cannam@167 6597 _LT_SYS_MODULE_PATH_AIX([$1])
cannam@167 6598 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
cannam@167 6599 # Warning - without using the other run time loading flags,
cannam@167 6600 # -berok will link without error, but may produce a broken library.
cannam@167 6601 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
cannam@167 6602 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
cannam@167 6603 if test yes = "$with_gnu_ld"; then
cannam@167 6604 # We only use this code for GNU lds that support --whole-archive.
cannam@167 6605 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
cannam@167 6606 else
cannam@167 6607 # Exported symbols can be pulled into shared objects from archives
cannam@167 6608 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
cannam@167 6609 fi
cannam@167 6610 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
cannam@167 6611 _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
cannam@167 6612 # -brtl affects multiple linker settings, -berok does not and is overridden later
cannam@167 6613 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
cannam@167 6614 if test svr4 != "$with_aix_soname"; then
cannam@167 6615 # This is similar to how AIX traditionally builds its shared
cannam@167 6616 # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
cannam@167 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@167 6618 fi
cannam@167 6619 if test aix != "$with_aix_soname"; then
cannam@167 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@167 6621 else
cannam@167 6622 # used by -dlpreopen to get the symbols
cannam@167 6623 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
cannam@167 6624 fi
cannam@167 6625 _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
cannam@167 6626 fi
cannam@167 6627 fi
cannam@167 6628 ;;
cannam@167 6629
cannam@167 6630 beos*)
cannam@167 6631 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
cannam@167 6632 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@167 6633 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
cannam@167 6634 # support --undefined. This deserves some investigation. FIXME
cannam@167 6635 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@167 6636 else
cannam@167 6637 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 6638 fi
cannam@167 6639 ;;
cannam@167 6640
cannam@167 6641 chorus*)
cannam@167 6642 case $cc_basename in
cannam@167 6643 *)
cannam@167 6644 # FIXME: insert proper C++ library support
cannam@167 6645 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 6646 ;;
cannam@167 6647 esac
cannam@167 6648 ;;
cannam@167 6649
cannam@167 6650 cygwin* | mingw* | pw32* | cegcc*)
cannam@167 6651 case $GXX,$cc_basename in
cannam@167 6652 ,cl* | no,cl*)
cannam@167 6653 # Native MSVC
cannam@167 6654 # hardcode_libdir_flag_spec is actually meaningless, as there is
cannam@167 6655 # no search path for DLLs.
cannam@167 6656 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
cannam@167 6657 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@167 6658 _LT_TAGVAR(always_export_symbols, $1)=yes
cannam@167 6659 _LT_TAGVAR(file_list_spec, $1)='@'
cannam@167 6660 # Tell ltmain to make .lib files, not .a files.
cannam@167 6661 libext=lib
cannam@167 6662 # Tell ltmain to make .dll files, not .so files.
cannam@167 6663 shrext_cmds=.dll
cannam@167 6664 # FIXME: Setting linknames here is a bad hack.
cannam@167 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@167 6666 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
cannam@167 6667 cp "$export_symbols" "$output_objdir/$soname.def";
cannam@167 6668 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
cannam@167 6669 else
cannam@167 6670 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
cannam@167 6671 fi~
cannam@167 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@167 6673 linknames='
cannam@167 6674 # The linker will not automatically build a static lib if we build a DLL.
cannam@167 6675 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
cannam@167 6676 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@167 6677 # Don't use ranlib
cannam@167 6678 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
cannam@167 6679 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
cannam@167 6680 lt_tool_outputfile="@TOOL_OUTPUT@"~
cannam@167 6681 case $lt_outputfile in
cannam@167 6682 *.exe|*.EXE) ;;
cannam@167 6683 *)
cannam@167 6684 lt_outputfile=$lt_outputfile.exe
cannam@167 6685 lt_tool_outputfile=$lt_tool_outputfile.exe
cannam@167 6686 ;;
cannam@167 6687 esac~
cannam@167 6688 func_to_tool_file "$lt_outputfile"~
cannam@167 6689 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
cannam@167 6690 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
cannam@167 6691 $RM "$lt_outputfile.manifest";
cannam@167 6692 fi'
cannam@167 6693 ;;
cannam@167 6694 *)
cannam@167 6695 # g++
cannam@167 6696 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
cannam@167 6697 # as there is no search path for DLLs.
cannam@167 6698 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@167 6699 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
cannam@167 6700 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@167 6701 _LT_TAGVAR(always_export_symbols, $1)=no
cannam@167 6702 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@167 6703
cannam@167 6704 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
cannam@167 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@167 6706 # If the export-symbols file already is a .def file, use it as
cannam@167 6707 # is; otherwise, prepend EXPORTS...
cannam@167 6708 _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
cannam@167 6709 cp $export_symbols $output_objdir/$soname.def;
cannam@167 6710 else
cannam@167 6711 echo EXPORTS > $output_objdir/$soname.def;
cannam@167 6712 cat $export_symbols >> $output_objdir/$soname.def;
cannam@167 6713 fi~
cannam@167 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@167 6715 else
cannam@167 6716 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 6717 fi
cannam@167 6718 ;;
cannam@167 6719 esac
cannam@167 6720 ;;
cannam@167 6721 darwin* | rhapsody*)
cannam@167 6722 _LT_DARWIN_LINKER_FEATURES($1)
cannam@167 6723 ;;
cannam@167 6724
cannam@167 6725 os2*)
cannam@167 6726 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@167 6727 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@167 6728 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@167 6729 shrext_cmds=.dll
cannam@167 6730 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
cannam@167 6731 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
cannam@167 6732 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
cannam@167 6733 $ECHO EXPORTS >> $output_objdir/$libname.def~
cannam@167 6734 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
cannam@167 6735 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
cannam@167 6736 emximp -o $lib $output_objdir/$libname.def'
cannam@167 6737 _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
cannam@167 6738 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
cannam@167 6739 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
cannam@167 6740 $ECHO EXPORTS >> $output_objdir/$libname.def~
cannam@167 6741 prefix_cmds="$SED"~
cannam@167 6742 if test EXPORTS = "`$SED 1q $export_symbols`"; then
cannam@167 6743 prefix_cmds="$prefix_cmds -e 1d";
cannam@167 6744 fi~
cannam@167 6745 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
cannam@167 6746 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
cannam@167 6747 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
cannam@167 6748 emximp -o $lib $output_objdir/$libname.def'
cannam@167 6749 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
cannam@167 6750 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@167 6751 ;;
cannam@167 6752
cannam@167 6753 dgux*)
cannam@167 6754 case $cc_basename in
cannam@167 6755 ec++*)
cannam@167 6756 # FIXME: insert proper C++ library support
cannam@167 6757 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 6758 ;;
cannam@167 6759 ghcx*)
cannam@167 6760 # Green Hills C++ Compiler
cannam@167 6761 # FIXME: insert proper C++ library support
cannam@167 6762 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 6763 ;;
cannam@167 6764 *)
cannam@167 6765 # FIXME: insert proper C++ library support
cannam@167 6766 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 6767 ;;
cannam@167 6768 esac
cannam@167 6769 ;;
cannam@167 6770
cannam@167 6771 freebsd2.*)
cannam@167 6772 # C++ shared libraries reported to be fairly broken before
cannam@167 6773 # switch to ELF
cannam@167 6774 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 6775 ;;
cannam@167 6776
cannam@167 6777 freebsd-elf*)
cannam@167 6778 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@167 6779 ;;
cannam@167 6780
cannam@167 6781 freebsd* | dragonfly*)
cannam@167 6782 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
cannam@167 6783 # conventions
cannam@167 6784 _LT_TAGVAR(ld_shlibs, $1)=yes
cannam@167 6785 ;;
cannam@167 6786
cannam@167 6787 haiku*)
cannam@167 6788 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@167 6789 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@167 6790 ;;
cannam@167 6791
cannam@167 6792 hpux9*)
cannam@167 6793 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
cannam@167 6794 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@167 6795 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
cannam@167 6796 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@167 6797 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
cannam@167 6798 # but as the default
cannam@167 6799 # location of the library.
cannam@167 6800
cannam@167 6801 case $cc_basename in
cannam@167 6802 CC*)
cannam@167 6803 # FIXME: insert proper C++ library support
cannam@167 6804 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 6805 ;;
cannam@167 6806 aCC*)
cannam@167 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@167 6808 # Commands to make compiler produce verbose output that lists
cannam@167 6809 # what "hidden" libraries, object files and flags are used when
cannam@167 6810 # linking a shared library.
cannam@167 6811 #
cannam@167 6812 # There doesn't appear to be a way to prevent this compiler from
cannam@167 6813 # explicitly linking system object files so we need to strip them
cannam@167 6814 # from the output so that they don't get included in the library
cannam@167 6815 # dependencies.
cannam@167 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@167 6817 ;;
cannam@167 6818 *)
cannam@167 6819 if test yes = "$GXX"; then
cannam@167 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@167 6821 else
cannam@167 6822 # FIXME: insert proper C++ library support
cannam@167 6823 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 6824 fi
cannam@167 6825 ;;
cannam@167 6826 esac
cannam@167 6827 ;;
cannam@167 6828
cannam@167 6829 hpux10*|hpux11*)
cannam@167 6830 if test no = "$with_gnu_ld"; then
cannam@167 6831 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
cannam@167 6832 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@167 6833
cannam@167 6834 case $host_cpu in
cannam@167 6835 hppa*64*|ia64*)
cannam@167 6836 ;;
cannam@167 6837 *)
cannam@167 6838 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
cannam@167 6839 ;;
cannam@167 6840 esac
cannam@167 6841 fi
cannam@167 6842 case $host_cpu in
cannam@167 6843 hppa*64*|ia64*)
cannam@167 6844 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@167 6845 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@167 6846 ;;
cannam@167 6847 *)
cannam@167 6848 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@167 6849 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
cannam@167 6850 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
cannam@167 6851 # but as the default
cannam@167 6852 # location of the library.
cannam@167 6853 ;;
cannam@167 6854 esac
cannam@167 6855
cannam@167 6856 case $cc_basename in
cannam@167 6857 CC*)
cannam@167 6858 # FIXME: insert proper C++ library support
cannam@167 6859 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 6860 ;;
cannam@167 6861 aCC*)
cannam@167 6862 case $host_cpu in
cannam@167 6863 hppa*64*)
cannam@167 6864 _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
cannam@167 6865 ;;
cannam@167 6866 ia64*)
cannam@167 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@167 6868 ;;
cannam@167 6869 *)
cannam@167 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@167 6871 ;;
cannam@167 6872 esac
cannam@167 6873 # Commands to make compiler produce verbose output that lists
cannam@167 6874 # what "hidden" libraries, object files and flags are used when
cannam@167 6875 # linking a shared library.
cannam@167 6876 #
cannam@167 6877 # There doesn't appear to be a way to prevent this compiler from
cannam@167 6878 # explicitly linking system object files so we need to strip them
cannam@167 6879 # from the output so that they don't get included in the library
cannam@167 6880 # dependencies.
cannam@167 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@167 6882 ;;
cannam@167 6883 *)
cannam@167 6884 if test yes = "$GXX"; then
cannam@167 6885 if test no = "$with_gnu_ld"; then
cannam@167 6886 case $host_cpu in
cannam@167 6887 hppa*64*)
cannam@167 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@167 6889 ;;
cannam@167 6890 ia64*)
cannam@167 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@167 6892 ;;
cannam@167 6893 *)
cannam@167 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@167 6895 ;;
cannam@167 6896 esac
cannam@167 6897 fi
cannam@167 6898 else
cannam@167 6899 # FIXME: insert proper C++ library support
cannam@167 6900 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 6901 fi
cannam@167 6902 ;;
cannam@167 6903 esac
cannam@167 6904 ;;
cannam@167 6905
cannam@167 6906 interix[[3-9]]*)
cannam@167 6907 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@167 6908 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@167 6909 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
cannam@167 6910 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
cannam@167 6911 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
cannam@167 6912 # Instead, shared libraries are loaded at an image base (0x10000000 by
cannam@167 6913 # default) and relocated if they conflict, which is a slow very memory
cannam@167 6914 # consuming and fragmenting process. To avoid this, we pick a random,
cannam@167 6915 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
cannam@167 6916 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
cannam@167 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@167 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@167 6919 ;;
cannam@167 6920 irix5* | irix6*)
cannam@167 6921 case $cc_basename in
cannam@167 6922 CC*)
cannam@167 6923 # SGI C++
cannam@167 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@167 6925
cannam@167 6926 # Archives containing C++ object files must be created using
cannam@167 6927 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
cannam@167 6928 # necessary to make sure instantiated templates are included
cannam@167 6929 # in the archive.
cannam@167 6930 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
cannam@167 6931 ;;
cannam@167 6932 *)
cannam@167 6933 if test yes = "$GXX"; then
cannam@167 6934 if test no = "$with_gnu_ld"; then
cannam@167 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@167 6936 else
cannam@167 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@167 6938 fi
cannam@167 6939 fi
cannam@167 6940 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@167 6941 ;;
cannam@167 6942 esac
cannam@167 6943 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@167 6944 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@167 6945 _LT_TAGVAR(inherit_rpath, $1)=yes
cannam@167 6946 ;;
cannam@167 6947
cannam@167 6948 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
cannam@167 6949 case $cc_basename in
cannam@167 6950 KCC*)
cannam@167 6951 # Kuck and Associates, Inc. (KAI) C++ Compiler
cannam@167 6952
cannam@167 6953 # KCC will only create a shared library if the output file
cannam@167 6954 # ends with ".so" (or ".sl" for HP-UX), so rename the library
cannam@167 6955 # to its proper name (with version) after linking.
cannam@167 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@167 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@167 6958 # Commands to make compiler produce verbose output that lists
cannam@167 6959 # what "hidden" libraries, object files and flags are used when
cannam@167 6960 # linking a shared library.
cannam@167 6961 #
cannam@167 6962 # There doesn't appear to be a way to prevent this compiler from
cannam@167 6963 # explicitly linking system object files so we need to strip them
cannam@167 6964 # from the output so that they don't get included in the library
cannam@167 6965 # dependencies.
cannam@167 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@167 6967
cannam@167 6968 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
cannam@167 6969 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
cannam@167 6970
cannam@167 6971 # Archives containing C++ object files must be created using
cannam@167 6972 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
cannam@167 6973 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
cannam@167 6974 ;;
cannam@167 6975 icpc* | ecpc* )
cannam@167 6976 # Intel C++
cannam@167 6977 with_gnu_ld=yes
cannam@167 6978 # version 8.0 and above of icpc choke on multiply defined symbols
cannam@167 6979 # if we add $predep_objects and $postdep_objects, however 7.1 and
cannam@167 6980 # earlier do not add the objects themselves.
cannam@167 6981 case `$CC -V 2>&1` in
cannam@167 6982 *"Version 7."*)
cannam@167 6983 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@167 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@167 6985 ;;
cannam@167 6986 *) # Version 8.0 or newer
cannam@167 6987 tmp_idyn=
cannam@167 6988 case $host_cpu in
cannam@167 6989 ia64*) tmp_idyn=' -i_dynamic';;
cannam@167 6990 esac
cannam@167 6991 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@167 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@167 6993 ;;
cannam@167 6994 esac
cannam@167 6995 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@167 6996 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
cannam@167 6997 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
cannam@167 6998 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
cannam@167 6999 ;;
cannam@167 7000 pgCC* | pgcpp*)
cannam@167 7001 # Portland Group C++ compiler
cannam@167 7002 case `$CC -V` in
cannam@167 7003 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
cannam@167 7004 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
cannam@167 7005 rm -rf $tpldir~
cannam@167 7006 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
cannam@167 7007 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
cannam@167 7008 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
cannam@167 7009 rm -rf $tpldir~
cannam@167 7010 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
cannam@167 7011 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
cannam@167 7012 $RANLIB $oldlib'
cannam@167 7013 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
cannam@167 7014 rm -rf $tpldir~
cannam@167 7015 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
cannam@167 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@167 7017 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
cannam@167 7018 rm -rf $tpldir~
cannam@167 7019 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
cannam@167 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@167 7021 ;;
cannam@167 7022 *) # Version 6 and above use weak symbols
cannam@167 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@167 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@167 7025 ;;
cannam@167 7026 esac
cannam@167 7027
cannam@167 7028 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
cannam@167 7029 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
cannam@167 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@167 7031 ;;
cannam@167 7032 cxx*)
cannam@167 7033 # Compaq C++
cannam@167 7034 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@167 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@167 7036
cannam@167 7037 runpath_var=LD_RUN_PATH
cannam@167 7038 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
cannam@167 7039 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@167 7040
cannam@167 7041 # Commands to make compiler produce verbose output that lists
cannam@167 7042 # what "hidden" libraries, object files and flags are used when
cannam@167 7043 # linking a shared library.
cannam@167 7044 #
cannam@167 7045 # There doesn't appear to be a way to prevent this compiler from
cannam@167 7046 # explicitly linking system object files so we need to strip them
cannam@167 7047 # from the output so that they don't get included in the library
cannam@167 7048 # dependencies.
cannam@167 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@167 7050 ;;
cannam@167 7051 xl* | mpixl* | bgxl*)
cannam@167 7052 # IBM XL 8.0 on PPC, with GNU ld
cannam@167 7053 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@167 7054 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
cannam@167 7055 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
cannam@167 7056 if test yes = "$supports_anon_versioning"; then
cannam@167 7057 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
cannam@167 7058 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
cannam@167 7059 echo "local: *; };" >> $output_objdir/$libname.ver~
cannam@167 7060 $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
cannam@167 7061 fi
cannam@167 7062 ;;
cannam@167 7063 *)
cannam@167 7064 case `$CC -V 2>&1 | sed 5q` in
cannam@167 7065 *Sun\ C*)
cannam@167 7066 # Sun C++ 5.9
cannam@167 7067 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
cannam@167 7068 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
cannam@167 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@167 7070 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@167 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@167 7072 _LT_TAGVAR(compiler_needs_object, $1)=yes
cannam@167 7073
cannam@167 7074 # Not sure whether something based on
cannam@167 7075 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
cannam@167 7076 # would be better.
cannam@167 7077 output_verbose_link_cmd='func_echo_all'
cannam@167 7078
cannam@167 7079 # Archives containing C++ object files must be created using
cannam@167 7080 # "CC -xar", where "CC" is the Sun C++ compiler. This is
cannam@167 7081 # necessary to make sure instantiated templates are included
cannam@167 7082 # in the archive.
cannam@167 7083 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
cannam@167 7084 ;;
cannam@167 7085 esac
cannam@167 7086 ;;
cannam@167 7087 esac
cannam@167 7088 ;;
cannam@167 7089
cannam@167 7090 lynxos*)
cannam@167 7091 # FIXME: insert proper C++ library support
cannam@167 7092 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 7093 ;;
cannam@167 7094
cannam@167 7095 m88k*)
cannam@167 7096 # FIXME: insert proper C++ library support
cannam@167 7097 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 7098 ;;
cannam@167 7099
cannam@167 7100 mvs*)
cannam@167 7101 case $cc_basename in
cannam@167 7102 cxx*)
cannam@167 7103 # FIXME: insert proper C++ library support
cannam@167 7104 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 7105 ;;
cannam@167 7106 *)
cannam@167 7107 # FIXME: insert proper C++ library support
cannam@167 7108 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 7109 ;;
cannam@167 7110 esac
cannam@167 7111 ;;
cannam@167 7112
cannam@167 7113 netbsd*)
cannam@167 7114 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
cannam@167 7115 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
cannam@167 7116 wlarc=
cannam@167 7117 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@167 7118 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@167 7119 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@167 7120 fi
cannam@167 7121 # Workaround some broken pre-1.5 toolchains
cannam@167 7122 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
cannam@167 7123 ;;
cannam@167 7124
cannam@167 7125 *nto* | *qnx*)
cannam@167 7126 _LT_TAGVAR(ld_shlibs, $1)=yes
cannam@167 7127 ;;
cannam@167 7128
cannam@167 7129 openbsd* | bitrig*)
cannam@167 7130 if test -f /usr/libexec/ld.so; then
cannam@167 7131 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@167 7132 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@167 7133 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
cannam@167 7134 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
cannam@167 7135 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
cannam@167 7136 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
cannam@167 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@167 7138 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
cannam@167 7139 _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
cannam@167 7140 fi
cannam@167 7141 output_verbose_link_cmd=func_echo_all
cannam@167 7142 else
cannam@167 7143 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 7144 fi
cannam@167 7145 ;;
cannam@167 7146
cannam@167 7147 osf3* | osf4* | osf5*)
cannam@167 7148 case $cc_basename in
cannam@167 7149 KCC*)
cannam@167 7150 # Kuck and Associates, Inc. (KAI) C++ Compiler
cannam@167 7151
cannam@167 7152 # KCC will only create a shared library if the output file
cannam@167 7153 # ends with ".so" (or ".sl" for HP-UX), so rename the library
cannam@167 7154 # to its proper name (with version) after linking.
cannam@167 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@167 7156
cannam@167 7157 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
cannam@167 7158 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@167 7159
cannam@167 7160 # Archives containing C++ object files must be created using
cannam@167 7161 # the KAI C++ compiler.
cannam@167 7162 case $host in
cannam@167 7163 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
cannam@167 7164 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
cannam@167 7165 esac
cannam@167 7166 ;;
cannam@167 7167 RCC*)
cannam@167 7168 # Rational C++ 2.4.1
cannam@167 7169 # FIXME: insert proper C++ library support
cannam@167 7170 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 7171 ;;
cannam@167 7172 cxx*)
cannam@167 7173 case $host in
cannam@167 7174 osf3*)
cannam@167 7175 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
cannam@167 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@167 7177 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@167 7178 ;;
cannam@167 7179 *)
cannam@167 7180 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
cannam@167 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@167 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@167 7183 echo "-hidden">> $lib.exp~
cannam@167 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@167 7185 $RM $lib.exp'
cannam@167 7186 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
cannam@167 7187 ;;
cannam@167 7188 esac
cannam@167 7189
cannam@167 7190 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@167 7191
cannam@167 7192 # Commands to make compiler produce verbose output that lists
cannam@167 7193 # what "hidden" libraries, object files and flags are used when
cannam@167 7194 # linking a shared library.
cannam@167 7195 #
cannam@167 7196 # There doesn't appear to be a way to prevent this compiler from
cannam@167 7197 # explicitly linking system object files so we need to strip them
cannam@167 7198 # from the output so that they don't get included in the library
cannam@167 7199 # dependencies.
cannam@167 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@167 7201 ;;
cannam@167 7202 *)
cannam@167 7203 if test yes,no = "$GXX,$with_gnu_ld"; then
cannam@167 7204 _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
cannam@167 7205 case $host in
cannam@167 7206 osf3*)
cannam@167 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@167 7208 ;;
cannam@167 7209 *)
cannam@167 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@167 7211 ;;
cannam@167 7212 esac
cannam@167 7213
cannam@167 7214 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
cannam@167 7215 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@167 7216
cannam@167 7217 # Commands to make compiler produce verbose output that lists
cannam@167 7218 # what "hidden" libraries, object files and flags are used when
cannam@167 7219 # linking a shared library.
cannam@167 7220 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
cannam@167 7221
cannam@167 7222 else
cannam@167 7223 # FIXME: insert proper C++ library support
cannam@167 7224 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 7225 fi
cannam@167 7226 ;;
cannam@167 7227 esac
cannam@167 7228 ;;
cannam@167 7229
cannam@167 7230 psos*)
cannam@167 7231 # FIXME: insert proper C++ library support
cannam@167 7232 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 7233 ;;
cannam@167 7234
cannam@167 7235 sunos4*)
cannam@167 7236 case $cc_basename in
cannam@167 7237 CC*)
cannam@167 7238 # Sun C++ 4.x
cannam@167 7239 # FIXME: insert proper C++ library support
cannam@167 7240 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 7241 ;;
cannam@167 7242 lcc*)
cannam@167 7243 # Lucid
cannam@167 7244 # FIXME: insert proper C++ library support
cannam@167 7245 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 7246 ;;
cannam@167 7247 *)
cannam@167 7248 # FIXME: insert proper C++ library support
cannam@167 7249 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 7250 ;;
cannam@167 7251 esac
cannam@167 7252 ;;
cannam@167 7253
cannam@167 7254 solaris*)
cannam@167 7255 case $cc_basename in
cannam@167 7256 CC* | sunCC*)
cannam@167 7257 # Sun C++ 4.2, 5.x and Centerline C++
cannam@167 7258 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
cannam@167 7259 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
cannam@167 7260 _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
cannam@167 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@167 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@167 7263
cannam@167 7264 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@167 7265 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@167 7266 case $host_os in
cannam@167 7267 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
cannam@167 7268 *)
cannam@167 7269 # The compiler driver will combine and reorder linker options,
cannam@167 7270 # but understands '-z linker_flag'.
cannam@167 7271 # Supported since Solaris 2.6 (maybe 2.5.1?)
cannam@167 7272 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
cannam@167 7273 ;;
cannam@167 7274 esac
cannam@167 7275 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@167 7276
cannam@167 7277 output_verbose_link_cmd='func_echo_all'
cannam@167 7278
cannam@167 7279 # Archives containing C++ object files must be created using
cannam@167 7280 # "CC -xar", where "CC" is the Sun C++ compiler. This is
cannam@167 7281 # necessary to make sure instantiated templates are included
cannam@167 7282 # in the archive.
cannam@167 7283 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
cannam@167 7284 ;;
cannam@167 7285 gcx*)
cannam@167 7286 # Green Hills C++ Compiler
cannam@167 7287 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
cannam@167 7288
cannam@167 7289 # The C++ compiler must be used to create the archive.
cannam@167 7290 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
cannam@167 7291 ;;
cannam@167 7292 *)
cannam@167 7293 # GNU C++ compiler with Solaris linker
cannam@167 7294 if test yes,no = "$GXX,$with_gnu_ld"; then
cannam@167 7295 _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
cannam@167 7296 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
cannam@167 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@167 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@167 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@167 7300
cannam@167 7301 # Commands to make compiler produce verbose output that lists
cannam@167 7302 # what "hidden" libraries, object files and flags are used when
cannam@167 7303 # linking a shared library.
cannam@167 7304 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
cannam@167 7305 else
cannam@167 7306 # g++ 2.7 appears to require '-G' NOT '-shared' on this
cannam@167 7307 # platform.
cannam@167 7308 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
cannam@167 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@167 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@167 7311
cannam@167 7312 # Commands to make compiler produce verbose output that lists
cannam@167 7313 # what "hidden" libraries, object files and flags are used when
cannam@167 7314 # linking a shared library.
cannam@167 7315 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
cannam@167 7316 fi
cannam@167 7317
cannam@167 7318 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
cannam@167 7319 case $host_os in
cannam@167 7320 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
cannam@167 7321 *)
cannam@167 7322 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
cannam@167 7323 ;;
cannam@167 7324 esac
cannam@167 7325 fi
cannam@167 7326 ;;
cannam@167 7327 esac
cannam@167 7328 ;;
cannam@167 7329
cannam@167 7330 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
cannam@167 7331 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
cannam@167 7332 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@167 7333 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@167 7334 runpath_var='LD_RUN_PATH'
cannam@167 7335
cannam@167 7336 case $cc_basename in
cannam@167 7337 CC*)
cannam@167 7338 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@167 7339 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@167 7340 ;;
cannam@167 7341 *)
cannam@167 7342 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@167 7343 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@167 7344 ;;
cannam@167 7345 esac
cannam@167 7346 ;;
cannam@167 7347
cannam@167 7348 sysv5* | sco3.2v5* | sco5v6*)
cannam@167 7349 # Note: We CANNOT use -z defs as we might desire, because we do not
cannam@167 7350 # link with -lc, and that would cause any symbols used from libc to
cannam@167 7351 # always be unresolved, which means just about no library would
cannam@167 7352 # ever link correctly. If we're not using GNU ld we use -z text
cannam@167 7353 # though, which does catch some bad symbols but isn't as heavy-handed
cannam@167 7354 # as -z defs.
cannam@167 7355 _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
cannam@167 7356 _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
cannam@167 7357 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@167 7358 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@167 7359 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
cannam@167 7360 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
cannam@167 7361 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@167 7362 _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
cannam@167 7363 runpath_var='LD_RUN_PATH'
cannam@167 7364
cannam@167 7365 case $cc_basename in
cannam@167 7366 CC*)
cannam@167 7367 _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@167 7368 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@167 7369 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
cannam@167 7370 '"$_LT_TAGVAR(old_archive_cmds, $1)"
cannam@167 7371 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
cannam@167 7372 '"$_LT_TAGVAR(reload_cmds, $1)"
cannam@167 7373 ;;
cannam@167 7374 *)
cannam@167 7375 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@167 7376 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@167 7377 ;;
cannam@167 7378 esac
cannam@167 7379 ;;
cannam@167 7380
cannam@167 7381 tandem*)
cannam@167 7382 case $cc_basename in
cannam@167 7383 NCC*)
cannam@167 7384 # NonStop-UX NCC 3.20
cannam@167 7385 # FIXME: insert proper C++ library support
cannam@167 7386 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 7387 ;;
cannam@167 7388 *)
cannam@167 7389 # FIXME: insert proper C++ library support
cannam@167 7390 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 7391 ;;
cannam@167 7392 esac
cannam@167 7393 ;;
cannam@167 7394
cannam@167 7395 vxworks*)
cannam@167 7396 # FIXME: insert proper C++ library support
cannam@167 7397 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 7398 ;;
cannam@167 7399
cannam@167 7400 *)
cannam@167 7401 # FIXME: insert proper C++ library support
cannam@167 7402 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@167 7403 ;;
cannam@167 7404 esac
cannam@167 7405
cannam@167 7406 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
cannam@167 7407 test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
cannam@167 7408
cannam@167 7409 _LT_TAGVAR(GCC, $1)=$GXX
cannam@167 7410 _LT_TAGVAR(LD, $1)=$LD
cannam@167 7411
cannam@167 7412 ## CAVEAT EMPTOR:
cannam@167 7413 ## There is no encapsulation within the following macros, do not change
cannam@167 7414 ## the running order or otherwise move them around unless you know exactly
cannam@167 7415 ## what you are doing...
cannam@167 7416 _LT_SYS_HIDDEN_LIBDEPS($1)
cannam@167 7417 _LT_COMPILER_PIC($1)
cannam@167 7418 _LT_COMPILER_C_O($1)
cannam@167 7419 _LT_COMPILER_FILE_LOCKS($1)
cannam@167 7420 _LT_LINKER_SHLIBS($1)
cannam@167 7421 _LT_SYS_DYNAMIC_LINKER($1)
cannam@167 7422 _LT_LINKER_HARDCODE_LIBPATH($1)
cannam@167 7423
cannam@167 7424 _LT_CONFIG($1)
cannam@167 7425 fi # test -n "$compiler"
cannam@167 7426
cannam@167 7427 CC=$lt_save_CC
cannam@167 7428 CFLAGS=$lt_save_CFLAGS
cannam@167 7429 LDCXX=$LD
cannam@167 7430 LD=$lt_save_LD
cannam@167 7431 GCC=$lt_save_GCC
cannam@167 7432 with_gnu_ld=$lt_save_with_gnu_ld
cannam@167 7433 lt_cv_path_LDCXX=$lt_cv_path_LD
cannam@167 7434 lt_cv_path_LD=$lt_save_path_LD
cannam@167 7435 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
cannam@167 7436 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
cannam@167 7437 fi # test yes != "$_lt_caught_CXX_error"
cannam@167 7438
cannam@167 7439 AC_LANG_POP
cannam@167 7440 ])# _LT_LANG_CXX_CONFIG
cannam@167 7441
cannam@167 7442
cannam@167 7443 # _LT_FUNC_STRIPNAME_CNF
cannam@167 7444 # ----------------------
cannam@167 7445 # func_stripname_cnf prefix suffix name
cannam@167 7446 # strip PREFIX and SUFFIX off of NAME.
cannam@167 7447 # PREFIX and SUFFIX must not contain globbing or regex special
cannam@167 7448 # characters, hashes, percent signs, but SUFFIX may contain a leading
cannam@167 7449 # dot (in which case that matches only a dot).
cannam@167 7450 #
cannam@167 7451 # This function is identical to the (non-XSI) version of func_stripname,
cannam@167 7452 # except this one can be used by m4 code that may be executed by configure,
cannam@167 7453 # rather than the libtool script.
cannam@167 7454 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
cannam@167 7455 AC_REQUIRE([_LT_DECL_SED])
cannam@167 7456 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
cannam@167 7457 func_stripname_cnf ()
cannam@167 7458 {
cannam@167 7459 case @S|@2 in
cannam@167 7460 .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
cannam@167 7461 *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
cannam@167 7462 esac
cannam@167 7463 } # func_stripname_cnf
cannam@167 7464 ])# _LT_FUNC_STRIPNAME_CNF
cannam@167 7465
cannam@167 7466
cannam@167 7467 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
cannam@167 7468 # ---------------------------------
cannam@167 7469 # Figure out "hidden" library dependencies from verbose
cannam@167 7470 # compiler output when linking a shared library.
cannam@167 7471 # Parse the compiler output and extract the necessary
cannam@167 7472 # objects, libraries and library flags.
cannam@167 7473 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
cannam@167 7474 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@167 7475 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
cannam@167 7476 # Dependencies to place before and after the object being linked:
cannam@167 7477 _LT_TAGVAR(predep_objects, $1)=
cannam@167 7478 _LT_TAGVAR(postdep_objects, $1)=
cannam@167 7479 _LT_TAGVAR(predeps, $1)=
cannam@167 7480 _LT_TAGVAR(postdeps, $1)=
cannam@167 7481 _LT_TAGVAR(compiler_lib_search_path, $1)=
cannam@167 7482
cannam@167 7483 dnl we can't use the lt_simple_compile_test_code here,
cannam@167 7484 dnl because it contains code intended for an executable,
cannam@167 7485 dnl not a library. It's possible we should let each
cannam@167 7486 dnl tag define a new lt_????_link_test_code variable,
cannam@167 7487 dnl but it's only used here...
cannam@167 7488 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
cannam@167 7489 int a;
cannam@167 7490 void foo (void) { a = 0; }
cannam@167 7491 _LT_EOF
cannam@167 7492 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
cannam@167 7493 class Foo
cannam@167 7494 {
cannam@167 7495 public:
cannam@167 7496 Foo (void) { a = 0; }
cannam@167 7497 private:
cannam@167 7498 int a;
cannam@167 7499 };
cannam@167 7500 _LT_EOF
cannam@167 7501 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
cannam@167 7502 subroutine foo
cannam@167 7503 implicit none
cannam@167 7504 integer*4 a
cannam@167 7505 a=0
cannam@167 7506 return
cannam@167 7507 end
cannam@167 7508 _LT_EOF
cannam@167 7509 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
cannam@167 7510 subroutine foo
cannam@167 7511 implicit none
cannam@167 7512 integer a
cannam@167 7513 a=0
cannam@167 7514 return
cannam@167 7515 end
cannam@167 7516 _LT_EOF
cannam@167 7517 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
cannam@167 7518 public class foo {
cannam@167 7519 private int a;
cannam@167 7520 public void bar (void) {
cannam@167 7521 a = 0;
cannam@167 7522 }
cannam@167 7523 };
cannam@167 7524 _LT_EOF
cannam@167 7525 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
cannam@167 7526 package foo
cannam@167 7527 func foo() {
cannam@167 7528 }
cannam@167 7529 _LT_EOF
cannam@167 7530 ])
cannam@167 7531
cannam@167 7532 _lt_libdeps_save_CFLAGS=$CFLAGS
cannam@167 7533 case "$CC $CFLAGS " in #(
cannam@167 7534 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
cannam@167 7535 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
cannam@167 7536 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
cannam@167 7537 esac
cannam@167 7538
cannam@167 7539 dnl Parse the compiler output and extract the necessary
cannam@167 7540 dnl objects, libraries and library flags.
cannam@167 7541 if AC_TRY_EVAL(ac_compile); then
cannam@167 7542 # Parse the compiler output and extract the necessary
cannam@167 7543 # objects, libraries and library flags.
cannam@167 7544
cannam@167 7545 # Sentinel used to keep track of whether or not we are before
cannam@167 7546 # the conftest object file.
cannam@167 7547 pre_test_object_deps_done=no
cannam@167 7548
cannam@167 7549 for p in `eval "$output_verbose_link_cmd"`; do
cannam@167 7550 case $prev$p in
cannam@167 7551
cannam@167 7552 -L* | -R* | -l*)
cannam@167 7553 # Some compilers place space between "-{L,R}" and the path.
cannam@167 7554 # Remove the space.
cannam@167 7555 if test x-L = "$p" ||
cannam@167 7556 test x-R = "$p"; then
cannam@167 7557 prev=$p
cannam@167 7558 continue
cannam@167 7559 fi
cannam@167 7560
cannam@167 7561 # Expand the sysroot to ease extracting the directories later.
cannam@167 7562 if test -z "$prev"; then
cannam@167 7563 case $p in
cannam@167 7564 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
cannam@167 7565 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
cannam@167 7566 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
cannam@167 7567 esac
cannam@167 7568 fi
cannam@167 7569 case $p in
cannam@167 7570 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
cannam@167 7571 esac
cannam@167 7572 if test no = "$pre_test_object_deps_done"; then
cannam@167 7573 case $prev in
cannam@167 7574 -L | -R)
cannam@167 7575 # Internal compiler library paths should come after those
cannam@167 7576 # provided the user. The postdeps already come after the
cannam@167 7577 # user supplied libs so there is no need to process them.
cannam@167 7578 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
cannam@167 7579 _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
cannam@167 7580 else
cannam@167 7581 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
cannam@167 7582 fi
cannam@167 7583 ;;
cannam@167 7584 # The "-l" case would never come before the object being
cannam@167 7585 # linked, so don't bother handling this case.
cannam@167 7586 esac
cannam@167 7587 else
cannam@167 7588 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
cannam@167 7589 _LT_TAGVAR(postdeps, $1)=$prev$p
cannam@167 7590 else
cannam@167 7591 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
cannam@167 7592 fi
cannam@167 7593 fi
cannam@167 7594 prev=
cannam@167 7595 ;;
cannam@167 7596
cannam@167 7597 *.lto.$objext) ;; # Ignore GCC LTO objects
cannam@167 7598 *.$objext)
cannam@167 7599 # This assumes that the test object file only shows up
cannam@167 7600 # once in the compiler output.
cannam@167 7601 if test "$p" = "conftest.$objext"; then
cannam@167 7602 pre_test_object_deps_done=yes
cannam@167 7603 continue
cannam@167 7604 fi
cannam@167 7605
cannam@167 7606 if test no = "$pre_test_object_deps_done"; then
cannam@167 7607 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
cannam@167 7608 _LT_TAGVAR(predep_objects, $1)=$p
cannam@167 7609 else
cannam@167 7610 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
cannam@167 7611 fi
cannam@167 7612 else
cannam@167 7613 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
cannam@167 7614 _LT_TAGVAR(postdep_objects, $1)=$p
cannam@167 7615 else
cannam@167 7616 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
cannam@167 7617 fi
cannam@167 7618 fi
cannam@167 7619 ;;
cannam@167 7620
cannam@167 7621 *) ;; # Ignore the rest.
cannam@167 7622
cannam@167 7623 esac
cannam@167 7624 done
cannam@167 7625
cannam@167 7626 # Clean up.
cannam@167 7627 rm -f a.out a.exe
cannam@167 7628 else
cannam@167 7629 echo "libtool.m4: error: problem compiling $1 test program"
cannam@167 7630 fi
cannam@167 7631
cannam@167 7632 $RM -f confest.$objext
cannam@167 7633 CFLAGS=$_lt_libdeps_save_CFLAGS
cannam@167 7634
cannam@167 7635 # PORTME: override above test on systems where it is broken
cannam@167 7636 m4_if([$1], [CXX],
cannam@167 7637 [case $host_os in
cannam@167 7638 interix[[3-9]]*)
cannam@167 7639 # Interix 3.5 installs completely hosed .la files for C++, so rather than
cannam@167 7640 # hack all around it, let's just trust "g++" to DTRT.
cannam@167 7641 _LT_TAGVAR(predep_objects,$1)=
cannam@167 7642 _LT_TAGVAR(postdep_objects,$1)=
cannam@167 7643 _LT_TAGVAR(postdeps,$1)=
cannam@167 7644 ;;
cannam@167 7645 esac
cannam@167 7646 ])
cannam@167 7647
cannam@167 7648 case " $_LT_TAGVAR(postdeps, $1) " in
cannam@167 7649 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
cannam@167 7650 esac
cannam@167 7651 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
cannam@167 7652 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
cannam@167 7653 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
cannam@167 7654 fi
cannam@167 7655 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
cannam@167 7656 [The directories searched by this compiler when creating a shared library])
cannam@167 7657 _LT_TAGDECL([], [predep_objects], [1],
cannam@167 7658 [Dependencies to place before and after the objects being linked to
cannam@167 7659 create a shared library])
cannam@167 7660 _LT_TAGDECL([], [postdep_objects], [1])
cannam@167 7661 _LT_TAGDECL([], [predeps], [1])
cannam@167 7662 _LT_TAGDECL([], [postdeps], [1])
cannam@167 7663 _LT_TAGDECL([], [compiler_lib_search_path], [1],
cannam@167 7664 [The library search path used internally by the compiler when linking
cannam@167 7665 a shared library])
cannam@167 7666 ])# _LT_SYS_HIDDEN_LIBDEPS
cannam@167 7667
cannam@167 7668
cannam@167 7669 # _LT_LANG_F77_CONFIG([TAG])
cannam@167 7670 # --------------------------
cannam@167 7671 # Ensure that the configuration variables for a Fortran 77 compiler are
cannam@167 7672 # suitably defined. These variables are subsequently used by _LT_CONFIG
cannam@167 7673 # to write the compiler configuration to 'libtool'.
cannam@167 7674 m4_defun([_LT_LANG_F77_CONFIG],
cannam@167 7675 [AC_LANG_PUSH(Fortran 77)
cannam@167 7676 if test -z "$F77" || test no = "$F77"; then
cannam@167 7677 _lt_disable_F77=yes
cannam@167 7678 fi
cannam@167 7679
cannam@167 7680 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@167 7681 _LT_TAGVAR(allow_undefined_flag, $1)=
cannam@167 7682 _LT_TAGVAR(always_export_symbols, $1)=no
cannam@167 7683 _LT_TAGVAR(archive_expsym_cmds, $1)=
cannam@167 7684 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
cannam@167 7685 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@167 7686 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
cannam@167 7687 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
cannam@167 7688 _LT_TAGVAR(hardcode_libdir_separator, $1)=
cannam@167 7689 _LT_TAGVAR(hardcode_minus_L, $1)=no
cannam@167 7690 _LT_TAGVAR(hardcode_automatic, $1)=no
cannam@167 7691 _LT_TAGVAR(inherit_rpath, $1)=no
cannam@167 7692 _LT_TAGVAR(module_cmds, $1)=
cannam@167 7693 _LT_TAGVAR(module_expsym_cmds, $1)=
cannam@167 7694 _LT_TAGVAR(link_all_deplibs, $1)=unknown
cannam@167 7695 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
cannam@167 7696 _LT_TAGVAR(reload_flag, $1)=$reload_flag
cannam@167 7697 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
cannam@167 7698 _LT_TAGVAR(no_undefined_flag, $1)=
cannam@167 7699 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@167 7700 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
cannam@167 7701
cannam@167 7702 # Source file extension for f77 test sources.
cannam@167 7703 ac_ext=f
cannam@167 7704
cannam@167 7705 # Object file extension for compiled f77 test sources.
cannam@167 7706 objext=o
cannam@167 7707 _LT_TAGVAR(objext, $1)=$objext
cannam@167 7708
cannam@167 7709 # No sense in running all these tests if we already determined that
cannam@167 7710 # the F77 compiler isn't working. Some variables (like enable_shared)
cannam@167 7711 # are currently assumed to apply to all compilers on this platform,
cannam@167 7712 # and will be corrupted by setting them based on a non-working compiler.
cannam@167 7713 if test yes != "$_lt_disable_F77"; then
cannam@167 7714 # Code to be used in simple compile tests
cannam@167 7715 lt_simple_compile_test_code="\
cannam@167 7716 subroutine t
cannam@167 7717 return
cannam@167 7718 end
cannam@167 7719 "
cannam@167 7720
cannam@167 7721 # Code to be used in simple link tests
cannam@167 7722 lt_simple_link_test_code="\
cannam@167 7723 program t
cannam@167 7724 end
cannam@167 7725 "
cannam@167 7726
cannam@167 7727 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
cannam@167 7728 _LT_TAG_COMPILER
cannam@167 7729
cannam@167 7730 # save warnings/boilerplate of simple test code
cannam@167 7731 _LT_COMPILER_BOILERPLATE
cannam@167 7732 _LT_LINKER_BOILERPLATE
cannam@167 7733
cannam@167 7734 # Allow CC to be a program name with arguments.
cannam@167 7735 lt_save_CC=$CC
cannam@167 7736 lt_save_GCC=$GCC
cannam@167 7737 lt_save_CFLAGS=$CFLAGS
cannam@167 7738 CC=${F77-"f77"}
cannam@167 7739 CFLAGS=$FFLAGS
cannam@167 7740 compiler=$CC
cannam@167 7741 _LT_TAGVAR(compiler, $1)=$CC
cannam@167 7742 _LT_CC_BASENAME([$compiler])
cannam@167 7743 GCC=$G77
cannam@167 7744 if test -n "$compiler"; then
cannam@167 7745 AC_MSG_CHECKING([if libtool supports shared libraries])
cannam@167 7746 AC_MSG_RESULT([$can_build_shared])
cannam@167 7747
cannam@167 7748 AC_MSG_CHECKING([whether to build shared libraries])
cannam@167 7749 test no = "$can_build_shared" && enable_shared=no
cannam@167 7750
cannam@167 7751 # On AIX, shared libraries and static libraries use the same namespace, and
cannam@167 7752 # are all built from PIC.
cannam@167 7753 case $host_os in
cannam@167 7754 aix3*)
cannam@167 7755 test yes = "$enable_shared" && enable_static=no
cannam@167 7756 if test -n "$RANLIB"; then
cannam@167 7757 archive_cmds="$archive_cmds~\$RANLIB \$lib"
cannam@167 7758 postinstall_cmds='$RANLIB $lib'
cannam@167 7759 fi
cannam@167 7760 ;;
cannam@167 7761 aix[[4-9]]*)
cannam@167 7762 if test ia64 != "$host_cpu"; then
cannam@167 7763 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
cannam@167 7764 yes,aix,yes) ;; # shared object as lib.so file only
cannam@167 7765 yes,svr4,*) ;; # shared object as lib.so archive member only
cannam@167 7766 yes,*) enable_static=no ;; # shared object in lib.a archive as well
cannam@167 7767 esac
cannam@167 7768 fi
cannam@167 7769 ;;
cannam@167 7770 esac
cannam@167 7771 AC_MSG_RESULT([$enable_shared])
cannam@167 7772
cannam@167 7773 AC_MSG_CHECKING([whether to build static libraries])
cannam@167 7774 # Make sure either enable_shared or enable_static is yes.
cannam@167 7775 test yes = "$enable_shared" || enable_static=yes
cannam@167 7776 AC_MSG_RESULT([$enable_static])
cannam@167 7777
cannam@167 7778 _LT_TAGVAR(GCC, $1)=$G77
cannam@167 7779 _LT_TAGVAR(LD, $1)=$LD
cannam@167 7780
cannam@167 7781 ## CAVEAT EMPTOR:
cannam@167 7782 ## There is no encapsulation within the following macros, do not change
cannam@167 7783 ## the running order or otherwise move them around unless you know exactly
cannam@167 7784 ## what you are doing...
cannam@167 7785 _LT_COMPILER_PIC($1)
cannam@167 7786 _LT_COMPILER_C_O($1)
cannam@167 7787 _LT_COMPILER_FILE_LOCKS($1)
cannam@167 7788 _LT_LINKER_SHLIBS($1)
cannam@167 7789 _LT_SYS_DYNAMIC_LINKER($1)
cannam@167 7790 _LT_LINKER_HARDCODE_LIBPATH($1)
cannam@167 7791
cannam@167 7792 _LT_CONFIG($1)
cannam@167 7793 fi # test -n "$compiler"
cannam@167 7794
cannam@167 7795 GCC=$lt_save_GCC
cannam@167 7796 CC=$lt_save_CC
cannam@167 7797 CFLAGS=$lt_save_CFLAGS
cannam@167 7798 fi # test yes != "$_lt_disable_F77"
cannam@167 7799
cannam@167 7800 AC_LANG_POP
cannam@167 7801 ])# _LT_LANG_F77_CONFIG
cannam@167 7802
cannam@167 7803
cannam@167 7804 # _LT_LANG_FC_CONFIG([TAG])
cannam@167 7805 # -------------------------
cannam@167 7806 # Ensure that the configuration variables for a Fortran compiler are
cannam@167 7807 # suitably defined. These variables are subsequently used by _LT_CONFIG
cannam@167 7808 # to write the compiler configuration to 'libtool'.
cannam@167 7809 m4_defun([_LT_LANG_FC_CONFIG],
cannam@167 7810 [AC_LANG_PUSH(Fortran)
cannam@167 7811
cannam@167 7812 if test -z "$FC" || test no = "$FC"; then
cannam@167 7813 _lt_disable_FC=yes
cannam@167 7814 fi
cannam@167 7815
cannam@167 7816 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@167 7817 _LT_TAGVAR(allow_undefined_flag, $1)=
cannam@167 7818 _LT_TAGVAR(always_export_symbols, $1)=no
cannam@167 7819 _LT_TAGVAR(archive_expsym_cmds, $1)=
cannam@167 7820 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
cannam@167 7821 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@167 7822 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
cannam@167 7823 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
cannam@167 7824 _LT_TAGVAR(hardcode_libdir_separator, $1)=
cannam@167 7825 _LT_TAGVAR(hardcode_minus_L, $1)=no
cannam@167 7826 _LT_TAGVAR(hardcode_automatic, $1)=no
cannam@167 7827 _LT_TAGVAR(inherit_rpath, $1)=no
cannam@167 7828 _LT_TAGVAR(module_cmds, $1)=
cannam@167 7829 _LT_TAGVAR(module_expsym_cmds, $1)=
cannam@167 7830 _LT_TAGVAR(link_all_deplibs, $1)=unknown
cannam@167 7831 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
cannam@167 7832 _LT_TAGVAR(reload_flag, $1)=$reload_flag
cannam@167 7833 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
cannam@167 7834 _LT_TAGVAR(no_undefined_flag, $1)=
cannam@167 7835 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@167 7836 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
cannam@167 7837
cannam@167 7838 # Source file extension for fc test sources.
cannam@167 7839 ac_ext=${ac_fc_srcext-f}
cannam@167 7840
cannam@167 7841 # Object file extension for compiled fc test sources.
cannam@167 7842 objext=o
cannam@167 7843 _LT_TAGVAR(objext, $1)=$objext
cannam@167 7844
cannam@167 7845 # No sense in running all these tests if we already determined that
cannam@167 7846 # the FC compiler isn't working. Some variables (like enable_shared)
cannam@167 7847 # are currently assumed to apply to all compilers on this platform,
cannam@167 7848 # and will be corrupted by setting them based on a non-working compiler.
cannam@167 7849 if test yes != "$_lt_disable_FC"; then
cannam@167 7850 # Code to be used in simple compile tests
cannam@167 7851 lt_simple_compile_test_code="\
cannam@167 7852 subroutine t
cannam@167 7853 return
cannam@167 7854 end
cannam@167 7855 "
cannam@167 7856
cannam@167 7857 # Code to be used in simple link tests
cannam@167 7858 lt_simple_link_test_code="\
cannam@167 7859 program t
cannam@167 7860 end
cannam@167 7861 "
cannam@167 7862
cannam@167 7863 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
cannam@167 7864 _LT_TAG_COMPILER
cannam@167 7865
cannam@167 7866 # save warnings/boilerplate of simple test code
cannam@167 7867 _LT_COMPILER_BOILERPLATE
cannam@167 7868 _LT_LINKER_BOILERPLATE
cannam@167 7869
cannam@167 7870 # Allow CC to be a program name with arguments.
cannam@167 7871 lt_save_CC=$CC
cannam@167 7872 lt_save_GCC=$GCC
cannam@167 7873 lt_save_CFLAGS=$CFLAGS
cannam@167 7874 CC=${FC-"f95"}
cannam@167 7875 CFLAGS=$FCFLAGS
cannam@167 7876 compiler=$CC
cannam@167 7877 GCC=$ac_cv_fc_compiler_gnu
cannam@167 7878
cannam@167 7879 _LT_TAGVAR(compiler, $1)=$CC
cannam@167 7880 _LT_CC_BASENAME([$compiler])
cannam@167 7881
cannam@167 7882 if test -n "$compiler"; then
cannam@167 7883 AC_MSG_CHECKING([if libtool supports shared libraries])
cannam@167 7884 AC_MSG_RESULT([$can_build_shared])
cannam@167 7885
cannam@167 7886 AC_MSG_CHECKING([whether to build shared libraries])
cannam@167 7887 test no = "$can_build_shared" && enable_shared=no
cannam@167 7888
cannam@167 7889 # On AIX, shared libraries and static libraries use the same namespace, and
cannam@167 7890 # are all built from PIC.
cannam@167 7891 case $host_os in
cannam@167 7892 aix3*)
cannam@167 7893 test yes = "$enable_shared" && enable_static=no
cannam@167 7894 if test -n "$RANLIB"; then
cannam@167 7895 archive_cmds="$archive_cmds~\$RANLIB \$lib"
cannam@167 7896 postinstall_cmds='$RANLIB $lib'
cannam@167 7897 fi
cannam@167 7898 ;;
cannam@167 7899 aix[[4-9]]*)
cannam@167 7900 if test ia64 != "$host_cpu"; then
cannam@167 7901 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
cannam@167 7902 yes,aix,yes) ;; # shared object as lib.so file only
cannam@167 7903 yes,svr4,*) ;; # shared object as lib.so archive member only
cannam@167 7904 yes,*) enable_static=no ;; # shared object in lib.a archive as well
cannam@167 7905 esac
cannam@167 7906 fi
cannam@167 7907 ;;
cannam@167 7908 esac
cannam@167 7909 AC_MSG_RESULT([$enable_shared])
cannam@167 7910
cannam@167 7911 AC_MSG_CHECKING([whether to build static libraries])
cannam@167 7912 # Make sure either enable_shared or enable_static is yes.
cannam@167 7913 test yes = "$enable_shared" || enable_static=yes
cannam@167 7914 AC_MSG_RESULT([$enable_static])
cannam@167 7915
cannam@167 7916 _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
cannam@167 7917 _LT_TAGVAR(LD, $1)=$LD
cannam@167 7918
cannam@167 7919 ## CAVEAT EMPTOR:
cannam@167 7920 ## There is no encapsulation within the following macros, do not change
cannam@167 7921 ## the running order or otherwise move them around unless you know exactly
cannam@167 7922 ## what you are doing...
cannam@167 7923 _LT_SYS_HIDDEN_LIBDEPS($1)
cannam@167 7924 _LT_COMPILER_PIC($1)
cannam@167 7925 _LT_COMPILER_C_O($1)
cannam@167 7926 _LT_COMPILER_FILE_LOCKS($1)
cannam@167 7927 _LT_LINKER_SHLIBS($1)
cannam@167 7928 _LT_SYS_DYNAMIC_LINKER($1)
cannam@167 7929 _LT_LINKER_HARDCODE_LIBPATH($1)
cannam@167 7930
cannam@167 7931 _LT_CONFIG($1)
cannam@167 7932 fi # test -n "$compiler"
cannam@167 7933
cannam@167 7934 GCC=$lt_save_GCC
cannam@167 7935 CC=$lt_save_CC
cannam@167 7936 CFLAGS=$lt_save_CFLAGS
cannam@167 7937 fi # test yes != "$_lt_disable_FC"
cannam@167 7938
cannam@167 7939 AC_LANG_POP
cannam@167 7940 ])# _LT_LANG_FC_CONFIG
cannam@167 7941
cannam@167 7942
cannam@167 7943 # _LT_LANG_GCJ_CONFIG([TAG])
cannam@167 7944 # --------------------------
cannam@167 7945 # Ensure that the configuration variables for the GNU Java Compiler compiler
cannam@167 7946 # are suitably defined. These variables are subsequently used by _LT_CONFIG
cannam@167 7947 # to write the compiler configuration to 'libtool'.
cannam@167 7948 m4_defun([_LT_LANG_GCJ_CONFIG],
cannam@167 7949 [AC_REQUIRE([LT_PROG_GCJ])dnl
cannam@167 7950 AC_LANG_SAVE
cannam@167 7951
cannam@167 7952 # Source file extension for Java test sources.
cannam@167 7953 ac_ext=java
cannam@167 7954
cannam@167 7955 # Object file extension for compiled Java test sources.
cannam@167 7956 objext=o
cannam@167 7957 _LT_TAGVAR(objext, $1)=$objext
cannam@167 7958
cannam@167 7959 # Code to be used in simple compile tests
cannam@167 7960 lt_simple_compile_test_code="class foo {}"
cannam@167 7961
cannam@167 7962 # Code to be used in simple link tests
cannam@167 7963 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
cannam@167 7964
cannam@167 7965 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
cannam@167 7966 _LT_TAG_COMPILER
cannam@167 7967
cannam@167 7968 # save warnings/boilerplate of simple test code
cannam@167 7969 _LT_COMPILER_BOILERPLATE
cannam@167 7970 _LT_LINKER_BOILERPLATE
cannam@167 7971
cannam@167 7972 # Allow CC to be a program name with arguments.
cannam@167 7973 lt_save_CC=$CC
cannam@167 7974 lt_save_CFLAGS=$CFLAGS
cannam@167 7975 lt_save_GCC=$GCC
cannam@167 7976 GCC=yes
cannam@167 7977 CC=${GCJ-"gcj"}
cannam@167 7978 CFLAGS=$GCJFLAGS
cannam@167 7979 compiler=$CC
cannam@167 7980 _LT_TAGVAR(compiler, $1)=$CC
cannam@167 7981 _LT_TAGVAR(LD, $1)=$LD
cannam@167 7982 _LT_CC_BASENAME([$compiler])
cannam@167 7983
cannam@167 7984 # GCJ did not exist at the time GCC didn't implicitly link libc in.
cannam@167 7985 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@167 7986
cannam@167 7987 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
cannam@167 7988 _LT_TAGVAR(reload_flag, $1)=$reload_flag
cannam@167 7989 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
cannam@167 7990
cannam@167 7991 ## CAVEAT EMPTOR:
cannam@167 7992 ## There is no encapsulation within the following macros, do not change
cannam@167 7993 ## the running order or otherwise move them around unless you know exactly
cannam@167 7994 ## what you are doing...
cannam@167 7995 if test -n "$compiler"; then
cannam@167 7996 _LT_COMPILER_NO_RTTI($1)
cannam@167 7997 _LT_COMPILER_PIC($1)
cannam@167 7998 _LT_COMPILER_C_O($1)
cannam@167 7999 _LT_COMPILER_FILE_LOCKS($1)
cannam@167 8000 _LT_LINKER_SHLIBS($1)
cannam@167 8001 _LT_LINKER_HARDCODE_LIBPATH($1)
cannam@167 8002
cannam@167 8003 _LT_CONFIG($1)
cannam@167 8004 fi
cannam@167 8005
cannam@167 8006 AC_LANG_RESTORE
cannam@167 8007
cannam@167 8008 GCC=$lt_save_GCC
cannam@167 8009 CC=$lt_save_CC
cannam@167 8010 CFLAGS=$lt_save_CFLAGS
cannam@167 8011 ])# _LT_LANG_GCJ_CONFIG
cannam@167 8012
cannam@167 8013
cannam@167 8014 # _LT_LANG_GO_CONFIG([TAG])
cannam@167 8015 # --------------------------
cannam@167 8016 # Ensure that the configuration variables for the GNU Go compiler
cannam@167 8017 # are suitably defined. These variables are subsequently used by _LT_CONFIG
cannam@167 8018 # to write the compiler configuration to 'libtool'.
cannam@167 8019 m4_defun([_LT_LANG_GO_CONFIG],
cannam@167 8020 [AC_REQUIRE([LT_PROG_GO])dnl
cannam@167 8021 AC_LANG_SAVE
cannam@167 8022
cannam@167 8023 # Source file extension for Go test sources.
cannam@167 8024 ac_ext=go
cannam@167 8025
cannam@167 8026 # Object file extension for compiled Go test sources.
cannam@167 8027 objext=o
cannam@167 8028 _LT_TAGVAR(objext, $1)=$objext
cannam@167 8029
cannam@167 8030 # Code to be used in simple compile tests
cannam@167 8031 lt_simple_compile_test_code="package main; func main() { }"
cannam@167 8032
cannam@167 8033 # Code to be used in simple link tests
cannam@167 8034 lt_simple_link_test_code='package main; func main() { }'
cannam@167 8035
cannam@167 8036 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
cannam@167 8037 _LT_TAG_COMPILER
cannam@167 8038
cannam@167 8039 # save warnings/boilerplate of simple test code
cannam@167 8040 _LT_COMPILER_BOILERPLATE
cannam@167 8041 _LT_LINKER_BOILERPLATE
cannam@167 8042
cannam@167 8043 # Allow CC to be a program name with arguments.
cannam@167 8044 lt_save_CC=$CC
cannam@167 8045 lt_save_CFLAGS=$CFLAGS
cannam@167 8046 lt_save_GCC=$GCC
cannam@167 8047 GCC=yes
cannam@167 8048 CC=${GOC-"gccgo"}
cannam@167 8049 CFLAGS=$GOFLAGS
cannam@167 8050 compiler=$CC
cannam@167 8051 _LT_TAGVAR(compiler, $1)=$CC
cannam@167 8052 _LT_TAGVAR(LD, $1)=$LD
cannam@167 8053 _LT_CC_BASENAME([$compiler])
cannam@167 8054
cannam@167 8055 # Go did not exist at the time GCC didn't implicitly link libc in.
cannam@167 8056 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@167 8057
cannam@167 8058 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
cannam@167 8059 _LT_TAGVAR(reload_flag, $1)=$reload_flag
cannam@167 8060 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
cannam@167 8061
cannam@167 8062 ## CAVEAT EMPTOR:
cannam@167 8063 ## There is no encapsulation within the following macros, do not change
cannam@167 8064 ## the running order or otherwise move them around unless you know exactly
cannam@167 8065 ## what you are doing...
cannam@167 8066 if test -n "$compiler"; then
cannam@167 8067 _LT_COMPILER_NO_RTTI($1)
cannam@167 8068 _LT_COMPILER_PIC($1)
cannam@167 8069 _LT_COMPILER_C_O($1)
cannam@167 8070 _LT_COMPILER_FILE_LOCKS($1)
cannam@167 8071 _LT_LINKER_SHLIBS($1)
cannam@167 8072 _LT_LINKER_HARDCODE_LIBPATH($1)
cannam@167 8073
cannam@167 8074 _LT_CONFIG($1)
cannam@167 8075 fi
cannam@167 8076
cannam@167 8077 AC_LANG_RESTORE
cannam@167 8078
cannam@167 8079 GCC=$lt_save_GCC
cannam@167 8080 CC=$lt_save_CC
cannam@167 8081 CFLAGS=$lt_save_CFLAGS
cannam@167 8082 ])# _LT_LANG_GO_CONFIG
cannam@167 8083
cannam@167 8084
cannam@167 8085 # _LT_LANG_RC_CONFIG([TAG])
cannam@167 8086 # -------------------------
cannam@167 8087 # Ensure that the configuration variables for the Windows resource compiler
cannam@167 8088 # are suitably defined. These variables are subsequently used by _LT_CONFIG
cannam@167 8089 # to write the compiler configuration to 'libtool'.
cannam@167 8090 m4_defun([_LT_LANG_RC_CONFIG],
cannam@167 8091 [AC_REQUIRE([LT_PROG_RC])dnl
cannam@167 8092 AC_LANG_SAVE
cannam@167 8093
cannam@167 8094 # Source file extension for RC test sources.
cannam@167 8095 ac_ext=rc
cannam@167 8096
cannam@167 8097 # Object file extension for compiled RC test sources.
cannam@167 8098 objext=o
cannam@167 8099 _LT_TAGVAR(objext, $1)=$objext
cannam@167 8100
cannam@167 8101 # Code to be used in simple compile tests
cannam@167 8102 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
cannam@167 8103
cannam@167 8104 # Code to be used in simple link tests
cannam@167 8105 lt_simple_link_test_code=$lt_simple_compile_test_code
cannam@167 8106
cannam@167 8107 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
cannam@167 8108 _LT_TAG_COMPILER
cannam@167 8109
cannam@167 8110 # save warnings/boilerplate of simple test code
cannam@167 8111 _LT_COMPILER_BOILERPLATE
cannam@167 8112 _LT_LINKER_BOILERPLATE
cannam@167 8113
cannam@167 8114 # Allow CC to be a program name with arguments.
cannam@167 8115 lt_save_CC=$CC
cannam@167 8116 lt_save_CFLAGS=$CFLAGS
cannam@167 8117 lt_save_GCC=$GCC
cannam@167 8118 GCC=
cannam@167 8119 CC=${RC-"windres"}
cannam@167 8120 CFLAGS=
cannam@167 8121 compiler=$CC
cannam@167 8122 _LT_TAGVAR(compiler, $1)=$CC
cannam@167 8123 _LT_CC_BASENAME([$compiler])
cannam@167 8124 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
cannam@167 8125
cannam@167 8126 if test -n "$compiler"; then
cannam@167 8127 :
cannam@167 8128 _LT_CONFIG($1)
cannam@167 8129 fi
cannam@167 8130
cannam@167 8131 GCC=$lt_save_GCC
cannam@167 8132 AC_LANG_RESTORE
cannam@167 8133 CC=$lt_save_CC
cannam@167 8134 CFLAGS=$lt_save_CFLAGS
cannam@167 8135 ])# _LT_LANG_RC_CONFIG
cannam@167 8136
cannam@167 8137
cannam@167 8138 # LT_PROG_GCJ
cannam@167 8139 # -----------
cannam@167 8140 AC_DEFUN([LT_PROG_GCJ],
cannam@167 8141 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
cannam@167 8142 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
cannam@167 8143 [AC_CHECK_TOOL(GCJ, gcj,)
cannam@167 8144 test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
cannam@167 8145 AC_SUBST(GCJFLAGS)])])[]dnl
cannam@167 8146 ])
cannam@167 8147
cannam@167 8148 # Old name:
cannam@167 8149 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
cannam@167 8150 dnl aclocal-1.4 backwards compatibility:
cannam@167 8151 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
cannam@167 8152
cannam@167 8153
cannam@167 8154 # LT_PROG_GO
cannam@167 8155 # ----------
cannam@167 8156 AC_DEFUN([LT_PROG_GO],
cannam@167 8157 [AC_CHECK_TOOL(GOC, gccgo,)
cannam@167 8158 ])
cannam@167 8159
cannam@167 8160
cannam@167 8161 # LT_PROG_RC
cannam@167 8162 # ----------
cannam@167 8163 AC_DEFUN([LT_PROG_RC],
cannam@167 8164 [AC_CHECK_TOOL(RC, windres,)
cannam@167 8165 ])
cannam@167 8166
cannam@167 8167 # Old name:
cannam@167 8168 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
cannam@167 8169 dnl aclocal-1.4 backwards compatibility:
cannam@167 8170 dnl AC_DEFUN([LT_AC_PROG_RC], [])
cannam@167 8171
cannam@167 8172
cannam@167 8173 # _LT_DECL_EGREP
cannam@167 8174 # --------------
cannam@167 8175 # If we don't have a new enough Autoconf to choose the best grep
cannam@167 8176 # available, choose the one first in the user's PATH.
cannam@167 8177 m4_defun([_LT_DECL_EGREP],
cannam@167 8178 [AC_REQUIRE([AC_PROG_EGREP])dnl
cannam@167 8179 AC_REQUIRE([AC_PROG_FGREP])dnl
cannam@167 8180 test -z "$GREP" && GREP=grep
cannam@167 8181 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
cannam@167 8182 _LT_DECL([], [EGREP], [1], [An ERE matcher])
cannam@167 8183 _LT_DECL([], [FGREP], [1], [A literal string matcher])
cannam@167 8184 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
cannam@167 8185 AC_SUBST([GREP])
cannam@167 8186 ])
cannam@167 8187
cannam@167 8188
cannam@167 8189 # _LT_DECL_OBJDUMP
cannam@167 8190 # --------------
cannam@167 8191 # If we don't have a new enough Autoconf to choose the best objdump
cannam@167 8192 # available, choose the one first in the user's PATH.
cannam@167 8193 m4_defun([_LT_DECL_OBJDUMP],
cannam@167 8194 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
cannam@167 8195 test -z "$OBJDUMP" && OBJDUMP=objdump
cannam@167 8196 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
cannam@167 8197 AC_SUBST([OBJDUMP])
cannam@167 8198 ])
cannam@167 8199
cannam@167 8200 # _LT_DECL_DLLTOOL
cannam@167 8201 # ----------------
cannam@167 8202 # Ensure DLLTOOL variable is set.
cannam@167 8203 m4_defun([_LT_DECL_DLLTOOL],
cannam@167 8204 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
cannam@167 8205 test -z "$DLLTOOL" && DLLTOOL=dlltool
cannam@167 8206 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
cannam@167 8207 AC_SUBST([DLLTOOL])
cannam@167 8208 ])
cannam@167 8209
cannam@167 8210 # _LT_DECL_SED
cannam@167 8211 # ------------
cannam@167 8212 # Check for a fully-functional sed program, that truncates
cannam@167 8213 # as few characters as possible. Prefer GNU sed if found.
cannam@167 8214 m4_defun([_LT_DECL_SED],
cannam@167 8215 [AC_PROG_SED
cannam@167 8216 test -z "$SED" && SED=sed
cannam@167 8217 Xsed="$SED -e 1s/^X//"
cannam@167 8218 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
cannam@167 8219 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
cannam@167 8220 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
cannam@167 8221 ])# _LT_DECL_SED
cannam@167 8222
cannam@167 8223 m4_ifndef([AC_PROG_SED], [
cannam@167 8224 ############################################################
cannam@167 8225 # NOTE: This macro has been submitted for inclusion into #
cannam@167 8226 # GNU Autoconf as AC_PROG_SED. When it is available in #
cannam@167 8227 # a released version of Autoconf we should remove this #
cannam@167 8228 # macro and use it instead. #
cannam@167 8229 ############################################################
cannam@167 8230
cannam@167 8231 m4_defun([AC_PROG_SED],
cannam@167 8232 [AC_MSG_CHECKING([for a sed that does not truncate output])
cannam@167 8233 AC_CACHE_VAL(lt_cv_path_SED,
cannam@167 8234 [# Loop through the user's path and test for sed and gsed.
cannam@167 8235 # Then use that list of sed's as ones to test for truncation.
cannam@167 8236 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
cannam@167 8237 for as_dir in $PATH
cannam@167 8238 do
cannam@167 8239 IFS=$as_save_IFS
cannam@167 8240 test -z "$as_dir" && as_dir=.
cannam@167 8241 for lt_ac_prog in sed gsed; do
cannam@167 8242 for ac_exec_ext in '' $ac_executable_extensions; do
cannam@167 8243 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
cannam@167 8244 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
cannam@167 8245 fi
cannam@167 8246 done
cannam@167 8247 done
cannam@167 8248 done
cannam@167 8249 IFS=$as_save_IFS
cannam@167 8250 lt_ac_max=0
cannam@167 8251 lt_ac_count=0
cannam@167 8252 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
cannam@167 8253 # along with /bin/sed that truncates output.
cannam@167 8254 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
cannam@167 8255 test ! -f "$lt_ac_sed" && continue
cannam@167 8256 cat /dev/null > conftest.in
cannam@167 8257 lt_ac_count=0
cannam@167 8258 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
cannam@167 8259 # Check for GNU sed and select it if it is found.
cannam@167 8260 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
cannam@167 8261 lt_cv_path_SED=$lt_ac_sed
cannam@167 8262 break
cannam@167 8263 fi
cannam@167 8264 while true; do
cannam@167 8265 cat conftest.in conftest.in >conftest.tmp
cannam@167 8266 mv conftest.tmp conftest.in
cannam@167 8267 cp conftest.in conftest.nl
cannam@167 8268 echo >>conftest.nl
cannam@167 8269 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
cannam@167 8270 cmp -s conftest.out conftest.nl || break
cannam@167 8271 # 10000 chars as input seems more than enough
cannam@167 8272 test 10 -lt "$lt_ac_count" && break
cannam@167 8273 lt_ac_count=`expr $lt_ac_count + 1`
cannam@167 8274 if test "$lt_ac_count" -gt "$lt_ac_max"; then
cannam@167 8275 lt_ac_max=$lt_ac_count
cannam@167 8276 lt_cv_path_SED=$lt_ac_sed
cannam@167 8277 fi
cannam@167 8278 done
cannam@167 8279 done
cannam@167 8280 ])
cannam@167 8281 SED=$lt_cv_path_SED
cannam@167 8282 AC_SUBST([SED])
cannam@167 8283 AC_MSG_RESULT([$SED])
cannam@167 8284 ])#AC_PROG_SED
cannam@167 8285 ])#m4_ifndef
cannam@167 8286
cannam@167 8287 # Old name:
cannam@167 8288 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
cannam@167 8289 dnl aclocal-1.4 backwards compatibility:
cannam@167 8290 dnl AC_DEFUN([LT_AC_PROG_SED], [])
cannam@167 8291
cannam@167 8292
cannam@167 8293 # _LT_CHECK_SHELL_FEATURES
cannam@167 8294 # ------------------------
cannam@167 8295 # Find out whether the shell is Bourne or XSI compatible,
cannam@167 8296 # or has some other useful features.
cannam@167 8297 m4_defun([_LT_CHECK_SHELL_FEATURES],
cannam@167 8298 [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
cannam@167 8299 lt_unset=unset
cannam@167 8300 else
cannam@167 8301 lt_unset=false
cannam@167 8302 fi
cannam@167 8303 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
cannam@167 8304
cannam@167 8305 # test EBCDIC or ASCII
cannam@167 8306 case `echo X|tr X '\101'` in
cannam@167 8307 A) # ASCII based system
cannam@167 8308 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
cannam@167 8309 lt_SP2NL='tr \040 \012'
cannam@167 8310 lt_NL2SP='tr \015\012 \040\040'
cannam@167 8311 ;;
cannam@167 8312 *) # EBCDIC based system
cannam@167 8313 lt_SP2NL='tr \100 \n'
cannam@167 8314 lt_NL2SP='tr \r\n \100\100'
cannam@167 8315 ;;
cannam@167 8316 esac
cannam@167 8317 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
cannam@167 8318 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
cannam@167 8319 ])# _LT_CHECK_SHELL_FEATURES
cannam@167 8320
cannam@167 8321
cannam@167 8322 # _LT_PATH_CONVERSION_FUNCTIONS
cannam@167 8323 # -----------------------------
cannam@167 8324 # Determine what file name conversion functions should be used by
cannam@167 8325 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
cannam@167 8326 # for certain cross-compile configurations and native mingw.
cannam@167 8327 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
cannam@167 8328 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
cannam@167 8329 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
cannam@167 8330 AC_MSG_CHECKING([how to convert $build file names to $host format])
cannam@167 8331 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
cannam@167 8332 [case $host in
cannam@167 8333 *-*-mingw* )
cannam@167 8334 case $build in
cannam@167 8335 *-*-mingw* ) # actually msys
cannam@167 8336 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
cannam@167 8337 ;;
cannam@167 8338 *-*-cygwin* )
cannam@167 8339 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
cannam@167 8340 ;;
cannam@167 8341 * ) # otherwise, assume *nix
cannam@167 8342 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
cannam@167 8343 ;;
cannam@167 8344 esac
cannam@167 8345 ;;
cannam@167 8346 *-*-cygwin* )
cannam@167 8347 case $build in
cannam@167 8348 *-*-mingw* ) # actually msys
cannam@167 8349 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
cannam@167 8350 ;;
cannam@167 8351 *-*-cygwin* )
cannam@167 8352 lt_cv_to_host_file_cmd=func_convert_file_noop
cannam@167 8353 ;;
cannam@167 8354 * ) # otherwise, assume *nix
cannam@167 8355 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
cannam@167 8356 ;;
cannam@167 8357 esac
cannam@167 8358 ;;
cannam@167 8359 * ) # unhandled hosts (and "normal" native builds)
cannam@167 8360 lt_cv_to_host_file_cmd=func_convert_file_noop
cannam@167 8361 ;;
cannam@167 8362 esac
cannam@167 8363 ])
cannam@167 8364 to_host_file_cmd=$lt_cv_to_host_file_cmd
cannam@167 8365 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
cannam@167 8366 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
cannam@167 8367 [0], [convert $build file names to $host format])dnl
cannam@167 8368
cannam@167 8369 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
cannam@167 8370 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
cannam@167 8371 [#assume ordinary cross tools, or native build.
cannam@167 8372 lt_cv_to_tool_file_cmd=func_convert_file_noop
cannam@167 8373 case $host in
cannam@167 8374 *-*-mingw* )
cannam@167 8375 case $build in
cannam@167 8376 *-*-mingw* ) # actually msys
cannam@167 8377 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
cannam@167 8378 ;;
cannam@167 8379 esac
cannam@167 8380 ;;
cannam@167 8381 esac
cannam@167 8382 ])
cannam@167 8383 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
cannam@167 8384 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
cannam@167 8385 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
cannam@167 8386 [0], [convert $build files to toolchain format])dnl
cannam@167 8387 ])# _LT_PATH_CONVERSION_FUNCTIONS