annotate src/libsamplerate-0.1.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 545efbb81310
children
rev   line source
cannam@85 1 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
cannam@85 2 #
cannam@85 3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
cannam@85 4 # 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
cannam@85 5 # Inc.
cannam@85 6 # Written by Gordon Matzigkeit, 1996
cannam@85 7 #
cannam@85 8 # This file is free software; the Free Software Foundation gives
cannam@85 9 # unlimited permission to copy and/or distribute it, with or without
cannam@85 10 # modifications, as long as this notice is preserved.
cannam@85 11
cannam@85 12 m4_define([_LT_COPYING], [dnl
cannam@85 13 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
cannam@85 14 # 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
cannam@85 15 # Inc.
cannam@85 16 # Written by Gordon Matzigkeit, 1996
cannam@85 17 #
cannam@85 18 # This file is part of GNU Libtool.
cannam@85 19 #
cannam@85 20 # GNU Libtool is free software; you can redistribute it and/or
cannam@85 21 # modify it under the terms of the GNU General Public License as
cannam@85 22 # published by the Free Software Foundation; either version 2 of
cannam@85 23 # the License, or (at your option) any later version.
cannam@85 24 #
cannam@85 25 # As a special exception to the GNU General Public License,
cannam@85 26 # if you distribute this file as part of a program or library that
cannam@85 27 # is built using GNU Libtool, you may include this file under the
cannam@85 28 # same distribution terms that you use for the rest of that program.
cannam@85 29 #
cannam@85 30 # GNU Libtool is distributed in the hope that it will be useful,
cannam@85 31 # but WITHOUT ANY WARRANTY; without even the implied warranty of
cannam@85 32 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cannam@85 33 # GNU General Public License for more details.
cannam@85 34 #
cannam@85 35 # You should have received a copy of the GNU General Public License
cannam@85 36 # along with GNU Libtool; see the file COPYING. If not, a copy
cannam@85 37 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
cannam@85 38 # obtained by writing to the Free Software Foundation, Inc.,
cannam@85 39 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
cannam@85 40 ])
cannam@85 41
cannam@85 42 # serial 57 LT_INIT
cannam@85 43
cannam@85 44
cannam@85 45 # LT_PREREQ(VERSION)
cannam@85 46 # ------------------
cannam@85 47 # Complain and exit if this libtool version is less that VERSION.
cannam@85 48 m4_defun([LT_PREREQ],
cannam@85 49 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
cannam@85 50 [m4_default([$3],
cannam@85 51 [m4_fatal([Libtool version $1 or higher is required],
cannam@85 52 63)])],
cannam@85 53 [$2])])
cannam@85 54
cannam@85 55
cannam@85 56 # _LT_CHECK_BUILDDIR
cannam@85 57 # ------------------
cannam@85 58 # Complain if the absolute build directory name contains unusual characters
cannam@85 59 m4_defun([_LT_CHECK_BUILDDIR],
cannam@85 60 [case `pwd` in
cannam@85 61 *\ * | *\ *)
cannam@85 62 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
cannam@85 63 esac
cannam@85 64 ])
cannam@85 65
cannam@85 66
cannam@85 67 # LT_INIT([OPTIONS])
cannam@85 68 # ------------------
cannam@85 69 AC_DEFUN([LT_INIT],
cannam@85 70 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
cannam@85 71 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
cannam@85 72 AC_BEFORE([$0], [LT_LANG])dnl
cannam@85 73 AC_BEFORE([$0], [LT_OUTPUT])dnl
cannam@85 74 AC_BEFORE([$0], [LTDL_INIT])dnl
cannam@85 75 m4_require([_LT_CHECK_BUILDDIR])dnl
cannam@85 76
cannam@85 77 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
cannam@85 78 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
cannam@85 79 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
cannam@85 80 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
cannam@85 81 dnl unless we require an AC_DEFUNed macro:
cannam@85 82 AC_REQUIRE([LTOPTIONS_VERSION])dnl
cannam@85 83 AC_REQUIRE([LTSUGAR_VERSION])dnl
cannam@85 84 AC_REQUIRE([LTVERSION_VERSION])dnl
cannam@85 85 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
cannam@85 86 m4_require([_LT_PROG_LTMAIN])dnl
cannam@85 87
cannam@85 88 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
cannam@85 89
cannam@85 90 dnl Parse OPTIONS
cannam@85 91 _LT_SET_OPTIONS([$0], [$1])
cannam@85 92
cannam@85 93 # This can be used to rebuild libtool when needed
cannam@85 94 LIBTOOL_DEPS="$ltmain"
cannam@85 95
cannam@85 96 # Always use our own libtool.
cannam@85 97 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
cannam@85 98 AC_SUBST(LIBTOOL)dnl
cannam@85 99
cannam@85 100 _LT_SETUP
cannam@85 101
cannam@85 102 # Only expand once:
cannam@85 103 m4_define([LT_INIT])
cannam@85 104 ])# LT_INIT
cannam@85 105
cannam@85 106 # Old names:
cannam@85 107 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
cannam@85 108 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
cannam@85 109 dnl aclocal-1.4 backwards compatibility:
cannam@85 110 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
cannam@85 111 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
cannam@85 112
cannam@85 113
cannam@85 114 # _LT_CC_BASENAME(CC)
cannam@85 115 # -------------------
cannam@85 116 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
cannam@85 117 m4_defun([_LT_CC_BASENAME],
cannam@85 118 [for cc_temp in $1""; do
cannam@85 119 case $cc_temp in
cannam@85 120 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
cannam@85 121 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
cannam@85 122 \-*) ;;
cannam@85 123 *) break;;
cannam@85 124 esac
cannam@85 125 done
cannam@85 126 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
cannam@85 127 ])
cannam@85 128
cannam@85 129
cannam@85 130 # _LT_FILEUTILS_DEFAULTS
cannam@85 131 # ----------------------
cannam@85 132 # It is okay to use these file commands and assume they have been set
cannam@85 133 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
cannam@85 134 m4_defun([_LT_FILEUTILS_DEFAULTS],
cannam@85 135 [: ${CP="cp -f"}
cannam@85 136 : ${MV="mv -f"}
cannam@85 137 : ${RM="rm -f"}
cannam@85 138 ])# _LT_FILEUTILS_DEFAULTS
cannam@85 139
cannam@85 140
cannam@85 141 # _LT_SETUP
cannam@85 142 # ---------
cannam@85 143 m4_defun([_LT_SETUP],
cannam@85 144 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
cannam@85 145 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
cannam@85 146 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
cannam@85 147 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
cannam@85 148
cannam@85 149 _LT_DECL([], [host_alias], [0], [The host system])dnl
cannam@85 150 _LT_DECL([], [host], [0])dnl
cannam@85 151 _LT_DECL([], [host_os], [0])dnl
cannam@85 152 dnl
cannam@85 153 _LT_DECL([], [build_alias], [0], [The build system])dnl
cannam@85 154 _LT_DECL([], [build], [0])dnl
cannam@85 155 _LT_DECL([], [build_os], [0])dnl
cannam@85 156 dnl
cannam@85 157 AC_REQUIRE([AC_PROG_CC])dnl
cannam@85 158 AC_REQUIRE([LT_PATH_LD])dnl
cannam@85 159 AC_REQUIRE([LT_PATH_NM])dnl
cannam@85 160 dnl
cannam@85 161 AC_REQUIRE([AC_PROG_LN_S])dnl
cannam@85 162 test -z "$LN_S" && LN_S="ln -s"
cannam@85 163 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
cannam@85 164 dnl
cannam@85 165 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
cannam@85 166 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
cannam@85 167 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
cannam@85 168 dnl
cannam@85 169 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@85 170 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
cannam@85 171 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
cannam@85 172 m4_require([_LT_CMD_RELOAD])dnl
cannam@85 173 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
cannam@85 174 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
cannam@85 175 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
cannam@85 176 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
cannam@85 177 m4_require([_LT_WITH_SYSROOT])dnl
cannam@85 178
cannam@85 179 _LT_CONFIG_LIBTOOL_INIT([
cannam@85 180 # See if we are running on zsh, and set the options which allow our
cannam@85 181 # commands through without removal of \ escapes INIT.
cannam@85 182 if test -n "\${ZSH_VERSION+set}" ; then
cannam@85 183 setopt NO_GLOB_SUBST
cannam@85 184 fi
cannam@85 185 ])
cannam@85 186 if test -n "${ZSH_VERSION+set}" ; then
cannam@85 187 setopt NO_GLOB_SUBST
cannam@85 188 fi
cannam@85 189
cannam@85 190 _LT_CHECK_OBJDIR
cannam@85 191
cannam@85 192 m4_require([_LT_TAG_COMPILER])dnl
cannam@85 193
cannam@85 194 case $host_os in
cannam@85 195 aix3*)
cannam@85 196 # AIX sometimes has problems with the GCC collect2 program. For some
cannam@85 197 # reason, if we set the COLLECT_NAMES environment variable, the problems
cannam@85 198 # vanish in a puff of smoke.
cannam@85 199 if test "X${COLLECT_NAMES+set}" != Xset; then
cannam@85 200 COLLECT_NAMES=
cannam@85 201 export COLLECT_NAMES
cannam@85 202 fi
cannam@85 203 ;;
cannam@85 204 esac
cannam@85 205
cannam@85 206 # Global variables:
cannam@85 207 ofile=libtool
cannam@85 208 can_build_shared=yes
cannam@85 209
cannam@85 210 # All known linkers require a `.a' archive for static linking (except MSVC,
cannam@85 211 # which needs '.lib').
cannam@85 212 libext=a
cannam@85 213
cannam@85 214 with_gnu_ld="$lt_cv_prog_gnu_ld"
cannam@85 215
cannam@85 216 old_CC="$CC"
cannam@85 217 old_CFLAGS="$CFLAGS"
cannam@85 218
cannam@85 219 # Set sane defaults for various variables
cannam@85 220 test -z "$CC" && CC=cc
cannam@85 221 test -z "$LTCC" && LTCC=$CC
cannam@85 222 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
cannam@85 223 test -z "$LD" && LD=ld
cannam@85 224 test -z "$ac_objext" && ac_objext=o
cannam@85 225
cannam@85 226 _LT_CC_BASENAME([$compiler])
cannam@85 227
cannam@85 228 # Only perform the check for file, if the check method requires it
cannam@85 229 test -z "$MAGIC_CMD" && MAGIC_CMD=file
cannam@85 230 case $deplibs_check_method in
cannam@85 231 file_magic*)
cannam@85 232 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
cannam@85 233 _LT_PATH_MAGIC
cannam@85 234 fi
cannam@85 235 ;;
cannam@85 236 esac
cannam@85 237
cannam@85 238 # Use C for the default configuration in the libtool script
cannam@85 239 LT_SUPPORTED_TAG([CC])
cannam@85 240 _LT_LANG_C_CONFIG
cannam@85 241 _LT_LANG_DEFAULT_CONFIG
cannam@85 242 _LT_CONFIG_COMMANDS
cannam@85 243 ])# _LT_SETUP
cannam@85 244
cannam@85 245
cannam@85 246 # _LT_PREPARE_SED_QUOTE_VARS
cannam@85 247 # --------------------------
cannam@85 248 # Define a few sed substitution that help us do robust quoting.
cannam@85 249 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
cannam@85 250 [# Backslashify metacharacters that are still active within
cannam@85 251 # double-quoted strings.
cannam@85 252 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
cannam@85 253
cannam@85 254 # Same as above, but do not quote variable references.
cannam@85 255 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
cannam@85 256
cannam@85 257 # Sed substitution to delay expansion of an escaped shell variable in a
cannam@85 258 # double_quote_subst'ed string.
cannam@85 259 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
cannam@85 260
cannam@85 261 # Sed substitution to delay expansion of an escaped single quote.
cannam@85 262 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
cannam@85 263
cannam@85 264 # Sed substitution to avoid accidental globbing in evaled expressions
cannam@85 265 no_glob_subst='s/\*/\\\*/g'
cannam@85 266 ])
cannam@85 267
cannam@85 268 # _LT_PROG_LTMAIN
cannam@85 269 # ---------------
cannam@85 270 # Note that this code is called both from `configure', and `config.status'
cannam@85 271 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
cannam@85 272 # `config.status' has no value for ac_aux_dir unless we are using Automake,
cannam@85 273 # so we pass a copy along to make sure it has a sensible value anyway.
cannam@85 274 m4_defun([_LT_PROG_LTMAIN],
cannam@85 275 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
cannam@85 276 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
cannam@85 277 ltmain="$ac_aux_dir/ltmain.sh"
cannam@85 278 ])# _LT_PROG_LTMAIN
cannam@85 279
cannam@85 280
cannam@85 281 ## ------------------------------------- ##
cannam@85 282 ## Accumulate code for creating libtool. ##
cannam@85 283 ## ------------------------------------- ##
cannam@85 284
cannam@85 285 # So that we can recreate a full libtool script including additional
cannam@85 286 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
cannam@85 287 # in macros and then make a single call at the end using the `libtool'
cannam@85 288 # label.
cannam@85 289
cannam@85 290
cannam@85 291 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
cannam@85 292 # ----------------------------------------
cannam@85 293 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
cannam@85 294 m4_define([_LT_CONFIG_LIBTOOL_INIT],
cannam@85 295 [m4_ifval([$1],
cannam@85 296 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
cannam@85 297 [$1
cannam@85 298 ])])])
cannam@85 299
cannam@85 300 # Initialize.
cannam@85 301 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
cannam@85 302
cannam@85 303
cannam@85 304 # _LT_CONFIG_LIBTOOL([COMMANDS])
cannam@85 305 # ------------------------------
cannam@85 306 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
cannam@85 307 m4_define([_LT_CONFIG_LIBTOOL],
cannam@85 308 [m4_ifval([$1],
cannam@85 309 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
cannam@85 310 [$1
cannam@85 311 ])])])
cannam@85 312
cannam@85 313 # Initialize.
cannam@85 314 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
cannam@85 315
cannam@85 316
cannam@85 317 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
cannam@85 318 # -----------------------------------------------------
cannam@85 319 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
cannam@85 320 [_LT_CONFIG_LIBTOOL([$1])
cannam@85 321 _LT_CONFIG_LIBTOOL_INIT([$2])
cannam@85 322 ])
cannam@85 323
cannam@85 324
cannam@85 325 # _LT_FORMAT_COMMENT([COMMENT])
cannam@85 326 # -----------------------------
cannam@85 327 # Add leading comment marks to the start of each line, and a trailing
cannam@85 328 # full-stop to the whole comment if one is not present already.
cannam@85 329 m4_define([_LT_FORMAT_COMMENT],
cannam@85 330 [m4_ifval([$1], [
cannam@85 331 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
cannam@85 332 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
cannam@85 333 )])
cannam@85 334
cannam@85 335
cannam@85 336
cannam@85 337 ## ------------------------ ##
cannam@85 338 ## FIXME: Eliminate VARNAME ##
cannam@85 339 ## ------------------------ ##
cannam@85 340
cannam@85 341
cannam@85 342 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
cannam@85 343 # -------------------------------------------------------------------
cannam@85 344 # CONFIGNAME is the name given to the value in the libtool script.
cannam@85 345 # VARNAME is the (base) name used in the configure script.
cannam@85 346 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
cannam@85 347 # VARNAME. Any other value will be used directly.
cannam@85 348 m4_define([_LT_DECL],
cannam@85 349 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
cannam@85 350 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
cannam@85 351 [m4_ifval([$1], [$1], [$2])])
cannam@85 352 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
cannam@85 353 m4_ifval([$4],
cannam@85 354 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
cannam@85 355 lt_dict_add_subkey([lt_decl_dict], [$2],
cannam@85 356 [tagged?], [m4_ifval([$5], [yes], [no])])])
cannam@85 357 ])
cannam@85 358
cannam@85 359
cannam@85 360 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
cannam@85 361 # --------------------------------------------------------
cannam@85 362 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
cannam@85 363
cannam@85 364
cannam@85 365 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
cannam@85 366 # ------------------------------------------------
cannam@85 367 m4_define([lt_decl_tag_varnames],
cannam@85 368 [_lt_decl_filter([tagged?], [yes], $@)])
cannam@85 369
cannam@85 370
cannam@85 371 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
cannam@85 372 # ---------------------------------------------------------
cannam@85 373 m4_define([_lt_decl_filter],
cannam@85 374 [m4_case([$#],
cannam@85 375 [0], [m4_fatal([$0: too few arguments: $#])],
cannam@85 376 [1], [m4_fatal([$0: too few arguments: $#: $1])],
cannam@85 377 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
cannam@85 378 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
cannam@85 379 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
cannam@85 380 ])
cannam@85 381
cannam@85 382
cannam@85 383 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
cannam@85 384 # --------------------------------------------------
cannam@85 385 m4_define([lt_decl_quote_varnames],
cannam@85 386 [_lt_decl_filter([value], [1], $@)])
cannam@85 387
cannam@85 388
cannam@85 389 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
cannam@85 390 # ---------------------------------------------------
cannam@85 391 m4_define([lt_decl_dquote_varnames],
cannam@85 392 [_lt_decl_filter([value], [2], $@)])
cannam@85 393
cannam@85 394
cannam@85 395 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
cannam@85 396 # ---------------------------------------------------
cannam@85 397 m4_define([lt_decl_varnames_tagged],
cannam@85 398 [m4_assert([$# <= 2])dnl
cannam@85 399 _$0(m4_quote(m4_default([$1], [[, ]])),
cannam@85 400 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
cannam@85 401 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
cannam@85 402 m4_define([_lt_decl_varnames_tagged],
cannam@85 403 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
cannam@85 404
cannam@85 405
cannam@85 406 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
cannam@85 407 # ------------------------------------------------
cannam@85 408 m4_define([lt_decl_all_varnames],
cannam@85 409 [_$0(m4_quote(m4_default([$1], [[, ]])),
cannam@85 410 m4_if([$2], [],
cannam@85 411 m4_quote(lt_decl_varnames),
cannam@85 412 m4_quote(m4_shift($@))))[]dnl
cannam@85 413 ])
cannam@85 414 m4_define([_lt_decl_all_varnames],
cannam@85 415 [lt_join($@, lt_decl_varnames_tagged([$1],
cannam@85 416 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
cannam@85 417 ])
cannam@85 418
cannam@85 419
cannam@85 420 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
cannam@85 421 # ------------------------------------
cannam@85 422 # Quote a variable value, and forward it to `config.status' so that its
cannam@85 423 # declaration there will have the same value as in `configure'. VARNAME
cannam@85 424 # must have a single quote delimited value for this to work.
cannam@85 425 m4_define([_LT_CONFIG_STATUS_DECLARE],
cannam@85 426 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
cannam@85 427
cannam@85 428
cannam@85 429 # _LT_CONFIG_STATUS_DECLARATIONS
cannam@85 430 # ------------------------------
cannam@85 431 # We delimit libtool config variables with single quotes, so when
cannam@85 432 # we write them to config.status, we have to be sure to quote all
cannam@85 433 # embedded single quotes properly. In configure, this macro expands
cannam@85 434 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
cannam@85 435 #
cannam@85 436 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
cannam@85 437 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
cannam@85 438 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
cannam@85 439 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
cannam@85 440
cannam@85 441
cannam@85 442 # _LT_LIBTOOL_TAGS
cannam@85 443 # ----------------
cannam@85 444 # Output comment and list of tags supported by the script
cannam@85 445 m4_defun([_LT_LIBTOOL_TAGS],
cannam@85 446 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
cannam@85 447 available_tags="_LT_TAGS"dnl
cannam@85 448 ])
cannam@85 449
cannam@85 450
cannam@85 451 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
cannam@85 452 # -----------------------------------
cannam@85 453 # Extract the dictionary values for VARNAME (optionally with TAG) and
cannam@85 454 # expand to a commented shell variable setting:
cannam@85 455 #
cannam@85 456 # # Some comment about what VAR is for.
cannam@85 457 # visible_name=$lt_internal_name
cannam@85 458 m4_define([_LT_LIBTOOL_DECLARE],
cannam@85 459 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
cannam@85 460 [description])))[]dnl
cannam@85 461 m4_pushdef([_libtool_name],
cannam@85 462 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
cannam@85 463 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
cannam@85 464 [0], [_libtool_name=[$]$1],
cannam@85 465 [1], [_libtool_name=$lt_[]$1],
cannam@85 466 [2], [_libtool_name=$lt_[]$1],
cannam@85 467 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
cannam@85 468 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
cannam@85 469 ])
cannam@85 470
cannam@85 471
cannam@85 472 # _LT_LIBTOOL_CONFIG_VARS
cannam@85 473 # -----------------------
cannam@85 474 # Produce commented declarations of non-tagged libtool config variables
cannam@85 475 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
cannam@85 476 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
cannam@85 477 # section) are produced by _LT_LIBTOOL_TAG_VARS.
cannam@85 478 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
cannam@85 479 [m4_foreach([_lt_var],
cannam@85 480 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
cannam@85 481 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
cannam@85 482
cannam@85 483
cannam@85 484 # _LT_LIBTOOL_TAG_VARS(TAG)
cannam@85 485 # -------------------------
cannam@85 486 m4_define([_LT_LIBTOOL_TAG_VARS],
cannam@85 487 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
cannam@85 488 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
cannam@85 489
cannam@85 490
cannam@85 491 # _LT_TAGVAR(VARNAME, [TAGNAME])
cannam@85 492 # ------------------------------
cannam@85 493 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
cannam@85 494
cannam@85 495
cannam@85 496 # _LT_CONFIG_COMMANDS
cannam@85 497 # -------------------
cannam@85 498 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
cannam@85 499 # variables for single and double quote escaping we saved from calls
cannam@85 500 # to _LT_DECL, we can put quote escaped variables declarations
cannam@85 501 # into `config.status', and then the shell code to quote escape them in
cannam@85 502 # for loops in `config.status'. Finally, any additional code accumulated
cannam@85 503 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
cannam@85 504 m4_defun([_LT_CONFIG_COMMANDS],
cannam@85 505 [AC_PROVIDE_IFELSE([LT_OUTPUT],
cannam@85 506 dnl If the libtool generation code has been placed in $CONFIG_LT,
cannam@85 507 dnl instead of duplicating it all over again into config.status,
cannam@85 508 dnl then we will have config.status run $CONFIG_LT later, so it
cannam@85 509 dnl needs to know what name is stored there:
cannam@85 510 [AC_CONFIG_COMMANDS([libtool],
cannam@85 511 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
cannam@85 512 dnl If the libtool generation code is destined for config.status,
cannam@85 513 dnl expand the accumulated commands and init code now:
cannam@85 514 [AC_CONFIG_COMMANDS([libtool],
cannam@85 515 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
cannam@85 516 ])#_LT_CONFIG_COMMANDS
cannam@85 517
cannam@85 518
cannam@85 519 # Initialize.
cannam@85 520 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
cannam@85 521 [
cannam@85 522
cannam@85 523 # The HP-UX ksh and POSIX shell print the target directory to stdout
cannam@85 524 # if CDPATH is set.
cannam@85 525 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
cannam@85 526
cannam@85 527 sed_quote_subst='$sed_quote_subst'
cannam@85 528 double_quote_subst='$double_quote_subst'
cannam@85 529 delay_variable_subst='$delay_variable_subst'
cannam@85 530 _LT_CONFIG_STATUS_DECLARATIONS
cannam@85 531 LTCC='$LTCC'
cannam@85 532 LTCFLAGS='$LTCFLAGS'
cannam@85 533 compiler='$compiler_DEFAULT'
cannam@85 534
cannam@85 535 # A function that is used when there is no print builtin or printf.
cannam@85 536 func_fallback_echo ()
cannam@85 537 {
cannam@85 538 eval 'cat <<_LTECHO_EOF
cannam@85 539 \$[]1
cannam@85 540 _LTECHO_EOF'
cannam@85 541 }
cannam@85 542
cannam@85 543 # Quote evaled strings.
cannam@85 544 for var in lt_decl_all_varnames([[ \
cannam@85 545 ]], lt_decl_quote_varnames); do
cannam@85 546 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
cannam@85 547 *[[\\\\\\\`\\"\\\$]]*)
cannam@85 548 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
cannam@85 549 ;;
cannam@85 550 *)
cannam@85 551 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
cannam@85 552 ;;
cannam@85 553 esac
cannam@85 554 done
cannam@85 555
cannam@85 556 # Double-quote double-evaled strings.
cannam@85 557 for var in lt_decl_all_varnames([[ \
cannam@85 558 ]], lt_decl_dquote_varnames); do
cannam@85 559 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
cannam@85 560 *[[\\\\\\\`\\"\\\$]]*)
cannam@85 561 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
cannam@85 562 ;;
cannam@85 563 *)
cannam@85 564 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
cannam@85 565 ;;
cannam@85 566 esac
cannam@85 567 done
cannam@85 568
cannam@85 569 _LT_OUTPUT_LIBTOOL_INIT
cannam@85 570 ])
cannam@85 571
cannam@85 572 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
cannam@85 573 # ------------------------------------
cannam@85 574 # Generate a child script FILE with all initialization necessary to
cannam@85 575 # reuse the environment learned by the parent script, and make the
cannam@85 576 # file executable. If COMMENT is supplied, it is inserted after the
cannam@85 577 # `#!' sequence but before initialization text begins. After this
cannam@85 578 # macro, additional text can be appended to FILE to form the body of
cannam@85 579 # the child script. The macro ends with non-zero status if the
cannam@85 580 # file could not be fully written (such as if the disk is full).
cannam@85 581 m4_ifdef([AS_INIT_GENERATED],
cannam@85 582 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
cannam@85 583 [m4_defun([_LT_GENERATED_FILE_INIT],
cannam@85 584 [m4_require([AS_PREPARE])]dnl
cannam@85 585 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
cannam@85 586 [lt_write_fail=0
cannam@85 587 cat >$1 <<_ASEOF || lt_write_fail=1
cannam@85 588 #! $SHELL
cannam@85 589 # Generated by $as_me.
cannam@85 590 $2
cannam@85 591 SHELL=\${CONFIG_SHELL-$SHELL}
cannam@85 592 export SHELL
cannam@85 593 _ASEOF
cannam@85 594 cat >>$1 <<\_ASEOF || lt_write_fail=1
cannam@85 595 AS_SHELL_SANITIZE
cannam@85 596 _AS_PREPARE
cannam@85 597 exec AS_MESSAGE_FD>&1
cannam@85 598 _ASEOF
cannam@85 599 test $lt_write_fail = 0 && chmod +x $1[]dnl
cannam@85 600 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
cannam@85 601
cannam@85 602 # LT_OUTPUT
cannam@85 603 # ---------
cannam@85 604 # This macro allows early generation of the libtool script (before
cannam@85 605 # AC_OUTPUT is called), incase it is used in configure for compilation
cannam@85 606 # tests.
cannam@85 607 AC_DEFUN([LT_OUTPUT],
cannam@85 608 [: ${CONFIG_LT=./config.lt}
cannam@85 609 AC_MSG_NOTICE([creating $CONFIG_LT])
cannam@85 610 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
cannam@85 611 [# Run this file to recreate a libtool stub with the current configuration.])
cannam@85 612
cannam@85 613 cat >>"$CONFIG_LT" <<\_LTEOF
cannam@85 614 lt_cl_silent=false
cannam@85 615 exec AS_MESSAGE_LOG_FD>>config.log
cannam@85 616 {
cannam@85 617 echo
cannam@85 618 AS_BOX([Running $as_me.])
cannam@85 619 } >&AS_MESSAGE_LOG_FD
cannam@85 620
cannam@85 621 lt_cl_help="\
cannam@85 622 \`$as_me' creates a local libtool stub from the current configuration,
cannam@85 623 for use in further configure time tests before the real libtool is
cannam@85 624 generated.
cannam@85 625
cannam@85 626 Usage: $[0] [[OPTIONS]]
cannam@85 627
cannam@85 628 -h, --help print this help, then exit
cannam@85 629 -V, --version print version number, then exit
cannam@85 630 -q, --quiet do not print progress messages
cannam@85 631 -d, --debug don't remove temporary files
cannam@85 632
cannam@85 633 Report bugs to <bug-libtool@gnu.org>."
cannam@85 634
cannam@85 635 lt_cl_version="\
cannam@85 636 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
cannam@85 637 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
cannam@85 638 configured by $[0], generated by m4_PACKAGE_STRING.
cannam@85 639
cannam@85 640 Copyright (C) 2010 Free Software Foundation, Inc.
cannam@85 641 This config.lt script is free software; the Free Software Foundation
cannam@85 642 gives unlimited permision to copy, distribute and modify it."
cannam@85 643
cannam@85 644 while test $[#] != 0
cannam@85 645 do
cannam@85 646 case $[1] in
cannam@85 647 --version | --v* | -V )
cannam@85 648 echo "$lt_cl_version"; exit 0 ;;
cannam@85 649 --help | --h* | -h )
cannam@85 650 echo "$lt_cl_help"; exit 0 ;;
cannam@85 651 --debug | --d* | -d )
cannam@85 652 debug=: ;;
cannam@85 653 --quiet | --q* | --silent | --s* | -q )
cannam@85 654 lt_cl_silent=: ;;
cannam@85 655
cannam@85 656 -*) AC_MSG_ERROR([unrecognized option: $[1]
cannam@85 657 Try \`$[0] --help' for more information.]) ;;
cannam@85 658
cannam@85 659 *) AC_MSG_ERROR([unrecognized argument: $[1]
cannam@85 660 Try \`$[0] --help' for more information.]) ;;
cannam@85 661 esac
cannam@85 662 shift
cannam@85 663 done
cannam@85 664
cannam@85 665 if $lt_cl_silent; then
cannam@85 666 exec AS_MESSAGE_FD>/dev/null
cannam@85 667 fi
cannam@85 668 _LTEOF
cannam@85 669
cannam@85 670 cat >>"$CONFIG_LT" <<_LTEOF
cannam@85 671 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
cannam@85 672 _LTEOF
cannam@85 673
cannam@85 674 cat >>"$CONFIG_LT" <<\_LTEOF
cannam@85 675 AC_MSG_NOTICE([creating $ofile])
cannam@85 676 _LT_OUTPUT_LIBTOOL_COMMANDS
cannam@85 677 AS_EXIT(0)
cannam@85 678 _LTEOF
cannam@85 679 chmod +x "$CONFIG_LT"
cannam@85 680
cannam@85 681 # configure is writing to config.log, but config.lt does its own redirection,
cannam@85 682 # appending to config.log, which fails on DOS, as config.log is still kept
cannam@85 683 # open by configure. Here we exec the FD to /dev/null, effectively closing
cannam@85 684 # config.log, so it can be properly (re)opened and appended to by config.lt.
cannam@85 685 lt_cl_success=:
cannam@85 686 test "$silent" = yes &&
cannam@85 687 lt_config_lt_args="$lt_config_lt_args --quiet"
cannam@85 688 exec AS_MESSAGE_LOG_FD>/dev/null
cannam@85 689 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
cannam@85 690 exec AS_MESSAGE_LOG_FD>>config.log
cannam@85 691 $lt_cl_success || AS_EXIT(1)
cannam@85 692 ])# LT_OUTPUT
cannam@85 693
cannam@85 694
cannam@85 695 # _LT_CONFIG(TAG)
cannam@85 696 # ---------------
cannam@85 697 # If TAG is the built-in tag, create an initial libtool script with a
cannam@85 698 # default configuration from the untagged config vars. Otherwise add code
cannam@85 699 # to config.status for appending the configuration named by TAG from the
cannam@85 700 # matching tagged config vars.
cannam@85 701 m4_defun([_LT_CONFIG],
cannam@85 702 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@85 703 _LT_CONFIG_SAVE_COMMANDS([
cannam@85 704 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
cannam@85 705 m4_if(_LT_TAG, [C], [
cannam@85 706 # See if we are running on zsh, and set the options which allow our
cannam@85 707 # commands through without removal of \ escapes.
cannam@85 708 if test -n "${ZSH_VERSION+set}" ; then
cannam@85 709 setopt NO_GLOB_SUBST
cannam@85 710 fi
cannam@85 711
cannam@85 712 cfgfile="${ofile}T"
cannam@85 713 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
cannam@85 714 $RM "$cfgfile"
cannam@85 715
cannam@85 716 cat <<_LT_EOF >> "$cfgfile"
cannam@85 717 #! $SHELL
cannam@85 718
cannam@85 719 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
cannam@85 720 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
cannam@85 721 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
cannam@85 722 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
cannam@85 723 #
cannam@85 724 _LT_COPYING
cannam@85 725 _LT_LIBTOOL_TAGS
cannam@85 726
cannam@85 727 # ### BEGIN LIBTOOL CONFIG
cannam@85 728 _LT_LIBTOOL_CONFIG_VARS
cannam@85 729 _LT_LIBTOOL_TAG_VARS
cannam@85 730 # ### END LIBTOOL CONFIG
cannam@85 731
cannam@85 732 _LT_EOF
cannam@85 733
cannam@85 734 case $host_os in
cannam@85 735 aix3*)
cannam@85 736 cat <<\_LT_EOF >> "$cfgfile"
cannam@85 737 # AIX sometimes has problems with the GCC collect2 program. For some
cannam@85 738 # reason, if we set the COLLECT_NAMES environment variable, the problems
cannam@85 739 # vanish in a puff of smoke.
cannam@85 740 if test "X${COLLECT_NAMES+set}" != Xset; then
cannam@85 741 COLLECT_NAMES=
cannam@85 742 export COLLECT_NAMES
cannam@85 743 fi
cannam@85 744 _LT_EOF
cannam@85 745 ;;
cannam@85 746 esac
cannam@85 747
cannam@85 748 _LT_PROG_LTMAIN
cannam@85 749
cannam@85 750 # We use sed instead of cat because bash on DJGPP gets confused if
cannam@85 751 # if finds mixed CR/LF and LF-only lines. Since sed operates in
cannam@85 752 # text mode, it properly converts lines to CR/LF. This bash problem
cannam@85 753 # is reportedly fixed, but why not run on old versions too?
cannam@85 754 sed '$q' "$ltmain" >> "$cfgfile" \
cannam@85 755 || (rm -f "$cfgfile"; exit 1)
cannam@85 756
cannam@85 757 _LT_PROG_REPLACE_SHELLFNS
cannam@85 758
cannam@85 759 mv -f "$cfgfile" "$ofile" ||
cannam@85 760 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
cannam@85 761 chmod +x "$ofile"
cannam@85 762 ],
cannam@85 763 [cat <<_LT_EOF >> "$ofile"
cannam@85 764
cannam@85 765 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
cannam@85 766 dnl in a comment (ie after a #).
cannam@85 767 # ### BEGIN LIBTOOL TAG CONFIG: $1
cannam@85 768 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
cannam@85 769 # ### END LIBTOOL TAG CONFIG: $1
cannam@85 770 _LT_EOF
cannam@85 771 ])dnl /m4_if
cannam@85 772 ],
cannam@85 773 [m4_if([$1], [], [
cannam@85 774 PACKAGE='$PACKAGE'
cannam@85 775 VERSION='$VERSION'
cannam@85 776 TIMESTAMP='$TIMESTAMP'
cannam@85 777 RM='$RM'
cannam@85 778 ofile='$ofile'], [])
cannam@85 779 ])dnl /_LT_CONFIG_SAVE_COMMANDS
cannam@85 780 ])# _LT_CONFIG
cannam@85 781
cannam@85 782
cannam@85 783 # LT_SUPPORTED_TAG(TAG)
cannam@85 784 # ---------------------
cannam@85 785 # Trace this macro to discover what tags are supported by the libtool
cannam@85 786 # --tag option, using:
cannam@85 787 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
cannam@85 788 AC_DEFUN([LT_SUPPORTED_TAG], [])
cannam@85 789
cannam@85 790
cannam@85 791 # C support is built-in for now
cannam@85 792 m4_define([_LT_LANG_C_enabled], [])
cannam@85 793 m4_define([_LT_TAGS], [])
cannam@85 794
cannam@85 795
cannam@85 796 # LT_LANG(LANG)
cannam@85 797 # -------------
cannam@85 798 # Enable libtool support for the given language if not already enabled.
cannam@85 799 AC_DEFUN([LT_LANG],
cannam@85 800 [AC_BEFORE([$0], [LT_OUTPUT])dnl
cannam@85 801 m4_case([$1],
cannam@85 802 [C], [_LT_LANG(C)],
cannam@85 803 [C++], [_LT_LANG(CXX)],
cannam@85 804 [Java], [_LT_LANG(GCJ)],
cannam@85 805 [Fortran 77], [_LT_LANG(F77)],
cannam@85 806 [Fortran], [_LT_LANG(FC)],
cannam@85 807 [Windows Resource], [_LT_LANG(RC)],
cannam@85 808 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
cannam@85 809 [_LT_LANG($1)],
cannam@85 810 [m4_fatal([$0: unsupported language: "$1"])])])dnl
cannam@85 811 ])# LT_LANG
cannam@85 812
cannam@85 813
cannam@85 814 # _LT_LANG(LANGNAME)
cannam@85 815 # ------------------
cannam@85 816 m4_defun([_LT_LANG],
cannam@85 817 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
cannam@85 818 [LT_SUPPORTED_TAG([$1])dnl
cannam@85 819 m4_append([_LT_TAGS], [$1 ])dnl
cannam@85 820 m4_define([_LT_LANG_]$1[_enabled], [])dnl
cannam@85 821 _LT_LANG_$1_CONFIG($1)])dnl
cannam@85 822 ])# _LT_LANG
cannam@85 823
cannam@85 824
cannam@85 825 # _LT_LANG_DEFAULT_CONFIG
cannam@85 826 # -----------------------
cannam@85 827 m4_defun([_LT_LANG_DEFAULT_CONFIG],
cannam@85 828 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
cannam@85 829 [LT_LANG(CXX)],
cannam@85 830 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
cannam@85 831
cannam@85 832 AC_PROVIDE_IFELSE([AC_PROG_F77],
cannam@85 833 [LT_LANG(F77)],
cannam@85 834 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
cannam@85 835
cannam@85 836 AC_PROVIDE_IFELSE([AC_PROG_FC],
cannam@85 837 [LT_LANG(FC)],
cannam@85 838 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
cannam@85 839
cannam@85 840 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
cannam@85 841 dnl pulling things in needlessly.
cannam@85 842 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
cannam@85 843 [LT_LANG(GCJ)],
cannam@85 844 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
cannam@85 845 [LT_LANG(GCJ)],
cannam@85 846 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
cannam@85 847 [LT_LANG(GCJ)],
cannam@85 848 [m4_ifdef([AC_PROG_GCJ],
cannam@85 849 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
cannam@85 850 m4_ifdef([A][M_PROG_GCJ],
cannam@85 851 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
cannam@85 852 m4_ifdef([LT_PROG_GCJ],
cannam@85 853 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
cannam@85 854
cannam@85 855 AC_PROVIDE_IFELSE([LT_PROG_RC],
cannam@85 856 [LT_LANG(RC)],
cannam@85 857 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
cannam@85 858 ])# _LT_LANG_DEFAULT_CONFIG
cannam@85 859
cannam@85 860 # Obsolete macros:
cannam@85 861 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
cannam@85 862 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
cannam@85 863 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
cannam@85 864 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
cannam@85 865 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
cannam@85 866 dnl aclocal-1.4 backwards compatibility:
cannam@85 867 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
cannam@85 868 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
cannam@85 869 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
cannam@85 870 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
cannam@85 871 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
cannam@85 872
cannam@85 873
cannam@85 874 # _LT_TAG_COMPILER
cannam@85 875 # ----------------
cannam@85 876 m4_defun([_LT_TAG_COMPILER],
cannam@85 877 [AC_REQUIRE([AC_PROG_CC])dnl
cannam@85 878
cannam@85 879 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
cannam@85 880 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
cannam@85 881 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
cannam@85 882 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
cannam@85 883
cannam@85 884 # If no C compiler was specified, use CC.
cannam@85 885 LTCC=${LTCC-"$CC"}
cannam@85 886
cannam@85 887 # If no C compiler flags were specified, use CFLAGS.
cannam@85 888 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
cannam@85 889
cannam@85 890 # Allow CC to be a program name with arguments.
cannam@85 891 compiler=$CC
cannam@85 892 ])# _LT_TAG_COMPILER
cannam@85 893
cannam@85 894
cannam@85 895 # _LT_COMPILER_BOILERPLATE
cannam@85 896 # ------------------------
cannam@85 897 # Check for compiler boilerplate output or warnings with
cannam@85 898 # the simple compiler test code.
cannam@85 899 m4_defun([_LT_COMPILER_BOILERPLATE],
cannam@85 900 [m4_require([_LT_DECL_SED])dnl
cannam@85 901 ac_outfile=conftest.$ac_objext
cannam@85 902 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
cannam@85 903 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
cannam@85 904 _lt_compiler_boilerplate=`cat conftest.err`
cannam@85 905 $RM conftest*
cannam@85 906 ])# _LT_COMPILER_BOILERPLATE
cannam@85 907
cannam@85 908
cannam@85 909 # _LT_LINKER_BOILERPLATE
cannam@85 910 # ----------------------
cannam@85 911 # Check for linker boilerplate output or warnings with
cannam@85 912 # the simple link test code.
cannam@85 913 m4_defun([_LT_LINKER_BOILERPLATE],
cannam@85 914 [m4_require([_LT_DECL_SED])dnl
cannam@85 915 ac_outfile=conftest.$ac_objext
cannam@85 916 echo "$lt_simple_link_test_code" >conftest.$ac_ext
cannam@85 917 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
cannam@85 918 _lt_linker_boilerplate=`cat conftest.err`
cannam@85 919 $RM -r conftest*
cannam@85 920 ])# _LT_LINKER_BOILERPLATE
cannam@85 921
cannam@85 922 # _LT_REQUIRED_DARWIN_CHECKS
cannam@85 923 # -------------------------
cannam@85 924 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
cannam@85 925 case $host_os in
cannam@85 926 rhapsody* | darwin*)
cannam@85 927 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
cannam@85 928 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
cannam@85 929 AC_CHECK_TOOL([LIPO], [lipo], [:])
cannam@85 930 AC_CHECK_TOOL([OTOOL], [otool], [:])
cannam@85 931 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
cannam@85 932 _LT_DECL([], [DSYMUTIL], [1],
cannam@85 933 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
cannam@85 934 _LT_DECL([], [NMEDIT], [1],
cannam@85 935 [Tool to change global to local symbols on Mac OS X])
cannam@85 936 _LT_DECL([], [LIPO], [1],
cannam@85 937 [Tool to manipulate fat objects and archives on Mac OS X])
cannam@85 938 _LT_DECL([], [OTOOL], [1],
cannam@85 939 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
cannam@85 940 _LT_DECL([], [OTOOL64], [1],
cannam@85 941 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
cannam@85 942
cannam@85 943 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
cannam@85 944 [lt_cv_apple_cc_single_mod=no
cannam@85 945 if test -z "${LT_MULTI_MODULE}"; then
cannam@85 946 # By default we will add the -single_module flag. You can override
cannam@85 947 # by either setting the environment variable LT_MULTI_MODULE
cannam@85 948 # non-empty at configure time, or by adding -multi_module to the
cannam@85 949 # link flags.
cannam@85 950 rm -rf libconftest.dylib*
cannam@85 951 echo "int foo(void){return 1;}" > conftest.c
cannam@85 952 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
cannam@85 953 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
cannam@85 954 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
cannam@85 955 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
cannam@85 956 _lt_result=$?
cannam@85 957 if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
cannam@85 958 lt_cv_apple_cc_single_mod=yes
cannam@85 959 else
cannam@85 960 cat conftest.err >&AS_MESSAGE_LOG_FD
cannam@85 961 fi
cannam@85 962 rm -rf libconftest.dylib*
cannam@85 963 rm -f conftest.*
cannam@85 964 fi])
cannam@85 965 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
cannam@85 966 [lt_cv_ld_exported_symbols_list],
cannam@85 967 [lt_cv_ld_exported_symbols_list=no
cannam@85 968 save_LDFLAGS=$LDFLAGS
cannam@85 969 echo "_main" > conftest.sym
cannam@85 970 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
cannam@85 971 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
cannam@85 972 [lt_cv_ld_exported_symbols_list=yes],
cannam@85 973 [lt_cv_ld_exported_symbols_list=no])
cannam@85 974 LDFLAGS="$save_LDFLAGS"
cannam@85 975 ])
cannam@85 976 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
cannam@85 977 [lt_cv_ld_force_load=no
cannam@85 978 cat > conftest.c << _LT_EOF
cannam@85 979 int forced_loaded() { return 2;}
cannam@85 980 _LT_EOF
cannam@85 981 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
cannam@85 982 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
cannam@85 983 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
cannam@85 984 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
cannam@85 985 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
cannam@85 986 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
cannam@85 987 cat > conftest.c << _LT_EOF
cannam@85 988 int main() { return 0;}
cannam@85 989 _LT_EOF
cannam@85 990 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
cannam@85 991 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
cannam@85 992 _lt_result=$?
cannam@85 993 if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
cannam@85 994 lt_cv_ld_force_load=yes
cannam@85 995 else
cannam@85 996 cat conftest.err >&AS_MESSAGE_LOG_FD
cannam@85 997 fi
cannam@85 998 rm -f conftest.err libconftest.a conftest conftest.c
cannam@85 999 rm -rf conftest.dSYM
cannam@85 1000 ])
cannam@85 1001 case $host_os in
cannam@85 1002 rhapsody* | darwin1.[[012]])
cannam@85 1003 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
cannam@85 1004 darwin1.*)
cannam@85 1005 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
cannam@85 1006 darwin*) # darwin 5.x on
cannam@85 1007 # if running on 10.5 or later, the deployment target defaults
cannam@85 1008 # to the OS version, if on x86, and 10.4, the deployment
cannam@85 1009 # target defaults to 10.4. Don't you love it?
cannam@85 1010 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
cannam@85 1011 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
cannam@85 1012 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
cannam@85 1013 10.[[012]]*)
cannam@85 1014 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
cannam@85 1015 10.*)
cannam@85 1016 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
cannam@85 1017 esac
cannam@85 1018 ;;
cannam@85 1019 esac
cannam@85 1020 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
cannam@85 1021 _lt_dar_single_mod='$single_module'
cannam@85 1022 fi
cannam@85 1023 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
cannam@85 1024 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
cannam@85 1025 else
cannam@85 1026 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
cannam@85 1027 fi
cannam@85 1028 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
cannam@85 1029 _lt_dsymutil='~$DSYMUTIL $lib || :'
cannam@85 1030 else
cannam@85 1031 _lt_dsymutil=
cannam@85 1032 fi
cannam@85 1033 ;;
cannam@85 1034 esac
cannam@85 1035 ])
cannam@85 1036
cannam@85 1037
cannam@85 1038 # _LT_DARWIN_LINKER_FEATURES
cannam@85 1039 # --------------------------
cannam@85 1040 # Checks for linker and compiler features on darwin
cannam@85 1041 m4_defun([_LT_DARWIN_LINKER_FEATURES],
cannam@85 1042 [
cannam@85 1043 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
cannam@85 1044 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@85 1045 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@85 1046 _LT_TAGVAR(hardcode_automatic, $1)=yes
cannam@85 1047 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
cannam@85 1048 if test "$lt_cv_ld_force_load" = "yes"; then
cannam@85 1049 _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@85 1050 else
cannam@85 1051 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
cannam@85 1052 fi
cannam@85 1053 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@85 1054 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
cannam@85 1055 case $cc_basename in
cannam@85 1056 ifort*) _lt_dar_can_shared=yes ;;
cannam@85 1057 *) _lt_dar_can_shared=$GCC ;;
cannam@85 1058 esac
cannam@85 1059 if test "$_lt_dar_can_shared" = "yes"; then
cannam@85 1060 output_verbose_link_cmd=func_echo_all
cannam@85 1061 _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@85 1062 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
cannam@85 1063 _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@85 1064 _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@85 1065 m4_if([$1], [CXX],
cannam@85 1066 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
cannam@85 1067 _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@85 1068 _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@85 1069 fi
cannam@85 1070 ],[])
cannam@85 1071 else
cannam@85 1072 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 1073 fi
cannam@85 1074 ])
cannam@85 1075
cannam@85 1076 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
cannam@85 1077 # ----------------------------------
cannam@85 1078 # Links a minimal program and checks the executable
cannam@85 1079 # for the system default hardcoded library path. In most cases,
cannam@85 1080 # this is /usr/lib:/lib, but when the MPI compilers are used
cannam@85 1081 # the location of the communication and MPI libs are included too.
cannam@85 1082 # If we don't find anything, use the default library path according
cannam@85 1083 # to the aix ld manual.
cannam@85 1084 # Store the results from the different compilers for each TAGNAME.
cannam@85 1085 # Allow to override them for all tags through lt_cv_aix_libpath.
cannam@85 1086 m4_defun([_LT_SYS_MODULE_PATH_AIX],
cannam@85 1087 [m4_require([_LT_DECL_SED])dnl
cannam@85 1088 if test "${lt_cv_aix_libpath+set}" = set; then
cannam@85 1089 aix_libpath=$lt_cv_aix_libpath
cannam@85 1090 else
cannam@85 1091 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
cannam@85 1092 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
cannam@85 1093 lt_aix_libpath_sed='[
cannam@85 1094 /Import File Strings/,/^$/ {
cannam@85 1095 /^0/ {
cannam@85 1096 s/^0 *\([^ ]*\) *$/\1/
cannam@85 1097 p
cannam@85 1098 }
cannam@85 1099 }]'
cannam@85 1100 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
cannam@85 1101 # Check for a 64-bit object if we didn't find anything.
cannam@85 1102 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
cannam@85 1103 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
cannam@85 1104 fi],[])
cannam@85 1105 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
cannam@85 1106 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
cannam@85 1107 fi
cannam@85 1108 ])
cannam@85 1109 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
cannam@85 1110 fi
cannam@85 1111 ])# _LT_SYS_MODULE_PATH_AIX
cannam@85 1112
cannam@85 1113
cannam@85 1114 # _LT_SHELL_INIT(ARG)
cannam@85 1115 # -------------------
cannam@85 1116 m4_define([_LT_SHELL_INIT],
cannam@85 1117 [m4_divert_text([M4SH-INIT], [$1
cannam@85 1118 ])])# _LT_SHELL_INIT
cannam@85 1119
cannam@85 1120
cannam@85 1121
cannam@85 1122 # _LT_PROG_ECHO_BACKSLASH
cannam@85 1123 # -----------------------
cannam@85 1124 # Find how we can fake an echo command that does not interpret backslash.
cannam@85 1125 # In particular, with Autoconf 2.60 or later we add some code to the start
cannam@85 1126 # of the generated configure script which will find a shell with a builtin
cannam@85 1127 # printf (which we can use as an echo command).
cannam@85 1128 m4_defun([_LT_PROG_ECHO_BACKSLASH],
cannam@85 1129 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
cannam@85 1130 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
cannam@85 1131 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
cannam@85 1132
cannam@85 1133 AC_MSG_CHECKING([how to print strings])
cannam@85 1134 # Test print first, because it will be a builtin if present.
cannam@85 1135 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
cannam@85 1136 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
cannam@85 1137 ECHO='print -r --'
cannam@85 1138 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
cannam@85 1139 ECHO='printf %s\n'
cannam@85 1140 else
cannam@85 1141 # Use this function as a fallback that always works.
cannam@85 1142 func_fallback_echo ()
cannam@85 1143 {
cannam@85 1144 eval 'cat <<_LTECHO_EOF
cannam@85 1145 $[]1
cannam@85 1146 _LTECHO_EOF'
cannam@85 1147 }
cannam@85 1148 ECHO='func_fallback_echo'
cannam@85 1149 fi
cannam@85 1150
cannam@85 1151 # func_echo_all arg...
cannam@85 1152 # Invoke $ECHO with all args, space-separated.
cannam@85 1153 func_echo_all ()
cannam@85 1154 {
cannam@85 1155 $ECHO "$*"
cannam@85 1156 }
cannam@85 1157
cannam@85 1158 case "$ECHO" in
cannam@85 1159 printf*) AC_MSG_RESULT([printf]) ;;
cannam@85 1160 print*) AC_MSG_RESULT([print -r]) ;;
cannam@85 1161 *) AC_MSG_RESULT([cat]) ;;
cannam@85 1162 esac
cannam@85 1163
cannam@85 1164 m4_ifdef([_AS_DETECT_SUGGESTED],
cannam@85 1165 [_AS_DETECT_SUGGESTED([
cannam@85 1166 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
cannam@85 1167 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
cannam@85 1168 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
cannam@85 1169 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
cannam@85 1170 PATH=/empty FPATH=/empty; export PATH FPATH
cannam@85 1171 test "X`printf %s $ECHO`" = "X$ECHO" \
cannam@85 1172 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
cannam@85 1173
cannam@85 1174 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
cannam@85 1175 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
cannam@85 1176 ])# _LT_PROG_ECHO_BACKSLASH
cannam@85 1177
cannam@85 1178
cannam@85 1179 # _LT_WITH_SYSROOT
cannam@85 1180 # ----------------
cannam@85 1181 AC_DEFUN([_LT_WITH_SYSROOT],
cannam@85 1182 [AC_MSG_CHECKING([for sysroot])
cannam@85 1183 AC_ARG_WITH([sysroot],
cannam@85 1184 [ --with-sysroot[=DIR] Search for dependent libraries within DIR
cannam@85 1185 (or the compiler's sysroot if not specified).],
cannam@85 1186 [], [with_sysroot=no])
cannam@85 1187
cannam@85 1188 dnl lt_sysroot will always be passed unquoted. We quote it here
cannam@85 1189 dnl in case the user passed a directory name.
cannam@85 1190 lt_sysroot=
cannam@85 1191 case ${with_sysroot} in #(
cannam@85 1192 yes)
cannam@85 1193 if test "$GCC" = yes; then
cannam@85 1194 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
cannam@85 1195 fi
cannam@85 1196 ;; #(
cannam@85 1197 /*)
cannam@85 1198 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
cannam@85 1199 ;; #(
cannam@85 1200 no|'')
cannam@85 1201 ;; #(
cannam@85 1202 *)
cannam@85 1203 AC_MSG_RESULT([${with_sysroot}])
cannam@85 1204 AC_MSG_ERROR([The sysroot must be an absolute path.])
cannam@85 1205 ;;
cannam@85 1206 esac
cannam@85 1207
cannam@85 1208 AC_MSG_RESULT([${lt_sysroot:-no}])
cannam@85 1209 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
cannam@85 1210 [dependent libraries, and in which our libraries should be installed.])])
cannam@85 1211
cannam@85 1212 # _LT_ENABLE_LOCK
cannam@85 1213 # ---------------
cannam@85 1214 m4_defun([_LT_ENABLE_LOCK],
cannam@85 1215 [AC_ARG_ENABLE([libtool-lock],
cannam@85 1216 [AS_HELP_STRING([--disable-libtool-lock],
cannam@85 1217 [avoid locking (might break parallel builds)])])
cannam@85 1218 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
cannam@85 1219
cannam@85 1220 # Some flags need to be propagated to the compiler or linker for good
cannam@85 1221 # libtool support.
cannam@85 1222 case $host in
cannam@85 1223 ia64-*-hpux*)
cannam@85 1224 # Find out which ABI we are using.
cannam@85 1225 echo 'int i;' > conftest.$ac_ext
cannam@85 1226 if AC_TRY_EVAL(ac_compile); then
cannam@85 1227 case `/usr/bin/file conftest.$ac_objext` in
cannam@85 1228 *ELF-32*)
cannam@85 1229 HPUX_IA64_MODE="32"
cannam@85 1230 ;;
cannam@85 1231 *ELF-64*)
cannam@85 1232 HPUX_IA64_MODE="64"
cannam@85 1233 ;;
cannam@85 1234 esac
cannam@85 1235 fi
cannam@85 1236 rm -rf conftest*
cannam@85 1237 ;;
cannam@85 1238 *-*-irix6*)
cannam@85 1239 # Find out which ABI we are using.
cannam@85 1240 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
cannam@85 1241 if AC_TRY_EVAL(ac_compile); then
cannam@85 1242 if test "$lt_cv_prog_gnu_ld" = yes; then
cannam@85 1243 case `/usr/bin/file conftest.$ac_objext` in
cannam@85 1244 *32-bit*)
cannam@85 1245 LD="${LD-ld} -melf32bsmip"
cannam@85 1246 ;;
cannam@85 1247 *N32*)
cannam@85 1248 LD="${LD-ld} -melf32bmipn32"
cannam@85 1249 ;;
cannam@85 1250 *64-bit*)
cannam@85 1251 LD="${LD-ld} -melf64bmip"
cannam@85 1252 ;;
cannam@85 1253 esac
cannam@85 1254 else
cannam@85 1255 case `/usr/bin/file conftest.$ac_objext` in
cannam@85 1256 *32-bit*)
cannam@85 1257 LD="${LD-ld} -32"
cannam@85 1258 ;;
cannam@85 1259 *N32*)
cannam@85 1260 LD="${LD-ld} -n32"
cannam@85 1261 ;;
cannam@85 1262 *64-bit*)
cannam@85 1263 LD="${LD-ld} -64"
cannam@85 1264 ;;
cannam@85 1265 esac
cannam@85 1266 fi
cannam@85 1267 fi
cannam@85 1268 rm -rf conftest*
cannam@85 1269 ;;
cannam@85 1270
cannam@85 1271 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
cannam@85 1272 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
cannam@85 1273 # Find out which ABI we are using.
cannam@85 1274 echo 'int i;' > conftest.$ac_ext
cannam@85 1275 if AC_TRY_EVAL(ac_compile); then
cannam@85 1276 case `/usr/bin/file conftest.o` in
cannam@85 1277 *32-bit*)
cannam@85 1278 case $host in
cannam@85 1279 x86_64-*kfreebsd*-gnu)
cannam@85 1280 LD="${LD-ld} -m elf_i386_fbsd"
cannam@85 1281 ;;
cannam@85 1282 x86_64-*linux*)
cannam@85 1283 LD="${LD-ld} -m elf_i386"
cannam@85 1284 ;;
cannam@85 1285 ppc64-*linux*|powerpc64-*linux*)
cannam@85 1286 LD="${LD-ld} -m elf32ppclinux"
cannam@85 1287 ;;
cannam@85 1288 s390x-*linux*)
cannam@85 1289 LD="${LD-ld} -m elf_s390"
cannam@85 1290 ;;
cannam@85 1291 sparc64-*linux*)
cannam@85 1292 LD="${LD-ld} -m elf32_sparc"
cannam@85 1293 ;;
cannam@85 1294 esac
cannam@85 1295 ;;
cannam@85 1296 *64-bit*)
cannam@85 1297 case $host in
cannam@85 1298 x86_64-*kfreebsd*-gnu)
cannam@85 1299 LD="${LD-ld} -m elf_x86_64_fbsd"
cannam@85 1300 ;;
cannam@85 1301 x86_64-*linux*)
cannam@85 1302 LD="${LD-ld} -m elf_x86_64"
cannam@85 1303 ;;
cannam@85 1304 ppc*-*linux*|powerpc*-*linux*)
cannam@85 1305 LD="${LD-ld} -m elf64ppc"
cannam@85 1306 ;;
cannam@85 1307 s390*-*linux*|s390*-*tpf*)
cannam@85 1308 LD="${LD-ld} -m elf64_s390"
cannam@85 1309 ;;
cannam@85 1310 sparc*-*linux*)
cannam@85 1311 LD="${LD-ld} -m elf64_sparc"
cannam@85 1312 ;;
cannam@85 1313 esac
cannam@85 1314 ;;
cannam@85 1315 esac
cannam@85 1316 fi
cannam@85 1317 rm -rf conftest*
cannam@85 1318 ;;
cannam@85 1319
cannam@85 1320 *-*-sco3.2v5*)
cannam@85 1321 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
cannam@85 1322 SAVE_CFLAGS="$CFLAGS"
cannam@85 1323 CFLAGS="$CFLAGS -belf"
cannam@85 1324 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
cannam@85 1325 [AC_LANG_PUSH(C)
cannam@85 1326 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
cannam@85 1327 AC_LANG_POP])
cannam@85 1328 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
cannam@85 1329 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
cannam@85 1330 CFLAGS="$SAVE_CFLAGS"
cannam@85 1331 fi
cannam@85 1332 ;;
cannam@85 1333 sparc*-*solaris*)
cannam@85 1334 # Find out which ABI we are using.
cannam@85 1335 echo 'int i;' > conftest.$ac_ext
cannam@85 1336 if AC_TRY_EVAL(ac_compile); then
cannam@85 1337 case `/usr/bin/file conftest.o` in
cannam@85 1338 *64-bit*)
cannam@85 1339 case $lt_cv_prog_gnu_ld in
cannam@85 1340 yes*) LD="${LD-ld} -m elf64_sparc" ;;
cannam@85 1341 *)
cannam@85 1342 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
cannam@85 1343 LD="${LD-ld} -64"
cannam@85 1344 fi
cannam@85 1345 ;;
cannam@85 1346 esac
cannam@85 1347 ;;
cannam@85 1348 esac
cannam@85 1349 fi
cannam@85 1350 rm -rf conftest*
cannam@85 1351 ;;
cannam@85 1352 esac
cannam@85 1353
cannam@85 1354 need_locks="$enable_libtool_lock"
cannam@85 1355 ])# _LT_ENABLE_LOCK
cannam@85 1356
cannam@85 1357
cannam@85 1358 # _LT_PROG_AR
cannam@85 1359 # -----------
cannam@85 1360 m4_defun([_LT_PROG_AR],
cannam@85 1361 [AC_CHECK_TOOLS(AR, [ar], false)
cannam@85 1362 : ${AR=ar}
cannam@85 1363 : ${AR_FLAGS=cru}
cannam@85 1364 _LT_DECL([], [AR], [1], [The archiver])
cannam@85 1365 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
cannam@85 1366
cannam@85 1367 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
cannam@85 1368 [lt_cv_ar_at_file=no
cannam@85 1369 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
cannam@85 1370 [echo conftest.$ac_objext > conftest.lst
cannam@85 1371 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
cannam@85 1372 AC_TRY_EVAL([lt_ar_try])
cannam@85 1373 if test "$ac_status" -eq 0; then
cannam@85 1374 # Ensure the archiver fails upon bogus file names.
cannam@85 1375 rm -f conftest.$ac_objext libconftest.a
cannam@85 1376 AC_TRY_EVAL([lt_ar_try])
cannam@85 1377 if test "$ac_status" -ne 0; then
cannam@85 1378 lt_cv_ar_at_file=@
cannam@85 1379 fi
cannam@85 1380 fi
cannam@85 1381 rm -f conftest.* libconftest.a
cannam@85 1382 ])
cannam@85 1383 ])
cannam@85 1384
cannam@85 1385 if test "x$lt_cv_ar_at_file" = xno; then
cannam@85 1386 archiver_list_spec=
cannam@85 1387 else
cannam@85 1388 archiver_list_spec=$lt_cv_ar_at_file
cannam@85 1389 fi
cannam@85 1390 _LT_DECL([], [archiver_list_spec], [1],
cannam@85 1391 [How to feed a file listing to the archiver])
cannam@85 1392 ])# _LT_PROG_AR
cannam@85 1393
cannam@85 1394
cannam@85 1395 # _LT_CMD_OLD_ARCHIVE
cannam@85 1396 # -------------------
cannam@85 1397 m4_defun([_LT_CMD_OLD_ARCHIVE],
cannam@85 1398 [_LT_PROG_AR
cannam@85 1399
cannam@85 1400 AC_CHECK_TOOL(STRIP, strip, :)
cannam@85 1401 test -z "$STRIP" && STRIP=:
cannam@85 1402 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
cannam@85 1403
cannam@85 1404 AC_CHECK_TOOL(RANLIB, ranlib, :)
cannam@85 1405 test -z "$RANLIB" && RANLIB=:
cannam@85 1406 _LT_DECL([], [RANLIB], [1],
cannam@85 1407 [Commands used to install an old-style archive])
cannam@85 1408
cannam@85 1409 # Determine commands to create old-style static archives.
cannam@85 1410 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
cannam@85 1411 old_postinstall_cmds='chmod 644 $oldlib'
cannam@85 1412 old_postuninstall_cmds=
cannam@85 1413
cannam@85 1414 if test -n "$RANLIB"; then
cannam@85 1415 case $host_os in
cannam@85 1416 openbsd*)
cannam@85 1417 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
cannam@85 1418 ;;
cannam@85 1419 *)
cannam@85 1420 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
cannam@85 1421 ;;
cannam@85 1422 esac
cannam@85 1423 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
cannam@85 1424 fi
cannam@85 1425
cannam@85 1426 case $host_os in
cannam@85 1427 darwin*)
cannam@85 1428 lock_old_archive_extraction=yes ;;
cannam@85 1429 *)
cannam@85 1430 lock_old_archive_extraction=no ;;
cannam@85 1431 esac
cannam@85 1432 _LT_DECL([], [old_postinstall_cmds], [2])
cannam@85 1433 _LT_DECL([], [old_postuninstall_cmds], [2])
cannam@85 1434 _LT_TAGDECL([], [old_archive_cmds], [2],
cannam@85 1435 [Commands used to build an old-style archive])
cannam@85 1436 _LT_DECL([], [lock_old_archive_extraction], [0],
cannam@85 1437 [Whether to use a lock for old archive extraction])
cannam@85 1438 ])# _LT_CMD_OLD_ARCHIVE
cannam@85 1439
cannam@85 1440
cannam@85 1441 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
cannam@85 1442 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
cannam@85 1443 # ----------------------------------------------------------------
cannam@85 1444 # Check whether the given compiler option works
cannam@85 1445 AC_DEFUN([_LT_COMPILER_OPTION],
cannam@85 1446 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@85 1447 m4_require([_LT_DECL_SED])dnl
cannam@85 1448 AC_CACHE_CHECK([$1], [$2],
cannam@85 1449 [$2=no
cannam@85 1450 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
cannam@85 1451 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
cannam@85 1452 lt_compiler_flag="$3"
cannam@85 1453 # Insert the option either (1) after the last *FLAGS variable, or
cannam@85 1454 # (2) before a word containing "conftest.", or (3) at the end.
cannam@85 1455 # Note that $ac_compile itself does not contain backslashes and begins
cannam@85 1456 # with a dollar sign (not a hyphen), so the echo should work correctly.
cannam@85 1457 # The option is referenced via a variable to avoid confusing sed.
cannam@85 1458 lt_compile=`echo "$ac_compile" | $SED \
cannam@85 1459 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
cannam@85 1460 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
cannam@85 1461 -e 's:$: $lt_compiler_flag:'`
cannam@85 1462 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
cannam@85 1463 (eval "$lt_compile" 2>conftest.err)
cannam@85 1464 ac_status=$?
cannam@85 1465 cat conftest.err >&AS_MESSAGE_LOG_FD
cannam@85 1466 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
cannam@85 1467 if (exit $ac_status) && test -s "$ac_outfile"; then
cannam@85 1468 # The compiler can only warn and ignore the option if not recognized
cannam@85 1469 # So say no if there are warnings other than the usual output.
cannam@85 1470 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
cannam@85 1471 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
cannam@85 1472 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
cannam@85 1473 $2=yes
cannam@85 1474 fi
cannam@85 1475 fi
cannam@85 1476 $RM conftest*
cannam@85 1477 ])
cannam@85 1478
cannam@85 1479 if test x"[$]$2" = xyes; then
cannam@85 1480 m4_if([$5], , :, [$5])
cannam@85 1481 else
cannam@85 1482 m4_if([$6], , :, [$6])
cannam@85 1483 fi
cannam@85 1484 ])# _LT_COMPILER_OPTION
cannam@85 1485
cannam@85 1486 # Old name:
cannam@85 1487 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
cannam@85 1488 dnl aclocal-1.4 backwards compatibility:
cannam@85 1489 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
cannam@85 1490
cannam@85 1491
cannam@85 1492 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
cannam@85 1493 # [ACTION-SUCCESS], [ACTION-FAILURE])
cannam@85 1494 # ----------------------------------------------------
cannam@85 1495 # Check whether the given linker option works
cannam@85 1496 AC_DEFUN([_LT_LINKER_OPTION],
cannam@85 1497 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@85 1498 m4_require([_LT_DECL_SED])dnl
cannam@85 1499 AC_CACHE_CHECK([$1], [$2],
cannam@85 1500 [$2=no
cannam@85 1501 save_LDFLAGS="$LDFLAGS"
cannam@85 1502 LDFLAGS="$LDFLAGS $3"
cannam@85 1503 echo "$lt_simple_link_test_code" > conftest.$ac_ext
cannam@85 1504 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
cannam@85 1505 # The linker can only warn and ignore the option if not recognized
cannam@85 1506 # So say no if there are warnings
cannam@85 1507 if test -s conftest.err; then
cannam@85 1508 # Append any errors to the config.log.
cannam@85 1509 cat conftest.err 1>&AS_MESSAGE_LOG_FD
cannam@85 1510 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
cannam@85 1511 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
cannam@85 1512 if diff conftest.exp conftest.er2 >/dev/null; then
cannam@85 1513 $2=yes
cannam@85 1514 fi
cannam@85 1515 else
cannam@85 1516 $2=yes
cannam@85 1517 fi
cannam@85 1518 fi
cannam@85 1519 $RM -r conftest*
cannam@85 1520 LDFLAGS="$save_LDFLAGS"
cannam@85 1521 ])
cannam@85 1522
cannam@85 1523 if test x"[$]$2" = xyes; then
cannam@85 1524 m4_if([$4], , :, [$4])
cannam@85 1525 else
cannam@85 1526 m4_if([$5], , :, [$5])
cannam@85 1527 fi
cannam@85 1528 ])# _LT_LINKER_OPTION
cannam@85 1529
cannam@85 1530 # Old name:
cannam@85 1531 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
cannam@85 1532 dnl aclocal-1.4 backwards compatibility:
cannam@85 1533 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
cannam@85 1534
cannam@85 1535
cannam@85 1536 # LT_CMD_MAX_LEN
cannam@85 1537 #---------------
cannam@85 1538 AC_DEFUN([LT_CMD_MAX_LEN],
cannam@85 1539 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
cannam@85 1540 # find the maximum length of command line arguments
cannam@85 1541 AC_MSG_CHECKING([the maximum length of command line arguments])
cannam@85 1542 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
cannam@85 1543 i=0
cannam@85 1544 teststring="ABCD"
cannam@85 1545
cannam@85 1546 case $build_os in
cannam@85 1547 msdosdjgpp*)
cannam@85 1548 # On DJGPP, this test can blow up pretty badly due to problems in libc
cannam@85 1549 # (any single argument exceeding 2000 bytes causes a buffer overrun
cannam@85 1550 # during glob expansion). Even if it were fixed, the result of this
cannam@85 1551 # check would be larger than it should be.
cannam@85 1552 lt_cv_sys_max_cmd_len=12288; # 12K is about right
cannam@85 1553 ;;
cannam@85 1554
cannam@85 1555 gnu*)
cannam@85 1556 # Under GNU Hurd, this test is not required because there is
cannam@85 1557 # no limit to the length of command line arguments.
cannam@85 1558 # Libtool will interpret -1 as no limit whatsoever
cannam@85 1559 lt_cv_sys_max_cmd_len=-1;
cannam@85 1560 ;;
cannam@85 1561
cannam@85 1562 cygwin* | mingw* | cegcc*)
cannam@85 1563 # On Win9x/ME, this test blows up -- it succeeds, but takes
cannam@85 1564 # about 5 minutes as the teststring grows exponentially.
cannam@85 1565 # Worse, since 9x/ME are not pre-emptively multitasking,
cannam@85 1566 # you end up with a "frozen" computer, even though with patience
cannam@85 1567 # the test eventually succeeds (with a max line length of 256k).
cannam@85 1568 # Instead, let's just punt: use the minimum linelength reported by
cannam@85 1569 # all of the supported platforms: 8192 (on NT/2K/XP).
cannam@85 1570 lt_cv_sys_max_cmd_len=8192;
cannam@85 1571 ;;
cannam@85 1572
cannam@85 1573 mint*)
cannam@85 1574 # On MiNT this can take a long time and run out of memory.
cannam@85 1575 lt_cv_sys_max_cmd_len=8192;
cannam@85 1576 ;;
cannam@85 1577
cannam@85 1578 amigaos*)
cannam@85 1579 # On AmigaOS with pdksh, this test takes hours, literally.
cannam@85 1580 # So we just punt and use a minimum line length of 8192.
cannam@85 1581 lt_cv_sys_max_cmd_len=8192;
cannam@85 1582 ;;
cannam@85 1583
cannam@85 1584 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
cannam@85 1585 # This has been around since 386BSD, at least. Likely further.
cannam@85 1586 if test -x /sbin/sysctl; then
cannam@85 1587 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
cannam@85 1588 elif test -x /usr/sbin/sysctl; then
cannam@85 1589 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
cannam@85 1590 else
cannam@85 1591 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
cannam@85 1592 fi
cannam@85 1593 # And add a safety zone
cannam@85 1594 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
cannam@85 1595 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
cannam@85 1596 ;;
cannam@85 1597
cannam@85 1598 interix*)
cannam@85 1599 # We know the value 262144 and hardcode it with a safety zone (like BSD)
cannam@85 1600 lt_cv_sys_max_cmd_len=196608
cannam@85 1601 ;;
cannam@85 1602
cannam@85 1603 osf*)
cannam@85 1604 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
cannam@85 1605 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
cannam@85 1606 # nice to cause kernel panics so lets avoid the loop below.
cannam@85 1607 # First set a reasonable default.
cannam@85 1608 lt_cv_sys_max_cmd_len=16384
cannam@85 1609 #
cannam@85 1610 if test -x /sbin/sysconfig; then
cannam@85 1611 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
cannam@85 1612 *1*) lt_cv_sys_max_cmd_len=-1 ;;
cannam@85 1613 esac
cannam@85 1614 fi
cannam@85 1615 ;;
cannam@85 1616 sco3.2v5*)
cannam@85 1617 lt_cv_sys_max_cmd_len=102400
cannam@85 1618 ;;
cannam@85 1619 sysv5* | sco5v6* | sysv4.2uw2*)
cannam@85 1620 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
cannam@85 1621 if test -n "$kargmax"; then
cannam@85 1622 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
cannam@85 1623 else
cannam@85 1624 lt_cv_sys_max_cmd_len=32768
cannam@85 1625 fi
cannam@85 1626 ;;
cannam@85 1627 *)
cannam@85 1628 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
cannam@85 1629 if test -n "$lt_cv_sys_max_cmd_len"; then
cannam@85 1630 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
cannam@85 1631 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
cannam@85 1632 else
cannam@85 1633 # Make teststring a little bigger before we do anything with it.
cannam@85 1634 # a 1K string should be a reasonable start.
cannam@85 1635 for i in 1 2 3 4 5 6 7 8 ; do
cannam@85 1636 teststring=$teststring$teststring
cannam@85 1637 done
cannam@85 1638 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
cannam@85 1639 # If test is not a shell built-in, we'll probably end up computing a
cannam@85 1640 # maximum length that is only half of the actual maximum length, but
cannam@85 1641 # we can't tell.
cannam@85 1642 while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
cannam@85 1643 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
cannam@85 1644 test $i != 17 # 1/2 MB should be enough
cannam@85 1645 do
cannam@85 1646 i=`expr $i + 1`
cannam@85 1647 teststring=$teststring$teststring
cannam@85 1648 done
cannam@85 1649 # Only check the string length outside the loop.
cannam@85 1650 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
cannam@85 1651 teststring=
cannam@85 1652 # Add a significant safety factor because C++ compilers can tack on
cannam@85 1653 # massive amounts of additional arguments before passing them to the
cannam@85 1654 # linker. It appears as though 1/2 is a usable value.
cannam@85 1655 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
cannam@85 1656 fi
cannam@85 1657 ;;
cannam@85 1658 esac
cannam@85 1659 ])
cannam@85 1660 if test -n $lt_cv_sys_max_cmd_len ; then
cannam@85 1661 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
cannam@85 1662 else
cannam@85 1663 AC_MSG_RESULT(none)
cannam@85 1664 fi
cannam@85 1665 max_cmd_len=$lt_cv_sys_max_cmd_len
cannam@85 1666 _LT_DECL([], [max_cmd_len], [0],
cannam@85 1667 [What is the maximum length of a command?])
cannam@85 1668 ])# LT_CMD_MAX_LEN
cannam@85 1669
cannam@85 1670 # Old name:
cannam@85 1671 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
cannam@85 1672 dnl aclocal-1.4 backwards compatibility:
cannam@85 1673 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
cannam@85 1674
cannam@85 1675
cannam@85 1676 # _LT_HEADER_DLFCN
cannam@85 1677 # ----------------
cannam@85 1678 m4_defun([_LT_HEADER_DLFCN],
cannam@85 1679 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
cannam@85 1680 ])# _LT_HEADER_DLFCN
cannam@85 1681
cannam@85 1682
cannam@85 1683 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
cannam@85 1684 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
cannam@85 1685 # ----------------------------------------------------------------
cannam@85 1686 m4_defun([_LT_TRY_DLOPEN_SELF],
cannam@85 1687 [m4_require([_LT_HEADER_DLFCN])dnl
cannam@85 1688 if test "$cross_compiling" = yes; then :
cannam@85 1689 [$4]
cannam@85 1690 else
cannam@85 1691 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
cannam@85 1692 lt_status=$lt_dlunknown
cannam@85 1693 cat > conftest.$ac_ext <<_LT_EOF
cannam@85 1694 [#line $LINENO "configure"
cannam@85 1695 #include "confdefs.h"
cannam@85 1696
cannam@85 1697 #if HAVE_DLFCN_H
cannam@85 1698 #include <dlfcn.h>
cannam@85 1699 #endif
cannam@85 1700
cannam@85 1701 #include <stdio.h>
cannam@85 1702
cannam@85 1703 #ifdef RTLD_GLOBAL
cannam@85 1704 # define LT_DLGLOBAL RTLD_GLOBAL
cannam@85 1705 #else
cannam@85 1706 # ifdef DL_GLOBAL
cannam@85 1707 # define LT_DLGLOBAL DL_GLOBAL
cannam@85 1708 # else
cannam@85 1709 # define LT_DLGLOBAL 0
cannam@85 1710 # endif
cannam@85 1711 #endif
cannam@85 1712
cannam@85 1713 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
cannam@85 1714 find out it does not work in some platform. */
cannam@85 1715 #ifndef LT_DLLAZY_OR_NOW
cannam@85 1716 # ifdef RTLD_LAZY
cannam@85 1717 # define LT_DLLAZY_OR_NOW RTLD_LAZY
cannam@85 1718 # else
cannam@85 1719 # ifdef DL_LAZY
cannam@85 1720 # define LT_DLLAZY_OR_NOW DL_LAZY
cannam@85 1721 # else
cannam@85 1722 # ifdef RTLD_NOW
cannam@85 1723 # define LT_DLLAZY_OR_NOW RTLD_NOW
cannam@85 1724 # else
cannam@85 1725 # ifdef DL_NOW
cannam@85 1726 # define LT_DLLAZY_OR_NOW DL_NOW
cannam@85 1727 # else
cannam@85 1728 # define LT_DLLAZY_OR_NOW 0
cannam@85 1729 # endif
cannam@85 1730 # endif
cannam@85 1731 # endif
cannam@85 1732 # endif
cannam@85 1733 #endif
cannam@85 1734
cannam@85 1735 /* When -fvisbility=hidden is used, assume the code has been annotated
cannam@85 1736 correspondingly for the symbols needed. */
cannam@85 1737 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
cannam@85 1738 int fnord () __attribute__((visibility("default")));
cannam@85 1739 #endif
cannam@85 1740
cannam@85 1741 int fnord () { return 42; }
cannam@85 1742 int main ()
cannam@85 1743 {
cannam@85 1744 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
cannam@85 1745 int status = $lt_dlunknown;
cannam@85 1746
cannam@85 1747 if (self)
cannam@85 1748 {
cannam@85 1749 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
cannam@85 1750 else
cannam@85 1751 {
cannam@85 1752 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
cannam@85 1753 else puts (dlerror ());
cannam@85 1754 }
cannam@85 1755 /* dlclose (self); */
cannam@85 1756 }
cannam@85 1757 else
cannam@85 1758 puts (dlerror ());
cannam@85 1759
cannam@85 1760 return status;
cannam@85 1761 }]
cannam@85 1762 _LT_EOF
cannam@85 1763 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
cannam@85 1764 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
cannam@85 1765 lt_status=$?
cannam@85 1766 case x$lt_status in
cannam@85 1767 x$lt_dlno_uscore) $1 ;;
cannam@85 1768 x$lt_dlneed_uscore) $2 ;;
cannam@85 1769 x$lt_dlunknown|x*) $3 ;;
cannam@85 1770 esac
cannam@85 1771 else :
cannam@85 1772 # compilation failed
cannam@85 1773 $3
cannam@85 1774 fi
cannam@85 1775 fi
cannam@85 1776 rm -fr conftest*
cannam@85 1777 ])# _LT_TRY_DLOPEN_SELF
cannam@85 1778
cannam@85 1779
cannam@85 1780 # LT_SYS_DLOPEN_SELF
cannam@85 1781 # ------------------
cannam@85 1782 AC_DEFUN([LT_SYS_DLOPEN_SELF],
cannam@85 1783 [m4_require([_LT_HEADER_DLFCN])dnl
cannam@85 1784 if test "x$enable_dlopen" != xyes; then
cannam@85 1785 enable_dlopen=unknown
cannam@85 1786 enable_dlopen_self=unknown
cannam@85 1787 enable_dlopen_self_static=unknown
cannam@85 1788 else
cannam@85 1789 lt_cv_dlopen=no
cannam@85 1790 lt_cv_dlopen_libs=
cannam@85 1791
cannam@85 1792 case $host_os in
cannam@85 1793 beos*)
cannam@85 1794 lt_cv_dlopen="load_add_on"
cannam@85 1795 lt_cv_dlopen_libs=
cannam@85 1796 lt_cv_dlopen_self=yes
cannam@85 1797 ;;
cannam@85 1798
cannam@85 1799 mingw* | pw32* | cegcc*)
cannam@85 1800 lt_cv_dlopen="LoadLibrary"
cannam@85 1801 lt_cv_dlopen_libs=
cannam@85 1802 ;;
cannam@85 1803
cannam@85 1804 cygwin*)
cannam@85 1805 lt_cv_dlopen="dlopen"
cannam@85 1806 lt_cv_dlopen_libs=
cannam@85 1807 ;;
cannam@85 1808
cannam@85 1809 darwin*)
cannam@85 1810 # if libdl is installed we need to link against it
cannam@85 1811 AC_CHECK_LIB([dl], [dlopen],
cannam@85 1812 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
cannam@85 1813 lt_cv_dlopen="dyld"
cannam@85 1814 lt_cv_dlopen_libs=
cannam@85 1815 lt_cv_dlopen_self=yes
cannam@85 1816 ])
cannam@85 1817 ;;
cannam@85 1818
cannam@85 1819 *)
cannam@85 1820 AC_CHECK_FUNC([shl_load],
cannam@85 1821 [lt_cv_dlopen="shl_load"],
cannam@85 1822 [AC_CHECK_LIB([dld], [shl_load],
cannam@85 1823 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
cannam@85 1824 [AC_CHECK_FUNC([dlopen],
cannam@85 1825 [lt_cv_dlopen="dlopen"],
cannam@85 1826 [AC_CHECK_LIB([dl], [dlopen],
cannam@85 1827 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
cannam@85 1828 [AC_CHECK_LIB([svld], [dlopen],
cannam@85 1829 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
cannam@85 1830 [AC_CHECK_LIB([dld], [dld_link],
cannam@85 1831 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
cannam@85 1832 ])
cannam@85 1833 ])
cannam@85 1834 ])
cannam@85 1835 ])
cannam@85 1836 ])
cannam@85 1837 ;;
cannam@85 1838 esac
cannam@85 1839
cannam@85 1840 if test "x$lt_cv_dlopen" != xno; then
cannam@85 1841 enable_dlopen=yes
cannam@85 1842 else
cannam@85 1843 enable_dlopen=no
cannam@85 1844 fi
cannam@85 1845
cannam@85 1846 case $lt_cv_dlopen in
cannam@85 1847 dlopen)
cannam@85 1848 save_CPPFLAGS="$CPPFLAGS"
cannam@85 1849 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
cannam@85 1850
cannam@85 1851 save_LDFLAGS="$LDFLAGS"
cannam@85 1852 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
cannam@85 1853
cannam@85 1854 save_LIBS="$LIBS"
cannam@85 1855 LIBS="$lt_cv_dlopen_libs $LIBS"
cannam@85 1856
cannam@85 1857 AC_CACHE_CHECK([whether a program can dlopen itself],
cannam@85 1858 lt_cv_dlopen_self, [dnl
cannam@85 1859 _LT_TRY_DLOPEN_SELF(
cannam@85 1860 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
cannam@85 1861 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
cannam@85 1862 ])
cannam@85 1863
cannam@85 1864 if test "x$lt_cv_dlopen_self" = xyes; then
cannam@85 1865 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
cannam@85 1866 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
cannam@85 1867 lt_cv_dlopen_self_static, [dnl
cannam@85 1868 _LT_TRY_DLOPEN_SELF(
cannam@85 1869 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
cannam@85 1870 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
cannam@85 1871 ])
cannam@85 1872 fi
cannam@85 1873
cannam@85 1874 CPPFLAGS="$save_CPPFLAGS"
cannam@85 1875 LDFLAGS="$save_LDFLAGS"
cannam@85 1876 LIBS="$save_LIBS"
cannam@85 1877 ;;
cannam@85 1878 esac
cannam@85 1879
cannam@85 1880 case $lt_cv_dlopen_self in
cannam@85 1881 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
cannam@85 1882 *) enable_dlopen_self=unknown ;;
cannam@85 1883 esac
cannam@85 1884
cannam@85 1885 case $lt_cv_dlopen_self_static in
cannam@85 1886 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
cannam@85 1887 *) enable_dlopen_self_static=unknown ;;
cannam@85 1888 esac
cannam@85 1889 fi
cannam@85 1890 _LT_DECL([dlopen_support], [enable_dlopen], [0],
cannam@85 1891 [Whether dlopen is supported])
cannam@85 1892 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
cannam@85 1893 [Whether dlopen of programs is supported])
cannam@85 1894 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
cannam@85 1895 [Whether dlopen of statically linked programs is supported])
cannam@85 1896 ])# LT_SYS_DLOPEN_SELF
cannam@85 1897
cannam@85 1898 # Old name:
cannam@85 1899 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
cannam@85 1900 dnl aclocal-1.4 backwards compatibility:
cannam@85 1901 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
cannam@85 1902
cannam@85 1903
cannam@85 1904 # _LT_COMPILER_C_O([TAGNAME])
cannam@85 1905 # ---------------------------
cannam@85 1906 # Check to see if options -c and -o are simultaneously supported by compiler.
cannam@85 1907 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
cannam@85 1908 m4_defun([_LT_COMPILER_C_O],
cannam@85 1909 [m4_require([_LT_DECL_SED])dnl
cannam@85 1910 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@85 1911 m4_require([_LT_TAG_COMPILER])dnl
cannam@85 1912 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
cannam@85 1913 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
cannam@85 1914 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
cannam@85 1915 $RM -r conftest 2>/dev/null
cannam@85 1916 mkdir conftest
cannam@85 1917 cd conftest
cannam@85 1918 mkdir out
cannam@85 1919 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
cannam@85 1920
cannam@85 1921 lt_compiler_flag="-o out/conftest2.$ac_objext"
cannam@85 1922 # Insert the option either (1) after the last *FLAGS variable, or
cannam@85 1923 # (2) before a word containing "conftest.", or (3) at the end.
cannam@85 1924 # Note that $ac_compile itself does not contain backslashes and begins
cannam@85 1925 # with a dollar sign (not a hyphen), so the echo should work correctly.
cannam@85 1926 lt_compile=`echo "$ac_compile" | $SED \
cannam@85 1927 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
cannam@85 1928 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
cannam@85 1929 -e 's:$: $lt_compiler_flag:'`
cannam@85 1930 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
cannam@85 1931 (eval "$lt_compile" 2>out/conftest.err)
cannam@85 1932 ac_status=$?
cannam@85 1933 cat out/conftest.err >&AS_MESSAGE_LOG_FD
cannam@85 1934 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
cannam@85 1935 if (exit $ac_status) && test -s out/conftest2.$ac_objext
cannam@85 1936 then
cannam@85 1937 # The compiler can only warn and ignore the option if not recognized
cannam@85 1938 # So say no if there are warnings
cannam@85 1939 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
cannam@85 1940 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
cannam@85 1941 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
cannam@85 1942 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
cannam@85 1943 fi
cannam@85 1944 fi
cannam@85 1945 chmod u+w . 2>&AS_MESSAGE_LOG_FD
cannam@85 1946 $RM conftest*
cannam@85 1947 # SGI C++ compiler will create directory out/ii_files/ for
cannam@85 1948 # template instantiation
cannam@85 1949 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
cannam@85 1950 $RM out/* && rmdir out
cannam@85 1951 cd ..
cannam@85 1952 $RM -r conftest
cannam@85 1953 $RM conftest*
cannam@85 1954 ])
cannam@85 1955 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
cannam@85 1956 [Does compiler simultaneously support -c and -o options?])
cannam@85 1957 ])# _LT_COMPILER_C_O
cannam@85 1958
cannam@85 1959
cannam@85 1960 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
cannam@85 1961 # ----------------------------------
cannam@85 1962 # Check to see if we can do hard links to lock some files if needed
cannam@85 1963 m4_defun([_LT_COMPILER_FILE_LOCKS],
cannam@85 1964 [m4_require([_LT_ENABLE_LOCK])dnl
cannam@85 1965 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@85 1966 _LT_COMPILER_C_O([$1])
cannam@85 1967
cannam@85 1968 hard_links="nottested"
cannam@85 1969 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
cannam@85 1970 # do not overwrite the value of need_locks provided by the user
cannam@85 1971 AC_MSG_CHECKING([if we can lock with hard links])
cannam@85 1972 hard_links=yes
cannam@85 1973 $RM conftest*
cannam@85 1974 ln conftest.a conftest.b 2>/dev/null && hard_links=no
cannam@85 1975 touch conftest.a
cannam@85 1976 ln conftest.a conftest.b 2>&5 || hard_links=no
cannam@85 1977 ln conftest.a conftest.b 2>/dev/null && hard_links=no
cannam@85 1978 AC_MSG_RESULT([$hard_links])
cannam@85 1979 if test "$hard_links" = no; then
cannam@85 1980 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
cannam@85 1981 need_locks=warn
cannam@85 1982 fi
cannam@85 1983 else
cannam@85 1984 need_locks=no
cannam@85 1985 fi
cannam@85 1986 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
cannam@85 1987 ])# _LT_COMPILER_FILE_LOCKS
cannam@85 1988
cannam@85 1989
cannam@85 1990 # _LT_CHECK_OBJDIR
cannam@85 1991 # ----------------
cannam@85 1992 m4_defun([_LT_CHECK_OBJDIR],
cannam@85 1993 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
cannam@85 1994 [rm -f .libs 2>/dev/null
cannam@85 1995 mkdir .libs 2>/dev/null
cannam@85 1996 if test -d .libs; then
cannam@85 1997 lt_cv_objdir=.libs
cannam@85 1998 else
cannam@85 1999 # MS-DOS does not allow filenames that begin with a dot.
cannam@85 2000 lt_cv_objdir=_libs
cannam@85 2001 fi
cannam@85 2002 rmdir .libs 2>/dev/null])
cannam@85 2003 objdir=$lt_cv_objdir
cannam@85 2004 _LT_DECL([], [objdir], [0],
cannam@85 2005 [The name of the directory that contains temporary libtool files])dnl
cannam@85 2006 m4_pattern_allow([LT_OBJDIR])dnl
cannam@85 2007 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
cannam@85 2008 [Define to the sub-directory in which libtool stores uninstalled libraries.])
cannam@85 2009 ])# _LT_CHECK_OBJDIR
cannam@85 2010
cannam@85 2011
cannam@85 2012 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
cannam@85 2013 # --------------------------------------
cannam@85 2014 # Check hardcoding attributes.
cannam@85 2015 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
cannam@85 2016 [AC_MSG_CHECKING([how to hardcode library paths into programs])
cannam@85 2017 _LT_TAGVAR(hardcode_action, $1)=
cannam@85 2018 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
cannam@85 2019 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
cannam@85 2020 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
cannam@85 2021
cannam@85 2022 # We can hardcode non-existent directories.
cannam@85 2023 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
cannam@85 2024 # If the only mechanism to avoid hardcoding is shlibpath_var, we
cannam@85 2025 # have to relink, otherwise we might link with an installed library
cannam@85 2026 # when we should be linking with a yet-to-be-installed one
cannam@85 2027 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
cannam@85 2028 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
cannam@85 2029 # Linking always hardcodes the temporary library directory.
cannam@85 2030 _LT_TAGVAR(hardcode_action, $1)=relink
cannam@85 2031 else
cannam@85 2032 # We can link without hardcoding, and we can hardcode nonexisting dirs.
cannam@85 2033 _LT_TAGVAR(hardcode_action, $1)=immediate
cannam@85 2034 fi
cannam@85 2035 else
cannam@85 2036 # We cannot hardcode anything, or else we can only hardcode existing
cannam@85 2037 # directories.
cannam@85 2038 _LT_TAGVAR(hardcode_action, $1)=unsupported
cannam@85 2039 fi
cannam@85 2040 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
cannam@85 2041
cannam@85 2042 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
cannam@85 2043 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
cannam@85 2044 # Fast installation is not supported
cannam@85 2045 enable_fast_install=no
cannam@85 2046 elif test "$shlibpath_overrides_runpath" = yes ||
cannam@85 2047 test "$enable_shared" = no; then
cannam@85 2048 # Fast installation is not necessary
cannam@85 2049 enable_fast_install=needless
cannam@85 2050 fi
cannam@85 2051 _LT_TAGDECL([], [hardcode_action], [0],
cannam@85 2052 [How to hardcode a shared library path into an executable])
cannam@85 2053 ])# _LT_LINKER_HARDCODE_LIBPATH
cannam@85 2054
cannam@85 2055
cannam@85 2056 # _LT_CMD_STRIPLIB
cannam@85 2057 # ----------------
cannam@85 2058 m4_defun([_LT_CMD_STRIPLIB],
cannam@85 2059 [m4_require([_LT_DECL_EGREP])
cannam@85 2060 striplib=
cannam@85 2061 old_striplib=
cannam@85 2062 AC_MSG_CHECKING([whether stripping libraries is possible])
cannam@85 2063 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
cannam@85 2064 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
cannam@85 2065 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
cannam@85 2066 AC_MSG_RESULT([yes])
cannam@85 2067 else
cannam@85 2068 # FIXME - insert some real tests, host_os isn't really good enough
cannam@85 2069 case $host_os in
cannam@85 2070 darwin*)
cannam@85 2071 if test -n "$STRIP" ; then
cannam@85 2072 striplib="$STRIP -x"
cannam@85 2073 old_striplib="$STRIP -S"
cannam@85 2074 AC_MSG_RESULT([yes])
cannam@85 2075 else
cannam@85 2076 AC_MSG_RESULT([no])
cannam@85 2077 fi
cannam@85 2078 ;;
cannam@85 2079 *)
cannam@85 2080 AC_MSG_RESULT([no])
cannam@85 2081 ;;
cannam@85 2082 esac
cannam@85 2083 fi
cannam@85 2084 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
cannam@85 2085 _LT_DECL([], [striplib], [1])
cannam@85 2086 ])# _LT_CMD_STRIPLIB
cannam@85 2087
cannam@85 2088
cannam@85 2089 # _LT_SYS_DYNAMIC_LINKER([TAG])
cannam@85 2090 # -----------------------------
cannam@85 2091 # PORTME Fill in your ld.so characteristics
cannam@85 2092 m4_defun([_LT_SYS_DYNAMIC_LINKER],
cannam@85 2093 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
cannam@85 2094 m4_require([_LT_DECL_EGREP])dnl
cannam@85 2095 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@85 2096 m4_require([_LT_DECL_OBJDUMP])dnl
cannam@85 2097 m4_require([_LT_DECL_SED])dnl
cannam@85 2098 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
cannam@85 2099 AC_MSG_CHECKING([dynamic linker characteristics])
cannam@85 2100 m4_if([$1],
cannam@85 2101 [], [
cannam@85 2102 if test "$GCC" = yes; then
cannam@85 2103 case $host_os in
cannam@85 2104 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
cannam@85 2105 *) lt_awk_arg="/^libraries:/" ;;
cannam@85 2106 esac
cannam@85 2107 case $host_os in
cannam@85 2108 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
cannam@85 2109 *) lt_sed_strip_eq="s,=/,/,g" ;;
cannam@85 2110 esac
cannam@85 2111 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
cannam@85 2112 case $lt_search_path_spec in
cannam@85 2113 *\;*)
cannam@85 2114 # if the path contains ";" then we assume it to be the separator
cannam@85 2115 # otherwise default to the standard path separator (i.e. ":") - it is
cannam@85 2116 # assumed that no part of a normal pathname contains ";" but that should
cannam@85 2117 # okay in the real world where ";" in dirpaths is itself problematic.
cannam@85 2118 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
cannam@85 2119 ;;
cannam@85 2120 *)
cannam@85 2121 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
cannam@85 2122 ;;
cannam@85 2123 esac
cannam@85 2124 # Ok, now we have the path, separated by spaces, we can step through it
cannam@85 2125 # and add multilib dir if necessary.
cannam@85 2126 lt_tmp_lt_search_path_spec=
cannam@85 2127 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
cannam@85 2128 for lt_sys_path in $lt_search_path_spec; do
cannam@85 2129 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
cannam@85 2130 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
cannam@85 2131 else
cannam@85 2132 test -d "$lt_sys_path" && \
cannam@85 2133 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
cannam@85 2134 fi
cannam@85 2135 done
cannam@85 2136 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
cannam@85 2137 BEGIN {RS=" "; FS="/|\n";} {
cannam@85 2138 lt_foo="";
cannam@85 2139 lt_count=0;
cannam@85 2140 for (lt_i = NF; lt_i > 0; lt_i--) {
cannam@85 2141 if ($lt_i != "" && $lt_i != ".") {
cannam@85 2142 if ($lt_i == "..") {
cannam@85 2143 lt_count++;
cannam@85 2144 } else {
cannam@85 2145 if (lt_count == 0) {
cannam@85 2146 lt_foo="/" $lt_i lt_foo;
cannam@85 2147 } else {
cannam@85 2148 lt_count--;
cannam@85 2149 }
cannam@85 2150 }
cannam@85 2151 }
cannam@85 2152 }
cannam@85 2153 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
cannam@85 2154 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
cannam@85 2155 }'`
cannam@85 2156 # AWK program above erroneously prepends '/' to C:/dos/paths
cannam@85 2157 # for these hosts.
cannam@85 2158 case $host_os in
cannam@85 2159 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
cannam@85 2160 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
cannam@85 2161 esac
cannam@85 2162 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
cannam@85 2163 else
cannam@85 2164 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
cannam@85 2165 fi])
cannam@85 2166 library_names_spec=
cannam@85 2167 libname_spec='lib$name'
cannam@85 2168 soname_spec=
cannam@85 2169 shrext_cmds=".so"
cannam@85 2170 postinstall_cmds=
cannam@85 2171 postuninstall_cmds=
cannam@85 2172 finish_cmds=
cannam@85 2173 finish_eval=
cannam@85 2174 shlibpath_var=
cannam@85 2175 shlibpath_overrides_runpath=unknown
cannam@85 2176 version_type=none
cannam@85 2177 dynamic_linker="$host_os ld.so"
cannam@85 2178 sys_lib_dlsearch_path_spec="/lib /usr/lib"
cannam@85 2179 need_lib_prefix=unknown
cannam@85 2180 hardcode_into_libs=no
cannam@85 2181
cannam@85 2182 # when you set need_version to no, make sure it does not cause -set_version
cannam@85 2183 # flags to be left without arguments
cannam@85 2184 need_version=unknown
cannam@85 2185
cannam@85 2186 case $host_os in
cannam@85 2187 aix3*)
cannam@85 2188 version_type=linux
cannam@85 2189 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
cannam@85 2190 shlibpath_var=LIBPATH
cannam@85 2191
cannam@85 2192 # AIX 3 has no versioning support, so we append a major version to the name.
cannam@85 2193 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 2194 ;;
cannam@85 2195
cannam@85 2196 aix[[4-9]]*)
cannam@85 2197 version_type=linux
cannam@85 2198 need_lib_prefix=no
cannam@85 2199 need_version=no
cannam@85 2200 hardcode_into_libs=yes
cannam@85 2201 if test "$host_cpu" = ia64; then
cannam@85 2202 # AIX 5 supports IA64
cannam@85 2203 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
cannam@85 2204 shlibpath_var=LD_LIBRARY_PATH
cannam@85 2205 else
cannam@85 2206 # With GCC up to 2.95.x, collect2 would create an import file
cannam@85 2207 # for dependence libraries. The import file would start with
cannam@85 2208 # the line `#! .'. This would cause the generated library to
cannam@85 2209 # depend on `.', always an invalid library. This was fixed in
cannam@85 2210 # development snapshots of GCC prior to 3.0.
cannam@85 2211 case $host_os in
cannam@85 2212 aix4 | aix4.[[01]] | aix4.[[01]].*)
cannam@85 2213 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
cannam@85 2214 echo ' yes '
cannam@85 2215 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
cannam@85 2216 :
cannam@85 2217 else
cannam@85 2218 can_build_shared=no
cannam@85 2219 fi
cannam@85 2220 ;;
cannam@85 2221 esac
cannam@85 2222 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
cannam@85 2223 # soname into executable. Probably we can add versioning support to
cannam@85 2224 # collect2, so additional links can be useful in future.
cannam@85 2225 if test "$aix_use_runtimelinking" = yes; then
cannam@85 2226 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
cannam@85 2227 # instead of lib<name>.a to let people know that these are not
cannam@85 2228 # typical AIX shared libraries.
cannam@85 2229 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
cannam@85 2230 else
cannam@85 2231 # We preserve .a as extension for shared libraries through AIX4.2
cannam@85 2232 # and later when we are not doing run time linking.
cannam@85 2233 library_names_spec='${libname}${release}.a $libname.a'
cannam@85 2234 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 2235 fi
cannam@85 2236 shlibpath_var=LIBPATH
cannam@85 2237 fi
cannam@85 2238 ;;
cannam@85 2239
cannam@85 2240 amigaos*)
cannam@85 2241 case $host_cpu in
cannam@85 2242 powerpc)
cannam@85 2243 # Since July 2007 AmigaOS4 officially supports .so libraries.
cannam@85 2244 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
cannam@85 2245 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
cannam@85 2246 ;;
cannam@85 2247 m68k)
cannam@85 2248 library_names_spec='$libname.ixlibrary $libname.a'
cannam@85 2249 # Create ${libname}_ixlibrary.a entries in /sys/libs.
cannam@85 2250 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $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@85 2251 ;;
cannam@85 2252 esac
cannam@85 2253 ;;
cannam@85 2254
cannam@85 2255 beos*)
cannam@85 2256 library_names_spec='${libname}${shared_ext}'
cannam@85 2257 dynamic_linker="$host_os ld.so"
cannam@85 2258 shlibpath_var=LIBRARY_PATH
cannam@85 2259 ;;
cannam@85 2260
cannam@85 2261 bsdi[[45]]*)
cannam@85 2262 version_type=linux
cannam@85 2263 need_version=no
cannam@85 2264 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
cannam@85 2265 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 2266 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
cannam@85 2267 shlibpath_var=LD_LIBRARY_PATH
cannam@85 2268 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
cannam@85 2269 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
cannam@85 2270 # the default ld.so.conf also contains /usr/contrib/lib and
cannam@85 2271 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
cannam@85 2272 # libtool to hard-code these into programs
cannam@85 2273 ;;
cannam@85 2274
cannam@85 2275 cygwin* | mingw* | pw32* | cegcc*)
cannam@85 2276 version_type=windows
cannam@85 2277 shrext_cmds=".dll"
cannam@85 2278 need_version=no
cannam@85 2279 need_lib_prefix=no
cannam@85 2280
cannam@85 2281 case $GCC,$cc_basename in
cannam@85 2282 yes,*)
cannam@85 2283 # gcc
cannam@85 2284 library_names_spec='$libname.dll.a'
cannam@85 2285 # DLL is installed to $(libdir)/../bin by postinstall_cmds
cannam@85 2286 postinstall_cmds='base_file=`basename \${file}`~
cannam@85 2287 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
cannam@85 2288 dldir=$destdir/`dirname \$dlpath`~
cannam@85 2289 test -d \$dldir || mkdir -p \$dldir~
cannam@85 2290 $install_prog $dir/$dlname \$dldir/$dlname~
cannam@85 2291 chmod a+x \$dldir/$dlname~
cannam@85 2292 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
cannam@85 2293 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
cannam@85 2294 fi'
cannam@85 2295 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
cannam@85 2296 dlpath=$dir/\$dldll~
cannam@85 2297 $RM \$dlpath'
cannam@85 2298 shlibpath_overrides_runpath=yes
cannam@85 2299
cannam@85 2300 case $host_os in
cannam@85 2301 cygwin*)
cannam@85 2302 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
cannam@85 2303 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
cannam@85 2304 m4_if([$1], [],[
cannam@85 2305 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
cannam@85 2306 ;;
cannam@85 2307 mingw* | cegcc*)
cannam@85 2308 # MinGW DLLs use traditional 'lib' prefix
cannam@85 2309 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
cannam@85 2310 ;;
cannam@85 2311 pw32*)
cannam@85 2312 # pw32 DLLs use 'pw' prefix rather than 'lib'
cannam@85 2313 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
cannam@85 2314 ;;
cannam@85 2315 esac
cannam@85 2316 dynamic_linker='Win32 ld.exe'
cannam@85 2317 ;;
cannam@85 2318
cannam@85 2319 *,cl*)
cannam@85 2320 # Native MSVC
cannam@85 2321 libname_spec='$name'
cannam@85 2322 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
cannam@85 2323 library_names_spec='${libname}.dll.lib'
cannam@85 2324
cannam@85 2325 case $build_os in
cannam@85 2326 mingw*)
cannam@85 2327 sys_lib_search_path_spec=
cannam@85 2328 lt_save_ifs=$IFS
cannam@85 2329 IFS=';'
cannam@85 2330 for lt_path in $LIB
cannam@85 2331 do
cannam@85 2332 IFS=$lt_save_ifs
cannam@85 2333 # Let DOS variable expansion print the short 8.3 style file name.
cannam@85 2334 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
cannam@85 2335 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
cannam@85 2336 done
cannam@85 2337 IFS=$lt_save_ifs
cannam@85 2338 # Convert to MSYS style.
cannam@85 2339 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@85 2340 ;;
cannam@85 2341 cygwin*)
cannam@85 2342 # Convert to unix form, then to dos form, then back to unix form
cannam@85 2343 # but this time dos style (no spaces!) so that the unix form looks
cannam@85 2344 # like /cygdrive/c/PROGRA~1:/cygdr...
cannam@85 2345 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
cannam@85 2346 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
cannam@85 2347 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
cannam@85 2348 ;;
cannam@85 2349 *)
cannam@85 2350 sys_lib_search_path_spec="$LIB"
cannam@85 2351 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
cannam@85 2352 # It is most probably a Windows format PATH.
cannam@85 2353 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
cannam@85 2354 else
cannam@85 2355 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
cannam@85 2356 fi
cannam@85 2357 # FIXME: find the short name or the path components, as spaces are
cannam@85 2358 # common. (e.g. "Program Files" -> "PROGRA~1")
cannam@85 2359 ;;
cannam@85 2360 esac
cannam@85 2361
cannam@85 2362 # DLL is installed to $(libdir)/../bin by postinstall_cmds
cannam@85 2363 postinstall_cmds='base_file=`basename \${file}`~
cannam@85 2364 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
cannam@85 2365 dldir=$destdir/`dirname \$dlpath`~
cannam@85 2366 test -d \$dldir || mkdir -p \$dldir~
cannam@85 2367 $install_prog $dir/$dlname \$dldir/$dlname'
cannam@85 2368 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
cannam@85 2369 dlpath=$dir/\$dldll~
cannam@85 2370 $RM \$dlpath'
cannam@85 2371 shlibpath_overrides_runpath=yes
cannam@85 2372 dynamic_linker='Win32 link.exe'
cannam@85 2373 ;;
cannam@85 2374
cannam@85 2375 *)
cannam@85 2376 # Assume MSVC wrapper
cannam@85 2377 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
cannam@85 2378 dynamic_linker='Win32 ld.exe'
cannam@85 2379 ;;
cannam@85 2380 esac
cannam@85 2381 # FIXME: first we should search . and the directory the executable is in
cannam@85 2382 shlibpath_var=PATH
cannam@85 2383 ;;
cannam@85 2384
cannam@85 2385 darwin* | rhapsody*)
cannam@85 2386 dynamic_linker="$host_os dyld"
cannam@85 2387 version_type=darwin
cannam@85 2388 need_lib_prefix=no
cannam@85 2389 need_version=no
cannam@85 2390 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
cannam@85 2391 soname_spec='${libname}${release}${major}$shared_ext'
cannam@85 2392 shlibpath_overrides_runpath=yes
cannam@85 2393 shlibpath_var=DYLD_LIBRARY_PATH
cannam@85 2394 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
cannam@85 2395 m4_if([$1], [],[
cannam@85 2396 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
cannam@85 2397 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
cannam@85 2398 ;;
cannam@85 2399
cannam@85 2400 dgux*)
cannam@85 2401 version_type=linux
cannam@85 2402 need_lib_prefix=no
cannam@85 2403 need_version=no
cannam@85 2404 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
cannam@85 2405 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 2406 shlibpath_var=LD_LIBRARY_PATH
cannam@85 2407 ;;
cannam@85 2408
cannam@85 2409 freebsd1*)
cannam@85 2410 dynamic_linker=no
cannam@85 2411 ;;
cannam@85 2412
cannam@85 2413 freebsd* | dragonfly*)
cannam@85 2414 # DragonFly does not have aout. When/if they implement a new
cannam@85 2415 # versioning mechanism, adjust this.
cannam@85 2416 if test -x /usr/bin/objformat; then
cannam@85 2417 objformat=`/usr/bin/objformat`
cannam@85 2418 else
cannam@85 2419 case $host_os in
cannam@85 2420 freebsd[[123]]*) objformat=aout ;;
cannam@85 2421 *) objformat=elf ;;
cannam@85 2422 esac
cannam@85 2423 fi
cannam@85 2424 version_type=freebsd-$objformat
cannam@85 2425 case $version_type in
cannam@85 2426 freebsd-elf*)
cannam@85 2427 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
cannam@85 2428 need_version=no
cannam@85 2429 need_lib_prefix=no
cannam@85 2430 ;;
cannam@85 2431 freebsd-*)
cannam@85 2432 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
cannam@85 2433 need_version=yes
cannam@85 2434 ;;
cannam@85 2435 esac
cannam@85 2436 shlibpath_var=LD_LIBRARY_PATH
cannam@85 2437 case $host_os in
cannam@85 2438 freebsd2*)
cannam@85 2439 shlibpath_overrides_runpath=yes
cannam@85 2440 ;;
cannam@85 2441 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
cannam@85 2442 shlibpath_overrides_runpath=yes
cannam@85 2443 hardcode_into_libs=yes
cannam@85 2444 ;;
cannam@85 2445 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
cannam@85 2446 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
cannam@85 2447 shlibpath_overrides_runpath=no
cannam@85 2448 hardcode_into_libs=yes
cannam@85 2449 ;;
cannam@85 2450 *) # from 4.6 on, and DragonFly
cannam@85 2451 shlibpath_overrides_runpath=yes
cannam@85 2452 hardcode_into_libs=yes
cannam@85 2453 ;;
cannam@85 2454 esac
cannam@85 2455 ;;
cannam@85 2456
cannam@85 2457 gnu*)
cannam@85 2458 version_type=linux
cannam@85 2459 need_lib_prefix=no
cannam@85 2460 need_version=no
cannam@85 2461 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
cannam@85 2462 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 2463 shlibpath_var=LD_LIBRARY_PATH
cannam@85 2464 shlibpath_overrides_runpath=no
cannam@85 2465 hardcode_into_libs=yes
cannam@85 2466 ;;
cannam@85 2467
cannam@85 2468 haiku*)
cannam@85 2469 version_type=linux
cannam@85 2470 need_lib_prefix=no
cannam@85 2471 need_version=no
cannam@85 2472 dynamic_linker="$host_os runtime_loader"
cannam@85 2473 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
cannam@85 2474 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 2475 shlibpath_var=LIBRARY_PATH
cannam@85 2476 shlibpath_overrides_runpath=yes
cannam@85 2477 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
cannam@85 2478 hardcode_into_libs=yes
cannam@85 2479 ;;
cannam@85 2480
cannam@85 2481 hpux9* | hpux10* | hpux11*)
cannam@85 2482 # Give a soname corresponding to the major version so that dld.sl refuses to
cannam@85 2483 # link against other versions.
cannam@85 2484 version_type=sunos
cannam@85 2485 need_lib_prefix=no
cannam@85 2486 need_version=no
cannam@85 2487 case $host_cpu in
cannam@85 2488 ia64*)
cannam@85 2489 shrext_cmds='.so'
cannam@85 2490 hardcode_into_libs=yes
cannam@85 2491 dynamic_linker="$host_os dld.so"
cannam@85 2492 shlibpath_var=LD_LIBRARY_PATH
cannam@85 2493 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
cannam@85 2494 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
cannam@85 2495 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 2496 if test "X$HPUX_IA64_MODE" = X32; then
cannam@85 2497 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
cannam@85 2498 else
cannam@85 2499 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
cannam@85 2500 fi
cannam@85 2501 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
cannam@85 2502 ;;
cannam@85 2503 hppa*64*)
cannam@85 2504 shrext_cmds='.sl'
cannam@85 2505 hardcode_into_libs=yes
cannam@85 2506 dynamic_linker="$host_os dld.sl"
cannam@85 2507 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
cannam@85 2508 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
cannam@85 2509 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
cannam@85 2510 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 2511 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
cannam@85 2512 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
cannam@85 2513 ;;
cannam@85 2514 *)
cannam@85 2515 shrext_cmds='.sl'
cannam@85 2516 dynamic_linker="$host_os dld.sl"
cannam@85 2517 shlibpath_var=SHLIB_PATH
cannam@85 2518 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
cannam@85 2519 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
cannam@85 2520 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 2521 ;;
cannam@85 2522 esac
cannam@85 2523 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
cannam@85 2524 postinstall_cmds='chmod 555 $lib'
cannam@85 2525 # or fails outright, so override atomically:
cannam@85 2526 install_override_mode=555
cannam@85 2527 ;;
cannam@85 2528
cannam@85 2529 interix[[3-9]]*)
cannam@85 2530 version_type=linux
cannam@85 2531 need_lib_prefix=no
cannam@85 2532 need_version=no
cannam@85 2533 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
cannam@85 2534 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 2535 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
cannam@85 2536 shlibpath_var=LD_LIBRARY_PATH
cannam@85 2537 shlibpath_overrides_runpath=no
cannam@85 2538 hardcode_into_libs=yes
cannam@85 2539 ;;
cannam@85 2540
cannam@85 2541 irix5* | irix6* | nonstopux*)
cannam@85 2542 case $host_os in
cannam@85 2543 nonstopux*) version_type=nonstopux ;;
cannam@85 2544 *)
cannam@85 2545 if test "$lt_cv_prog_gnu_ld" = yes; then
cannam@85 2546 version_type=linux
cannam@85 2547 else
cannam@85 2548 version_type=irix
cannam@85 2549 fi ;;
cannam@85 2550 esac
cannam@85 2551 need_lib_prefix=no
cannam@85 2552 need_version=no
cannam@85 2553 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 2554 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
cannam@85 2555 case $host_os in
cannam@85 2556 irix5* | nonstopux*)
cannam@85 2557 libsuff= shlibsuff=
cannam@85 2558 ;;
cannam@85 2559 *)
cannam@85 2560 case $LD in # libtool.m4 will add one of these switches to LD
cannam@85 2561 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
cannam@85 2562 libsuff= shlibsuff= libmagic=32-bit;;
cannam@85 2563 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
cannam@85 2564 libsuff=32 shlibsuff=N32 libmagic=N32;;
cannam@85 2565 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
cannam@85 2566 libsuff=64 shlibsuff=64 libmagic=64-bit;;
cannam@85 2567 *) libsuff= shlibsuff= libmagic=never-match;;
cannam@85 2568 esac
cannam@85 2569 ;;
cannam@85 2570 esac
cannam@85 2571 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
cannam@85 2572 shlibpath_overrides_runpath=no
cannam@85 2573 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
cannam@85 2574 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
cannam@85 2575 hardcode_into_libs=yes
cannam@85 2576 ;;
cannam@85 2577
cannam@85 2578 # No shared lib support for Linux oldld, aout, or coff.
cannam@85 2579 linux*oldld* | linux*aout* | linux*coff*)
cannam@85 2580 dynamic_linker=no
cannam@85 2581 ;;
cannam@85 2582
cannam@85 2583 # This must be Linux ELF.
cannam@85 2584 linux* | k*bsd*-gnu | kopensolaris*-gnu)
cannam@85 2585 version_type=linux
cannam@85 2586 need_lib_prefix=no
cannam@85 2587 need_version=no
cannam@85 2588 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
cannam@85 2589 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 2590 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
cannam@85 2591 shlibpath_var=LD_LIBRARY_PATH
cannam@85 2592 shlibpath_overrides_runpath=no
cannam@85 2593
cannam@85 2594 # Some binutils ld are patched to set DT_RUNPATH
cannam@85 2595 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
cannam@85 2596 [lt_cv_shlibpath_overrides_runpath=no
cannam@85 2597 save_LDFLAGS=$LDFLAGS
cannam@85 2598 save_libdir=$libdir
cannam@85 2599 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
cannam@85 2600 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
cannam@85 2601 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
cannam@85 2602 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
cannam@85 2603 [lt_cv_shlibpath_overrides_runpath=yes])])
cannam@85 2604 LDFLAGS=$save_LDFLAGS
cannam@85 2605 libdir=$save_libdir
cannam@85 2606 ])
cannam@85 2607 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
cannam@85 2608
cannam@85 2609 # This implies no fast_install, which is unacceptable.
cannam@85 2610 # Some rework will be needed to allow for fast_install
cannam@85 2611 # before this can be enabled.
cannam@85 2612 hardcode_into_libs=yes
cannam@85 2613
cannam@85 2614 # Append ld.so.conf contents to the search path
cannam@85 2615 if test -f /etc/ld.so.conf; then
cannam@85 2616 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@85 2617 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
cannam@85 2618 fi
cannam@85 2619
cannam@85 2620 # We used to test for /lib/ld.so.1 and disable shared libraries on
cannam@85 2621 # powerpc, because MkLinux only supported shared libraries with the
cannam@85 2622 # GNU dynamic linker. Since this was broken with cross compilers,
cannam@85 2623 # most powerpc-linux boxes support dynamic linking these days and
cannam@85 2624 # people can always --disable-shared, the test was removed, and we
cannam@85 2625 # assume the GNU/Linux dynamic linker is in use.
cannam@85 2626 dynamic_linker='GNU/Linux ld.so'
cannam@85 2627 ;;
cannam@85 2628
cannam@85 2629 netbsdelf*-gnu)
cannam@85 2630 version_type=linux
cannam@85 2631 need_lib_prefix=no
cannam@85 2632 need_version=no
cannam@85 2633 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
cannam@85 2634 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 2635 shlibpath_var=LD_LIBRARY_PATH
cannam@85 2636 shlibpath_overrides_runpath=no
cannam@85 2637 hardcode_into_libs=yes
cannam@85 2638 dynamic_linker='NetBSD ld.elf_so'
cannam@85 2639 ;;
cannam@85 2640
cannam@85 2641 netbsd*)
cannam@85 2642 version_type=sunos
cannam@85 2643 need_lib_prefix=no
cannam@85 2644 need_version=no
cannam@85 2645 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
cannam@85 2646 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
cannam@85 2647 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
cannam@85 2648 dynamic_linker='NetBSD (a.out) ld.so'
cannam@85 2649 else
cannam@85 2650 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
cannam@85 2651 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 2652 dynamic_linker='NetBSD ld.elf_so'
cannam@85 2653 fi
cannam@85 2654 shlibpath_var=LD_LIBRARY_PATH
cannam@85 2655 shlibpath_overrides_runpath=yes
cannam@85 2656 hardcode_into_libs=yes
cannam@85 2657 ;;
cannam@85 2658
cannam@85 2659 newsos6)
cannam@85 2660 version_type=linux
cannam@85 2661 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
cannam@85 2662 shlibpath_var=LD_LIBRARY_PATH
cannam@85 2663 shlibpath_overrides_runpath=yes
cannam@85 2664 ;;
cannam@85 2665
cannam@85 2666 *nto* | *qnx*)
cannam@85 2667 version_type=qnx
cannam@85 2668 need_lib_prefix=no
cannam@85 2669 need_version=no
cannam@85 2670 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
cannam@85 2671 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 2672 shlibpath_var=LD_LIBRARY_PATH
cannam@85 2673 shlibpath_overrides_runpath=no
cannam@85 2674 hardcode_into_libs=yes
cannam@85 2675 dynamic_linker='ldqnx.so'
cannam@85 2676 ;;
cannam@85 2677
cannam@85 2678 openbsd*)
cannam@85 2679 version_type=sunos
cannam@85 2680 sys_lib_dlsearch_path_spec="/usr/lib"
cannam@85 2681 need_lib_prefix=no
cannam@85 2682 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
cannam@85 2683 case $host_os in
cannam@85 2684 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
cannam@85 2685 *) need_version=no ;;
cannam@85 2686 esac
cannam@85 2687 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
cannam@85 2688 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
cannam@85 2689 shlibpath_var=LD_LIBRARY_PATH
cannam@85 2690 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
cannam@85 2691 case $host_os in
cannam@85 2692 openbsd2.[[89]] | openbsd2.[[89]].*)
cannam@85 2693 shlibpath_overrides_runpath=no
cannam@85 2694 ;;
cannam@85 2695 *)
cannam@85 2696 shlibpath_overrides_runpath=yes
cannam@85 2697 ;;
cannam@85 2698 esac
cannam@85 2699 else
cannam@85 2700 shlibpath_overrides_runpath=yes
cannam@85 2701 fi
cannam@85 2702 ;;
cannam@85 2703
cannam@85 2704 os2*)
cannam@85 2705 libname_spec='$name'
cannam@85 2706 shrext_cmds=".dll"
cannam@85 2707 need_lib_prefix=no
cannam@85 2708 library_names_spec='$libname${shared_ext} $libname.a'
cannam@85 2709 dynamic_linker='OS/2 ld.exe'
cannam@85 2710 shlibpath_var=LIBPATH
cannam@85 2711 ;;
cannam@85 2712
cannam@85 2713 osf3* | osf4* | osf5*)
cannam@85 2714 version_type=osf
cannam@85 2715 need_lib_prefix=no
cannam@85 2716 need_version=no
cannam@85 2717 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 2718 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
cannam@85 2719 shlibpath_var=LD_LIBRARY_PATH
cannam@85 2720 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
cannam@85 2721 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
cannam@85 2722 ;;
cannam@85 2723
cannam@85 2724 rdos*)
cannam@85 2725 dynamic_linker=no
cannam@85 2726 ;;
cannam@85 2727
cannam@85 2728 solaris*)
cannam@85 2729 version_type=linux
cannam@85 2730 need_lib_prefix=no
cannam@85 2731 need_version=no
cannam@85 2732 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
cannam@85 2733 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 2734 shlibpath_var=LD_LIBRARY_PATH
cannam@85 2735 shlibpath_overrides_runpath=yes
cannam@85 2736 hardcode_into_libs=yes
cannam@85 2737 # ldd complains unless libraries are executable
cannam@85 2738 postinstall_cmds='chmod +x $lib'
cannam@85 2739 ;;
cannam@85 2740
cannam@85 2741 sunos4*)
cannam@85 2742 version_type=sunos
cannam@85 2743 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
cannam@85 2744 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
cannam@85 2745 shlibpath_var=LD_LIBRARY_PATH
cannam@85 2746 shlibpath_overrides_runpath=yes
cannam@85 2747 if test "$with_gnu_ld" = yes; then
cannam@85 2748 need_lib_prefix=no
cannam@85 2749 fi
cannam@85 2750 need_version=yes
cannam@85 2751 ;;
cannam@85 2752
cannam@85 2753 sysv4 | sysv4.3*)
cannam@85 2754 version_type=linux
cannam@85 2755 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
cannam@85 2756 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 2757 shlibpath_var=LD_LIBRARY_PATH
cannam@85 2758 case $host_vendor in
cannam@85 2759 sni)
cannam@85 2760 shlibpath_overrides_runpath=no
cannam@85 2761 need_lib_prefix=no
cannam@85 2762 runpath_var=LD_RUN_PATH
cannam@85 2763 ;;
cannam@85 2764 siemens)
cannam@85 2765 need_lib_prefix=no
cannam@85 2766 ;;
cannam@85 2767 motorola)
cannam@85 2768 need_lib_prefix=no
cannam@85 2769 need_version=no
cannam@85 2770 shlibpath_overrides_runpath=no
cannam@85 2771 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
cannam@85 2772 ;;
cannam@85 2773 esac
cannam@85 2774 ;;
cannam@85 2775
cannam@85 2776 sysv4*MP*)
cannam@85 2777 if test -d /usr/nec ;then
cannam@85 2778 version_type=linux
cannam@85 2779 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
cannam@85 2780 soname_spec='$libname${shared_ext}.$major'
cannam@85 2781 shlibpath_var=LD_LIBRARY_PATH
cannam@85 2782 fi
cannam@85 2783 ;;
cannam@85 2784
cannam@85 2785 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
cannam@85 2786 version_type=freebsd-elf
cannam@85 2787 need_lib_prefix=no
cannam@85 2788 need_version=no
cannam@85 2789 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
cannam@85 2790 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 2791 shlibpath_var=LD_LIBRARY_PATH
cannam@85 2792 shlibpath_overrides_runpath=yes
cannam@85 2793 hardcode_into_libs=yes
cannam@85 2794 if test "$with_gnu_ld" = yes; then
cannam@85 2795 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
cannam@85 2796 else
cannam@85 2797 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
cannam@85 2798 case $host_os in
cannam@85 2799 sco3.2v5*)
cannam@85 2800 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
cannam@85 2801 ;;
cannam@85 2802 esac
cannam@85 2803 fi
cannam@85 2804 sys_lib_dlsearch_path_spec='/usr/lib'
cannam@85 2805 ;;
cannam@85 2806
cannam@85 2807 tpf*)
cannam@85 2808 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
cannam@85 2809 version_type=linux
cannam@85 2810 need_lib_prefix=no
cannam@85 2811 need_version=no
cannam@85 2812 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
cannam@85 2813 shlibpath_var=LD_LIBRARY_PATH
cannam@85 2814 shlibpath_overrides_runpath=no
cannam@85 2815 hardcode_into_libs=yes
cannam@85 2816 ;;
cannam@85 2817
cannam@85 2818 uts4*)
cannam@85 2819 version_type=linux
cannam@85 2820 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
cannam@85 2821 soname_spec='${libname}${release}${shared_ext}$major'
cannam@85 2822 shlibpath_var=LD_LIBRARY_PATH
cannam@85 2823 ;;
cannam@85 2824
cannam@85 2825 *)
cannam@85 2826 dynamic_linker=no
cannam@85 2827 ;;
cannam@85 2828 esac
cannam@85 2829 AC_MSG_RESULT([$dynamic_linker])
cannam@85 2830 test "$dynamic_linker" = no && can_build_shared=no
cannam@85 2831
cannam@85 2832 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
cannam@85 2833 if test "$GCC" = yes; then
cannam@85 2834 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
cannam@85 2835 fi
cannam@85 2836
cannam@85 2837 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
cannam@85 2838 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
cannam@85 2839 fi
cannam@85 2840 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
cannam@85 2841 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
cannam@85 2842 fi
cannam@85 2843
cannam@85 2844 _LT_DECL([], [variables_saved_for_relink], [1],
cannam@85 2845 [Variables whose values should be saved in libtool wrapper scripts and
cannam@85 2846 restored at link time])
cannam@85 2847 _LT_DECL([], [need_lib_prefix], [0],
cannam@85 2848 [Do we need the "lib" prefix for modules?])
cannam@85 2849 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
cannam@85 2850 _LT_DECL([], [version_type], [0], [Library versioning type])
cannam@85 2851 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
cannam@85 2852 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
cannam@85 2853 _LT_DECL([], [shlibpath_overrides_runpath], [0],
cannam@85 2854 [Is shlibpath searched before the hard-coded library search path?])
cannam@85 2855 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
cannam@85 2856 _LT_DECL([], [library_names_spec], [1],
cannam@85 2857 [[List of archive names. First name is the real one, the rest are links.
cannam@85 2858 The last name is the one that the linker finds with -lNAME]])
cannam@85 2859 _LT_DECL([], [soname_spec], [1],
cannam@85 2860 [[The coded name of the library, if different from the real name]])
cannam@85 2861 _LT_DECL([], [install_override_mode], [1],
cannam@85 2862 [Permission mode override for installation of shared libraries])
cannam@85 2863 _LT_DECL([], [postinstall_cmds], [2],
cannam@85 2864 [Command to use after installation of a shared archive])
cannam@85 2865 _LT_DECL([], [postuninstall_cmds], [2],
cannam@85 2866 [Command to use after uninstallation of a shared archive])
cannam@85 2867 _LT_DECL([], [finish_cmds], [2],
cannam@85 2868 [Commands used to finish a libtool library installation in a directory])
cannam@85 2869 _LT_DECL([], [finish_eval], [1],
cannam@85 2870 [[As "finish_cmds", except a single script fragment to be evaled but
cannam@85 2871 not shown]])
cannam@85 2872 _LT_DECL([], [hardcode_into_libs], [0],
cannam@85 2873 [Whether we should hardcode library paths into libraries])
cannam@85 2874 _LT_DECL([], [sys_lib_search_path_spec], [2],
cannam@85 2875 [Compile-time system search path for libraries])
cannam@85 2876 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
cannam@85 2877 [Run-time system search path for libraries])
cannam@85 2878 ])# _LT_SYS_DYNAMIC_LINKER
cannam@85 2879
cannam@85 2880
cannam@85 2881 # _LT_PATH_TOOL_PREFIX(TOOL)
cannam@85 2882 # --------------------------
cannam@85 2883 # find a file program which can recognize shared library
cannam@85 2884 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
cannam@85 2885 [m4_require([_LT_DECL_EGREP])dnl
cannam@85 2886 AC_MSG_CHECKING([for $1])
cannam@85 2887 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
cannam@85 2888 [case $MAGIC_CMD in
cannam@85 2889 [[\\/*] | ?:[\\/]*])
cannam@85 2890 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
cannam@85 2891 ;;
cannam@85 2892 *)
cannam@85 2893 lt_save_MAGIC_CMD="$MAGIC_CMD"
cannam@85 2894 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
cannam@85 2895 dnl $ac_dummy forces splitting on constant user-supplied paths.
cannam@85 2896 dnl POSIX.2 word splitting is done only on the output of word expansions,
cannam@85 2897 dnl not every word. This closes a longstanding sh security hole.
cannam@85 2898 ac_dummy="m4_if([$2], , $PATH, [$2])"
cannam@85 2899 for ac_dir in $ac_dummy; do
cannam@85 2900 IFS="$lt_save_ifs"
cannam@85 2901 test -z "$ac_dir" && ac_dir=.
cannam@85 2902 if test -f $ac_dir/$1; then
cannam@85 2903 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
cannam@85 2904 if test -n "$file_magic_test_file"; then
cannam@85 2905 case $deplibs_check_method in
cannam@85 2906 "file_magic "*)
cannam@85 2907 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
cannam@85 2908 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
cannam@85 2909 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
cannam@85 2910 $EGREP "$file_magic_regex" > /dev/null; then
cannam@85 2911 :
cannam@85 2912 else
cannam@85 2913 cat <<_LT_EOF 1>&2
cannam@85 2914
cannam@85 2915 *** Warning: the command libtool uses to detect shared libraries,
cannam@85 2916 *** $file_magic_cmd, produces output that libtool cannot recognize.
cannam@85 2917 *** The result is that libtool may fail to recognize shared libraries
cannam@85 2918 *** as such. This will affect the creation of libtool libraries that
cannam@85 2919 *** depend on shared libraries, but programs linked with such libtool
cannam@85 2920 *** libraries will work regardless of this problem. Nevertheless, you
cannam@85 2921 *** may want to report the problem to your system manager and/or to
cannam@85 2922 *** bug-libtool@gnu.org
cannam@85 2923
cannam@85 2924 _LT_EOF
cannam@85 2925 fi ;;
cannam@85 2926 esac
cannam@85 2927 fi
cannam@85 2928 break
cannam@85 2929 fi
cannam@85 2930 done
cannam@85 2931 IFS="$lt_save_ifs"
cannam@85 2932 MAGIC_CMD="$lt_save_MAGIC_CMD"
cannam@85 2933 ;;
cannam@85 2934 esac])
cannam@85 2935 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
cannam@85 2936 if test -n "$MAGIC_CMD"; then
cannam@85 2937 AC_MSG_RESULT($MAGIC_CMD)
cannam@85 2938 else
cannam@85 2939 AC_MSG_RESULT(no)
cannam@85 2940 fi
cannam@85 2941 _LT_DECL([], [MAGIC_CMD], [0],
cannam@85 2942 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
cannam@85 2943 ])# _LT_PATH_TOOL_PREFIX
cannam@85 2944
cannam@85 2945 # Old name:
cannam@85 2946 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
cannam@85 2947 dnl aclocal-1.4 backwards compatibility:
cannam@85 2948 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
cannam@85 2949
cannam@85 2950
cannam@85 2951 # _LT_PATH_MAGIC
cannam@85 2952 # --------------
cannam@85 2953 # find a file program which can recognize a shared library
cannam@85 2954 m4_defun([_LT_PATH_MAGIC],
cannam@85 2955 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
cannam@85 2956 if test -z "$lt_cv_path_MAGIC_CMD"; then
cannam@85 2957 if test -n "$ac_tool_prefix"; then
cannam@85 2958 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
cannam@85 2959 else
cannam@85 2960 MAGIC_CMD=:
cannam@85 2961 fi
cannam@85 2962 fi
cannam@85 2963 ])# _LT_PATH_MAGIC
cannam@85 2964
cannam@85 2965
cannam@85 2966 # LT_PATH_LD
cannam@85 2967 # ----------
cannam@85 2968 # find the pathname to the GNU or non-GNU linker
cannam@85 2969 AC_DEFUN([LT_PATH_LD],
cannam@85 2970 [AC_REQUIRE([AC_PROG_CC])dnl
cannam@85 2971 AC_REQUIRE([AC_CANONICAL_HOST])dnl
cannam@85 2972 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
cannam@85 2973 m4_require([_LT_DECL_SED])dnl
cannam@85 2974 m4_require([_LT_DECL_EGREP])dnl
cannam@85 2975 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
cannam@85 2976
cannam@85 2977 AC_ARG_WITH([gnu-ld],
cannam@85 2978 [AS_HELP_STRING([--with-gnu-ld],
cannam@85 2979 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
cannam@85 2980 [test "$withval" = no || with_gnu_ld=yes],
cannam@85 2981 [with_gnu_ld=no])dnl
cannam@85 2982
cannam@85 2983 ac_prog=ld
cannam@85 2984 if test "$GCC" = yes; then
cannam@85 2985 # Check if gcc -print-prog-name=ld gives a path.
cannam@85 2986 AC_MSG_CHECKING([for ld used by $CC])
cannam@85 2987 case $host in
cannam@85 2988 *-*-mingw*)
cannam@85 2989 # gcc leaves a trailing carriage return which upsets mingw
cannam@85 2990 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
cannam@85 2991 *)
cannam@85 2992 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
cannam@85 2993 esac
cannam@85 2994 case $ac_prog in
cannam@85 2995 # Accept absolute paths.
cannam@85 2996 [[\\/]]* | ?:[[\\/]]*)
cannam@85 2997 re_direlt='/[[^/]][[^/]]*/\.\./'
cannam@85 2998 # Canonicalize the pathname of ld
cannam@85 2999 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
cannam@85 3000 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
cannam@85 3001 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
cannam@85 3002 done
cannam@85 3003 test -z "$LD" && LD="$ac_prog"
cannam@85 3004 ;;
cannam@85 3005 "")
cannam@85 3006 # If it fails, then pretend we aren't using GCC.
cannam@85 3007 ac_prog=ld
cannam@85 3008 ;;
cannam@85 3009 *)
cannam@85 3010 # If it is relative, then search for the first ld in PATH.
cannam@85 3011 with_gnu_ld=unknown
cannam@85 3012 ;;
cannam@85 3013 esac
cannam@85 3014 elif test "$with_gnu_ld" = yes; then
cannam@85 3015 AC_MSG_CHECKING([for GNU ld])
cannam@85 3016 else
cannam@85 3017 AC_MSG_CHECKING([for non-GNU ld])
cannam@85 3018 fi
cannam@85 3019 AC_CACHE_VAL(lt_cv_path_LD,
cannam@85 3020 [if test -z "$LD"; then
cannam@85 3021 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
cannam@85 3022 for ac_dir in $PATH; do
cannam@85 3023 IFS="$lt_save_ifs"
cannam@85 3024 test -z "$ac_dir" && ac_dir=.
cannam@85 3025 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
cannam@85 3026 lt_cv_path_LD="$ac_dir/$ac_prog"
cannam@85 3027 # Check to see if the program is GNU ld. I'd rather use --version,
cannam@85 3028 # but apparently some variants of GNU ld only accept -v.
cannam@85 3029 # Break only if it was the GNU/non-GNU ld that we prefer.
cannam@85 3030 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
cannam@85 3031 *GNU* | *'with BFD'*)
cannam@85 3032 test "$with_gnu_ld" != no && break
cannam@85 3033 ;;
cannam@85 3034 *)
cannam@85 3035 test "$with_gnu_ld" != yes && break
cannam@85 3036 ;;
cannam@85 3037 esac
cannam@85 3038 fi
cannam@85 3039 done
cannam@85 3040 IFS="$lt_save_ifs"
cannam@85 3041 else
cannam@85 3042 lt_cv_path_LD="$LD" # Let the user override the test with a path.
cannam@85 3043 fi])
cannam@85 3044 LD="$lt_cv_path_LD"
cannam@85 3045 if test -n "$LD"; then
cannam@85 3046 AC_MSG_RESULT($LD)
cannam@85 3047 else
cannam@85 3048 AC_MSG_RESULT(no)
cannam@85 3049 fi
cannam@85 3050 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
cannam@85 3051 _LT_PATH_LD_GNU
cannam@85 3052 AC_SUBST([LD])
cannam@85 3053
cannam@85 3054 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
cannam@85 3055 ])# LT_PATH_LD
cannam@85 3056
cannam@85 3057 # Old names:
cannam@85 3058 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
cannam@85 3059 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
cannam@85 3060 dnl aclocal-1.4 backwards compatibility:
cannam@85 3061 dnl AC_DEFUN([AM_PROG_LD], [])
cannam@85 3062 dnl AC_DEFUN([AC_PROG_LD], [])
cannam@85 3063
cannam@85 3064
cannam@85 3065 # _LT_PATH_LD_GNU
cannam@85 3066 #- --------------
cannam@85 3067 m4_defun([_LT_PATH_LD_GNU],
cannam@85 3068 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
cannam@85 3069 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
cannam@85 3070 case `$LD -v 2>&1 </dev/null` in
cannam@85 3071 *GNU* | *'with BFD'*)
cannam@85 3072 lt_cv_prog_gnu_ld=yes
cannam@85 3073 ;;
cannam@85 3074 *)
cannam@85 3075 lt_cv_prog_gnu_ld=no
cannam@85 3076 ;;
cannam@85 3077 esac])
cannam@85 3078 with_gnu_ld=$lt_cv_prog_gnu_ld
cannam@85 3079 ])# _LT_PATH_LD_GNU
cannam@85 3080
cannam@85 3081
cannam@85 3082 # _LT_CMD_RELOAD
cannam@85 3083 # --------------
cannam@85 3084 # find reload flag for linker
cannam@85 3085 # -- PORTME Some linkers may need a different reload flag.
cannam@85 3086 m4_defun([_LT_CMD_RELOAD],
cannam@85 3087 [AC_CACHE_CHECK([for $LD option to reload object files],
cannam@85 3088 lt_cv_ld_reload_flag,
cannam@85 3089 [lt_cv_ld_reload_flag='-r'])
cannam@85 3090 reload_flag=$lt_cv_ld_reload_flag
cannam@85 3091 case $reload_flag in
cannam@85 3092 "" | " "*) ;;
cannam@85 3093 *) reload_flag=" $reload_flag" ;;
cannam@85 3094 esac
cannam@85 3095 reload_cmds='$LD$reload_flag -o $output$reload_objs'
cannam@85 3096 case $host_os in
cannam@85 3097 cygwin* | mingw* | pw32* | cegcc*)
cannam@85 3098 if test "$GCC" != yes; then
cannam@85 3099 reload_cmds=false
cannam@85 3100 fi
cannam@85 3101 ;;
cannam@85 3102 darwin*)
cannam@85 3103 if test "$GCC" = yes; then
cannam@85 3104 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
cannam@85 3105 else
cannam@85 3106 reload_cmds='$LD$reload_flag -o $output$reload_objs'
cannam@85 3107 fi
cannam@85 3108 ;;
cannam@85 3109 esac
cannam@85 3110 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
cannam@85 3111 _LT_TAGDECL([], [reload_cmds], [2])dnl
cannam@85 3112 ])# _LT_CMD_RELOAD
cannam@85 3113
cannam@85 3114
cannam@85 3115 # _LT_CHECK_MAGIC_METHOD
cannam@85 3116 # ----------------------
cannam@85 3117 # how to check for library dependencies
cannam@85 3118 # -- PORTME fill in with the dynamic library characteristics
cannam@85 3119 m4_defun([_LT_CHECK_MAGIC_METHOD],
cannam@85 3120 [m4_require([_LT_DECL_EGREP])
cannam@85 3121 m4_require([_LT_DECL_OBJDUMP])
cannam@85 3122 AC_CACHE_CHECK([how to recognize dependent libraries],
cannam@85 3123 lt_cv_deplibs_check_method,
cannam@85 3124 [lt_cv_file_magic_cmd='$MAGIC_CMD'
cannam@85 3125 lt_cv_file_magic_test_file=
cannam@85 3126 lt_cv_deplibs_check_method='unknown'
cannam@85 3127 # Need to set the preceding variable on all platforms that support
cannam@85 3128 # interlibrary dependencies.
cannam@85 3129 # 'none' -- dependencies not supported.
cannam@85 3130 # `unknown' -- same as none, but documents that we really don't know.
cannam@85 3131 # 'pass_all' -- all dependencies passed with no checks.
cannam@85 3132 # 'test_compile' -- check by making test program.
cannam@85 3133 # 'file_magic [[regex]]' -- check by looking for files in library path
cannam@85 3134 # which responds to the $file_magic_cmd with a given extended regex.
cannam@85 3135 # If you have `file' or equivalent on your system and you're not sure
cannam@85 3136 # whether `pass_all' will *always* work, you probably want this one.
cannam@85 3137
cannam@85 3138 case $host_os in
cannam@85 3139 aix[[4-9]]*)
cannam@85 3140 lt_cv_deplibs_check_method=pass_all
cannam@85 3141 ;;
cannam@85 3142
cannam@85 3143 beos*)
cannam@85 3144 lt_cv_deplibs_check_method=pass_all
cannam@85 3145 ;;
cannam@85 3146
cannam@85 3147 bsdi[[45]]*)
cannam@85 3148 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
cannam@85 3149 lt_cv_file_magic_cmd='/usr/bin/file -L'
cannam@85 3150 lt_cv_file_magic_test_file=/shlib/libc.so
cannam@85 3151 ;;
cannam@85 3152
cannam@85 3153 cygwin*)
cannam@85 3154 # func_win32_libid is a shell function defined in ltmain.sh
cannam@85 3155 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
cannam@85 3156 lt_cv_file_magic_cmd='func_win32_libid'
cannam@85 3157 ;;
cannam@85 3158
cannam@85 3159 mingw* | pw32*)
cannam@85 3160 # Base MSYS/MinGW do not provide the 'file' command needed by
cannam@85 3161 # func_win32_libid shell function, so use a weaker test based on 'objdump',
cannam@85 3162 # unless we find 'file', for example because we are cross-compiling.
cannam@85 3163 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
cannam@85 3164 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
cannam@85 3165 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
cannam@85 3166 lt_cv_file_magic_cmd='func_win32_libid'
cannam@85 3167 else
cannam@85 3168 # Keep this pattern in sync with the one in func_win32_libid.
cannam@85 3169 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
cannam@85 3170 lt_cv_file_magic_cmd='$OBJDUMP -f'
cannam@85 3171 fi
cannam@85 3172 ;;
cannam@85 3173
cannam@85 3174 cegcc*)
cannam@85 3175 # use the weaker test based on 'objdump'. See mingw*.
cannam@85 3176 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
cannam@85 3177 lt_cv_file_magic_cmd='$OBJDUMP -f'
cannam@85 3178 ;;
cannam@85 3179
cannam@85 3180 darwin* | rhapsody*)
cannam@85 3181 lt_cv_deplibs_check_method=pass_all
cannam@85 3182 ;;
cannam@85 3183
cannam@85 3184 freebsd* | dragonfly*)
cannam@85 3185 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
cannam@85 3186 case $host_cpu in
cannam@85 3187 i*86 )
cannam@85 3188 # Not sure whether the presence of OpenBSD here was a mistake.
cannam@85 3189 # Let's accept both of them until this is cleared up.
cannam@85 3190 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
cannam@85 3191 lt_cv_file_magic_cmd=/usr/bin/file
cannam@85 3192 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
cannam@85 3193 ;;
cannam@85 3194 esac
cannam@85 3195 else
cannam@85 3196 lt_cv_deplibs_check_method=pass_all
cannam@85 3197 fi
cannam@85 3198 ;;
cannam@85 3199
cannam@85 3200 gnu*)
cannam@85 3201 lt_cv_deplibs_check_method=pass_all
cannam@85 3202 ;;
cannam@85 3203
cannam@85 3204 haiku*)
cannam@85 3205 lt_cv_deplibs_check_method=pass_all
cannam@85 3206 ;;
cannam@85 3207
cannam@85 3208 hpux10.20* | hpux11*)
cannam@85 3209 lt_cv_file_magic_cmd=/usr/bin/file
cannam@85 3210 case $host_cpu in
cannam@85 3211 ia64*)
cannam@85 3212 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
cannam@85 3213 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
cannam@85 3214 ;;
cannam@85 3215 hppa*64*)
cannam@85 3216 [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@85 3217 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
cannam@85 3218 ;;
cannam@85 3219 *)
cannam@85 3220 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
cannam@85 3221 lt_cv_file_magic_test_file=/usr/lib/libc.sl
cannam@85 3222 ;;
cannam@85 3223 esac
cannam@85 3224 ;;
cannam@85 3225
cannam@85 3226 interix[[3-9]]*)
cannam@85 3227 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
cannam@85 3228 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
cannam@85 3229 ;;
cannam@85 3230
cannam@85 3231 irix5* | irix6* | nonstopux*)
cannam@85 3232 case $LD in
cannam@85 3233 *-32|*"-32 ") libmagic=32-bit;;
cannam@85 3234 *-n32|*"-n32 ") libmagic=N32;;
cannam@85 3235 *-64|*"-64 ") libmagic=64-bit;;
cannam@85 3236 *) libmagic=never-match;;
cannam@85 3237 esac
cannam@85 3238 lt_cv_deplibs_check_method=pass_all
cannam@85 3239 ;;
cannam@85 3240
cannam@85 3241 # This must be Linux ELF.
cannam@85 3242 linux* | k*bsd*-gnu | kopensolaris*-gnu)
cannam@85 3243 lt_cv_deplibs_check_method=pass_all
cannam@85 3244 ;;
cannam@85 3245
cannam@85 3246 netbsd* | netbsdelf*-gnu)
cannam@85 3247 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
cannam@85 3248 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
cannam@85 3249 else
cannam@85 3250 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
cannam@85 3251 fi
cannam@85 3252 ;;
cannam@85 3253
cannam@85 3254 newos6*)
cannam@85 3255 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
cannam@85 3256 lt_cv_file_magic_cmd=/usr/bin/file
cannam@85 3257 lt_cv_file_magic_test_file=/usr/lib/libnls.so
cannam@85 3258 ;;
cannam@85 3259
cannam@85 3260 *nto* | *qnx*)
cannam@85 3261 lt_cv_deplibs_check_method=pass_all
cannam@85 3262 ;;
cannam@85 3263
cannam@85 3264 openbsd*)
cannam@85 3265 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
cannam@85 3266 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
cannam@85 3267 else
cannam@85 3268 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
cannam@85 3269 fi
cannam@85 3270 ;;
cannam@85 3271
cannam@85 3272 osf3* | osf4* | osf5*)
cannam@85 3273 lt_cv_deplibs_check_method=pass_all
cannam@85 3274 ;;
cannam@85 3275
cannam@85 3276 rdos*)
cannam@85 3277 lt_cv_deplibs_check_method=pass_all
cannam@85 3278 ;;
cannam@85 3279
cannam@85 3280 solaris*)
cannam@85 3281 lt_cv_deplibs_check_method=pass_all
cannam@85 3282 ;;
cannam@85 3283
cannam@85 3284 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
cannam@85 3285 lt_cv_deplibs_check_method=pass_all
cannam@85 3286 ;;
cannam@85 3287
cannam@85 3288 sysv4 | sysv4.3*)
cannam@85 3289 case $host_vendor in
cannam@85 3290 motorola)
cannam@85 3291 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@85 3292 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
cannam@85 3293 ;;
cannam@85 3294 ncr)
cannam@85 3295 lt_cv_deplibs_check_method=pass_all
cannam@85 3296 ;;
cannam@85 3297 sequent)
cannam@85 3298 lt_cv_file_magic_cmd='/bin/file'
cannam@85 3299 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
cannam@85 3300 ;;
cannam@85 3301 sni)
cannam@85 3302 lt_cv_file_magic_cmd='/bin/file'
cannam@85 3303 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
cannam@85 3304 lt_cv_file_magic_test_file=/lib/libc.so
cannam@85 3305 ;;
cannam@85 3306 siemens)
cannam@85 3307 lt_cv_deplibs_check_method=pass_all
cannam@85 3308 ;;
cannam@85 3309 pc)
cannam@85 3310 lt_cv_deplibs_check_method=pass_all
cannam@85 3311 ;;
cannam@85 3312 esac
cannam@85 3313 ;;
cannam@85 3314
cannam@85 3315 tpf*)
cannam@85 3316 lt_cv_deplibs_check_method=pass_all
cannam@85 3317 ;;
cannam@85 3318 esac
cannam@85 3319 ])
cannam@85 3320
cannam@85 3321 file_magic_glob=
cannam@85 3322 want_nocaseglob=no
cannam@85 3323 if test "$build" = "$host"; then
cannam@85 3324 case $host_os in
cannam@85 3325 mingw* | pw32*)
cannam@85 3326 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
cannam@85 3327 want_nocaseglob=yes
cannam@85 3328 else
cannam@85 3329 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
cannam@85 3330 fi
cannam@85 3331 ;;
cannam@85 3332 esac
cannam@85 3333 fi
cannam@85 3334
cannam@85 3335 file_magic_cmd=$lt_cv_file_magic_cmd
cannam@85 3336 deplibs_check_method=$lt_cv_deplibs_check_method
cannam@85 3337 test -z "$deplibs_check_method" && deplibs_check_method=unknown
cannam@85 3338
cannam@85 3339 _LT_DECL([], [deplibs_check_method], [1],
cannam@85 3340 [Method to check whether dependent libraries are shared objects])
cannam@85 3341 _LT_DECL([], [file_magic_cmd], [1],
cannam@85 3342 [Command to use when deplibs_check_method = "file_magic"])
cannam@85 3343 _LT_DECL([], [file_magic_glob], [1],
cannam@85 3344 [How to find potential files when deplibs_check_method = "file_magic"])
cannam@85 3345 _LT_DECL([], [want_nocaseglob], [1],
cannam@85 3346 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
cannam@85 3347 ])# _LT_CHECK_MAGIC_METHOD
cannam@85 3348
cannam@85 3349
cannam@85 3350 # LT_PATH_NM
cannam@85 3351 # ----------
cannam@85 3352 # find the pathname to a BSD- or MS-compatible name lister
cannam@85 3353 AC_DEFUN([LT_PATH_NM],
cannam@85 3354 [AC_REQUIRE([AC_PROG_CC])dnl
cannam@85 3355 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
cannam@85 3356 [if test -n "$NM"; then
cannam@85 3357 # Let the user override the test.
cannam@85 3358 lt_cv_path_NM="$NM"
cannam@85 3359 else
cannam@85 3360 lt_nm_to_check="${ac_tool_prefix}nm"
cannam@85 3361 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
cannam@85 3362 lt_nm_to_check="$lt_nm_to_check nm"
cannam@85 3363 fi
cannam@85 3364 for lt_tmp_nm in $lt_nm_to_check; do
cannam@85 3365 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
cannam@85 3366 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
cannam@85 3367 IFS="$lt_save_ifs"
cannam@85 3368 test -z "$ac_dir" && ac_dir=.
cannam@85 3369 tmp_nm="$ac_dir/$lt_tmp_nm"
cannam@85 3370 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
cannam@85 3371 # Check to see if the nm accepts a BSD-compat flag.
cannam@85 3372 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
cannam@85 3373 # nm: unknown option "B" ignored
cannam@85 3374 # Tru64's nm complains that /dev/null is an invalid object file
cannam@85 3375 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
cannam@85 3376 */dev/null* | *'Invalid file or object type'*)
cannam@85 3377 lt_cv_path_NM="$tmp_nm -B"
cannam@85 3378 break
cannam@85 3379 ;;
cannam@85 3380 *)
cannam@85 3381 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
cannam@85 3382 */dev/null*)
cannam@85 3383 lt_cv_path_NM="$tmp_nm -p"
cannam@85 3384 break
cannam@85 3385 ;;
cannam@85 3386 *)
cannam@85 3387 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
cannam@85 3388 continue # so that we can try to find one that supports BSD flags
cannam@85 3389 ;;
cannam@85 3390 esac
cannam@85 3391 ;;
cannam@85 3392 esac
cannam@85 3393 fi
cannam@85 3394 done
cannam@85 3395 IFS="$lt_save_ifs"
cannam@85 3396 done
cannam@85 3397 : ${lt_cv_path_NM=no}
cannam@85 3398 fi])
cannam@85 3399 if test "$lt_cv_path_NM" != "no"; then
cannam@85 3400 NM="$lt_cv_path_NM"
cannam@85 3401 else
cannam@85 3402 # Didn't find any BSD compatible name lister, look for dumpbin.
cannam@85 3403 if test -n "$DUMPBIN"; then :
cannam@85 3404 # Let the user override the test.
cannam@85 3405 else
cannam@85 3406 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
cannam@85 3407 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
cannam@85 3408 *COFF*)
cannam@85 3409 DUMPBIN="$DUMPBIN -symbols"
cannam@85 3410 ;;
cannam@85 3411 *)
cannam@85 3412 DUMPBIN=:
cannam@85 3413 ;;
cannam@85 3414 esac
cannam@85 3415 fi
cannam@85 3416 AC_SUBST([DUMPBIN])
cannam@85 3417 if test "$DUMPBIN" != ":"; then
cannam@85 3418 NM="$DUMPBIN"
cannam@85 3419 fi
cannam@85 3420 fi
cannam@85 3421 test -z "$NM" && NM=nm
cannam@85 3422 AC_SUBST([NM])
cannam@85 3423 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
cannam@85 3424
cannam@85 3425 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
cannam@85 3426 [lt_cv_nm_interface="BSD nm"
cannam@85 3427 echo "int some_variable = 0;" > conftest.$ac_ext
cannam@85 3428 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
cannam@85 3429 (eval "$ac_compile" 2>conftest.err)
cannam@85 3430 cat conftest.err >&AS_MESSAGE_LOG_FD
cannam@85 3431 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
cannam@85 3432 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cannam@85 3433 cat conftest.err >&AS_MESSAGE_LOG_FD
cannam@85 3434 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
cannam@85 3435 cat conftest.out >&AS_MESSAGE_LOG_FD
cannam@85 3436 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
cannam@85 3437 lt_cv_nm_interface="MS dumpbin"
cannam@85 3438 fi
cannam@85 3439 rm -f conftest*])
cannam@85 3440 ])# LT_PATH_NM
cannam@85 3441
cannam@85 3442 # Old names:
cannam@85 3443 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
cannam@85 3444 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
cannam@85 3445 dnl aclocal-1.4 backwards compatibility:
cannam@85 3446 dnl AC_DEFUN([AM_PROG_NM], [])
cannam@85 3447 dnl AC_DEFUN([AC_PROG_NM], [])
cannam@85 3448
cannam@85 3449 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
cannam@85 3450 # --------------------------------
cannam@85 3451 # how to determine the name of the shared library
cannam@85 3452 # associated with a specific link library.
cannam@85 3453 # -- PORTME fill in with the dynamic library characteristics
cannam@85 3454 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
cannam@85 3455 [m4_require([_LT_DECL_EGREP])
cannam@85 3456 m4_require([_LT_DECL_OBJDUMP])
cannam@85 3457 m4_require([_LT_DECL_DLLTOOL])
cannam@85 3458 AC_CACHE_CHECK([how to associate runtime and link libraries],
cannam@85 3459 lt_cv_sharedlib_from_linklib_cmd,
cannam@85 3460 [lt_cv_sharedlib_from_linklib_cmd='unknown'
cannam@85 3461
cannam@85 3462 case $host_os in
cannam@85 3463 cygwin* | mingw* | pw32* | cegcc*)
cannam@85 3464 # two different shell functions defined in ltmain.sh
cannam@85 3465 # decide which to use based on capabilities of $DLLTOOL
cannam@85 3466 case `$DLLTOOL --help 2>&1` in
cannam@85 3467 *--identify-strict*)
cannam@85 3468 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
cannam@85 3469 ;;
cannam@85 3470 *)
cannam@85 3471 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
cannam@85 3472 ;;
cannam@85 3473 esac
cannam@85 3474 ;;
cannam@85 3475 *)
cannam@85 3476 # fallback: assume linklib IS sharedlib
cannam@85 3477 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
cannam@85 3478 ;;
cannam@85 3479 esac
cannam@85 3480 ])
cannam@85 3481 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
cannam@85 3482 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
cannam@85 3483
cannam@85 3484 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
cannam@85 3485 [Command to associate shared and link libraries])
cannam@85 3486 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
cannam@85 3487
cannam@85 3488
cannam@85 3489 # _LT_PATH_MANIFEST_TOOL
cannam@85 3490 # ----------------------
cannam@85 3491 # locate the manifest tool
cannam@85 3492 m4_defun([_LT_PATH_MANIFEST_TOOL],
cannam@85 3493 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
cannam@85 3494 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
cannam@85 3495 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
cannam@85 3496 [lt_cv_path_mainfest_tool=no
cannam@85 3497 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
cannam@85 3498 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
cannam@85 3499 cat conftest.err >&AS_MESSAGE_LOG_FD
cannam@85 3500 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
cannam@85 3501 lt_cv_path_mainfest_tool=yes
cannam@85 3502 fi
cannam@85 3503 rm -f conftest*])
cannam@85 3504 if test "x$lt_cv_path_mainfest_tool" != xyes; then
cannam@85 3505 MANIFEST_TOOL=:
cannam@85 3506 fi
cannam@85 3507 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
cannam@85 3508 ])# _LT_PATH_MANIFEST_TOOL
cannam@85 3509
cannam@85 3510
cannam@85 3511 # LT_LIB_M
cannam@85 3512 # --------
cannam@85 3513 # check for math library
cannam@85 3514 AC_DEFUN([LT_LIB_M],
cannam@85 3515 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
cannam@85 3516 LIBM=
cannam@85 3517 case $host in
cannam@85 3518 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
cannam@85 3519 # These system don't have libm, or don't need it
cannam@85 3520 ;;
cannam@85 3521 *-ncr-sysv4.3*)
cannam@85 3522 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
cannam@85 3523 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
cannam@85 3524 ;;
cannam@85 3525 *)
cannam@85 3526 AC_CHECK_LIB(m, cos, LIBM="-lm")
cannam@85 3527 ;;
cannam@85 3528 esac
cannam@85 3529 AC_SUBST([LIBM])
cannam@85 3530 ])# LT_LIB_M
cannam@85 3531
cannam@85 3532 # Old name:
cannam@85 3533 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
cannam@85 3534 dnl aclocal-1.4 backwards compatibility:
cannam@85 3535 dnl AC_DEFUN([AC_CHECK_LIBM], [])
cannam@85 3536
cannam@85 3537
cannam@85 3538 # _LT_COMPILER_NO_RTTI([TAGNAME])
cannam@85 3539 # -------------------------------
cannam@85 3540 m4_defun([_LT_COMPILER_NO_RTTI],
cannam@85 3541 [m4_require([_LT_TAG_COMPILER])dnl
cannam@85 3542
cannam@85 3543 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
cannam@85 3544
cannam@85 3545 if test "$GCC" = yes; then
cannam@85 3546 case $cc_basename in
cannam@85 3547 nvcc*)
cannam@85 3548 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
cannam@85 3549 *)
cannam@85 3550 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
cannam@85 3551 esac
cannam@85 3552
cannam@85 3553 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
cannam@85 3554 lt_cv_prog_compiler_rtti_exceptions,
cannam@85 3555 [-fno-rtti -fno-exceptions], [],
cannam@85 3556 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
cannam@85 3557 fi
cannam@85 3558 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
cannam@85 3559 [Compiler flag to turn off builtin functions])
cannam@85 3560 ])# _LT_COMPILER_NO_RTTI
cannam@85 3561
cannam@85 3562
cannam@85 3563 # _LT_CMD_GLOBAL_SYMBOLS
cannam@85 3564 # ----------------------
cannam@85 3565 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
cannam@85 3566 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
cannam@85 3567 AC_REQUIRE([AC_PROG_CC])dnl
cannam@85 3568 AC_REQUIRE([AC_PROG_AWK])dnl
cannam@85 3569 AC_REQUIRE([LT_PATH_NM])dnl
cannam@85 3570 AC_REQUIRE([LT_PATH_LD])dnl
cannam@85 3571 m4_require([_LT_DECL_SED])dnl
cannam@85 3572 m4_require([_LT_DECL_EGREP])dnl
cannam@85 3573 m4_require([_LT_TAG_COMPILER])dnl
cannam@85 3574
cannam@85 3575 # Check for command to grab the raw symbol name followed by C symbol from nm.
cannam@85 3576 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
cannam@85 3577 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
cannam@85 3578 [
cannam@85 3579 # These are sane defaults that work on at least a few old systems.
cannam@85 3580 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
cannam@85 3581
cannam@85 3582 # Character class describing NM global symbol codes.
cannam@85 3583 symcode='[[BCDEGRST]]'
cannam@85 3584
cannam@85 3585 # Regexp to match symbols that can be accessed directly from C.
cannam@85 3586 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
cannam@85 3587
cannam@85 3588 # Define system-specific variables.
cannam@85 3589 case $host_os in
cannam@85 3590 aix*)
cannam@85 3591 symcode='[[BCDT]]'
cannam@85 3592 ;;
cannam@85 3593 cygwin* | mingw* | pw32* | cegcc*)
cannam@85 3594 symcode='[[ABCDGISTW]]'
cannam@85 3595 ;;
cannam@85 3596 hpux*)
cannam@85 3597 if test "$host_cpu" = ia64; then
cannam@85 3598 symcode='[[ABCDEGRST]]'
cannam@85 3599 fi
cannam@85 3600 ;;
cannam@85 3601 irix* | nonstopux*)
cannam@85 3602 symcode='[[BCDEGRST]]'
cannam@85 3603 ;;
cannam@85 3604 osf*)
cannam@85 3605 symcode='[[BCDEGQRST]]'
cannam@85 3606 ;;
cannam@85 3607 solaris*)
cannam@85 3608 symcode='[[BDRT]]'
cannam@85 3609 ;;
cannam@85 3610 sco3.2v5*)
cannam@85 3611 symcode='[[DT]]'
cannam@85 3612 ;;
cannam@85 3613 sysv4.2uw2*)
cannam@85 3614 symcode='[[DT]]'
cannam@85 3615 ;;
cannam@85 3616 sysv5* | sco5v6* | unixware* | OpenUNIX*)
cannam@85 3617 symcode='[[ABDT]]'
cannam@85 3618 ;;
cannam@85 3619 sysv4)
cannam@85 3620 symcode='[[DFNSTU]]'
cannam@85 3621 ;;
cannam@85 3622 esac
cannam@85 3623
cannam@85 3624 # If we're using GNU nm, then use its standard symbol codes.
cannam@85 3625 case `$NM -V 2>&1` in
cannam@85 3626 *GNU* | *'with BFD'*)
cannam@85 3627 symcode='[[ABCDGIRSTW]]' ;;
cannam@85 3628 esac
cannam@85 3629
cannam@85 3630 # Transform an extracted symbol line into a proper C declaration.
cannam@85 3631 # Some systems (esp. on ia64) link data and code symbols differently,
cannam@85 3632 # so use this general approach.
cannam@85 3633 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
cannam@85 3634
cannam@85 3635 # Transform an extracted symbol line into symbol name and symbol address
cannam@85 3636 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
cannam@85 3637 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
cannam@85 3638
cannam@85 3639 # Handle CRLF in mingw tool chain
cannam@85 3640 opt_cr=
cannam@85 3641 case $build_os in
cannam@85 3642 mingw*)
cannam@85 3643 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
cannam@85 3644 ;;
cannam@85 3645 esac
cannam@85 3646
cannam@85 3647 # Try without a prefix underscore, then with it.
cannam@85 3648 for ac_symprfx in "" "_"; do
cannam@85 3649
cannam@85 3650 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
cannam@85 3651 symxfrm="\\1 $ac_symprfx\\2 \\2"
cannam@85 3652
cannam@85 3653 # Write the raw and C identifiers.
cannam@85 3654 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
cannam@85 3655 # Fake it for dumpbin and say T for any non-static function
cannam@85 3656 # and D for any global variable.
cannam@85 3657 # Also find C++ and __fastcall symbols from MSVC++,
cannam@85 3658 # which start with @ or ?.
cannam@85 3659 lt_cv_sys_global_symbol_pipe="$AWK ['"\
cannam@85 3660 " {last_section=section; section=\$ 3};"\
cannam@85 3661 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
cannam@85 3662 " \$ 0!~/External *\|/{next};"\
cannam@85 3663 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
cannam@85 3664 " {if(hide[section]) next};"\
cannam@85 3665 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
cannam@85 3666 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
cannam@85 3667 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
cannam@85 3668 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
cannam@85 3669 " ' prfx=^$ac_symprfx]"
cannam@85 3670 else
cannam@85 3671 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
cannam@85 3672 fi
cannam@85 3673 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
cannam@85 3674
cannam@85 3675 # Check to see that the pipe works correctly.
cannam@85 3676 pipe_works=no
cannam@85 3677
cannam@85 3678 rm -f conftest*
cannam@85 3679 cat > conftest.$ac_ext <<_LT_EOF
cannam@85 3680 #ifdef __cplusplus
cannam@85 3681 extern "C" {
cannam@85 3682 #endif
cannam@85 3683 char nm_test_var;
cannam@85 3684 void nm_test_func(void);
cannam@85 3685 void nm_test_func(void){}
cannam@85 3686 #ifdef __cplusplus
cannam@85 3687 }
cannam@85 3688 #endif
cannam@85 3689 int main(){nm_test_var='a';nm_test_func();return(0);}
cannam@85 3690 _LT_EOF
cannam@85 3691
cannam@85 3692 if AC_TRY_EVAL(ac_compile); then
cannam@85 3693 # Now try to grab the symbols.
cannam@85 3694 nlist=conftest.nm
cannam@85 3695 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
cannam@85 3696 # Try sorting and uniquifying the output.
cannam@85 3697 if sort "$nlist" | uniq > "$nlist"T; then
cannam@85 3698 mv -f "$nlist"T "$nlist"
cannam@85 3699 else
cannam@85 3700 rm -f "$nlist"T
cannam@85 3701 fi
cannam@85 3702
cannam@85 3703 # Make sure that we snagged all the symbols we need.
cannam@85 3704 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
cannam@85 3705 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
cannam@85 3706 cat <<_LT_EOF > conftest.$ac_ext
cannam@85 3707 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
cannam@85 3708 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
cannam@85 3709 /* DATA imports from DLLs on WIN32 con't be const, because runtime
cannam@85 3710 relocations are performed -- see ld's documentation on pseudo-relocs. */
cannam@85 3711 # define LT@&t@_DLSYM_CONST
cannam@85 3712 #elif defined(__osf__)
cannam@85 3713 /* This system does not cope well with relocations in const data. */
cannam@85 3714 # define LT@&t@_DLSYM_CONST
cannam@85 3715 #else
cannam@85 3716 # define LT@&t@_DLSYM_CONST const
cannam@85 3717 #endif
cannam@85 3718
cannam@85 3719 #ifdef __cplusplus
cannam@85 3720 extern "C" {
cannam@85 3721 #endif
cannam@85 3722
cannam@85 3723 _LT_EOF
cannam@85 3724 # Now generate the symbol file.
cannam@85 3725 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
cannam@85 3726
cannam@85 3727 cat <<_LT_EOF >> conftest.$ac_ext
cannam@85 3728
cannam@85 3729 /* The mapping between symbol names and symbols. */
cannam@85 3730 LT@&t@_DLSYM_CONST struct {
cannam@85 3731 const char *name;
cannam@85 3732 void *address;
cannam@85 3733 }
cannam@85 3734 lt__PROGRAM__LTX_preloaded_symbols[[]] =
cannam@85 3735 {
cannam@85 3736 { "@PROGRAM@", (void *) 0 },
cannam@85 3737 _LT_EOF
cannam@85 3738 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
cannam@85 3739 cat <<\_LT_EOF >> conftest.$ac_ext
cannam@85 3740 {0, (void *) 0}
cannam@85 3741 };
cannam@85 3742
cannam@85 3743 /* This works around a problem in FreeBSD linker */
cannam@85 3744 #ifdef FREEBSD_WORKAROUND
cannam@85 3745 static const void *lt_preloaded_setup() {
cannam@85 3746 return lt__PROGRAM__LTX_preloaded_symbols;
cannam@85 3747 }
cannam@85 3748 #endif
cannam@85 3749
cannam@85 3750 #ifdef __cplusplus
cannam@85 3751 }
cannam@85 3752 #endif
cannam@85 3753 _LT_EOF
cannam@85 3754 # Now try linking the two files.
cannam@85 3755 mv conftest.$ac_objext conftstm.$ac_objext
cannam@85 3756 lt_globsym_save_LIBS=$LIBS
cannam@85 3757 lt_globsym_save_CFLAGS=$CFLAGS
cannam@85 3758 LIBS="conftstm.$ac_objext"
cannam@85 3759 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
cannam@85 3760 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
cannam@85 3761 pipe_works=yes
cannam@85 3762 fi
cannam@85 3763 LIBS=$lt_globsym_save_LIBS
cannam@85 3764 CFLAGS=$lt_globsym_save_CFLAGS
cannam@85 3765 else
cannam@85 3766 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
cannam@85 3767 fi
cannam@85 3768 else
cannam@85 3769 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
cannam@85 3770 fi
cannam@85 3771 else
cannam@85 3772 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
cannam@85 3773 fi
cannam@85 3774 else
cannam@85 3775 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
cannam@85 3776 cat conftest.$ac_ext >&5
cannam@85 3777 fi
cannam@85 3778 rm -rf conftest* conftst*
cannam@85 3779
cannam@85 3780 # Do not use the global_symbol_pipe unless it works.
cannam@85 3781 if test "$pipe_works" = yes; then
cannam@85 3782 break
cannam@85 3783 else
cannam@85 3784 lt_cv_sys_global_symbol_pipe=
cannam@85 3785 fi
cannam@85 3786 done
cannam@85 3787 ])
cannam@85 3788 if test -z "$lt_cv_sys_global_symbol_pipe"; then
cannam@85 3789 lt_cv_sys_global_symbol_to_cdecl=
cannam@85 3790 fi
cannam@85 3791 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
cannam@85 3792 AC_MSG_RESULT(failed)
cannam@85 3793 else
cannam@85 3794 AC_MSG_RESULT(ok)
cannam@85 3795 fi
cannam@85 3796
cannam@85 3797 # Response file support.
cannam@85 3798 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
cannam@85 3799 nm_file_list_spec='@'
cannam@85 3800 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
cannam@85 3801 nm_file_list_spec='@'
cannam@85 3802 fi
cannam@85 3803
cannam@85 3804 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
cannam@85 3805 [Take the output of nm and produce a listing of raw symbols and C names])
cannam@85 3806 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
cannam@85 3807 [Transform the output of nm in a proper C declaration])
cannam@85 3808 _LT_DECL([global_symbol_to_c_name_address],
cannam@85 3809 [lt_cv_sys_global_symbol_to_c_name_address], [1],
cannam@85 3810 [Transform the output of nm in a C name address pair])
cannam@85 3811 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
cannam@85 3812 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
cannam@85 3813 [Transform the output of nm in a C name address pair when lib prefix is needed])
cannam@85 3814 _LT_DECL([], [nm_file_list_spec], [1],
cannam@85 3815 [Specify filename containing input files for $NM])
cannam@85 3816 ]) # _LT_CMD_GLOBAL_SYMBOLS
cannam@85 3817
cannam@85 3818
cannam@85 3819 # _LT_COMPILER_PIC([TAGNAME])
cannam@85 3820 # ---------------------------
cannam@85 3821 m4_defun([_LT_COMPILER_PIC],
cannam@85 3822 [m4_require([_LT_TAG_COMPILER])dnl
cannam@85 3823 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
cannam@85 3824 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
cannam@85 3825 _LT_TAGVAR(lt_prog_compiler_static, $1)=
cannam@85 3826
cannam@85 3827 m4_if([$1], [CXX], [
cannam@85 3828 # C++ specific cases for pic, static, wl, etc.
cannam@85 3829 if test "$GXX" = yes; then
cannam@85 3830 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 3831 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@85 3832
cannam@85 3833 case $host_os in
cannam@85 3834 aix*)
cannam@85 3835 # All AIX code is PIC.
cannam@85 3836 if test "$host_cpu" = ia64; then
cannam@85 3837 # AIX 5 now supports IA64 processor
cannam@85 3838 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 3839 fi
cannam@85 3840 ;;
cannam@85 3841
cannam@85 3842 amigaos*)
cannam@85 3843 case $host_cpu in
cannam@85 3844 powerpc)
cannam@85 3845 # see comment about AmigaOS4 .so support
cannam@85 3846 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@85 3847 ;;
cannam@85 3848 m68k)
cannam@85 3849 # FIXME: we need at least 68020 code to build shared libraries, but
cannam@85 3850 # adding the `-m68020' flag to GCC prevents building anything better,
cannam@85 3851 # like `-m68040'.
cannam@85 3852 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
cannam@85 3853 ;;
cannam@85 3854 esac
cannam@85 3855 ;;
cannam@85 3856
cannam@85 3857 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
cannam@85 3858 # PIC is the default for these OSes.
cannam@85 3859 ;;
cannam@85 3860 mingw* | cygwin* | os2* | pw32* | cegcc*)
cannam@85 3861 # This hack is so that the source file can tell whether it is being
cannam@85 3862 # built for inclusion in a dll (and should export symbols for example).
cannam@85 3863 # Although the cygwin gcc ignores -fPIC, still need this for old-style
cannam@85 3864 # (--disable-auto-import) libraries
cannam@85 3865 m4_if([$1], [GCJ], [],
cannam@85 3866 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
cannam@85 3867 ;;
cannam@85 3868 darwin* | rhapsody*)
cannam@85 3869 # PIC is the default on this platform
cannam@85 3870 # Common symbols not allowed in MH_DYLIB files
cannam@85 3871 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
cannam@85 3872 ;;
cannam@85 3873 *djgpp*)
cannam@85 3874 # DJGPP does not support shared libraries at all
cannam@85 3875 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
cannam@85 3876 ;;
cannam@85 3877 haiku*)
cannam@85 3878 # PIC is the default for Haiku.
cannam@85 3879 # The "-static" flag exists, but is broken.
cannam@85 3880 _LT_TAGVAR(lt_prog_compiler_static, $1)=
cannam@85 3881 ;;
cannam@85 3882 interix[[3-9]]*)
cannam@85 3883 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
cannam@85 3884 # Instead, we relocate shared libraries at runtime.
cannam@85 3885 ;;
cannam@85 3886 sysv4*MP*)
cannam@85 3887 if test -d /usr/nec; then
cannam@85 3888 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
cannam@85 3889 fi
cannam@85 3890 ;;
cannam@85 3891 hpux*)
cannam@85 3892 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
cannam@85 3893 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
cannam@85 3894 # sets the default TLS model and affects inlining.
cannam@85 3895 case $host_cpu in
cannam@85 3896 hppa*64*)
cannam@85 3897 ;;
cannam@85 3898 *)
cannam@85 3899 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@85 3900 ;;
cannam@85 3901 esac
cannam@85 3902 ;;
cannam@85 3903 *qnx* | *nto*)
cannam@85 3904 # QNX uses GNU C++, but need to define -shared option too, otherwise
cannam@85 3905 # it will coredump.
cannam@85 3906 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
cannam@85 3907 ;;
cannam@85 3908 *)
cannam@85 3909 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@85 3910 ;;
cannam@85 3911 esac
cannam@85 3912 else
cannam@85 3913 case $host_os in
cannam@85 3914 aix[[4-9]]*)
cannam@85 3915 # All AIX code is PIC.
cannam@85 3916 if test "$host_cpu" = ia64; then
cannam@85 3917 # AIX 5 now supports IA64 processor
cannam@85 3918 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 3919 else
cannam@85 3920 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
cannam@85 3921 fi
cannam@85 3922 ;;
cannam@85 3923 chorus*)
cannam@85 3924 case $cc_basename in
cannam@85 3925 cxch68*)
cannam@85 3926 # Green Hills C++ Compiler
cannam@85 3927 # _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@85 3928 ;;
cannam@85 3929 esac
cannam@85 3930 ;;
cannam@85 3931 mingw* | cygwin* | os2* | pw32* | cegcc*)
cannam@85 3932 # This hack is so that the source file can tell whether it is being
cannam@85 3933 # built for inclusion in a dll (and should export symbols for example).
cannam@85 3934 m4_if([$1], [GCJ], [],
cannam@85 3935 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
cannam@85 3936 ;;
cannam@85 3937 dgux*)
cannam@85 3938 case $cc_basename in
cannam@85 3939 ec++*)
cannam@85 3940 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@85 3941 ;;
cannam@85 3942 ghcx*)
cannam@85 3943 # Green Hills C++ Compiler
cannam@85 3944 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
cannam@85 3945 ;;
cannam@85 3946 *)
cannam@85 3947 ;;
cannam@85 3948 esac
cannam@85 3949 ;;
cannam@85 3950 freebsd* | dragonfly*)
cannam@85 3951 # FreeBSD uses GNU C++
cannam@85 3952 ;;
cannam@85 3953 hpux9* | hpux10* | hpux11*)
cannam@85 3954 case $cc_basename in
cannam@85 3955 CC*)
cannam@85 3956 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 3957 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
cannam@85 3958 if test "$host_cpu" != ia64; then
cannam@85 3959 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
cannam@85 3960 fi
cannam@85 3961 ;;
cannam@85 3962 aCC*)
cannam@85 3963 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 3964 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
cannam@85 3965 case $host_cpu in
cannam@85 3966 hppa*64*|ia64*)
cannam@85 3967 # +Z the default
cannam@85 3968 ;;
cannam@85 3969 *)
cannam@85 3970 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
cannam@85 3971 ;;
cannam@85 3972 esac
cannam@85 3973 ;;
cannam@85 3974 *)
cannam@85 3975 ;;
cannam@85 3976 esac
cannam@85 3977 ;;
cannam@85 3978 interix*)
cannam@85 3979 # This is c89, which is MS Visual C++ (no shared libs)
cannam@85 3980 # Anyone wants to do a port?
cannam@85 3981 ;;
cannam@85 3982 irix5* | irix6* | nonstopux*)
cannam@85 3983 case $cc_basename in
cannam@85 3984 CC*)
cannam@85 3985 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 3986 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@85 3987 # CC pic flag -KPIC is the default.
cannam@85 3988 ;;
cannam@85 3989 *)
cannam@85 3990 ;;
cannam@85 3991 esac
cannam@85 3992 ;;
cannam@85 3993 linux* | k*bsd*-gnu | kopensolaris*-gnu)
cannam@85 3994 case $cc_basename in
cannam@85 3995 KCC*)
cannam@85 3996 # KAI C++ Compiler
cannam@85 3997 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
cannam@85 3998 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@85 3999 ;;
cannam@85 4000 ecpc* )
cannam@85 4001 # old Intel C++ for x86_64 which still supported -KPIC.
cannam@85 4002 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4003 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@85 4004 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@85 4005 ;;
cannam@85 4006 icpc* )
cannam@85 4007 # Intel C++, used to be incompatible with GCC.
cannam@85 4008 # ICC 10 doesn't accept -KPIC any more.
cannam@85 4009 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4010 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@85 4011 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@85 4012 ;;
cannam@85 4013 pgCC* | pgcpp*)
cannam@85 4014 # Portland Group C++ compiler
cannam@85 4015 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4016 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
cannam@85 4017 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 4018 ;;
cannam@85 4019 cxx*)
cannam@85 4020 # Compaq C++
cannam@85 4021 # Make sure the PIC flag is empty. It appears that all Alpha
cannam@85 4022 # Linux and Compaq Tru64 Unix objects are PIC.
cannam@85 4023 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
cannam@85 4024 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@85 4025 ;;
cannam@85 4026 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
cannam@85 4027 # IBM XL 8.0, 9.0 on PPC and BlueGene
cannam@85 4028 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4029 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
cannam@85 4030 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
cannam@85 4031 ;;
cannam@85 4032 *)
cannam@85 4033 case `$CC -V 2>&1 | sed 5q` in
cannam@85 4034 *Sun\ C*)
cannam@85 4035 # Sun C++ 5.9
cannam@85 4036 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@85 4037 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 4038 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
cannam@85 4039 ;;
cannam@85 4040 esac
cannam@85 4041 ;;
cannam@85 4042 esac
cannam@85 4043 ;;
cannam@85 4044 lynxos*)
cannam@85 4045 ;;
cannam@85 4046 m88k*)
cannam@85 4047 ;;
cannam@85 4048 mvs*)
cannam@85 4049 case $cc_basename in
cannam@85 4050 cxx*)
cannam@85 4051 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
cannam@85 4052 ;;
cannam@85 4053 *)
cannam@85 4054 ;;
cannam@85 4055 esac
cannam@85 4056 ;;
cannam@85 4057 netbsd* | netbsdelf*-gnu)
cannam@85 4058 ;;
cannam@85 4059 *qnx* | *nto*)
cannam@85 4060 # QNX uses GNU C++, but need to define -shared option too, otherwise
cannam@85 4061 # it will coredump.
cannam@85 4062 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
cannam@85 4063 ;;
cannam@85 4064 osf3* | osf4* | osf5*)
cannam@85 4065 case $cc_basename in
cannam@85 4066 KCC*)
cannam@85 4067 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
cannam@85 4068 ;;
cannam@85 4069 RCC*)
cannam@85 4070 # Rational C++ 2.4.1
cannam@85 4071 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
cannam@85 4072 ;;
cannam@85 4073 cxx*)
cannam@85 4074 # Digital/Compaq C++
cannam@85 4075 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4076 # Make sure the PIC flag is empty. It appears that all Alpha
cannam@85 4077 # Linux and Compaq Tru64 Unix objects are PIC.
cannam@85 4078 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
cannam@85 4079 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@85 4080 ;;
cannam@85 4081 *)
cannam@85 4082 ;;
cannam@85 4083 esac
cannam@85 4084 ;;
cannam@85 4085 psos*)
cannam@85 4086 ;;
cannam@85 4087 solaris*)
cannam@85 4088 case $cc_basename in
cannam@85 4089 CC* | sunCC*)
cannam@85 4090 # Sun C++ 4.2, 5.x and Centerline C++
cannam@85 4091 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@85 4092 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 4093 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
cannam@85 4094 ;;
cannam@85 4095 gcx*)
cannam@85 4096 # Green Hills C++ Compiler
cannam@85 4097 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
cannam@85 4098 ;;
cannam@85 4099 *)
cannam@85 4100 ;;
cannam@85 4101 esac
cannam@85 4102 ;;
cannam@85 4103 sunos4*)
cannam@85 4104 case $cc_basename in
cannam@85 4105 CC*)
cannam@85 4106 # Sun C++ 4.x
cannam@85 4107 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
cannam@85 4108 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 4109 ;;
cannam@85 4110 lcc*)
cannam@85 4111 # Lucid
cannam@85 4112 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
cannam@85 4113 ;;
cannam@85 4114 *)
cannam@85 4115 ;;
cannam@85 4116 esac
cannam@85 4117 ;;
cannam@85 4118 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
cannam@85 4119 case $cc_basename in
cannam@85 4120 CC*)
cannam@85 4121 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4122 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@85 4123 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 4124 ;;
cannam@85 4125 esac
cannam@85 4126 ;;
cannam@85 4127 tandem*)
cannam@85 4128 case $cc_basename in
cannam@85 4129 NCC*)
cannam@85 4130 # NonStop-UX NCC 3.20
cannam@85 4131 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@85 4132 ;;
cannam@85 4133 *)
cannam@85 4134 ;;
cannam@85 4135 esac
cannam@85 4136 ;;
cannam@85 4137 vxworks*)
cannam@85 4138 ;;
cannam@85 4139 *)
cannam@85 4140 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
cannam@85 4141 ;;
cannam@85 4142 esac
cannam@85 4143 fi
cannam@85 4144 ],
cannam@85 4145 [
cannam@85 4146 if test "$GCC" = yes; then
cannam@85 4147 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4148 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@85 4149
cannam@85 4150 case $host_os in
cannam@85 4151 aix*)
cannam@85 4152 # All AIX code is PIC.
cannam@85 4153 if test "$host_cpu" = ia64; then
cannam@85 4154 # AIX 5 now supports IA64 processor
cannam@85 4155 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 4156 fi
cannam@85 4157 ;;
cannam@85 4158
cannam@85 4159 amigaos*)
cannam@85 4160 case $host_cpu in
cannam@85 4161 powerpc)
cannam@85 4162 # see comment about AmigaOS4 .so support
cannam@85 4163 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@85 4164 ;;
cannam@85 4165 m68k)
cannam@85 4166 # FIXME: we need at least 68020 code to build shared libraries, but
cannam@85 4167 # adding the `-m68020' flag to GCC prevents building anything better,
cannam@85 4168 # like `-m68040'.
cannam@85 4169 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
cannam@85 4170 ;;
cannam@85 4171 esac
cannam@85 4172 ;;
cannam@85 4173
cannam@85 4174 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
cannam@85 4175 # PIC is the default for these OSes.
cannam@85 4176 ;;
cannam@85 4177
cannam@85 4178 mingw* | cygwin* | pw32* | os2* | cegcc*)
cannam@85 4179 # This hack is so that the source file can tell whether it is being
cannam@85 4180 # built for inclusion in a dll (and should export symbols for example).
cannam@85 4181 # Although the cygwin gcc ignores -fPIC, still need this for old-style
cannam@85 4182 # (--disable-auto-import) libraries
cannam@85 4183 m4_if([$1], [GCJ], [],
cannam@85 4184 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
cannam@85 4185 ;;
cannam@85 4186
cannam@85 4187 darwin* | rhapsody*)
cannam@85 4188 # PIC is the default on this platform
cannam@85 4189 # Common symbols not allowed in MH_DYLIB files
cannam@85 4190 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
cannam@85 4191 ;;
cannam@85 4192
cannam@85 4193 haiku*)
cannam@85 4194 # PIC is the default for Haiku.
cannam@85 4195 # The "-static" flag exists, but is broken.
cannam@85 4196 _LT_TAGVAR(lt_prog_compiler_static, $1)=
cannam@85 4197 ;;
cannam@85 4198
cannam@85 4199 hpux*)
cannam@85 4200 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
cannam@85 4201 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
cannam@85 4202 # sets the default TLS model and affects inlining.
cannam@85 4203 case $host_cpu in
cannam@85 4204 hppa*64*)
cannam@85 4205 # +Z the default
cannam@85 4206 ;;
cannam@85 4207 *)
cannam@85 4208 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@85 4209 ;;
cannam@85 4210 esac
cannam@85 4211 ;;
cannam@85 4212
cannam@85 4213 interix[[3-9]]*)
cannam@85 4214 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
cannam@85 4215 # Instead, we relocate shared libraries at runtime.
cannam@85 4216 ;;
cannam@85 4217
cannam@85 4218 msdosdjgpp*)
cannam@85 4219 # Just because we use GCC doesn't mean we suddenly get shared libraries
cannam@85 4220 # on systems that don't support them.
cannam@85 4221 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
cannam@85 4222 enable_shared=no
cannam@85 4223 ;;
cannam@85 4224
cannam@85 4225 *nto* | *qnx*)
cannam@85 4226 # QNX uses GNU C++, but need to define -shared option too, otherwise
cannam@85 4227 # it will coredump.
cannam@85 4228 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
cannam@85 4229 ;;
cannam@85 4230
cannam@85 4231 sysv4*MP*)
cannam@85 4232 if test -d /usr/nec; then
cannam@85 4233 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
cannam@85 4234 fi
cannam@85 4235 ;;
cannam@85 4236
cannam@85 4237 *)
cannam@85 4238 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@85 4239 ;;
cannam@85 4240 esac
cannam@85 4241
cannam@85 4242 case $cc_basename in
cannam@85 4243 nvcc*) # Cuda Compiler Driver 2.2
cannam@85 4244 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
cannam@85 4245 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
cannam@85 4246 ;;
cannam@85 4247 esac
cannam@85 4248 else
cannam@85 4249 # PORTME Check for flag to pass linker flags through the system compiler.
cannam@85 4250 case $host_os in
cannam@85 4251 aix*)
cannam@85 4252 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4253 if test "$host_cpu" = ia64; then
cannam@85 4254 # AIX 5 now supports IA64 processor
cannam@85 4255 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 4256 else
cannam@85 4257 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
cannam@85 4258 fi
cannam@85 4259 ;;
cannam@85 4260
cannam@85 4261 mingw* | cygwin* | pw32* | os2* | cegcc*)
cannam@85 4262 # This hack is so that the source file can tell whether it is being
cannam@85 4263 # built for inclusion in a dll (and should export symbols for example).
cannam@85 4264 m4_if([$1], [GCJ], [],
cannam@85 4265 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
cannam@85 4266 ;;
cannam@85 4267
cannam@85 4268 hpux9* | hpux10* | hpux11*)
cannam@85 4269 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4270 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
cannam@85 4271 # not for PA HP-UX.
cannam@85 4272 case $host_cpu in
cannam@85 4273 hppa*64*|ia64*)
cannam@85 4274 # +Z the default
cannam@85 4275 ;;
cannam@85 4276 *)
cannam@85 4277 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
cannam@85 4278 ;;
cannam@85 4279 esac
cannam@85 4280 # Is there a better lt_prog_compiler_static that works with the bundled CC?
cannam@85 4281 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
cannam@85 4282 ;;
cannam@85 4283
cannam@85 4284 irix5* | irix6* | nonstopux*)
cannam@85 4285 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4286 # PIC (with -KPIC) is the default.
cannam@85 4287 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@85 4288 ;;
cannam@85 4289
cannam@85 4290 linux* | k*bsd*-gnu | kopensolaris*-gnu)
cannam@85 4291 case $cc_basename in
cannam@85 4292 # old Intel for x86_64 which still supported -KPIC.
cannam@85 4293 ecc*)
cannam@85 4294 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4295 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@85 4296 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@85 4297 ;;
cannam@85 4298 # icc used to be incompatible with GCC.
cannam@85 4299 # ICC 10 doesn't accept -KPIC any more.
cannam@85 4300 icc* | ifort*)
cannam@85 4301 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4302 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
cannam@85 4303 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
cannam@85 4304 ;;
cannam@85 4305 # Lahey Fortran 8.1.
cannam@85 4306 lf95*)
cannam@85 4307 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4308 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
cannam@85 4309 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
cannam@85 4310 ;;
cannam@85 4311 nagfor*)
cannam@85 4312 # NAG Fortran compiler
cannam@85 4313 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
cannam@85 4314 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
cannam@85 4315 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 4316 ;;
cannam@85 4317 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
cannam@85 4318 # Portland Group compilers (*not* the Pentium gcc compiler,
cannam@85 4319 # which looks to be a dead project)
cannam@85 4320 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4321 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
cannam@85 4322 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 4323 ;;
cannam@85 4324 ccc*)
cannam@85 4325 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4326 # All Alpha code is PIC.
cannam@85 4327 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@85 4328 ;;
cannam@85 4329 xl* | bgxl* | bgf* | mpixl*)
cannam@85 4330 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
cannam@85 4331 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4332 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
cannam@85 4333 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
cannam@85 4334 ;;
cannam@85 4335 *)
cannam@85 4336 case `$CC -V 2>&1 | sed 5q` in
cannam@85 4337 *Sun\ F* | *Sun*Fortran*)
cannam@85 4338 # Sun Fortran 8.3 passes all unrecognized flags to the linker
cannam@85 4339 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@85 4340 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 4341 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
cannam@85 4342 ;;
cannam@85 4343 *Sun\ C*)
cannam@85 4344 # Sun C 5.9
cannam@85 4345 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@85 4346 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 4347 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4348 ;;
cannam@85 4349 esac
cannam@85 4350 ;;
cannam@85 4351 esac
cannam@85 4352 ;;
cannam@85 4353
cannam@85 4354 newsos6)
cannam@85 4355 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@85 4356 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 4357 ;;
cannam@85 4358
cannam@85 4359 *nto* | *qnx*)
cannam@85 4360 # QNX uses GNU C++, but need to define -shared option too, otherwise
cannam@85 4361 # it will coredump.
cannam@85 4362 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
cannam@85 4363 ;;
cannam@85 4364
cannam@85 4365 osf3* | osf4* | osf5*)
cannam@85 4366 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4367 # All OSF/1 code is PIC.
cannam@85 4368 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@85 4369 ;;
cannam@85 4370
cannam@85 4371 rdos*)
cannam@85 4372 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
cannam@85 4373 ;;
cannam@85 4374
cannam@85 4375 solaris*)
cannam@85 4376 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@85 4377 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 4378 case $cc_basename in
cannam@85 4379 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
cannam@85 4380 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
cannam@85 4381 *)
cannam@85 4382 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
cannam@85 4383 esac
cannam@85 4384 ;;
cannam@85 4385
cannam@85 4386 sunos4*)
cannam@85 4387 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
cannam@85 4388 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
cannam@85 4389 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 4390 ;;
cannam@85 4391
cannam@85 4392 sysv4 | sysv4.2uw2* | sysv4.3*)
cannam@85 4393 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4394 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@85 4395 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 4396 ;;
cannam@85 4397
cannam@85 4398 sysv4*MP*)
cannam@85 4399 if test -d /usr/nec ;then
cannam@85 4400 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
cannam@85 4401 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 4402 fi
cannam@85 4403 ;;
cannam@85 4404
cannam@85 4405 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
cannam@85 4406 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4407 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
cannam@85 4408 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 4409 ;;
cannam@85 4410
cannam@85 4411 unicos*)
cannam@85 4412 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
cannam@85 4413 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
cannam@85 4414 ;;
cannam@85 4415
cannam@85 4416 uts4*)
cannam@85 4417 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
cannam@85 4418 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
cannam@85 4419 ;;
cannam@85 4420
cannam@85 4421 *)
cannam@85 4422 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
cannam@85 4423 ;;
cannam@85 4424 esac
cannam@85 4425 fi
cannam@85 4426 ])
cannam@85 4427 case $host_os in
cannam@85 4428 # For platforms which do not support PIC, -DPIC is meaningless:
cannam@85 4429 *djgpp*)
cannam@85 4430 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
cannam@85 4431 ;;
cannam@85 4432 *)
cannam@85 4433 _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@85 4434 ;;
cannam@85 4435 esac
cannam@85 4436
cannam@85 4437 AC_CACHE_CHECK([for $compiler option to produce PIC],
cannam@85 4438 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
cannam@85 4439 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
cannam@85 4440 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
cannam@85 4441
cannam@85 4442 #
cannam@85 4443 # Check to make sure the PIC flag actually works.
cannam@85 4444 #
cannam@85 4445 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
cannam@85 4446 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
cannam@85 4447 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
cannam@85 4448 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
cannam@85 4449 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
cannam@85 4450 "" | " "*) ;;
cannam@85 4451 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
cannam@85 4452 esac],
cannam@85 4453 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
cannam@85 4454 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
cannam@85 4455 fi
cannam@85 4456 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
cannam@85 4457 [Additional compiler flags for building library objects])
cannam@85 4458
cannam@85 4459 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
cannam@85 4460 [How to pass a linker flag through the compiler])
cannam@85 4461 #
cannam@85 4462 # Check to make sure the static flag actually works.
cannam@85 4463 #
cannam@85 4464 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
cannam@85 4465 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
cannam@85 4466 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
cannam@85 4467 $lt_tmp_static_flag,
cannam@85 4468 [],
cannam@85 4469 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
cannam@85 4470 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
cannam@85 4471 [Compiler flag to prevent dynamic linking])
cannam@85 4472 ])# _LT_COMPILER_PIC
cannam@85 4473
cannam@85 4474
cannam@85 4475 # _LT_LINKER_SHLIBS([TAGNAME])
cannam@85 4476 # ----------------------------
cannam@85 4477 # See if the linker supports building shared libraries.
cannam@85 4478 m4_defun([_LT_LINKER_SHLIBS],
cannam@85 4479 [AC_REQUIRE([LT_PATH_LD])dnl
cannam@85 4480 AC_REQUIRE([LT_PATH_NM])dnl
cannam@85 4481 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
cannam@85 4482 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@85 4483 m4_require([_LT_DECL_EGREP])dnl
cannam@85 4484 m4_require([_LT_DECL_SED])dnl
cannam@85 4485 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
cannam@85 4486 m4_require([_LT_TAG_COMPILER])dnl
cannam@85 4487 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
cannam@85 4488 m4_if([$1], [CXX], [
cannam@85 4489 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
cannam@85 4490 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
cannam@85 4491 case $host_os in
cannam@85 4492 aix[[4-9]]*)
cannam@85 4493 # If we're using GNU nm, then we don't want the "-C" option.
cannam@85 4494 # -C means demangle to AIX nm, but means don't demangle with GNU nm
cannam@85 4495 # Also, AIX nm treats weak defined symbols like other global defined
cannam@85 4496 # symbols, whereas GNU nm marks them as "W".
cannam@85 4497 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
cannam@85 4498 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
cannam@85 4499 else
cannam@85 4500 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
cannam@85 4501 fi
cannam@85 4502 ;;
cannam@85 4503 pw32*)
cannam@85 4504 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
cannam@85 4505 ;;
cannam@85 4506 cygwin* | mingw* | cegcc*)
cannam@85 4507 case $cc_basename in
cannam@85 4508 cl*) ;;
cannam@85 4509 *)
cannam@85 4510 _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@85 4511 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
cannam@85 4512 ;;
cannam@85 4513 esac
cannam@85 4514 ;;
cannam@85 4515 linux* | k*bsd*-gnu | gnu*)
cannam@85 4516 _LT_TAGVAR(link_all_deplibs, $1)=no
cannam@85 4517 ;;
cannam@85 4518 *)
cannam@85 4519 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
cannam@85 4520 ;;
cannam@85 4521 esac
cannam@85 4522 ], [
cannam@85 4523 runpath_var=
cannam@85 4524 _LT_TAGVAR(allow_undefined_flag, $1)=
cannam@85 4525 _LT_TAGVAR(always_export_symbols, $1)=no
cannam@85 4526 _LT_TAGVAR(archive_cmds, $1)=
cannam@85 4527 _LT_TAGVAR(archive_expsym_cmds, $1)=
cannam@85 4528 _LT_TAGVAR(compiler_needs_object, $1)=no
cannam@85 4529 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
cannam@85 4530 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
cannam@85 4531 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
cannam@85 4532 _LT_TAGVAR(hardcode_automatic, $1)=no
cannam@85 4533 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@85 4534 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
cannam@85 4535 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
cannam@85 4536 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
cannam@85 4537 _LT_TAGVAR(hardcode_libdir_separator, $1)=
cannam@85 4538 _LT_TAGVAR(hardcode_minus_L, $1)=no
cannam@85 4539 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
cannam@85 4540 _LT_TAGVAR(inherit_rpath, $1)=no
cannam@85 4541 _LT_TAGVAR(link_all_deplibs, $1)=unknown
cannam@85 4542 _LT_TAGVAR(module_cmds, $1)=
cannam@85 4543 _LT_TAGVAR(module_expsym_cmds, $1)=
cannam@85 4544 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
cannam@85 4545 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
cannam@85 4546 _LT_TAGVAR(thread_safe_flag_spec, $1)=
cannam@85 4547 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@85 4548 # include_expsyms should be a list of space-separated symbols to be *always*
cannam@85 4549 # included in the symbol list
cannam@85 4550 _LT_TAGVAR(include_expsyms, $1)=
cannam@85 4551 # exclude_expsyms can be an extended regexp of symbols to exclude
cannam@85 4552 # it will be wrapped by ` (' and `)$', so one must not match beginning or
cannam@85 4553 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
cannam@85 4554 # as well as any symbol that contains `d'.
cannam@85 4555 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
cannam@85 4556 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
cannam@85 4557 # platforms (ab)use it in PIC code, but their linkers get confused if
cannam@85 4558 # the symbol is explicitly referenced. Since portable code cannot
cannam@85 4559 # rely on this symbol name, it's probably fine to never include it in
cannam@85 4560 # preloaded symbol tables.
cannam@85 4561 # Exclude shared library initialization/finalization symbols.
cannam@85 4562 dnl Note also adjust exclude_expsyms for C++ above.
cannam@85 4563 extract_expsyms_cmds=
cannam@85 4564
cannam@85 4565 case $host_os in
cannam@85 4566 cygwin* | mingw* | pw32* | cegcc*)
cannam@85 4567 # FIXME: the MSVC++ port hasn't been tested in a loooong time
cannam@85 4568 # When not using gcc, we currently assume that we are using
cannam@85 4569 # Microsoft Visual C++.
cannam@85 4570 if test "$GCC" != yes; then
cannam@85 4571 with_gnu_ld=no
cannam@85 4572 fi
cannam@85 4573 ;;
cannam@85 4574 interix*)
cannam@85 4575 # we just hope/assume this is gcc and not c89 (= MSVC++)
cannam@85 4576 with_gnu_ld=yes
cannam@85 4577 ;;
cannam@85 4578 openbsd*)
cannam@85 4579 with_gnu_ld=no
cannam@85 4580 ;;
cannam@85 4581 linux* | k*bsd*-gnu | gnu*)
cannam@85 4582 _LT_TAGVAR(link_all_deplibs, $1)=no
cannam@85 4583 ;;
cannam@85 4584 esac
cannam@85 4585
cannam@85 4586 _LT_TAGVAR(ld_shlibs, $1)=yes
cannam@85 4587
cannam@85 4588 # On some targets, GNU ld is compatible enough with the native linker
cannam@85 4589 # that we're better off using the native interface for both.
cannam@85 4590 lt_use_gnu_ld_interface=no
cannam@85 4591 if test "$with_gnu_ld" = yes; then
cannam@85 4592 case $host_os in
cannam@85 4593 aix*)
cannam@85 4594 # The AIX port of GNU ld has always aspired to compatibility
cannam@85 4595 # with the native linker. However, as the warning in the GNU ld
cannam@85 4596 # block says, versions before 2.19.5* couldn't really create working
cannam@85 4597 # shared libraries, regardless of the interface used.
cannam@85 4598 case `$LD -v 2>&1` in
cannam@85 4599 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
cannam@85 4600 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
cannam@85 4601 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
cannam@85 4602 *)
cannam@85 4603 lt_use_gnu_ld_interface=yes
cannam@85 4604 ;;
cannam@85 4605 esac
cannam@85 4606 ;;
cannam@85 4607 *)
cannam@85 4608 lt_use_gnu_ld_interface=yes
cannam@85 4609 ;;
cannam@85 4610 esac
cannam@85 4611 fi
cannam@85 4612
cannam@85 4613 if test "$lt_use_gnu_ld_interface" = yes; then
cannam@85 4614 # If archive_cmds runs LD, not CC, wlarc should be empty
cannam@85 4615 wlarc='${wl}'
cannam@85 4616
cannam@85 4617 # Set some defaults for GNU ld with shared library support. These
cannam@85 4618 # are reset later if shared libraries are not supported. Putting them
cannam@85 4619 # here allows them to be overridden if necessary.
cannam@85 4620 runpath_var=LD_RUN_PATH
cannam@85 4621 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
cannam@85 4622 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
cannam@85 4623 # ancient GNU ld didn't support --whole-archive et. al.
cannam@85 4624 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
cannam@85 4625 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
cannam@85 4626 else
cannam@85 4627 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@85 4628 fi
cannam@85 4629 supports_anon_versioning=no
cannam@85 4630 case `$LD -v 2>&1` in
cannam@85 4631 *GNU\ gold*) supports_anon_versioning=yes ;;
cannam@85 4632 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
cannam@85 4633 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
cannam@85 4634 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
cannam@85 4635 *\ 2.11.*) ;; # other 2.11 versions
cannam@85 4636 *) supports_anon_versioning=yes ;;
cannam@85 4637 esac
cannam@85 4638
cannam@85 4639 # See if GNU ld supports shared libraries.
cannam@85 4640 case $host_os in
cannam@85 4641 aix[[3-9]]*)
cannam@85 4642 # On AIX/PPC, the GNU linker is very broken
cannam@85 4643 if test "$host_cpu" != ia64; then
cannam@85 4644 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 4645 cat <<_LT_EOF 1>&2
cannam@85 4646
cannam@85 4647 *** Warning: the GNU linker, at least up to release 2.19, is reported
cannam@85 4648 *** to be unable to reliably create shared libraries on AIX.
cannam@85 4649 *** Therefore, libtool is disabling shared libraries support. If you
cannam@85 4650 *** really care for shared libraries, you may want to install binutils
cannam@85 4651 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
cannam@85 4652 *** You will then need to restart the configuration process.
cannam@85 4653
cannam@85 4654 _LT_EOF
cannam@85 4655 fi
cannam@85 4656 ;;
cannam@85 4657
cannam@85 4658 amigaos*)
cannam@85 4659 case $host_cpu in
cannam@85 4660 powerpc)
cannam@85 4661 # see comment about AmigaOS4 .so support
cannam@85 4662 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
cannam@85 4663 _LT_TAGVAR(archive_expsym_cmds, $1)=''
cannam@85 4664 ;;
cannam@85 4665 m68k)
cannam@85 4666 _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@85 4667 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@85 4668 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@85 4669 ;;
cannam@85 4670 esac
cannam@85 4671 ;;
cannam@85 4672
cannam@85 4673 beos*)
cannam@85 4674 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
cannam@85 4675 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@85 4676 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
cannam@85 4677 # support --undefined. This deserves some investigation. FIXME
cannam@85 4678 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
cannam@85 4679 else
cannam@85 4680 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 4681 fi
cannam@85 4682 ;;
cannam@85 4683
cannam@85 4684 cygwin* | mingw* | pw32* | cegcc*)
cannam@85 4685 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
cannam@85 4686 # as there is no search path for DLLs.
cannam@85 4687 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@85 4688 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
cannam@85 4689 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@85 4690 _LT_TAGVAR(always_export_symbols, $1)=no
cannam@85 4691 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@85 4692 _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@85 4693 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
cannam@85 4694
cannam@85 4695 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
cannam@85 4696 _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@85 4697 # If the export-symbols file already is a .def file (1st line
cannam@85 4698 # is EXPORTS), use it as is; otherwise, prepend...
cannam@85 4699 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
cannam@85 4700 cp $export_symbols $output_objdir/$soname.def;
cannam@85 4701 else
cannam@85 4702 echo EXPORTS > $output_objdir/$soname.def;
cannam@85 4703 cat $export_symbols >> $output_objdir/$soname.def;
cannam@85 4704 fi~
cannam@85 4705 $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@85 4706 else
cannam@85 4707 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 4708 fi
cannam@85 4709 ;;
cannam@85 4710
cannam@85 4711 haiku*)
cannam@85 4712 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
cannam@85 4713 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@85 4714 ;;
cannam@85 4715
cannam@85 4716 interix[[3-9]]*)
cannam@85 4717 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@85 4718 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 4719 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
cannam@85 4720 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
cannam@85 4721 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
cannam@85 4722 # Instead, shared libraries are loaded at an image base (0x10000000 by
cannam@85 4723 # default) and relocated if they conflict, which is a slow very memory
cannam@85 4724 # consuming and fragmenting process. To avoid this, we pick a random,
cannam@85 4725 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
cannam@85 4726 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
cannam@85 4727 _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@85 4728 _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@85 4729 ;;
cannam@85 4730
cannam@85 4731 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
cannam@85 4732 tmp_diet=no
cannam@85 4733 if test "$host_os" = linux-dietlibc; then
cannam@85 4734 case $cc_basename in
cannam@85 4735 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
cannam@85 4736 esac
cannam@85 4737 fi
cannam@85 4738 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
cannam@85 4739 && test "$tmp_diet" = no
cannam@85 4740 then
cannam@85 4741 tmp_addflag=' $pic_flag'
cannam@85 4742 tmp_sharedflag='-shared'
cannam@85 4743 case $cc_basename,$host_cpu in
cannam@85 4744 pgcc*) # Portland Group C compiler
cannam@85 4745 _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@85 4746 tmp_addflag=' $pic_flag'
cannam@85 4747 ;;
cannam@85 4748 pgf77* | pgf90* | pgf95* | pgfortran*)
cannam@85 4749 # Portland Group f77 and f90 compilers
cannam@85 4750 _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@85 4751 tmp_addflag=' $pic_flag -Mnomain' ;;
cannam@85 4752 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
cannam@85 4753 tmp_addflag=' -i_dynamic' ;;
cannam@85 4754 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
cannam@85 4755 tmp_addflag=' -i_dynamic -nofor_main' ;;
cannam@85 4756 ifc* | ifort*) # Intel Fortran compiler
cannam@85 4757 tmp_addflag=' -nofor_main' ;;
cannam@85 4758 lf95*) # Lahey Fortran 8.1
cannam@85 4759 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@85 4760 tmp_sharedflag='--shared' ;;
cannam@85 4761 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
cannam@85 4762 tmp_sharedflag='-qmkshrobj'
cannam@85 4763 tmp_addflag= ;;
cannam@85 4764 nvcc*) # Cuda Compiler Driver 2.2
cannam@85 4765 _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@85 4766 _LT_TAGVAR(compiler_needs_object, $1)=yes
cannam@85 4767 ;;
cannam@85 4768 esac
cannam@85 4769 case `$CC -V 2>&1 | sed 5q` in
cannam@85 4770 *Sun\ C*) # Sun C 5.9
cannam@85 4771 _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@85 4772 _LT_TAGVAR(compiler_needs_object, $1)=yes
cannam@85 4773 tmp_sharedflag='-G' ;;
cannam@85 4774 *Sun\ F*) # Sun Fortran 8.3
cannam@85 4775 tmp_sharedflag='-G' ;;
cannam@85 4776 esac
cannam@85 4777 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
cannam@85 4778
cannam@85 4779 if test "x$supports_anon_versioning" = xyes; then
cannam@85 4780 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
cannam@85 4781 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
cannam@85 4782 echo "local: *; };" >> $output_objdir/$libname.ver~
cannam@85 4783 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
cannam@85 4784 fi
cannam@85 4785
cannam@85 4786 case $cc_basename in
cannam@85 4787 xlf* | bgf* | bgxlf* | mpixlf*)
cannam@85 4788 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
cannam@85 4789 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
cannam@85 4790 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
cannam@85 4791 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
cannam@85 4792 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
cannam@85 4793 if test "x$supports_anon_versioning" = xyes; then
cannam@85 4794 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
cannam@85 4795 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
cannam@85 4796 echo "local: *; };" >> $output_objdir/$libname.ver~
cannam@85 4797 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
cannam@85 4798 fi
cannam@85 4799 ;;
cannam@85 4800 esac
cannam@85 4801 else
cannam@85 4802 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 4803 fi
cannam@85 4804 ;;
cannam@85 4805
cannam@85 4806 netbsd* | netbsdelf*-gnu)
cannam@85 4807 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
cannam@85 4808 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
cannam@85 4809 wlarc=
cannam@85 4810 else
cannam@85 4811 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
cannam@85 4812 _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@85 4813 fi
cannam@85 4814 ;;
cannam@85 4815
cannam@85 4816 solaris*)
cannam@85 4817 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
cannam@85 4818 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 4819 cat <<_LT_EOF 1>&2
cannam@85 4820
cannam@85 4821 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
cannam@85 4822 *** create shared libraries on Solaris systems. Therefore, libtool
cannam@85 4823 *** is disabling shared libraries support. We urge you to upgrade GNU
cannam@85 4824 *** binutils to release 2.9.1 or newer. Another option is to modify
cannam@85 4825 *** your PATH or compiler configuration so that the native linker is
cannam@85 4826 *** used, and then restart.
cannam@85 4827
cannam@85 4828 _LT_EOF
cannam@85 4829 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
cannam@85 4830 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
cannam@85 4831 _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@85 4832 else
cannam@85 4833 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 4834 fi
cannam@85 4835 ;;
cannam@85 4836
cannam@85 4837 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
cannam@85 4838 case `$LD -v 2>&1` in
cannam@85 4839 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
cannam@85 4840 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 4841 cat <<_LT_EOF 1>&2
cannam@85 4842
cannam@85 4843 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
cannam@85 4844 *** reliably create shared libraries on SCO systems. Therefore, libtool
cannam@85 4845 *** is disabling shared libraries support. We urge you to upgrade GNU
cannam@85 4846 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
cannam@85 4847 *** your PATH or compiler configuration so that the native linker is
cannam@85 4848 *** used, and then restart.
cannam@85 4849
cannam@85 4850 _LT_EOF
cannam@85 4851 ;;
cannam@85 4852 *)
cannam@85 4853 # For security reasons, it is highly recommended that you always
cannam@85 4854 # use absolute paths for naming shared libraries, and exclude the
cannam@85 4855 # DT_RUNPATH tag from executables and libraries. But doing so
cannam@85 4856 # requires that you compile everything twice, which is a pain.
cannam@85 4857 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
cannam@85 4858 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
cannam@85 4859 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
cannam@85 4860 _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@85 4861 else
cannam@85 4862 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 4863 fi
cannam@85 4864 ;;
cannam@85 4865 esac
cannam@85 4866 ;;
cannam@85 4867
cannam@85 4868 sunos4*)
cannam@85 4869 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
cannam@85 4870 wlarc=
cannam@85 4871 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@85 4872 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 4873 ;;
cannam@85 4874
cannam@85 4875 *)
cannam@85 4876 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
cannam@85 4877 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
cannam@85 4878 _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@85 4879 else
cannam@85 4880 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 4881 fi
cannam@85 4882 ;;
cannam@85 4883 esac
cannam@85 4884
cannam@85 4885 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
cannam@85 4886 runpath_var=
cannam@85 4887 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
cannam@85 4888 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
cannam@85 4889 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@85 4890 fi
cannam@85 4891 else
cannam@85 4892 # PORTME fill in a description of your system's linker (not GNU ld)
cannam@85 4893 case $host_os in
cannam@85 4894 aix3*)
cannam@85 4895 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@85 4896 _LT_TAGVAR(always_export_symbols, $1)=yes
cannam@85 4897 _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@85 4898 # Note: this linker hardcodes the directories in LIBPATH if there
cannam@85 4899 # are no directories specified by -L.
cannam@85 4900 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@85 4901 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
cannam@85 4902 # Neither direct hardcoding nor static linking is supported with a
cannam@85 4903 # broken collect2.
cannam@85 4904 _LT_TAGVAR(hardcode_direct, $1)=unsupported
cannam@85 4905 fi
cannam@85 4906 ;;
cannam@85 4907
cannam@85 4908 aix[[4-9]]*)
cannam@85 4909 if test "$host_cpu" = ia64; then
cannam@85 4910 # On IA64, the linker does run time linking by default, so we don't
cannam@85 4911 # have to do anything special.
cannam@85 4912 aix_use_runtimelinking=no
cannam@85 4913 exp_sym_flag='-Bexport'
cannam@85 4914 no_entry_flag=""
cannam@85 4915 else
cannam@85 4916 # If we're using GNU nm, then we don't want the "-C" option.
cannam@85 4917 # -C means demangle to AIX nm, but means don't demangle with GNU nm
cannam@85 4918 # Also, AIX nm treats weak defined symbols like other global
cannam@85 4919 # defined symbols, whereas GNU nm marks them as "W".
cannam@85 4920 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
cannam@85 4921 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
cannam@85 4922 else
cannam@85 4923 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
cannam@85 4924 fi
cannam@85 4925 aix_use_runtimelinking=no
cannam@85 4926
cannam@85 4927 # Test if we are trying to use run time linking or normal
cannam@85 4928 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
cannam@85 4929 # need to do runtime linking.
cannam@85 4930 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
cannam@85 4931 for ld_flag in $LDFLAGS; do
cannam@85 4932 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
cannam@85 4933 aix_use_runtimelinking=yes
cannam@85 4934 break
cannam@85 4935 fi
cannam@85 4936 done
cannam@85 4937 ;;
cannam@85 4938 esac
cannam@85 4939
cannam@85 4940 exp_sym_flag='-bexport'
cannam@85 4941 no_entry_flag='-bnoentry'
cannam@85 4942 fi
cannam@85 4943
cannam@85 4944 # When large executables or shared objects are built, AIX ld can
cannam@85 4945 # have problems creating the table of contents. If linking a library
cannam@85 4946 # or program results in "error TOC overflow" add -mminimal-toc to
cannam@85 4947 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
cannam@85 4948 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
cannam@85 4949
cannam@85 4950 _LT_TAGVAR(archive_cmds, $1)=''
cannam@85 4951 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@85 4952 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
cannam@85 4953 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
cannam@85 4954 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@85 4955 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
cannam@85 4956
cannam@85 4957 if test "$GCC" = yes; then
cannam@85 4958 case $host_os in aix4.[[012]]|aix4.[[012]].*)
cannam@85 4959 # We only want to do this on AIX 4.2 and lower, the check
cannam@85 4960 # below for broken collect2 doesn't work under 4.3+
cannam@85 4961 collect2name=`${CC} -print-prog-name=collect2`
cannam@85 4962 if test -f "$collect2name" &&
cannam@85 4963 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
cannam@85 4964 then
cannam@85 4965 # We have reworked collect2
cannam@85 4966 :
cannam@85 4967 else
cannam@85 4968 # We have old collect2
cannam@85 4969 _LT_TAGVAR(hardcode_direct, $1)=unsupported
cannam@85 4970 # It fails to find uninstalled libraries when the uninstalled
cannam@85 4971 # path is not listed in the libpath. Setting hardcode_minus_L
cannam@85 4972 # to unsupported forces relinking
cannam@85 4973 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@85 4974 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@85 4975 _LT_TAGVAR(hardcode_libdir_separator, $1)=
cannam@85 4976 fi
cannam@85 4977 ;;
cannam@85 4978 esac
cannam@85 4979 shared_flag='-shared'
cannam@85 4980 if test "$aix_use_runtimelinking" = yes; then
cannam@85 4981 shared_flag="$shared_flag "'${wl}-G'
cannam@85 4982 fi
cannam@85 4983 _LT_TAGVAR(link_all_deplibs, $1)=no
cannam@85 4984 else
cannam@85 4985 # not using gcc
cannam@85 4986 if test "$host_cpu" = ia64; then
cannam@85 4987 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
cannam@85 4988 # chokes on -Wl,-G. The following line is correct:
cannam@85 4989 shared_flag='-G'
cannam@85 4990 else
cannam@85 4991 if test "$aix_use_runtimelinking" = yes; then
cannam@85 4992 shared_flag='${wl}-G'
cannam@85 4993 else
cannam@85 4994 shared_flag='${wl}-bM:SRE'
cannam@85 4995 fi
cannam@85 4996 fi
cannam@85 4997 fi
cannam@85 4998
cannam@85 4999 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
cannam@85 5000 # It seems that -bexpall does not export symbols beginning with
cannam@85 5001 # underscore (_), so it is better to generate a list of symbols to export.
cannam@85 5002 _LT_TAGVAR(always_export_symbols, $1)=yes
cannam@85 5003 if test "$aix_use_runtimelinking" = yes; then
cannam@85 5004 # Warning - without using the other runtime loading flags (-brtl),
cannam@85 5005 # -berok will link without error, but may produce a broken library.
cannam@85 5006 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
cannam@85 5007 # Determine the default libpath from the value encoded in an
cannam@85 5008 # empty executable.
cannam@85 5009 _LT_SYS_MODULE_PATH_AIX([$1])
cannam@85 5010 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
cannam@85 5011 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
cannam@85 5012 else
cannam@85 5013 if test "$host_cpu" = ia64; then
cannam@85 5014 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
cannam@85 5015 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
cannam@85 5016 _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@85 5017 else
cannam@85 5018 # Determine the default libpath from the value encoded in an
cannam@85 5019 # empty executable.
cannam@85 5020 _LT_SYS_MODULE_PATH_AIX([$1])
cannam@85 5021 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
cannam@85 5022 # Warning - without using the other run time loading flags,
cannam@85 5023 # -berok will link without error, but may produce a broken library.
cannam@85 5024 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
cannam@85 5025 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
cannam@85 5026 if test "$with_gnu_ld" = yes; then
cannam@85 5027 # We only use this code for GNU lds that support --whole-archive.
cannam@85 5028 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
cannam@85 5029 else
cannam@85 5030 # Exported symbols can be pulled into shared objects from archives
cannam@85 5031 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
cannam@85 5032 fi
cannam@85 5033 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
cannam@85 5034 # This is similar to how AIX traditionally builds its shared libraries.
cannam@85 5035 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
cannam@85 5036 fi
cannam@85 5037 fi
cannam@85 5038 ;;
cannam@85 5039
cannam@85 5040 amigaos*)
cannam@85 5041 case $host_cpu in
cannam@85 5042 powerpc)
cannam@85 5043 # see comment about AmigaOS4 .so support
cannam@85 5044 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
cannam@85 5045 _LT_TAGVAR(archive_expsym_cmds, $1)=''
cannam@85 5046 ;;
cannam@85 5047 m68k)
cannam@85 5048 _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@85 5049 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@85 5050 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@85 5051 ;;
cannam@85 5052 esac
cannam@85 5053 ;;
cannam@85 5054
cannam@85 5055 bsdi[[45]]*)
cannam@85 5056 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
cannam@85 5057 ;;
cannam@85 5058
cannam@85 5059 cygwin* | mingw* | pw32* | cegcc*)
cannam@85 5060 # When not using gcc, we currently assume that we are using
cannam@85 5061 # Microsoft Visual C++.
cannam@85 5062 # hardcode_libdir_flag_spec is actually meaningless, as there is
cannam@85 5063 # no search path for DLLs.
cannam@85 5064 case $cc_basename in
cannam@85 5065 cl*)
cannam@85 5066 # Native MSVC
cannam@85 5067 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
cannam@85 5068 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@85 5069 _LT_TAGVAR(always_export_symbols, $1)=yes
cannam@85 5070 _LT_TAGVAR(file_list_spec, $1)='@'
cannam@85 5071 # Tell ltmain to make .lib files, not .a files.
cannam@85 5072 libext=lib
cannam@85 5073 # Tell ltmain to make .dll files, not .so files.
cannam@85 5074 shrext_cmds=".dll"
cannam@85 5075 # FIXME: Setting linknames here is a bad hack.
cannam@85 5076 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
cannam@85 5077 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
cannam@85 5078 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
cannam@85 5079 else
cannam@85 5080 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
cannam@85 5081 fi~
cannam@85 5082 $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@85 5083 linknames='
cannam@85 5084 # The linker will not automatically build a static lib if we build a DLL.
cannam@85 5085 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
cannam@85 5086 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@85 5087 _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@85 5088 # Don't use ranlib
cannam@85 5089 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
cannam@85 5090 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
cannam@85 5091 lt_tool_outputfile="@TOOL_OUTPUT@"~
cannam@85 5092 case $lt_outputfile in
cannam@85 5093 *.exe|*.EXE) ;;
cannam@85 5094 *)
cannam@85 5095 lt_outputfile="$lt_outputfile.exe"
cannam@85 5096 lt_tool_outputfile="$lt_tool_outputfile.exe"
cannam@85 5097 ;;
cannam@85 5098 esac~
cannam@85 5099 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
cannam@85 5100 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
cannam@85 5101 $RM "$lt_outputfile.manifest";
cannam@85 5102 fi'
cannam@85 5103 ;;
cannam@85 5104 *)
cannam@85 5105 # Assume MSVC wrapper
cannam@85 5106 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
cannam@85 5107 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@85 5108 # Tell ltmain to make .lib files, not .a files.
cannam@85 5109 libext=lib
cannam@85 5110 # Tell ltmain to make .dll files, not .so files.
cannam@85 5111 shrext_cmds=".dll"
cannam@85 5112 # FIXME: Setting linknames here is a bad hack.
cannam@85 5113 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
cannam@85 5114 # The linker will automatically build a .lib file if we build a DLL.
cannam@85 5115 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
cannam@85 5116 # FIXME: Should let the user specify the lib program.
cannam@85 5117 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
cannam@85 5118 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@85 5119 ;;
cannam@85 5120 esac
cannam@85 5121 ;;
cannam@85 5122
cannam@85 5123 darwin* | rhapsody*)
cannam@85 5124 _LT_DARWIN_LINKER_FEATURES($1)
cannam@85 5125 ;;
cannam@85 5126
cannam@85 5127 dgux*)
cannam@85 5128 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@85 5129 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@85 5130 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5131 ;;
cannam@85 5132
cannam@85 5133 freebsd1*)
cannam@85 5134 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 5135 ;;
cannam@85 5136
cannam@85 5137 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
cannam@85 5138 # support. Future versions do this automatically, but an explicit c++rt0.o
cannam@85 5139 # does not break anything, and helps significantly (at the cost of a little
cannam@85 5140 # extra space).
cannam@85 5141 freebsd2.2*)
cannam@85 5142 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
cannam@85 5143 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@85 5144 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@85 5145 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5146 ;;
cannam@85 5147
cannam@85 5148 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
cannam@85 5149 freebsd2*)
cannam@85 5150 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
cannam@85 5151 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@85 5152 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@85 5153 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5154 ;;
cannam@85 5155
cannam@85 5156 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
cannam@85 5157 freebsd* | dragonfly*)
cannam@85 5158 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 5159 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@85 5160 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@85 5161 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5162 ;;
cannam@85 5163
cannam@85 5164 hpux9*)
cannam@85 5165 if test "$GCC" = yes; then
cannam@85 5166 _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
cannam@85 5167 else
cannam@85 5168 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
cannam@85 5169 fi
cannam@85 5170 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
cannam@85 5171 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 5172 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@85 5173
cannam@85 5174 # hardcode_minus_L: Not really in the search PATH,
cannam@85 5175 # but as the default location of the library.
cannam@85 5176 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@85 5177 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
cannam@85 5178 ;;
cannam@85 5179
cannam@85 5180 hpux10*)
cannam@85 5181 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
cannam@85 5182 _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@85 5183 else
cannam@85 5184 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
cannam@85 5185 fi
cannam@85 5186 if test "$with_gnu_ld" = no; then
cannam@85 5187 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
cannam@85 5188 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
cannam@85 5189 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 5190 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@85 5191 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
cannam@85 5192 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
cannam@85 5193 # hardcode_minus_L: Not really in the search PATH,
cannam@85 5194 # but as the default location of the library.
cannam@85 5195 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@85 5196 fi
cannam@85 5197 ;;
cannam@85 5198
cannam@85 5199 hpux11*)
cannam@85 5200 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
cannam@85 5201 case $host_cpu in
cannam@85 5202 hppa*64*)
cannam@85 5203 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 5204 ;;
cannam@85 5205 ia64*)
cannam@85 5206 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 5207 ;;
cannam@85 5208 *)
cannam@85 5209 _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@85 5210 ;;
cannam@85 5211 esac
cannam@85 5212 else
cannam@85 5213 case $host_cpu in
cannam@85 5214 hppa*64*)
cannam@85 5215 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 5216 ;;
cannam@85 5217 ia64*)
cannam@85 5218 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 5219 ;;
cannam@85 5220 *)
cannam@85 5221 m4_if($1, [], [
cannam@85 5222 # Older versions of the 11.00 compiler do not understand -b yet
cannam@85 5223 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
cannam@85 5224 _LT_LINKER_OPTION([if $CC understands -b],
cannam@85 5225 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
cannam@85 5226 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
cannam@85 5227 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
cannam@85 5228 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
cannam@85 5229 ;;
cannam@85 5230 esac
cannam@85 5231 fi
cannam@85 5232 if test "$with_gnu_ld" = no; then
cannam@85 5233 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
cannam@85 5234 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 5235
cannam@85 5236 case $host_cpu in
cannam@85 5237 hppa*64*|ia64*)
cannam@85 5238 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@85 5239 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5240 ;;
cannam@85 5241 *)
cannam@85 5242 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@85 5243 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
cannam@85 5244 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
cannam@85 5245
cannam@85 5246 # hardcode_minus_L: Not really in the search PATH,
cannam@85 5247 # but as the default location of the library.
cannam@85 5248 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@85 5249 ;;
cannam@85 5250 esac
cannam@85 5251 fi
cannam@85 5252 ;;
cannam@85 5253
cannam@85 5254 irix5* | irix6* | nonstopux*)
cannam@85 5255 if test "$GCC" = yes; then
cannam@85 5256 _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@85 5257 # Try to use the -exported_symbol ld option, if it does not
cannam@85 5258 # work, assume that -exports_file does not work either and
cannam@85 5259 # implicitly export all symbols.
cannam@85 5260 # This should be the same for all languages, so no per-tag cache variable.
cannam@85 5261 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
cannam@85 5262 [lt_cv_irix_exported_symbol],
cannam@85 5263 [save_LDFLAGS="$LDFLAGS"
cannam@85 5264 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
cannam@85 5265 AC_LINK_IFELSE(
cannam@85 5266 [AC_LANG_SOURCE(
cannam@85 5267 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
cannam@85 5268 [C++], [[int foo (void) { return 0; }]],
cannam@85 5269 [Fortran 77], [[
cannam@85 5270 subroutine foo
cannam@85 5271 end]],
cannam@85 5272 [Fortran], [[
cannam@85 5273 subroutine foo
cannam@85 5274 end]])])],
cannam@85 5275 [lt_cv_irix_exported_symbol=yes],
cannam@85 5276 [lt_cv_irix_exported_symbol=no])
cannam@85 5277 LDFLAGS="$save_LDFLAGS"])
cannam@85 5278 if test "$lt_cv_irix_exported_symbol" = yes; then
cannam@85 5279 _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@85 5280 fi
cannam@85 5281 else
cannam@85 5282 _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@85 5283 _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@85 5284 fi
cannam@85 5285 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
cannam@85 5286 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
cannam@85 5287 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 5288 _LT_TAGVAR(inherit_rpath, $1)=yes
cannam@85 5289 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@85 5290 ;;
cannam@85 5291
cannam@85 5292 netbsd* | netbsdelf*-gnu)
cannam@85 5293 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
cannam@85 5294 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
cannam@85 5295 else
cannam@85 5296 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
cannam@85 5297 fi
cannam@85 5298 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@85 5299 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@85 5300 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5301 ;;
cannam@85 5302
cannam@85 5303 newsos6)
cannam@85 5304 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@85 5305 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@85 5306 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
cannam@85 5307 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 5308 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5309 ;;
cannam@85 5310
cannam@85 5311 *nto* | *qnx*)
cannam@85 5312 ;;
cannam@85 5313
cannam@85 5314 openbsd*)
cannam@85 5315 if test -f /usr/libexec/ld.so; then
cannam@85 5316 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@85 5317 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5318 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
cannam@85 5319 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
cannam@85 5320 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 5321 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
cannam@85 5322 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
cannam@85 5323 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
cannam@85 5324 else
cannam@85 5325 case $host_os in
cannam@85 5326 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
cannam@85 5327 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
cannam@85 5328 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@85 5329 ;;
cannam@85 5330 *)
cannam@85 5331 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 5332 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
cannam@85 5333 ;;
cannam@85 5334 esac
cannam@85 5335 fi
cannam@85 5336 else
cannam@85 5337 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 5338 fi
cannam@85 5339 ;;
cannam@85 5340
cannam@85 5341 os2*)
cannam@85 5342 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@85 5343 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@85 5344 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@85 5345 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
cannam@85 5346 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
cannam@85 5347 ;;
cannam@85 5348
cannam@85 5349 osf3*)
cannam@85 5350 if test "$GCC" = yes; then
cannam@85 5351 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
cannam@85 5352 _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@85 5353 else
cannam@85 5354 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
cannam@85 5355 _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@85 5356 fi
cannam@85 5357 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
cannam@85 5358 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
cannam@85 5359 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 5360 ;;
cannam@85 5361
cannam@85 5362 osf4* | osf5*) # as osf3* with the addition of -msym flag
cannam@85 5363 if test "$GCC" = yes; then
cannam@85 5364 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
cannam@85 5365 _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@85 5366 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
cannam@85 5367 else
cannam@85 5368 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
cannam@85 5369 _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@85 5370 _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@85 5371 $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@85 5372
cannam@85 5373 # Both c and cxx compiler support -rpath directly
cannam@85 5374 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
cannam@85 5375 fi
cannam@85 5376 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
cannam@85 5377 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 5378 ;;
cannam@85 5379
cannam@85 5380 solaris*)
cannam@85 5381 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
cannam@85 5382 if test "$GCC" = yes; then
cannam@85 5383 wlarc='${wl}'
cannam@85 5384 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 5385 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
cannam@85 5386 $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@85 5387 else
cannam@85 5388 case `$CC -V 2>&1` in
cannam@85 5389 *"Compilers 5.0"*)
cannam@85 5390 wlarc=''
cannam@85 5391 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@85 5392 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
cannam@85 5393 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
cannam@85 5394 ;;
cannam@85 5395 *)
cannam@85 5396 wlarc='${wl}'
cannam@85 5397 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 5398 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
cannam@85 5399 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
cannam@85 5400 ;;
cannam@85 5401 esac
cannam@85 5402 fi
cannam@85 5403 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@85 5404 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5405 case $host_os in
cannam@85 5406 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
cannam@85 5407 *)
cannam@85 5408 # The compiler driver will combine and reorder linker options,
cannam@85 5409 # but understands `-z linker_flag'. GCC discards it without `$wl',
cannam@85 5410 # but is careful enough not to reorder.
cannam@85 5411 # Supported since Solaris 2.6 (maybe 2.5.1?)
cannam@85 5412 if test "$GCC" = yes; then
cannam@85 5413 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
cannam@85 5414 else
cannam@85 5415 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
cannam@85 5416 fi
cannam@85 5417 ;;
cannam@85 5418 esac
cannam@85 5419 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@85 5420 ;;
cannam@85 5421
cannam@85 5422 sunos4*)
cannam@85 5423 if test "x$host_vendor" = xsequent; then
cannam@85 5424 # Use $CC to link under sequent, because it throws in some extra .o
cannam@85 5425 # files that make .init and .fini sections work.
cannam@85 5426 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 5427 else
cannam@85 5428 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
cannam@85 5429 fi
cannam@85 5430 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@85 5431 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@85 5432 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@85 5433 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5434 ;;
cannam@85 5435
cannam@85 5436 sysv4)
cannam@85 5437 case $host_vendor in
cannam@85 5438 sni)
cannam@85 5439 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@85 5440 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
cannam@85 5441 ;;
cannam@85 5442 siemens)
cannam@85 5443 ## LD is ld it makes a PLAMLIB
cannam@85 5444 ## CC just makes a GrossModule.
cannam@85 5445 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
cannam@85 5446 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
cannam@85 5447 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@85 5448 ;;
cannam@85 5449 motorola)
cannam@85 5450 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@85 5451 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
cannam@85 5452 ;;
cannam@85 5453 esac
cannam@85 5454 runpath_var='LD_RUN_PATH'
cannam@85 5455 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5456 ;;
cannam@85 5457
cannam@85 5458 sysv4.3*)
cannam@85 5459 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@85 5460 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5461 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
cannam@85 5462 ;;
cannam@85 5463
cannam@85 5464 sysv4*MP*)
cannam@85 5465 if test -d /usr/nec; then
cannam@85 5466 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@85 5467 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5468 runpath_var=LD_RUN_PATH
cannam@85 5469 hardcode_runpath_var=yes
cannam@85 5470 _LT_TAGVAR(ld_shlibs, $1)=yes
cannam@85 5471 fi
cannam@85 5472 ;;
cannam@85 5473
cannam@85 5474 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
cannam@85 5475 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
cannam@85 5476 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@85 5477 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5478 runpath_var='LD_RUN_PATH'
cannam@85 5479
cannam@85 5480 if test "$GCC" = yes; then
cannam@85 5481 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 5482 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 5483 else
cannam@85 5484 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 5485 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 5486 fi
cannam@85 5487 ;;
cannam@85 5488
cannam@85 5489 sysv5* | sco3.2v5* | sco5v6*)
cannam@85 5490 # Note: We can NOT use -z defs as we might desire, because we do not
cannam@85 5491 # link with -lc, and that would cause any symbols used from libc to
cannam@85 5492 # always be unresolved, which means just about no library would
cannam@85 5493 # ever link correctly. If we're not using GNU ld we use -z text
cannam@85 5494 # though, which does catch some bad symbols but isn't as heavy-handed
cannam@85 5495 # as -z defs.
cannam@85 5496 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
cannam@85 5497 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
cannam@85 5498 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@85 5499 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5500 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
cannam@85 5501 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
cannam@85 5502 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@85 5503 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
cannam@85 5504 runpath_var='LD_RUN_PATH'
cannam@85 5505
cannam@85 5506 if test "$GCC" = yes; then
cannam@85 5507 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 5508 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 5509 else
cannam@85 5510 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 5511 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 5512 fi
cannam@85 5513 ;;
cannam@85 5514
cannam@85 5515 uts4*)
cannam@85 5516 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
cannam@85 5517 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@85 5518 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 5519 ;;
cannam@85 5520
cannam@85 5521 *)
cannam@85 5522 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 5523 ;;
cannam@85 5524 esac
cannam@85 5525
cannam@85 5526 if test x$host_vendor = xsni; then
cannam@85 5527 case $host in
cannam@85 5528 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
cannam@85 5529 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
cannam@85 5530 ;;
cannam@85 5531 esac
cannam@85 5532 fi
cannam@85 5533 fi
cannam@85 5534 ])
cannam@85 5535 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
cannam@85 5536 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
cannam@85 5537
cannam@85 5538 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
cannam@85 5539
cannam@85 5540 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
cannam@85 5541 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
cannam@85 5542 _LT_DECL([], [extract_expsyms_cmds], [2],
cannam@85 5543 [The commands to extract the exported symbol list from a shared archive])
cannam@85 5544
cannam@85 5545 #
cannam@85 5546 # Do we need to explicitly link libc?
cannam@85 5547 #
cannam@85 5548 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
cannam@85 5549 x|xyes)
cannam@85 5550 # Assume -lc should be added
cannam@85 5551 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
cannam@85 5552
cannam@85 5553 if test "$enable_shared" = yes && test "$GCC" = yes; then
cannam@85 5554 case $_LT_TAGVAR(archive_cmds, $1) in
cannam@85 5555 *'~'*)
cannam@85 5556 # FIXME: we may have to deal with multi-command sequences.
cannam@85 5557 ;;
cannam@85 5558 '$CC '*)
cannam@85 5559 # Test whether the compiler implicitly links with -lc since on some
cannam@85 5560 # systems, -lgcc has to come before -lc. If gcc already passes -lc
cannam@85 5561 # to ld, don't add -lc before -lgcc.
cannam@85 5562 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
cannam@85 5563 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
cannam@85 5564 [$RM conftest*
cannam@85 5565 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
cannam@85 5566
cannam@85 5567 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
cannam@85 5568 soname=conftest
cannam@85 5569 lib=conftest
cannam@85 5570 libobjs=conftest.$ac_objext
cannam@85 5571 deplibs=
cannam@85 5572 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
cannam@85 5573 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
cannam@85 5574 compiler_flags=-v
cannam@85 5575 linker_flags=-v
cannam@85 5576 verstring=
cannam@85 5577 output_objdir=.
cannam@85 5578 libname=conftest
cannam@85 5579 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
cannam@85 5580 _LT_TAGVAR(allow_undefined_flag, $1)=
cannam@85 5581 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
cannam@85 5582 then
cannam@85 5583 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@85 5584 else
cannam@85 5585 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
cannam@85 5586 fi
cannam@85 5587 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
cannam@85 5588 else
cannam@85 5589 cat conftest.err 1>&5
cannam@85 5590 fi
cannam@85 5591 $RM conftest*
cannam@85 5592 ])
cannam@85 5593 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
cannam@85 5594 ;;
cannam@85 5595 esac
cannam@85 5596 fi
cannam@85 5597 ;;
cannam@85 5598 esac
cannam@85 5599
cannam@85 5600 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
cannam@85 5601 [Whether or not to add -lc for building shared libraries])
cannam@85 5602 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
cannam@85 5603 [enable_shared_with_static_runtimes], [0],
cannam@85 5604 [Whether or not to disallow shared libs when runtime libs are static])
cannam@85 5605 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
cannam@85 5606 [Compiler flag to allow reflexive dlopens])
cannam@85 5607 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
cannam@85 5608 [Compiler flag to generate shared objects directly from archives])
cannam@85 5609 _LT_TAGDECL([], [compiler_needs_object], [1],
cannam@85 5610 [Whether the compiler copes with passing no objects directly])
cannam@85 5611 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
cannam@85 5612 [Create an old-style archive from a shared archive])
cannam@85 5613 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
cannam@85 5614 [Create a temporary old-style archive to link instead of a shared archive])
cannam@85 5615 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
cannam@85 5616 _LT_TAGDECL([], [archive_expsym_cmds], [2])
cannam@85 5617 _LT_TAGDECL([], [module_cmds], [2],
cannam@85 5618 [Commands used to build a loadable module if different from building
cannam@85 5619 a shared archive.])
cannam@85 5620 _LT_TAGDECL([], [module_expsym_cmds], [2])
cannam@85 5621 _LT_TAGDECL([], [with_gnu_ld], [1],
cannam@85 5622 [Whether we are building with GNU ld or not])
cannam@85 5623 _LT_TAGDECL([], [allow_undefined_flag], [1],
cannam@85 5624 [Flag that allows shared libraries with undefined symbols to be built])
cannam@85 5625 _LT_TAGDECL([], [no_undefined_flag], [1],
cannam@85 5626 [Flag that enforces no undefined symbols])
cannam@85 5627 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
cannam@85 5628 [Flag to hardcode $libdir into a binary during linking.
cannam@85 5629 This must work even if $libdir does not exist])
cannam@85 5630 _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
cannam@85 5631 [[If ld is used when linking, flag to hardcode $libdir into a binary
cannam@85 5632 during linking. This must work even if $libdir does not exist]])
cannam@85 5633 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
cannam@85 5634 [Whether we need a single "-rpath" flag with a separated argument])
cannam@85 5635 _LT_TAGDECL([], [hardcode_direct], [0],
cannam@85 5636 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
cannam@85 5637 DIR into the resulting binary])
cannam@85 5638 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
cannam@85 5639 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
cannam@85 5640 DIR into the resulting binary and the resulting library dependency is
cannam@85 5641 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
cannam@85 5642 library is relocated])
cannam@85 5643 _LT_TAGDECL([], [hardcode_minus_L], [0],
cannam@85 5644 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
cannam@85 5645 into the resulting binary])
cannam@85 5646 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
cannam@85 5647 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
cannam@85 5648 into the resulting binary])
cannam@85 5649 _LT_TAGDECL([], [hardcode_automatic], [0],
cannam@85 5650 [Set to "yes" if building a shared library automatically hardcodes DIR
cannam@85 5651 into the library and all subsequent libraries and executables linked
cannam@85 5652 against it])
cannam@85 5653 _LT_TAGDECL([], [inherit_rpath], [0],
cannam@85 5654 [Set to yes if linker adds runtime paths of dependent libraries
cannam@85 5655 to runtime path list])
cannam@85 5656 _LT_TAGDECL([], [link_all_deplibs], [0],
cannam@85 5657 [Whether libtool must link a program against all its dependency libraries])
cannam@85 5658 _LT_TAGDECL([], [always_export_symbols], [0],
cannam@85 5659 [Set to "yes" if exported symbols are required])
cannam@85 5660 _LT_TAGDECL([], [export_symbols_cmds], [2],
cannam@85 5661 [The commands to list exported symbols])
cannam@85 5662 _LT_TAGDECL([], [exclude_expsyms], [1],
cannam@85 5663 [Symbols that should not be listed in the preloaded symbols])
cannam@85 5664 _LT_TAGDECL([], [include_expsyms], [1],
cannam@85 5665 [Symbols that must always be exported])
cannam@85 5666 _LT_TAGDECL([], [prelink_cmds], [2],
cannam@85 5667 [Commands necessary for linking programs (against libraries) with templates])
cannam@85 5668 _LT_TAGDECL([], [postlink_cmds], [2],
cannam@85 5669 [Commands necessary for finishing linking programs])
cannam@85 5670 _LT_TAGDECL([], [file_list_spec], [1],
cannam@85 5671 [Specify filename containing input files])
cannam@85 5672 dnl FIXME: Not yet implemented
cannam@85 5673 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
cannam@85 5674 dnl [Compiler flag to generate thread safe objects])
cannam@85 5675 ])# _LT_LINKER_SHLIBS
cannam@85 5676
cannam@85 5677
cannam@85 5678 # _LT_LANG_C_CONFIG([TAG])
cannam@85 5679 # ------------------------
cannam@85 5680 # Ensure that the configuration variables for a C compiler are suitably
cannam@85 5681 # defined. These variables are subsequently used by _LT_CONFIG to write
cannam@85 5682 # the compiler configuration to `libtool'.
cannam@85 5683 m4_defun([_LT_LANG_C_CONFIG],
cannam@85 5684 [m4_require([_LT_DECL_EGREP])dnl
cannam@85 5685 lt_save_CC="$CC"
cannam@85 5686 AC_LANG_PUSH(C)
cannam@85 5687
cannam@85 5688 # Source file extension for C test sources.
cannam@85 5689 ac_ext=c
cannam@85 5690
cannam@85 5691 # Object file extension for compiled C test sources.
cannam@85 5692 objext=o
cannam@85 5693 _LT_TAGVAR(objext, $1)=$objext
cannam@85 5694
cannam@85 5695 # Code to be used in simple compile tests
cannam@85 5696 lt_simple_compile_test_code="int some_variable = 0;"
cannam@85 5697
cannam@85 5698 # Code to be used in simple link tests
cannam@85 5699 lt_simple_link_test_code='int main(){return(0);}'
cannam@85 5700
cannam@85 5701 _LT_TAG_COMPILER
cannam@85 5702 # Save the default compiler, since it gets overwritten when the other
cannam@85 5703 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
cannam@85 5704 compiler_DEFAULT=$CC
cannam@85 5705
cannam@85 5706 # save warnings/boilerplate of simple test code
cannam@85 5707 _LT_COMPILER_BOILERPLATE
cannam@85 5708 _LT_LINKER_BOILERPLATE
cannam@85 5709
cannam@85 5710 ## CAVEAT EMPTOR:
cannam@85 5711 ## There is no encapsulation within the following macros, do not change
cannam@85 5712 ## the running order or otherwise move them around unless you know exactly
cannam@85 5713 ## what you are doing...
cannam@85 5714 if test -n "$compiler"; then
cannam@85 5715 _LT_COMPILER_NO_RTTI($1)
cannam@85 5716 _LT_COMPILER_PIC($1)
cannam@85 5717 _LT_COMPILER_C_O($1)
cannam@85 5718 _LT_COMPILER_FILE_LOCKS($1)
cannam@85 5719 _LT_LINKER_SHLIBS($1)
cannam@85 5720 _LT_SYS_DYNAMIC_LINKER($1)
cannam@85 5721 _LT_LINKER_HARDCODE_LIBPATH($1)
cannam@85 5722 LT_SYS_DLOPEN_SELF
cannam@85 5723 _LT_CMD_STRIPLIB
cannam@85 5724
cannam@85 5725 # Report which library types will actually be built
cannam@85 5726 AC_MSG_CHECKING([if libtool supports shared libraries])
cannam@85 5727 AC_MSG_RESULT([$can_build_shared])
cannam@85 5728
cannam@85 5729 AC_MSG_CHECKING([whether to build shared libraries])
cannam@85 5730 test "$can_build_shared" = "no" && enable_shared=no
cannam@85 5731
cannam@85 5732 # On AIX, shared libraries and static libraries use the same namespace, and
cannam@85 5733 # are all built from PIC.
cannam@85 5734 case $host_os in
cannam@85 5735 aix3*)
cannam@85 5736 test "$enable_shared" = yes && enable_static=no
cannam@85 5737 if test -n "$RANLIB"; then
cannam@85 5738 archive_cmds="$archive_cmds~\$RANLIB \$lib"
cannam@85 5739 postinstall_cmds='$RANLIB $lib'
cannam@85 5740 fi
cannam@85 5741 ;;
cannam@85 5742
cannam@85 5743 aix[[4-9]]*)
cannam@85 5744 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
cannam@85 5745 test "$enable_shared" = yes && enable_static=no
cannam@85 5746 fi
cannam@85 5747 ;;
cannam@85 5748 esac
cannam@85 5749 AC_MSG_RESULT([$enable_shared])
cannam@85 5750
cannam@85 5751 AC_MSG_CHECKING([whether to build static libraries])
cannam@85 5752 # Make sure either enable_shared or enable_static is yes.
cannam@85 5753 test "$enable_shared" = yes || enable_static=yes
cannam@85 5754 AC_MSG_RESULT([$enable_static])
cannam@85 5755
cannam@85 5756 _LT_CONFIG($1)
cannam@85 5757 fi
cannam@85 5758 AC_LANG_POP
cannam@85 5759 CC="$lt_save_CC"
cannam@85 5760 ])# _LT_LANG_C_CONFIG
cannam@85 5761
cannam@85 5762
cannam@85 5763 # _LT_LANG_CXX_CONFIG([TAG])
cannam@85 5764 # --------------------------
cannam@85 5765 # Ensure that the configuration variables for a C++ compiler are suitably
cannam@85 5766 # defined. These variables are subsequently used by _LT_CONFIG to write
cannam@85 5767 # the compiler configuration to `libtool'.
cannam@85 5768 m4_defun([_LT_LANG_CXX_CONFIG],
cannam@85 5769 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@85 5770 m4_require([_LT_DECL_EGREP])dnl
cannam@85 5771 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
cannam@85 5772 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
cannam@85 5773 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
cannam@85 5774 (test "X$CXX" != "Xg++"))) ; then
cannam@85 5775 AC_PROG_CXXCPP
cannam@85 5776 else
cannam@85 5777 _lt_caught_CXX_error=yes
cannam@85 5778 fi
cannam@85 5779
cannam@85 5780 AC_LANG_PUSH(C++)
cannam@85 5781 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@85 5782 _LT_TAGVAR(allow_undefined_flag, $1)=
cannam@85 5783 _LT_TAGVAR(always_export_symbols, $1)=no
cannam@85 5784 _LT_TAGVAR(archive_expsym_cmds, $1)=
cannam@85 5785 _LT_TAGVAR(compiler_needs_object, $1)=no
cannam@85 5786 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
cannam@85 5787 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@85 5788 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
cannam@85 5789 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
cannam@85 5790 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
cannam@85 5791 _LT_TAGVAR(hardcode_libdir_separator, $1)=
cannam@85 5792 _LT_TAGVAR(hardcode_minus_L, $1)=no
cannam@85 5793 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
cannam@85 5794 _LT_TAGVAR(hardcode_automatic, $1)=no
cannam@85 5795 _LT_TAGVAR(inherit_rpath, $1)=no
cannam@85 5796 _LT_TAGVAR(module_cmds, $1)=
cannam@85 5797 _LT_TAGVAR(module_expsym_cmds, $1)=
cannam@85 5798 _LT_TAGVAR(link_all_deplibs, $1)=unknown
cannam@85 5799 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
cannam@85 5800 _LT_TAGVAR(reload_flag, $1)=$reload_flag
cannam@85 5801 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
cannam@85 5802 _LT_TAGVAR(no_undefined_flag, $1)=
cannam@85 5803 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@85 5804 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
cannam@85 5805
cannam@85 5806 # Source file extension for C++ test sources.
cannam@85 5807 ac_ext=cpp
cannam@85 5808
cannam@85 5809 # Object file extension for compiled C++ test sources.
cannam@85 5810 objext=o
cannam@85 5811 _LT_TAGVAR(objext, $1)=$objext
cannam@85 5812
cannam@85 5813 # No sense in running all these tests if we already determined that
cannam@85 5814 # the CXX compiler isn't working. Some variables (like enable_shared)
cannam@85 5815 # are currently assumed to apply to all compilers on this platform,
cannam@85 5816 # and will be corrupted by setting them based on a non-working compiler.
cannam@85 5817 if test "$_lt_caught_CXX_error" != yes; then
cannam@85 5818 # Code to be used in simple compile tests
cannam@85 5819 lt_simple_compile_test_code="int some_variable = 0;"
cannam@85 5820
cannam@85 5821 # Code to be used in simple link tests
cannam@85 5822 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
cannam@85 5823
cannam@85 5824 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
cannam@85 5825 _LT_TAG_COMPILER
cannam@85 5826
cannam@85 5827 # save warnings/boilerplate of simple test code
cannam@85 5828 _LT_COMPILER_BOILERPLATE
cannam@85 5829 _LT_LINKER_BOILERPLATE
cannam@85 5830
cannam@85 5831 # Allow CC to be a program name with arguments.
cannam@85 5832 lt_save_CC=$CC
cannam@85 5833 lt_save_CFLAGS=$CFLAGS
cannam@85 5834 lt_save_LD=$LD
cannam@85 5835 lt_save_GCC=$GCC
cannam@85 5836 GCC=$GXX
cannam@85 5837 lt_save_with_gnu_ld=$with_gnu_ld
cannam@85 5838 lt_save_path_LD=$lt_cv_path_LD
cannam@85 5839 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
cannam@85 5840 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
cannam@85 5841 else
cannam@85 5842 $as_unset lt_cv_prog_gnu_ld
cannam@85 5843 fi
cannam@85 5844 if test -n "${lt_cv_path_LDCXX+set}"; then
cannam@85 5845 lt_cv_path_LD=$lt_cv_path_LDCXX
cannam@85 5846 else
cannam@85 5847 $as_unset lt_cv_path_LD
cannam@85 5848 fi
cannam@85 5849 test -z "${LDCXX+set}" || LD=$LDCXX
cannam@85 5850 CC=${CXX-"c++"}
cannam@85 5851 CFLAGS=$CXXFLAGS
cannam@85 5852 compiler=$CC
cannam@85 5853 _LT_TAGVAR(compiler, $1)=$CC
cannam@85 5854 _LT_CC_BASENAME([$compiler])
cannam@85 5855
cannam@85 5856 if test -n "$compiler"; then
cannam@85 5857 # We don't want -fno-exception when compiling C++ code, so set the
cannam@85 5858 # no_builtin_flag separately
cannam@85 5859 if test "$GXX" = yes; then
cannam@85 5860 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
cannam@85 5861 else
cannam@85 5862 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
cannam@85 5863 fi
cannam@85 5864
cannam@85 5865 if test "$GXX" = yes; then
cannam@85 5866 # Set up default GNU C++ configuration
cannam@85 5867
cannam@85 5868 LT_PATH_LD
cannam@85 5869
cannam@85 5870 # Check if GNU C++ uses GNU ld as the underlying linker, since the
cannam@85 5871 # archiving commands below assume that GNU ld is being used.
cannam@85 5872 if test "$with_gnu_ld" = yes; then
cannam@85 5873 _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@85 5874 _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@85 5875
cannam@85 5876 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
cannam@85 5877 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
cannam@85 5878
cannam@85 5879 # If archive_cmds runs LD, not CC, wlarc should be empty
cannam@85 5880 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
cannam@85 5881 # investigate it a little bit more. (MM)
cannam@85 5882 wlarc='${wl}'
cannam@85 5883
cannam@85 5884 # ancient GNU ld didn't support --whole-archive et. al.
cannam@85 5885 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
cannam@85 5886 $GREP 'no-whole-archive' > /dev/null; then
cannam@85 5887 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
cannam@85 5888 else
cannam@85 5889 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@85 5890 fi
cannam@85 5891 else
cannam@85 5892 with_gnu_ld=no
cannam@85 5893 wlarc=
cannam@85 5894
cannam@85 5895 # A generic and very simple default shared library creation
cannam@85 5896 # command for GNU C++ for the case where it uses the native
cannam@85 5897 # linker, instead of GNU ld. If possible, this setting should
cannam@85 5898 # overridden to take advantage of the native linker features on
cannam@85 5899 # the platform it is being used on.
cannam@85 5900 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
cannam@85 5901 fi
cannam@85 5902
cannam@85 5903 # Commands to make compiler produce verbose output that lists
cannam@85 5904 # what "hidden" libraries, object files and flags are used when
cannam@85 5905 # linking a shared library.
cannam@85 5906 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
cannam@85 5907
cannam@85 5908 else
cannam@85 5909 GXX=no
cannam@85 5910 with_gnu_ld=no
cannam@85 5911 wlarc=
cannam@85 5912 fi
cannam@85 5913
cannam@85 5914 # PORTME: fill in a description of your system's C++ link characteristics
cannam@85 5915 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
cannam@85 5916 _LT_TAGVAR(ld_shlibs, $1)=yes
cannam@85 5917 case $host_os in
cannam@85 5918 aix3*)
cannam@85 5919 # FIXME: insert proper C++ library support
cannam@85 5920 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 5921 ;;
cannam@85 5922 aix[[4-9]]*)
cannam@85 5923 if test "$host_cpu" = ia64; then
cannam@85 5924 # On IA64, the linker does run time linking by default, so we don't
cannam@85 5925 # have to do anything special.
cannam@85 5926 aix_use_runtimelinking=no
cannam@85 5927 exp_sym_flag='-Bexport'
cannam@85 5928 no_entry_flag=""
cannam@85 5929 else
cannam@85 5930 aix_use_runtimelinking=no
cannam@85 5931
cannam@85 5932 # Test if we are trying to use run time linking or normal
cannam@85 5933 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
cannam@85 5934 # need to do runtime linking.
cannam@85 5935 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
cannam@85 5936 for ld_flag in $LDFLAGS; do
cannam@85 5937 case $ld_flag in
cannam@85 5938 *-brtl*)
cannam@85 5939 aix_use_runtimelinking=yes
cannam@85 5940 break
cannam@85 5941 ;;
cannam@85 5942 esac
cannam@85 5943 done
cannam@85 5944 ;;
cannam@85 5945 esac
cannam@85 5946
cannam@85 5947 exp_sym_flag='-bexport'
cannam@85 5948 no_entry_flag='-bnoentry'
cannam@85 5949 fi
cannam@85 5950
cannam@85 5951 # When large executables or shared objects are built, AIX ld can
cannam@85 5952 # have problems creating the table of contents. If linking a library
cannam@85 5953 # or program results in "error TOC overflow" add -mminimal-toc to
cannam@85 5954 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
cannam@85 5955 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
cannam@85 5956
cannam@85 5957 _LT_TAGVAR(archive_cmds, $1)=''
cannam@85 5958 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@85 5959 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
cannam@85 5960 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
cannam@85 5961 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@85 5962 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
cannam@85 5963
cannam@85 5964 if test "$GXX" = yes; then
cannam@85 5965 case $host_os in aix4.[[012]]|aix4.[[012]].*)
cannam@85 5966 # We only want to do this on AIX 4.2 and lower, the check
cannam@85 5967 # below for broken collect2 doesn't work under 4.3+
cannam@85 5968 collect2name=`${CC} -print-prog-name=collect2`
cannam@85 5969 if test -f "$collect2name" &&
cannam@85 5970 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
cannam@85 5971 then
cannam@85 5972 # We have reworked collect2
cannam@85 5973 :
cannam@85 5974 else
cannam@85 5975 # We have old collect2
cannam@85 5976 _LT_TAGVAR(hardcode_direct, $1)=unsupported
cannam@85 5977 # It fails to find uninstalled libraries when the uninstalled
cannam@85 5978 # path is not listed in the libpath. Setting hardcode_minus_L
cannam@85 5979 # to unsupported forces relinking
cannam@85 5980 _LT_TAGVAR(hardcode_minus_L, $1)=yes
cannam@85 5981 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@85 5982 _LT_TAGVAR(hardcode_libdir_separator, $1)=
cannam@85 5983 fi
cannam@85 5984 esac
cannam@85 5985 shared_flag='-shared'
cannam@85 5986 if test "$aix_use_runtimelinking" = yes; then
cannam@85 5987 shared_flag="$shared_flag "'${wl}-G'
cannam@85 5988 fi
cannam@85 5989 else
cannam@85 5990 # not using gcc
cannam@85 5991 if test "$host_cpu" = ia64; then
cannam@85 5992 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
cannam@85 5993 # chokes on -Wl,-G. The following line is correct:
cannam@85 5994 shared_flag='-G'
cannam@85 5995 else
cannam@85 5996 if test "$aix_use_runtimelinking" = yes; then
cannam@85 5997 shared_flag='${wl}-G'
cannam@85 5998 else
cannam@85 5999 shared_flag='${wl}-bM:SRE'
cannam@85 6000 fi
cannam@85 6001 fi
cannam@85 6002 fi
cannam@85 6003
cannam@85 6004 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
cannam@85 6005 # It seems that -bexpall does not export symbols beginning with
cannam@85 6006 # underscore (_), so it is better to generate a list of symbols to
cannam@85 6007 # export.
cannam@85 6008 _LT_TAGVAR(always_export_symbols, $1)=yes
cannam@85 6009 if test "$aix_use_runtimelinking" = yes; then
cannam@85 6010 # Warning - without using the other runtime loading flags (-brtl),
cannam@85 6011 # -berok will link without error, but may produce a broken library.
cannam@85 6012 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
cannam@85 6013 # Determine the default libpath from the value encoded in an empty
cannam@85 6014 # executable.
cannam@85 6015 _LT_SYS_MODULE_PATH_AIX([$1])
cannam@85 6016 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
cannam@85 6017
cannam@85 6018 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
cannam@85 6019 else
cannam@85 6020 if test "$host_cpu" = ia64; then
cannam@85 6021 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
cannam@85 6022 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
cannam@85 6023 _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@85 6024 else
cannam@85 6025 # Determine the default libpath from the value encoded in an
cannam@85 6026 # empty executable.
cannam@85 6027 _LT_SYS_MODULE_PATH_AIX([$1])
cannam@85 6028 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
cannam@85 6029 # Warning - without using the other run time loading flags,
cannam@85 6030 # -berok will link without error, but may produce a broken library.
cannam@85 6031 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
cannam@85 6032 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
cannam@85 6033 if test "$with_gnu_ld" = yes; then
cannam@85 6034 # We only use this code for GNU lds that support --whole-archive.
cannam@85 6035 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
cannam@85 6036 else
cannam@85 6037 # Exported symbols can be pulled into shared objects from archives
cannam@85 6038 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
cannam@85 6039 fi
cannam@85 6040 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
cannam@85 6041 # This is similar to how AIX traditionally builds its shared
cannam@85 6042 # libraries.
cannam@85 6043 _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
cannam@85 6044 fi
cannam@85 6045 fi
cannam@85 6046 ;;
cannam@85 6047
cannam@85 6048 beos*)
cannam@85 6049 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
cannam@85 6050 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@85 6051 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
cannam@85 6052 # support --undefined. This deserves some investigation. FIXME
cannam@85 6053 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
cannam@85 6054 else
cannam@85 6055 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 6056 fi
cannam@85 6057 ;;
cannam@85 6058
cannam@85 6059 chorus*)
cannam@85 6060 case $cc_basename in
cannam@85 6061 *)
cannam@85 6062 # FIXME: insert proper C++ library support
cannam@85 6063 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 6064 ;;
cannam@85 6065 esac
cannam@85 6066 ;;
cannam@85 6067
cannam@85 6068 cygwin* | mingw* | pw32* | cegcc*)
cannam@85 6069 case $GXX,$cc_basename in
cannam@85 6070 ,cl* | no,cl*)
cannam@85 6071 # Native MSVC
cannam@85 6072 # hardcode_libdir_flag_spec is actually meaningless, as there is
cannam@85 6073 # no search path for DLLs.
cannam@85 6074 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
cannam@85 6075 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@85 6076 _LT_TAGVAR(always_export_symbols, $1)=yes
cannam@85 6077 _LT_TAGVAR(file_list_spec, $1)='@'
cannam@85 6078 # Tell ltmain to make .lib files, not .a files.
cannam@85 6079 libext=lib
cannam@85 6080 # Tell ltmain to make .dll files, not .so files.
cannam@85 6081 shrext_cmds=".dll"
cannam@85 6082 # FIXME: Setting linknames here is a bad hack.
cannam@85 6083 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
cannam@85 6084 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
cannam@85 6085 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
cannam@85 6086 else
cannam@85 6087 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
cannam@85 6088 fi~
cannam@85 6089 $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@85 6090 linknames='
cannam@85 6091 # The linker will not automatically build a static lib if we build a DLL.
cannam@85 6092 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
cannam@85 6093 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@85 6094 # Don't use ranlib
cannam@85 6095 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
cannam@85 6096 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
cannam@85 6097 lt_tool_outputfile="@TOOL_OUTPUT@"~
cannam@85 6098 case $lt_outputfile in
cannam@85 6099 *.exe|*.EXE) ;;
cannam@85 6100 *)
cannam@85 6101 lt_outputfile="$lt_outputfile.exe"
cannam@85 6102 lt_tool_outputfile="$lt_tool_outputfile.exe"
cannam@85 6103 ;;
cannam@85 6104 esac~
cannam@85 6105 func_to_tool_file "$lt_outputfile"~
cannam@85 6106 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
cannam@85 6107 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
cannam@85 6108 $RM "$lt_outputfile.manifest";
cannam@85 6109 fi'
cannam@85 6110 ;;
cannam@85 6111 *)
cannam@85 6112 # g++
cannam@85 6113 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
cannam@85 6114 # as there is no search path for DLLs.
cannam@85 6115 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
cannam@85 6116 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
cannam@85 6117 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
cannam@85 6118 _LT_TAGVAR(always_export_symbols, $1)=no
cannam@85 6119 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
cannam@85 6120
cannam@85 6121 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
cannam@85 6122 _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@85 6123 # If the export-symbols file already is a .def file (1st line
cannam@85 6124 # is EXPORTS), use it as is; otherwise, prepend...
cannam@85 6125 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
cannam@85 6126 cp $export_symbols $output_objdir/$soname.def;
cannam@85 6127 else
cannam@85 6128 echo EXPORTS > $output_objdir/$soname.def;
cannam@85 6129 cat $export_symbols >> $output_objdir/$soname.def;
cannam@85 6130 fi~
cannam@85 6131 $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@85 6132 else
cannam@85 6133 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 6134 fi
cannam@85 6135 ;;
cannam@85 6136 esac
cannam@85 6137 ;;
cannam@85 6138 darwin* | rhapsody*)
cannam@85 6139 _LT_DARWIN_LINKER_FEATURES($1)
cannam@85 6140 ;;
cannam@85 6141
cannam@85 6142 dgux*)
cannam@85 6143 case $cc_basename in
cannam@85 6144 ec++*)
cannam@85 6145 # FIXME: insert proper C++ library support
cannam@85 6146 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 6147 ;;
cannam@85 6148 ghcx*)
cannam@85 6149 # Green Hills C++ Compiler
cannam@85 6150 # FIXME: insert proper C++ library support
cannam@85 6151 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 6152 ;;
cannam@85 6153 *)
cannam@85 6154 # FIXME: insert proper C++ library support
cannam@85 6155 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 6156 ;;
cannam@85 6157 esac
cannam@85 6158 ;;
cannam@85 6159
cannam@85 6160 freebsd[[12]]*)
cannam@85 6161 # C++ shared libraries reported to be fairly broken before
cannam@85 6162 # switch to ELF
cannam@85 6163 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 6164 ;;
cannam@85 6165
cannam@85 6166 freebsd-elf*)
cannam@85 6167 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@85 6168 ;;
cannam@85 6169
cannam@85 6170 freebsd* | dragonfly*)
cannam@85 6171 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
cannam@85 6172 # conventions
cannam@85 6173 _LT_TAGVAR(ld_shlibs, $1)=yes
cannam@85 6174 ;;
cannam@85 6175
cannam@85 6176 gnu*)
cannam@85 6177 ;;
cannam@85 6178
cannam@85 6179 haiku*)
cannam@85 6180 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
cannam@85 6181 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@85 6182 ;;
cannam@85 6183
cannam@85 6184 hpux9*)
cannam@85 6185 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
cannam@85 6186 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 6187 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
cannam@85 6188 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@85 6189 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
cannam@85 6190 # but as the default
cannam@85 6191 # location of the library.
cannam@85 6192
cannam@85 6193 case $cc_basename in
cannam@85 6194 CC*)
cannam@85 6195 # FIXME: insert proper C++ library support
cannam@85 6196 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 6197 ;;
cannam@85 6198 aCC*)
cannam@85 6199 _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
cannam@85 6200 # Commands to make compiler produce verbose output that lists
cannam@85 6201 # what "hidden" libraries, object files and flags are used when
cannam@85 6202 # linking a shared library.
cannam@85 6203 #
cannam@85 6204 # There doesn't appear to be a way to prevent this compiler from
cannam@85 6205 # explicitly linking system object files so we need to strip them
cannam@85 6206 # from the output so that they don't get included in the library
cannam@85 6207 # dependencies.
cannam@85 6208 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@85 6209 ;;
cannam@85 6210 *)
cannam@85 6211 if test "$GXX" = yes; then
cannam@85 6212 _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
cannam@85 6213 else
cannam@85 6214 # FIXME: insert proper C++ library support
cannam@85 6215 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 6216 fi
cannam@85 6217 ;;
cannam@85 6218 esac
cannam@85 6219 ;;
cannam@85 6220
cannam@85 6221 hpux10*|hpux11*)
cannam@85 6222 if test $with_gnu_ld = no; then
cannam@85 6223 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
cannam@85 6224 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 6225
cannam@85 6226 case $host_cpu in
cannam@85 6227 hppa*64*|ia64*)
cannam@85 6228 ;;
cannam@85 6229 *)
cannam@85 6230 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
cannam@85 6231 ;;
cannam@85 6232 esac
cannam@85 6233 fi
cannam@85 6234 case $host_cpu in
cannam@85 6235 hppa*64*|ia64*)
cannam@85 6236 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@85 6237 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 6238 ;;
cannam@85 6239 *)
cannam@85 6240 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@85 6241 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
cannam@85 6242 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
cannam@85 6243 # but as the default
cannam@85 6244 # location of the library.
cannam@85 6245 ;;
cannam@85 6246 esac
cannam@85 6247
cannam@85 6248 case $cc_basename in
cannam@85 6249 CC*)
cannam@85 6250 # FIXME: insert proper C++ library support
cannam@85 6251 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 6252 ;;
cannam@85 6253 aCC*)
cannam@85 6254 case $host_cpu in
cannam@85 6255 hppa*64*)
cannam@85 6256 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
cannam@85 6257 ;;
cannam@85 6258 ia64*)
cannam@85 6259 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
cannam@85 6260 ;;
cannam@85 6261 *)
cannam@85 6262 _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@85 6263 ;;
cannam@85 6264 esac
cannam@85 6265 # Commands to make compiler produce verbose output that lists
cannam@85 6266 # what "hidden" libraries, object files and flags are used when
cannam@85 6267 # linking a shared library.
cannam@85 6268 #
cannam@85 6269 # There doesn't appear to be a way to prevent this compiler from
cannam@85 6270 # explicitly linking system object files so we need to strip them
cannam@85 6271 # from the output so that they don't get included in the library
cannam@85 6272 # dependencies.
cannam@85 6273 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@85 6274 ;;
cannam@85 6275 *)
cannam@85 6276 if test "$GXX" = yes; then
cannam@85 6277 if test $with_gnu_ld = no; then
cannam@85 6278 case $host_cpu in
cannam@85 6279 hppa*64*)
cannam@85 6280 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
cannam@85 6281 ;;
cannam@85 6282 ia64*)
cannam@85 6283 _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@85 6284 ;;
cannam@85 6285 *)
cannam@85 6286 _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@85 6287 ;;
cannam@85 6288 esac
cannam@85 6289 fi
cannam@85 6290 else
cannam@85 6291 # FIXME: insert proper C++ library support
cannam@85 6292 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 6293 fi
cannam@85 6294 ;;
cannam@85 6295 esac
cannam@85 6296 ;;
cannam@85 6297
cannam@85 6298 interix[[3-9]]*)
cannam@85 6299 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@85 6300 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 6301 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
cannam@85 6302 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
cannam@85 6303 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
cannam@85 6304 # Instead, shared libraries are loaded at an image base (0x10000000 by
cannam@85 6305 # default) and relocated if they conflict, which is a slow very memory
cannam@85 6306 # consuming and fragmenting process. To avoid this, we pick a random,
cannam@85 6307 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
cannam@85 6308 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
cannam@85 6309 _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@85 6310 _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@85 6311 ;;
cannam@85 6312 irix5* | irix6*)
cannam@85 6313 case $cc_basename in
cannam@85 6314 CC*)
cannam@85 6315 # SGI C++
cannam@85 6316 _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@85 6317
cannam@85 6318 # Archives containing C++ object files must be created using
cannam@85 6319 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
cannam@85 6320 # necessary to make sure instantiated templates are included
cannam@85 6321 # in the archive.
cannam@85 6322 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
cannam@85 6323 ;;
cannam@85 6324 *)
cannam@85 6325 if test "$GXX" = yes; then
cannam@85 6326 if test "$with_gnu_ld" = no; then
cannam@85 6327 _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@85 6328 else
cannam@85 6329 _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@85 6330 fi
cannam@85 6331 fi
cannam@85 6332 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@85 6333 ;;
cannam@85 6334 esac
cannam@85 6335 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
cannam@85 6336 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 6337 _LT_TAGVAR(inherit_rpath, $1)=yes
cannam@85 6338 ;;
cannam@85 6339
cannam@85 6340 linux* | k*bsd*-gnu | kopensolaris*-gnu)
cannam@85 6341 case $cc_basename in
cannam@85 6342 KCC*)
cannam@85 6343 # Kuck and Associates, Inc. (KAI) C++ Compiler
cannam@85 6344
cannam@85 6345 # KCC will only create a shared library if the output file
cannam@85 6346 # ends with ".so" (or ".sl" for HP-UX), so rename the library
cannam@85 6347 # to its proper name (with version) after linking.
cannam@85 6348 _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@85 6349 _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@85 6350 # Commands to make compiler produce verbose output that lists
cannam@85 6351 # what "hidden" libraries, object files and flags are used when
cannam@85 6352 # linking a shared library.
cannam@85 6353 #
cannam@85 6354 # There doesn't appear to be a way to prevent this compiler from
cannam@85 6355 # explicitly linking system object files so we need to strip them
cannam@85 6356 # from the output so that they don't get included in the library
cannam@85 6357 # dependencies.
cannam@85 6358 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@85 6359
cannam@85 6360 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
cannam@85 6361 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
cannam@85 6362
cannam@85 6363 # Archives containing C++ object files must be created using
cannam@85 6364 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
cannam@85 6365 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
cannam@85 6366 ;;
cannam@85 6367 icpc* | ecpc* )
cannam@85 6368 # Intel C++
cannam@85 6369 with_gnu_ld=yes
cannam@85 6370 # version 8.0 and above of icpc choke on multiply defined symbols
cannam@85 6371 # if we add $predep_objects and $postdep_objects, however 7.1 and
cannam@85 6372 # earlier do not add the objects themselves.
cannam@85 6373 case `$CC -V 2>&1` in
cannam@85 6374 *"Version 7."*)
cannam@85 6375 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
cannam@85 6376 _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@85 6377 ;;
cannam@85 6378 *) # Version 8.0 or newer
cannam@85 6379 tmp_idyn=
cannam@85 6380 case $host_cpu in
cannam@85 6381 ia64*) tmp_idyn=' -i_dynamic';;
cannam@85 6382 esac
cannam@85 6383 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
cannam@85 6384 _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@85 6385 ;;
cannam@85 6386 esac
cannam@85 6387 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@85 6388 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
cannam@85 6389 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
cannam@85 6390 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
cannam@85 6391 ;;
cannam@85 6392 pgCC* | pgcpp*)
cannam@85 6393 # Portland Group C++ compiler
cannam@85 6394 case `$CC -V` in
cannam@85 6395 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
cannam@85 6396 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
cannam@85 6397 rm -rf $tpldir~
cannam@85 6398 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
cannam@85 6399 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
cannam@85 6400 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
cannam@85 6401 rm -rf $tpldir~
cannam@85 6402 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
cannam@85 6403 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
cannam@85 6404 $RANLIB $oldlib'
cannam@85 6405 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
cannam@85 6406 rm -rf $tpldir~
cannam@85 6407 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
cannam@85 6408 $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@85 6409 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
cannam@85 6410 rm -rf $tpldir~
cannam@85 6411 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
cannam@85 6412 $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@85 6413 ;;
cannam@85 6414 *) # Version 6 and above use weak symbols
cannam@85 6415 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
cannam@85 6416 _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@85 6417 ;;
cannam@85 6418 esac
cannam@85 6419
cannam@85 6420 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
cannam@85 6421 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
cannam@85 6422 _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@85 6423 ;;
cannam@85 6424 cxx*)
cannam@85 6425 # Compaq C++
cannam@85 6426 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
cannam@85 6427 _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@85 6428
cannam@85 6429 runpath_var=LD_RUN_PATH
cannam@85 6430 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
cannam@85 6431 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 6432
cannam@85 6433 # Commands to make compiler produce verbose output that lists
cannam@85 6434 # what "hidden" libraries, object files and flags are used when
cannam@85 6435 # linking a shared library.
cannam@85 6436 #
cannam@85 6437 # There doesn't appear to be a way to prevent this compiler from
cannam@85 6438 # explicitly linking system object files so we need to strip them
cannam@85 6439 # from the output so that they don't get included in the library
cannam@85 6440 # dependencies.
cannam@85 6441 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@85 6442 ;;
cannam@85 6443 xl* | mpixl* | bgxl*)
cannam@85 6444 # IBM XL 8.0 on PPC, with GNU ld
cannam@85 6445 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
cannam@85 6446 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
cannam@85 6447 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
cannam@85 6448 if test "x$supports_anon_versioning" = xyes; then
cannam@85 6449 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
cannam@85 6450 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
cannam@85 6451 echo "local: *; };" >> $output_objdir/$libname.ver~
cannam@85 6452 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
cannam@85 6453 fi
cannam@85 6454 ;;
cannam@85 6455 *)
cannam@85 6456 case `$CC -V 2>&1 | sed 5q` in
cannam@85 6457 *Sun\ C*)
cannam@85 6458 # Sun C++ 5.9
cannam@85 6459 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
cannam@85 6460 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
cannam@85 6461 _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@85 6462 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@85 6463 _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@85 6464 _LT_TAGVAR(compiler_needs_object, $1)=yes
cannam@85 6465
cannam@85 6466 # Not sure whether something based on
cannam@85 6467 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
cannam@85 6468 # would be better.
cannam@85 6469 output_verbose_link_cmd='func_echo_all'
cannam@85 6470
cannam@85 6471 # Archives containing C++ object files must be created using
cannam@85 6472 # "CC -xar", where "CC" is the Sun C++ compiler. This is
cannam@85 6473 # necessary to make sure instantiated templates are included
cannam@85 6474 # in the archive.
cannam@85 6475 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
cannam@85 6476 ;;
cannam@85 6477 esac
cannam@85 6478 ;;
cannam@85 6479 esac
cannam@85 6480 ;;
cannam@85 6481
cannam@85 6482 lynxos*)
cannam@85 6483 # FIXME: insert proper C++ library support
cannam@85 6484 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 6485 ;;
cannam@85 6486
cannam@85 6487 m88k*)
cannam@85 6488 # FIXME: insert proper C++ library support
cannam@85 6489 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 6490 ;;
cannam@85 6491
cannam@85 6492 mvs*)
cannam@85 6493 case $cc_basename in
cannam@85 6494 cxx*)
cannam@85 6495 # FIXME: insert proper C++ library support
cannam@85 6496 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 6497 ;;
cannam@85 6498 *)
cannam@85 6499 # FIXME: insert proper C++ library support
cannam@85 6500 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 6501 ;;
cannam@85 6502 esac
cannam@85 6503 ;;
cannam@85 6504
cannam@85 6505 netbsd*)
cannam@85 6506 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
cannam@85 6507 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
cannam@85 6508 wlarc=
cannam@85 6509 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@85 6510 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@85 6511 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 6512 fi
cannam@85 6513 # Workaround some broken pre-1.5 toolchains
cannam@85 6514 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
cannam@85 6515 ;;
cannam@85 6516
cannam@85 6517 *nto* | *qnx*)
cannam@85 6518 _LT_TAGVAR(ld_shlibs, $1)=yes
cannam@85 6519 ;;
cannam@85 6520
cannam@85 6521 openbsd2*)
cannam@85 6522 # C++ shared libraries are fairly broken
cannam@85 6523 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 6524 ;;
cannam@85 6525
cannam@85 6526 openbsd*)
cannam@85 6527 if test -f /usr/libexec/ld.so; then
cannam@85 6528 _LT_TAGVAR(hardcode_direct, $1)=yes
cannam@85 6529 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 6530 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
cannam@85 6531 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
cannam@85 6532 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
cannam@85 6533 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
cannam@85 6534 _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@85 6535 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
cannam@85 6536 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
cannam@85 6537 fi
cannam@85 6538 output_verbose_link_cmd=func_echo_all
cannam@85 6539 else
cannam@85 6540 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 6541 fi
cannam@85 6542 ;;
cannam@85 6543
cannam@85 6544 osf3* | osf4* | osf5*)
cannam@85 6545 case $cc_basename in
cannam@85 6546 KCC*)
cannam@85 6547 # Kuck and Associates, Inc. (KAI) C++ Compiler
cannam@85 6548
cannam@85 6549 # KCC will only create a shared library if the output file
cannam@85 6550 # ends with ".so" (or ".sl" for HP-UX), so rename the library
cannam@85 6551 # to its proper name (with version) after linking.
cannam@85 6552 _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@85 6553
cannam@85 6554 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
cannam@85 6555 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 6556
cannam@85 6557 # Archives containing C++ object files must be created using
cannam@85 6558 # the KAI C++ compiler.
cannam@85 6559 case $host in
cannam@85 6560 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
cannam@85 6561 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
cannam@85 6562 esac
cannam@85 6563 ;;
cannam@85 6564 RCC*)
cannam@85 6565 # Rational C++ 2.4.1
cannam@85 6566 # FIXME: insert proper C++ library support
cannam@85 6567 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 6568 ;;
cannam@85 6569 cxx*)
cannam@85 6570 case $host in
cannam@85 6571 osf3*)
cannam@85 6572 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
cannam@85 6573 _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@85 6574 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
cannam@85 6575 ;;
cannam@85 6576 *)
cannam@85 6577 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
cannam@85 6578 _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@85 6579 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
cannam@85 6580 echo "-hidden">> $lib.exp~
cannam@85 6581 $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@85 6582 $RM $lib.exp'
cannam@85 6583 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
cannam@85 6584 ;;
cannam@85 6585 esac
cannam@85 6586
cannam@85 6587 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 6588
cannam@85 6589 # Commands to make compiler produce verbose output that lists
cannam@85 6590 # what "hidden" libraries, object files and flags are used when
cannam@85 6591 # linking a shared library.
cannam@85 6592 #
cannam@85 6593 # There doesn't appear to be a way to prevent this compiler from
cannam@85 6594 # explicitly linking system object files so we need to strip them
cannam@85 6595 # from the output so that they don't get included in the library
cannam@85 6596 # dependencies.
cannam@85 6597 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@85 6598 ;;
cannam@85 6599 *)
cannam@85 6600 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
cannam@85 6601 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
cannam@85 6602 case $host in
cannam@85 6603 osf3*)
cannam@85 6604 _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@85 6605 ;;
cannam@85 6606 *)
cannam@85 6607 _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@85 6608 ;;
cannam@85 6609 esac
cannam@85 6610
cannam@85 6611 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
cannam@85 6612 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
cannam@85 6613
cannam@85 6614 # Commands to make compiler produce verbose output that lists
cannam@85 6615 # what "hidden" libraries, object files and flags are used when
cannam@85 6616 # linking a shared library.
cannam@85 6617 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
cannam@85 6618
cannam@85 6619 else
cannam@85 6620 # FIXME: insert proper C++ library support
cannam@85 6621 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 6622 fi
cannam@85 6623 ;;
cannam@85 6624 esac
cannam@85 6625 ;;
cannam@85 6626
cannam@85 6627 psos*)
cannam@85 6628 # FIXME: insert proper C++ library support
cannam@85 6629 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 6630 ;;
cannam@85 6631
cannam@85 6632 sunos4*)
cannam@85 6633 case $cc_basename in
cannam@85 6634 CC*)
cannam@85 6635 # Sun C++ 4.x
cannam@85 6636 # FIXME: insert proper C++ library support
cannam@85 6637 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 6638 ;;
cannam@85 6639 lcc*)
cannam@85 6640 # Lucid
cannam@85 6641 # FIXME: insert proper C++ library support
cannam@85 6642 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 6643 ;;
cannam@85 6644 *)
cannam@85 6645 # FIXME: insert proper C++ library support
cannam@85 6646 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 6647 ;;
cannam@85 6648 esac
cannam@85 6649 ;;
cannam@85 6650
cannam@85 6651 solaris*)
cannam@85 6652 case $cc_basename in
cannam@85 6653 CC* | sunCC*)
cannam@85 6654 # Sun C++ 4.2, 5.x and Centerline C++
cannam@85 6655 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
cannam@85 6656 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
cannam@85 6657 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
cannam@85 6658 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
cannam@85 6659 $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@85 6660
cannam@85 6661 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
cannam@85 6662 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 6663 case $host_os in
cannam@85 6664 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
cannam@85 6665 *)
cannam@85 6666 # The compiler driver will combine and reorder linker options,
cannam@85 6667 # but understands `-z linker_flag'.
cannam@85 6668 # Supported since Solaris 2.6 (maybe 2.5.1?)
cannam@85 6669 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
cannam@85 6670 ;;
cannam@85 6671 esac
cannam@85 6672 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@85 6673
cannam@85 6674 output_verbose_link_cmd='func_echo_all'
cannam@85 6675
cannam@85 6676 # Archives containing C++ object files must be created using
cannam@85 6677 # "CC -xar", where "CC" is the Sun C++ compiler. This is
cannam@85 6678 # necessary to make sure instantiated templates are included
cannam@85 6679 # in the archive.
cannam@85 6680 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
cannam@85 6681 ;;
cannam@85 6682 gcx*)
cannam@85 6683 # Green Hills C++ Compiler
cannam@85 6684 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
cannam@85 6685
cannam@85 6686 # The C++ compiler must be used to create the archive.
cannam@85 6687 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
cannam@85 6688 ;;
cannam@85 6689 *)
cannam@85 6690 # GNU C++ compiler with Solaris linker
cannam@85 6691 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
cannam@85 6692 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
cannam@85 6693 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
cannam@85 6694 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
cannam@85 6695 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
cannam@85 6696 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
cannam@85 6697
cannam@85 6698 # Commands to make compiler produce verbose output that lists
cannam@85 6699 # what "hidden" libraries, object files and flags are used when
cannam@85 6700 # linking a shared library.
cannam@85 6701 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
cannam@85 6702 else
cannam@85 6703 # g++ 2.7 appears to require `-G' NOT `-shared' on this
cannam@85 6704 # platform.
cannam@85 6705 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
cannam@85 6706 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
cannam@85 6707 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
cannam@85 6708
cannam@85 6709 # Commands to make compiler produce verbose output that lists
cannam@85 6710 # what "hidden" libraries, object files and flags are used when
cannam@85 6711 # linking a shared library.
cannam@85 6712 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
cannam@85 6713 fi
cannam@85 6714
cannam@85 6715 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
cannam@85 6716 case $host_os in
cannam@85 6717 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
cannam@85 6718 *)
cannam@85 6719 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
cannam@85 6720 ;;
cannam@85 6721 esac
cannam@85 6722 fi
cannam@85 6723 ;;
cannam@85 6724 esac
cannam@85 6725 ;;
cannam@85 6726
cannam@85 6727 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
cannam@85 6728 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
cannam@85 6729 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@85 6730 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 6731 runpath_var='LD_RUN_PATH'
cannam@85 6732
cannam@85 6733 case $cc_basename in
cannam@85 6734 CC*)
cannam@85 6735 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 6736 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 6737 ;;
cannam@85 6738 *)
cannam@85 6739 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 6740 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 6741 ;;
cannam@85 6742 esac
cannam@85 6743 ;;
cannam@85 6744
cannam@85 6745 sysv5* | sco3.2v5* | sco5v6*)
cannam@85 6746 # Note: We can NOT use -z defs as we might desire, because we do not
cannam@85 6747 # link with -lc, and that would cause any symbols used from libc to
cannam@85 6748 # always be unresolved, which means just about no library would
cannam@85 6749 # ever link correctly. If we're not using GNU ld we use -z text
cannam@85 6750 # though, which does catch some bad symbols but isn't as heavy-handed
cannam@85 6751 # as -z defs.
cannam@85 6752 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
cannam@85 6753 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
cannam@85 6754 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@85 6755 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
cannam@85 6756 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
cannam@85 6757 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
cannam@85 6758 _LT_TAGVAR(link_all_deplibs, $1)=yes
cannam@85 6759 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
cannam@85 6760 runpath_var='LD_RUN_PATH'
cannam@85 6761
cannam@85 6762 case $cc_basename in
cannam@85 6763 CC*)
cannam@85 6764 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 6765 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 6766 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
cannam@85 6767 '"$_LT_TAGVAR(old_archive_cmds, $1)"
cannam@85 6768 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
cannam@85 6769 '"$_LT_TAGVAR(reload_cmds, $1)"
cannam@85 6770 ;;
cannam@85 6771 *)
cannam@85 6772 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 6773 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
cannam@85 6774 ;;
cannam@85 6775 esac
cannam@85 6776 ;;
cannam@85 6777
cannam@85 6778 tandem*)
cannam@85 6779 case $cc_basename in
cannam@85 6780 NCC*)
cannam@85 6781 # NonStop-UX NCC 3.20
cannam@85 6782 # FIXME: insert proper C++ library support
cannam@85 6783 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 6784 ;;
cannam@85 6785 *)
cannam@85 6786 # FIXME: insert proper C++ library support
cannam@85 6787 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 6788 ;;
cannam@85 6789 esac
cannam@85 6790 ;;
cannam@85 6791
cannam@85 6792 vxworks*)
cannam@85 6793 # FIXME: insert proper C++ library support
cannam@85 6794 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 6795 ;;
cannam@85 6796
cannam@85 6797 *)
cannam@85 6798 # FIXME: insert proper C++ library support
cannam@85 6799 _LT_TAGVAR(ld_shlibs, $1)=no
cannam@85 6800 ;;
cannam@85 6801 esac
cannam@85 6802
cannam@85 6803 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
cannam@85 6804 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
cannam@85 6805
cannam@85 6806 _LT_TAGVAR(GCC, $1)="$GXX"
cannam@85 6807 _LT_TAGVAR(LD, $1)="$LD"
cannam@85 6808
cannam@85 6809 ## CAVEAT EMPTOR:
cannam@85 6810 ## There is no encapsulation within the following macros, do not change
cannam@85 6811 ## the running order or otherwise move them around unless you know exactly
cannam@85 6812 ## what you are doing...
cannam@85 6813 _LT_SYS_HIDDEN_LIBDEPS($1)
cannam@85 6814 _LT_COMPILER_PIC($1)
cannam@85 6815 _LT_COMPILER_C_O($1)
cannam@85 6816 _LT_COMPILER_FILE_LOCKS($1)
cannam@85 6817 _LT_LINKER_SHLIBS($1)
cannam@85 6818 _LT_SYS_DYNAMIC_LINKER($1)
cannam@85 6819 _LT_LINKER_HARDCODE_LIBPATH($1)
cannam@85 6820
cannam@85 6821 _LT_CONFIG($1)
cannam@85 6822 fi # test -n "$compiler"
cannam@85 6823
cannam@85 6824 CC=$lt_save_CC
cannam@85 6825 CFLAGS=$lt_save_CFLAGS
cannam@85 6826 LDCXX=$LD
cannam@85 6827 LD=$lt_save_LD
cannam@85 6828 GCC=$lt_save_GCC
cannam@85 6829 with_gnu_ld=$lt_save_with_gnu_ld
cannam@85 6830 lt_cv_path_LDCXX=$lt_cv_path_LD
cannam@85 6831 lt_cv_path_LD=$lt_save_path_LD
cannam@85 6832 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
cannam@85 6833 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
cannam@85 6834 fi # test "$_lt_caught_CXX_error" != yes
cannam@85 6835
cannam@85 6836 AC_LANG_POP
cannam@85 6837 ])# _LT_LANG_CXX_CONFIG
cannam@85 6838
cannam@85 6839
cannam@85 6840 # _LT_FUNC_STRIPNAME_CNF
cannam@85 6841 # ----------------------
cannam@85 6842 # func_stripname_cnf prefix suffix name
cannam@85 6843 # strip PREFIX and SUFFIX off of NAME.
cannam@85 6844 # PREFIX and SUFFIX must not contain globbing or regex special
cannam@85 6845 # characters, hashes, percent signs, but SUFFIX may contain a leading
cannam@85 6846 # dot (in which case that matches only a dot).
cannam@85 6847 #
cannam@85 6848 # This function is identical to the (non-XSI) version of func_stripname,
cannam@85 6849 # except this one can be used by m4 code that may be executed by configure,
cannam@85 6850 # rather than the libtool script.
cannam@85 6851 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
cannam@85 6852 AC_REQUIRE([_LT_DECL_SED])
cannam@85 6853 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
cannam@85 6854 func_stripname_cnf ()
cannam@85 6855 {
cannam@85 6856 case ${2} in
cannam@85 6857 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
cannam@85 6858 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
cannam@85 6859 esac
cannam@85 6860 } # func_stripname_cnf
cannam@85 6861 ])# _LT_FUNC_STRIPNAME_CNF
cannam@85 6862
cannam@85 6863 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
cannam@85 6864 # ---------------------------------
cannam@85 6865 # Figure out "hidden" library dependencies from verbose
cannam@85 6866 # compiler output when linking a shared library.
cannam@85 6867 # Parse the compiler output and extract the necessary
cannam@85 6868 # objects, libraries and library flags.
cannam@85 6869 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
cannam@85 6870 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
cannam@85 6871 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
cannam@85 6872 # Dependencies to place before and after the object being linked:
cannam@85 6873 _LT_TAGVAR(predep_objects, $1)=
cannam@85 6874 _LT_TAGVAR(postdep_objects, $1)=
cannam@85 6875 _LT_TAGVAR(predeps, $1)=
cannam@85 6876 _LT_TAGVAR(postdeps, $1)=
cannam@85 6877 _LT_TAGVAR(compiler_lib_search_path, $1)=
cannam@85 6878
cannam@85 6879 dnl we can't use the lt_simple_compile_test_code here,
cannam@85 6880 dnl because it contains code intended for an executable,
cannam@85 6881 dnl not a library. It's possible we should let each
cannam@85 6882 dnl tag define a new lt_????_link_test_code variable,
cannam@85 6883 dnl but it's only used here...
cannam@85 6884 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
cannam@85 6885 int a;
cannam@85 6886 void foo (void) { a = 0; }
cannam@85 6887 _LT_EOF
cannam@85 6888 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
cannam@85 6889 class Foo
cannam@85 6890 {
cannam@85 6891 public:
cannam@85 6892 Foo (void) { a = 0; }
cannam@85 6893 private:
cannam@85 6894 int a;
cannam@85 6895 };
cannam@85 6896 _LT_EOF
cannam@85 6897 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
cannam@85 6898 subroutine foo
cannam@85 6899 implicit none
cannam@85 6900 integer*4 a
cannam@85 6901 a=0
cannam@85 6902 return
cannam@85 6903 end
cannam@85 6904 _LT_EOF
cannam@85 6905 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
cannam@85 6906 subroutine foo
cannam@85 6907 implicit none
cannam@85 6908 integer a
cannam@85 6909 a=0
cannam@85 6910 return
cannam@85 6911 end
cannam@85 6912 _LT_EOF
cannam@85 6913 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
cannam@85 6914 public class foo {
cannam@85 6915 private int a;
cannam@85 6916 public void bar (void) {
cannam@85 6917 a = 0;
cannam@85 6918 }
cannam@85 6919 };
cannam@85 6920 _LT_EOF
cannam@85 6921 ])
cannam@85 6922
cannam@85 6923 _lt_libdeps_save_CFLAGS=$CFLAGS
cannam@85 6924 case "$CC $CFLAGS " in #(
cannam@85 6925 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
cannam@85 6926 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
cannam@85 6927 esac
cannam@85 6928
cannam@85 6929 dnl Parse the compiler output and extract the necessary
cannam@85 6930 dnl objects, libraries and library flags.
cannam@85 6931 if AC_TRY_EVAL(ac_compile); then
cannam@85 6932 # Parse the compiler output and extract the necessary
cannam@85 6933 # objects, libraries and library flags.
cannam@85 6934
cannam@85 6935 # Sentinel used to keep track of whether or not we are before
cannam@85 6936 # the conftest object file.
cannam@85 6937 pre_test_object_deps_done=no
cannam@85 6938
cannam@85 6939 for p in `eval "$output_verbose_link_cmd"`; do
cannam@85 6940 case ${prev}${p} in
cannam@85 6941
cannam@85 6942 -L* | -R* | -l*)
cannam@85 6943 # Some compilers place space between "-{L,R}" and the path.
cannam@85 6944 # Remove the space.
cannam@85 6945 if test $p = "-L" ||
cannam@85 6946 test $p = "-R"; then
cannam@85 6947 prev=$p
cannam@85 6948 continue
cannam@85 6949 fi
cannam@85 6950
cannam@85 6951 # Expand the sysroot to ease extracting the directories later.
cannam@85 6952 if test -z "$prev"; then
cannam@85 6953 case $p in
cannam@85 6954 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
cannam@85 6955 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
cannam@85 6956 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
cannam@85 6957 esac
cannam@85 6958 fi
cannam@85 6959 case $p in
cannam@85 6960 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
cannam@85 6961 esac
cannam@85 6962 if test "$pre_test_object_deps_done" = no; then
cannam@85 6963 case ${prev} in
cannam@85 6964 -L | -R)
cannam@85 6965 # Internal compiler library paths should come after those
cannam@85 6966 # provided the user. The postdeps already come after the
cannam@85 6967 # user supplied libs so there is no need to process them.
cannam@85 6968 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
cannam@85 6969 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
cannam@85 6970 else
cannam@85 6971 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
cannam@85 6972 fi
cannam@85 6973 ;;
cannam@85 6974 # The "-l" case would never come before the object being
cannam@85 6975 # linked, so don't bother handling this case.
cannam@85 6976 esac
cannam@85 6977 else
cannam@85 6978 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
cannam@85 6979 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
cannam@85 6980 else
cannam@85 6981 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
cannam@85 6982 fi
cannam@85 6983 fi
cannam@85 6984 prev=
cannam@85 6985 ;;
cannam@85 6986
cannam@85 6987 *.lto.$objext) ;; # Ignore GCC LTO objects
cannam@85 6988 *.$objext)
cannam@85 6989 # This assumes that the test object file only shows up
cannam@85 6990 # once in the compiler output.
cannam@85 6991 if test "$p" = "conftest.$objext"; then
cannam@85 6992 pre_test_object_deps_done=yes
cannam@85 6993 continue
cannam@85 6994 fi
cannam@85 6995
cannam@85 6996 if test "$pre_test_object_deps_done" = no; then
cannam@85 6997 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
cannam@85 6998 _LT_TAGVAR(predep_objects, $1)="$p"
cannam@85 6999 else
cannam@85 7000 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
cannam@85 7001 fi
cannam@85 7002 else
cannam@85 7003 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
cannam@85 7004 _LT_TAGVAR(postdep_objects, $1)="$p"
cannam@85 7005 else
cannam@85 7006 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
cannam@85 7007 fi
cannam@85 7008 fi
cannam@85 7009 ;;
cannam@85 7010
cannam@85 7011 *) ;; # Ignore the rest.
cannam@85 7012
cannam@85 7013 esac
cannam@85 7014 done
cannam@85 7015
cannam@85 7016 # Clean up.
cannam@85 7017 rm -f a.out a.exe
cannam@85 7018 else
cannam@85 7019 echo "libtool.m4: error: problem compiling $1 test program"
cannam@85 7020 fi
cannam@85 7021
cannam@85 7022 $RM -f confest.$objext
cannam@85 7023 CFLAGS=$_lt_libdeps_save_CFLAGS
cannam@85 7024
cannam@85 7025 # PORTME: override above test on systems where it is broken
cannam@85 7026 m4_if([$1], [CXX],
cannam@85 7027 [case $host_os in
cannam@85 7028 interix[[3-9]]*)
cannam@85 7029 # Interix 3.5 installs completely hosed .la files for C++, so rather than
cannam@85 7030 # hack all around it, let's just trust "g++" to DTRT.
cannam@85 7031 _LT_TAGVAR(predep_objects,$1)=
cannam@85 7032 _LT_TAGVAR(postdep_objects,$1)=
cannam@85 7033 _LT_TAGVAR(postdeps,$1)=
cannam@85 7034 ;;
cannam@85 7035
cannam@85 7036 linux*)
cannam@85 7037 case `$CC -V 2>&1 | sed 5q` in
cannam@85 7038 *Sun\ C*)
cannam@85 7039 # Sun C++ 5.9
cannam@85 7040
cannam@85 7041 # The more standards-conforming stlport4 library is
cannam@85 7042 # incompatible with the Cstd library. Avoid specifying
cannam@85 7043 # it if it's in CXXFLAGS. Ignore libCrun as
cannam@85 7044 # -library=stlport4 depends on it.
cannam@85 7045 case " $CXX $CXXFLAGS " in
cannam@85 7046 *" -library=stlport4 "*)
cannam@85 7047 solaris_use_stlport4=yes
cannam@85 7048 ;;
cannam@85 7049 esac
cannam@85 7050
cannam@85 7051 if test "$solaris_use_stlport4" != yes; then
cannam@85 7052 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
cannam@85 7053 fi
cannam@85 7054 ;;
cannam@85 7055 esac
cannam@85 7056 ;;
cannam@85 7057
cannam@85 7058 solaris*)
cannam@85 7059 case $cc_basename in
cannam@85 7060 CC* | sunCC*)
cannam@85 7061 # The more standards-conforming stlport4 library is
cannam@85 7062 # incompatible with the Cstd library. Avoid specifying
cannam@85 7063 # it if it's in CXXFLAGS. Ignore libCrun as
cannam@85 7064 # -library=stlport4 depends on it.
cannam@85 7065 case " $CXX $CXXFLAGS " in
cannam@85 7066 *" -library=stlport4 "*)
cannam@85 7067 solaris_use_stlport4=yes
cannam@85 7068 ;;
cannam@85 7069 esac
cannam@85 7070
cannam@85 7071 # Adding this requires a known-good setup of shared libraries for
cannam@85 7072 # Sun compiler versions before 5.6, else PIC objects from an old
cannam@85 7073 # archive will be linked into the output, leading to subtle bugs.
cannam@85 7074 if test "$solaris_use_stlport4" != yes; then
cannam@85 7075 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
cannam@85 7076 fi
cannam@85 7077 ;;
cannam@85 7078 esac
cannam@85 7079 ;;
cannam@85 7080 esac
cannam@85 7081 ])
cannam@85 7082
cannam@85 7083 case " $_LT_TAGVAR(postdeps, $1) " in
cannam@85 7084 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
cannam@85 7085 esac
cannam@85 7086 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
cannam@85 7087 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
cannam@85 7088 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
cannam@85 7089 fi
cannam@85 7090 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
cannam@85 7091 [The directories searched by this compiler when creating a shared library])
cannam@85 7092 _LT_TAGDECL([], [predep_objects], [1],
cannam@85 7093 [Dependencies to place before and after the objects being linked to
cannam@85 7094 create a shared library])
cannam@85 7095 _LT_TAGDECL([], [postdep_objects], [1])
cannam@85 7096 _LT_TAGDECL([], [predeps], [1])
cannam@85 7097 _LT_TAGDECL([], [postdeps], [1])
cannam@85 7098 _LT_TAGDECL([], [compiler_lib_search_path], [1],
cannam@85 7099 [The library search path used internally by the compiler when linking
cannam@85 7100 a shared library])
cannam@85 7101 ])# _LT_SYS_HIDDEN_LIBDEPS
cannam@85 7102
cannam@85 7103
cannam@85 7104 # _LT_LANG_F77_CONFIG([TAG])
cannam@85 7105 # --------------------------
cannam@85 7106 # Ensure that the configuration variables for a Fortran 77 compiler are
cannam@85 7107 # suitably defined. These variables are subsequently used by _LT_CONFIG
cannam@85 7108 # to write the compiler configuration to `libtool'.
cannam@85 7109 m4_defun([_LT_LANG_F77_CONFIG],
cannam@85 7110 [AC_LANG_PUSH(Fortran 77)
cannam@85 7111 if test -z "$F77" || test "X$F77" = "Xno"; then
cannam@85 7112 _lt_disable_F77=yes
cannam@85 7113 fi
cannam@85 7114
cannam@85 7115 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@85 7116 _LT_TAGVAR(allow_undefined_flag, $1)=
cannam@85 7117 _LT_TAGVAR(always_export_symbols, $1)=no
cannam@85 7118 _LT_TAGVAR(archive_expsym_cmds, $1)=
cannam@85 7119 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
cannam@85 7120 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@85 7121 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
cannam@85 7122 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
cannam@85 7123 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
cannam@85 7124 _LT_TAGVAR(hardcode_libdir_separator, $1)=
cannam@85 7125 _LT_TAGVAR(hardcode_minus_L, $1)=no
cannam@85 7126 _LT_TAGVAR(hardcode_automatic, $1)=no
cannam@85 7127 _LT_TAGVAR(inherit_rpath, $1)=no
cannam@85 7128 _LT_TAGVAR(module_cmds, $1)=
cannam@85 7129 _LT_TAGVAR(module_expsym_cmds, $1)=
cannam@85 7130 _LT_TAGVAR(link_all_deplibs, $1)=unknown
cannam@85 7131 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
cannam@85 7132 _LT_TAGVAR(reload_flag, $1)=$reload_flag
cannam@85 7133 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
cannam@85 7134 _LT_TAGVAR(no_undefined_flag, $1)=
cannam@85 7135 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@85 7136 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
cannam@85 7137
cannam@85 7138 # Source file extension for f77 test sources.
cannam@85 7139 ac_ext=f
cannam@85 7140
cannam@85 7141 # Object file extension for compiled f77 test sources.
cannam@85 7142 objext=o
cannam@85 7143 _LT_TAGVAR(objext, $1)=$objext
cannam@85 7144
cannam@85 7145 # No sense in running all these tests if we already determined that
cannam@85 7146 # the F77 compiler isn't working. Some variables (like enable_shared)
cannam@85 7147 # are currently assumed to apply to all compilers on this platform,
cannam@85 7148 # and will be corrupted by setting them based on a non-working compiler.
cannam@85 7149 if test "$_lt_disable_F77" != yes; then
cannam@85 7150 # Code to be used in simple compile tests
cannam@85 7151 lt_simple_compile_test_code="\
cannam@85 7152 subroutine t
cannam@85 7153 return
cannam@85 7154 end
cannam@85 7155 "
cannam@85 7156
cannam@85 7157 # Code to be used in simple link tests
cannam@85 7158 lt_simple_link_test_code="\
cannam@85 7159 program t
cannam@85 7160 end
cannam@85 7161 "
cannam@85 7162
cannam@85 7163 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
cannam@85 7164 _LT_TAG_COMPILER
cannam@85 7165
cannam@85 7166 # save warnings/boilerplate of simple test code
cannam@85 7167 _LT_COMPILER_BOILERPLATE
cannam@85 7168 _LT_LINKER_BOILERPLATE
cannam@85 7169
cannam@85 7170 # Allow CC to be a program name with arguments.
cannam@85 7171 lt_save_CC="$CC"
cannam@85 7172 lt_save_GCC=$GCC
cannam@85 7173 lt_save_CFLAGS=$CFLAGS
cannam@85 7174 CC=${F77-"f77"}
cannam@85 7175 CFLAGS=$FFLAGS
cannam@85 7176 compiler=$CC
cannam@85 7177 _LT_TAGVAR(compiler, $1)=$CC
cannam@85 7178 _LT_CC_BASENAME([$compiler])
cannam@85 7179 GCC=$G77
cannam@85 7180 if test -n "$compiler"; then
cannam@85 7181 AC_MSG_CHECKING([if libtool supports shared libraries])
cannam@85 7182 AC_MSG_RESULT([$can_build_shared])
cannam@85 7183
cannam@85 7184 AC_MSG_CHECKING([whether to build shared libraries])
cannam@85 7185 test "$can_build_shared" = "no" && enable_shared=no
cannam@85 7186
cannam@85 7187 # On AIX, shared libraries and static libraries use the same namespace, and
cannam@85 7188 # are all built from PIC.
cannam@85 7189 case $host_os in
cannam@85 7190 aix3*)
cannam@85 7191 test "$enable_shared" = yes && enable_static=no
cannam@85 7192 if test -n "$RANLIB"; then
cannam@85 7193 archive_cmds="$archive_cmds~\$RANLIB \$lib"
cannam@85 7194 postinstall_cmds='$RANLIB $lib'
cannam@85 7195 fi
cannam@85 7196 ;;
cannam@85 7197 aix[[4-9]]*)
cannam@85 7198 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
cannam@85 7199 test "$enable_shared" = yes && enable_static=no
cannam@85 7200 fi
cannam@85 7201 ;;
cannam@85 7202 esac
cannam@85 7203 AC_MSG_RESULT([$enable_shared])
cannam@85 7204
cannam@85 7205 AC_MSG_CHECKING([whether to build static libraries])
cannam@85 7206 # Make sure either enable_shared or enable_static is yes.
cannam@85 7207 test "$enable_shared" = yes || enable_static=yes
cannam@85 7208 AC_MSG_RESULT([$enable_static])
cannam@85 7209
cannam@85 7210 _LT_TAGVAR(GCC, $1)="$G77"
cannam@85 7211 _LT_TAGVAR(LD, $1)="$LD"
cannam@85 7212
cannam@85 7213 ## CAVEAT EMPTOR:
cannam@85 7214 ## There is no encapsulation within the following macros, do not change
cannam@85 7215 ## the running order or otherwise move them around unless you know exactly
cannam@85 7216 ## what you are doing...
cannam@85 7217 _LT_COMPILER_PIC($1)
cannam@85 7218 _LT_COMPILER_C_O($1)
cannam@85 7219 _LT_COMPILER_FILE_LOCKS($1)
cannam@85 7220 _LT_LINKER_SHLIBS($1)
cannam@85 7221 _LT_SYS_DYNAMIC_LINKER($1)
cannam@85 7222 _LT_LINKER_HARDCODE_LIBPATH($1)
cannam@85 7223
cannam@85 7224 _LT_CONFIG($1)
cannam@85 7225 fi # test -n "$compiler"
cannam@85 7226
cannam@85 7227 GCC=$lt_save_GCC
cannam@85 7228 CC="$lt_save_CC"
cannam@85 7229 CFLAGS="$lt_save_CFLAGS"
cannam@85 7230 fi # test "$_lt_disable_F77" != yes
cannam@85 7231
cannam@85 7232 AC_LANG_POP
cannam@85 7233 ])# _LT_LANG_F77_CONFIG
cannam@85 7234
cannam@85 7235
cannam@85 7236 # _LT_LANG_FC_CONFIG([TAG])
cannam@85 7237 # -------------------------
cannam@85 7238 # Ensure that the configuration variables for a Fortran compiler are
cannam@85 7239 # suitably defined. These variables are subsequently used by _LT_CONFIG
cannam@85 7240 # to write the compiler configuration to `libtool'.
cannam@85 7241 m4_defun([_LT_LANG_FC_CONFIG],
cannam@85 7242 [AC_LANG_PUSH(Fortran)
cannam@85 7243
cannam@85 7244 if test -z "$FC" || test "X$FC" = "Xno"; then
cannam@85 7245 _lt_disable_FC=yes
cannam@85 7246 fi
cannam@85 7247
cannam@85 7248 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@85 7249 _LT_TAGVAR(allow_undefined_flag, $1)=
cannam@85 7250 _LT_TAGVAR(always_export_symbols, $1)=no
cannam@85 7251 _LT_TAGVAR(archive_expsym_cmds, $1)=
cannam@85 7252 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
cannam@85 7253 _LT_TAGVAR(hardcode_direct, $1)=no
cannam@85 7254 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
cannam@85 7255 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
cannam@85 7256 _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
cannam@85 7257 _LT_TAGVAR(hardcode_libdir_separator, $1)=
cannam@85 7258 _LT_TAGVAR(hardcode_minus_L, $1)=no
cannam@85 7259 _LT_TAGVAR(hardcode_automatic, $1)=no
cannam@85 7260 _LT_TAGVAR(inherit_rpath, $1)=no
cannam@85 7261 _LT_TAGVAR(module_cmds, $1)=
cannam@85 7262 _LT_TAGVAR(module_expsym_cmds, $1)=
cannam@85 7263 _LT_TAGVAR(link_all_deplibs, $1)=unknown
cannam@85 7264 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
cannam@85 7265 _LT_TAGVAR(reload_flag, $1)=$reload_flag
cannam@85 7266 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
cannam@85 7267 _LT_TAGVAR(no_undefined_flag, $1)=
cannam@85 7268 _LT_TAGVAR(whole_archive_flag_spec, $1)=
cannam@85 7269 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
cannam@85 7270
cannam@85 7271 # Source file extension for fc test sources.
cannam@85 7272 ac_ext=${ac_fc_srcext-f}
cannam@85 7273
cannam@85 7274 # Object file extension for compiled fc test sources.
cannam@85 7275 objext=o
cannam@85 7276 _LT_TAGVAR(objext, $1)=$objext
cannam@85 7277
cannam@85 7278 # No sense in running all these tests if we already determined that
cannam@85 7279 # the FC compiler isn't working. Some variables (like enable_shared)
cannam@85 7280 # are currently assumed to apply to all compilers on this platform,
cannam@85 7281 # and will be corrupted by setting them based on a non-working compiler.
cannam@85 7282 if test "$_lt_disable_FC" != yes; then
cannam@85 7283 # Code to be used in simple compile tests
cannam@85 7284 lt_simple_compile_test_code="\
cannam@85 7285 subroutine t
cannam@85 7286 return
cannam@85 7287 end
cannam@85 7288 "
cannam@85 7289
cannam@85 7290 # Code to be used in simple link tests
cannam@85 7291 lt_simple_link_test_code="\
cannam@85 7292 program t
cannam@85 7293 end
cannam@85 7294 "
cannam@85 7295
cannam@85 7296 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
cannam@85 7297 _LT_TAG_COMPILER
cannam@85 7298
cannam@85 7299 # save warnings/boilerplate of simple test code
cannam@85 7300 _LT_COMPILER_BOILERPLATE
cannam@85 7301 _LT_LINKER_BOILERPLATE
cannam@85 7302
cannam@85 7303 # Allow CC to be a program name with arguments.
cannam@85 7304 lt_save_CC="$CC"
cannam@85 7305 lt_save_GCC=$GCC
cannam@85 7306 lt_save_CFLAGS=$CFLAGS
cannam@85 7307 CC=${FC-"f95"}
cannam@85 7308 CFLAGS=$FCFLAGS
cannam@85 7309 compiler=$CC
cannam@85 7310 GCC=$ac_cv_fc_compiler_gnu
cannam@85 7311
cannam@85 7312 _LT_TAGVAR(compiler, $1)=$CC
cannam@85 7313 _LT_CC_BASENAME([$compiler])
cannam@85 7314
cannam@85 7315 if test -n "$compiler"; then
cannam@85 7316 AC_MSG_CHECKING([if libtool supports shared libraries])
cannam@85 7317 AC_MSG_RESULT([$can_build_shared])
cannam@85 7318
cannam@85 7319 AC_MSG_CHECKING([whether to build shared libraries])
cannam@85 7320 test "$can_build_shared" = "no" && enable_shared=no
cannam@85 7321
cannam@85 7322 # On AIX, shared libraries and static libraries use the same namespace, and
cannam@85 7323 # are all built from PIC.
cannam@85 7324 case $host_os in
cannam@85 7325 aix3*)
cannam@85 7326 test "$enable_shared" = yes && enable_static=no
cannam@85 7327 if test -n "$RANLIB"; then
cannam@85 7328 archive_cmds="$archive_cmds~\$RANLIB \$lib"
cannam@85 7329 postinstall_cmds='$RANLIB $lib'
cannam@85 7330 fi
cannam@85 7331 ;;
cannam@85 7332 aix[[4-9]]*)
cannam@85 7333 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
cannam@85 7334 test "$enable_shared" = yes && enable_static=no
cannam@85 7335 fi
cannam@85 7336 ;;
cannam@85 7337 esac
cannam@85 7338 AC_MSG_RESULT([$enable_shared])
cannam@85 7339
cannam@85 7340 AC_MSG_CHECKING([whether to build static libraries])
cannam@85 7341 # Make sure either enable_shared or enable_static is yes.
cannam@85 7342 test "$enable_shared" = yes || enable_static=yes
cannam@85 7343 AC_MSG_RESULT([$enable_static])
cannam@85 7344
cannam@85 7345 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
cannam@85 7346 _LT_TAGVAR(LD, $1)="$LD"
cannam@85 7347
cannam@85 7348 ## CAVEAT EMPTOR:
cannam@85 7349 ## There is no encapsulation within the following macros, do not change
cannam@85 7350 ## the running order or otherwise move them around unless you know exactly
cannam@85 7351 ## what you are doing...
cannam@85 7352 _LT_SYS_HIDDEN_LIBDEPS($1)
cannam@85 7353 _LT_COMPILER_PIC($1)
cannam@85 7354 _LT_COMPILER_C_O($1)
cannam@85 7355 _LT_COMPILER_FILE_LOCKS($1)
cannam@85 7356 _LT_LINKER_SHLIBS($1)
cannam@85 7357 _LT_SYS_DYNAMIC_LINKER($1)
cannam@85 7358 _LT_LINKER_HARDCODE_LIBPATH($1)
cannam@85 7359
cannam@85 7360 _LT_CONFIG($1)
cannam@85 7361 fi # test -n "$compiler"
cannam@85 7362
cannam@85 7363 GCC=$lt_save_GCC
cannam@85 7364 CC=$lt_save_CC
cannam@85 7365 CFLAGS=$lt_save_CFLAGS
cannam@85 7366 fi # test "$_lt_disable_FC" != yes
cannam@85 7367
cannam@85 7368 AC_LANG_POP
cannam@85 7369 ])# _LT_LANG_FC_CONFIG
cannam@85 7370
cannam@85 7371
cannam@85 7372 # _LT_LANG_GCJ_CONFIG([TAG])
cannam@85 7373 # --------------------------
cannam@85 7374 # Ensure that the configuration variables for the GNU Java Compiler compiler
cannam@85 7375 # are suitably defined. These variables are subsequently used by _LT_CONFIG
cannam@85 7376 # to write the compiler configuration to `libtool'.
cannam@85 7377 m4_defun([_LT_LANG_GCJ_CONFIG],
cannam@85 7378 [AC_REQUIRE([LT_PROG_GCJ])dnl
cannam@85 7379 AC_LANG_SAVE
cannam@85 7380
cannam@85 7381 # Source file extension for Java test sources.
cannam@85 7382 ac_ext=java
cannam@85 7383
cannam@85 7384 # Object file extension for compiled Java test sources.
cannam@85 7385 objext=o
cannam@85 7386 _LT_TAGVAR(objext, $1)=$objext
cannam@85 7387
cannam@85 7388 # Code to be used in simple compile tests
cannam@85 7389 lt_simple_compile_test_code="class foo {}"
cannam@85 7390
cannam@85 7391 # Code to be used in simple link tests
cannam@85 7392 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
cannam@85 7393
cannam@85 7394 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
cannam@85 7395 _LT_TAG_COMPILER
cannam@85 7396
cannam@85 7397 # save warnings/boilerplate of simple test code
cannam@85 7398 _LT_COMPILER_BOILERPLATE
cannam@85 7399 _LT_LINKER_BOILERPLATE
cannam@85 7400
cannam@85 7401 # Allow CC to be a program name with arguments.
cannam@85 7402 lt_save_CC=$CC
cannam@85 7403 lt_save_CFLAGS=$CFLAGS
cannam@85 7404 lt_save_GCC=$GCC
cannam@85 7405 GCC=yes
cannam@85 7406 CC=${GCJ-"gcj"}
cannam@85 7407 CFLAGS=$GCJFLAGS
cannam@85 7408 compiler=$CC
cannam@85 7409 _LT_TAGVAR(compiler, $1)=$CC
cannam@85 7410 _LT_TAGVAR(LD, $1)="$LD"
cannam@85 7411 _LT_CC_BASENAME([$compiler])
cannam@85 7412
cannam@85 7413 # GCJ did not exist at the time GCC didn't implicitly link libc in.
cannam@85 7414 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
cannam@85 7415
cannam@85 7416 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
cannam@85 7417 _LT_TAGVAR(reload_flag, $1)=$reload_flag
cannam@85 7418 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
cannam@85 7419
cannam@85 7420 ## CAVEAT EMPTOR:
cannam@85 7421 ## There is no encapsulation within the following macros, do not change
cannam@85 7422 ## the running order or otherwise move them around unless you know exactly
cannam@85 7423 ## what you are doing...
cannam@85 7424 if test -n "$compiler"; then
cannam@85 7425 _LT_COMPILER_NO_RTTI($1)
cannam@85 7426 _LT_COMPILER_PIC($1)
cannam@85 7427 _LT_COMPILER_C_O($1)
cannam@85 7428 _LT_COMPILER_FILE_LOCKS($1)
cannam@85 7429 _LT_LINKER_SHLIBS($1)
cannam@85 7430 _LT_LINKER_HARDCODE_LIBPATH($1)
cannam@85 7431
cannam@85 7432 _LT_CONFIG($1)
cannam@85 7433 fi
cannam@85 7434
cannam@85 7435 AC_LANG_RESTORE
cannam@85 7436
cannam@85 7437 GCC=$lt_save_GCC
cannam@85 7438 CC=$lt_save_CC
cannam@85 7439 CFLAGS=$lt_save_CFLAGS
cannam@85 7440 ])# _LT_LANG_GCJ_CONFIG
cannam@85 7441
cannam@85 7442
cannam@85 7443 # _LT_LANG_RC_CONFIG([TAG])
cannam@85 7444 # -------------------------
cannam@85 7445 # Ensure that the configuration variables for the Windows resource compiler
cannam@85 7446 # are suitably defined. These variables are subsequently used by _LT_CONFIG
cannam@85 7447 # to write the compiler configuration to `libtool'.
cannam@85 7448 m4_defun([_LT_LANG_RC_CONFIG],
cannam@85 7449 [AC_REQUIRE([LT_PROG_RC])dnl
cannam@85 7450 AC_LANG_SAVE
cannam@85 7451
cannam@85 7452 # Source file extension for RC test sources.
cannam@85 7453 ac_ext=rc
cannam@85 7454
cannam@85 7455 # Object file extension for compiled RC test sources.
cannam@85 7456 objext=o
cannam@85 7457 _LT_TAGVAR(objext, $1)=$objext
cannam@85 7458
cannam@85 7459 # Code to be used in simple compile tests
cannam@85 7460 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
cannam@85 7461
cannam@85 7462 # Code to be used in simple link tests
cannam@85 7463 lt_simple_link_test_code="$lt_simple_compile_test_code"
cannam@85 7464
cannam@85 7465 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
cannam@85 7466 _LT_TAG_COMPILER
cannam@85 7467
cannam@85 7468 # save warnings/boilerplate of simple test code
cannam@85 7469 _LT_COMPILER_BOILERPLATE
cannam@85 7470 _LT_LINKER_BOILERPLATE
cannam@85 7471
cannam@85 7472 # Allow CC to be a program name with arguments.
cannam@85 7473 lt_save_CC="$CC"
cannam@85 7474 lt_save_CFLAGS=$CFLAGS
cannam@85 7475 lt_save_GCC=$GCC
cannam@85 7476 GCC=
cannam@85 7477 CC=${RC-"windres"}
cannam@85 7478 CFLAGS=
cannam@85 7479 compiler=$CC
cannam@85 7480 _LT_TAGVAR(compiler, $1)=$CC
cannam@85 7481 _LT_CC_BASENAME([$compiler])
cannam@85 7482 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
cannam@85 7483
cannam@85 7484 if test -n "$compiler"; then
cannam@85 7485 :
cannam@85 7486 _LT_CONFIG($1)
cannam@85 7487 fi
cannam@85 7488
cannam@85 7489 GCC=$lt_save_GCC
cannam@85 7490 AC_LANG_RESTORE
cannam@85 7491 CC=$lt_save_CC
cannam@85 7492 CFLAGS=$lt_save_CFLAGS
cannam@85 7493 ])# _LT_LANG_RC_CONFIG
cannam@85 7494
cannam@85 7495
cannam@85 7496 # LT_PROG_GCJ
cannam@85 7497 # -----------
cannam@85 7498 AC_DEFUN([LT_PROG_GCJ],
cannam@85 7499 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
cannam@85 7500 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
cannam@85 7501 [AC_CHECK_TOOL(GCJ, gcj,)
cannam@85 7502 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
cannam@85 7503 AC_SUBST(GCJFLAGS)])])[]dnl
cannam@85 7504 ])
cannam@85 7505
cannam@85 7506 # Old name:
cannam@85 7507 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
cannam@85 7508 dnl aclocal-1.4 backwards compatibility:
cannam@85 7509 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
cannam@85 7510
cannam@85 7511
cannam@85 7512 # LT_PROG_RC
cannam@85 7513 # ----------
cannam@85 7514 AC_DEFUN([LT_PROG_RC],
cannam@85 7515 [AC_CHECK_TOOL(RC, windres,)
cannam@85 7516 ])
cannam@85 7517
cannam@85 7518 # Old name:
cannam@85 7519 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
cannam@85 7520 dnl aclocal-1.4 backwards compatibility:
cannam@85 7521 dnl AC_DEFUN([LT_AC_PROG_RC], [])
cannam@85 7522
cannam@85 7523
cannam@85 7524 # _LT_DECL_EGREP
cannam@85 7525 # --------------
cannam@85 7526 # If we don't have a new enough Autoconf to choose the best grep
cannam@85 7527 # available, choose the one first in the user's PATH.
cannam@85 7528 m4_defun([_LT_DECL_EGREP],
cannam@85 7529 [AC_REQUIRE([AC_PROG_EGREP])dnl
cannam@85 7530 AC_REQUIRE([AC_PROG_FGREP])dnl
cannam@85 7531 test -z "$GREP" && GREP=grep
cannam@85 7532 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
cannam@85 7533 _LT_DECL([], [EGREP], [1], [An ERE matcher])
cannam@85 7534 _LT_DECL([], [FGREP], [1], [A literal string matcher])
cannam@85 7535 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
cannam@85 7536 AC_SUBST([GREP])
cannam@85 7537 ])
cannam@85 7538
cannam@85 7539
cannam@85 7540 # _LT_DECL_OBJDUMP
cannam@85 7541 # --------------
cannam@85 7542 # If we don't have a new enough Autoconf to choose the best objdump
cannam@85 7543 # available, choose the one first in the user's PATH.
cannam@85 7544 m4_defun([_LT_DECL_OBJDUMP],
cannam@85 7545 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
cannam@85 7546 test -z "$OBJDUMP" && OBJDUMP=objdump
cannam@85 7547 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
cannam@85 7548 AC_SUBST([OBJDUMP])
cannam@85 7549 ])
cannam@85 7550
cannam@85 7551 # _LT_DECL_DLLTOOL
cannam@85 7552 # ----------------
cannam@85 7553 # Ensure DLLTOOL variable is set.
cannam@85 7554 m4_defun([_LT_DECL_DLLTOOL],
cannam@85 7555 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
cannam@85 7556 test -z "$DLLTOOL" && DLLTOOL=dlltool
cannam@85 7557 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
cannam@85 7558 AC_SUBST([DLLTOOL])
cannam@85 7559 ])
cannam@85 7560
cannam@85 7561 # _LT_DECL_SED
cannam@85 7562 # ------------
cannam@85 7563 # Check for a fully-functional sed program, that truncates
cannam@85 7564 # as few characters as possible. Prefer GNU sed if found.
cannam@85 7565 m4_defun([_LT_DECL_SED],
cannam@85 7566 [AC_PROG_SED
cannam@85 7567 test -z "$SED" && SED=sed
cannam@85 7568 Xsed="$SED -e 1s/^X//"
cannam@85 7569 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
cannam@85 7570 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
cannam@85 7571 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
cannam@85 7572 ])# _LT_DECL_SED
cannam@85 7573
cannam@85 7574 m4_ifndef([AC_PROG_SED], [
cannam@85 7575 ############################################################
cannam@85 7576 # NOTE: This macro has been submitted for inclusion into #
cannam@85 7577 # GNU Autoconf as AC_PROG_SED. When it is available in #
cannam@85 7578 # a released version of Autoconf we should remove this #
cannam@85 7579 # macro and use it instead. #
cannam@85 7580 ############################################################
cannam@85 7581
cannam@85 7582 m4_defun([AC_PROG_SED],
cannam@85 7583 [AC_MSG_CHECKING([for a sed that does not truncate output])
cannam@85 7584 AC_CACHE_VAL(lt_cv_path_SED,
cannam@85 7585 [# Loop through the user's path and test for sed and gsed.
cannam@85 7586 # Then use that list of sed's as ones to test for truncation.
cannam@85 7587 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
cannam@85 7588 for as_dir in $PATH
cannam@85 7589 do
cannam@85 7590 IFS=$as_save_IFS
cannam@85 7591 test -z "$as_dir" && as_dir=.
cannam@85 7592 for lt_ac_prog in sed gsed; do
cannam@85 7593 for ac_exec_ext in '' $ac_executable_extensions; do
cannam@85 7594 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
cannam@85 7595 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
cannam@85 7596 fi
cannam@85 7597 done
cannam@85 7598 done
cannam@85 7599 done
cannam@85 7600 IFS=$as_save_IFS
cannam@85 7601 lt_ac_max=0
cannam@85 7602 lt_ac_count=0
cannam@85 7603 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
cannam@85 7604 # along with /bin/sed that truncates output.
cannam@85 7605 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
cannam@85 7606 test ! -f $lt_ac_sed && continue
cannam@85 7607 cat /dev/null > conftest.in
cannam@85 7608 lt_ac_count=0
cannam@85 7609 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
cannam@85 7610 # Check for GNU sed and select it if it is found.
cannam@85 7611 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
cannam@85 7612 lt_cv_path_SED=$lt_ac_sed
cannam@85 7613 break
cannam@85 7614 fi
cannam@85 7615 while true; do
cannam@85 7616 cat conftest.in conftest.in >conftest.tmp
cannam@85 7617 mv conftest.tmp conftest.in
cannam@85 7618 cp conftest.in conftest.nl
cannam@85 7619 echo >>conftest.nl
cannam@85 7620 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
cannam@85 7621 cmp -s conftest.out conftest.nl || break
cannam@85 7622 # 10000 chars as input seems more than enough
cannam@85 7623 test $lt_ac_count -gt 10 && break
cannam@85 7624 lt_ac_count=`expr $lt_ac_count + 1`
cannam@85 7625 if test $lt_ac_count -gt $lt_ac_max; then
cannam@85 7626 lt_ac_max=$lt_ac_count
cannam@85 7627 lt_cv_path_SED=$lt_ac_sed
cannam@85 7628 fi
cannam@85 7629 done
cannam@85 7630 done
cannam@85 7631 ])
cannam@85 7632 SED=$lt_cv_path_SED
cannam@85 7633 AC_SUBST([SED])
cannam@85 7634 AC_MSG_RESULT([$SED])
cannam@85 7635 ])#AC_PROG_SED
cannam@85 7636 ])#m4_ifndef
cannam@85 7637
cannam@85 7638 # Old name:
cannam@85 7639 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
cannam@85 7640 dnl aclocal-1.4 backwards compatibility:
cannam@85 7641 dnl AC_DEFUN([LT_AC_PROG_SED], [])
cannam@85 7642
cannam@85 7643
cannam@85 7644 # _LT_CHECK_SHELL_FEATURES
cannam@85 7645 # ------------------------
cannam@85 7646 # Find out whether the shell is Bourne or XSI compatible,
cannam@85 7647 # or has some other useful features.
cannam@85 7648 m4_defun([_LT_CHECK_SHELL_FEATURES],
cannam@85 7649 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
cannam@85 7650 # Try some XSI features
cannam@85 7651 xsi_shell=no
cannam@85 7652 ( _lt_dummy="a/b/c"
cannam@85 7653 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
cannam@85 7654 = c,a/b,b/c, \
cannam@85 7655 && eval 'test $(( 1 + 1 )) -eq 2 \
cannam@85 7656 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
cannam@85 7657 && xsi_shell=yes
cannam@85 7658 AC_MSG_RESULT([$xsi_shell])
cannam@85 7659 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
cannam@85 7660
cannam@85 7661 AC_MSG_CHECKING([whether the shell understands "+="])
cannam@85 7662 lt_shell_append=no
cannam@85 7663 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
cannam@85 7664 >/dev/null 2>&1 \
cannam@85 7665 && lt_shell_append=yes
cannam@85 7666 AC_MSG_RESULT([$lt_shell_append])
cannam@85 7667 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
cannam@85 7668
cannam@85 7669 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
cannam@85 7670 lt_unset=unset
cannam@85 7671 else
cannam@85 7672 lt_unset=false
cannam@85 7673 fi
cannam@85 7674 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
cannam@85 7675
cannam@85 7676 # test EBCDIC or ASCII
cannam@85 7677 case `echo X|tr X '\101'` in
cannam@85 7678 A) # ASCII based system
cannam@85 7679 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
cannam@85 7680 lt_SP2NL='tr \040 \012'
cannam@85 7681 lt_NL2SP='tr \015\012 \040\040'
cannam@85 7682 ;;
cannam@85 7683 *) # EBCDIC based system
cannam@85 7684 lt_SP2NL='tr \100 \n'
cannam@85 7685 lt_NL2SP='tr \r\n \100\100'
cannam@85 7686 ;;
cannam@85 7687 esac
cannam@85 7688 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
cannam@85 7689 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
cannam@85 7690 ])# _LT_CHECK_SHELL_FEATURES
cannam@85 7691
cannam@85 7692
cannam@85 7693 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
cannam@85 7694 # ------------------------------------------------------
cannam@85 7695 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
cannam@85 7696 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
cannam@85 7697 m4_defun([_LT_PROG_FUNCTION_REPLACE],
cannam@85 7698 [dnl {
cannam@85 7699 sed -e '/^$1 ()$/,/^} # $1 /c\
cannam@85 7700 $1 ()\
cannam@85 7701 {\
cannam@85 7702 m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
cannam@85 7703 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
cannam@85 7704 && mv -f "$cfgfile.tmp" "$cfgfile" \
cannam@85 7705 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
cannam@85 7706 test 0 -eq $? || _lt_function_replace_fail=:
cannam@85 7707 ])
cannam@85 7708
cannam@85 7709
cannam@85 7710 # _LT_PROG_REPLACE_SHELLFNS
cannam@85 7711 # -------------------------
cannam@85 7712 # Replace existing portable implementations of several shell functions with
cannam@85 7713 # equivalent extended shell implementations where those features are available..
cannam@85 7714 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
cannam@85 7715 [if test x"$xsi_shell" = xyes; then
cannam@85 7716 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
cannam@85 7717 case ${1} in
cannam@85 7718 */*) func_dirname_result="${1%/*}${2}" ;;
cannam@85 7719 * ) func_dirname_result="${3}" ;;
cannam@85 7720 esac])
cannam@85 7721
cannam@85 7722 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
cannam@85 7723 func_basename_result="${1##*/}"])
cannam@85 7724
cannam@85 7725 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
cannam@85 7726 case ${1} in
cannam@85 7727 */*) func_dirname_result="${1%/*}${2}" ;;
cannam@85 7728 * ) func_dirname_result="${3}" ;;
cannam@85 7729 esac
cannam@85 7730 func_basename_result="${1##*/}"])
cannam@85 7731
cannam@85 7732 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
cannam@85 7733 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
cannam@85 7734 # positional parameters, so assign one to ordinary parameter first.
cannam@85 7735 func_stripname_result=${3}
cannam@85 7736 func_stripname_result=${func_stripname_result#"${1}"}
cannam@85 7737 func_stripname_result=${func_stripname_result%"${2}"}])
cannam@85 7738
cannam@85 7739 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
cannam@85 7740 func_split_long_opt_name=${1%%=*}
cannam@85 7741 func_split_long_opt_arg=${1#*=}])
cannam@85 7742
cannam@85 7743 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
cannam@85 7744 func_split_short_opt_arg=${1#??}
cannam@85 7745 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
cannam@85 7746
cannam@85 7747 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
cannam@85 7748 case ${1} in
cannam@85 7749 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
cannam@85 7750 *) func_lo2o_result=${1} ;;
cannam@85 7751 esac])
cannam@85 7752
cannam@85 7753 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
cannam@85 7754
cannam@85 7755 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
cannam@85 7756
cannam@85 7757 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
cannam@85 7758 fi
cannam@85 7759
cannam@85 7760 if test x"$lt_shell_append" = xyes; then
cannam@85 7761 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
cannam@85 7762
cannam@85 7763 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
cannam@85 7764 func_quote_for_eval "${2}"
cannam@85 7765 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
cannam@85 7766 eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
cannam@85 7767
cannam@85 7768 # Save a `func_append' function call where possible by direct use of '+='
cannam@85 7769 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
cannam@85 7770 && mv -f "$cfgfile.tmp" "$cfgfile" \
cannam@85 7771 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
cannam@85 7772 test 0 -eq $? || _lt_function_replace_fail=:
cannam@85 7773 else
cannam@85 7774 # Save a `func_append' function call even when '+=' is not available
cannam@85 7775 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
cannam@85 7776 && mv -f "$cfgfile.tmp" "$cfgfile" \
cannam@85 7777 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
cannam@85 7778 test 0 -eq $? || _lt_function_replace_fail=:
cannam@85 7779 fi
cannam@85 7780
cannam@85 7781 if test x"$_lt_function_replace_fail" = x":"; then
cannam@85 7782 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
cannam@85 7783 fi
cannam@85 7784 ])
cannam@85 7785
cannam@85 7786 # _LT_PATH_CONVERSION_FUNCTIONS
cannam@85 7787 # -----------------------------
cannam@85 7788 # Determine which file name conversion functions should be used by
cannam@85 7789 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
cannam@85 7790 # for certain cross-compile configurations and native mingw.
cannam@85 7791 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
cannam@85 7792 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
cannam@85 7793 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
cannam@85 7794 AC_MSG_CHECKING([how to convert $build file names to $host format])
cannam@85 7795 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
cannam@85 7796 [case $host in
cannam@85 7797 *-*-mingw* )
cannam@85 7798 case $build in
cannam@85 7799 *-*-mingw* ) # actually msys
cannam@85 7800 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
cannam@85 7801 ;;
cannam@85 7802 *-*-cygwin* )
cannam@85 7803 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
cannam@85 7804 ;;
cannam@85 7805 * ) # otherwise, assume *nix
cannam@85 7806 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
cannam@85 7807 ;;
cannam@85 7808 esac
cannam@85 7809 ;;
cannam@85 7810 *-*-cygwin* )
cannam@85 7811 case $build in
cannam@85 7812 *-*-mingw* ) # actually msys
cannam@85 7813 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
cannam@85 7814 ;;
cannam@85 7815 *-*-cygwin* )
cannam@85 7816 lt_cv_to_host_file_cmd=func_convert_file_noop
cannam@85 7817 ;;
cannam@85 7818 * ) # otherwise, assume *nix
cannam@85 7819 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
cannam@85 7820 ;;
cannam@85 7821 esac
cannam@85 7822 ;;
cannam@85 7823 * ) # unhandled hosts (and "normal" native builds)
cannam@85 7824 lt_cv_to_host_file_cmd=func_convert_file_noop
cannam@85 7825 ;;
cannam@85 7826 esac
cannam@85 7827 ])
cannam@85 7828 to_host_file_cmd=$lt_cv_to_host_file_cmd
cannam@85 7829 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
cannam@85 7830 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
cannam@85 7831 [0], [convert $build file names to $host format])dnl
cannam@85 7832
cannam@85 7833 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
cannam@85 7834 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
cannam@85 7835 [#assume ordinary cross tools, or native build.
cannam@85 7836 lt_cv_to_tool_file_cmd=func_convert_file_noop
cannam@85 7837 case $host in
cannam@85 7838 *-*-mingw* )
cannam@85 7839 case $build in
cannam@85 7840 *-*-mingw* ) # actually msys
cannam@85 7841 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
cannam@85 7842 ;;
cannam@85 7843 esac
cannam@85 7844 ;;
cannam@85 7845 esac
cannam@85 7846 ])
cannam@85 7847 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
cannam@85 7848 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
cannam@85 7849 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
cannam@85 7850 [0], [convert $build files to toolchain format])dnl
cannam@85 7851 ])# _LT_PATH_CONVERSION_FUNCTIONS