| 7 | # with or without modifications, as long as this notice is preserved. |
| 8 |
| 9 | # This program is distributed in the hope that it will be useful, |
| 10 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
| 11 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
| 12 | # PARTICULAR PURPOSE. |
| 13 |
| 14 | m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) |
| 15 | m4_ifndef([AC_AUTOCONF_VERSION], |
| 16 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl |
| 17 | m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, |
| 18 | [m4_warning([this file was generated for autoconf 2.69. |
| 19 | You have another version of autoconf. It may work, but is not guaranteed to. |
| 20 | If you have problems, you may need to regenerate the build system entirely. |
| 21 | To do so, use the procedure documented by the package, typically 'autoreconf'.])]) |
| 22 |
| 23 | # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- |
| 24 | # |
| 25 | # Copyright (C) 1996-2001, 2003-2018 Free Software Foundation, Inc. |
| 26 | # Written by Gordon Matzigkeit, 1996 |
| 27 | # |
| 28 | # This file is free software; the Free Software Foundation gives |
| 29 | # unlimited permission to copy and/or distribute it, with or without |
| 30 | # modifications, as long as this notice is preserved. |
| 31 |
| 32 | m4_define([_LT_COPYING], [dnl |
| 33 | # Copyright (C) 2014 Free Software Foundation, Inc. |
| 34 | # This is free software; see the source for copying conditions. There is NO |
| 35 | # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 36 |
| 37 | # GNU Libtool is free software; you can redistribute it and/or modify |
| 38 | # it under the terms of the GNU General Public License as published by |
| 39 | # the Free Software Foundation; either version 2 of of the License, or |
| 40 | # (at your option) any later version. |
| 41 | # |
| 42 | # As a special exception to the GNU General Public License, if you |
| 43 | # distribute this file as part of a program or library that is built |
| 44 | # using GNU Libtool, you may include this file under the same |
| 45 | # distribution terms that you use for the rest of that program. |
| 46 | # |
| 47 | # GNU Libtool is distributed in the hope that it will be useful, but |
| 48 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
| 49 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 50 | # GNU General Public License for more details. |
| 51 | # |
| 52 | # You should have received a copy of the GNU General Public License |
| 53 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 54 | ]) |
| 55 |
| 56 | # serial 58 LT_INIT |
| 57 |
| 58 |
| 59 | # LT_PREREQ(VERSION) |
| 60 | # ------------------ |
| 61 | # Complain and exit if this libtool version is less that VERSION. |
| 62 | m4_defun([LT_PREREQ], |
| 63 | [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, |
| 64 | [m4_default([$3], |
| 65 | [m4_fatal([Libtool version $1 or higher is required], |
| 66 | 63)])], |
| 67 | [$2])]) |
| 68 |
| 69 |
| 70 | # _LT_CHECK_BUILDDIR |
| 71 | # ------------------ |
| 72 | # Complain if the absolute build directory name contains unusual characters |
| 73 | m4_defun([_LT_CHECK_BUILDDIR], |
| 74 | [case `pwd` in |
| 75 | *\ * | *\ *) |
| 76 | AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; |
| 77 | esac |
| 78 | ]) |
| 79 |
| 80 |
| 81 | # LT_INIT([OPTIONS]) |
| 82 | # ------------------ |
| 83 | AC_DEFUN([LT_INIT], |
| 84 | [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK |
| 85 | AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl |
| 86 | AC_BEFORE([$0], [LT_LANG])dnl |
| 87 | AC_BEFORE([$0], [LT_OUTPUT])dnl |
| 88 | AC_BEFORE([$0], [LTDL_INIT])dnl |
| 89 | m4_require([_LT_CHECK_BUILDDIR])dnl |
| 90 |
| 91 | dnl Autoconf doesn't catch unexpanded LT_ macros by default: |
| 92 | m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl |
| 93 | m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl |
| 94 | dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 |
| 95 | dnl unless we require an AC_DEFUNed macro: |
| 96 | AC_REQUIRE([LTOPTIONS_VERSION])dnl |
| 97 | AC_REQUIRE([LTSUGAR_VERSION])dnl |
| 98 | AC_REQUIRE([LTVERSION_VERSION])dnl |
| 99 | AC_REQUIRE([LTOBSOLETE_VERSION])dnl |
| 100 | m4_require([_LT_PROG_LTMAIN])dnl |
| 101 |
| 102 | _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) |
| 103 |
| 104 | dnl Parse OPTIONS |
| 105 | _LT_SET_OPTIONS([$0], [$1]) |
| 106 |
| 107 | # This can be used to rebuild libtool when needed |
| 108 | LIBTOOL_DEPS=$ltmain |
| 109 |
| 110 | # Always use our own libtool. |
| 111 | LIBTOOL='$(SHELL) $(top_builddir)/libtool' |
| 112 | AC_SUBST(LIBTOOL)dnl |
| 113 |
| 114 | _LT_SETUP |
| 115 |
| 116 | # Only expand once: |
| 117 | m4_define([LT_INIT]) |
| 118 | ])# LT_INIT |
| 119 |
| 120 | # Old names: |
| 121 | AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) |
| 122 | AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) |
| 123 | dnl aclocal-1.4 backwards compatibility: |
| 124 | dnl AC_DEFUN([AC_PROG_LIBTOOL], []) |
| 125 | dnl AC_DEFUN([AM_PROG_LIBTOOL], []) |
| 126 |
| 127 |
| 128 | # _LT_PREPARE_CC_BASENAME |
| 129 | # ----------------------- |
| 130 | m4_defun([_LT_PREPARE_CC_BASENAME], [ |
| 131 | # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. |
| 132 | func_cc_basename () |
| 133 | { |
| 134 | for cc_temp in @S|@*""; do |
| 135 | case $cc_temp in |
| 136 | compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; |
| 137 | distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; |
| 138 | \-*) ;; |
| 139 | *) break;; |
| 140 | esac |
| 141 | done |
| 142 | func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` |
| 143 | } |
| 144 | ])# _LT_PREPARE_CC_BASENAME |
| 145 |
| 146 |
| 147 | # _LT_CC_BASENAME(CC) |
| 148 | # ------------------- |
| 149 | # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, |
| 150 | # but that macro is also expanded into generated libtool script, which |
| 151 | # arranges for $SED and $ECHO to be set by different means. |
| 152 | m4_defun([_LT_CC_BASENAME], |
| 153 | [m4_require([_LT_PREPARE_CC_BASENAME])dnl |
| 154 | AC_REQUIRE([_LT_DECL_SED])dnl |
| 155 | AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl |
| 156 | func_cc_basename $1 |
| 157 | cc_basename=$func_cc_basename_result |
| 158 | ]) |
| 159 |
| 160 |
| 161 | # _LT_FILEUTILS_DEFAULTS |
| 162 | # ---------------------- |
| 163 | # It is okay to use these file commands and assume they have been set |
| 164 | # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. |
| 165 | m4_defun([_LT_FILEUTILS_DEFAULTS], |
| 166 | [: ${CP="cp -f"} |
| 167 | : ${MV="mv -f"} |
| 168 | : ${RM="rm -f"} |
| 169 | ])# _LT_FILEUTILS_DEFAULTS |
| 170 |
| 171 |
| 172 | # _LT_SETUP |
| 173 | # --------- |
| 174 | m4_defun([_LT_SETUP], |
| 175 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl |
| 176 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
| 177 | AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl |
| 178 | AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl |
| 179 |
| 180 | _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl |
| 181 | dnl |
| 182 | _LT_DECL([], [host_alias], [0], [The host system])dnl |
| 183 | _LT_DECL([], [host], [0])dnl |
| 184 | _LT_DECL([], [host_os], [0])dnl |
| 185 | dnl |
| 186 | _LT_DECL([], [build_alias], [0], [The build system])dnl |
| 187 | _LT_DECL([], [build], [0])dnl |
| 188 | _LT_DECL([], [build_os], [0])dnl |
| 189 | dnl |
| 190 | AC_REQUIRE([AC_PROG_CC])dnl |
| 191 | AC_REQUIRE([LT_PATH_LD])dnl |
| 192 | AC_REQUIRE([LT_PATH_NM])dnl |
| 193 | dnl |
| 194 | AC_REQUIRE([AC_PROG_LN_S])dnl |
| 195 | test -z "$LN_S" && LN_S="ln -s" |
| 196 | _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl |
| 197 | dnl |
| 198 | AC_REQUIRE([LT_CMD_MAX_LEN])dnl |
| 199 | _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl |
| 200 | _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl |
| 201 | dnl |
| 202 | m4_require([_LT_FILEUTILS_DEFAULTS])dnl |
| 203 | m4_require([_LT_CHECK_SHELL_FEATURES])dnl |
| 204 | m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl |
| 205 | m4_require([_LT_CMD_RELOAD])dnl |
| 206 | m4_require([_LT_CHECK_MAGIC_METHOD])dnl |
| 207 | m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl |
| 208 | m4_require([_LT_CMD_OLD_ARCHIVE])dnl |
| 209 | m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl |
| 210 | m4_require([_LT_WITH_SYSROOT])dnl |
| 211 | m4_require([_LT_CMD_TRUNCATE])dnl |
| 212 |
| 213 | _LT_CONFIG_LIBTOOL_INIT([ |
| 214 | # See if we are running on zsh, and set the options that allow our |
| 215 | # commands through without removal of \ escapes INIT. |
| 216 | if test -n "\${ZSH_VERSION+set}"; then |
| 217 | setopt NO_GLOB_SUBST |
| 218 | fi |
| 219 | ]) |
| 220 | if test -n "${ZSH_VERSION+set}"; then |
| 221 | setopt NO_GLOB_SUBST |
| 222 | fi |
| 223 |
| 224 | _LT_CHECK_OBJDIR |
| 225 |
| 226 | m4_require([_LT_TAG_COMPILER])dnl |
| 227 |
| 228 | case $host_os in |
| 229 | aix3*) |
| 230 | # AIX sometimes has problems with the GCC collect2 program. For some |
| 231 | # reason, if we set the COLLECT_NAMES environment variable, the problems |
| 232 | # vanish in a puff of smoke. |
| 233 | if test set != "${COLLECT_NAMES+set}"; then |
| 234 | COLLECT_NAMES= |
| 235 | export COLLECT_NAMES |
| 236 | fi |
| 237 | ;; |
| 238 | esac |
| 239 |
| 240 | # Global variables: |
| 241 | ofile=libtool |
| 242 | can_build_shared=yes |
| 243 |
| 244 | # All known linkers require a '.a' archive for static linking (except MSVC and |
| 245 | # ICC, which need '.lib'). |
| 246 | libext=a |
| 247 |
| 248 | with_gnu_ld=$lt_cv_prog_gnu_ld |
| 249 |
| 250 | old_CC=$CC |
| 251 | old_CFLAGS=$CFLAGS |
| 252 |
| 253 | # Set sane defaults for various variables |
| 254 | test -z "$CC" && CC=cc |
| 255 | test -z "$LTCC" && LTCC=$CC |
| 256 | test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS |
| 257 | test -z "$LD" && LD=ld |
| 258 | test -z "$ac_objext" && ac_objext=o |
| 259 |
| 260 | _LT_CC_BASENAME([$compiler]) |
| 261 |
| 262 | # Only perform the check for file, if the check method requires it |
| 263 | test -z "$MAGIC_CMD" && MAGIC_CMD=file |
| 264 | case $deplibs_check_method in |
| 265 | file_magic*) |
| 266 | if test "$file_magic_cmd" = '$MAGIC_CMD'; then |
| 267 | _LT_PATH_MAGIC |
| 268 | fi |
| 269 | ;; |
| 270 | esac |
| 271 |
| 272 | # Use C for the default configuration in the libtool script |
| 273 | LT_SUPPORTED_TAG([CC]) |
| 274 | _LT_LANG_C_CONFIG |
| 275 | _LT_LANG_DEFAULT_CONFIG |
| 276 | _LT_CONFIG_COMMANDS |
| 277 | ])# _LT_SETUP |
| 278 |
| 279 |
| 280 | # _LT_PREPARE_SED_QUOTE_VARS |
| 281 | # -------------------------- |
| 282 | # Define a few sed substitution that help us do robust quoting. |
| 283 | m4_defun([_LT_PREPARE_SED_QUOTE_VARS], |
| 284 | [# Backslashify metacharacters that are still active within |
| 285 | # double-quoted strings. |
| 286 | sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' |
| 287 |
| 288 | # Same as above, but do not quote variable references. |
| 289 | double_quote_subst='s/\([["`\\]]\)/\\\1/g' |
| 290 |
| 291 | # Sed substitution to delay expansion of an escaped shell variable in a |
| 292 | # double_quote_subst'ed string. |
| 293 | delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' |
| 294 |
| 295 | # Sed substitution to delay expansion of an escaped single quote. |
| 296 | delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' |
| 297 |
| 298 | # Sed substitution to avoid accidental globbing in evaled expressions |
| 299 | no_glob_subst='s/\*/\\\*/g' |
| 300 | ]) |
| 301 |
| 302 | # _LT_PROG_LTMAIN |
| 303 | # --------------- |
| 304 | # Note that this code is called both from 'configure', and 'config.status' |
| 305 | # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, |
| 306 | # 'config.status' has no value for ac_aux_dir unless we are using Automake, |
| 307 | # so we pass a copy along to make sure it has a sensible value anyway. |
| 308 | m4_defun([_LT_PROG_LTMAIN], |
| 309 | [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl |
| 310 | _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) |
| 311 | ltmain=$ac_aux_dir/ltmain.sh |
| 312 | ])# _LT_PROG_LTMAIN |
| 313 |
| 314 |
| 315 |
| 316 | # So that we can recreate a full libtool script including additional |
| 317 | # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS |
| 318 | # in macros and then make a single call at the end using the 'libtool' |
| 319 | # label. |
| 320 |
| 321 |
| 322 | # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) |
| 323 | # ---------------------------------------- |
| 324 | # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. |
| 325 | m4_define([_LT_CONFIG_LIBTOOL_INIT], |
| 326 | [m4_ifval([$1], |
| 327 | [m4_append([_LT_OUTPUT_LIBTOOL_INIT], |
| 328 | [$1 |
| 329 | ])])]) |
| 330 |
| 331 | # Initialize. |
| 332 | m4_define([_LT_OUTPUT_LIBTOOL_INIT]) |
| 333 |
| 334 |
| 335 | # _LT_CONFIG_LIBTOOL([COMMANDS]) |
| 336 | # ------------------------------ |
| 337 | # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. |
| 338 | m4_define([_LT_CONFIG_LIBTOOL], |
| 339 | [m4_ifval([$1], |
| 340 | [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], |
| 341 | [$1 |
| 342 | ])])]) |
| 343 |
| 344 | # Initialize. |
| 345 | m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) |
| 346 |
| 347 |
| 348 | # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) |
| 349 | # ----------------------------------------------------- |
| 350 | m4_defun([_LT_CONFIG_SAVE_COMMANDS], |
| 351 | [_LT_CONFIG_LIBTOOL([$1]) |
| 352 | _LT_CONFIG_LIBTOOL_INIT([$2]) |
| 353 | ]) |
| 354 |
| 355 |
| 356 | # _LT_FORMAT_COMMENT([COMMENT]) |
| 357 | # ----------------------------- |
| 358 | # Add leading comment marks to the start of each line, and a trailing |
| 359 | # full-stop to the whole comment if one is not present already. |
| 360 | m4_define([_LT_FORMAT_COMMENT], |
| 361 | [m4_ifval([$1], [ |
| 362 | m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], |
| 363 | [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) |
| 364 | )]) |
| 365 |
| 366 |
| 367 |
| 368 |
| 369 |
| 370 | # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) |
| 371 | # ------------------------------------------------------------------- |
| 372 | # CONFIGNAME is the name given to the value in the libtool script. |
| 373 | # VARNAME is the (base) name used in the configure script. |
| 374 | # VALUE may be 0, 1 or 2 for a computed quote escaped value based on |
| 375 | # VARNAME. Any other value will be used directly. |
| 376 | m4_define([_LT_DECL], |
| 377 | [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], |
| 378 | [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], |
| 379 | [m4_ifval([$1], [$1], [$2])]) |
| 380 | lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) |
| 381 | m4_ifval([$4], |
| 382 | [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) |
| 383 | lt_dict_add_subkey([lt_decl_dict], [$2], |
| 384 | [tagged?], [m4_ifval([$5], [yes], [no])])]) |
| 385 | ]) |
| 386 |
| 387 |
| 388 | # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) |
| 389 | # -------------------------------------------------------- |
| 390 | m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) |
| 391 |
| 392 |
| 393 | # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) |
| 394 | # ------------------------------------------------ |
| 395 | m4_define([lt_decl_tag_varnames], |
| 396 | [_lt_decl_filter([tagged?], [yes], $@)]) |
| 397 |
| 398 |
| 399 | # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) |
| 400 | # --------------------------------------------------------- |
| 401 | m4_define([_lt_decl_filter], |
| 402 | [m4_case([$#], |
| 403 | [0], [m4_fatal([$0: too few arguments: $#])], |
| 404 | [1], [m4_fatal([$0: too few arguments: $#: $1])], |
| 405 | [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], |
| 406 | [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], |
| 407 | [lt_dict_filter([lt_decl_dict], $@)])[]dnl |
| 408 | ]) |
| 409 |
| 410 |
| 411 | # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) |
| 412 | # -------------------------------------------------- |
| 413 | m4_define([lt_decl_quote_varnames], |
| 414 | [_lt_decl_filter([value], [1], $@)]) |
| 415 |
| 416 |
| 417 | # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) |
| 418 | # --------------------------------------------------- |
| 419 | m4_define([lt_decl_dquote_varnames], |
| 420 | [_lt_decl_filter([value], [2], $@)]) |
| 421 |
| 422 |
| 423 | # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) |
| 424 | # --------------------------------------------------- |
| 425 | m4_define([lt_decl_varnames_tagged], |
| 426 | [m4_assert([$# <= 2])dnl |
| 427 | _$0(m4_quote(m4_default([$1], [[, ]])), |
| 428 | m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), |
| 429 | m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) |
| 430 | m4_define([_lt_decl_varnames_tagged], |
| 431 | [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) |
| 432 |
| 433 |
| 434 | # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) |
| 435 | # ------------------------------------------------ |
| 436 | m4_define([lt_decl_all_varnames], |
| 437 | [_$0(m4_quote(m4_default([$1], [[, ]])), |
| 438 | m4_if([$2], [], |
| 439 | m4_quote(lt_decl_varnames), |
| 440 | m4_quote(m4_shift($@))))[]dnl |
| 441 | ]) |
| 442 | m4_define([_lt_decl_all_varnames], |
| 443 | [lt_join($@, lt_decl_varnames_tagged([$1], |
| 444 | lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl |
| 445 | ]) |
| 446 |
| 447 |
| 448 | # _LT_CONFIG_STATUS_DECLARE([VARNAME]) |
| 449 | # ------------------------------------ |
| 450 | # Quote a variable value, and forward it to 'config.status' so that its |
| 451 | # declaration there will have the same value as in 'configure'. VARNAME |
| 452 | # must have a single quote delimited value for this to work. |
| 453 | m4_define([_LT_CONFIG_STATUS_DECLARE], |
| 454 | [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) |
| 455 |
| 456 |
| 457 | # _LT_CONFIG_STATUS_DECLARATIONS |
| 458 | # ------------------------------ |
| 459 | # We delimit libtool config variables with single quotes, so when |
| 460 | # we write them to config.status, we have to be sure to quote all |
| 461 | # embedded single quotes properly. In configure, this macro expands |
| 462 | # each variable declared with _LT_DECL (and _LT_TAGDECL) into: |
| 463 | # |
| 464 | # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' |
| 465 | m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], |
| 466 | [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), |
| 467 | [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) |
| 468 |
| 469 |
| 470 | # _LT_LIBTOOL_TAGS |
| 471 | # ---------------- |
| 472 | # Output comment and list of tags supported by the script |
| 473 | m4_defun([_LT_LIBTOOL_TAGS], |
| 474 | [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl |
| 475 | available_tags='_LT_TAGS'dnl |
| 476 | ]) |
| 477 |
| 478 |
| 479 | # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) |
| 480 | # ----------------------------------- |
| 481 | # Extract the dictionary values for VARNAME (optionally with TAG) and |
| 482 | # expand to a commented shell variable setting: |
| 483 | # |
| 484 | # # Some comment about what VAR is for. |
| 485 | # visible_name=$lt_internal_name |
| 486 | m4_define([_LT_LIBTOOL_DECLARE], |
| 487 | [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], |
| 488 | [description])))[]dnl |
| 489 | m4_pushdef([_libtool_name], |
| 490 | m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl |
| 491 | m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), |
| 492 | [0], [_libtool_name=[$]$1], |
| 493 | [1], [_libtool_name=$lt_[]$1], |
| 494 | [2], [_libtool_name=$lt_[]$1], |
| 495 | [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl |
| 496 | m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl |
| 497 | ]) |
| 498 |
| 499 |
| 500 | # _LT_LIBTOOL_CONFIG_VARS |
| 501 | # ----------------------- |
| 502 | # Produce commented declarations of non-tagged libtool config variables |
| 503 | # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' |
| 504 | # script. Tagged libtool config variables (even for the LIBTOOL CONFIG |
| 505 | # section) are produced by _LT_LIBTOOL_TAG_VARS. |
| 506 | m4_defun([_LT_LIBTOOL_CONFIG_VARS], |
| 507 | [m4_foreach([_lt_var], |
| 508 | m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), |
| 509 | [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) |
| 510 |
| 511 |
| 512 | # _LT_LIBTOOL_TAG_VARS(TAG) |
| 513 | # ------------------------- |
| 514 | m4_define([_LT_LIBTOOL_TAG_VARS], |
| 515 | [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), |
| 516 | [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) |
| 517 |
| 518 |
| 519 | # _LT_TAGVAR(VARNAME, [TAGNAME]) |
| 520 | # ------------------------------ |
| 521 | m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) |
| 522 |
| 523 |
| 524 | # _LT_CONFIG_COMMANDS |
| 525 | # ------------------- |
| 526 | # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of |
| 527 | # variables for single and double quote escaping we saved from calls |
| 528 | # to _LT_DECL, we can put quote escaped variables declarations |
| 529 | # into 'config.status', and then the shell code to quote escape them in |
| 530 | # for loops in 'config.status'. Finally, any additional code accumulated |
| 531 | # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. |
| 532 | m4_defun([_LT_CONFIG_COMMANDS], |
| 533 | [AC_PROVIDE_IFELSE([LT_OUTPUT], |
| 534 | dnl If the libtool generation code has been placed in $CONFIG_LT, |
| 535 | dnl instead of duplicating it all over again into config.status, |
| 536 | dnl then we will have config.status run $CONFIG_LT later, so it |
| 537 | dnl needs to know what name is stored there: |
| 538 | [AC_CONFIG_COMMANDS([libtool], |
| 539 | [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], |
| 540 | dnl If the libtool generation code is destined for config.status, |
| 541 | dnl expand the accumulated commands and init code now: |
| 542 | [AC_CONFIG_COMMANDS([libtool], |
| 543 | [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) |
| 544 | ])#_LT_CONFIG_COMMANDS |
| 545 |
| 546 |
| 547 | # Initialize. |
| 548 | m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], |
| 549 | [ |
| 550 |
| 551 | # The HP-UX ksh and POSIX shell print the target directory to stdout |
| 552 | # if CDPATH is set. |
| 553 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH |
| 554 |
| 555 | sed_quote_subst='$sed_quote_subst' |
| 556 | double_quote_subst='$double_quote_subst' |
| 557 | delay_variable_subst='$delay_variable_subst' |
| 558 | _LT_CONFIG_STATUS_DECLARATIONS |
| 559 | LTCC='$LTCC' |
| 560 | LTCFLAGS='$LTCFLAGS' |
| 561 | compiler='$compiler_DEFAULT' |
| 562 |
| 563 | # A function that is used when there is no print builtin or printf. |
| 564 | func_fallback_echo () |
| 565 | { |
| 566 | eval 'cat <<_LTECHO_EOF |
| 567 | \$[]1 |
| 568 | _LTECHO_EOF' |
| 569 | } |
| 570 |
| 571 | # Quote evaled strings. |
| 572 | for var in lt_decl_all_varnames([[ \ |
| 573 | ]], lt_decl_quote_varnames); do |
| 574 | case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in |
| 575 | *[[\\\\\\\`\\"\\\$]]*) |
| 576 | eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes |
| 577 | ;; |
| 578 | *) |
| 579 | eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" |
| 580 | ;; |
| 581 | esac |
| 582 | done |
| 583 |
| 584 | # Double-quote double-evaled strings. |
| 585 | for var in lt_decl_all_varnames([[ \ |
| 586 | ]], lt_decl_dquote_varnames); do |
| 587 | case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in |
| 588 | *[[\\\\\\\`\\"\\\$]]*) |
| 589 | eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes |
| 590 | ;; |
| 591 | *) |
| 592 | eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" |
| 593 | ;; |
| 594 | esac |
| 595 | done |
| 596 |
| 597 | _LT_OUTPUT_LIBTOOL_INIT |
| 598 | ]) |
| 599 |
| 600 | # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) |
| 601 | # ------------------------------------ |
| 602 | # Generate a child script FILE with all initialization necessary to |
| 603 | # reuse the environment learned by the parent script, and make the |
| 604 | # file executable. If COMMENT is supplied, it is inserted after the |
| 605 | # '#!' sequence but before initialization text begins. After this |
| 606 | # macro, additional text can be appended to FILE to form the body of |
| 607 | # the child script. The macro ends with non-zero status if the |
| 608 | # file could not be fully written (such as if the disk is full). |
| 609 | m4_ifdef([AS_INIT_GENERATED], |
| 610 | [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], |
| 611 | [m4_defun([_LT_GENERATED_FILE_INIT], |
| 612 | [m4_require([AS_PREPARE])]dnl |
| 613 | [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl |
| 614 | [lt_write_fail=0 |
| 615 | cat >$1 <<_ASEOF || lt_write_fail=1 |
| 616 | #! $SHELL |
| 617 | # Generated by $as_me. |
| 618 | $2 |
| 619 | SHELL=\${CONFIG_SHELL-$SHELL} |
| 620 | export SHELL |
| 621 | _ASEOF |
| 622 | cat >>$1 <<\_ASEOF || lt_write_fail=1 |
| 623 | AS_SHELL_SANITIZE |
| 624 | _AS_PREPARE |
| 625 | exec AS_MESSAGE_FD>&1 |
| 626 | _ASEOF |
| 627 | test 0 = "$lt_write_fail" && chmod +x $1[]dnl |
| 628 | m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT |
| 629 |
| 630 | # LT_OUTPUT |
| 631 | # --------- |
| 632 | # This macro allows early generation of the libtool script (before |
| 633 | # AC_OUTPUT is called), incase it is used in configure for compilation |
| 634 | # tests. |
| 635 | AC_DEFUN([LT_OUTPUT], |
| 636 | [: ${CONFIG_LT=./config.lt} |
| 637 | AC_MSG_NOTICE([creating $CONFIG_LT]) |
| 638 | _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], |
| 639 | [# Run this file to recreate a libtool stub with the current configuration.]) |
| 640 |
| 641 | cat >>"$CONFIG_LT" <<\_LTEOF |
| 642 | lt_cl_silent=false |
| 643 | exec AS_MESSAGE_LOG_FD>>config.log |
| 644 | { |
| 645 | echo |
| 646 | AS_BOX([Running $as_me.]) |
| 647 | } >&AS_MESSAGE_LOG_FD |
| 648 |
| 649 | lt_cl_help="\ |
| 650 | '$as_me' creates a local libtool stub from the current configuration, |
| 651 | for use in further configure time tests before the real libtool is |
| 652 | generated. |
| 653 |
| 654 | Usage: $[0] [[OPTIONS]] |
| 655 |
| 656 | -h, --help print this help, then exit |
| 657 | -V, --version print version number, then exit |
| 658 | -q, --quiet do not print progress messages |
| 659 | -d, --debug don't remove temporary files |
| 660 |
| 661 | Report bugs to <bug-libtool@gnu.org>." |
| 662 |
| 663 | lt_cl_version="\ |
| 664 | m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl |
| 665 | m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) |
| 666 | configured by $[0], generated by m4_PACKAGE_STRING. |
| 667 |
| 668 | Copyright (C) 2011 Free Software Foundation, Inc. |
| 669 | This config.lt script is free software; the Free Software Foundation |
| 670 | gives unlimited permision to copy, distribute and modify it." |
| 671 |
| 672 | while test 0 != $[#] |
| 673 | do |
| 674 | case $[1] in |
| 675 | --version | --v* | -V ) |
| 676 | echo "$lt_cl_version"; exit 0 ;; |
| 677 | --help | --h* | -h ) |
| 678 | echo "$lt_cl_help"; exit 0 ;; |
| 679 | --debug | --d* | -d ) |
| 680 | debug=: ;; |
| 681 | --quiet | --q* | --silent | --s* | -q ) |
| 682 | lt_cl_silent=: ;; |
| 683 |
| 684 | -*) AC_MSG_ERROR([unrecognized option: $[1] |
| 685 | Try '$[0] --help' for more information.]) ;; |
| 686 |
| 687 | *) AC_MSG_ERROR([unrecognized argument: $[1] |
| 688 | Try '$[0] --help' for more information.]) ;; |
| 689 | esac |
| 690 | shift |
| 691 | done |
| 692 |
| 693 | if $lt_cl_silent; then |
| 694 | exec AS_MESSAGE_FD>/dev/null |
| 695 | fi |
| 696 | _LTEOF |
| 697 |
| 698 | cat >>"$CONFIG_LT" <<_LTEOF |
| 699 | _LT_OUTPUT_LIBTOOL_COMMANDS_INIT |
| 700 | _LTEOF |
| 701 |
| 702 | cat >>"$CONFIG_LT" <<\_LTEOF |
| 703 | AC_MSG_NOTICE([creating $ofile]) |
| 704 | _LT_OUTPUT_LIBTOOL_COMMANDS |
| 705 | AS_EXIT(0) |
| 706 | _LTEOF |
| 707 | chmod +x "$CONFIG_LT" |
| 708 |
| 709 | # configure is writing to config.log, but config.lt does its own redirection, |
| 710 | # appending to config.log, which fails on DOS, as config.log is still kept |
| 711 | # open by configure. Here we exec the FD to /dev/null, effectively closing |
| 712 | # config.log, so it can be properly (re)opened and appended to by config.lt. |
| 713 | lt_cl_success=: |
| 714 | test yes = "$silent" && |
| 715 | lt_config_lt_args="$lt_config_lt_args --quiet" |
| 716 | exec AS_MESSAGE_LOG_FD>/dev/null |
| 717 | $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false |
| 718 | exec AS_MESSAGE_LOG_FD>>config.log |
| 719 | $lt_cl_success || AS_EXIT(1) |
| 720 | ])# LT_OUTPUT |
| 721 |
| 722 |
| 723 | # _LT_CONFIG(TAG) |
| 724 | # --------------- |
| 725 | # If TAG is the built-in tag, create an initial libtool script with a |
| 726 | # default configuration from the untagged config vars. Otherwise add code |
| 727 | # to config.status for appending the configuration named by TAG from the |
| 728 | # matching tagged config vars. |
| 729 | m4_defun([_LT_CONFIG], |
| 730 | [m4_require([_LT_FILEUTILS_DEFAULTS])dnl |
| 731 | _LT_CONFIG_SAVE_COMMANDS([ |
| 732 | m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl |
| 733 | m4_if(_LT_TAG, [C], [ |
| 734 | # See if we are running on zsh, and set the options that allow our |
| 735 | # commands through without removal of \ escapes. |
| 736 | if test -n "${ZSH_VERSION+set}"; then |
| 737 | setopt NO_GLOB_SUBST |
| 738 | fi |
| 739 |
| 740 | cfgfile=${ofile}T |
| 741 | trap "$RM \"$cfgfile\"; exit 1" 1 2 15 |
| 742 | $RM "$cfgfile" |
| 743 |
| 744 | cat <<_LT_EOF >> "$cfgfile" |
| 745 | #! $SHELL |
| 746 | # Generated automatically by $as_me ($PACKAGE) $VERSION |
| 747 | # NOTE: Changes made to this file will be lost: look at ltmain.sh. |
| 748 |
| 749 | # Provide generalized library-building support services. |
| 750 | # Written by Gordon Matzigkeit, 1996 |
| 751 |
| 752 | _LT_COPYING |
| 753 | _LT_LIBTOOL_TAGS |
| 754 |
| 755 | # Configured defaults for sys_lib_dlsearch_path munging. |
| 756 | : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} |
| 757 |
| 758 | # ### BEGIN LIBTOOL CONFIG |
| 759 | _LT_LIBTOOL_CONFIG_VARS |
| 760 | _LT_LIBTOOL_TAG_VARS |
| 761 | # ### END LIBTOOL CONFIG |
| 762 |
| 763 | _LT_EOF |
| 764 |
| 765 | cat <<'_LT_EOF' >> "$cfgfile" |
| 766 |
| 767 | # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE |
| 768 |
| 769 | _LT_PREPARE_MUNGE_PATH_LIST |
| 770 | _LT_PREPARE_CC_BASENAME |
| 771 |
| 772 | # ### END FUNCTIONS SHARED WITH CONFIGURE |
| 773 |
| 774 | _LT_EOF |
| 775 |
| 776 | case $host_os in |
| 777 | aix3*) |
| 778 | cat <<\_LT_EOF >> "$cfgfile" |
| 779 | # AIX sometimes has problems with the GCC collect2 program. For some |
| 780 | # reason, if we set the COLLECT_NAMES environment variable, the problems |
| 781 | # vanish in a puff of smoke. |
| 782 | if test set != "${COLLECT_NAMES+set}"; then |
| 783 | COLLECT_NAMES= |
| 784 | export COLLECT_NAMES |
| 785 | fi |
| 786 | _LT_EOF |
| 787 | ;; |
| 788 | esac |
| 789 |
| 790 | _LT_PROG_LTMAIN |
| 791 |
| 792 | # We use sed instead of cat because bash on DJGPP gets confused if |
| 793 | # if finds mixed CR/LF and LF-only lines. Since sed operates in |
| 794 | # text mode, it properly converts lines to CR/LF. This bash problem |
| 795 | # is reportedly fixed, but why not run on old versions too? |
| 796 | sed '$q' "$ltmain" >> "$cfgfile" \ |
| 797 | || (rm -f "$cfgfile"; exit 1) |
| 798 |
| 799 | mv -f "$cfgfile" "$ofile" || |
| 800 | (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") |
| 801 | chmod +x "$ofile" |
| 802 | ], |
| 803 | [cat <<_LT_EOF >> "$ofile" |
| 804 |
| 805 | dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded |
| 806 | dnl in a comment (ie after a #). |
| 807 | # ### BEGIN LIBTOOL TAG CONFIG: $1 |
| 808 | _LT_LIBTOOL_TAG_VARS(_LT_TAG) |
| 809 | # ### END LIBTOOL TAG CONFIG: $1 |
| 810 | _LT_EOF |
| 811 | ])dnl /m4_if |
| 812 | ], |
| 813 | [m4_if([$1], [], [ |
| 814 | PACKAGE='$PACKAGE' |
| 815 | VERSION='$VERSION' |
| 816 | RM='$RM' |
| 817 | ofile='$ofile'], []) |
| 818 | ])dnl /_LT_CONFIG_SAVE_COMMANDS |
| 819 | ])# _LT_CONFIG |
| 820 |
| 821 |
| 822 | # LT_SUPPORTED_TAG(TAG) |
| 823 | # --------------------- |
| 824 | # Trace this macro to discover what tags are supported by the libtool |
| 825 | # --tag option, using: |
| 826 | # autoconf --trace 'LT_SUPPORTED_TAG:$1' |
| 827 | AC_DEFUN([LT_SUPPORTED_TAG], []) |
| 828 |
| 829 |
| 830 | # C support is built-in for now |
| 831 | m4_define([_LT_LANG_C_enabled], []) |
| 832 | m4_define([_LT_TAGS], []) |
| 833 |
| 834 |
| 835 | # LT_LANG(LANG) |
| 836 | # ------------- |
| 837 | # Enable libtool support for the given language if not already enabled. |
| 838 | AC_DEFUN([LT_LANG], |
| 839 | [AC_BEFORE([$0], [LT_OUTPUT])dnl |
| 840 | m4_case([$1], |
| 841 | [C], [_LT_LANG(C)], |
| 842 | [C++], [_LT_LANG(CXX)], |
| 843 | [Go], [_LT_LANG(GO)], |
| 844 | [Java], [_LT_LANG(GCJ)], |
| 845 | [Fortran 77], [_LT_LANG(F77)], |
| 846 | [Fortran], [_LT_LANG(FC)], |
| 847 | [Windows Resource], [_LT_LANG(RC)], |
| 848 | [m4_ifdef([_LT_LANG_]$1[_CONFIG], |
| 849 | [_LT_LANG($1)], |
| 850 | [m4_fatal([$0: unsupported language: "$1"])])])dnl |
| 851 | ])# LT_LANG |
| 852 |
| 853 |
| 854 | # _LT_LANG(LANGNAME) |
| 855 | # ------------------ |
| 856 | m4_defun([_LT_LANG], |
| 857 | [m4_ifdef([_LT_LANG_]$1[_enabled], [], |
| 858 | [LT_SUPPORTED_TAG([$1])dnl |
| 859 | m4_append([_LT_TAGS], [$1 ])dnl |
| 860 | m4_define([_LT_LANG_]$1[_enabled], [])dnl |
| 861 | _LT_LANG_$1_CONFIG($1)])dnl |
| 862 | ])# _LT_LANG |
| 863 |
| 864 |
| 865 | m4_ifndef([AC_PROG_GO], [ |
| 866 | # NOTE: This macro has been submitted for inclusion into # |
| 867 | # GNU Autoconf as AC_PROG_GO. When it is available in # |
| 868 | # a released version of Autoconf we should remove this # |
| 869 | # macro and use it instead. # |
| 870 | m4_defun([AC_PROG_GO], |
| 871 | [AC_LANG_PUSH(Go)dnl |
| 872 | AC_ARG_VAR([GOC], [Go compiler command])dnl |
| 873 | AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl |
| 874 | _AC_ARG_VAR_LDFLAGS()dnl |
| 875 | AC_CHECK_TOOL(GOC, gccgo) |
| 876 | if test -z "$GOC"; then |
| 877 | if test -n "$ac_tool_prefix"; then |
| 878 | AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) |
| 879 | fi |
| 880 | fi |
| 881 | if test -z "$GOC"; then |
| 882 | AC_CHECK_PROG(GOC, gccgo, gccgo, false) |
| 883 | fi |
| 884 | ])#m4_defun |
| 885 | ])#m4_ifndef |
| 886 |
| 887 |
| 888 | # _LT_LANG_DEFAULT_CONFIG |
| 889 | # ----------------------- |
| 890 | m4_defun([_LT_LANG_DEFAULT_CONFIG], |
| 891 | [AC_PROVIDE_IFELSE([AC_PROG_CXX], |
| 892 | [LT_LANG(CXX)], |
| 893 | [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) |
| 894 |
| 895 | AC_PROVIDE_IFELSE([AC_PROG_F77], |
| 896 | [LT_LANG(F77)], |
| 897 | [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) |
| 898 |
| 899 | AC_PROVIDE_IFELSE([AC_PROG_FC], |
| 900 | [LT_LANG(FC)], |
| 901 | [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) |
| 902 |
| 903 | dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal |
| 904 | dnl pulling things in needlessly. |
| 905 | AC_PROVIDE_IFELSE([AC_PROG_GCJ], |
| 906 | [LT_LANG(GCJ)], |
| 907 | [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], |
| 908 | [LT_LANG(GCJ)], |
| 909 | [AC_PROVIDE_IFELSE([LT_PROG_GCJ], |
| 910 | [LT_LANG(GCJ)], |
| 911 | [m4_ifdef([AC_PROG_GCJ], |
| 912 | [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) |
| 913 | m4_ifdef([A][M_PROG_GCJ], |
| 914 | [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) |
| 915 | m4_ifdef([LT_PROG_GCJ], |
| 916 | [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) |
| 917 |
| 918 | AC_PROVIDE_IFELSE([AC_PROG_GO], |
| 919 | [LT_LANG(GO)], |
| 920 | [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) |
| 921 |
| 922 | AC_PROVIDE_IFELSE([LT_PROG_RC], |
| 923 | [LT_LANG(RC)], |
| 924 | [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) |
| 925 | ])# _LT_LANG_DEFAULT_CONFIG |
| 926 |
| 927 | # Obsolete macros: |
| 928 | AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) |
| 929 | AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) |
| 930 | AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) |
| 931 | AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) |
| 932 | AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) |
| 933 | dnl aclocal-1.4 backwards compatibility: |
| 934 | dnl AC_DEFUN([AC_LIBTOOL_CXX], []) |
| 935 | dnl AC_DEFUN([AC_LIBTOOL_F77], []) |
| 936 | dnl AC_DEFUN([AC_LIBTOOL_FC], []) |
| 937 | dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) |
| 938 | dnl AC_DEFUN([AC_LIBTOOL_RC], []) |
| 939 |
| 940 |
| 941 | # _LT_TAG_COMPILER |
| 942 | # ---------------- |
| 943 | m4_defun([_LT_TAG_COMPILER], |
| 944 | [AC_REQUIRE([AC_PROG_CC])dnl |
| 945 |
| 946 | _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl |
| 947 | _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl |
| 948 | _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl |
| 949 | _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl |
| 950 |
| 951 | # If no C compiler was specified, use CC. |
| 952 | LTCC=${LTCC-"$CC"} |
| 953 |
| 954 | # If no C compiler flags were specified, use CFLAGS. |
| 955 | LTCFLAGS=${LTCFLAGS-"$CFLAGS"} |
| 956 |
| 957 | # Allow CC to be a program name with arguments. |
| 958 | compiler=$CC |
| 959 | ])# _LT_TAG_COMPILER |
| 960 |
| 961 |
| 962 | # _LT_COMPILER_BOILERPLATE |
| 963 | # ------------------------ |
| 964 | # Check for compiler boilerplate output or warnings with |
| 965 | # the simple compiler test code. |
| 966 | m4_defun([_LT_COMPILER_BOILERPLATE], |
| 967 | [m4_require([_LT_DECL_SED])dnl |
| 968 | ac_outfile=conftest.$ac_objext |
| 969 | echo "$lt_simple_compile_test_code" >conftest.$ac_ext |
| 970 | eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err |
| 971 | _lt_compiler_boilerplate=`cat conftest.err` |
| 972 | $RM conftest* |
| 973 | ])# _LT_COMPILER_BOILERPLATE |
| 974 |
| 975 |
| 976 | # _LT_LINKER_BOILERPLATE |
| 977 | # ---------------------- |
| 978 | # Check for linker boilerplate output or warnings with |
| 979 | # the simple link test code. |
| 980 | m4_defun([_LT_LINKER_BOILERPLATE], |
| 981 | [m4_require([_LT_DECL_SED])dnl |
| 982 | ac_outfile=conftest.$ac_objext |
| 983 | echo "$lt_simple_link_test_code" >conftest.$ac_ext |
| 984 | eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err |
| 985 | _lt_linker_boilerplate=`cat conftest.err` |
| 986 | $RM -r conftest* |
| 987 | ])# _LT_LINKER_BOILERPLATE |
| 988 |
| 989 | # _LT_REQUIRED_DARWIN_CHECKS |
| 990 | # ------------------------- |
| 991 | m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ |
| 992 | case $host_os in |
| 993 | rhapsody* | darwin*) |
| 994 | AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) |
| 995 | AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) |
| 996 | AC_CHECK_TOOL([LIPO], [lipo], [:]) |
| 997 | AC_CHECK_TOOL([OTOOL], [otool], [:]) |
| 998 | AC_CHECK_TOOL([OTOOL64], [otool64], [:]) |
| 999 | _LT_DECL([], [DSYMUTIL], [1], |
| 1000 | [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) |
| 1001 | _LT_DECL([], [NMEDIT], [1], |
| 1002 | [Tool to change global to local symbols on Mac OS X]) |
| 1003 | _LT_DECL([], [LIPO], [1], |
| 1004 | [Tool to manipulate fat objects and archives on Mac OS X]) |
| 1005 | _LT_DECL([], [OTOOL], [1], |
| 1006 | [ldd/readelf like tool for Mach-O binaries on Mac OS X]) |
| 1007 | _LT_DECL([], [OTOOL64], [1], |
| 1008 | [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) |
| 1009 |
| 1010 | AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], |
| 1011 | [lt_cv_apple_cc_single_mod=no |
| 1012 | if test -z "$LT_MULTI_MODULE"; then |
| 1013 | # By default we will add the -single_module flag. You can override |
| 1014 | # by either setting the environment variable LT_MULTI_MODULE |
| 1015 | # non-empty at configure time, or by adding -multi_module to the |
| 1016 | # link flags. |
| 1017 | rm -rf libconftest.dylib* |
| 1018 | echo "int foo(void){return 1;}" > conftest.c |
| 1019 | echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ |
| 1020 | -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD |
| 1021 | $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ |
| 1022 | -dynamiclib -Wl,-single_module conftest.c 2>conftest.err |
| 1023 | _lt_result=$? |
| 1024 | # If there is a non-empty error log, and "single_module" |
| 1025 | # appears in it, assume the flag caused a linker warning |
| 1026 | if test -s conftest.err && $GREP single_module conftest.err; then |
| 1027 | cat conftest.err >&AS_MESSAGE_LOG_FD |
| 1028 | # Otherwise, if the output was created with a 0 exit code from |
| 1029 | # the compiler, it worked. |
| 1030 | elif test -f libconftest.dylib && test 0 = "$_lt_result"; then |
| 1031 | lt_cv_apple_cc_single_mod=yes |
| 1032 | else |
| 1033 | cat conftest.err >&AS_MESSAGE_LOG_FD |
| 1034 | fi |
| 1035 | rm -rf libconftest.dylib* |
| 1036 | rm -f conftest.* |
| 1037 | fi]) |
| 1038 |
| 1039 | AC_CACHE_CHECK([for -exported_symbols_list linker flag], |
| 1040 | [lt_cv_ld_exported_symbols_list], |
| 1041 | [lt_cv_ld_exported_symbols_list=no |
| 1042 | save_LDFLAGS=$LDFLAGS |
| 1043 | echo "_main" > conftest.sym |
| 1044 | LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" |
| 1045 | AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], |
| 1046 | [lt_cv_ld_exported_symbols_list=yes], |
| 1047 | [lt_cv_ld_exported_symbols_list=no]) |
| 1048 | LDFLAGS=$save_LDFLAGS |
| 1049 | ]) |
| 1050 |
| 1051 | AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], |
| 1052 | [lt_cv_ld_force_load=no |
| 1053 | cat > conftest.c << _LT_EOF |
| 1054 | int forced_loaded() { return 2;} |
| 1055 | _LT_EOF |
| 1056 | echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD |
| 1057 | $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD |
| 1058 | echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD |
| 1059 | $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD |
| 1060 | echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD |
| 1061 | $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD |
| 1062 | cat > conftest.c << _LT_EOF |
| 1063 | int main() { return 0;} |
| 1064 | _LT_EOF |
| 1065 | echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD |
| 1066 | $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err |
| 1067 | _lt_result=$? |
| 1068 | if test -s conftest.err && $GREP force_load conftest.err; then |
| 1069 | cat conftest.err >&AS_MESSAGE_LOG_FD |
| 1070 | elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then |
| 1071 | lt_cv_ld_force_load=yes |
| 1072 | else |
| 1073 | cat conftest.err >&AS_MESSAGE_LOG_FD |
| 1074 | fi |
| 1075 | rm -f conftest.err libconftest.a conftest conftest.c |
| 1076 | rm -rf conftest.dSYM |
| 1077 | ]) |
| 1078 | case $host_os in |
| 1079 | rhapsody* | darwin1.[[012]]) |
| 1080 | _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; |
| 1081 | darwin1.*) |
| 1082 | _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; |
| 1083 | darwin*) # darwin 5.x on |
| 1084 | # if running on 10.5 or later, the deployment target defaults |
| 1085 | # to the OS version, if on x86, and 10.4, the deployment |
| 1086 | # target defaults to 10.4. Don't you love it? |
| 1087 | case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in |
| 1088 | 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) |
| 1089 | _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; |
| 1090 | 10.[[012]][[,.]]*) |
| 1091 | _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; |
| 1092 | 10.*) |
| 1093 | _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; |
| 1094 | esac |
| 1095 | ;; |
| 1096 | esac |
| 1097 | if test yes = "$lt_cv_apple_cc_single_mod"; then |
| 1098 | _lt_dar_single_mod='$single_module' |
| 1099 | fi |
| 1100 | if test yes = "$lt_cv_ld_exported_symbols_list"; then |
| 1101 | _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' |
| 1102 | else |
| 1103 | _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' |
| 1104 | fi |
| 1105 | if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then |
| 1106 | _lt_dsymutil='~$DSYMUTIL $lib || :' |
| 1107 | else |
| 1108 | _lt_dsymutil= |
| 1109 | fi |
| 1110 | ;; |
| 1111 | esac |
| 1112 | ]) |
| 1113 |
| 1114 |
| 1115 | # _LT_DARWIN_LINKER_FEATURES([TAG]) |
| 1116 | # --------------------------------- |
| 1117 | # Checks for linker and compiler features on darwin |
| 1118 | m4_defun([_LT_DARWIN_LINKER_FEATURES], |
| 1119 | [ |
| 1120 | m4_require([_LT_REQUIRED_DARWIN_CHECKS]) |
| 1121 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no |
| 1122 | _LT_TAGVAR(hardcode_direct, $1)=no |
| 1123 | _LT_TAGVAR(hardcode_automatic, $1)=yes |
| 1124 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported |
| 1125 | if test yes = "$lt_cv_ld_force_load"; then |
| 1126 | _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\"`' |
| 1127 | m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], |
| 1128 | [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) |
| 1129 | else |
| 1130 | _LT_TAGVAR(whole_archive_flag_spec, $1)='' |
| 1131 | fi |
| 1132 | _LT_TAGVAR(link_all_deplibs, $1)=yes |
| 1133 | _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined |
| 1134 | case $cc_basename in |
| 1135 | ifort*|nagfor*) _lt_dar_can_shared=yes ;; |
| 1136 | *) _lt_dar_can_shared=$GCC ;; |
| 1137 | esac |
| 1138 | if test yes = "$_lt_dar_can_shared"; then |
| 1139 | output_verbose_link_cmd=func_echo_all |
| 1140 | _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" |
| 1141 | _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" |
| 1142 | _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" |
| 1143 | _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" |
| 1144 | m4_if([$1], [CXX], |
| 1145 | [ if test yes != "$lt_cv_apple_cc_single_mod"; then |
| 1146 | _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" |
| 1147 | _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" |
| 1148 | fi |
| 1149 | ],[]) |
| 1150 | else |
| 1151 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 1152 | fi |
| 1153 | ]) |
| 1154 |
| 1155 | # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) |
| 1156 | # ---------------------------------- |
| 1157 | # Links a minimal program and checks the executable |
| 1158 | # for the system default hardcoded library path. In most cases, |
| 1159 | # this is /usr/lib:/lib, but when the MPI compilers are used |
| 1160 | # the location of the communication and MPI libs are included too. |
| 1161 | # If we don't find anything, use the default library path according |
| 1162 | # to the aix ld manual. |
| 1163 | # Store the results from the different compilers for each TAGNAME. |
| 1164 | # Allow to override them for all tags through lt_cv_aix_libpath. |
| 1165 | m4_defun([_LT_SYS_MODULE_PATH_AIX], |
| 1166 | [m4_require([_LT_DECL_SED])dnl |
| 1167 | if test set = "${lt_cv_aix_libpath+set}"; then |
| 1168 | aix_libpath=$lt_cv_aix_libpath |
| 1169 | else |
| 1170 | AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], |
| 1171 | [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ |
| 1172 | lt_aix_libpath_sed='[ |
| 1173 | /Import File Strings/,/^$/ { |
| 1174 | /^0/ { |
| 1175 | s/^0 *\([^ ]*\) *$/\1/ |
| 1176 | p |
| 1177 | } |
| 1178 | }]' |
| 1179 | _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` |
| 1180 | # Check for a 64-bit object if we didn't find anything. |
| 1181 | if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then |
| 1182 | _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` |
| 1183 | fi],[]) |
| 1184 | if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then |
| 1185 | _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib |
| 1186 | fi |
| 1187 | ]) |
| 1188 | aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) |
| 1189 | fi |
| 1190 | ])# _LT_SYS_MODULE_PATH_AIX |
| 1191 |
| 1192 |
| 1193 | # _LT_SHELL_INIT(ARG) |
| 1194 | # ------------------- |
| 1195 | m4_define([_LT_SHELL_INIT], |
| 1196 | [m4_divert_text([M4SH-INIT], [$1 |
| 1197 | ])])# _LT_SHELL_INIT |
| 1198 |
| 1199 |
| 1200 |
| 1201 | # _LT_PROG_ECHO_BACKSLASH |
| 1202 | # ----------------------- |
| 1203 | # Find how we can fake an echo command that does not interpret backslash. |
| 1204 | # In particular, with Autoconf 2.60 or later we add some code to the start |
| 1205 | # of the generated configure script that will find a shell with a builtin |
| 1206 | # printf (that we can use as an echo command). |
| 1207 | m4_defun([_LT_PROG_ECHO_BACKSLASH], |
| 1208 | [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' |
| 1209 | ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO |
| 1210 | ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO |
| 1211 |
| 1212 | AC_MSG_CHECKING([how to print strings]) |
| 1213 | # Test print first, because it will be a builtin if present. |
| 1214 | if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ |
| 1215 | test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then |
| 1216 | ECHO='print -r --' |
| 1217 | elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then |
| 1218 | ECHO='printf %s\n' |
| 1219 | else |
| 1220 | # Use this function as a fallback that always works. |
| 1221 | func_fallback_echo () |
| 1222 | { |
| 1223 | eval 'cat <<_LTECHO_EOF |
| 1224 | $[]1 |
| 1225 | _LTECHO_EOF' |
| 1226 | } |
| 1227 | ECHO='func_fallback_echo' |
| 1228 | fi |
| 1229 |
| 1230 | # func_echo_all arg... |
| 1231 | # Invoke $ECHO with all args, space-separated. |
| 1232 | func_echo_all () |
| 1233 | { |
| 1234 | $ECHO "$*" |
| 1235 | } |
| 1236 |
| 1237 | case $ECHO in |
| 1238 | printf*) AC_MSG_RESULT([printf]) ;; |
| 1239 | print*) AC_MSG_RESULT([print -r]) ;; |
| 1240 | *) AC_MSG_RESULT([cat]) ;; |
| 1241 | esac |
| 1242 |
| 1243 | m4_ifdef([_AS_DETECT_SUGGESTED], |
| 1244 | [_AS_DETECT_SUGGESTED([ |
| 1245 | test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( |
| 1246 | ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' |
| 1247 | ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO |
| 1248 | ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO |
| 1249 | PATH=/empty FPATH=/empty; export PATH FPATH |
| 1250 | test "X`printf %s $ECHO`" = "X$ECHO" \ |
| 1251 | || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) |
| 1252 |
| 1253 | _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) |
| 1254 | _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) |
| 1255 | ])# _LT_PROG_ECHO_BACKSLASH |
| 1256 |
| 1257 |
| 1258 | # _LT_WITH_SYSROOT |
| 1259 | # ---------------- |
| 1260 | AC_DEFUN([_LT_WITH_SYSROOT], |
| 1261 | [AC_MSG_CHECKING([for sysroot]) |
| 1262 | AC_ARG_WITH([sysroot], |
| 1263 | [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], |
| 1264 | [Search for dependent libraries within DIR (or the compiler's sysroot |
| 1265 | if not specified).])], |
| 1266 | [], [with_sysroot=no]) |
| 1267 |
| 1268 | dnl lt_sysroot will always be passed unquoted. We quote it here |
| 1269 | dnl in case the user passed a directory name. |
| 1270 | lt_sysroot= |
| 1271 | case $with_sysroot in #( |
| 1272 | yes) |
| 1273 | if test yes = "$GCC"; then |
| 1274 | lt_sysroot=`$CC --print-sysroot 2>/dev/null` |
| 1275 | fi |
| 1276 | ;; #( |
| 1277 | /*) |
| 1278 | lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` |
| 1279 | ;; #( |
| 1280 | no|'') |
| 1281 | ;; #( |
| 1282 | *) |
| 1283 | AC_MSG_RESULT([$with_sysroot]) |
| 1284 | AC_MSG_ERROR([The sysroot must be an absolute path.]) |
| 1285 | ;; |
| 1286 | esac |
| 1287 |
| 1288 | AC_MSG_RESULT([${lt_sysroot:-no}]) |
| 1289 | _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl |
| 1290 | [dependent libraries, and where our libraries should be installed.])]) |
| 1291 |
| 1292 | # _LT_ENABLE_LOCK |
| 1293 | # --------------- |
| 1294 | m4_defun([_LT_ENABLE_LOCK], |
| 1295 | [AC_ARG_ENABLE([libtool-lock], |
| 1296 | [AS_HELP_STRING([--disable-libtool-lock], |
| 1297 | [avoid locking (might break parallel builds)])]) |
| 1298 | test no = "$enable_libtool_lock" || enable_libtool_lock=yes |
| 1299 |
| 1300 | # Some flags need to be propagated to the compiler or linker for good |
| 1301 | # libtool support. |
| 1302 | case $host in |
| 1303 | ia64-*-hpux*) |
| 1304 | # Find out what ABI is being produced by ac_compile, and set mode |
| 1305 | # options accordingly. |
| 1306 | echo 'int i;' > conftest.$ac_ext |
| 1307 | if AC_TRY_EVAL(ac_compile); then |
| 1308 | case `/usr/bin/file conftest.$ac_objext` in |
| 1309 | *ELF-32*) |
| 1310 | HPUX_IA64_MODE=32 |
| 1311 | ;; |
| 1312 | *ELF-64*) |
| 1313 | HPUX_IA64_MODE=64 |
| 1314 | ;; |
| 1315 | esac |
| 1316 | fi |
| 1317 | rm -rf conftest* |
| 1318 | ;; |
| 1319 | *-*-irix6*) |
| 1320 | # Find out what ABI is being produced by ac_compile, and set linker |
| 1321 | # options accordingly. |
| 1322 | echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext |
| 1323 | if AC_TRY_EVAL(ac_compile); then |
| 1324 | if test yes = "$lt_cv_prog_gnu_ld"; then |
| 1325 | case `/usr/bin/file conftest.$ac_objext` in |
| 1326 | *32-bit*) |
| 1327 | LD="${LD-ld} -melf32bsmip" |
| 1328 | ;; |
| 1329 | *N32*) |
| 1330 | LD="${LD-ld} -melf32bmipn32" |
| 1331 | ;; |
| 1332 | *64-bit*) |
| 1333 | LD="${LD-ld} -melf64bmip" |
| 1334 | ;; |
| 1335 | esac |
| 1336 | else |
| 1337 | case `/usr/bin/file conftest.$ac_objext` in |
| 1338 | *32-bit*) |
| 1339 | LD="${LD-ld} -32" |
| 1340 | ;; |
| 1341 | *N32*) |
| 1342 | LD="${LD-ld} -n32" |
| 1343 | ;; |
| 1344 | *64-bit*) |
| 1345 | LD="${LD-ld} -64" |
| 1346 | ;; |
| 1347 | esac |
| 1348 | fi |
| 1349 | fi |
| 1350 | rm -rf conftest* |
| 1351 | ;; |
| 1352 |
| 1353 | mips64*-*linux*) |
| 1354 | # Find out what ABI is being produced by ac_compile, and set linker |
| 1355 | # options accordingly. |
| 1356 | echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext |
| 1357 | if AC_TRY_EVAL(ac_compile); then |
| 1358 | emul=elf |
| 1359 | case `/usr/bin/file conftest.$ac_objext` in |
| 1360 | *32-bit*) |
| 1361 | emul="${emul}32" |
| 1362 | ;; |
| 1363 | *64-bit*) |
| 1364 | emul="${emul}64" |
| 1365 | ;; |
| 1366 | esac |
| 1367 | case `/usr/bin/file conftest.$ac_objext` in |
| 1368 | *MSB*) |
| 1369 | emul="${emul}btsmip" |
| 1370 | ;; |
| 1371 | *LSB*) |
| 1372 | emul="${emul}ltsmip" |
| 1373 | ;; |
| 1374 | esac |
| 1375 | case `/usr/bin/file conftest.$ac_objext` in |
| 1376 | *N32*) |
| 1377 | emul="${emul}n32" |
| 1378 | ;; |
| 1379 | esac |
| 1380 | LD="${LD-ld} -m $emul" |
| 1381 | fi |
| 1382 | rm -rf conftest* |
| 1383 | ;; |
| 1384 |
| 1385 | x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ |
| 1386 | s390*-*linux*|s390*-*tpf*|sparc*-*linux*) |
| 1387 | # Find out what ABI is being produced by ac_compile, and set linker |
| 1388 | # options accordingly. Note that the listed cases only cover the |
| 1389 | # situations where additional linker options are needed (such as when |
| 1390 | # doing 32-bit compilation for a host where ld defaults to 64-bit, or |
| 1391 | # vice versa); the common cases where no linker options are needed do |
| 1392 | # not appear in the list. |
| 1393 | echo 'int i;' > conftest.$ac_ext |
| 1394 | if AC_TRY_EVAL(ac_compile); then |
| 1395 | case `/usr/bin/file conftest.o` in |
| 1396 | *32-bit*) |
| 1397 | case $host in |
| 1398 | x86_64-*kfreebsd*-gnu) |
| 1399 | LD="${LD-ld} -m elf_i386_fbsd" |
| 1400 | ;; |
| 1401 | x86_64-*linux*) |
| 1402 | case `/usr/bin/file conftest.o` in |
| 1403 | *x86-64*) |
| 1404 | LD="${LD-ld} -m elf32_x86_64" |
| 1405 | ;; |
| 1406 | *) |
| 1407 | LD="${LD-ld} -m elf_i386" |
| 1408 | ;; |
| 1409 | esac |
| 1410 | ;; |
| 1411 | powerpc64le-*linux*) |
| 1412 | LD="${LD-ld} -m elf32lppclinux" |
| 1413 | ;; |
| 1414 | powerpc64-*linux*) |
| 1415 | LD="${LD-ld} -m elf32ppclinux" |
| 1416 | ;; |
| 1417 | s390x-*linux*) |
| 1418 | LD="${LD-ld} -m elf_s390" |
| 1419 | ;; |
| 1420 | sparc64-*linux*) |
| 1421 | LD="${LD-ld} -m elf32_sparc" |
| 1422 | ;; |
| 1423 | esac |
| 1424 | ;; |
| 1425 | *64-bit*) |
| 1426 | case $host in |
| 1427 | x86_64-*kfreebsd*-gnu) |
| 1428 | LD="${LD-ld} -m elf_x86_64_fbsd" |
| 1429 | ;; |
| 1430 | x86_64-*linux*) |
| 1431 | LD="${LD-ld} -m elf_x86_64" |
| 1432 | ;; |
| 1433 | powerpcle-*linux*) |
| 1434 | LD="${LD-ld} -m elf64lppc" |
| 1435 | ;; |
| 1436 | powerpc-*linux*) |
| 1437 | LD="${LD-ld} -m elf64ppc" |
| 1438 | ;; |
| 1439 | s390*-*linux*|s390*-*tpf*) |
| 1440 | LD="${LD-ld} -m elf64_s390" |
| 1441 | ;; |
| 1442 | sparc*-*linux*) |
| 1443 | LD="${LD-ld} -m elf64_sparc" |
| 1444 | ;; |
| 1445 | esac |
| 1446 | ;; |
| 1447 | esac |
| 1448 | fi |
| 1449 | rm -rf conftest* |
| 1450 | ;; |
| 1451 |
| 1452 | *-*-sco3.2v5*) |
| 1453 | # On SCO OpenServer 5, we need -belf to get full-featured binaries. |
| 1454 | SAVE_CFLAGS=$CFLAGS |
| 1455 | CFLAGS="$CFLAGS -belf" |
| 1456 | AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, |
| 1457 | [AC_LANG_PUSH(C) |
| 1458 | AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) |
| 1459 | AC_LANG_POP]) |
| 1460 | if test yes != "$lt_cv_cc_needs_belf"; then |
| 1461 | # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf |
| 1462 | CFLAGS=$SAVE_CFLAGS |
| 1463 | fi |
| 1464 | ;; |
| 1465 | *-*solaris*) |
| 1466 | # Find out what ABI is being produced by ac_compile, and set linker |
| 1467 | # options accordingly. |
| 1468 | echo 'int i;' > conftest.$ac_ext |
| 1469 | if AC_TRY_EVAL(ac_compile); then |
| 1470 | case `/usr/bin/file conftest.o` in |
| 1471 | *64-bit*) |
| 1472 | case $lt_cv_prog_gnu_ld in |
| 1473 | yes*) |
| 1474 | case $host in |
| 1475 | i?86-*-solaris*|x86_64-*-solaris*) |
| 1476 | LD="${LD-ld} -m elf_x86_64" |
| 1477 | ;; |
| 1478 | sparc*-*-solaris*) |
| 1479 | LD="${LD-ld} -m elf64_sparc" |
| 1480 | ;; |
| 1481 | esac |
| 1482 | # GNU ld 2.21 introduced _sol2 emulations. Use them if available. |
| 1483 | if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then |
| 1484 | LD=${LD-ld}_sol2 |
| 1485 | fi |
| 1486 | ;; |
| 1487 | *) |
| 1488 | if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then |
| 1489 | LD="${LD-ld} -64" |
| 1490 | fi |
| 1491 | ;; |
| 1492 | esac |
| 1493 | ;; |
| 1494 | esac |
| 1495 | fi |
| 1496 | rm -rf conftest* |
| 1497 | ;; |
| 1498 | esac |
| 1499 |
| 1500 | need_locks=$enable_libtool_lock |
| 1501 | ])# _LT_ENABLE_LOCK |
| 1502 |
| 1503 |
| 1504 | # _LT_PROG_AR |
| 1505 | # ----------- |
| 1506 | m4_defun([_LT_PROG_AR], |
| 1507 | [AC_CHECK_TOOLS(AR, [ar], false) |
| 1508 | : ${AR=ar} |
| 1509 | _LT_DECL([], [AR], [1], [The archiver]) |
| 1510 |
| 1511 | # Use ARFLAGS variable as AR's operation code to sync the variable naming with |
| 1512 | # Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have |
| 1513 | # higher priority because thats what people were doing historically (setting |
| 1514 | # ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS |
| 1515 | # variable obsoleted/removed. |
| 1516 |
| 1517 | test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} |
| 1518 | lt_ar_flags=$AR_FLAGS |
| 1519 | _LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) |
| 1520 |
| 1521 | # Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override |
| 1522 | # by AR_FLAGS because that was never working and AR_FLAGS is about to die. |
| 1523 | _LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], |
| 1524 | [Flags to create an archive]) |
| 1525 |
| 1526 | AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], |
| 1527 | [lt_cv_ar_at_file=no |
| 1528 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM], |
| 1529 | [echo conftest.$ac_objext > conftest.lst |
| 1530 | lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' |
| 1531 | AC_TRY_EVAL([lt_ar_try]) |
| 1532 | if test 0 -eq "$ac_status"; then |
| 1533 | # Ensure the archiver fails upon bogus file names. |
| 1534 | rm -f conftest.$ac_objext libconftest.a |
| 1535 | AC_TRY_EVAL([lt_ar_try]) |
| 1536 | if test 0 -ne "$ac_status"; then |
| 1537 | lt_cv_ar_at_file=@ |
| 1538 | fi |
| 1539 | fi |
| 1540 | rm -f conftest.* libconftest.a |
| 1541 | ]) |
| 1542 | ]) |
| 1543 |
| 1544 | if test no = "$lt_cv_ar_at_file"; then |
| 1545 | archiver_list_spec= |
| 1546 | else |
| 1547 | archiver_list_spec=$lt_cv_ar_at_file |
| 1548 | fi |
| 1549 | _LT_DECL([], [archiver_list_spec], [1], |
| 1550 | [How to feed a file listing to the archiver]) |
| 1551 | ])# _LT_PROG_AR |
| 1552 |
| 1553 |
| 1554 | # _LT_CMD_OLD_ARCHIVE |
| 1555 | # ------------------- |
| 1556 | m4_defun([_LT_CMD_OLD_ARCHIVE], |
| 1557 | [_LT_PROG_AR |
| 1558 |
| 1559 | AC_CHECK_TOOL(STRIP, strip, :) |
| 1560 | test -z "$STRIP" && STRIP=: |
| 1561 | _LT_DECL([], [STRIP], [1], [A symbol stripping program]) |
| 1562 |
| 1563 | AC_CHECK_TOOL(RANLIB, ranlib, :) |
| 1564 | test -z "$RANLIB" && RANLIB=: |
| 1565 | _LT_DECL([], [RANLIB], [1], |
| 1566 | [Commands used to install an old-style archive]) |
| 1567 |
| 1568 | # Determine commands to create old-style static archives. |
| 1569 | old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' |
| 1570 | old_postinstall_cmds='chmod 644 $oldlib' |
| 1571 | old_postuninstall_cmds= |
| 1572 |
| 1573 | if test -n "$RANLIB"; then |
| 1574 | case $host_os in |
| 1575 | bitrig* | openbsd*) |
| 1576 | old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" |
| 1577 | ;; |
| 1578 | *) |
| 1579 | old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" |
| 1580 | ;; |
| 1581 | esac |
| 1582 | old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" |
| 1583 | fi |
| 1584 |
| 1585 | case $host_os in |
| 1586 | darwin*) |
| 1587 | lock_old_archive_extraction=yes ;; |
| 1588 | *) |
| 1589 | lock_old_archive_extraction=no ;; |
| 1590 | esac |
| 1591 | _LT_DECL([], [old_postinstall_cmds], [2]) |
| 1592 | _LT_DECL([], [old_postuninstall_cmds], [2]) |
| 1593 | _LT_TAGDECL([], [old_archive_cmds], [2], |
| 1594 | [Commands used to build an old-style archive]) |
| 1595 | _LT_DECL([], [lock_old_archive_extraction], [0], |
| 1596 | [Whether to use a lock for old archive extraction]) |
| 1597 | ])# _LT_CMD_OLD_ARCHIVE |
| 1598 |
| 1599 |
| 1600 | # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, |
| 1601 | # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) |
| 1602 | # ---------------------------------------------------------------- |
| 1603 | # Check whether the given compiler option works |
| 1604 | AC_DEFUN([_LT_COMPILER_OPTION], |
| 1605 | [m4_require([_LT_FILEUTILS_DEFAULTS])dnl |
| 1606 | m4_require([_LT_DECL_SED])dnl |
| 1607 | AC_CACHE_CHECK([$1], [$2], |
| 1608 | [$2=no |
| 1609 | m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) |
| 1610 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext |
| 1611 | lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment |
| 1612 | # Insert the option either (1) after the last *FLAGS variable, or |
| 1613 | # (2) before a word containing "conftest.", or (3) at the end. |
| 1614 | # Note that $ac_compile itself does not contain backslashes and begins |
| 1615 | # with a dollar sign (not a hyphen), so the echo should work correctly. |
| 1616 | # The option is referenced via a variable to avoid confusing sed. |
| 1617 | lt_compile=`echo "$ac_compile" | $SED \ |
| 1618 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |
| 1619 | -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ |
| 1620 | -e 's:$: $lt_compiler_flag:'` |
| 1621 | (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) |
| 1622 | (eval "$lt_compile" 2>conftest.err) |
| 1623 | ac_status=$? |
| 1624 | cat conftest.err >&AS_MESSAGE_LOG_FD |
| 1625 | echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD |
| 1626 | if (exit $ac_status) && test -s "$ac_outfile"; then |
| 1627 | # The compiler can only warn and ignore the option if not recognized |
| 1628 | # So say no if there are warnings other than the usual output. |
| 1629 | $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp |
| 1630 | $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 |
| 1631 | if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then |
| 1632 | $2=yes |
| 1633 | fi |
| 1634 | fi |
| 1635 | $RM conftest* |
| 1636 | ]) |
| 1637 |
| 1638 | if test yes = "[$]$2"; then |
| 1639 | m4_if([$5], , :, [$5]) |
| 1640 | else |
| 1641 | m4_if([$6], , :, [$6]) |
| 1642 | fi |
| 1643 | ])# _LT_COMPILER_OPTION |
| 1644 |
| 1645 | # Old name: |
| 1646 | AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) |
| 1647 | dnl aclocal-1.4 backwards compatibility: |
| 1648 | dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) |
| 1649 |
| 1650 |
| 1651 | # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, |
| 1652 | # [ACTION-SUCCESS], [ACTION-FAILURE]) |
| 1653 | # ---------------------------------------------------- |
| 1654 | # Check whether the given linker option works |
| 1655 | AC_DEFUN([_LT_LINKER_OPTION], |
| 1656 | [m4_require([_LT_FILEUTILS_DEFAULTS])dnl |
| 1657 | m4_require([_LT_DECL_SED])dnl |
| 1658 | AC_CACHE_CHECK([$1], [$2], |
| 1659 | [$2=no |
| 1660 | save_LDFLAGS=$LDFLAGS |
| 1661 | LDFLAGS="$LDFLAGS $3" |
| 1662 | echo "$lt_simple_link_test_code" > conftest.$ac_ext |
| 1663 | if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then |
| 1664 | # The linker can only warn and ignore the option if not recognized |
| 1665 | # So say no if there are warnings |
| 1666 | if test -s conftest.err; then |
| 1667 | # Append any errors to the config.log. |
| 1668 | cat conftest.err 1>&AS_MESSAGE_LOG_FD |
| 1669 | $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp |
| 1670 | $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 |
| 1671 | if diff conftest.exp conftest.er2 >/dev/null; then |
| 1672 | $2=yes |
| 1673 | fi |
| 1674 | else |
| 1675 | $2=yes |
| 1676 | fi |
| 1677 | fi |
| 1678 | $RM -r conftest* |
| 1679 | LDFLAGS=$save_LDFLAGS |
| 1680 | ]) |
| 1681 |
| 1682 | if test yes = "[$]$2"; then |
| 1683 | m4_if([$4], , :, [$4]) |
| 1684 | else |
| 1685 | m4_if([$5], , :, [$5]) |
| 1686 | fi |
| 1687 | ])# _LT_LINKER_OPTION |
| 1688 |
| 1689 | # Old name: |
| 1690 | AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) |
| 1691 | dnl aclocal-1.4 backwards compatibility: |
| 1692 | dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) |
| 1693 |
| 1694 |
| 1695 | # LT_CMD_MAX_LEN |
| 1696 | #--------------- |
| 1697 | AC_DEFUN([LT_CMD_MAX_LEN], |
| 1698 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl |
| 1699 | # find the maximum length of command line arguments |
| 1700 | AC_MSG_CHECKING([the maximum length of command line arguments]) |
| 1701 | AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl |
| 1702 | i=0 |
| 1703 | teststring=ABCD |
| 1704 |
| 1705 | case $build_os in |
| 1706 | msdosdjgpp*) |
| 1707 | # On DJGPP, this test can blow up pretty badly due to problems in libc |
| 1708 | # (any single argument exceeding 2000 bytes causes a buffer overrun |
| 1709 | # during glob expansion). Even if it were fixed, the result of this |
| 1710 | # check would be larger than it should be. |
| 1711 | lt_cv_sys_max_cmd_len=12288; # 12K is about right |
| 1712 | ;; |
| 1713 |
| 1714 | gnu*) |
| 1715 | # Under GNU Hurd, this test is not required because there is |
| 1716 | # no limit to the length of command line arguments. |
| 1717 | # Libtool will interpret -1 as no limit whatsoever |
| 1718 | lt_cv_sys_max_cmd_len=-1; |
| 1719 | ;; |
| 1720 |
| 1721 | cygwin* | mingw* | cegcc*) |
| 1722 | # On Win9x/ME, this test blows up -- it succeeds, but takes |
| 1723 | # about 5 minutes as the teststring grows exponentially. |
| 1724 | # Worse, since 9x/ME are not pre-emptively multitasking, |
| 1725 | # you end up with a "frozen" computer, even though with patience |
| 1726 | # the test eventually succeeds (with a max line length of 256k). |
| 1727 | # Instead, let's just punt: use the minimum linelength reported by |
| 1728 | # all of the supported platforms: 8192 (on NT/2K/XP). |
| 1729 | lt_cv_sys_max_cmd_len=8192; |
| 1730 | ;; |
| 1731 |
| 1732 | mint*) |
| 1733 | # On MiNT this can take a long time and run out of memory. |
| 1734 | lt_cv_sys_max_cmd_len=8192; |
| 1735 | ;; |
| 1736 |
| 1737 | amigaos*) |
| 1738 | # On AmigaOS with pdksh, this test takes hours, literally. |
| 1739 | # So we just punt and use a minimum line length of 8192. |
| 1740 | lt_cv_sys_max_cmd_len=8192; |
| 1741 | ;; |
| 1742 |
| 1743 | bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) |
| 1744 | # This has been around since 386BSD, at least. Likely further. |
| 1745 | if test -x /sbin/sysctl; then |
| 1746 | lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` |
| 1747 | elif test -x /usr/sbin/sysctl; then |
| 1748 | lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` |
| 1749 | else |
| 1750 | lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs |
| 1751 | fi |
| 1752 | # And add a safety zone |
| 1753 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` |
| 1754 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` |
| 1755 | ;; |
| 1756 |
| 1757 | interix*) |
| 1758 | # We know the value 262144 and hardcode it with a safety zone (like BSD) |
| 1759 | lt_cv_sys_max_cmd_len=196608 |
| 1760 | ;; |
| 1761 |
| 1762 | os2*) |
| 1763 | # The test takes a long time on OS/2. |
| 1764 | lt_cv_sys_max_cmd_len=8192 |
| 1765 | ;; |
| 1766 |
| 1767 | osf*) |
| 1768 | # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure |
| 1769 | # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not |
| 1770 | # nice to cause kernel panics so lets avoid the loop below. |
| 1771 | # First set a reasonable default. |
| 1772 | lt_cv_sys_max_cmd_len=16384 |
| 1773 | # |
| 1774 | if test -x /sbin/sysconfig; then |
| 1775 | case `/sbin/sysconfig -q proc exec_disable_arg_limit` in |
| 1776 | *1*) lt_cv_sys_max_cmd_len=-1 ;; |
| 1777 | esac |
| 1778 | fi |
| 1779 | ;; |
| 1780 | sco3.2v5*) |
| 1781 | lt_cv_sys_max_cmd_len=102400 |
| 1782 | ;; |
| 1783 | sysv5* | sco5v6* | sysv4.2uw2*) |
| 1784 | kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` |
| 1785 | if test -n "$kargmax"; then |
| 1786 | lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` |
| 1787 | else |
| 1788 | lt_cv_sys_max_cmd_len=32768 |
| 1789 | fi |
| 1790 | ;; |
| 1791 | *) |
| 1792 | lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` |
| 1793 | if test -n "$lt_cv_sys_max_cmd_len" && \ |
| 1794 | test undefined != "$lt_cv_sys_max_cmd_len"; then |
| 1795 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` |
| 1796 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` |
| 1797 | else |
| 1798 | # Make teststring a little bigger before we do anything with it. |
| 1799 | # a 1K string should be a reasonable start. |
| 1800 | for i in 1 2 3 4 5 6 7 8; do |
| 1801 | teststring=$teststring$teststring |
| 1802 | done |
| 1803 | SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} |
| 1804 | # If test is not a shell built-in, we'll probably end up computing a |
| 1805 | # maximum length that is only half of the actual maximum length, but |
| 1806 | # we can't tell. |
| 1807 | while { test X`env echo "$teststring$teststring" 2>/dev/null` \ |
| 1808 | = "X$teststring$teststring"; } >/dev/null 2>&1 && |
| 1809 | test 17 != "$i" # 1/2 MB should be enough |
| 1810 | do |
| 1811 | i=`expr $i + 1` |
| 1812 | teststring=$teststring$teststring |
| 1813 | done |
| 1814 | # Only check the string length outside the loop. |
| 1815 | lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` |
| 1816 | teststring= |
| 1817 | # Add a significant safety factor because C++ compilers can tack on |
| 1818 | # massive amounts of additional arguments before passing them to the |
| 1819 | # linker. It appears as though 1/2 is a usable value. |
| 1820 | lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` |
| 1821 | fi |
| 1822 | ;; |
| 1823 | esac |
| 1824 | ]) |
| 1825 | if test -n "$lt_cv_sys_max_cmd_len"; then |
| 1826 | AC_MSG_RESULT($lt_cv_sys_max_cmd_len) |
| 1827 | else |
| 1828 | AC_MSG_RESULT(none) |
| 1829 | fi |
| 1830 | max_cmd_len=$lt_cv_sys_max_cmd_len |
| 1831 | _LT_DECL([], [max_cmd_len], [0], |
| 1832 | [What is the maximum length of a command?]) |
| 1833 | ])# LT_CMD_MAX_LEN |
| 1834 |
| 1835 | # Old name: |
| 1836 | AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) |
| 1837 | dnl aclocal-1.4 backwards compatibility: |
| 1838 | dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) |
| 1839 |
| 1840 |
| 1841 | # _LT_HEADER_DLFCN |
| 1842 | # ---------------- |
| 1843 | m4_defun([_LT_HEADER_DLFCN], |
| 1844 | [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl |
| 1845 | ])# _LT_HEADER_DLFCN |
| 1846 |
| 1847 |
| 1848 | # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, |
| 1849 | # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) |
| 1850 | # ---------------------------------------------------------------- |
| 1851 | m4_defun([_LT_TRY_DLOPEN_SELF], |
| 1852 | [m4_require([_LT_HEADER_DLFCN])dnl |
| 1853 | if test yes = "$cross_compiling"; then : |
| 1854 | [$4] |
| 1855 | else |
| 1856 | lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 |
| 1857 | lt_status=$lt_dlunknown |
| 1858 | cat > conftest.$ac_ext <<_LT_EOF |
| 1859 | [#line $LINENO "configure" |
| 1860 | #include "confdefs.h" |
| 1861 |
| 1862 | #if HAVE_DLFCN_H |
| 1863 | #include <dlfcn.h> |
| 1864 | #endif |
| 1865 |
| 1866 | #include <stdio.h> |
| 1867 |
| 1868 | #ifdef RTLD_GLOBAL |
| 1869 | # define LT_DLGLOBAL RTLD_GLOBAL |
| 1870 | #else |
| 1871 | # ifdef DL_GLOBAL |
| 1872 | # define LT_DLGLOBAL DL_GLOBAL |
| 1873 | # else |
| 1874 | # define LT_DLGLOBAL 0 |
| 1875 | # endif |
| 1876 | #endif |
| 1877 |
| 1878 | /* We may have to define LT_DLLAZY_OR_NOW in the command line if we |
| 1879 | find out it does not work in some platform. */ |
| 1880 | #ifndef LT_DLLAZY_OR_NOW |
| 1881 | # ifdef RTLD_LAZY |
| 1882 | # define LT_DLLAZY_OR_NOW RTLD_LAZY |
| 1883 | # else |
| 1884 | # ifdef DL_LAZY |
| 1885 | # define LT_DLLAZY_OR_NOW DL_LAZY |
| 1886 | # else |
| 1887 | # ifdef RTLD_NOW |
| 1888 | # define LT_DLLAZY_OR_NOW RTLD_NOW |
| 1889 | # else |
| 1890 | # ifdef DL_NOW |
| 1891 | # define LT_DLLAZY_OR_NOW DL_NOW |
| 1892 | # else |
| 1893 | # define LT_DLLAZY_OR_NOW 0 |
| 1894 | # endif |
| 1895 | # endif |
| 1896 | # endif |
| 1897 | # endif |
| 1898 | #endif |
| 1899 |
| 1900 | /* When -fvisibility=hidden is used, assume the code has been annotated |
| 1901 | correspondingly for the symbols needed. */ |
| 1902 | #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) |
| 1903 | int fnord () __attribute__((visibility("default"))); |
| 1904 | #endif |
| 1905 |
| 1906 | int fnord () { return 42; } |
| 1907 | int main () |
| 1908 | { |
| 1909 | void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); |
| 1910 | int status = $lt_dlunknown; |
| 1911 |
| 1912 | if (self) |
| 1913 | { |
| 1914 | if (dlsym (self,"fnord")) status = $lt_dlno_uscore; |
| 1915 | else |
| 1916 | { |
| 1917 | if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; |
| 1918 | else puts (dlerror ()); |
| 1919 | } |
| 1920 | /* dlclose (self); */ |
| 1921 | } |
| 1922 | else |
| 1923 | puts (dlerror ()); |
| 1924 |
| 1925 | return status; |
| 1926 | }] |
| 1927 | _LT_EOF |
| 1928 | if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then |
| 1929 | (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null |
| 1930 | lt_status=$? |
| 1931 | case x$lt_status in |
| 1932 | x$lt_dlno_uscore) $1 ;; |
| 1933 | x$lt_dlneed_uscore) $2 ;; |
| 1934 | x$lt_dlunknown|x*) $3 ;; |
| 1935 | esac |
| 1936 | else : |
| 1937 | # compilation failed |
| 1938 | $3 |
| 1939 | fi |
| 1940 | fi |
| 1941 | rm -fr conftest* |
| 1942 | ])# _LT_TRY_DLOPEN_SELF |
| 1943 |
| 1944 |
| 1945 | # LT_SYS_DLOPEN_SELF |
| 1946 | # ------------------ |
| 1947 | AC_DEFUN([LT_SYS_DLOPEN_SELF], |
| 1948 | [m4_require([_LT_HEADER_DLFCN])dnl |
| 1949 | if test yes != "$enable_dlopen"; then |
| 1950 | enable_dlopen=unknown |
| 1951 | enable_dlopen_self=unknown |
| 1952 | enable_dlopen_self_static=unknown |
| 1953 | else |
| 1954 | lt_cv_dlopen=no |
| 1955 | lt_cv_dlopen_libs= |
| 1956 |
| 1957 | case $host_os in |
| 1958 | beos*) |
| 1959 | lt_cv_dlopen=load_add_on |
| 1960 | lt_cv_dlopen_libs= |
| 1961 | lt_cv_dlopen_self=yes |
| 1962 | ;; |
| 1963 |
| 1964 | mingw* | pw32* | cegcc*) |
| 1965 | lt_cv_dlopen=LoadLibrary |
| 1966 | lt_cv_dlopen_libs= |
| 1967 | ;; |
| 1968 |
| 1969 | cygwin*) |
| 1970 | lt_cv_dlopen=dlopen |
| 1971 | lt_cv_dlopen_libs= |
| 1972 | ;; |
| 1973 |
| 1974 | darwin*) |
| 1975 | # if libdl is installed we need to link against it |
| 1976 | AC_CHECK_LIB([dl], [dlopen], |
| 1977 | [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ |
| 1978 | lt_cv_dlopen=dyld |
| 1979 | lt_cv_dlopen_libs= |
| 1980 | lt_cv_dlopen_self=yes |
| 1981 | ]) |
| 1982 | ;; |
| 1983 |
| 1984 | tpf*) |
| 1985 | # Don't try to run any link tests for TPF. We know it's impossible |
| 1986 | # because TPF is a cross-compiler, and we know how we open DSOs. |
| 1987 | lt_cv_dlopen=dlopen |
| 1988 | lt_cv_dlopen_libs= |
| 1989 | lt_cv_dlopen_self=no |
| 1990 | ;; |
| 1991 |
| 1992 | *) |
| 1993 | AC_CHECK_FUNC([shl_load], |
| 1994 | [lt_cv_dlopen=shl_load], |
| 1995 | [AC_CHECK_LIB([dld], [shl_load], |
| 1996 | [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], |
| 1997 | [AC_CHECK_FUNC([dlopen], |
| 1998 | [lt_cv_dlopen=dlopen], |
| 1999 | [AC_CHECK_LIB([dl], [dlopen], |
| 2000 | [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], |
| 2001 | [AC_CHECK_LIB([svld], [dlopen], |
| 2002 | [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], |
| 2003 | [AC_CHECK_LIB([dld], [dld_link], |
| 2004 | [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) |
| 2005 | ]) |
| 2006 | ]) |
| 2007 | ]) |
| 2008 | ]) |
| 2009 | ]) |
| 2010 | ;; |
| 2011 | esac |
| 2012 |
| 2013 | if test no = "$lt_cv_dlopen"; then |
| 2014 | enable_dlopen=no |
| 2015 | else |
| 2016 | enable_dlopen=yes |
| 2017 | fi |
| 2018 |
| 2019 | case $lt_cv_dlopen in |
| 2020 | dlopen) |
| 2021 | save_CPPFLAGS=$CPPFLAGS |
| 2022 | test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" |
| 2023 |
| 2024 | save_LDFLAGS=$LDFLAGS |
| 2025 | wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" |
| 2026 |
| 2027 | save_LIBS=$LIBS |
| 2028 | LIBS="$lt_cv_dlopen_libs $LIBS" |
| 2029 |
| 2030 | AC_CACHE_CHECK([whether a program can dlopen itself], |
| 2031 | lt_cv_dlopen_self, [dnl |
| 2032 | _LT_TRY_DLOPEN_SELF( |
| 2033 | lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, |
| 2034 | lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) |
| 2035 | ]) |
| 2036 |
| 2037 | if test yes = "$lt_cv_dlopen_self"; then |
| 2038 | wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" |
| 2039 | AC_CACHE_CHECK([whether a statically linked program can dlopen itself], |
| 2040 | lt_cv_dlopen_self_static, [dnl |
| 2041 | _LT_TRY_DLOPEN_SELF( |
| 2042 | lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, |
| 2043 | lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) |
| 2044 | ]) |
| 2045 | fi |
| 2046 |
| 2047 | CPPFLAGS=$save_CPPFLAGS |
| 2048 | LDFLAGS=$save_LDFLAGS |
| 2049 | LIBS=$save_LIBS |
| 2050 | ;; |
| 2051 | esac |
| 2052 |
| 2053 | case $lt_cv_dlopen_self in |
| 2054 | yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; |
| 2055 | *) enable_dlopen_self=unknown ;; |
| 2056 | esac |
| 2057 |
| 2058 | case $lt_cv_dlopen_self_static in |
| 2059 | yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; |
| 2060 | *) enable_dlopen_self_static=unknown ;; |
| 2061 | esac |
| 2062 | fi |
| 2063 | _LT_DECL([dlopen_support], [enable_dlopen], [0], |
| 2064 | [Whether dlopen is supported]) |
| 2065 | _LT_DECL([dlopen_self], [enable_dlopen_self], [0], |
| 2066 | [Whether dlopen of programs is supported]) |
| 2067 | _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], |
| 2068 | [Whether dlopen of statically linked programs is supported]) |
| 2069 | ])# LT_SYS_DLOPEN_SELF |
| 2070 |
| 2071 | # Old name: |
| 2072 | AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) |
| 2073 | dnl aclocal-1.4 backwards compatibility: |
| 2074 | dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) |
| 2075 |
| 2076 |
| 2077 | # _LT_COMPILER_C_O([TAGNAME]) |
| 2078 | # --------------------------- |
| 2079 | # Check to see if options -c and -o are simultaneously supported by compiler. |
| 2080 | # This macro does not hard code the compiler like AC_PROG_CC_C_O. |
| 2081 | m4_defun([_LT_COMPILER_C_O], |
| 2082 | [m4_require([_LT_DECL_SED])dnl |
| 2083 | m4_require([_LT_FILEUTILS_DEFAULTS])dnl |
| 2084 | m4_require([_LT_TAG_COMPILER])dnl |
| 2085 | AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], |
| 2086 | [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], |
| 2087 | [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no |
| 2088 | $RM -r conftest 2>/dev/null |
| 2089 | mkdir conftest |
| 2090 | cd conftest |
| 2091 | mkdir out |
| 2092 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext |
| 2093 |
| 2094 | lt_compiler_flag="-o out/conftest2.$ac_objext" |
| 2095 | # Insert the option either (1) after the last *FLAGS variable, or |
| 2096 | # (2) before a word containing "conftest.", or (3) at the end. |
| 2097 | # Note that $ac_compile itself does not contain backslashes and begins |
| 2098 | # with a dollar sign (not a hyphen), so the echo should work correctly. |
| 2099 | lt_compile=`echo "$ac_compile" | $SED \ |
| 2100 | -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |
| 2101 | -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ |
| 2102 | -e 's:$: $lt_compiler_flag:'` |
| 2103 | (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) |
| 2104 | (eval "$lt_compile" 2>out/conftest.err) |
| 2105 | ac_status=$? |
| 2106 | cat out/conftest.err >&AS_MESSAGE_LOG_FD |
| 2107 | echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD |
| 2108 | if (exit $ac_status) && test -s out/conftest2.$ac_objext |
| 2109 | then |
| 2110 | # The compiler can only warn and ignore the option if not recognized |
| 2111 | # So say no if there are warnings |
| 2112 | $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp |
| 2113 | $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 |
| 2114 | if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then |
| 2115 | _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes |
| 2116 | fi |
| 2117 | fi |
| 2118 | chmod u+w . 2>&AS_MESSAGE_LOG_FD |
| 2119 | $RM conftest* |
| 2120 | # SGI C++ compiler will create directory out/ii_files/ for |
| 2121 | # template instantiation |
| 2122 | test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files |
| 2123 | $RM out/* && rmdir out |
| 2124 | cd .. |
| 2125 | $RM -r conftest |
| 2126 | $RM conftest* |
| 2127 | ]) |
| 2128 | _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], |
| 2129 | [Does compiler simultaneously support -c and -o options?]) |
| 2130 | ])# _LT_COMPILER_C_O |
| 2131 |
| 2132 |
| 2133 | # _LT_COMPILER_FILE_LOCKS([TAGNAME]) |
| 2134 | # ---------------------------------- |
| 2135 | # Check to see if we can do hard links to lock some files if needed |
| 2136 | m4_defun([_LT_COMPILER_FILE_LOCKS], |
| 2137 | [m4_require([_LT_ENABLE_LOCK])dnl |
| 2138 | m4_require([_LT_FILEUTILS_DEFAULTS])dnl |
| 2139 | _LT_COMPILER_C_O([$1]) |
| 2140 |
| 2141 | hard_links=nottested |
| 2142 | if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then |
| 2143 | # do not overwrite the value of need_locks provided by the user |
| 2144 | AC_MSG_CHECKING([if we can lock with hard links]) |
| 2145 | hard_links=yes |
| 2146 | $RM conftest* |
| 2147 | ln conftest.a conftest.b 2>/dev/null && hard_links=no |
| 2148 | touch conftest.a |
| 2149 | ln conftest.a conftest.b 2>&5 || hard_links=no |
| 2150 | ln conftest.a conftest.b 2>/dev/null && hard_links=no |
| 2151 | AC_MSG_RESULT([$hard_links]) |
| 2152 | if test no = "$hard_links"; then |
| 2153 | AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) |
| 2154 | need_locks=warn |
| 2155 | fi |
| 2156 | else |
| 2157 | need_locks=no |
| 2158 | fi |
| 2159 | _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) |
| 2160 | ])# _LT_COMPILER_FILE_LOCKS |
| 2161 |
| 2162 |
| 2163 | # _LT_CHECK_OBJDIR |
| 2164 | # ---------------- |
| 2165 | m4_defun([_LT_CHECK_OBJDIR], |
| 2166 | [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], |
| 2167 | [rm -f .libs 2>/dev/null |
| 2168 | mkdir .libs 2>/dev/null |
| 2169 | if test -d .libs; then |
| 2170 | lt_cv_objdir=.libs |
| 2171 | else |
| 2172 | # MS-DOS does not allow filenames that begin with a dot. |
| 2173 | lt_cv_objdir=_libs |
| 2174 | fi |
| 2175 | rmdir .libs 2>/dev/null]) |
| 2176 | objdir=$lt_cv_objdir |
| 2177 | _LT_DECL([], [objdir], [0], |
| 2178 | [The name of the directory that contains temporary libtool files])dnl |
| 2179 | m4_pattern_allow([LT_OBJDIR])dnl |
| 2180 | AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", |
| 2181 | [Define to the sub-directory where libtool stores uninstalled libraries.]) |
| 2182 | ])# _LT_CHECK_OBJDIR |
| 2183 |
| 2184 |
| 2185 | # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) |
| 2186 | # -------------------------------------- |
| 2187 | # Check hardcoding attributes. |
| 2188 | m4_defun([_LT_LINKER_HARDCODE_LIBPATH], |
| 2189 | [AC_MSG_CHECKING([how to hardcode library paths into programs]) |
| 2190 | _LT_TAGVAR(hardcode_action, $1)= |
| 2191 | if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || |
| 2192 | test -n "$_LT_TAGVAR(runpath_var, $1)" || |
| 2193 | test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then |
| 2194 |
| 2195 | # We can hardcode non-existent directories. |
| 2196 | if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && |
| 2197 | # If the only mechanism to avoid hardcoding is shlibpath_var, we |
| 2198 | # have to relink, otherwise we might link with an installed library |
| 2199 | # when we should be linking with a yet-to-be-installed one |
| 2200 | ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && |
| 2201 | test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then |
| 2202 | # Linking always hardcodes the temporary library directory. |
| 2203 | _LT_TAGVAR(hardcode_action, $1)=relink |
| 2204 | else |
| 2205 | # We can link without hardcoding, and we can hardcode nonexisting dirs. |
| 2206 | _LT_TAGVAR(hardcode_action, $1)=immediate |
| 2207 | fi |
| 2208 | else |
| 2209 | # We cannot hardcode anything, or else we can only hardcode existing |
| 2210 | # directories. |
| 2211 | _LT_TAGVAR(hardcode_action, $1)=unsupported |
| 2212 | fi |
| 2213 | AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) |
| 2214 |
| 2215 | if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || |
| 2216 | test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then |
| 2217 | # Fast installation is not supported |
| 2218 | enable_fast_install=no |
| 2219 | elif test yes = "$shlibpath_overrides_runpath" || |
| 2220 | test no = "$enable_shared"; then |
| 2221 | # Fast installation is not necessary |
| 2222 | enable_fast_install=needless |
| 2223 | fi |
| 2224 | _LT_TAGDECL([], [hardcode_action], [0], |
| 2225 | [How to hardcode a shared library path into an executable]) |
| 2226 | ])# _LT_LINKER_HARDCODE_LIBPATH |
| 2227 |
| 2228 |
| 2229 | # _LT_CMD_STRIPLIB |
| 2230 | # ---------------- |
| 2231 | m4_defun([_LT_CMD_STRIPLIB], |
| 2232 | [m4_require([_LT_DECL_EGREP]) |
| 2233 | striplib= |
| 2234 | old_striplib= |
| 2235 | AC_MSG_CHECKING([whether stripping libraries is possible]) |
| 2236 | if test -z "$STRIP"; then |
| 2237 | AC_MSG_RESULT([no]) |
| 2238 | else |
| 2239 | if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then |
| 2240 | old_striplib="$STRIP --strip-debug" |
| 2241 | striplib="$STRIP --strip-unneeded" |
| 2242 | AC_MSG_RESULT([yes]) |
| 2243 | else |
| 2244 | case $host_os in |
| 2245 | darwin*) |
| 2246 | # FIXME - insert some real tests, host_os isn't really good enough |
| 2247 | striplib="$STRIP -x" |
| 2248 | old_striplib="$STRIP -S" |
| 2249 | AC_MSG_RESULT([yes]) |
| 2250 | ;; |
| 2251 | freebsd*) |
| 2252 | if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then |
| 2253 | old_striplib="$STRIP --strip-debug" |
| 2254 | striplib="$STRIP --strip-unneeded" |
| 2255 | AC_MSG_RESULT([yes]) |
| 2256 | else |
| 2257 | AC_MSG_RESULT([no]) |
| 2258 | fi |
| 2259 | ;; |
| 2260 | *) |
| 2261 | AC_MSG_RESULT([no]) |
| 2262 | ;; |
| 2263 | esac |
| 2264 | fi |
| 2265 | fi |
| 2266 | _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) |
| 2267 | _LT_DECL([], [striplib], [1]) |
| 2268 | ])# _LT_CMD_STRIPLIB |
| 2269 |
| 2270 |
| 2271 | # _LT_PREPARE_MUNGE_PATH_LIST |
| 2272 | # --------------------------- |
| 2273 | # Make sure func_munge_path_list() is defined correctly. |
| 2274 | m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], |
| 2275 | [[# func_munge_path_list VARIABLE PATH |
| 2276 | # ----------------------------------- |
| 2277 | # VARIABLE is name of variable containing _space_ separated list of |
| 2278 | # directories to be munged by the contents of PATH, which is string |
| 2279 | # having a format: |
| 2280 | # "DIR[:DIR]:" |
| 2281 | # string "DIR[ DIR]" will be prepended to VARIABLE |
| 2282 | # ":DIR[:DIR]" |
| 2283 | # string "DIR[ DIR]" will be appended to VARIABLE |
| 2284 | # "DIRP[:DIRP]::[DIRA:]DIRA" |
| 2285 | # string "DIRP[ DIRP]" will be prepended to VARIABLE and string |
| 2286 | # "DIRA[ DIRA]" will be appended to VARIABLE |
| 2287 | # "DIR[:DIR]" |
| 2288 | # VARIABLE will be replaced by "DIR[ DIR]" |
| 2289 | func_munge_path_list () |
| 2290 | { |
| 2291 | case x@S|@2 in |
| 2292 | x) |
| 2293 | ;; |
| 2294 | *:) |
| 2295 | eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" |
| 2296 | ;; |
| 2297 | x:*) |
| 2298 | eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" |
| 2299 | ;; |
| 2300 | *::*) |
| 2301 | eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" |
| 2302 | eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" |
| 2303 | ;; |
| 2304 | *) |
| 2305 | eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" |
| 2306 | ;; |
| 2307 | esac |
| 2308 | } |
| 2309 | ]])# _LT_PREPARE_PATH_LIST |
| 2310 |
| 2311 |
| 2312 | # _LT_SYS_DYNAMIC_LINKER([TAG]) |
| 2313 | # ----------------------------- |
| 2314 | # PORTME Fill in your ld.so characteristics |
| 2315 | m4_defun([_LT_SYS_DYNAMIC_LINKER], |
| 2316 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl |
| 2317 | m4_require([_LT_DECL_EGREP])dnl |
| 2318 | m4_require([_LT_FILEUTILS_DEFAULTS])dnl |
| 2319 | m4_require([_LT_DECL_OBJDUMP])dnl |
| 2320 | m4_require([_LT_DECL_SED])dnl |
| 2321 | m4_require([_LT_CHECK_SHELL_FEATURES])dnl |
| 2322 | m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl |
| 2323 | AC_MSG_CHECKING([dynamic linker characteristics]) |
| 2324 | m4_if([$1], |
| 2325 | [], [ |
| 2326 | if test yes = "$GCC"; then |
| 2327 | case $host_os in |
| 2328 | darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; |
| 2329 | *) lt_awk_arg='/^libraries:/' ;; |
| 2330 | esac |
| 2331 | case $host_os in |
| 2332 | mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; |
| 2333 | *) lt_sed_strip_eq='s|=/|/|g' ;; |
| 2334 | esac |
| 2335 | lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` |
| 2336 | case $lt_search_path_spec in |
| 2337 | *\;*) |
| 2338 | # if the path contains ";" then we assume it to be the separator |
| 2339 | # otherwise default to the standard path separator (i.e. ":") - it is |
| 2340 | # assumed that no part of a normal pathname contains ";" but that should |
| 2341 | # okay in the real world where ";" in dirpaths is itself problematic. |
| 2342 | lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` |
| 2343 | ;; |
| 2344 | *) |
| 2345 | lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` |
| 2346 | ;; |
| 2347 | esac |
| 2348 | # Ok, now we have the path, separated by spaces, we can step through it |
| 2349 | # and add multilib dir if necessary... |
| 2350 | lt_tmp_lt_search_path_spec= |
| 2351 | lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` |
| 2352 | # ...but if some path component already ends with the multilib dir we assume |
| 2353 | # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). |
| 2354 | case "$lt_multi_os_dir; $lt_search_path_spec " in |
| 2355 | "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) |
| 2356 | lt_multi_os_dir= |
| 2357 | ;; |
| 2358 | esac |
| 2359 | for lt_sys_path in $lt_search_path_spec; do |
| 2360 | if test -d "$lt_sys_path$lt_multi_os_dir"; then |
| 2361 | lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" |
| 2362 | elif test -n "$lt_multi_os_dir"; then |
| 2363 | test -d "$lt_sys_path" && \ |
| 2364 | lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" |
| 2365 | fi |
| 2366 | done |
| 2367 | lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' |
| 2368 | BEGIN {RS = " "; FS = "/|\n";} { |
| 2369 | lt_foo = ""; |
| 2370 | lt_count = 0; |
| 2371 | for (lt_i = NF; lt_i > 0; lt_i--) { |
| 2372 | if ($lt_i != "" && $lt_i != ".") { |
| 2373 | if ($lt_i == "..") { |
| 2374 | lt_count++; |
| 2375 | } else { |
| 2376 | if (lt_count == 0) { |
| 2377 | lt_foo = "/" $lt_i lt_foo; |
| 2378 | } else { |
| 2379 | lt_count--; |
| 2380 | } |
| 2381 | } |
| 2382 | } |
| 2383 | } |
| 2384 | if (lt_foo != "") { lt_freq[[lt_foo]]++; } |
| 2385 | if (lt_freq[[lt_foo]] == 1) { print lt_foo; } |
| 2386 | }'` |
| 2387 | # AWK program above erroneously prepends '/' to C:/dos/paths |
| 2388 | # for these hosts. |
| 2389 | case $host_os in |
| 2390 | mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ |
| 2391 | $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; |
| 2392 | esac |
| 2393 | sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` |
| 2394 | else |
| 2395 | sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" |
| 2396 | fi]) |
| 2397 | library_names_spec= |
| 2398 | libname_spec='lib$name' |
| 2399 | soname_spec= |
| 2400 | shrext_cmds=.so |
| 2401 | postinstall_cmds= |
| 2402 | postuninstall_cmds= |
| 2403 | finish_cmds= |
| 2404 | finish_eval= |
| 2405 | shlibpath_var= |
| 2406 | shlibpath_overrides_runpath=unknown |
| 2407 | version_type=none |
| 2408 | dynamic_linker="$host_os ld.so" |
| 2409 | sys_lib_dlsearch_path_spec="/lib /usr/lib" |
| 2410 | need_lib_prefix=unknown |
| 2411 | hardcode_into_libs=no |
| 2412 |
| 2413 | # when you set need_version to no, make sure it does not cause -set_version |
| 2414 | # flags to be left without arguments |
| 2415 | need_version=unknown |
| 2416 |
| 2417 | AC_ARG_VAR([LT_SYS_LIBRARY_PATH], |
| 2418 | [User-defined run-time library search path.]) |
| 2419 |
| 2420 | case $host_os in |
| 2421 | aix3*) |
| 2422 | version_type=linux # correct to gnu/linux during the next big refactor |
| 2423 | library_names_spec='$libname$release$shared_ext$versuffix $libname.a' |
| 2424 | shlibpath_var=LIBPATH |
| 2425 |
| 2426 | # AIX 3 has no versioning support, so we append a major version to the name. |
| 2427 | soname_spec='$libname$release$shared_ext$major' |
| 2428 | ;; |
| 2429 |
| 2430 | aix[[4-9]]*) |
| 2431 | version_type=linux # correct to gnu/linux during the next big refactor |
| 2432 | need_lib_prefix=no |
| 2433 | need_version=no |
| 2434 | hardcode_into_libs=yes |
| 2435 | if test ia64 = "$host_cpu"; then |
| 2436 | # AIX 5 supports IA64 |
| 2437 | library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' |
| 2438 | shlibpath_var=LD_LIBRARY_PATH |
| 2439 | else |
| 2440 | # With GCC up to 2.95.x, collect2 would create an import file |
| 2441 | # for dependence libraries. The import file would start with |
| 2442 | # the line '#! .'. This would cause the generated library to |
| 2443 | # depend on '.', always an invalid library. This was fixed in |
| 2444 | # development snapshots of GCC prior to 3.0. |
| 2445 | case $host_os in |
| 2446 | aix4 | aix4.[[01]] | aix4.[[01]].*) |
| 2447 | if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' |
| 2448 | echo ' yes ' |
| 2449 | echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then |
| 2450 | : |
| 2451 | else |
| 2452 | can_build_shared=no |
| 2453 | fi |
| 2454 | ;; |
| 2455 | esac |
| 2456 | # Using Import Files as archive members, it is possible to support |
| 2457 | # filename-based versioning of shared library archives on AIX. While |
| 2458 | # this would work for both with and without runtime linking, it will |
| 2459 | # prevent static linking of such archives. So we do filename-based |
| 2460 | # shared library versioning with .so extension only, which is used |
| 2461 | # when both runtime linking and shared linking is enabled. |
| 2462 | # Unfortunately, runtime linking may impact performance, so we do |
| 2463 | # not want this to be the default eventually. Also, we use the |
| 2464 | # versioned .so libs for executables only if there is the -brtl |
| 2465 | # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. |
| 2466 | # To allow for filename-based versioning support, we need to create |
| 2467 | # libNAME.so.V as an archive file, containing: |
| 2468 | # *) an Import File, referring to the versioned filename of the |
| 2469 | # archive as well as the shared archive member, telling the |
| 2470 | # bitwidth (32 or 64) of that shared object, and providing the |
| 2471 | # list of exported symbols of that shared object, eventually |
| 2472 | # decorated with the 'weak' keyword |
| 2473 | # *) the shared object with the F_LOADONLY flag set, to really avoid |
| 2474 | # it being seen by the linker. |
| 2475 | # At run time we better use the real file rather than another symlink, |
| 2476 | # but for link time we create the symlink libNAME.so -> libNAME.so.V |
| 2477 |
| 2478 | case $with_aix_soname,$aix_use_runtimelinking in |
| 2479 | # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct |
| 2480 | # soname into executable. Probably we can add versioning support to |
| 2481 | # collect2, so additional links can be useful in future. |
| 2482 | aix,yes) # traditional libtool |
| 2483 | dynamic_linker='AIX unversionable lib.so' |
| 2484 | # If using run time linking (on AIX 4.2 or later) use lib<name>.so |
| 2485 | # instead of lib<name>.a to let people know that these are not |
| 2486 | # typical AIX shared libraries. |
| 2487 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' |
| 2488 | ;; |
| 2489 | aix,no) # traditional AIX only |
| 2490 | dynamic_linker='AIX lib.a[(]lib.so.V[)]' |
| 2491 | # We preserve .a as extension for shared libraries through AIX4.2 |
| 2492 | # and later when we are not doing run time linking. |
| 2493 | library_names_spec='$libname$release.a $libname.a' |
| 2494 | soname_spec='$libname$release$shared_ext$major' |
| 2495 | ;; |
| 2496 | svr4,*) # full svr4 only |
| 2497 | dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" |
| 2498 | library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' |
| 2499 | # We do not specify a path in Import Files, so LIBPATH fires. |
| 2500 | shlibpath_overrides_runpath=yes |
| 2501 | ;; |
| 2502 | *,yes) # both, prefer svr4 |
| 2503 | dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" |
| 2504 | library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' |
| 2505 | # unpreferred sharedlib libNAME.a needs extra handling |
| 2506 | postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' |
| 2507 | postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' |
| 2508 | # We do not specify a path in Import Files, so LIBPATH fires. |
| 2509 | shlibpath_overrides_runpath=yes |
| 2510 | ;; |
| 2511 | *,no) # both, prefer aix |
| 2512 | dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" |
| 2513 | library_names_spec='$libname$release.a $libname.a' |
| 2514 | soname_spec='$libname$release$shared_ext$major' |
| 2515 | # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling |
| 2516 | postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' |
| 2517 | postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' |
| 2518 | ;; |
| 2519 | esac |
| 2520 | shlibpath_var=LIBPATH |
| 2521 | fi |
| 2522 | ;; |
| 2523 |
| 2524 | amigaos*) |
| 2525 | case $host_cpu in |
| 2526 | powerpc) |
| 2527 | # Since July 2007 AmigaOS4 officially supports .so libraries. |
| 2528 | # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. |
| 2529 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' |
| 2530 | ;; |
| 2531 | m68k) |
| 2532 | library_names_spec='$libname.ixlibrary $libname.a' |
| 2533 | # Create ${libname}_ixlibrary.a entries in /sys/libs. |
| 2534 | finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' |
| 2535 | ;; |
| 2536 | esac |
| 2537 | ;; |
| 2538 |
| 2539 | beos*) |
| 2540 | library_names_spec='$libname$shared_ext' |
| 2541 | dynamic_linker="$host_os ld.so" |
| 2542 | shlibpath_var=LIBRARY_PATH |
| 2543 | ;; |
| 2544 |
| 2545 | bsdi[[45]]*) |
| 2546 | version_type=linux # correct to gnu/linux during the next big refactor |
| 2547 | need_version=no |
| 2548 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' |
| 2549 | soname_spec='$libname$release$shared_ext$major' |
| 2550 | finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' |
| 2551 | shlibpath_var=LD_LIBRARY_PATH |
| 2552 | sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" |
| 2553 | sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" |
| 2554 | # the default ld.so.conf also contains /usr/contrib/lib and |
| 2555 | # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow |
| 2556 | # libtool to hard-code these into programs |
| 2557 | ;; |
| 2558 |
| 2559 | cygwin* | mingw* | pw32* | cegcc*) |
| 2560 | version_type=windows |
| 2561 | shrext_cmds=.dll |
| 2562 | need_version=no |
| 2563 | need_lib_prefix=no |
| 2564 |
| 2565 | case $GCC,$cc_basename in |
| 2566 | yes,*) |
| 2567 | # gcc |
| 2568 | library_names_spec='$libname.dll.a' |
| 2569 | # DLL is installed to $(libdir)/../bin by postinstall_cmds |
| 2570 | postinstall_cmds='base_file=`basename \$file`~ |
| 2571 | dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ |
| 2572 | dldir=$destdir/`dirname \$dlpath`~ |
| 2573 | test -d \$dldir || mkdir -p \$dldir~ |
| 2574 | $install_prog $dir/$dlname \$dldir/$dlname~ |
| 2575 | chmod a+x \$dldir/$dlname~ |
| 2576 | if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then |
| 2577 | eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; |
| 2578 | fi' |
| 2579 | postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ |
| 2580 | dlpath=$dir/\$dldll~ |
| 2581 | $RM \$dlpath' |
| 2582 | shlibpath_overrides_runpath=yes |
| 2583 |
| 2584 | case $host_os in |
| 2585 | cygwin*) |
| 2586 | # Cygwin DLLs use 'cyg' prefix rather than 'lib' |
| 2587 | soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' |
| 2588 | m4_if([$1], [],[ |
| 2589 | sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) |
| 2590 | ;; |
| 2591 | mingw* | cegcc*) |
| 2592 | # MinGW DLLs use traditional 'lib' prefix |
| 2593 | soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' |
| 2594 | ;; |
| 2595 | pw32*) |
| 2596 | # pw32 DLLs use 'pw' prefix rather than 'lib' |
| 2597 | library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' |
| 2598 | ;; |
| 2599 | esac |
| 2600 | dynamic_linker='Win32 ld.exe' |
| 2601 | ;; |
| 2602 |
| 2603 | *,cl* | *,icl*) |
| 2604 | # Native MSVC or ICC |
| 2605 | libname_spec='$name' |
| 2606 | soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' |
| 2607 | library_names_spec='$libname.dll.lib' |
| 2608 |
| 2609 | case $build_os in |
| 2610 | mingw*) |
| 2611 | sys_lib_search_path_spec= |
| 2612 | lt_save_ifs=$IFS |
| 2613 | IFS=';' |
| 2614 | for lt_path in $LIB |
| 2615 | do |
| 2616 | IFS=$lt_save_ifs |
| 2617 | # Let DOS variable expansion print the short 8.3 style file name. |
| 2618 | lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` |
| 2619 | sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" |
| 2620 | done |
| 2621 | IFS=$lt_save_ifs |
| 2622 | # Convert to MSYS style. |
| 2623 | sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` |
| 2624 | ;; |
| 2625 | cygwin*) |
| 2626 | # Convert to unix form, then to dos form, then back to unix form |
| 2627 | # but this time dos style (no spaces!) so that the unix form looks |
| 2628 | # like /cygdrive/c/PROGRA~1:/cygdr... |
| 2629 | sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` |
| 2630 | sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` |
| 2631 | sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` |
| 2632 | ;; |
| 2633 | *) |
| 2634 | sys_lib_search_path_spec=$LIB |
| 2635 | if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then |
| 2636 | # It is most probably a Windows format PATH. |
| 2637 | sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` |
| 2638 | else |
| 2639 | sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` |
| 2640 | fi |
| 2641 | # FIXME: find the short name or the path components, as spaces are |
| 2642 | # common. (e.g. "Program Files" -> "PROGRA~1") |
| 2643 | ;; |
| 2644 | esac |
| 2645 |
| 2646 | # DLL is installed to $(libdir)/../bin by postinstall_cmds |
| 2647 | postinstall_cmds='base_file=`basename \$file`~ |
| 2648 | dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ |
| 2649 | dldir=$destdir/`dirname \$dlpath`~ |
| 2650 | test -d \$dldir || mkdir -p \$dldir~ |
| 2651 | $install_prog $dir/$dlname \$dldir/$dlname' |
| 2652 | postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ |
| 2653 | dlpath=$dir/\$dldll~ |
| 2654 | $RM \$dlpath' |
| 2655 | shlibpath_overrides_runpath=yes |
| 2656 | dynamic_linker='Win32 link.exe' |
| 2657 | ;; |
| 2658 |
| 2659 | *) |
| 2660 | # Assume MSVC and ICC wrapper |
| 2661 | library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' |
| 2662 | dynamic_linker='Win32 ld.exe' |
| 2663 | ;; |
| 2664 | esac |
| 2665 | # FIXME: first we should search . and the directory the executable is in |
| 2666 | shlibpath_var=PATH |
| 2667 | ;; |
| 2668 |
| 2669 | darwin* | rhapsody*) |
| 2670 | dynamic_linker="$host_os dyld" |
| 2671 | version_type=darwin |
| 2672 | need_lib_prefix=no |
| 2673 | need_version=no |
| 2674 | library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' |
| 2675 | soname_spec='$libname$release$major$shared_ext' |
| 2676 | shlibpath_overrides_runpath=yes |
| 2677 | shlibpath_var=DYLD_LIBRARY_PATH |
| 2678 | shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' |
| 2679 | m4_if([$1], [],[ |
| 2680 | sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) |
| 2681 | sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' |
| 2682 | ;; |
| 2683 |
| 2684 | dgux*) |
| 2685 | version_type=linux # correct to gnu/linux during the next big refactor |
| 2686 | need_lib_prefix=no |
| 2687 | need_version=no |
| 2688 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' |
| 2689 | soname_spec='$libname$release$shared_ext$major' |
| 2690 | shlibpath_var=LD_LIBRARY_PATH |
| 2691 | ;; |
| 2692 |
| 2693 | freebsd* | dragonfly*) |
| 2694 | # DragonFly does not have aout. When/if they implement a new |
| 2695 | # versioning mechanism, adjust this. |
| 2696 | if test -x /usr/bin/objformat; then |
| 2697 | objformat=`/usr/bin/objformat` |
| 2698 | else |
| 2699 | case $host_os in |
| 2700 | freebsd[[23]].*) objformat=aout ;; |
| 2701 | *) objformat=elf ;; |
| 2702 | esac |
| 2703 | fi |
| 2704 | version_type=freebsd-$objformat |
| 2705 | case $version_type in |
| 2706 | freebsd-elf*) |
| 2707 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' |
| 2708 | soname_spec='$libname$release$shared_ext$major' |
| 2709 | need_version=no |
| 2710 | need_lib_prefix=no |
| 2711 | ;; |
| 2712 | freebsd-*) |
| 2713 | library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' |
| 2714 | need_version=yes |
| 2715 | ;; |
| 2716 | esac |
| 2717 | shlibpath_var=LD_LIBRARY_PATH |
| 2718 | case $host_os in |
| 2719 | freebsd2.*) |
| 2720 | shlibpath_overrides_runpath=yes |
| 2721 | ;; |
| 2722 | freebsd3.[[01]]* | freebsdelf3.[[01]]*) |
| 2723 | shlibpath_overrides_runpath=yes |
| 2724 | hardcode_into_libs=yes |
| 2725 | ;; |
| 2726 | freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ |
| 2727 | freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) |
| 2728 | shlibpath_overrides_runpath=no |
| 2729 | hardcode_into_libs=yes |
| 2730 | ;; |
| 2731 | *) # from 4.6 on, and DragonFly |
| 2732 | shlibpath_overrides_runpath=yes |
| 2733 | hardcode_into_libs=yes |
| 2734 | ;; |
| 2735 | esac |
| 2736 | ;; |
| 2737 |
| 2738 | haiku*) |
| 2739 | version_type=linux # correct to gnu/linux during the next big refactor |
| 2740 | need_lib_prefix=no |
| 2741 | need_version=no |
| 2742 | dynamic_linker="$host_os runtime_loader" |
| 2743 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' |
| 2744 | soname_spec='$libname$release$shared_ext$major' |
| 2745 | shlibpath_var=LIBRARY_PATH |
| 2746 | shlibpath_overrides_runpath=no |
| 2747 | sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' |
| 2748 | hardcode_into_libs=yes |
| 2749 | ;; |
| 2750 |
| 2751 | hpux9* | hpux10* | hpux11*) |
| 2752 | # Give a soname corresponding to the major version so that dld.sl refuses to |
| 2753 | # link against other versions. |
| 2754 | version_type=sunos |
| 2755 | need_lib_prefix=no |
| 2756 | need_version=no |
| 2757 | case $host_cpu in |
| 2758 | ia64*) |
| 2759 | shrext_cmds='.so' |
| 2760 | hardcode_into_libs=yes |
| 2761 | dynamic_linker="$host_os dld.so" |
| 2762 | shlibpath_var=LD_LIBRARY_PATH |
| 2763 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. |
| 2764 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' |
| 2765 | soname_spec='$libname$release$shared_ext$major' |
| 2766 | if test 32 = "$HPUX_IA64_MODE"; then |
| 2767 | sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" |
| 2768 | sys_lib_dlsearch_path_spec=/usr/lib/hpux32 |
| 2769 | else |
| 2770 | sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" |
| 2771 | sys_lib_dlsearch_path_spec=/usr/lib/hpux64 |
| 2772 | fi |
| 2773 | ;; |
| 2774 | hppa*64*) |
| 2775 | shrext_cmds='.sl' |
| 2776 | hardcode_into_libs=yes |
| 2777 | dynamic_linker="$host_os dld.sl" |
| 2778 | shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH |
| 2779 | shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. |
| 2780 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' |
| 2781 | soname_spec='$libname$release$shared_ext$major' |
| 2782 | sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" |
| 2783 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec |
| 2784 | ;; |
| 2785 | *) |
| 2786 | shrext_cmds='.sl' |
| 2787 | dynamic_linker="$host_os dld.sl" |
| 2788 | shlibpath_var=SHLIB_PATH |
| 2789 | shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH |
| 2790 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' |
| 2791 | soname_spec='$libname$release$shared_ext$major' |
| 2792 | ;; |
| 2793 | esac |
| 2794 | # HP-UX runs *really* slowly unless shared libraries are mode 555, ... |
| 2795 | postinstall_cmds='chmod 555 $lib' |
| 2796 | # or fails outright, so override atomically: |
| 2797 | install_override_mode=555 |
| 2798 | ;; |
| 2799 |
| 2800 | interix[[3-9]]*) |
| 2801 | version_type=linux # correct to gnu/linux during the next big refactor |
| 2802 | need_lib_prefix=no |
| 2803 | need_version=no |
| 2804 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' |
| 2805 | soname_spec='$libname$release$shared_ext$major' |
| 2806 | dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' |
| 2807 | shlibpath_var=LD_LIBRARY_PATH |
| 2808 | shlibpath_overrides_runpath=no |
| 2809 | hardcode_into_libs=yes |
| 2810 | ;; |
| 2811 |
| 2812 | irix5* | irix6* | nonstopux*) |
| 2813 | case $host_os in |
| 2814 | nonstopux*) version_type=nonstopux ;; |
| 2815 | *) |
| 2816 | if test yes = "$lt_cv_prog_gnu_ld"; then |
| 2817 | version_type=linux # correct to gnu/linux during the next big refactor |
| 2818 | else |
| 2819 | version_type=irix |
| 2820 | fi ;; |
| 2821 | esac |
| 2822 | need_lib_prefix=no |
| 2823 | need_version=no |
| 2824 | soname_spec='$libname$release$shared_ext$major' |
| 2825 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' |
| 2826 | case $host_os in |
| 2827 | irix5* | nonstopux*) |
| 2828 | libsuff= shlibsuff= |
| 2829 | ;; |
| 2830 | *) |
| 2831 | case $LD in # libtool.m4 will add one of these switches to LD |
| 2832 | *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") |
| 2833 | libsuff= shlibsuff= libmagic=32-bit;; |
| 2834 | *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") |
| 2835 | libsuff=32 shlibsuff=N32 libmagic=N32;; |
| 2836 | *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") |
| 2837 | libsuff=64 shlibsuff=64 libmagic=64-bit;; |
| 2838 | *) libsuff= shlibsuff= libmagic=never-match;; |
| 2839 | esac |
| 2840 | ;; |
| 2841 | esac |
| 2842 | shlibpath_var=LD_LIBRARY${shlibsuff}_PATH |
| 2843 | shlibpath_overrides_runpath=no |
| 2844 | sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" |
| 2845 | sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" |
| 2846 | hardcode_into_libs=yes |
| 2847 | ;; |
| 2848 |
| 2849 | # No shared lib support for Linux oldld, aout, or coff. |
| 2850 | linux*oldld* | linux*aout* | linux*coff*) |
| 2851 | dynamic_linker=no |
| 2852 | ;; |
| 2853 |
| 2854 | linux*android*) |
| 2855 | version_type=none # Android doesn't support versioned libraries. |
| 2856 | need_lib_prefix=no |
| 2857 | need_version=no |
| 2858 | library_names_spec='$libname$release$shared_ext' |
| 2859 | soname_spec='$libname$release$shared_ext' |
| 2860 | finish_cmds= |
| 2861 | shlibpath_var=LD_LIBRARY_PATH |
| 2862 | shlibpath_overrides_runpath=yes |
| 2863 |
| 2864 | # This implies no fast_install, which is unacceptable. |
| 2865 | # Some rework will be needed to allow for fast_install |
| 2866 | # before this can be enabled. |
| 2867 | hardcode_into_libs=yes |
| 2868 |
| 2869 | dynamic_linker='Android linker' |
| 2870 | # Don't embed -rpath directories since the linker doesn't support them. |
| 2871 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 2872 | ;; |
| 2873 |
| 2874 | # This must be glibc/ELF. |
| 2875 | linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) |
| 2876 | version_type=linux # correct to gnu/linux during the next big refactor |
| 2877 | need_lib_prefix=no |
| 2878 | need_version=no |
| 2879 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' |
| 2880 | soname_spec='$libname$release$shared_ext$major' |
| 2881 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' |
| 2882 | shlibpath_var=LD_LIBRARY_PATH |
| 2883 | shlibpath_overrides_runpath=no |
| 2884 |
| 2885 | # Some binutils ld are patched to set DT_RUNPATH |
| 2886 | AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], |
| 2887 | [lt_cv_shlibpath_overrides_runpath=no |
| 2888 | save_LDFLAGS=$LDFLAGS |
| 2889 | save_libdir=$libdir |
| 2890 | eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ |
| 2891 | LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" |
| 2892 | AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], |
| 2893 | [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], |
| 2894 | [lt_cv_shlibpath_overrides_runpath=yes])]) |
| 2895 | LDFLAGS=$save_LDFLAGS |
| 2896 | libdir=$save_libdir |
| 2897 | ]) |
| 2898 | shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath |
| 2899 |
| 2900 | # This implies no fast_install, which is unacceptable. |
| 2901 | # Some rework will be needed to allow for fast_install |
| 2902 | # before this can be enabled. |
| 2903 | hardcode_into_libs=yes |
| 2904 |
| 2905 | # Ideally, we could use ldconfig to report *all* directores which are |
| 2906 | # searched for libraries, however this is still not possible. Aside from not |
| 2907 | # being certain /sbin/ldconfig is available, command |
| 2908 | # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, |
| 2909 | # even though it is searched at run-time. Try to do the best guess by |
| 2910 | # appending ld.so.conf contents (and includes) to the search path. |
| 2911 | if test -f /etc/ld.so.conf; then |
| 2912 | 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' ' '` |
| 2913 | sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" |
| 2914 | fi |
| 2915 |
| 2916 | # We used to test for /lib/ld.so.1 and disable shared libraries on |
| 2917 | # powerpc, because MkLinux only supported shared libraries with the |
| 2918 | # GNU dynamic linker. Since this was broken with cross compilers, |
| 2919 | # most powerpc-linux boxes support dynamic linking these days and |
| 2920 | # people can always --disable-shared, the test was removed, and we |
| 2921 | # assume the GNU/Linux dynamic linker is in use. |
| 2922 | dynamic_linker='GNU/Linux ld.so' |
| 2923 | ;; |
| 2924 |
| 2925 | netbsd*) |
| 2926 | version_type=sunos |
| 2927 | need_lib_prefix=no |
| 2928 | need_version=no |
| 2929 | if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then |
| 2930 | library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' |
| 2931 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' |
| 2932 | dynamic_linker='NetBSD (a.out) ld.so' |
| 2933 | else |
| 2934 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' |
| 2935 | soname_spec='$libname$release$shared_ext$major' |
| 2936 | dynamic_linker='NetBSD ld.elf_so' |
| 2937 | fi |
| 2938 | shlibpath_var=LD_LIBRARY_PATH |
| 2939 | shlibpath_overrides_runpath=yes |
| 2940 | hardcode_into_libs=yes |
| 2941 | ;; |
| 2942 |
| 2943 | newsos6) |
| 2944 | version_type=linux # correct to gnu/linux during the next big refactor |
| 2945 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' |
| 2946 | shlibpath_var=LD_LIBRARY_PATH |
| 2947 | shlibpath_overrides_runpath=yes |
| 2948 | ;; |
| 2949 |
| 2950 | *nto* | *qnx*) |
| 2951 | version_type=qnx |
| 2952 | need_lib_prefix=no |
| 2953 | need_version=no |
| 2954 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' |
| 2955 | soname_spec='$libname$release$shared_ext$major' |
| 2956 | shlibpath_var=LD_LIBRARY_PATH |
| 2957 | shlibpath_overrides_runpath=no |
| 2958 | hardcode_into_libs=yes |
| 2959 | dynamic_linker='ldqnx.so' |
| 2960 | ;; |
| 2961 |
| 2962 | openbsd* | bitrig*) |
| 2963 | version_type=sunos |
| 2964 | sys_lib_dlsearch_path_spec=/usr/lib |
| 2965 | need_lib_prefix=no |
| 2966 | if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then |
| 2967 | need_version=no |
| 2968 | else |
| 2969 | need_version=yes |
| 2970 | fi |
| 2971 | library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' |
| 2972 | finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' |
| 2973 | shlibpath_var=LD_LIBRARY_PATH |
| 2974 | shlibpath_overrides_runpath=yes |
| 2975 | ;; |
| 2976 |
| 2977 | os2*) |
| 2978 | libname_spec='$name' |
| 2979 | version_type=windows |
| 2980 | shrext_cmds=.dll |
| 2981 | need_version=no |
| 2982 | need_lib_prefix=no |
| 2983 | # OS/2 can only load a DLL with a base name of 8 characters or less. |
| 2984 | soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; |
| 2985 | v=$($ECHO $release$versuffix | tr -d .-); |
| 2986 | n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); |
| 2987 | $ECHO $n$v`$shared_ext' |
| 2988 | library_names_spec='${libname}_dll.$libext' |
| 2989 | dynamic_linker='OS/2 ld.exe' |
| 2990 | shlibpath_var=BEGINLIBPATH |
| 2991 | sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" |
| 2992 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec |
| 2993 | postinstall_cmds='base_file=`basename \$file`~ |
| 2994 | dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ |
| 2995 | dldir=$destdir/`dirname \$dlpath`~ |
| 2996 | test -d \$dldir || mkdir -p \$dldir~ |
| 2997 | $install_prog $dir/$dlname \$dldir/$dlname~ |
| 2998 | chmod a+x \$dldir/$dlname~ |
| 2999 | if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then |
| 3000 | eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; |
| 3001 | fi' |
| 3002 | postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ |
| 3003 | dlpath=$dir/\$dldll~ |
| 3004 | $RM \$dlpath' |
| 3005 | ;; |
| 3006 |
| 3007 | osf3* | osf4* | osf5*) |
| 3008 | version_type=osf |
| 3009 | need_lib_prefix=no |
| 3010 | need_version=no |
| 3011 | soname_spec='$libname$release$shared_ext$major' |
| 3012 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' |
| 3013 | shlibpath_var=LD_LIBRARY_PATH |
| 3014 | sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" |
| 3015 | sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec |
| 3016 | ;; |
| 3017 |
| 3018 | rdos*) |
| 3019 | dynamic_linker=no |
| 3020 | ;; |
| 3021 |
| 3022 | solaris*) |
| 3023 | version_type=linux # correct to gnu/linux during the next big refactor |
| 3024 | need_lib_prefix=no |
| 3025 | need_version=no |
| 3026 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' |
| 3027 | soname_spec='$libname$release$shared_ext$major' |
| 3028 | shlibpath_var=LD_LIBRARY_PATH |
| 3029 | shlibpath_overrides_runpath=yes |
| 3030 | hardcode_into_libs=yes |
| 3031 | # ldd complains unless libraries are executable |
| 3032 | postinstall_cmds='chmod +x $lib' |
| 3033 | ;; |
| 3034 |
| 3035 | sunos4*) |
| 3036 | version_type=sunos |
| 3037 | library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' |
| 3038 | finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' |
| 3039 | shlibpath_var=LD_LIBRARY_PATH |
| 3040 | shlibpath_overrides_runpath=yes |
| 3041 | if test yes = "$with_gnu_ld"; then |
| 3042 | need_lib_prefix=no |
| 3043 | fi |
| 3044 | need_version=yes |
| 3045 | ;; |
| 3046 |
| 3047 | sysv4 | sysv4.3*) |
| 3048 | version_type=linux # correct to gnu/linux during the next big refactor |
| 3049 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' |
| 3050 | soname_spec='$libname$release$shared_ext$major' |
| 3051 | shlibpath_var=LD_LIBRARY_PATH |
| 3052 | case $host_vendor in |
| 3053 | sni) |
| 3054 | shlibpath_overrides_runpath=no |
| 3055 | need_lib_prefix=no |
| 3056 | runpath_var=LD_RUN_PATH |
| 3057 | ;; |
| 3058 | siemens) |
| 3059 | need_lib_prefix=no |
| 3060 | ;; |
| 3061 | motorola) |
| 3062 | need_lib_prefix=no |
| 3063 | need_version=no |
| 3064 | shlibpath_overrides_runpath=no |
| 3065 | sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' |
| 3066 | ;; |
| 3067 | esac |
| 3068 | ;; |
| 3069 |
| 3070 | sysv4*MP*) |
| 3071 | if test -d /usr/nec; then |
| 3072 | version_type=linux # correct to gnu/linux during the next big refactor |
| 3073 | library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' |
| 3074 | soname_spec='$libname$shared_ext.$major' |
| 3075 | shlibpath_var=LD_LIBRARY_PATH |
| 3076 | fi |
| 3077 | ;; |
| 3078 |
| 3079 | sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) |
| 3080 | version_type=sco |
| 3081 | need_lib_prefix=no |
| 3082 | need_version=no |
| 3083 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' |
| 3084 | soname_spec='$libname$release$shared_ext$major' |
| 3085 | shlibpath_var=LD_LIBRARY_PATH |
| 3086 | shlibpath_overrides_runpath=yes |
| 3087 | hardcode_into_libs=yes |
| 3088 | if test yes = "$with_gnu_ld"; then |
| 3089 | sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' |
| 3090 | else |
| 3091 | sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' |
| 3092 | case $host_os in |
| 3093 | sco3.2v5*) |
| 3094 | sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" |
| 3095 | ;; |
| 3096 | esac |
| 3097 | fi |
| 3098 | sys_lib_dlsearch_path_spec='/usr/lib' |
| 3099 | ;; |
| 3100 |
| 3101 | tpf*) |
| 3102 | # TPF is a cross-target only. Preferred cross-host = GNU/Linux. |
| 3103 | version_type=linux # correct to gnu/linux during the next big refactor |
| 3104 | need_lib_prefix=no |
| 3105 | need_version=no |
| 3106 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' |
| 3107 | shlibpath_var=LD_LIBRARY_PATH |
| 3108 | shlibpath_overrides_runpath=no |
| 3109 | hardcode_into_libs=yes |
| 3110 | ;; |
| 3111 |
| 3112 | uts4*) |
| 3113 | version_type=linux # correct to gnu/linux during the next big refactor |
| 3114 | library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' |
| 3115 | soname_spec='$libname$release$shared_ext$major' |
| 3116 | shlibpath_var=LD_LIBRARY_PATH |
| 3117 | ;; |
| 3118 |
| 3119 | *) |
| 3120 | dynamic_linker=no |
| 3121 | ;; |
| 3122 | esac |
| 3123 | AC_MSG_RESULT([$dynamic_linker]) |
| 3124 | test no = "$dynamic_linker" && can_build_shared=no |
| 3125 |
| 3126 | variables_saved_for_relink="PATH $shlibpath_var $runpath_var" |
| 3127 | if test yes = "$GCC"; then |
| 3128 | variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" |
| 3129 | fi |
| 3130 |
| 3131 | if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then |
| 3132 | sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec |
| 3133 | fi |
| 3134 |
| 3135 | if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then |
| 3136 | sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec |
| 3137 | fi |
| 3138 |
| 3139 | # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... |
| 3140 | configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec |
| 3141 |
| 3142 | # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code |
| 3143 | func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" |
| 3144 |
| 3145 | # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool |
| 3146 | configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH |
| 3147 |
| 3148 | _LT_DECL([], [variables_saved_for_relink], [1], |
| 3149 | [Variables whose values should be saved in libtool wrapper scripts and |
| 3150 | restored at link time]) |
| 3151 | _LT_DECL([], [need_lib_prefix], [0], |
| 3152 | [Do we need the "lib" prefix for modules?]) |
| 3153 | _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) |
| 3154 | _LT_DECL([], [version_type], [0], [Library versioning type]) |
| 3155 | _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) |
| 3156 | _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) |
| 3157 | _LT_DECL([], [shlibpath_overrides_runpath], [0], |
| 3158 | [Is shlibpath searched before the hard-coded library search path?]) |
| 3159 | _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) |
| 3160 | _LT_DECL([], [library_names_spec], [1], |
| 3161 | [[List of archive names. First name is the real one, the rest are links. |
| 3162 | The last name is the one that the linker finds with -lNAME]]) |
| 3163 | _LT_DECL([], [soname_spec], [1], |
| 3164 | [[The coded name of the library, if different from the real name]]) |
| 3165 | _LT_DECL([], [install_override_mode], [1], |
| 3166 | [Permission mode override for installation of shared libraries]) |
| 3167 | _LT_DECL([], [postinstall_cmds], [2], |
| 3168 | [Command to use after installation of a shared archive]) |
| 3169 | _LT_DECL([], [postuninstall_cmds], [2], |
| 3170 | [Command to use after uninstallation of a shared archive]) |
| 3171 | _LT_DECL([], [finish_cmds], [2], |
| 3172 | [Commands used to finish a libtool library installation in a directory]) |
| 3173 | _LT_DECL([], [finish_eval], [1], |
| 3174 | [[As "finish_cmds", except a single script fragment to be evaled but |
| 3175 | not shown]]) |
| 3176 | _LT_DECL([], [hardcode_into_libs], [0], |
| 3177 | [Whether we should hardcode library paths into libraries]) |
| 3178 | _LT_DECL([], [sys_lib_search_path_spec], [2], |
| 3179 | [Compile-time system search path for libraries]) |
| 3180 | _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], |
| 3181 | [Detected run-time system search path for libraries]) |
| 3182 | _LT_DECL([], [configure_time_lt_sys_library_path], [2], |
| 3183 | [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) |
| 3184 | ])# _LT_SYS_DYNAMIC_LINKER |
| 3185 |
| 3186 |
| 3187 | # _LT_PATH_TOOL_PREFIX(TOOL) |
| 3188 | # -------------------------- |
| 3189 | # find a file program that can recognize shared library |
| 3190 | AC_DEFUN([_LT_PATH_TOOL_PREFIX], |
| 3191 | [m4_require([_LT_DECL_EGREP])dnl |
| 3192 | AC_MSG_CHECKING([for $1]) |
| 3193 | AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, |
| 3194 | [case $MAGIC_CMD in |
| 3195 | [[\\/*] | ?:[\\/]*]) |
| 3196 | lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. |
| 3197 | ;; |
| 3198 | *) |
| 3199 | lt_save_MAGIC_CMD=$MAGIC_CMD |
| 3200 | lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR |
| 3201 | dnl $ac_dummy forces splitting on constant user-supplied paths. |
| 3202 | dnl POSIX.2 word splitting is done only on the output of word expansions, |
| 3203 | dnl not every word. This closes a longstanding sh security hole. |
| 3204 | ac_dummy="m4_if([$2], , $PATH, [$2])" |
| 3205 | for ac_dir in $ac_dummy; do |
| 3206 | IFS=$lt_save_ifs |
| 3207 | test -z "$ac_dir" && ac_dir=. |
| 3208 | if test -f "$ac_dir/$1"; then |
| 3209 | lt_cv_path_MAGIC_CMD=$ac_dir/"$1" |
| 3210 | if test -n "$file_magic_test_file"; then |
| 3211 | case $deplibs_check_method in |
| 3212 | "file_magic "*) |
| 3213 | file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` |
| 3214 | MAGIC_CMD=$lt_cv_path_MAGIC_CMD |
| 3215 | if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | |
| 3216 | $EGREP "$file_magic_regex" > /dev/null; then |
| 3217 | : |
| 3218 | else |
| 3219 | cat <<_LT_EOF 1>&2 |
| 3220 |
| 3221 | *** Warning: the command libtool uses to detect shared libraries, |
| 3222 | *** $file_magic_cmd, produces output that libtool cannot recognize. |
| 3223 | *** The result is that libtool may fail to recognize shared libraries |
| 3224 | *** as such. This will affect the creation of libtool libraries that |
| 3225 | *** depend on shared libraries, but programs linked with such libtool |
| 3226 | *** libraries will work regardless of this problem. Nevertheless, you |
| 3227 | *** may want to report the problem to your system manager and/or to |
| 3228 | *** bug-libtool@gnu.org |
| 3229 |
| 3230 | _LT_EOF |
| 3231 | fi ;; |
| 3232 | esac |
| 3233 | fi |
| 3234 | break |
| 3235 | fi |
| 3236 | done |
| 3237 | IFS=$lt_save_ifs |
| 3238 | MAGIC_CMD=$lt_save_MAGIC_CMD |
| 3239 | ;; |
| 3240 | esac]) |
| 3241 | MAGIC_CMD=$lt_cv_path_MAGIC_CMD |
| 3242 | if test -n "$MAGIC_CMD"; then |
| 3243 | AC_MSG_RESULT($MAGIC_CMD) |
| 3244 | else |
| 3245 | AC_MSG_RESULT(no) |
| 3246 | fi |
| 3247 | _LT_DECL([], [MAGIC_CMD], [0], |
| 3248 | [Used to examine libraries when file_magic_cmd begins with "file"])dnl |
| 3249 | ])# _LT_PATH_TOOL_PREFIX |
| 3250 |
| 3251 | # Old name: |
| 3252 | AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) |
| 3253 | dnl aclocal-1.4 backwards compatibility: |
| 3254 | dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) |
| 3255 |
| 3256 |
| 3257 | # _LT_PATH_MAGIC |
| 3258 | # -------------- |
| 3259 | # find a file program that can recognize a shared library |
| 3260 | m4_defun([_LT_PATH_MAGIC], |
| 3261 | [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) |
| 3262 | if test -z "$lt_cv_path_MAGIC_CMD"; then |
| 3263 | if test -n "$ac_tool_prefix"; then |
| 3264 | _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) |
| 3265 | else |
| 3266 | MAGIC_CMD=: |
| 3267 | fi |
| 3268 | fi |
| 3269 | ])# _LT_PATH_MAGIC |
| 3270 |
| 3271 |
| 3272 | # LT_PATH_LD |
| 3273 | # ---------- |
| 3274 | # find the pathname to the GNU or non-GNU linker |
| 3275 | AC_DEFUN([LT_PATH_LD], |
| 3276 | [AC_REQUIRE([AC_PROG_CC])dnl |
| 3277 | AC_REQUIRE([AC_CANONICAL_HOST])dnl |
| 3278 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
| 3279 | m4_require([_LT_DECL_SED])dnl |
| 3280 | m4_require([_LT_DECL_EGREP])dnl |
| 3281 | m4_require([_LT_PROG_ECHO_BACKSLASH])dnl |
| 3282 |
| 3283 | AC_ARG_WITH([gnu-ld], |
| 3284 | [AS_HELP_STRING([--with-gnu-ld], |
| 3285 | [assume the C compiler uses GNU ld @<:@default=no@:>@])], |
| 3286 | [test no = "$withval" || with_gnu_ld=yes], |
| 3287 | [with_gnu_ld=no])dnl |
| 3288 |
| 3289 | ac_prog=ld |
| 3290 | if test yes = "$GCC"; then |
| 3291 | # Check if gcc -print-prog-name=ld gives a path. |
| 3292 | AC_MSG_CHECKING([for ld used by $CC]) |
| 3293 | case $host in |
| 3294 | *-*-mingw*) |
| 3295 | # gcc leaves a trailing carriage return, which upsets mingw |
| 3296 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; |
| 3297 | *) |
| 3298 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; |
| 3299 | esac |
| 3300 | case $ac_prog in |
| 3301 | # Accept absolute paths. |
| 3302 | [[\\/]]* | ?:[[\\/]]*) |
| 3303 | re_direlt='/[[^/]][[^/]]*/\.\./' |
| 3304 | # Canonicalize the pathname of ld |
| 3305 | ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` |
| 3306 | while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do |
| 3307 | ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` |
| 3308 | done |
| 3309 | test -z "$LD" && LD=$ac_prog |
| 3310 | ;; |
| 3311 | "") |
| 3312 | # If it fails, then pretend we aren't using GCC. |
| 3313 | ac_prog=ld |
| 3314 | ;; |
| 3315 | *) |
| 3316 | # If it is relative, then search for the first ld in PATH. |
| 3317 | with_gnu_ld=unknown |
| 3318 | ;; |
| 3319 | esac |
| 3320 | elif test yes = "$with_gnu_ld"; then |
| 3321 | AC_MSG_CHECKING([for GNU ld]) |
| 3322 | else |
| 3323 | AC_MSG_CHECKING([for non-GNU ld]) |
| 3324 | fi |
| 3325 | AC_CACHE_VAL(lt_cv_path_LD, |
| 3326 | [if test -z "$LD"; then |
| 3327 | lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR |
| 3328 | for ac_dir in $PATH; do |
| 3329 | IFS=$lt_save_ifs |
| 3330 | test -z "$ac_dir" && ac_dir=. |
| 3331 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
| 3332 | lt_cv_path_LD=$ac_dir/$ac_prog |
| 3333 | # Check to see if the program is GNU ld. I'd rather use --version, |
| 3334 | # but apparently some variants of GNU ld only accept -v. |
| 3335 | # Break only if it was the GNU/non-GNU ld that we prefer. |
| 3336 | case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in |
| 3337 | *GNU* | *'with BFD'*) |
| 3338 | test no != "$with_gnu_ld" && break |
| 3339 | ;; |
| 3340 | *) |
| 3341 | test yes != "$with_gnu_ld" && break |
| 3342 | ;; |
| 3343 | esac |
| 3344 | fi |
| 3345 | done |
| 3346 | IFS=$lt_save_ifs |
| 3347 | else |
| 3348 | lt_cv_path_LD=$LD # Let the user override the test with a path. |
| 3349 | fi]) |
| 3350 | LD=$lt_cv_path_LD |
| 3351 | if test -n "$LD"; then |
| 3352 | AC_MSG_RESULT($LD) |
| 3353 | else |
| 3354 | AC_MSG_RESULT(no) |
| 3355 | fi |
| 3356 | test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) |
| 3357 | _LT_PATH_LD_GNU |
| 3358 | AC_SUBST([LD]) |
| 3359 |
| 3360 | _LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) |
| 3361 | ])# LT_PATH_LD |
| 3362 |
| 3363 | # Old names: |
| 3364 | AU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) |
| 3365 | AU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) |
| 3366 | dnl aclocal-1.4 backwards compatibility: |
| 3367 | dnl AC_DEFUN([AM_PROG_LD], []) |
| 3368 | dnl AC_DEFUN([AC_PROG_LD], []) |
| 3369 |
| 3370 |
| 3371 | # _LT_PATH_LD_GNU |
| 3372 | #- -------------- |
| 3373 | m4_defun([_LT_PATH_LD_GNU], |
| 3374 | [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, |
| 3375 | [# I'd rather use --version here, but apparently some GNU lds only accept -v. |
| 3376 | case `$LD -v 2>&1 </dev/null` in |
| 3377 | *GNU* | *'with BFD'*) |
| 3378 | lt_cv_prog_gnu_ld=yes |
| 3379 | ;; |
| 3380 | *) |
| 3381 | lt_cv_prog_gnu_ld=no |
| 3382 | ;; |
| 3383 | esac]) |
| 3384 | with_gnu_ld=$lt_cv_prog_gnu_ld |
| 3385 | ])# _LT_PATH_LD_GNU |
| 3386 |
| 3387 |
| 3388 | # _LT_CMD_RELOAD |
| 3389 | # -------------- |
| 3390 | # find reload flag for linker |
| 3391 | # -- PORTME Some linkers may need a different reload flag. |
| 3392 | m4_defun([_LT_CMD_RELOAD], |
| 3393 | [AC_CACHE_CHECK([for $LD option to reload object files], |
| 3394 | lt_cv_ld_reload_flag, |
| 3395 | [lt_cv_ld_reload_flag='-r']) |
| 3396 | reload_flag=$lt_cv_ld_reload_flag |
| 3397 | case $reload_flag in |
| 3398 | "" | " "*) ;; |
| 3399 | *) reload_flag=" $reload_flag" ;; |
| 3400 | esac |
| 3401 | reload_cmds='$LD$reload_flag -o $output$reload_objs' |
| 3402 | case $host_os in |
| 3403 | cygwin* | mingw* | pw32* | cegcc*) |
| 3404 | if test yes != "$GCC"; then |
| 3405 | reload_cmds=false |
| 3406 | fi |
| 3407 | ;; |
| 3408 | darwin*) |
| 3409 | if test yes = "$GCC"; then |
| 3410 | reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' |
| 3411 | else |
| 3412 | reload_cmds='$LD$reload_flag -o $output$reload_objs' |
| 3413 | fi |
| 3414 | ;; |
| 3415 | esac |
| 3416 | _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl |
| 3417 | _LT_TAGDECL([], [reload_cmds], [2])dnl |
| 3418 | ])# _LT_CMD_RELOAD |
| 3419 |
| 3420 |
| 3421 | # _LT_PATH_DD |
| 3422 | # ----------- |
| 3423 | # find a working dd |
| 3424 | m4_defun([_LT_PATH_DD], |
| 3425 | [AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], |
| 3426 | [printf 0123456789abcdef0123456789abcdef >conftest.i |
| 3427 | cat conftest.i conftest.i >conftest2.i |
| 3428 | : ${lt_DD:=$DD} |
| 3429 | AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], |
| 3430 | [if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then |
| 3431 | cmp -s conftest.i conftest.out \ |
| 3432 | && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: |
| 3433 | fi]) |
| 3434 | rm -f conftest.i conftest2.i conftest.out]) |
| 3435 | ])# _LT_PATH_DD |
| 3436 |
| 3437 |
| 3438 | # _LT_CMD_TRUNCATE |
| 3439 | # ---------------- |
| 3440 | # find command to truncate a binary pipe |
| 3441 | m4_defun([_LT_CMD_TRUNCATE], |
| 3442 | [m4_require([_LT_PATH_DD]) |
| 3443 | AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], |
| 3444 | [printf 0123456789abcdef0123456789abcdef >conftest.i |
| 3445 | cat conftest.i conftest.i >conftest2.i |
| 3446 | lt_cv_truncate_bin= |
| 3447 | if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then |
| 3448 | cmp -s conftest.i conftest.out \ |
| 3449 | && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" |
| 3450 | fi |
| 3451 | rm -f conftest.i conftest2.i conftest.out |
| 3452 | test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) |
| 3453 | _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], |
| 3454 | [Command to truncate a binary pipe]) |
| 3455 | ])# _LT_CMD_TRUNCATE |
| 3456 |
| 3457 |
| 3458 | # _LT_CHECK_MAGIC_METHOD |
| 3459 | # ---------------------- |
| 3460 | # how to check for library dependencies |
| 3461 | # -- PORTME fill in with the dynamic library characteristics |
| 3462 | m4_defun([_LT_CHECK_MAGIC_METHOD], |
| 3463 | [m4_require([_LT_DECL_EGREP]) |
| 3464 | m4_require([_LT_DECL_OBJDUMP]) |
| 3465 | AC_CACHE_CHECK([how to recognize dependent libraries], |
| 3466 | lt_cv_deplibs_check_method, |
| 3467 | [lt_cv_file_magic_cmd='$MAGIC_CMD' |
| 3468 | lt_cv_file_magic_test_file= |
| 3469 | lt_cv_deplibs_check_method='unknown' |
| 3470 | # Need to set the preceding variable on all platforms that support |
| 3471 | # interlibrary dependencies. |
| 3472 | # 'none' -- dependencies not supported. |
| 3473 | # 'unknown' -- same as none, but documents that we really don't know. |
| 3474 | # 'pass_all' -- all dependencies passed with no checks. |
| 3475 | # 'test_compile' -- check by making test program. |
| 3476 | # 'file_magic [[regex]]' -- check by looking for files in library path |
| 3477 | # that responds to the $file_magic_cmd with a given extended regex. |
| 3478 | # If you have 'file' or equivalent on your system and you're not sure |
| 3479 | # whether 'pass_all' will *always* work, you probably want this one. |
| 3480 |
| 3481 | case $host_os in |
| 3482 | aix[[4-9]]*) |
| 3483 | lt_cv_deplibs_check_method=pass_all |
| 3484 | ;; |
| 3485 |
| 3486 | beos*) |
| 3487 | lt_cv_deplibs_check_method=pass_all |
| 3488 | ;; |
| 3489 |
| 3490 | bsdi[[45]]*) |
| 3491 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' |
| 3492 | lt_cv_file_magic_cmd='/usr/bin/file -L' |
| 3493 | lt_cv_file_magic_test_file=/shlib/libc.so |
| 3494 | ;; |
| 3495 |
| 3496 | cygwin*) |
| 3497 | # func_win32_libid is a shell function defined in ltmain.sh |
| 3498 | lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' |
| 3499 | lt_cv_file_magic_cmd='func_win32_libid' |
| 3500 | ;; |
| 3501 |
| 3502 | mingw* | pw32*) |
| 3503 | # Base MSYS/MinGW do not provide the 'file' command needed by |
| 3504 | # func_win32_libid shell function, so use a weaker test based on 'objdump', |
| 3505 | # unless we find 'file', for example because we are cross-compiling. |
| 3506 | if ( file / ) >/dev/null 2>&1; then |
| 3507 | lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' |
| 3508 | lt_cv_file_magic_cmd='func_win32_libid' |
| 3509 | else |
| 3510 | # Keep this pattern in sync with the one in func_win32_libid. |
| 3511 | lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' |
| 3512 | lt_cv_file_magic_cmd='$OBJDUMP -f' |
| 3513 | fi |
| 3514 | ;; |
| 3515 |
| 3516 | cegcc*) |
| 3517 | # use the weaker test based on 'objdump'. See mingw*. |
| 3518 | lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' |
| 3519 | lt_cv_file_magic_cmd='$OBJDUMP -f' |
| 3520 | ;; |
| 3521 |
| 3522 | darwin* | rhapsody*) |
| 3523 | lt_cv_deplibs_check_method=pass_all |
| 3524 | ;; |
| 3525 |
| 3526 | freebsd* | dragonfly*) |
| 3527 | if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then |
| 3528 | case $host_cpu in |
| 3529 | i*86 ) |
| 3530 | # Not sure whether the presence of OpenBSD here was a mistake. |
| 3531 | # Let's accept both of them until this is cleared up. |
| 3532 | lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' |
| 3533 | lt_cv_file_magic_cmd=/usr/bin/file |
| 3534 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` |
| 3535 | ;; |
| 3536 | esac |
| 3537 | else |
| 3538 | lt_cv_deplibs_check_method=pass_all |
| 3539 | fi |
| 3540 | ;; |
| 3541 |
| 3542 | haiku*) |
| 3543 | lt_cv_deplibs_check_method=pass_all |
| 3544 | ;; |
| 3545 |
| 3546 | hpux10.20* | hpux11*) |
| 3547 | lt_cv_file_magic_cmd=/usr/bin/file |
| 3548 | case $host_cpu in |
| 3549 | ia64*) |
| 3550 | lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' |
| 3551 | lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so |
| 3552 | ;; |
| 3553 | hppa*64*) |
| 3554 | [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]'] |
| 3555 | lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl |
| 3556 | ;; |
| 3557 | *) |
| 3558 | lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' |
| 3559 | lt_cv_file_magic_test_file=/usr/lib/libc.sl |
| 3560 | ;; |
| 3561 | esac |
| 3562 | ;; |
| 3563 |
| 3564 | interix[[3-9]]*) |
| 3565 | # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here |
| 3566 | lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' |
| 3567 | ;; |
| 3568 |
| 3569 | irix5* | irix6* | nonstopux*) |
| 3570 | case $LD in |
| 3571 | *-32|*"-32 ") libmagic=32-bit;; |
| 3572 | *-n32|*"-n32 ") libmagic=N32;; |
| 3573 | *-64|*"-64 ") libmagic=64-bit;; |
| 3574 | *) libmagic=never-match;; |
| 3575 | esac |
| 3576 | lt_cv_deplibs_check_method=pass_all |
| 3577 | ;; |
| 3578 |
| 3579 | # This must be glibc/ELF. |
| 3580 | linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) |
| 3581 | lt_cv_deplibs_check_method=pass_all |
| 3582 | ;; |
| 3583 |
| 3584 | netbsd*) |
| 3585 | if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then |
| 3586 | lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' |
| 3587 | else |
| 3588 | lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' |
| 3589 | fi |
| 3590 | ;; |
| 3591 |
| 3592 | newos6*) |
| 3593 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' |
| 3594 | lt_cv_file_magic_cmd=/usr/bin/file |
| 3595 | lt_cv_file_magic_test_file=/usr/lib/libnls.so |
| 3596 | ;; |
| 3597 |
| 3598 | *nto* | *qnx*) |
| 3599 | lt_cv_deplibs_check_method=pass_all |
| 3600 | ;; |
| 3601 |
| 3602 | openbsd* | bitrig*) |
| 3603 | if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then |
| 3604 | lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' |
| 3605 | else |
| 3606 | lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' |
| 3607 | fi |
| 3608 | ;; |
| 3609 |
| 3610 | osf3* | osf4* | osf5*) |
| 3611 | lt_cv_deplibs_check_method=pass_all |
| 3612 | ;; |
| 3613 |
| 3614 | rdos*) |
| 3615 | lt_cv_deplibs_check_method=pass_all |
| 3616 | ;; |
| 3617 |
| 3618 | solaris*) |
| 3619 | lt_cv_deplibs_check_method=pass_all |
| 3620 | ;; |
| 3621 |
| 3622 | sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) |
| 3623 | lt_cv_deplibs_check_method=pass_all |
| 3624 | ;; |
| 3625 |
| 3626 | sysv4 | sysv4.3*) |
| 3627 | case $host_vendor in |
| 3628 | motorola) |
| 3629 | 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]]' |
| 3630 | lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` |
| 3631 | ;; |
| 3632 | ncr) |
| 3633 | lt_cv_deplibs_check_method=pass_all |
| 3634 | ;; |
| 3635 | sequent) |
| 3636 | lt_cv_file_magic_cmd='/bin/file' |
| 3637 | lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' |
| 3638 | ;; |
| 3639 | sni) |
| 3640 | lt_cv_file_magic_cmd='/bin/file' |
| 3641 | lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" |
| 3642 | lt_cv_file_magic_test_file=/lib/libc.so |
| 3643 | ;; |
| 3644 | siemens) |
| 3645 | lt_cv_deplibs_check_method=pass_all |
| 3646 | ;; |
| 3647 | pc) |
| 3648 | lt_cv_deplibs_check_method=pass_all |
| 3649 | ;; |
| 3650 | esac |
| 3651 | ;; |
| 3652 |
| 3653 | tpf*) |
| 3654 | lt_cv_deplibs_check_method=pass_all |
| 3655 | ;; |
| 3656 | os2*) |
| 3657 | lt_cv_deplibs_check_method=pass_all |
| 3658 | ;; |
| 3659 | esac |
| 3660 | ]) |
| 3661 |
| 3662 | file_magic_glob= |
| 3663 | want_nocaseglob=no |
| 3664 | if test "$build" = "$host"; then |
| 3665 | case $host_os in |
| 3666 | mingw* | pw32*) |
| 3667 | if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then |
| 3668 | want_nocaseglob=yes |
| 3669 | else |
| 3670 | file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` |
| 3671 | fi |
| 3672 | ;; |
| 3673 | esac |
| 3674 | fi |
| 3675 |
| 3676 | file_magic_cmd=$lt_cv_file_magic_cmd |
| 3677 | deplibs_check_method=$lt_cv_deplibs_check_method |
| 3678 | test -z "$deplibs_check_method" && deplibs_check_method=unknown |
| 3679 |
| 3680 | _LT_DECL([], [deplibs_check_method], [1], |
| 3681 | [Method to check whether dependent libraries are shared objects]) |
| 3682 | _LT_DECL([], [file_magic_cmd], [1], |
| 3683 | [Command to use when deplibs_check_method = "file_magic"]) |
| 3684 | _LT_DECL([], [file_magic_glob], [1], |
| 3685 | [How to find potential files when deplibs_check_method = "file_magic"]) |
| 3686 | _LT_DECL([], [want_nocaseglob], [1], |
| 3687 | [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) |
| 3688 | ])# _LT_CHECK_MAGIC_METHOD |
| 3689 |
| 3690 |
| 3691 | # LT_PATH_NM |
| 3692 | # ---------- |
| 3693 | # find the pathname to a BSD- or MS-compatible name lister |
| 3694 | AC_DEFUN([LT_PATH_NM], |
| 3695 | [AC_REQUIRE([AC_PROG_CC])dnl |
| 3696 | AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, |
| 3697 | [if test -n "$NM"; then |
| 3698 | # Let the user override the test. |
| 3699 | lt_cv_path_NM=$NM |
| 3700 | else |
| 3701 | lt_nm_to_check=${ac_tool_prefix}nm |
| 3702 | if test -n "$ac_tool_prefix" && test "$build" = "$host"; then |
| 3703 | lt_nm_to_check="$lt_nm_to_check nm" |
| 3704 | fi |
| 3705 | for lt_tmp_nm in $lt_nm_to_check; do |
| 3706 | lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR |
| 3707 | for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do |
| 3708 | IFS=$lt_save_ifs |
| 3709 | test -z "$ac_dir" && ac_dir=. |
| 3710 | tmp_nm=$ac_dir/$lt_tmp_nm |
| 3711 | if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then |
| 3712 | # Check to see if the nm accepts a BSD-compat flag. |
| 3713 | # Adding the 'sed 1q' prevents false positives on HP-UX, which says: |
| 3714 | # nm: unknown option "B" ignored |
| 3715 | # Tru64's nm complains that /dev/null is an invalid object file |
| 3716 | # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty |
| 3717 | case $build_os in |
| 3718 | mingw*) lt_bad_file=conftest.nm/nofile ;; |
| 3719 | *) lt_bad_file=/dev/null ;; |
| 3720 | esac |
| 3721 | case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in |
| 3722 | *$lt_bad_file* | *'Invalid file or object type'*) |
| 3723 | lt_cv_path_NM="$tmp_nm -B" |
| 3724 | break 2 |
| 3725 | ;; |
| 3726 | *) |
| 3727 | case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in |
| 3728 | */dev/null*) |
| 3729 | lt_cv_path_NM="$tmp_nm -p" |
| 3730 | break 2 |
| 3731 | ;; |
| 3732 | *) |
| 3733 | lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but |
| 3734 | continue # so that we can try to find one that supports BSD flags |
| 3735 | ;; |
| 3736 | esac |
| 3737 | ;; |
| 3738 | esac |
| 3739 | fi |
| 3740 | done |
| 3741 | IFS=$lt_save_ifs |
| 3742 | done |
| 3743 | : ${lt_cv_path_NM=no} |
| 3744 | fi]) |
| 3745 | if test no != "$lt_cv_path_NM"; then |
| 3746 | NM=$lt_cv_path_NM |
| 3747 | else |
| 3748 | # Didn't find any BSD compatible name lister, look for dumpbin. |
| 3749 | if test -n "$DUMPBIN"; then : |
| 3750 | # Let the user override the test. |
| 3751 | else |
| 3752 | AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) |
| 3753 | case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in |
| 3754 | *COFF*) |
| 3755 | DUMPBIN="$DUMPBIN -symbols -headers" |
| 3756 | ;; |
| 3757 | *) |
| 3758 | DUMPBIN=: |
| 3759 | ;; |
| 3760 | esac |
| 3761 | fi |
| 3762 | AC_SUBST([DUMPBIN]) |
| 3763 | if test : != "$DUMPBIN"; then |
| 3764 | NM=$DUMPBIN |
| 3765 | fi |
| 3766 | fi |
| 3767 | test -z "$NM" && NM=nm |
| 3768 | AC_SUBST([NM]) |
| 3769 | _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl |
| 3770 |
| 3771 | AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], |
| 3772 | [lt_cv_nm_interface="BSD nm" |
| 3773 | echo "int some_variable = 0;" > conftest.$ac_ext |
| 3774 | (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) |
| 3775 | (eval "$ac_compile" 2>conftest.err) |
| 3776 | cat conftest.err >&AS_MESSAGE_LOG_FD |
| 3777 | (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) |
| 3778 | (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) |
| 3779 | cat conftest.err >&AS_MESSAGE_LOG_FD |
| 3780 | (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) |
| 3781 | cat conftest.out >&AS_MESSAGE_LOG_FD |
| 3782 | if $GREP 'External.*some_variable' conftest.out > /dev/null; then |
| 3783 | lt_cv_nm_interface="MS dumpbin" |
| 3784 | fi |
| 3785 | rm -f conftest*]) |
| 3786 | ])# LT_PATH_NM |
| 3787 |
| 3788 | # Old names: |
| 3789 | AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) |
| 3790 | AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) |
| 3791 | dnl aclocal-1.4 backwards compatibility: |
| 3792 | dnl AC_DEFUN([AM_PROG_NM], []) |
| 3793 | dnl AC_DEFUN([AC_PROG_NM], []) |
| 3794 |
| 3795 | # _LT_CHECK_SHAREDLIB_FROM_LINKLIB |
| 3796 | # -------------------------------- |
| 3797 | # how to determine the name of the shared library |
| 3798 | # associated with a specific link library. |
| 3799 | # -- PORTME fill in with the dynamic library characteristics |
| 3800 | m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], |
| 3801 | [m4_require([_LT_DECL_EGREP]) |
| 3802 | m4_require([_LT_DECL_OBJDUMP]) |
| 3803 | m4_require([_LT_DECL_DLLTOOL]) |
| 3804 | AC_CACHE_CHECK([how to associate runtime and link libraries], |
| 3805 | lt_cv_sharedlib_from_linklib_cmd, |
| 3806 | [lt_cv_sharedlib_from_linklib_cmd='unknown' |
| 3807 |
| 3808 | case $host_os in |
| 3809 | cygwin* | mingw* | pw32* | cegcc*) |
| 3810 | # two different shell functions defined in ltmain.sh; |
| 3811 | # decide which one to use based on capabilities of $DLLTOOL |
| 3812 | case `$DLLTOOL --help 2>&1` in |
| 3813 | *--identify-strict*) |
| 3814 | lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib |
| 3815 | ;; |
| 3816 | *) |
| 3817 | lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback |
| 3818 | ;; |
| 3819 | esac |
| 3820 | ;; |
| 3821 | *) |
| 3822 | # fallback: assume linklib IS sharedlib |
| 3823 | lt_cv_sharedlib_from_linklib_cmd=$ECHO |
| 3824 | ;; |
| 3825 | esac |
| 3826 | ]) |
| 3827 | sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd |
| 3828 | test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO |
| 3829 |
| 3830 | _LT_DECL([], [sharedlib_from_linklib_cmd], [1], |
| 3831 | [Command to associate shared and link libraries]) |
| 3832 | ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB |
| 3833 |
| 3834 |
| 3835 | # _LT_PATH_MANIFEST_TOOL |
| 3836 | # ---------------------- |
| 3837 | # locate the manifest tool |
| 3838 | m4_defun([_LT_PATH_MANIFEST_TOOL], |
| 3839 | [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) |
| 3840 | test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt |
| 3841 | AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], |
| 3842 | [lt_cv_path_mainfest_tool=no |
| 3843 | echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD |
| 3844 | $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out |
| 3845 | cat conftest.err >&AS_MESSAGE_LOG_FD |
| 3846 | if $GREP 'Manifest Tool' conftest.out > /dev/null; then |
| 3847 | lt_cv_path_mainfest_tool=yes |
| 3848 | fi |
| 3849 | rm -f conftest*]) |
| 3850 | if test yes != "$lt_cv_path_mainfest_tool"; then |
| 3851 | MANIFEST_TOOL=: |
| 3852 | fi |
| 3853 | _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl |
| 3854 | ])# _LT_PATH_MANIFEST_TOOL |
| 3855 |
| 3856 |
| 3857 | # _LT_DLL_DEF_P([FILE]) |
| 3858 | # --------------------- |
| 3859 | # True iff FILE is a Windows DLL '.def' file. |
| 3860 | # Keep in sync with func_dll_def_p in the libtool script |
| 3861 | AC_DEFUN([_LT_DLL_DEF_P], |
| 3862 | [dnl |
| 3863 | test DEF = "`$SED -n dnl |
| 3864 | -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace |
| 3865 | -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments |
| 3866 | -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl |
| 3867 | -e q dnl Only consider the first "real" line |
| 3868 | $1`" dnl |
| 3869 | ])# _LT_DLL_DEF_P |
| 3870 |
| 3871 |
| 3872 | # LT_LIB_M |
| 3873 | # -------- |
| 3874 | # check for math library |
| 3875 | AC_DEFUN([LT_LIB_M], |
| 3876 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl |
| 3877 | LIBM= |
| 3878 | case $host in |
| 3879 | *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) |
| 3880 | # These system don't have libm, or don't need it |
| 3881 | ;; |
| 3882 | *-ncr-sysv4.3*) |
| 3883 | AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) |
| 3884 | AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") |
| 3885 | ;; |
| 3886 | *) |
| 3887 | AC_CHECK_LIB(m, cos, LIBM=-lm) |
| 3888 | ;; |
| 3889 | esac |
| 3890 | AC_SUBST([LIBM]) |
| 3891 | ])# LT_LIB_M |
| 3892 |
| 3893 | # Old name: |
| 3894 | AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) |
| 3895 | dnl aclocal-1.4 backwards compatibility: |
| 3896 | dnl AC_DEFUN([AC_CHECK_LIBM], []) |
| 3897 |
| 3898 |
| 3899 | # _LT_COMPILER_NO_RTTI([TAGNAME]) |
| 3900 | # ------------------------------- |
| 3901 | m4_defun([_LT_COMPILER_NO_RTTI], |
| 3902 | [m4_require([_LT_TAG_COMPILER])dnl |
| 3903 |
| 3904 | _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= |
| 3905 |
| 3906 | if test yes = "$GCC"; then |
| 3907 | case $cc_basename in |
| 3908 | nvcc*) |
| 3909 | _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; |
| 3910 | *) |
| 3911 | _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; |
| 3912 | esac |
| 3913 |
| 3914 | _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], |
| 3915 | lt_cv_prog_compiler_rtti_exceptions, |
| 3916 | [-fno-rtti -fno-exceptions], [], |
| 3917 | [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) |
| 3918 | fi |
| 3919 | _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], |
| 3920 | [Compiler flag to turn off builtin functions]) |
| 3921 | ])# _LT_COMPILER_NO_RTTI |
| 3922 |
| 3923 |
| 3924 | # _LT_CMD_GLOBAL_SYMBOLS |
| 3925 | # ---------------------- |
| 3926 | m4_defun([_LT_CMD_GLOBAL_SYMBOLS], |
| 3927 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl |
| 3928 | AC_REQUIRE([AC_PROG_CC])dnl |
| 3929 | AC_REQUIRE([AC_PROG_AWK])dnl |
| 3930 | AC_REQUIRE([LT_PATH_NM])dnl |
| 3931 | AC_REQUIRE([LT_PATH_LD])dnl |
| 3932 | m4_require([_LT_DECL_SED])dnl |
| 3933 | m4_require([_LT_DECL_EGREP])dnl |
| 3934 | m4_require([_LT_TAG_COMPILER])dnl |
| 3935 |
| 3936 | # Check for command to grab the raw symbol name followed by C symbol from nm. |
| 3937 | AC_MSG_CHECKING([command to parse $NM output from $compiler object]) |
| 3938 | AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], |
| 3939 | [ |
| 3940 | # These are sane defaults that work on at least a few old systems. |
| 3941 | # [They come from Ultrix. What could be older than Ultrix?!! ;)] |
| 3942 |
| 3943 | # Character class describing NM global symbol codes. |
| 3944 | symcode='[[BCDEGRST]]' |
| 3945 |
| 3946 | # Regexp to match symbols that can be accessed directly from C. |
| 3947 | sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' |
| 3948 |
| 3949 | # Define system-specific variables. |
| 3950 | case $host_os in |
| 3951 | aix*) |
| 3952 | symcode='[[BCDT]]' |
| 3953 | ;; |
| 3954 | cygwin* | mingw* | pw32* | cegcc*) |
| 3955 | symcode='[[ABCDGISTW]]' |
| 3956 | ;; |
| 3957 | hpux*) |
| 3958 | if test ia64 = "$host_cpu"; then |
| 3959 | symcode='[[ABCDEGRST]]' |
| 3960 | fi |
| 3961 | ;; |
| 3962 | irix* | nonstopux*) |
| 3963 | symcode='[[BCDEGRST]]' |
| 3964 | ;; |
| 3965 | osf*) |
| 3966 | symcode='[[BCDEGQRST]]' |
| 3967 | ;; |
| 3968 | solaris*) |
| 3969 | symcode='[[BDRT]]' |
| 3970 | ;; |
| 3971 | sco3.2v5*) |
| 3972 | symcode='[[DT]]' |
| 3973 | ;; |
| 3974 | sysv4.2uw2*) |
| 3975 | symcode='[[DT]]' |
| 3976 | ;; |
| 3977 | sysv5* | sco5v6* | unixware* | OpenUNIX*) |
| 3978 | symcode='[[ABDT]]' |
| 3979 | ;; |
| 3980 | sysv4) |
| 3981 | symcode='[[DFNSTU]]' |
| 3982 | ;; |
| 3983 | esac |
| 3984 |
| 3985 | # If we're using GNU nm, then use its standard symbol codes. |
| 3986 | case `$NM -V 2>&1` in |
| 3987 | *GNU* | *'with BFD'*) |
| 3988 | symcode='[[ABCDGIRSTW]]' ;; |
| 3989 | esac |
| 3990 |
| 3991 | if test "$lt_cv_nm_interface" = "MS dumpbin"; then |
| 3992 | # Gets list of data symbols to import. |
| 3993 | lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" |
| 3994 | # Adjust the below global symbol transforms to fixup imported variables. |
| 3995 | lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" |
| 3996 | lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" |
| 3997 | lt_c_name_lib_hook="\ |
| 3998 | -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ |
| 3999 | -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" |
| 4000 | else |
| 4001 | # Disable hooks by default. |
| 4002 | lt_cv_sys_global_symbol_to_import= |
| 4003 | lt_cdecl_hook= |
| 4004 | lt_c_name_hook= |
| 4005 | lt_c_name_lib_hook= |
| 4006 | fi |
| 4007 |
| 4008 | # Transform an extracted symbol line into a proper C declaration. |
| 4009 | # Some systems (esp. on ia64) link data and code symbols differently, |
| 4010 | # so use this general approach. |
| 4011 | lt_cv_sys_global_symbol_to_cdecl="sed -n"\ |
| 4012 | $lt_cdecl_hook\ |
| 4013 | " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ |
| 4014 | " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" |
| 4015 |
| 4016 | # Transform an extracted symbol line into symbol name and symbol address |
| 4017 | lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ |
| 4018 | $lt_c_name_hook\ |
| 4019 | " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ |
| 4020 | " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" |
| 4021 |
| 4022 | # Transform an extracted symbol line into symbol name with lib prefix and |
| 4023 | # symbol address. |
| 4024 | lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ |
| 4025 | $lt_c_name_lib_hook\ |
| 4026 | " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ |
| 4027 | " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ |
| 4028 | " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" |
| 4029 |
| 4030 | # Handle CRLF in mingw tool chain |
| 4031 | opt_cr= |
| 4032 | case $build_os in |
| 4033 | mingw*) |
| 4034 | opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp |
| 4035 | ;; |
| 4036 | esac |
| 4037 |
| 4038 | # Try without a prefix underscore, then with it. |
| 4039 | for ac_symprfx in "" "_"; do |
| 4040 |
| 4041 | # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. |
| 4042 | symxfrm="\\1 $ac_symprfx\\2 \\2" |
| 4043 |
| 4044 | # Write the raw and C identifiers. |
| 4045 | if test "$lt_cv_nm_interface" = "MS dumpbin"; then |
| 4046 | # Fake it for dumpbin and say T for any non-static function, |
| 4047 | # D for any global variable and I for any imported variable. |
| 4048 | # Also find C++ and __fastcall symbols from MSVC++ or ICC, |
| 4049 | # which start with @ or ?. |
| 4050 | lt_cv_sys_global_symbol_pipe="$AWK ['"\ |
| 4051 | " {last_section=section; section=\$ 3};"\ |
| 4052 | " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ |
| 4053 | " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ |
| 4054 | " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ |
| 4055 | " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ |
| 4056 | " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ |
| 4057 | " \$ 0!~/External *\|/{next};"\ |
| 4058 | " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ |
| 4059 | " {if(hide[section]) next};"\ |
| 4060 | " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ |
| 4061 | " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ |
| 4062 | " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ |
| 4063 | " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ |
| 4064 | " ' prfx=^$ac_symprfx]" |
| 4065 | else |
| 4066 | lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" |
| 4067 | fi |
| 4068 | lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" |
| 4069 |
| 4070 | # Check to see that the pipe works correctly. |
| 4071 | pipe_works=no |
| 4072 |
| 4073 | rm -f conftest* |
| 4074 | cat > conftest.$ac_ext <<_LT_EOF |
| 4075 | #ifdef __cplusplus |
| 4076 | extern "C" { |
| 4077 | #endif |
| 4078 | char nm_test_var; |
| 4079 | void nm_test_func(void); |
| 4080 | void nm_test_func(void){} |
| 4081 | #ifdef __cplusplus |
| 4082 | } |
| 4083 | #endif |
| 4084 | int main(){nm_test_var='a';nm_test_func();return(0);} |
| 4085 | _LT_EOF |
| 4086 |
| 4087 | if AC_TRY_EVAL(ac_compile); then |
| 4088 | # Now try to grab the symbols. |
| 4089 | nlist=conftest.nm |
| 4090 | if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then |
| 4091 | # Try sorting and uniquifying the output. |
| 4092 | if sort "$nlist" | uniq > "$nlist"T; then |
| 4093 | mv -f "$nlist"T "$nlist" |
| 4094 | else |
| 4095 | rm -f "$nlist"T |
| 4096 | fi |
| 4097 |
| 4098 | # Make sure that we snagged all the symbols we need. |
| 4099 | if $GREP ' nm_test_var$' "$nlist" >/dev/null; then |
| 4100 | if $GREP ' nm_test_func$' "$nlist" >/dev/null; then |
| 4101 | cat <<_LT_EOF > conftest.$ac_ext |
| 4102 | /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ |
| 4103 | #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE |
| 4104 | /* DATA imports from DLLs on WIN32 can't be const, because runtime |
| 4105 | relocations are performed -- see ld's documentation on pseudo-relocs. */ |
| 4106 | # define LT@&t@_DLSYM_CONST |
| 4107 | #elif defined __osf__ |
| 4108 | /* This system does not cope well with relocations in const data. */ |
| 4109 | # define LT@&t@_DLSYM_CONST |
| 4110 | #else |
| 4111 | # define LT@&t@_DLSYM_CONST const |
| 4112 | #endif |
| 4113 |
| 4114 | #ifdef __cplusplus |
| 4115 | extern "C" { |
| 4116 | #endif |
| 4117 |
| 4118 | _LT_EOF |
| 4119 | # Now generate the symbol file. |
| 4120 | eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' |
| 4121 |
| 4122 | cat <<_LT_EOF >> conftest.$ac_ext |
| 4123 |
| 4124 | /* The mapping between symbol names and symbols. */ |
| 4125 | LT@&t@_DLSYM_CONST struct { |
| 4126 | const char *name; |
| 4127 | void *address; |
| 4128 | } |
| 4129 | lt__PROGRAM__LTX_preloaded_symbols[[]] = |
| 4130 | { |
| 4131 | { "@PROGRAM@", (void *) 0 }, |
| 4132 | _LT_EOF |
| 4133 | $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext |
| 4134 | cat <<\_LT_EOF >> conftest.$ac_ext |
| 4135 | {0, (void *) 0} |
| 4136 | }; |
| 4137 |
| 4138 | /* This works around a problem in FreeBSD linker */ |
| 4139 | #ifdef FREEBSD_WORKAROUND |
| 4140 | static const void *lt_preloaded_setup() { |
| 4141 | return lt__PROGRAM__LTX_preloaded_symbols; |
| 4142 | } |
| 4143 | #endif |
| 4144 |
| 4145 | #ifdef __cplusplus |
| 4146 | } |
| 4147 | #endif |
| 4148 | _LT_EOF |
| 4149 | # Now try linking the two files. |
| 4150 | mv conftest.$ac_objext conftstm.$ac_objext |
| 4151 | lt_globsym_save_LIBS=$LIBS |
| 4152 | lt_globsym_save_CFLAGS=$CFLAGS |
| 4153 | LIBS=conftstm.$ac_objext |
| 4154 | CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" |
| 4155 | if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then |
| 4156 | pipe_works=yes |
| 4157 | fi |
| 4158 | LIBS=$lt_globsym_save_LIBS |
| 4159 | CFLAGS=$lt_globsym_save_CFLAGS |
| 4160 | else |
| 4161 | echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD |
| 4162 | fi |
| 4163 | else |
| 4164 | echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD |
| 4165 | fi |
| 4166 | else |
| 4167 | echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD |
| 4168 | fi |
| 4169 | else |
| 4170 | echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD |
| 4171 | cat conftest.$ac_ext >&5 |
| 4172 | fi |
| 4173 | rm -rf conftest* conftst* |
| 4174 |
| 4175 | # Do not use the global_symbol_pipe unless it works. |
| 4176 | if test yes = "$pipe_works"; then |
| 4177 | break |
| 4178 | else |
| 4179 | lt_cv_sys_global_symbol_pipe= |
| 4180 | fi |
| 4181 | done |
| 4182 | ]) |
| 4183 | if test -z "$lt_cv_sys_global_symbol_pipe"; then |
| 4184 | lt_cv_sys_global_symbol_to_cdecl= |
| 4185 | fi |
| 4186 | if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then |
| 4187 | AC_MSG_RESULT(failed) |
| 4188 | else |
| 4189 | AC_MSG_RESULT(ok) |
| 4190 | fi |
| 4191 |
| 4192 | # Response file support. |
| 4193 | if test "$lt_cv_nm_interface" = "MS dumpbin"; then |
| 4194 | nm_file_list_spec='@' |
| 4195 | elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then |
| 4196 | nm_file_list_spec='@' |
| 4197 | fi |
| 4198 |
| 4199 | _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], |
| 4200 | [Take the output of nm and produce a listing of raw symbols and C names]) |
| 4201 | _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], |
| 4202 | [Transform the output of nm in a proper C declaration]) |
| 4203 | _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], |
| 4204 | [Transform the output of nm into a list of symbols to manually relocate]) |
| 4205 | _LT_DECL([global_symbol_to_c_name_address], |
| 4206 | [lt_cv_sys_global_symbol_to_c_name_address], [1], |
| 4207 | [Transform the output of nm in a C name address pair]) |
| 4208 | _LT_DECL([global_symbol_to_c_name_address_lib_prefix], |
| 4209 | [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], |
| 4210 | [Transform the output of nm in a C name address pair when lib prefix is needed]) |
| 4211 | _LT_DECL([nm_interface], [lt_cv_nm_interface], [1], |
| 4212 | [The name lister interface]) |
| 4213 | _LT_DECL([], [nm_file_list_spec], [1], |
| 4214 | [Specify filename containing input files for $NM]) |
| 4215 | ]) # _LT_CMD_GLOBAL_SYMBOLS |
| 4216 |
| 4217 |
| 4218 | # _LT_COMPILER_PIC([TAGNAME]) |
| 4219 | # --------------------------- |
| 4220 | m4_defun([_LT_COMPILER_PIC], |
| 4221 | [m4_require([_LT_TAG_COMPILER])dnl |
| 4222 | _LT_TAGVAR(lt_prog_compiler_wl, $1)= |
| 4223 | _LT_TAGVAR(lt_prog_compiler_pic, $1)= |
| 4224 | _LT_TAGVAR(lt_prog_compiler_static, $1)= |
| 4225 |
| 4226 | m4_if([$1], [CXX], [ |
| 4227 | # C++ specific cases for pic, static, wl, etc. |
| 4228 | if test yes = "$GXX"; then |
| 4229 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 4230 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' |
| 4231 |
| 4232 | case $host_os in |
| 4233 | aix*) |
| 4234 | # All AIX code is PIC. |
| 4235 | if test ia64 = "$host_cpu"; then |
| 4236 | # AIX 5 now supports IA64 processor |
| 4237 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 4238 | fi |
| 4239 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
| 4240 | ;; |
| 4241 |
| 4242 | amigaos*) |
| 4243 | case $host_cpu in |
| 4244 | powerpc) |
| 4245 | # see comment about AmigaOS4 .so support |
| 4246 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
| 4247 | ;; |
| 4248 | m68k) |
| 4249 | # FIXME: we need at least 68020 code to build shared libraries, but |
| 4250 | # adding the '-m68020' flag to GCC prevents building anything better, |
| 4251 | # like '-m68040'. |
| 4252 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' |
| 4253 | ;; |
| 4254 | esac |
| 4255 | ;; |
| 4256 |
| 4257 | beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) |
| 4258 | # PIC is the default for these OSes. |
| 4259 | ;; |
| 4260 | mingw* | cygwin* | os2* | pw32* | cegcc*) |
| 4261 | # This hack is so that the source file can tell whether it is being |
| 4262 | # built for inclusion in a dll (and should export symbols for example). |
| 4263 | # Although the cygwin gcc ignores -fPIC, still need this for old-style |
| 4264 | # (--disable-auto-import) libraries |
| 4265 | m4_if([$1], [GCJ], [], |
| 4266 | [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) |
| 4267 | case $host_os in |
| 4268 | os2*) |
| 4269 | _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' |
| 4270 | ;; |
| 4271 | esac |
| 4272 | ;; |
| 4273 | darwin* | rhapsody*) |
| 4274 | # PIC is the default on this platform |
| 4275 | # Common symbols not allowed in MH_DYLIB files |
| 4276 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' |
| 4277 | ;; |
| 4278 | *djgpp*) |
| 4279 | # DJGPP does not support shared libraries at all |
| 4280 | _LT_TAGVAR(lt_prog_compiler_pic, $1)= |
| 4281 | ;; |
| 4282 | haiku*) |
| 4283 | # PIC is the default for Haiku. |
| 4284 | # The "-static" flag exists, but is broken. |
| 4285 | _LT_TAGVAR(lt_prog_compiler_static, $1)= |
| 4286 | ;; |
| 4287 | interix[[3-9]]*) |
| 4288 | # Interix 3.x gcc -fpic/-fPIC options generate broken code. |
| 4289 | # Instead, we relocate shared libraries at runtime. |
| 4290 | ;; |
| 4291 | sysv4*MP*) |
| 4292 | if test -d /usr/nec; then |
| 4293 | _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic |
| 4294 | fi |
| 4295 | ;; |
| 4296 | hpux*) |
| 4297 | # PIC is the default for 64-bit PA HP-UX, but not for 32-bit |
| 4298 | # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag |
| 4299 | # sets the default TLS model and affects inlining. |
| 4300 | case $host_cpu in |
| 4301 | hppa*64*) |
| 4302 | ;; |
| 4303 | *) |
| 4304 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
| 4305 | ;; |
| 4306 | esac |
| 4307 | ;; |
| 4308 | *qnx* | *nto*) |
| 4309 | # QNX uses GNU C++, but need to define -shared option too, otherwise |
| 4310 | # it will coredump. |
| 4311 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' |
| 4312 | ;; |
| 4313 | *) |
| 4314 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
| 4315 | ;; |
| 4316 | esac |
| 4317 | else |
| 4318 | case $host_os in |
| 4319 | aix[[4-9]]*) |
| 4320 | # All AIX code is PIC. |
| 4321 | if test ia64 = "$host_cpu"; then |
| 4322 | # AIX 5 now supports IA64 processor |
| 4323 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 4324 | else |
| 4325 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' |
| 4326 | fi |
| 4327 | ;; |
| 4328 | chorus*) |
| 4329 | case $cc_basename in |
| 4330 | cxch68*) |
| 4331 | # Green Hills C++ Compiler |
| 4332 | # _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" |
| 4333 | ;; |
| 4334 | esac |
| 4335 | ;; |
| 4336 | mingw* | cygwin* | os2* | pw32* | cegcc*) |
| 4337 | # This hack is so that the source file can tell whether it is being |
| 4338 | # built for inclusion in a dll (and should export symbols for example). |
| 4339 | m4_if([$1], [GCJ], [], |
| 4340 | [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) |
| 4341 | ;; |
| 4342 | dgux*) |
| 4343 | case $cc_basename in |
| 4344 | ec++*) |
| 4345 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
| 4346 | ;; |
| 4347 | ghcx*) |
| 4348 | # Green Hills C++ Compiler |
| 4349 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
| 4350 | ;; |
| 4351 | *) |
| 4352 | ;; |
| 4353 | esac |
| 4354 | ;; |
| 4355 | freebsd* | dragonfly*) |
| 4356 | # FreeBSD uses GNU C++ |
| 4357 | ;; |
| 4358 | hpux9* | hpux10* | hpux11*) |
| 4359 | case $cc_basename in |
| 4360 | CC*) |
| 4361 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 4362 | _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' |
| 4363 | if test ia64 != "$host_cpu"; then |
| 4364 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' |
| 4365 | fi |
| 4366 | ;; |
| 4367 | aCC*) |
| 4368 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 4369 | _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' |
| 4370 | case $host_cpu in |
| 4371 | hppa*64*|ia64*) |
| 4372 | # +Z the default |
| 4373 | ;; |
| 4374 | *) |
| 4375 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' |
| 4376 | ;; |
| 4377 | esac |
| 4378 | ;; |
| 4379 | *) |
| 4380 | ;; |
| 4381 | esac |
| 4382 | ;; |
| 4383 | interix*) |
| 4384 | # This is c89, which is MS Visual C++ (no shared libs) |
| 4385 | # Anyone wants to do a port? |
| 4386 | ;; |
| 4387 | irix5* | irix6* | nonstopux*) |
| 4388 | case $cc_basename in |
| 4389 | CC*) |
| 4390 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 4391 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
| 4392 | # CC pic flag -KPIC is the default. |
| 4393 | ;; |
| 4394 | *) |
| 4395 | ;; |
| 4396 | esac |
| 4397 | ;; |
| 4398 | linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) |
| 4399 | case $cc_basename in |
| 4400 | KCC*) |
| 4401 | # KAI C++ Compiler |
| 4402 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' |
| 4403 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
| 4404 | ;; |
| 4405 | ecpc* ) |
| 4406 | # old Intel C++ for x86_64, which still supported -KPIC. |
| 4407 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 4408 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
| 4409 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' |
| 4410 | ;; |
| 4411 | icpc* ) |
| 4412 | # Intel C++, used to be incompatible with GCC. |
| 4413 | # ICC 10 doesn't accept -KPIC any more. |
| 4414 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 4415 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
| 4416 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' |
| 4417 | ;; |
| 4418 | pgCC* | pgcpp*) |
| 4419 | # Portland Group C++ compiler |
| 4420 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 4421 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' |
| 4422 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 4423 | ;; |
| 4424 | cxx*) |
| 4425 | # Compaq C++ |
| 4426 | # Make sure the PIC flag is empty. It appears that all Alpha |
| 4427 | # Linux and Compaq Tru64 Unix objects are PIC. |
| 4428 | _LT_TAGVAR(lt_prog_compiler_pic, $1)= |
| 4429 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
| 4430 | ;; |
| 4431 | xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) |
| 4432 | # IBM XL 8.0, 9.0 on PPC and BlueGene |
| 4433 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 4434 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' |
| 4435 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' |
| 4436 | ;; |
| 4437 | *) |
| 4438 | case `$CC -V 2>&1 | sed 5q` in |
| 4439 | *Sun\ C*) |
| 4440 | # Sun C++ 5.9 |
| 4441 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
| 4442 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 4443 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' |
| 4444 | ;; |
| 4445 | esac |
| 4446 | ;; |
| 4447 | esac |
| 4448 | ;; |
| 4449 | lynxos*) |
| 4450 | ;; |
| 4451 | m88k*) |
| 4452 | ;; |
| 4453 | mvs*) |
| 4454 | case $cc_basename in |
| 4455 | cxx*) |
| 4456 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' |
| 4457 | ;; |
| 4458 | *) |
| 4459 | ;; |
| 4460 | esac |
| 4461 | ;; |
| 4462 | netbsd*) |
| 4463 | ;; |
| 4464 | *qnx* | *nto*) |
| 4465 | # QNX uses GNU C++, but need to define -shared option too, otherwise |
| 4466 | # it will coredump. |
| 4467 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' |
| 4468 | ;; |
| 4469 | osf3* | osf4* | osf5*) |
| 4470 | case $cc_basename in |
| 4471 | KCC*) |
| 4472 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' |
| 4473 | ;; |
| 4474 | RCC*) |
| 4475 | # Rational C++ 2.4.1 |
| 4476 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
| 4477 | ;; |
| 4478 | cxx*) |
| 4479 | # Digital/Compaq C++ |
| 4480 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 4481 | # Make sure the PIC flag is empty. It appears that all Alpha |
| 4482 | # Linux and Compaq Tru64 Unix objects are PIC. |
| 4483 | _LT_TAGVAR(lt_prog_compiler_pic, $1)= |
| 4484 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
| 4485 | ;; |
| 4486 | *) |
| 4487 | ;; |
| 4488 | esac |
| 4489 | ;; |
| 4490 | psos*) |
| 4491 | ;; |
| 4492 | solaris*) |
| 4493 | case $cc_basename in |
| 4494 | CC* | sunCC*) |
| 4495 | # Sun C++ 4.2, 5.x and Centerline C++ |
| 4496 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
| 4497 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 4498 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' |
| 4499 | ;; |
| 4500 | gcx*) |
| 4501 | # Green Hills C++ Compiler |
| 4502 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' |
| 4503 | ;; |
| 4504 | *) |
| 4505 | ;; |
| 4506 | esac |
| 4507 | ;; |
| 4508 | sunos4*) |
| 4509 | case $cc_basename in |
| 4510 | CC*) |
| 4511 | # Sun C++ 4.x |
| 4512 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
| 4513 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 4514 | ;; |
| 4515 | lcc*) |
| 4516 | # Lucid |
| 4517 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
| 4518 | ;; |
| 4519 | *) |
| 4520 | ;; |
| 4521 | esac |
| 4522 | ;; |
| 4523 | sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) |
| 4524 | case $cc_basename in |
| 4525 | CC*) |
| 4526 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 4527 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
| 4528 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 4529 | ;; |
| 4530 | esac |
| 4531 | ;; |
| 4532 | tandem*) |
| 4533 | case $cc_basename in |
| 4534 | NCC*) |
| 4535 | # NonStop-UX NCC 3.20 |
| 4536 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
| 4537 | ;; |
| 4538 | *) |
| 4539 | ;; |
| 4540 | esac |
| 4541 | ;; |
| 4542 | vxworks*) |
| 4543 | ;; |
| 4544 | *) |
| 4545 | _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no |
| 4546 | ;; |
| 4547 | esac |
| 4548 | fi |
| 4549 | ], |
| 4550 | [ |
| 4551 | if test yes = "$GCC"; then |
| 4552 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 4553 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' |
| 4554 |
| 4555 | case $host_os in |
| 4556 | aix*) |
| 4557 | # All AIX code is PIC. |
| 4558 | if test ia64 = "$host_cpu"; then |
| 4559 | # AIX 5 now supports IA64 processor |
| 4560 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 4561 | fi |
| 4562 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
| 4563 | ;; |
| 4564 |
| 4565 | amigaos*) |
| 4566 | case $host_cpu in |
| 4567 | powerpc) |
| 4568 | # see comment about AmigaOS4 .so support |
| 4569 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
| 4570 | ;; |
| 4571 | m68k) |
| 4572 | # FIXME: we need at least 68020 code to build shared libraries, but |
| 4573 | # adding the '-m68020' flag to GCC prevents building anything better, |
| 4574 | # like '-m68040'. |
| 4575 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' |
| 4576 | ;; |
| 4577 | esac |
| 4578 | ;; |
| 4579 |
| 4580 | beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) |
| 4581 | # PIC is the default for these OSes. |
| 4582 | ;; |
| 4583 |
| 4584 | mingw* | cygwin* | pw32* | os2* | cegcc*) |
| 4585 | # This hack is so that the source file can tell whether it is being |
| 4586 | # built for inclusion in a dll (and should export symbols for example). |
| 4587 | # Although the cygwin gcc ignores -fPIC, still need this for old-style |
| 4588 | # (--disable-auto-import) libraries |
| 4589 | m4_if([$1], [GCJ], [], |
| 4590 | [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) |
| 4591 | case $host_os in |
| 4592 | os2*) |
| 4593 | _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' |
| 4594 | ;; |
| 4595 | esac |
| 4596 | ;; |
| 4597 |
| 4598 | darwin* | rhapsody*) |
| 4599 | # PIC is the default on this platform |
| 4600 | # Common symbols not allowed in MH_DYLIB files |
| 4601 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' |
| 4602 | ;; |
| 4603 |
| 4604 | haiku*) |
| 4605 | # PIC is the default for Haiku. |
| 4606 | # The "-static" flag exists, but is broken. |
| 4607 | _LT_TAGVAR(lt_prog_compiler_static, $1)= |
| 4608 | ;; |
| 4609 |
| 4610 | hpux*) |
| 4611 | # PIC is the default for 64-bit PA HP-UX, but not for 32-bit |
| 4612 | # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag |
| 4613 | # sets the default TLS model and affects inlining. |
| 4614 | case $host_cpu in |
| 4615 | hppa*64*) |
| 4616 | # +Z the default |
| 4617 | ;; |
| 4618 | *) |
| 4619 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
| 4620 | ;; |
| 4621 | esac |
| 4622 | ;; |
| 4623 |
| 4624 | interix[[3-9]]*) |
| 4625 | # Interix 3.x gcc -fpic/-fPIC options generate broken code. |
| 4626 | # Instead, we relocate shared libraries at runtime. |
| 4627 | ;; |
| 4628 |
| 4629 | msdosdjgpp*) |
| 4630 | # Just because we use GCC doesn't mean we suddenly get shared libraries |
| 4631 | # on systems that don't support them. |
| 4632 | _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no |
| 4633 | enable_shared=no |
| 4634 | ;; |
| 4635 |
| 4636 | *nto* | *qnx*) |
| 4637 | # QNX uses GNU C++, but need to define -shared option too, otherwise |
| 4638 | # it will coredump. |
| 4639 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' |
| 4640 | ;; |
| 4641 |
| 4642 | sysv4*MP*) |
| 4643 | if test -d /usr/nec; then |
| 4644 | _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic |
| 4645 | fi |
| 4646 | ;; |
| 4647 |
| 4648 | *) |
| 4649 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
| 4650 | ;; |
| 4651 | esac |
| 4652 |
| 4653 | case $cc_basename in |
| 4654 | nvcc*) # Cuda Compiler Driver 2.2 |
| 4655 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' |
| 4656 | if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then |
| 4657 | _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" |
| 4658 | fi |
| 4659 | ;; |
| 4660 | esac |
| 4661 | else |
| 4662 | # PORTME Check for flag to pass linker flags through the system compiler. |
| 4663 | case $host_os in |
| 4664 | aix*) |
| 4665 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 4666 | if test ia64 = "$host_cpu"; then |
| 4667 | # AIX 5 now supports IA64 processor |
| 4668 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 4669 | else |
| 4670 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' |
| 4671 | fi |
| 4672 | ;; |
| 4673 |
| 4674 | darwin* | rhapsody*) |
| 4675 | # PIC is the default on this platform |
| 4676 | # Common symbols not allowed in MH_DYLIB files |
| 4677 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' |
| 4678 | case $cc_basename in |
| 4679 | nagfor*) |
| 4680 | # NAG Fortran compiler |
| 4681 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' |
| 4682 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' |
| 4683 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 4684 | ;; |
| 4685 | esac |
| 4686 | ;; |
| 4687 |
| 4688 | mingw* | cygwin* | pw32* | os2* | cegcc*) |
| 4689 | # This hack is so that the source file can tell whether it is being |
| 4690 | # built for inclusion in a dll (and should export symbols for example). |
| 4691 | m4_if([$1], [GCJ], [], |
| 4692 | [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) |
| 4693 | case $host_os in |
| 4694 | os2*) |
| 4695 | _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' |
| 4696 | ;; |
| 4697 | esac |
| 4698 | ;; |
| 4699 |
| 4700 | hpux9* | hpux10* | hpux11*) |
| 4701 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 4702 | # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but |
| 4703 | # not for PA HP-UX. |
| 4704 | case $host_cpu in |
| 4705 | hppa*64*|ia64*) |
| 4706 | # +Z the default |
| 4707 | ;; |
| 4708 | *) |
| 4709 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' |
| 4710 | ;; |
| 4711 | esac |
| 4712 | # Is there a better lt_prog_compiler_static that works with the bundled CC? |
| 4713 | _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' |
| 4714 | ;; |
| 4715 |
| 4716 | irix5* | irix6* | nonstopux*) |
| 4717 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 4718 | # PIC (with -KPIC) is the default. |
| 4719 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
| 4720 | ;; |
| 4721 |
| 4722 | linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) |
| 4723 | case $cc_basename in |
| 4724 | # old Intel for x86_64, which still supported -KPIC. |
| 4725 | ecc*) |
| 4726 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 4727 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
| 4728 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' |
| 4729 | ;; |
| 4730 | # icc used to be incompatible with GCC. |
| 4731 | # ICC 10 doesn't accept -KPIC any more. |
| 4732 | icc* | ifort*) |
| 4733 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 4734 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
| 4735 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' |
| 4736 | ;; |
| 4737 | # Lahey Fortran 8.1. |
| 4738 | lf95*) |
| 4739 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 4740 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' |
| 4741 | _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' |
| 4742 | ;; |
| 4743 | nagfor*) |
| 4744 | # NAG Fortran compiler |
| 4745 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' |
| 4746 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' |
| 4747 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 4748 | ;; |
| 4749 | tcc*) |
| 4750 | # Fabrice Bellard et al's Tiny C Compiler |
| 4751 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 4752 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
| 4753 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' |
| 4754 | ;; |
| 4755 | pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) |
| 4756 | # Portland Group compilers (*not* the Pentium gcc compiler, |
| 4757 | # which looks to be a dead project) |
| 4758 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 4759 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' |
| 4760 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 4761 | ;; |
| 4762 | ccc*) |
| 4763 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 4764 | # All Alpha code is PIC. |
| 4765 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
| 4766 | ;; |
| 4767 | xl* | bgxl* | bgf* | mpixl*) |
| 4768 | # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene |
| 4769 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 4770 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' |
| 4771 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' |
| 4772 | ;; |
| 4773 | *) |
| 4774 | case `$CC -V 2>&1 | sed 5q` in |
| 4775 | *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) |
| 4776 | # Sun Fortran 8.3 passes all unrecognized flags to the linker |
| 4777 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
| 4778 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 4779 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='' |
| 4780 | ;; |
| 4781 | *Sun\ F* | *Sun*Fortran*) |
| 4782 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
| 4783 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 4784 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' |
| 4785 | ;; |
| 4786 | *Sun\ C*) |
| 4787 | # Sun C 5.9 |
| 4788 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
| 4789 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 4790 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 4791 | ;; |
| 4792 | *Intel*\ [[CF]]*Compiler*) |
| 4793 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 4794 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' |
| 4795 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' |
| 4796 | ;; |
| 4797 | *Portland\ Group*) |
| 4798 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 4799 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' |
| 4800 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 4801 | ;; |
| 4802 | esac |
| 4803 | ;; |
| 4804 | esac |
| 4805 | ;; |
| 4806 |
| 4807 | newsos6) |
| 4808 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
| 4809 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 4810 | ;; |
| 4811 |
| 4812 | *nto* | *qnx*) |
| 4813 | # QNX uses GNU C++, but need to define -shared option too, otherwise |
| 4814 | # it will coredump. |
| 4815 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' |
| 4816 | ;; |
| 4817 |
| 4818 | osf3* | osf4* | osf5*) |
| 4819 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 4820 | # All OSF/1 code is PIC. |
| 4821 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
| 4822 | ;; |
| 4823 |
| 4824 | rdos*) |
| 4825 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' |
| 4826 | ;; |
| 4827 |
| 4828 | solaris*) |
| 4829 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
| 4830 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 4831 | case $cc_basename in |
| 4832 | f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) |
| 4833 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; |
| 4834 | *) |
| 4835 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; |
| 4836 | esac |
| 4837 | ;; |
| 4838 |
| 4839 | sunos4*) |
| 4840 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' |
| 4841 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' |
| 4842 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 4843 | ;; |
| 4844 |
| 4845 | sysv4 | sysv4.2uw2* | sysv4.3*) |
| 4846 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 4847 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
| 4848 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 4849 | ;; |
| 4850 |
| 4851 | sysv4*MP*) |
| 4852 | if test -d /usr/nec; then |
| 4853 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' |
| 4854 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 4855 | fi |
| 4856 | ;; |
| 4857 |
| 4858 | sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) |
| 4859 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 4860 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' |
| 4861 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 4862 | ;; |
| 4863 |
| 4864 | unicos*) |
| 4865 | _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' |
| 4866 | _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no |
| 4867 | ;; |
| 4868 |
| 4869 | uts4*) |
| 4870 | _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' |
| 4871 | _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' |
| 4872 | ;; |
| 4873 |
| 4874 | *) |
| 4875 | _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no |
| 4876 | ;; |
| 4877 | esac |
| 4878 | fi |
| 4879 | ]) |
| 4880 | case $host_os in |
| 4881 | # For platforms that do not support PIC, -DPIC is meaningless: |
| 4882 | *djgpp*) |
| 4883 | _LT_TAGVAR(lt_prog_compiler_pic, $1)= |
| 4884 | ;; |
| 4885 | *) |
| 4886 | _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" |
| 4887 | ;; |
| 4888 | esac |
| 4889 |
| 4890 | AC_CACHE_CHECK([for $compiler option to produce PIC], |
| 4891 | [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], |
| 4892 | [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) |
| 4893 | _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) |
| 4894 |
| 4895 | # |
| 4896 | # Check to make sure the PIC flag actually works. |
| 4897 | # |
| 4898 | if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then |
| 4899 | _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], |
| 4900 | [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], |
| 4901 | [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], |
| 4902 | [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in |
| 4903 | "" | " "*) ;; |
| 4904 | *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; |
| 4905 | esac], |
| 4906 | [_LT_TAGVAR(lt_prog_compiler_pic, $1)= |
| 4907 | _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) |
| 4908 | fi |
| 4909 | _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], |
| 4910 | [Additional compiler flags for building library objects]) |
| 4911 |
| 4912 | _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], |
| 4913 | [How to pass a linker flag through the compiler]) |
| 4914 | # |
| 4915 | # Check to make sure the static flag actually works. |
| 4916 | # |
| 4917 | wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" |
| 4918 | _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], |
| 4919 | _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), |
| 4920 | $lt_tmp_static_flag, |
| 4921 | [], |
| 4922 | [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) |
| 4923 | _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], |
| 4924 | [Compiler flag to prevent dynamic linking]) |
| 4925 | ])# _LT_COMPILER_PIC |
| 4926 |
| 4927 |
| 4928 | # _LT_LINKER_SHLIBS([TAGNAME]) |
| 4929 | # ---------------------------- |
| 4930 | # See if the linker supports building shared libraries. |
| 4931 | m4_defun([_LT_LINKER_SHLIBS], |
| 4932 | [AC_REQUIRE([LT_PATH_LD])dnl |
| 4933 | AC_REQUIRE([LT_PATH_NM])dnl |
| 4934 | m4_require([_LT_PATH_MANIFEST_TOOL])dnl |
| 4935 | m4_require([_LT_FILEUTILS_DEFAULTS])dnl |
| 4936 | m4_require([_LT_DECL_EGREP])dnl |
| 4937 | m4_require([_LT_DECL_SED])dnl |
| 4938 | m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl |
| 4939 | m4_require([_LT_TAG_COMPILER])dnl |
| 4940 | AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) |
| 4941 | m4_if([$1], [CXX], [ |
| 4942 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' |
| 4943 | _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] |
| 4944 | case $host_os in |
| 4945 | aix[[4-9]]*) |
| 4946 | # If we're using GNU nm, then we don't want the "-C" option. |
| 4947 | # -C means demangle to GNU nm, but means don't demangle to AIX nm. |
| 4948 | # Without the "-l" option, or with the "-B" option, AIX nm treats |
| 4949 | # weak defined symbols like other global defined symbols, whereas |
| 4950 | # GNU nm marks them as "W". |
| 4951 | # While the 'weak' keyword is ignored in the Export File, we need |
| 4952 | # it in the Import File for the 'aix-soname' feature, so we have |
| 4953 | # to replace the "-B" option with "-P" for AIX nm. |
| 4954 | if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then |
| 4955 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' |
| 4956 | else |
| 4957 | _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' |
| 4958 | fi |
| 4959 | ;; |
| 4960 | pw32*) |
| 4961 | _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds |
| 4962 | ;; |
| 4963 | cygwin* | mingw* | cegcc*) |
| 4964 | case $cc_basename in |
| 4965 | cl* | icl*) |
| 4966 | _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' |
| 4967 | ;; |
| 4968 | *) |
| 4969 | _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' |
| 4970 | _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] |
| 4971 | ;; |
| 4972 | esac |
| 4973 | ;; |
| 4974 | *) |
| 4975 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' |
| 4976 | ;; |
| 4977 | esac |
| 4978 | ], [ |
| 4979 | runpath_var= |
| 4980 | _LT_TAGVAR(allow_undefined_flag, $1)= |
| 4981 | _LT_TAGVAR(always_export_symbols, $1)=no |
| 4982 | _LT_TAGVAR(archive_cmds, $1)= |
| 4983 | _LT_TAGVAR(archive_expsym_cmds, $1)= |
| 4984 | _LT_TAGVAR(compiler_needs_object, $1)=no |
| 4985 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no |
| 4986 | _LT_TAGVAR(export_dynamic_flag_spec, $1)= |
| 4987 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' |
| 4988 | _LT_TAGVAR(hardcode_automatic, $1)=no |
| 4989 | _LT_TAGVAR(hardcode_direct, $1)=no |
| 4990 | _LT_TAGVAR(hardcode_direct_absolute, $1)=no |
| 4991 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= |
| 4992 | _LT_TAGVAR(hardcode_libdir_separator, $1)= |
| 4993 | _LT_TAGVAR(hardcode_minus_L, $1)=no |
| 4994 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported |
| 4995 | _LT_TAGVAR(inherit_rpath, $1)=no |
| 4996 | _LT_TAGVAR(link_all_deplibs, $1)=unknown |
| 4997 | _LT_TAGVAR(module_cmds, $1)= |
| 4998 | _LT_TAGVAR(module_expsym_cmds, $1)= |
| 4999 | _LT_TAGVAR(old_archive_from_new_cmds, $1)= |
| 5000 | _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= |
| 5001 | _LT_TAGVAR(thread_safe_flag_spec, $1)= |
| 5002 | _LT_TAGVAR(whole_archive_flag_spec, $1)= |
| 5003 | # include_expsyms should be a list of space-separated symbols to be *always* |
| 5004 | # included in the symbol list |
| 5005 | _LT_TAGVAR(include_expsyms, $1)= |
| 5006 | # exclude_expsyms can be an extended regexp of symbols to exclude |
| 5007 | # it will be wrapped by ' (' and ')$', so one must not match beginning or |
| 5008 | # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', |
| 5009 | # as well as any symbol that contains 'd'. |
| 5010 | _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] |
| 5011 | # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out |
| 5012 | # platforms (ab)use it in PIC code, but their linkers get confused if |
| 5013 | # the symbol is explicitly referenced. Since portable code cannot |
| 5014 | # rely on this symbol name, it's probably fine to never include it in |
| 5015 | # preloaded symbol tables. |
| 5016 | # Exclude shared library initialization/finalization symbols. |
| 5017 | dnl Note also adjust exclude_expsyms for C++ above. |
| 5018 | extract_expsyms_cmds= |
| 5019 |
| 5020 | case $host_os in |
| 5021 | cygwin* | mingw* | pw32* | cegcc*) |
| 5022 | # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time |
| 5023 | # When not using gcc, we currently assume that we are using |
| 5024 | # Microsoft Visual C++ or Intel C++ Compiler. |
| 5025 | if test yes != "$GCC"; then |
| 5026 | with_gnu_ld=no |
| 5027 | fi |
| 5028 | ;; |
| 5029 | interix*) |
| 5030 | # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) |
| 5031 | with_gnu_ld=yes |
| 5032 | ;; |
| 5033 | openbsd* | bitrig*) |
| 5034 | with_gnu_ld=no |
| 5035 | ;; |
| 5036 | esac |
| 5037 |
| 5038 | _LT_TAGVAR(ld_shlibs, $1)=yes |
| 5039 |
| 5040 | # On some targets, GNU ld is compatible enough with the native linker |
| 5041 | # that we're better off using the native interface for both. |
| 5042 | lt_use_gnu_ld_interface=no |
| 5043 | if test yes = "$with_gnu_ld"; then |
| 5044 | case $host_os in |
| 5045 | aix*) |
| 5046 | # The AIX port of GNU ld has always aspired to compatibility |
| 5047 | # with the native linker. However, as the warning in the GNU ld |
| 5048 | # block says, versions before 2.19.5* couldn't really create working |
| 5049 | # shared libraries, regardless of the interface used. |
| 5050 | case `$LD -v 2>&1` in |
| 5051 | *\ \(GNU\ Binutils\)\ 2.19.5*) ;; |
| 5052 | *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; |
| 5053 | *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; |
| 5054 | *) |
| 5055 | lt_use_gnu_ld_interface=yes |
| 5056 | ;; |
| 5057 | esac |
| 5058 | ;; |
| 5059 | *) |
| 5060 | lt_use_gnu_ld_interface=yes |
| 5061 | ;; |
| 5062 | esac |
| 5063 | fi |
| 5064 |
| 5065 | if test yes = "$lt_use_gnu_ld_interface"; then |
| 5066 | # If archive_cmds runs LD, not CC, wlarc should be empty |
| 5067 | wlarc='$wl' |
| 5068 |
| 5069 | # Set some defaults for GNU ld with shared library support. These |
| 5070 | # are reset later if shared libraries are not supported. Putting them |
| 5071 | # here allows them to be overridden if necessary. |
| 5072 | runpath_var=LD_RUN_PATH |
| 5073 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' |
| 5074 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' |
| 5075 | # ancient GNU ld didn't support --whole-archive et. al. |
| 5076 | if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then |
| 5077 | _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' |
| 5078 | else |
| 5079 | _LT_TAGVAR(whole_archive_flag_spec, $1)= |
| 5080 | fi |
| 5081 | supports_anon_versioning=no |
| 5082 | case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in |
| 5083 | *GNU\ gold*) supports_anon_versioning=yes ;; |
| 5084 | *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 |
| 5085 | *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... |
| 5086 | *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... |
| 5087 | *\ 2.11.*) ;; # other 2.11 versions |
| 5088 | *) supports_anon_versioning=yes ;; |
| 5089 | esac |
| 5090 |
| 5091 | # See if GNU ld supports shared libraries. |
| 5092 | case $host_os in |
| 5093 | aix[[3-9]]*) |
| 5094 | # On AIX/PPC, the GNU linker is very broken |
| 5095 | if test ia64 != "$host_cpu"; then |
| 5096 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 5097 | cat <<_LT_EOF 1>&2 |
| 5098 |
| 5099 | *** Warning: the GNU linker, at least up to release 2.19, is reported |
| 5100 | *** to be unable to reliably create shared libraries on AIX. |
| 5101 | *** Therefore, libtool is disabling shared libraries support. If you |
| 5102 | *** really care for shared libraries, you may want to install binutils |
| 5103 | *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. |
| 5104 | *** You will then need to restart the configuration process. |
| 5105 |
| 5106 | _LT_EOF |
| 5107 | fi |
| 5108 | ;; |
| 5109 |
| 5110 | amigaos*) |
| 5111 | case $host_cpu in |
| 5112 | powerpc) |
| 5113 | # see comment about AmigaOS4 .so support |
| 5114 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' |
| 5115 | _LT_TAGVAR(archive_expsym_cmds, $1)='' |
| 5116 | ;; |
| 5117 | m68k) |
| 5118 | _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)' |
| 5119 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 5120 | _LT_TAGVAR(hardcode_minus_L, $1)=yes |
| 5121 | ;; |
| 5122 | esac |
| 5123 | ;; |
| 5124 |
| 5125 | beos*) |
| 5126 | if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then |
| 5127 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported |
| 5128 | # Joseph Beckenbach <jrb3@best.com> says some releases of gcc |
| 5129 | # support --undefined. This deserves some investigation. FIXME |
| 5130 | _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' |
| 5131 | else |
| 5132 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 5133 | fi |
| 5134 | ;; |
| 5135 |
| 5136 | cygwin* | mingw* | pw32* | cegcc*) |
| 5137 | # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, |
| 5138 | # as there is no search path for DLLs. |
| 5139 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 5140 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' |
| 5141 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported |
| 5142 | _LT_TAGVAR(always_export_symbols, $1)=no |
| 5143 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes |
| 5144 | _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' |
| 5145 | _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] |
| 5146 |
| 5147 | if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then |
| 5148 | _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' |
| 5149 | # If the export-symbols file already is a .def file, use it as |
| 5150 | # is; otherwise, prepend EXPORTS... |
| 5151 | _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then |
| 5152 | cp $export_symbols $output_objdir/$soname.def; |
| 5153 | else |
| 5154 | echo EXPORTS > $output_objdir/$soname.def; |
| 5155 | cat $export_symbols >> $output_objdir/$soname.def; |
| 5156 | fi~ |
| 5157 | $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' |
| 5158 | else |
| 5159 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 5160 | fi |
| 5161 | ;; |
| 5162 |
| 5163 | haiku*) |
| 5164 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' |
| 5165 | _LT_TAGVAR(link_all_deplibs, $1)=yes |
| 5166 | ;; |
| 5167 |
| 5168 | os2*) |
| 5169 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 5170 | _LT_TAGVAR(hardcode_minus_L, $1)=yes |
| 5171 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported |
| 5172 | shrext_cmds=.dll |
| 5173 | _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ |
| 5174 | $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ |
| 5175 | $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ |
| 5176 | $ECHO EXPORTS >> $output_objdir/$libname.def~ |
| 5177 | emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ |
| 5178 | $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ |
| 5179 | emximp -o $lib $output_objdir/$libname.def' |
| 5180 | _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ |
| 5181 | $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ |
| 5182 | $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ |
| 5183 | $ECHO EXPORTS >> $output_objdir/$libname.def~ |
| 5184 | prefix_cmds="$SED"~ |
| 5185 | if test EXPORTS = "`$SED 1q $export_symbols`"; then |
| 5186 | prefix_cmds="$prefix_cmds -e 1d"; |
| 5187 | fi~ |
| 5188 | prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ |
| 5189 | cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ |
| 5190 | $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ |
| 5191 | emximp -o $lib $output_objdir/$libname.def' |
| 5192 | _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' |
| 5193 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes |
| 5194 | _LT_TAGVAR(file_list_spec, $1)='@' |
| 5195 | ;; |
| 5196 |
| 5197 | interix[[3-9]]*) |
| 5198 | _LT_TAGVAR(hardcode_direct, $1)=no |
| 5199 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 5200 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' |
| 5201 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' |
| 5202 | # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. |
| 5203 | # Instead, shared libraries are loaded at an image base (0x10000000 by |
| 5204 | # default) and relocated if they conflict, which is a slow very memory |
| 5205 | # consuming and fragmenting process. To avoid this, we pick a random, |
| 5206 | # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link |
| 5207 | # time. Moving up from 0x10000000 also allows more sbrk(2) space. |
| 5208 | _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' |
| 5209 | _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' |
| 5210 | ;; |
| 5211 |
| 5212 | gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) |
| 5213 | tmp_diet=no |
| 5214 | if test linux-dietlibc = "$host_os"; then |
| 5215 | case $cc_basename in |
| 5216 | diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) |
| 5217 | esac |
| 5218 | fi |
| 5219 | if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ |
| 5220 | && test no = "$tmp_diet" |
| 5221 | then |
| 5222 | tmp_addflag=' $pic_flag' |
| 5223 | tmp_sharedflag='-shared' |
| 5224 | case $cc_basename,$host_cpu in |
| 5225 | pgcc*) # Portland Group C compiler |
| 5226 | _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' |
| 5227 | tmp_addflag=' $pic_flag' |
| 5228 | ;; |
| 5229 | pgf77* | pgf90* | pgf95* | pgfortran*) |
| 5230 | # Portland Group f77 and f90 compilers |
| 5231 | _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' |
| 5232 | tmp_addflag=' $pic_flag -Mnomain' ;; |
| 5233 | ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 |
| 5234 | tmp_addflag=' -i_dynamic' ;; |
| 5235 | efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 |
| 5236 | tmp_addflag=' -i_dynamic -nofor_main' ;; |
| 5237 | ifc* | ifort*) # Intel Fortran compiler |
| 5238 | tmp_addflag=' -nofor_main' ;; |
| 5239 | lf95*) # Lahey Fortran 8.1 |
| 5240 | _LT_TAGVAR(whole_archive_flag_spec, $1)= |
| 5241 | tmp_sharedflag='--shared' ;; |
| 5242 | nagfor*) # NAGFOR 5.3 |
| 5243 | tmp_sharedflag='-Wl,-shared' ;; |
| 5244 | xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) |
| 5245 | tmp_sharedflag='-qmkshrobj' |
| 5246 | tmp_addflag= ;; |
| 5247 | nvcc*) # Cuda Compiler Driver 2.2 |
| 5248 | _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' |
| 5249 | _LT_TAGVAR(compiler_needs_object, $1)=yes |
| 5250 | ;; |
| 5251 | esac |
| 5252 | case `$CC -V 2>&1 | sed 5q` in |
| 5253 | *Sun\ C*) # Sun C 5.9 |
| 5254 | _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' |
| 5255 | _LT_TAGVAR(compiler_needs_object, $1)=yes |
| 5256 | tmp_sharedflag='-G' ;; |
| 5257 | *Sun\ F*) # Sun Fortran 8.3 |
| 5258 | tmp_sharedflag='-G' ;; |
| 5259 | esac |
| 5260 | _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' |
| 5261 |
| 5262 | if test yes = "$supports_anon_versioning"; then |
| 5263 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ |
| 5264 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ |
| 5265 | echo "local: *; };" >> $output_objdir/$libname.ver~ |
| 5266 | $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' |
| 5267 | fi |
| 5268 |
| 5269 | case $cc_basename in |
| 5270 | tcc*) |
| 5271 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' |
| 5272 | ;; |
| 5273 | xlf* | bgf* | bgxlf* | mpixlf*) |
| 5274 | # IBM XL Fortran 10.1 on PPC cannot create shared libs itself |
| 5275 | _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' |
| 5276 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' |
| 5277 | _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' |
| 5278 | if test yes = "$supports_anon_versioning"; then |
| 5279 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ |
| 5280 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ |
| 5281 | echo "local: *; };" >> $output_objdir/$libname.ver~ |
| 5282 | $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' |
| 5283 | fi |
| 5284 | ;; |
| 5285 | esac |
| 5286 | else |
| 5287 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 5288 | fi |
| 5289 | ;; |
| 5290 |
| 5291 | netbsd*) |
| 5292 | if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then |
| 5293 | _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' |
| 5294 | wlarc= |
| 5295 | else |
| 5296 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' |
| 5297 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' |
| 5298 | fi |
| 5299 | ;; |
| 5300 |
| 5301 | solaris*) |
| 5302 | if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then |
| 5303 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 5304 | cat <<_LT_EOF 1>&2 |
| 5305 |
| 5306 | *** Warning: The releases 2.8.* of the GNU linker cannot reliably |
| 5307 | *** create shared libraries on Solaris systems. Therefore, libtool |
| 5308 | *** is disabling shared libraries support. We urge you to upgrade GNU |
| 5309 | *** binutils to release 2.9.1 or newer. Another option is to modify |
| 5310 | *** your PATH or compiler configuration so that the native linker is |
| 5311 | *** used, and then restart. |
| 5312 |
| 5313 | _LT_EOF |
| 5314 | elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then |
| 5315 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' |
| 5316 | _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' |
| 5317 | else |
| 5318 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 5319 | fi |
| 5320 | ;; |
| 5321 |
| 5322 | sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) |
| 5323 | case `$LD -v 2>&1` in |
| 5324 | *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) |
| 5325 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 5326 | cat <<_LT_EOF 1>&2 |
| 5327 |
| 5328 | *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot |
| 5329 | *** reliably create shared libraries on SCO systems. Therefore, libtool |
| 5330 | *** is disabling shared libraries support. We urge you to upgrade GNU |
| 5331 | *** binutils to release 2.16.91.0.3 or newer. Another option is to modify |
| 5332 | *** your PATH or compiler configuration so that the native linker is |
| 5333 | *** used, and then restart. |
| 5334 |
| 5335 | _LT_EOF |
| 5336 | ;; |
| 5337 | *) |
| 5338 | # For security reasons, it is highly recommended that you always |
| 5339 | # use absolute paths for naming shared libraries, and exclude the |
| 5340 | # DT_RUNPATH tag from executables and libraries. But doing so |
| 5341 | # requires that you compile everything twice, which is a pain. |
| 5342 | if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then |
| 5343 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' |
| 5344 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' |
| 5345 | _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' |
| 5346 | else |
| 5347 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 5348 | fi |
| 5349 | ;; |
| 5350 | esac |
| 5351 | ;; |
| 5352 |
| 5353 | sunos4*) |
| 5354 | _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
| 5355 | wlarc= |
| 5356 | _LT_TAGVAR(hardcode_direct, $1)=yes |
| 5357 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 5358 | ;; |
| 5359 |
| 5360 | *) |
| 5361 | if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then |
| 5362 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' |
| 5363 | _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' |
| 5364 | else |
| 5365 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 5366 | fi |
| 5367 | ;; |
| 5368 | esac |
| 5369 |
| 5370 | if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then |
| 5371 | runpath_var= |
| 5372 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= |
| 5373 | _LT_TAGVAR(export_dynamic_flag_spec, $1)= |
| 5374 | _LT_TAGVAR(whole_archive_flag_spec, $1)= |
| 5375 | fi |
| 5376 | else |
| 5377 | # PORTME fill in a description of your system's linker (not GNU ld) |
| 5378 | case $host_os in |
| 5379 | aix3*) |
| 5380 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported |
| 5381 | _LT_TAGVAR(always_export_symbols, $1)=yes |
| 5382 | _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' |
| 5383 | # Note: this linker hardcodes the directories in LIBPATH if there |
| 5384 | # are no directories specified by -L. |
| 5385 | _LT_TAGVAR(hardcode_minus_L, $1)=yes |
| 5386 | if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then |
| 5387 | # Neither direct hardcoding nor static linking is supported with a |
| 5388 | # broken collect2. |
| 5389 | _LT_TAGVAR(hardcode_direct, $1)=unsupported |
| 5390 | fi |
| 5391 | ;; |
| 5392 |
| 5393 | aix[[4-9]]*) |
| 5394 | if test ia64 = "$host_cpu"; then |
| 5395 | # On IA64, the linker does run time linking by default, so we don't |
| 5396 | # have to do anything special. |
| 5397 | aix_use_runtimelinking=no |
| 5398 | exp_sym_flag='-Bexport' |
| 5399 | no_entry_flag= |
| 5400 | else |
| 5401 | # If we're using GNU nm, then we don't want the "-C" option. |
| 5402 | # -C means demangle to GNU nm, but means don't demangle to AIX nm. |
| 5403 | # Without the "-l" option, or with the "-B" option, AIX nm treats |
| 5404 | # weak defined symbols like other global defined symbols, whereas |
| 5405 | # GNU nm marks them as "W". |
| 5406 | # While the 'weak' keyword is ignored in the Export File, we need |
| 5407 | # it in the Import File for the 'aix-soname' feature, so we have |
| 5408 | # to replace the "-B" option with "-P" for AIX nm. |
| 5409 | if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then |
| 5410 | _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' |
| 5411 | else |
| 5412 | _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' |
| 5413 | fi |
| 5414 | aix_use_runtimelinking=no |
| 5415 |
| 5416 | # Test if we are trying to use run time linking or normal |
| 5417 | # AIX style linking. If -brtl is somewhere in LDFLAGS, we |
| 5418 | # have runtime linking enabled, and use it for executables. |
| 5419 | # For shared libraries, we enable/disable runtime linking |
| 5420 | # depending on the kind of the shared library created - |
| 5421 | # when "with_aix_soname,aix_use_runtimelinking" is: |
| 5422 | # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables |
| 5423 | # "aix,yes" lib.so shared, rtl:yes, for executables |
| 5424 | # lib.a static archive |
| 5425 | # "both,no" lib.so.V(shr.o) shared, rtl:yes |
| 5426 | # lib.a(lib.so.V) shared, rtl:no, for executables |
| 5427 | # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables |
| 5428 | # lib.a(lib.so.V) shared, rtl:no |
| 5429 | # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables |
| 5430 | # lib.a static archive |
| 5431 | case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) |
| 5432 | for ld_flag in $LDFLAGS; do |
| 5433 | if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then |
| 5434 | aix_use_runtimelinking=yes |
| 5435 | break |
| 5436 | fi |
| 5437 | done |
| 5438 | if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then |
| 5439 | # With aix-soname=svr4, we create the lib.so.V shared archives only, |
| 5440 | # so we don't have lib.a shared libs to link our executables. |
| 5441 | # We have to force runtime linking in this case. |
| 5442 | aix_use_runtimelinking=yes |
| 5443 | LDFLAGS="$LDFLAGS -Wl,-brtl" |
| 5444 | fi |
| 5445 | ;; |
| 5446 | esac |
| 5447 |
| 5448 | exp_sym_flag='-bexport' |
| 5449 | no_entry_flag='-bnoentry' |
| 5450 | fi |
| 5451 |
| 5452 | # When large executables or shared objects are built, AIX ld can |
| 5453 | # have problems creating the table of contents. If linking a library |
| 5454 | # or program results in "error TOC overflow" add -mminimal-toc to |
| 5455 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not |
| 5456 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. |
| 5457 |
| 5458 | _LT_TAGVAR(archive_cmds, $1)='' |
| 5459 | _LT_TAGVAR(hardcode_direct, $1)=yes |
| 5460 | _LT_TAGVAR(hardcode_direct_absolute, $1)=yes |
| 5461 | _LT_TAGVAR(hardcode_libdir_separator, $1)=':' |
| 5462 | _LT_TAGVAR(link_all_deplibs, $1)=yes |
| 5463 | _LT_TAGVAR(file_list_spec, $1)='$wl-f,' |
| 5464 | case $with_aix_soname,$aix_use_runtimelinking in |
| 5465 | aix,*) ;; # traditional, no import file |
| 5466 | svr4,* | *,yes) # use import file |
| 5467 | # The Import File defines what to hardcode. |
| 5468 | _LT_TAGVAR(hardcode_direct, $1)=no |
| 5469 | _LT_TAGVAR(hardcode_direct_absolute, $1)=no |
| 5470 | ;; |
| 5471 | esac |
| 5472 |
| 5473 | if test yes = "$GCC"; then |
| 5474 | case $host_os in aix4.[[012]]|aix4.[[012]].*) |
| 5475 | # We only want to do this on AIX 4.2 and lower, the check |
| 5476 | # below for broken collect2 doesn't work under 4.3+ |
| 5477 | collect2name=`$CC -print-prog-name=collect2` |
| 5478 | if test -f "$collect2name" && |
| 5479 | strings "$collect2name" | $GREP resolve_lib_name >/dev/null |
| 5480 | then |
| 5481 | # We have reworked collect2 |
| 5482 | : |
| 5483 | else |
| 5484 | # We have old collect2 |
| 5485 | _LT_TAGVAR(hardcode_direct, $1)=unsupported |
| 5486 | # It fails to find uninstalled libraries when the uninstalled |
| 5487 | # path is not listed in the libpath. Setting hardcode_minus_L |
| 5488 | # to unsupported forces relinking |
| 5489 | _LT_TAGVAR(hardcode_minus_L, $1)=yes |
| 5490 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 5491 | _LT_TAGVAR(hardcode_libdir_separator, $1)= |
| 5492 | fi |
| 5493 | ;; |
| 5494 | esac |
| 5495 | shared_flag='-shared' |
| 5496 | if test yes = "$aix_use_runtimelinking"; then |
| 5497 | shared_flag="$shared_flag "'$wl-G' |
| 5498 | fi |
| 5499 | # Need to ensure runtime linking is disabled for the traditional |
| 5500 | # shared library, or the linker may eventually find shared libraries |
| 5501 | # /with/ Import File - we do not want to mix them. |
| 5502 | shared_flag_aix='-shared' |
| 5503 | shared_flag_svr4='-shared $wl-G' |
| 5504 | else |
| 5505 | # not using gcc |
| 5506 | if test ia64 = "$host_cpu"; then |
| 5507 | # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release |
| 5508 | # chokes on -Wl,-G. The following line is correct: |
| 5509 | shared_flag='-G' |
| 5510 | else |
| 5511 | if test yes = "$aix_use_runtimelinking"; then |
| 5512 | shared_flag='$wl-G' |
| 5513 | else |
| 5514 | shared_flag='$wl-bM:SRE' |
| 5515 | fi |
| 5516 | shared_flag_aix='$wl-bM:SRE' |
| 5517 | shared_flag_svr4='$wl-G' |
| 5518 | fi |
| 5519 | fi |
| 5520 |
| 5521 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' |
| 5522 | # It seems that -bexpall does not export symbols beginning with |
| 5523 | # underscore (_), so it is better to generate a list of symbols to export. |
| 5524 | _LT_TAGVAR(always_export_symbols, $1)=yes |
| 5525 | if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then |
| 5526 | # Warning - without using the other runtime loading flags (-brtl), |
| 5527 | # -berok will link without error, but may produce a broken library. |
| 5528 | _LT_TAGVAR(allow_undefined_flag, $1)='-berok' |
| 5529 | # Determine the default libpath from the value encoded in an |
| 5530 | # empty executable. |
| 5531 | _LT_SYS_MODULE_PATH_AIX([$1]) |
| 5532 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" |
| 5533 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag |
| 5534 | else |
| 5535 | if test ia64 = "$host_cpu"; then |
| 5536 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' |
| 5537 | _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" |
| 5538 | _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" |
| 5539 | else |
| 5540 | # Determine the default libpath from the value encoded in an |
| 5541 | # empty executable. |
| 5542 | _LT_SYS_MODULE_PATH_AIX([$1]) |
| 5543 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" |
| 5544 | # Warning - without using the other run time loading flags, |
| 5545 | # -berok will link without error, but may produce a broken library. |
| 5546 | _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' |
| 5547 | _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' |
| 5548 | if test yes = "$with_gnu_ld"; then |
| 5549 | # We only use this code for GNU lds that support --whole-archive. |
| 5550 | _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' |
| 5551 | else |
| 5552 | # Exported symbols can be pulled into shared objects from archives |
| 5553 | _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' |
| 5554 | fi |
| 5555 | _LT_TAGVAR(archive_cmds_need_lc, $1)=yes |
| 5556 | _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' |
| 5557 | # -brtl affects multiple linker settings, -berok does not and is overridden later |
| 5558 | compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' |
| 5559 | if test svr4 != "$with_aix_soname"; then |
| 5560 | # This is similar to how AIX traditionally builds its shared libraries. |
| 5561 | _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' |
| 5562 | fi |
| 5563 | if test aix != "$with_aix_soname"; then |
| 5564 | _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' |
| 5565 | else |
| 5566 | # used by -dlpreopen to get the symbols |
| 5567 | _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' |
| 5568 | fi |
| 5569 | _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' |
| 5570 | fi |
| 5571 | fi |
| 5572 | ;; |
| 5573 |
| 5574 | amigaos*) |
| 5575 | case $host_cpu in |
| 5576 | powerpc) |
| 5577 | # see comment about AmigaOS4 .so support |
| 5578 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' |
| 5579 | _LT_TAGVAR(archive_expsym_cmds, $1)='' |
| 5580 | ;; |
| 5581 | m68k) |
| 5582 | _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)' |
| 5583 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 5584 | _LT_TAGVAR(hardcode_minus_L, $1)=yes |
| 5585 | ;; |
| 5586 | esac |
| 5587 | ;; |
| 5588 |
| 5589 | bsdi[[45]]*) |
| 5590 | _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic |
| 5591 | ;; |
| 5592 |
| 5593 | cygwin* | mingw* | pw32* | cegcc*) |
| 5594 | # When not using gcc, we currently assume that we are using |
| 5595 | # Microsoft Visual C++ or Intel C++ Compiler. |
| 5596 | # hardcode_libdir_flag_spec is actually meaningless, as there is |
| 5597 | # no search path for DLLs. |
| 5598 | case $cc_basename in |
| 5599 | cl* | icl*) |
| 5600 | # Native MSVC or ICC |
| 5601 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' |
| 5602 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported |
| 5603 | _LT_TAGVAR(always_export_symbols, $1)=yes |
| 5604 | _LT_TAGVAR(file_list_spec, $1)='@' |
| 5605 | # Tell ltmain to make .lib files, not .a files. |
| 5606 | libext=lib |
| 5607 | # Tell ltmain to make .dll files, not .so files. |
| 5608 | shrext_cmds=.dll |
| 5609 | # FIXME: Setting linknames here is a bad hack. |
| 5610 | _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' |
| 5611 | _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then |
| 5612 | cp "$export_symbols" "$output_objdir/$soname.def"; |
| 5613 | echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; |
| 5614 | else |
| 5615 | $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; |
| 5616 | fi~ |
| 5617 | $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ |
| 5618 | linknames=' |
| 5619 | # The linker will not automatically build a static lib if we build a DLL. |
| 5620 | # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' |
| 5621 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes |
| 5622 | _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' |
| 5623 | _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' |
| 5624 | # Don't use ranlib |
| 5625 | _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' |
| 5626 | _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ |
| 5627 | lt_tool_outputfile="@TOOL_OUTPUT@"~ |
| 5628 | case $lt_outputfile in |
| 5629 | *.exe|*.EXE) ;; |
| 5630 | *) |
| 5631 | lt_outputfile=$lt_outputfile.exe |
| 5632 | lt_tool_outputfile=$lt_tool_outputfile.exe |
| 5633 | ;; |
| 5634 | esac~ |
| 5635 | if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then |
| 5636 | $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; |
| 5637 | $RM "$lt_outputfile.manifest"; |
| 5638 | fi' |
| 5639 | ;; |
| 5640 | *) |
| 5641 | # Assume MSVC and ICC wrapper |
| 5642 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' |
| 5643 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported |
| 5644 | # Tell ltmain to make .lib files, not .a files. |
| 5645 | libext=lib |
| 5646 | # Tell ltmain to make .dll files, not .so files. |
| 5647 | shrext_cmds=.dll |
| 5648 | # FIXME: Setting linknames here is a bad hack. |
| 5649 | _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' |
| 5650 | # The linker will automatically build a .lib file if we build a DLL. |
| 5651 | _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' |
| 5652 | # FIXME: Should let the user specify the lib program. |
| 5653 | _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' |
| 5654 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes |
| 5655 | ;; |
| 5656 | esac |
| 5657 | ;; |
| 5658 |
| 5659 | darwin* | rhapsody*) |
| 5660 | _LT_DARWIN_LINKER_FEATURES($1) |
| 5661 | ;; |
| 5662 |
| 5663 | dgux*) |
| 5664 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 5665 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 5666 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 5667 | ;; |
| 5668 |
| 5669 | # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor |
| 5670 | # support. Future versions do this automatically, but an explicit c++rt0.o |
| 5671 | # does not break anything, and helps significantly (at the cost of a little |
| 5672 | # extra space). |
| 5673 | freebsd2.2*) |
| 5674 | _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' |
| 5675 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
| 5676 | _LT_TAGVAR(hardcode_direct, $1)=yes |
| 5677 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 5678 | ;; |
| 5679 |
| 5680 | # Unfortunately, older versions of FreeBSD 2 do not have this feature. |
| 5681 | freebsd2.*) |
| 5682 | _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' |
| 5683 | _LT_TAGVAR(hardcode_direct, $1)=yes |
| 5684 | _LT_TAGVAR(hardcode_minus_L, $1)=yes |
| 5685 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 5686 | ;; |
| 5687 |
| 5688 | # FreeBSD 3 and greater uses gcc -shared to do shared libraries. |
| 5689 | freebsd* | dragonfly*) |
| 5690 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' |
| 5691 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
| 5692 | _LT_TAGVAR(hardcode_direct, $1)=yes |
| 5693 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 5694 | ;; |
| 5695 |
| 5696 | hpux9*) |
| 5697 | if test yes = "$GCC"; then |
| 5698 | _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' |
| 5699 | else |
| 5700 | _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' |
| 5701 | fi |
| 5702 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' |
| 5703 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: |
| 5704 | _LT_TAGVAR(hardcode_direct, $1)=yes |
| 5705 |
| 5706 | # hardcode_minus_L: Not really in the search PATH, |
| 5707 | # but as the default location of the library. |
| 5708 | _LT_TAGVAR(hardcode_minus_L, $1)=yes |
| 5709 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' |
| 5710 | ;; |
| 5711 |
| 5712 | hpux10*) |
| 5713 | if test yes,no = "$GCC,$with_gnu_ld"; then |
| 5714 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' |
| 5715 | else |
| 5716 | _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' |
| 5717 | fi |
| 5718 | if test no = "$with_gnu_ld"; then |
| 5719 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' |
| 5720 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: |
| 5721 | _LT_TAGVAR(hardcode_direct, $1)=yes |
| 5722 | _LT_TAGVAR(hardcode_direct_absolute, $1)=yes |
| 5723 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' |
| 5724 | # hardcode_minus_L: Not really in the search PATH, |
| 5725 | # but as the default location of the library. |
| 5726 | _LT_TAGVAR(hardcode_minus_L, $1)=yes |
| 5727 | fi |
| 5728 | ;; |
| 5729 |
| 5730 | hpux11*) |
| 5731 | if test yes,no = "$GCC,$with_gnu_ld"; then |
| 5732 | case $host_cpu in |
| 5733 | hppa*64*) |
| 5734 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 5735 | ;; |
| 5736 | ia64*) |
| 5737 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' |
| 5738 | ;; |
| 5739 | *) |
| 5740 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' |
| 5741 | ;; |
| 5742 | esac |
| 5743 | else |
| 5744 | case $host_cpu in |
| 5745 | hppa*64*) |
| 5746 | _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 5747 | ;; |
| 5748 | ia64*) |
| 5749 | _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' |
| 5750 | ;; |
| 5751 | *) |
| 5752 | m4_if($1, [], [ |
| 5753 | # Older versions of the 11.00 compiler do not understand -b yet |
| 5754 | # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) |
| 5755 | _LT_LINKER_OPTION([if $CC understands -b], |
| 5756 | _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], |
| 5757 | [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], |
| 5758 | [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], |
| 5759 | [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) |
| 5760 | ;; |
| 5761 | esac |
| 5762 | fi |
| 5763 | if test no = "$with_gnu_ld"; then |
| 5764 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' |
| 5765 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: |
| 5766 |
| 5767 | case $host_cpu in |
| 5768 | hppa*64*|ia64*) |
| 5769 | _LT_TAGVAR(hardcode_direct, $1)=no |
| 5770 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 5771 | ;; |
| 5772 | *) |
| 5773 | _LT_TAGVAR(hardcode_direct, $1)=yes |
| 5774 | _LT_TAGVAR(hardcode_direct_absolute, $1)=yes |
| 5775 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' |
| 5776 |
| 5777 | # hardcode_minus_L: Not really in the search PATH, |
| 5778 | # but as the default location of the library. |
| 5779 | _LT_TAGVAR(hardcode_minus_L, $1)=yes |
| 5780 | ;; |
| 5781 | esac |
| 5782 | fi |
| 5783 | ;; |
| 5784 |
| 5785 | irix5* | irix6* | nonstopux*) |
| 5786 | if test yes = "$GCC"; then |
| 5787 | _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' |
| 5788 | # Try to use the -exported_symbol ld option, if it does not |
| 5789 | # work, assume that -exports_file does not work either and |
| 5790 | # implicitly export all symbols. |
| 5791 | # This should be the same for all languages, so no per-tag cache variable. |
| 5792 | AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], |
| 5793 | [lt_cv_irix_exported_symbol], |
| 5794 | [save_LDFLAGS=$LDFLAGS |
| 5795 | LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" |
| 5796 | AC_LINK_IFELSE( |
| 5797 | [AC_LANG_SOURCE( |
| 5798 | [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], |
| 5799 | [C++], [[int foo (void) { return 0; }]], |
| 5800 | [Fortran 77], [[ |
| 5801 | subroutine foo |
| 5802 | end]], |
| 5803 | [Fortran], [[ |
| 5804 | subroutine foo |
| 5805 | end]])])], |
| 5806 | [lt_cv_irix_exported_symbol=yes], |
| 5807 | [lt_cv_irix_exported_symbol=no]) |
| 5808 | LDFLAGS=$save_LDFLAGS]) |
| 5809 | if test yes = "$lt_cv_irix_exported_symbol"; then |
| 5810 | _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' |
| 5811 | fi |
| 5812 | else |
| 5813 | _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' |
| 5814 | _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' |
| 5815 | fi |
| 5816 | _LT_TAGVAR(archive_cmds_need_lc, $1)='no' |
| 5817 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' |
| 5818 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: |
| 5819 | _LT_TAGVAR(inherit_rpath, $1)=yes |
| 5820 | _LT_TAGVAR(link_all_deplibs, $1)=yes |
| 5821 | ;; |
| 5822 |
| 5823 | linux*) |
| 5824 | case $cc_basename in |
| 5825 | tcc*) |
| 5826 | # Fabrice Bellard et al's Tiny C Compiler |
| 5827 | _LT_TAGVAR(ld_shlibs, $1)=yes |
| 5828 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' |
| 5829 | ;; |
| 5830 | esac |
| 5831 | ;; |
| 5832 |
| 5833 | netbsd*) |
| 5834 | if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then |
| 5835 | _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out |
| 5836 | else |
| 5837 | _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF |
| 5838 | fi |
| 5839 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
| 5840 | _LT_TAGVAR(hardcode_direct, $1)=yes |
| 5841 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 5842 | ;; |
| 5843 |
| 5844 | newsos6) |
| 5845 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 5846 | _LT_TAGVAR(hardcode_direct, $1)=yes |
| 5847 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' |
| 5848 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: |
| 5849 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 5850 | ;; |
| 5851 |
| 5852 | *nto* | *qnx*) |
| 5853 | ;; |
| 5854 |
| 5855 | openbsd* | bitrig*) |
| 5856 | if test -f /usr/libexec/ld.so; then |
| 5857 | _LT_TAGVAR(hardcode_direct, $1)=yes |
| 5858 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 5859 | _LT_TAGVAR(hardcode_direct_absolute, $1)=yes |
| 5860 | if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then |
| 5861 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' |
| 5862 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' |
| 5863 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' |
| 5864 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' |
| 5865 | else |
| 5866 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' |
| 5867 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' |
| 5868 | fi |
| 5869 | else |
| 5870 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 5871 | fi |
| 5872 | ;; |
| 5873 |
| 5874 | os2*) |
| 5875 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 5876 | _LT_TAGVAR(hardcode_minus_L, $1)=yes |
| 5877 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported |
| 5878 | shrext_cmds=.dll |
| 5879 | _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ |
| 5880 | $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ |
| 5881 | $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ |
| 5882 | $ECHO EXPORTS >> $output_objdir/$libname.def~ |
| 5883 | emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ |
| 5884 | $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ |
| 5885 | emximp -o $lib $output_objdir/$libname.def' |
| 5886 | _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ |
| 5887 | $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ |
| 5888 | $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ |
| 5889 | $ECHO EXPORTS >> $output_objdir/$libname.def~ |
| 5890 | prefix_cmds="$SED"~ |
| 5891 | if test EXPORTS = "`$SED 1q $export_symbols`"; then |
| 5892 | prefix_cmds="$prefix_cmds -e 1d"; |
| 5893 | fi~ |
| 5894 | prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ |
| 5895 | cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ |
| 5896 | $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ |
| 5897 | emximp -o $lib $output_objdir/$libname.def' |
| 5898 | _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' |
| 5899 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes |
| 5900 | _LT_TAGVAR(file_list_spec, $1)='@' |
| 5901 | ;; |
| 5902 |
| 5903 | osf3*) |
| 5904 | if test yes = "$GCC"; then |
| 5905 | _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' |
| 5906 | _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' |
| 5907 | else |
| 5908 | _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' |
| 5909 | _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' |
| 5910 | fi |
| 5911 | _LT_TAGVAR(archive_cmds_need_lc, $1)='no' |
| 5912 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' |
| 5913 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: |
| 5914 | ;; |
| 5915 |
| 5916 | osf4* | osf5*) # as osf3* with the addition of -msym flag |
| 5917 | if test yes = "$GCC"; then |
| 5918 | _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' |
| 5919 | _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' |
| 5920 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' |
| 5921 | else |
| 5922 | _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' |
| 5923 | _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' |
| 5924 | _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~ |
| 5925 | $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' |
| 5926 |
| 5927 | # Both c and cxx compiler support -rpath directly |
| 5928 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' |
| 5929 | fi |
| 5930 | _LT_TAGVAR(archive_cmds_need_lc, $1)='no' |
| 5931 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: |
| 5932 | ;; |
| 5933 |
| 5934 | solaris*) |
| 5935 | _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' |
| 5936 | if test yes = "$GCC"; then |
| 5937 | wlarc='$wl' |
| 5938 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 5939 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ |
| 5940 | $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' |
| 5941 | else |
| 5942 | case `$CC -V 2>&1` in |
| 5943 | *"Compilers 5.0"*) |
| 5944 | wlarc='' |
| 5945 | _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 5946 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ |
| 5947 | $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' |
| 5948 | ;; |
| 5949 | *) |
| 5950 | wlarc='$wl' |
| 5951 | _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' |
| 5952 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ |
| 5953 | $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' |
| 5954 | ;; |
| 5955 | esac |
| 5956 | fi |
| 5957 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
| 5958 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 5959 | case $host_os in |
| 5960 | solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; |
| 5961 | *) |
| 5962 | # The compiler driver will combine and reorder linker options, |
| 5963 | # but understands '-z linker_flag'. GCC discards it without '$wl', |
| 5964 | # but is careful enough not to reorder. |
| 5965 | # Supported since Solaris 2.6 (maybe 2.5.1?) |
| 5966 | if test yes = "$GCC"; then |
| 5967 | _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' |
| 5968 | else |
| 5969 | _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' |
| 5970 | fi |
| 5971 | ;; |
| 5972 | esac |
| 5973 | _LT_TAGVAR(link_all_deplibs, $1)=yes |
| 5974 | ;; |
| 5975 |
| 5976 | sunos4*) |
| 5977 | if test sequent = "$host_vendor"; then |
| 5978 | # Use $CC to link under sequent, because it throws in some extra .o |
| 5979 | # files that make .init and .fini sections work. |
| 5980 | _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' |
| 5981 | else |
| 5982 | _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' |
| 5983 | fi |
| 5984 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 5985 | _LT_TAGVAR(hardcode_direct, $1)=yes |
| 5986 | _LT_TAGVAR(hardcode_minus_L, $1)=yes |
| 5987 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 5988 | ;; |
| 5989 |
| 5990 | sysv4) |
| 5991 | case $host_vendor in |
| 5992 | sni) |
| 5993 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 5994 | _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? |
| 5995 | ;; |
| 5996 | siemens) |
| 5997 | ## LD is ld it makes a PLAMLIB |
| 5998 | ## CC just makes a GrossModule. |
| 5999 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' |
| 6000 | _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' |
| 6001 | _LT_TAGVAR(hardcode_direct, $1)=no |
| 6002 | ;; |
| 6003 | motorola) |
| 6004 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 6005 | _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie |
| 6006 | ;; |
| 6007 | esac |
| 6008 | runpath_var='LD_RUN_PATH' |
| 6009 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 6010 | ;; |
| 6011 |
| 6012 | sysv4.3*) |
| 6013 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 6014 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 6015 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' |
| 6016 | ;; |
| 6017 |
| 6018 | sysv4*MP*) |
| 6019 | if test -d /usr/nec; then |
| 6020 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 6021 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 6022 | runpath_var=LD_RUN_PATH |
| 6023 | hardcode_runpath_var=yes |
| 6024 | _LT_TAGVAR(ld_shlibs, $1)=yes |
| 6025 | fi |
| 6026 | ;; |
| 6027 |
| 6028 | sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) |
| 6029 | _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' |
| 6030 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no |
| 6031 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 6032 | runpath_var='LD_RUN_PATH' |
| 6033 |
| 6034 | if test yes = "$GCC"; then |
| 6035 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 6036 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 6037 | else |
| 6038 | _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 6039 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 6040 | fi |
| 6041 | ;; |
| 6042 |
| 6043 | sysv5* | sco3.2v5* | sco5v6*) |
| 6044 | # Note: We CANNOT use -z defs as we might desire, because we do not |
| 6045 | # link with -lc, and that would cause any symbols used from libc to |
| 6046 | # always be unresolved, which means just about no library would |
| 6047 | # ever link correctly. If we're not using GNU ld we use -z text |
| 6048 | # though, which does catch some bad symbols but isn't as heavy-handed |
| 6049 | # as -z defs. |
| 6050 | _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' |
| 6051 | _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' |
| 6052 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no |
| 6053 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 6054 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' |
| 6055 | _LT_TAGVAR(hardcode_libdir_separator, $1)=':' |
| 6056 | _LT_TAGVAR(link_all_deplibs, $1)=yes |
| 6057 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' |
| 6058 | runpath_var='LD_RUN_PATH' |
| 6059 |
| 6060 | if test yes = "$GCC"; then |
| 6061 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 6062 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 6063 | else |
| 6064 | _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 6065 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 6066 | fi |
| 6067 | ;; |
| 6068 |
| 6069 | uts4*) |
| 6070 | _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' |
| 6071 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 6072 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 6073 | ;; |
| 6074 |
| 6075 | *) |
| 6076 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 6077 | ;; |
| 6078 | esac |
| 6079 |
| 6080 | if test sni = "$host_vendor"; then |
| 6081 | case $host in |
| 6082 | sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) |
| 6083 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' |
| 6084 | ;; |
| 6085 | esac |
| 6086 | fi |
| 6087 | fi |
| 6088 | ]) |
| 6089 | AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) |
| 6090 | test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no |
| 6091 |
| 6092 | _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld |
| 6093 |
| 6094 | _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl |
| 6095 | _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl |
| 6096 | _LT_DECL([], [extract_expsyms_cmds], [2], |
| 6097 | [The commands to extract the exported symbol list from a shared archive]) |
| 6098 |
| 6099 | # |
| 6100 | # Do we need to explicitly link libc? |
| 6101 | # |
| 6102 | case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in |
| 6103 | x|xyes) |
| 6104 | # Assume -lc should be added |
| 6105 | _LT_TAGVAR(archive_cmds_need_lc, $1)=yes |
| 6106 |
| 6107 | if test yes,yes = "$GCC,$enable_shared"; then |
| 6108 | case $_LT_TAGVAR(archive_cmds, $1) in |
| 6109 | *'~'*) |
| 6110 | # FIXME: we may have to deal with multi-command sequences. |
| 6111 | ;; |
| 6112 | '$CC '*) |
| 6113 | # Test whether the compiler implicitly links with -lc since on some |
| 6114 | # systems, -lgcc has to come before -lc. If gcc already passes -lc |
| 6115 | # to ld, don't add -lc before -lgcc. |
| 6116 | AC_CACHE_CHECK([whether -lc should be explicitly linked in], |
| 6117 | [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), |
| 6118 | [$RM conftest* |
| 6119 | echo "$lt_simple_compile_test_code" > conftest.$ac_ext |
| 6120 |
| 6121 | if AC_TRY_EVAL(ac_compile) 2>conftest.err; then |
| 6122 | soname=conftest |
| 6123 | lib=conftest |
| 6124 | libobjs=conftest.$ac_objext |
| 6125 | deplibs= |
| 6126 | wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) |
| 6127 | pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) |
| 6128 | compiler_flags=-v |
| 6129 | linker_flags=-v |
| 6130 | verstring= |
| 6131 | output_objdir=. |
| 6132 | libname=conftest |
| 6133 | lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) |
| 6134 | _LT_TAGVAR(allow_undefined_flag, $1)= |
| 6135 | if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) |
| 6136 | then |
| 6137 | lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no |
| 6138 | else |
| 6139 | lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes |
| 6140 | fi |
| 6141 | _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag |
| 6142 | else |
| 6143 | cat conftest.err 1>&5 |
| 6144 | fi |
| 6145 | $RM conftest* |
| 6146 | ]) |
| 6147 | _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) |
| 6148 | ;; |
| 6149 | esac |
| 6150 | fi |
| 6151 | ;; |
| 6152 | esac |
| 6153 |
| 6154 | _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], |
| 6155 | [Whether or not to add -lc for building shared libraries]) |
| 6156 | _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], |
| 6157 | [enable_shared_with_static_runtimes], [0], |
| 6158 | [Whether or not to disallow shared libs when runtime libs are static]) |
| 6159 | _LT_TAGDECL([], [export_dynamic_flag_spec], [1], |
| 6160 | [Compiler flag to allow reflexive dlopens]) |
| 6161 | _LT_TAGDECL([], [whole_archive_flag_spec], [1], |
| 6162 | [Compiler flag to generate shared objects directly from archives]) |
| 6163 | _LT_TAGDECL([], [compiler_needs_object], [1], |
| 6164 | [Whether the compiler copes with passing no objects directly]) |
| 6165 | _LT_TAGDECL([], [old_archive_from_new_cmds], [2], |
| 6166 | [Create an old-style archive from a shared archive]) |
| 6167 | _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], |
| 6168 | [Create a temporary old-style archive to link instead of a shared archive]) |
| 6169 | _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) |
| 6170 | _LT_TAGDECL([], [archive_expsym_cmds], [2]) |
| 6171 | _LT_TAGDECL([], [module_cmds], [2], |
| 6172 | [Commands used to build a loadable module if different from building |
| 6173 | a shared archive.]) |
| 6174 | _LT_TAGDECL([], [module_expsym_cmds], [2]) |
| 6175 | _LT_TAGDECL([], [with_gnu_ld], [1], |
| 6176 | [Whether we are building with GNU ld or not]) |
| 6177 | _LT_TAGDECL([], [allow_undefined_flag], [1], |
| 6178 | [Flag that allows shared libraries with undefined symbols to be built]) |
| 6179 | _LT_TAGDECL([], [no_undefined_flag], [1], |
| 6180 | [Flag that enforces no undefined symbols]) |
| 6181 | _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], |
| 6182 | [Flag to hardcode $libdir into a binary during linking. |
| 6183 | This must work even if $libdir does not exist]) |
| 6184 | _LT_TAGDECL([], [hardcode_libdir_separator], [1], |
| 6185 | [Whether we need a single "-rpath" flag with a separated argument]) |
| 6186 | _LT_TAGDECL([], [hardcode_direct], [0], |
| 6187 | [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes |
| 6188 | DIR into the resulting binary]) |
| 6189 | _LT_TAGDECL([], [hardcode_direct_absolute], [0], |
| 6190 | [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes |
| 6191 | DIR into the resulting binary and the resulting library dependency is |
| 6192 | "absolute", i.e impossible to change by setting $shlibpath_var if the |
| 6193 | library is relocated]) |
| 6194 | _LT_TAGDECL([], [hardcode_minus_L], [0], |
| 6195 | [Set to "yes" if using the -LDIR flag during linking hardcodes DIR |
| 6196 | into the resulting binary]) |
| 6197 | _LT_TAGDECL([], [hardcode_shlibpath_var], [0], |
| 6198 | [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR |
| 6199 | into the resulting binary]) |
| 6200 | _LT_TAGDECL([], [hardcode_automatic], [0], |
| 6201 | [Set to "yes" if building a shared library automatically hardcodes DIR |
| 6202 | into the library and all subsequent libraries and executables linked |
| 6203 | against it]) |
| 6204 | _LT_TAGDECL([], [inherit_rpath], [0], |
| 6205 | [Set to yes if linker adds runtime paths of dependent libraries |
| 6206 | to runtime path list]) |
| 6207 | _LT_TAGDECL([], [link_all_deplibs], [0], |
| 6208 | [Whether libtool must link a program against all its dependency libraries]) |
| 6209 | _LT_TAGDECL([], [always_export_symbols], [0], |
| 6210 | [Set to "yes" if exported symbols are required]) |
| 6211 | _LT_TAGDECL([], [export_symbols_cmds], [2], |
| 6212 | [The commands to list exported symbols]) |
| 6213 | _LT_TAGDECL([], [exclude_expsyms], [1], |
| 6214 | [Symbols that should not be listed in the preloaded symbols]) |
| 6215 | _LT_TAGDECL([], [include_expsyms], [1], |
| 6216 | [Symbols that must always be exported]) |
| 6217 | _LT_TAGDECL([], [prelink_cmds], [2], |
| 6218 | [Commands necessary for linking programs (against libraries) with templates]) |
| 6219 | _LT_TAGDECL([], [postlink_cmds], [2], |
| 6220 | [Commands necessary for finishing linking programs]) |
| 6221 | _LT_TAGDECL([], [file_list_spec], [1], |
| 6222 | [Specify filename containing input files]) |
| 6223 | dnl FIXME: Not yet implemented |
| 6224 | dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], |
| 6225 | dnl [Compiler flag to generate thread safe objects]) |
| 6226 | ])# _LT_LINKER_SHLIBS |
| 6227 |
| 6228 |
| 6229 | # _LT_LANG_C_CONFIG([TAG]) |
| 6230 | # ------------------------ |
| 6231 | # Ensure that the configuration variables for a C compiler are suitably |
| 6232 | # defined. These variables are subsequently used by _LT_CONFIG to write |
| 6233 | # the compiler configuration to 'libtool'. |
| 6234 | m4_defun([_LT_LANG_C_CONFIG], |
| 6235 | [m4_require([_LT_DECL_EGREP])dnl |
| 6236 | lt_save_CC=$CC |
| 6237 | AC_LANG_PUSH(C) |
| 6238 |
| 6239 | # Source file extension for C test sources. |
| 6240 | ac_ext=c |
| 6241 |
| 6242 | # Object file extension for compiled C test sources. |
| 6243 | objext=o |
| 6244 | _LT_TAGVAR(objext, $1)=$objext |
| 6245 |
| 6246 | # Code to be used in simple compile tests |
| 6247 | lt_simple_compile_test_code="int some_variable = 0;" |
| 6248 |
| 6249 | # Code to be used in simple link tests |
| 6250 | lt_simple_link_test_code='int main(){return(0);}' |
| 6251 |
| 6252 | _LT_TAG_COMPILER |
| 6253 | # Save the default compiler, since it gets overwritten when the other |
| 6254 | # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. |
| 6255 | compiler_DEFAULT=$CC |
| 6256 |
| 6257 | # save warnings/boilerplate of simple test code |
| 6258 | _LT_COMPILER_BOILERPLATE |
| 6259 | _LT_LINKER_BOILERPLATE |
| 6260 |
| 6261 | if test -n "$compiler"; then |
| 6262 | _LT_COMPILER_NO_RTTI($1) |
| 6263 | _LT_COMPILER_PIC($1) |
| 6264 | _LT_COMPILER_C_O($1) |
| 6265 | _LT_COMPILER_FILE_LOCKS($1) |
| 6266 | _LT_LINKER_SHLIBS($1) |
| 6267 | _LT_SYS_DYNAMIC_LINKER($1) |
| 6268 | _LT_LINKER_HARDCODE_LIBPATH($1) |
| 6269 | LT_SYS_DLOPEN_SELF |
| 6270 | _LT_CMD_STRIPLIB |
| 6271 |
| 6272 | # Report what library types will actually be built |
| 6273 | AC_MSG_CHECKING([if libtool supports shared libraries]) |
| 6274 | AC_MSG_RESULT([$can_build_shared]) |
| 6275 |
| 6276 | AC_MSG_CHECKING([whether to build shared libraries]) |
| 6277 | test no = "$can_build_shared" && enable_shared=no |
| 6278 |
| 6279 | # On AIX, shared libraries and static libraries use the same namespace, and |
| 6280 | # are all built from PIC. |
| 6281 | case $host_os in |
| 6282 | aix3*) |
| 6283 | test yes = "$enable_shared" && enable_static=no |
| 6284 | if test -n "$RANLIB"; then |
| 6285 | archive_cmds="$archive_cmds~\$RANLIB \$lib" |
| 6286 | postinstall_cmds='$RANLIB $lib' |
| 6287 | fi |
| 6288 | ;; |
| 6289 |
| 6290 | aix[[4-9]]*) |
| 6291 | if test ia64 != "$host_cpu"; then |
| 6292 | case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in |
| 6293 | yes,aix,yes) ;; # shared object as lib.so file only |
| 6294 | yes,svr4,*) ;; # shared object as lib.so archive member only |
| 6295 | yes,*) enable_static=no ;; # shared object in lib.a archive as well |
| 6296 | esac |
| 6297 | fi |
| 6298 | ;; |
| 6299 | esac |
| 6300 | AC_MSG_RESULT([$enable_shared]) |
| 6301 |
| 6302 | AC_MSG_CHECKING([whether to build static libraries]) |
| 6303 | # Make sure either enable_shared or enable_static is yes. |
| 6304 | test yes = "$enable_shared" || enable_static=yes |
| 6305 | AC_MSG_RESULT([$enable_static]) |
| 6306 |
| 6307 | _LT_CONFIG($1) |
| 6308 | fi |
| 6309 | AC_LANG_POP |
| 6310 | CC=$lt_save_CC |
| 6311 | ])# _LT_LANG_C_CONFIG |
| 6312 |
| 6313 |
| 6314 | # _LT_LANG_CXX_CONFIG([TAG]) |
| 6315 | # -------------------------- |
| 6316 | # Ensure that the configuration variables for a C++ compiler are suitably |
| 6317 | # defined. These variables are subsequently used by _LT_CONFIG to write |
| 6318 | # the compiler configuration to 'libtool'. |
| 6319 | m4_defun([_LT_LANG_CXX_CONFIG], |
| 6320 | [m4_require([_LT_FILEUTILS_DEFAULTS])dnl |
| 6321 | m4_require([_LT_DECL_EGREP])dnl |
| 6322 | m4_require([_LT_PATH_MANIFEST_TOOL])dnl |
| 6323 | if test -n "$CXX" && ( test no != "$CXX" && |
| 6324 | ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || |
| 6325 | (test g++ != "$CXX"))); then |
| 6326 | AC_PROG_CXXCPP |
| 6327 | else |
| 6328 | _lt_caught_CXX_error=yes |
| 6329 | fi |
| 6330 |
| 6331 | AC_LANG_PUSH(C++) |
| 6332 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no |
| 6333 | _LT_TAGVAR(allow_undefined_flag, $1)= |
| 6334 | _LT_TAGVAR(always_export_symbols, $1)=no |
| 6335 | _LT_TAGVAR(archive_expsym_cmds, $1)= |
| 6336 | _LT_TAGVAR(compiler_needs_object, $1)=no |
| 6337 | _LT_TAGVAR(export_dynamic_flag_spec, $1)= |
| 6338 | _LT_TAGVAR(hardcode_direct, $1)=no |
| 6339 | _LT_TAGVAR(hardcode_direct_absolute, $1)=no |
| 6340 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= |
| 6341 | _LT_TAGVAR(hardcode_libdir_separator, $1)= |
| 6342 | _LT_TAGVAR(hardcode_minus_L, $1)=no |
| 6343 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported |
| 6344 | _LT_TAGVAR(hardcode_automatic, $1)=no |
| 6345 | _LT_TAGVAR(inherit_rpath, $1)=no |
| 6346 | _LT_TAGVAR(module_cmds, $1)= |
| 6347 | _LT_TAGVAR(module_expsym_cmds, $1)= |
| 6348 | _LT_TAGVAR(link_all_deplibs, $1)=unknown |
| 6349 | _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds |
| 6350 | _LT_TAGVAR(reload_flag, $1)=$reload_flag |
| 6351 | _LT_TAGVAR(reload_cmds, $1)=$reload_cmds |
| 6352 | _LT_TAGVAR(no_undefined_flag, $1)= |
| 6353 | _LT_TAGVAR(whole_archive_flag_spec, $1)= |
| 6354 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no |
| 6355 |
| 6356 | # Source file extension for C++ test sources. |
| 6357 | ac_ext=cpp |
| 6358 |
| 6359 | # Object file extension for compiled C++ test sources. |
| 6360 | objext=o |
| 6361 | _LT_TAGVAR(objext, $1)=$objext |
| 6362 |
| 6363 | # No sense in running all these tests if we already determined that |
| 6364 | # the CXX compiler isn't working. Some variables (like enable_shared) |
| 6365 | # are currently assumed to apply to all compilers on this platform, |
| 6366 | # and will be corrupted by setting them based on a non-working compiler. |
| 6367 | if test yes != "$_lt_caught_CXX_error"; then |
| 6368 | # Code to be used in simple compile tests |
| 6369 | lt_simple_compile_test_code="int some_variable = 0;" |
| 6370 |
| 6371 | # Code to be used in simple link tests |
| 6372 | lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' |
| 6373 |
| 6374 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. |
| 6375 | _LT_TAG_COMPILER |
| 6376 |
| 6377 | # save warnings/boilerplate of simple test code |
| 6378 | _LT_COMPILER_BOILERPLATE |
| 6379 | _LT_LINKER_BOILERPLATE |
| 6380 |
| 6381 | # Allow CC to be a program name with arguments. |
| 6382 | lt_save_CC=$CC |
| 6383 | lt_save_CFLAGS=$CFLAGS |
| 6384 | lt_save_LD=$LD |
| 6385 | lt_save_GCC=$GCC |
| 6386 | GCC=$GXX |
| 6387 | lt_save_with_gnu_ld=$with_gnu_ld |
| 6388 | lt_save_path_LD=$lt_cv_path_LD |
| 6389 | if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then |
| 6390 | lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx |
| 6391 | else |
| 6392 | $as_unset lt_cv_prog_gnu_ld |
| 6393 | fi |
| 6394 | if test -n "${lt_cv_path_LDCXX+set}"; then |
| 6395 | lt_cv_path_LD=$lt_cv_path_LDCXX |
| 6396 | else |
| 6397 | $as_unset lt_cv_path_LD |
| 6398 | fi |
| 6399 | test -z "${LDCXX+set}" || LD=$LDCXX |
| 6400 | CC=${CXX-"c++"} |
| 6401 | CFLAGS=$CXXFLAGS |
| 6402 | compiler=$CC |
| 6403 | _LT_TAGVAR(compiler, $1)=$CC |
| 6404 | _LT_CC_BASENAME([$compiler]) |
| 6405 |
| 6406 | if test -n "$compiler"; then |
| 6407 | # We don't want -fno-exception when compiling C++ code, so set the |
| 6408 | # no_builtin_flag separately |
| 6409 | if test yes = "$GXX"; then |
| 6410 | _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' |
| 6411 | else |
| 6412 | _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= |
| 6413 | fi |
| 6414 |
| 6415 | if test yes = "$GXX"; then |
| 6416 | # Set up default GNU C++ configuration |
| 6417 |
| 6418 | LT_PATH_LD |
| 6419 |
| 6420 | # Check if GNU C++ uses GNU ld as the underlying linker, since the |
| 6421 | # archiving commands below assume that GNU ld is being used. |
| 6422 | if test yes = "$with_gnu_ld"; then |
| 6423 | _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' |
| 6424 | _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' |
| 6425 |
| 6426 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' |
| 6427 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' |
| 6428 |
| 6429 | # If archive_cmds runs LD, not CC, wlarc should be empty |
| 6430 | # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to |
| 6431 | # investigate it a little bit more. (MM) |
| 6432 | wlarc='$wl' |
| 6433 |
| 6434 | # ancient GNU ld didn't support --whole-archive et. al. |
| 6435 | if eval "`$CC -print-prog-name=ld` --help 2>&1" | |
| 6436 | $GREP 'no-whole-archive' > /dev/null; then |
| 6437 | _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' |
| 6438 | else |
| 6439 | _LT_TAGVAR(whole_archive_flag_spec, $1)= |
| 6440 | fi |
| 6441 | else |
| 6442 | with_gnu_ld=no |
| 6443 | wlarc= |
| 6444 |
| 6445 | # A generic and very simple default shared library creation |
| 6446 | # command for GNU C++ for the case where it uses the native |
| 6447 | # linker, instead of GNU ld. If possible, this setting should |
| 6448 | # overridden to take advantage of the native linker features on |
| 6449 | # the platform it is being used on. |
| 6450 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' |
| 6451 | fi |
| 6452 |
| 6453 | # Commands to make compiler produce verbose output that lists |
| 6454 | # what "hidden" libraries, object files and flags are used when |
| 6455 | # linking a shared library. |
| 6456 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' |
| 6457 |
| 6458 | else |
| 6459 | GXX=no |
| 6460 | with_gnu_ld=no |
| 6461 | wlarc= |
| 6462 | fi |
| 6463 |
| 6464 | # PORTME: fill in a description of your system's C++ link characteristics |
| 6465 | AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) |
| 6466 | _LT_TAGVAR(ld_shlibs, $1)=yes |
| 6467 | case $host_os in |
| 6468 | aix3*) |
| 6469 | # FIXME: insert proper C++ library support |
| 6470 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 6471 | ;; |
| 6472 | aix[[4-9]]*) |
| 6473 | if test ia64 = "$host_cpu"; then |
| 6474 | # On IA64, the linker does run time linking by default, so we don't |
| 6475 | # have to do anything special. |
| 6476 | aix_use_runtimelinking=no |
| 6477 | exp_sym_flag='-Bexport' |
| 6478 | no_entry_flag= |
| 6479 | else |
| 6480 | aix_use_runtimelinking=no |
| 6481 |
| 6482 | # Test if we are trying to use run time linking or normal |
| 6483 | # AIX style linking. If -brtl is somewhere in LDFLAGS, we |
| 6484 | # have runtime linking enabled, and use it for executables. |
| 6485 | # For shared libraries, we enable/disable runtime linking |
| 6486 | # depending on the kind of the shared library created - |
| 6487 | # when "with_aix_soname,aix_use_runtimelinking" is: |
| 6488 | # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables |
| 6489 | # "aix,yes" lib.so shared, rtl:yes, for executables |
| 6490 | # lib.a static archive |
| 6491 | # "both,no" lib.so.V(shr.o) shared, rtl:yes |
| 6492 | # lib.a(lib.so.V) shared, rtl:no, for executables |
| 6493 | # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables |
| 6494 | # lib.a(lib.so.V) shared, rtl:no |
| 6495 | # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables |
| 6496 | # lib.a static archive |
| 6497 | case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) |
| 6498 | for ld_flag in $LDFLAGS; do |
| 6499 | case $ld_flag in |
| 6500 | *-brtl*) |
| 6501 | aix_use_runtimelinking=yes |
| 6502 | break |
| 6503 | ;; |
| 6504 | esac |
| 6505 | done |
| 6506 | if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then |
| 6507 | # With aix-soname=svr4, we create the lib.so.V shared archives only, |
| 6508 | # so we don't have lib.a shared libs to link our executables. |
| 6509 | # We have to force runtime linking in this case. |
| 6510 | aix_use_runtimelinking=yes |
| 6511 | LDFLAGS="$LDFLAGS -Wl,-brtl" |
| 6512 | fi |
| 6513 | ;; |
| 6514 | esac |
| 6515 |
| 6516 | exp_sym_flag='-bexport' |
| 6517 | no_entry_flag='-bnoentry' |
| 6518 | fi |
| 6519 |
| 6520 | # When large executables or shared objects are built, AIX ld can |
| 6521 | # have problems creating the table of contents. If linking a library |
| 6522 | # or program results in "error TOC overflow" add -mminimal-toc to |
| 6523 | # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not |
| 6524 | # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. |
| 6525 |
| 6526 | _LT_TAGVAR(archive_cmds, $1)='' |
| 6527 | _LT_TAGVAR(hardcode_direct, $1)=yes |
| 6528 | _LT_TAGVAR(hardcode_direct_absolute, $1)=yes |
| 6529 | _LT_TAGVAR(hardcode_libdir_separator, $1)=':' |
| 6530 | _LT_TAGVAR(link_all_deplibs, $1)=yes |
| 6531 | _LT_TAGVAR(file_list_spec, $1)='$wl-f,' |
| 6532 | case $with_aix_soname,$aix_use_runtimelinking in |
| 6533 | aix,*) ;; # no import file |
| 6534 | svr4,* | *,yes) # use import file |
| 6535 | # The Import File defines what to hardcode. |
| 6536 | _LT_TAGVAR(hardcode_direct, $1)=no |
| 6537 | _LT_TAGVAR(hardcode_direct_absolute, $1)=no |
| 6538 | ;; |
| 6539 | esac |
| 6540 |
| 6541 | if test yes = "$GXX"; then |
| 6542 | case $host_os in aix4.[[012]]|aix4.[[012]].*) |
| 6543 | # We only want to do this on AIX 4.2 and lower, the check |
| 6544 | # below for broken collect2 doesn't work under 4.3+ |
| 6545 | collect2name=`$CC -print-prog-name=collect2` |
| 6546 | if test -f "$collect2name" && |
| 6547 | strings "$collect2name" | $GREP resolve_lib_name >/dev/null |
| 6548 | then |
| 6549 | # We have reworked collect2 |
| 6550 | : |
| 6551 | else |
| 6552 | # We have old collect2 |
| 6553 | _LT_TAGVAR(hardcode_direct, $1)=unsupported |
| 6554 | # It fails to find uninstalled libraries when the uninstalled |
| 6555 | # path is not listed in the libpath. Setting hardcode_minus_L |
| 6556 | # to unsupported forces relinking |
| 6557 | _LT_TAGVAR(hardcode_minus_L, $1)=yes |
| 6558 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 6559 | _LT_TAGVAR(hardcode_libdir_separator, $1)= |
| 6560 | fi |
| 6561 | esac |
| 6562 | shared_flag='-shared' |
| 6563 | if test yes = "$aix_use_runtimelinking"; then |
| 6564 | shared_flag=$shared_flag' $wl-G' |
| 6565 | fi |
| 6566 | # Need to ensure runtime linking is disabled for the traditional |
| 6567 | # shared library, or the linker may eventually find shared libraries |
| 6568 | # /with/ Import File - we do not want to mix them. |
| 6569 | shared_flag_aix='-shared' |
| 6570 | shared_flag_svr4='-shared $wl-G' |
| 6571 | else |
| 6572 | # not using gcc |
| 6573 | if test ia64 = "$host_cpu"; then |
| 6574 | # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release |
| 6575 | # chokes on -Wl,-G. The following line is correct: |
| 6576 | shared_flag='-G' |
| 6577 | else |
| 6578 | if test yes = "$aix_use_runtimelinking"; then |
| 6579 | shared_flag='$wl-G' |
| 6580 | else |
| 6581 | shared_flag='$wl-bM:SRE' |
| 6582 | fi |
| 6583 | shared_flag_aix='$wl-bM:SRE' |
| 6584 | shared_flag_svr4='$wl-G' |
| 6585 | fi |
| 6586 | fi |
| 6587 |
| 6588 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' |
| 6589 | # It seems that -bexpall does not export symbols beginning with |
| 6590 | # underscore (_), so it is better to generate a list of symbols to |
| 6591 | # export. |
| 6592 | _LT_TAGVAR(always_export_symbols, $1)=yes |
| 6593 | if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then |
| 6594 | # Warning - without using the other runtime loading flags (-brtl), |
| 6595 | # -berok will link without error, but may produce a broken library. |
| 6596 | # The "-G" linker flag allows undefined symbols. |
| 6597 | _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' |
| 6598 | # Determine the default libpath from the value encoded in an empty |
| 6599 | # executable. |
| 6600 | _LT_SYS_MODULE_PATH_AIX([$1]) |
| 6601 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" |
| 6602 |
| 6603 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag |
| 6604 | else |
| 6605 | if test ia64 = "$host_cpu"; then |
| 6606 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' |
| 6607 | _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" |
| 6608 | _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" |
| 6609 | else |
| 6610 | # Determine the default libpath from the value encoded in an |
| 6611 | # empty executable. |
| 6612 | _LT_SYS_MODULE_PATH_AIX([$1]) |
| 6613 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" |
| 6614 | # Warning - without using the other run time loading flags, |
| 6615 | # -berok will link without error, but may produce a broken library. |
| 6616 | _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' |
| 6617 | _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' |
| 6618 | if test yes = "$with_gnu_ld"; then |
| 6619 | # We only use this code for GNU lds that support --whole-archive. |
| 6620 | _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' |
| 6621 | else |
| 6622 | # Exported symbols can be pulled into shared objects from archives |
| 6623 | _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' |
| 6624 | fi |
| 6625 | _LT_TAGVAR(archive_cmds_need_lc, $1)=yes |
| 6626 | _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' |
| 6627 | # -brtl affects multiple linker settings, -berok does not and is overridden later |
| 6628 | compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' |
| 6629 | if test svr4 != "$with_aix_soname"; then |
| 6630 | # This is similar to how AIX traditionally builds its shared |
| 6631 | # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. |
| 6632 | _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' |
| 6633 | fi |
| 6634 | if test aix != "$with_aix_soname"; then |
| 6635 | _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' |
| 6636 | else |
| 6637 | # used by -dlpreopen to get the symbols |
| 6638 | _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' |
| 6639 | fi |
| 6640 | _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' |
| 6641 | fi |
| 6642 | fi |
| 6643 | ;; |
| 6644 |
| 6645 | beos*) |
| 6646 | if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then |
| 6647 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported |
| 6648 | # Joseph Beckenbach <jrb3@best.com> says some releases of gcc |
| 6649 | # support --undefined. This deserves some investigation. FIXME |
| 6650 | _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' |
| 6651 | else |
| 6652 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 6653 | fi |
| 6654 | ;; |
| 6655 |
| 6656 | chorus*) |
| 6657 | case $cc_basename in |
| 6658 | *) |
| 6659 | # FIXME: insert proper C++ library support |
| 6660 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 6661 | ;; |
| 6662 | esac |
| 6663 | ;; |
| 6664 |
| 6665 | cygwin* | mingw* | pw32* | cegcc*) |
| 6666 | case $GXX,$cc_basename in |
| 6667 | ,cl* | no,cl* | ,icl* | no,icl*) |
| 6668 | # Native MSVC or ICC |
| 6669 | # hardcode_libdir_flag_spec is actually meaningless, as there is |
| 6670 | # no search path for DLLs. |
| 6671 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' |
| 6672 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported |
| 6673 | _LT_TAGVAR(always_export_symbols, $1)=yes |
| 6674 | _LT_TAGVAR(file_list_spec, $1)='@' |
| 6675 | # Tell ltmain to make .lib files, not .a files. |
| 6676 | libext=lib |
| 6677 | # Tell ltmain to make .dll files, not .so files. |
| 6678 | shrext_cmds=.dll |
| 6679 | # FIXME: Setting linknames here is a bad hack. |
| 6680 | _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' |
| 6681 | _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then |
| 6682 | cp "$export_symbols" "$output_objdir/$soname.def"; |
| 6683 | echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; |
| 6684 | else |
| 6685 | $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; |
| 6686 | fi~ |
| 6687 | $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ |
| 6688 | linknames=' |
| 6689 | # The linker will not automatically build a static lib if we build a DLL. |
| 6690 | # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' |
| 6691 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes |
| 6692 | # Don't use ranlib |
| 6693 | _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' |
| 6694 | _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ |
| 6695 | lt_tool_outputfile="@TOOL_OUTPUT@"~ |
| 6696 | case $lt_outputfile in |
| 6697 | *.exe|*.EXE) ;; |
| 6698 | *) |
| 6699 | lt_outputfile=$lt_outputfile.exe |
| 6700 | lt_tool_outputfile=$lt_tool_outputfile.exe |
| 6701 | ;; |
| 6702 | esac~ |
| 6703 | func_to_tool_file "$lt_outputfile"~ |
| 6704 | if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then |
| 6705 | $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; |
| 6706 | $RM "$lt_outputfile.manifest"; |
| 6707 | fi' |
| 6708 | ;; |
| 6709 | *) |
| 6710 | # g++ |
| 6711 | # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, |
| 6712 | # as there is no search path for DLLs. |
| 6713 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 6714 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' |
| 6715 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported |
| 6716 | _LT_TAGVAR(always_export_symbols, $1)=no |
| 6717 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes |
| 6718 |
| 6719 | if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then |
| 6720 | _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' |
| 6721 | # If the export-symbols file already is a .def file, use it as |
| 6722 | # is; otherwise, prepend EXPORTS... |
| 6723 | _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then |
| 6724 | cp $export_symbols $output_objdir/$soname.def; |
| 6725 | else |
| 6726 | echo EXPORTS > $output_objdir/$soname.def; |
| 6727 | cat $export_symbols >> $output_objdir/$soname.def; |
| 6728 | fi~ |
| 6729 | $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' |
| 6730 | else |
| 6731 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 6732 | fi |
| 6733 | ;; |
| 6734 | esac |
| 6735 | ;; |
| 6736 | darwin* | rhapsody*) |
| 6737 | _LT_DARWIN_LINKER_FEATURES($1) |
| 6738 | ;; |
| 6739 |
| 6740 | os2*) |
| 6741 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' |
| 6742 | _LT_TAGVAR(hardcode_minus_L, $1)=yes |
| 6743 | _LT_TAGVAR(allow_undefined_flag, $1)=unsupported |
| 6744 | shrext_cmds=.dll |
| 6745 | _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ |
| 6746 | $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ |
| 6747 | $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ |
| 6748 | $ECHO EXPORTS >> $output_objdir/$libname.def~ |
| 6749 | emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ |
| 6750 | $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ |
| 6751 | emximp -o $lib $output_objdir/$libname.def' |
| 6752 | _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ |
| 6753 | $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ |
| 6754 | $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ |
| 6755 | $ECHO EXPORTS >> $output_objdir/$libname.def~ |
| 6756 | prefix_cmds="$SED"~ |
| 6757 | if test EXPORTS = "`$SED 1q $export_symbols`"; then |
| 6758 | prefix_cmds="$prefix_cmds -e 1d"; |
| 6759 | fi~ |
| 6760 | prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ |
| 6761 | cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ |
| 6762 | $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ |
| 6763 | emximp -o $lib $output_objdir/$libname.def' |
| 6764 | _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' |
| 6765 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes |
| 6766 | _LT_TAGVAR(file_list_spec, $1)='@' |
| 6767 | ;; |
| 6768 |
| 6769 | dgux*) |
| 6770 | case $cc_basename in |
| 6771 | ec++*) |
| 6772 | # FIXME: insert proper C++ library support |
| 6773 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 6774 | ;; |
| 6775 | ghcx*) |
| 6776 | # Green Hills C++ Compiler |
| 6777 | # FIXME: insert proper C++ library support |
| 6778 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 6779 | ;; |
| 6780 | *) |
| 6781 | # FIXME: insert proper C++ library support |
| 6782 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 6783 | ;; |
| 6784 | esac |
| 6785 | ;; |
| 6786 |
| 6787 | freebsd2.*) |
| 6788 | # C++ shared libraries reported to be fairly broken before |
| 6789 | # switch to ELF |
| 6790 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 6791 | ;; |
| 6792 |
| 6793 | freebsd-elf*) |
| 6794 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no |
| 6795 | ;; |
| 6796 |
| 6797 | freebsd* | dragonfly*) |
| 6798 | # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF |
| 6799 | # conventions |
| 6800 | _LT_TAGVAR(ld_shlibs, $1)=yes |
| 6801 | ;; |
| 6802 |
| 6803 | haiku*) |
| 6804 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' |
| 6805 | _LT_TAGVAR(link_all_deplibs, $1)=yes |
| 6806 | ;; |
| 6807 |
| 6808 | hpux9*) |
| 6809 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' |
| 6810 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: |
| 6811 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' |
| 6812 | _LT_TAGVAR(hardcode_direct, $1)=yes |
| 6813 | _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, |
| 6814 | # but as the default |
| 6815 | # location of the library. |
| 6816 |
| 6817 | case $cc_basename in |
| 6818 | CC*) |
| 6819 | # FIXME: insert proper C++ library support |
| 6820 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 6821 | ;; |
| 6822 | aCC*) |
| 6823 | _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' |
| 6824 | # Commands to make compiler produce verbose output that lists |
| 6825 | # what "hidden" libraries, object files and flags are used when |
| 6826 | # linking a shared library. |
| 6827 | # |
| 6828 | # There doesn't appear to be a way to prevent this compiler from |
| 6829 | # explicitly linking system object files so we need to strip them |
| 6830 | # from the output so that they don't get included in the library |
| 6831 | # dependencies. |
| 6832 | 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"' |
| 6833 | ;; |
| 6834 | *) |
| 6835 | if test yes = "$GXX"; then |
| 6836 | _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' |
| 6837 | else |
| 6838 | # FIXME: insert proper C++ library support |
| 6839 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 6840 | fi |
| 6841 | ;; |
| 6842 | esac |
| 6843 | ;; |
| 6844 |
| 6845 | hpux10*|hpux11*) |
| 6846 | if test no = "$with_gnu_ld"; then |
| 6847 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' |
| 6848 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: |
| 6849 |
| 6850 | case $host_cpu in |
| 6851 | hppa*64*|ia64*) |
| 6852 | ;; |
| 6853 | *) |
| 6854 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' |
| 6855 | ;; |
| 6856 | esac |
| 6857 | fi |
| 6858 | case $host_cpu in |
| 6859 | hppa*64*|ia64*) |
| 6860 | _LT_TAGVAR(hardcode_direct, $1)=no |
| 6861 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 6862 | ;; |
| 6863 | *) |
| 6864 | _LT_TAGVAR(hardcode_direct, $1)=yes |
| 6865 | _LT_TAGVAR(hardcode_direct_absolute, $1)=yes |
| 6866 | _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, |
| 6867 | # but as the default |
| 6868 | # location of the library. |
| 6869 | ;; |
| 6870 | esac |
| 6871 |
| 6872 | case $cc_basename in |
| 6873 | CC*) |
| 6874 | # FIXME: insert proper C++ library support |
| 6875 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 6876 | ;; |
| 6877 | aCC*) |
| 6878 | case $host_cpu in |
| 6879 | hppa*64*) |
| 6880 | _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' |
| 6881 | ;; |
| 6882 | ia64*) |
| 6883 | _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' |
| 6884 | ;; |
| 6885 | *) |
| 6886 | _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' |
| 6887 | ;; |
| 6888 | esac |
| 6889 | # Commands to make compiler produce verbose output that lists |
| 6890 | # what "hidden" libraries, object files and flags are used when |
| 6891 | # linking a shared library. |
| 6892 | # |
| 6893 | # There doesn't appear to be a way to prevent this compiler from |
| 6894 | # explicitly linking system object files so we need to strip them |
| 6895 | # from the output so that they don't get included in the library |
| 6896 | # dependencies. |
| 6897 | 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"' |
| 6898 | ;; |
| 6899 | *) |
| 6900 | if test yes = "$GXX"; then |
| 6901 | if test no = "$with_gnu_ld"; then |
| 6902 | case $host_cpu in |
| 6903 | hppa*64*) |
| 6904 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' |
| 6905 | ;; |
| 6906 | ia64*) |
| 6907 | _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' |
| 6908 | ;; |
| 6909 | *) |
| 6910 | _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' |
| 6911 | ;; |
| 6912 | esac |
| 6913 | fi |
| 6914 | else |
| 6915 | # FIXME: insert proper C++ library support |
| 6916 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 6917 | fi |
| 6918 | ;; |
| 6919 | esac |
| 6920 | ;; |
| 6921 |
| 6922 | interix[[3-9]]*) |
| 6923 | _LT_TAGVAR(hardcode_direct, $1)=no |
| 6924 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 6925 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' |
| 6926 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' |
| 6927 | # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. |
| 6928 | # Instead, shared libraries are loaded at an image base (0x10000000 by |
| 6929 | # default) and relocated if they conflict, which is a slow very memory |
| 6930 | # consuming and fragmenting process. To avoid this, we pick a random, |
| 6931 | # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link |
| 6932 | # time. Moving up from 0x10000000 also allows more sbrk(2) space. |
| 6933 | _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' |
| 6934 | _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' |
| 6935 | ;; |
| 6936 | irix5* | irix6*) |
| 6937 | case $cc_basename in |
| 6938 | CC*) |
| 6939 | # SGI C++ |
| 6940 | _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' |
| 6941 |
| 6942 | # Archives containing C++ object files must be created using |
| 6943 | # "CC -ar", where "CC" is the IRIX C++ compiler. This is |
| 6944 | # necessary to make sure instantiated templates are included |
| 6945 | # in the archive. |
| 6946 | _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' |
| 6947 | ;; |
| 6948 | *) |
| 6949 | if test yes = "$GXX"; then |
| 6950 | if test no = "$with_gnu_ld"; then |
| 6951 | _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' |
| 6952 | else |
| 6953 | _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' |
| 6954 | fi |
| 6955 | fi |
| 6956 | _LT_TAGVAR(link_all_deplibs, $1)=yes |
| 6957 | ;; |
| 6958 | esac |
| 6959 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' |
| 6960 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: |
| 6961 | _LT_TAGVAR(inherit_rpath, $1)=yes |
| 6962 | ;; |
| 6963 |
| 6964 | linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) |
| 6965 | case $cc_basename in |
| 6966 | KCC*) |
| 6967 | # Kuck and Associates, Inc. (KAI) C++ Compiler |
| 6968 |
| 6969 | # KCC will only create a shared library if the output file |
| 6970 | # ends with ".so" (or ".sl" for HP-UX), so rename the library |
| 6971 | # to its proper name (with version) after linking. |
| 6972 | _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' |
| 6973 | _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' |
| 6974 | # Commands to make compiler produce verbose output that lists |
| 6975 | # what "hidden" libraries, object files and flags are used when |
| 6976 | # linking a shared library. |
| 6977 | # |
| 6978 | # There doesn't appear to be a way to prevent this compiler from |
| 6979 | # explicitly linking system object files so we need to strip them |
| 6980 | # from the output so that they don't get included in the library |
| 6981 | # dependencies. |
| 6982 | 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"' |
| 6983 |
| 6984 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' |
| 6985 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' |
| 6986 |
| 6987 | # Archives containing C++ object files must be created using |
| 6988 | # "CC -Bstatic", where "CC" is the KAI C++ compiler. |
| 6989 | _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' |
| 6990 | ;; |
| 6991 | icpc* | ecpc* ) |
| 6992 | # Intel C++ |
| 6993 | with_gnu_ld=yes |
| 6994 | # version 8.0 and above of icpc choke on multiply defined symbols |
| 6995 | # if we add $predep_objects and $postdep_objects, however 7.1 and |
| 6996 | # earlier do not add the objects themselves. |
| 6997 | case `$CC -V 2>&1` in |
| 6998 | *"Version 7."*) |
| 6999 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' |
| 7000 | _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' |
| 7001 | ;; |
| 7002 | *) # Version 8.0 or newer |
| 7003 | tmp_idyn= |
| 7004 | case $host_cpu in |
| 7005 | ia64*) tmp_idyn=' -i_dynamic';; |
| 7006 | esac |
| 7007 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' |
| 7008 | _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' |
| 7009 | ;; |
| 7010 | esac |
| 7011 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no |
| 7012 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' |
| 7013 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' |
| 7014 | _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' |
| 7015 | ;; |
| 7016 | pgCC* | pgcpp*) |
| 7017 | # Portland Group C++ compiler |
| 7018 | case `$CC -V` in |
| 7019 | *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) |
| 7020 | _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ |
| 7021 | rm -rf $tpldir~ |
| 7022 | $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ |
| 7023 | compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' |
| 7024 | _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ |
| 7025 | rm -rf $tpldir~ |
| 7026 | $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ |
| 7027 | $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ |
| 7028 | $RANLIB $oldlib' |
| 7029 | _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ |
| 7030 | rm -rf $tpldir~ |
| 7031 | $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ |
| 7032 | $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' |
| 7033 | _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ |
| 7034 | rm -rf $tpldir~ |
| 7035 | $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ |
| 7036 | $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' |
| 7037 | ;; |
| 7038 | *) # Version 6 and above use weak symbols |
| 7039 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' |
| 7040 | _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' |
| 7041 | ;; |
| 7042 | esac |
| 7043 |
| 7044 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' |
| 7045 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' |
| 7046 | _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' |
| 7047 | ;; |
| 7048 | cxx*) |
| 7049 | # Compaq C++ |
| 7050 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' |
| 7051 | _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' |
| 7052 |
| 7053 | runpath_var=LD_RUN_PATH |
| 7054 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' |
| 7055 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: |
| 7056 |
| 7057 | # Commands to make compiler produce verbose output that lists |
| 7058 | # what "hidden" libraries, object files and flags are used when |
| 7059 | # linking a shared library. |
| 7060 | # |
| 7061 | # There doesn't appear to be a way to prevent this compiler from |
| 7062 | # explicitly linking system object files so we need to strip them |
| 7063 | # from the output so that they don't get included in the library |
| 7064 | # dependencies. |
| 7065 | 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' |
| 7066 | ;; |
| 7067 | xl* | mpixl* | bgxl*) |
| 7068 | # IBM XL 8.0 on PPC, with GNU ld |
| 7069 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' |
| 7070 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' |
| 7071 | _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' |
| 7072 | if test yes = "$supports_anon_versioning"; then |
| 7073 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ |
| 7074 | cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ |
| 7075 | echo "local: *; };" >> $output_objdir/$libname.ver~ |
| 7076 | $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' |
| 7077 | fi |
| 7078 | ;; |
| 7079 | *) |
| 7080 | case `$CC -V 2>&1 | sed 5q` in |
| 7081 | *Sun\ C*) |
| 7082 | # Sun C++ 5.9 |
| 7083 | _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' |
| 7084 | _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' |
| 7085 | _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' |
| 7086 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
| 7087 | _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' |
| 7088 | _LT_TAGVAR(compiler_needs_object, $1)=yes |
| 7089 |
| 7090 | # Not sure whether something based on |
| 7091 | # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 |
| 7092 | # would be better. |
| 7093 | output_verbose_link_cmd='func_echo_all' |
| 7094 |
| 7095 | # Archives containing C++ object files must be created using |
| 7096 | # "CC -xar", where "CC" is the Sun C++ compiler. This is |
| 7097 | # necessary to make sure instantiated templates are included |
| 7098 | # in the archive. |
| 7099 | _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' |
| 7100 | ;; |
| 7101 | esac |
| 7102 | ;; |
| 7103 | esac |
| 7104 | ;; |
| 7105 |
| 7106 | lynxos*) |
| 7107 | # FIXME: insert proper C++ library support |
| 7108 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 7109 | ;; |
| 7110 |
| 7111 | m88k*) |
| 7112 | # FIXME: insert proper C++ library support |
| 7113 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 7114 | ;; |
| 7115 |
| 7116 | mvs*) |
| 7117 | case $cc_basename in |
| 7118 | cxx*) |
| 7119 | # FIXME: insert proper C++ library support |
| 7120 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 7121 | ;; |
| 7122 | *) |
| 7123 | # FIXME: insert proper C++ library support |
| 7124 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 7125 | ;; |
| 7126 | esac |
| 7127 | ;; |
| 7128 |
| 7129 | netbsd*) |
| 7130 | if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then |
| 7131 | _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' |
| 7132 | wlarc= |
| 7133 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
| 7134 | _LT_TAGVAR(hardcode_direct, $1)=yes |
| 7135 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 7136 | fi |
| 7137 | # Workaround some broken pre-1.5 toolchains |
| 7138 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' |
| 7139 | ;; |
| 7140 |
| 7141 | *nto* | *qnx*) |
| 7142 | _LT_TAGVAR(ld_shlibs, $1)=yes |
| 7143 | ;; |
| 7144 |
| 7145 | openbsd* | bitrig*) |
| 7146 | if test -f /usr/libexec/ld.so; then |
| 7147 | _LT_TAGVAR(hardcode_direct, $1)=yes |
| 7148 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 7149 | _LT_TAGVAR(hardcode_direct_absolute, $1)=yes |
| 7150 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' |
| 7151 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' |
| 7152 | if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then |
| 7153 | _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' |
| 7154 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' |
| 7155 | _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' |
| 7156 | fi |
| 7157 | output_verbose_link_cmd=func_echo_all |
| 7158 | else |
| 7159 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 7160 | fi |
| 7161 | ;; |
| 7162 |
| 7163 | osf3* | osf4* | osf5*) |
| 7164 | case $cc_basename in |
| 7165 | KCC*) |
| 7166 | # Kuck and Associates, Inc. (KAI) C++ Compiler |
| 7167 |
| 7168 | # KCC will only create a shared library if the output file |
| 7169 | # ends with ".so" (or ".sl" for HP-UX), so rename the library |
| 7170 | # to its proper name (with version) after linking. |
| 7171 | _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' |
| 7172 |
| 7173 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' |
| 7174 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: |
| 7175 |
| 7176 | # Archives containing C++ object files must be created using |
| 7177 | # the KAI C++ compiler. |
| 7178 | case $host in |
| 7179 | osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; |
| 7180 | *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; |
| 7181 | esac |
| 7182 | ;; |
| 7183 | RCC*) |
| 7184 | # Rational C++ 2.4.1 |
| 7185 | # FIXME: insert proper C++ library support |
| 7186 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 7187 | ;; |
| 7188 | cxx*) |
| 7189 | case $host in |
| 7190 | osf3*) |
| 7191 | _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' |
| 7192 | _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' |
| 7193 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' |
| 7194 | ;; |
| 7195 | *) |
| 7196 | _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' |
| 7197 | _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' |
| 7198 | _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ |
| 7199 | echo "-hidden">> $lib.exp~ |
| 7200 | $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~ |
| 7201 | $RM $lib.exp' |
| 7202 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' |
| 7203 | ;; |
| 7204 | esac |
| 7205 |
| 7206 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: |
| 7207 |
| 7208 | # Commands to make compiler produce verbose output that lists |
| 7209 | # what "hidden" libraries, object files and flags are used when |
| 7210 | # linking a shared library. |
| 7211 | # |
| 7212 | # There doesn't appear to be a way to prevent this compiler from |
| 7213 | # explicitly linking system object files so we need to strip them |
| 7214 | # from the output so that they don't get included in the library |
| 7215 | # dependencies. |
| 7216 | 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"' |
| 7217 | ;; |
| 7218 | *) |
| 7219 | if test yes,no = "$GXX,$with_gnu_ld"; then |
| 7220 | _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' |
| 7221 | case $host in |
| 7222 | osf3*) |
| 7223 | _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' |
| 7224 | ;; |
| 7225 | *) |
| 7226 | _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' |
| 7227 | ;; |
| 7228 | esac |
| 7229 |
| 7230 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' |
| 7231 | _LT_TAGVAR(hardcode_libdir_separator, $1)=: |
| 7232 |
| 7233 | # Commands to make compiler produce verbose output that lists |
| 7234 | # what "hidden" libraries, object files and flags are used when |
| 7235 | # linking a shared library. |
| 7236 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' |
| 7237 |
| 7238 | else |
| 7239 | # FIXME: insert proper C++ library support |
| 7240 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 7241 | fi |
| 7242 | ;; |
| 7243 | esac |
| 7244 | ;; |
| 7245 |
| 7246 | psos*) |
| 7247 | # FIXME: insert proper C++ library support |
| 7248 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 7249 | ;; |
| 7250 |
| 7251 | sunos4*) |
| 7252 | case $cc_basename in |
| 7253 | CC*) |
| 7254 | # Sun C++ 4.x |
| 7255 | # FIXME: insert proper C++ library support |
| 7256 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 7257 | ;; |
| 7258 | lcc*) |
| 7259 | # Lucid |
| 7260 | # FIXME: insert proper C++ library support |
| 7261 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 7262 | ;; |
| 7263 | *) |
| 7264 | # FIXME: insert proper C++ library support |
| 7265 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 7266 | ;; |
| 7267 | esac |
| 7268 | ;; |
| 7269 |
| 7270 | solaris*) |
| 7271 | case $cc_basename in |
| 7272 | CC* | sunCC*) |
| 7273 | # Sun C++ 4.2, 5.x and Centerline C++ |
| 7274 | _LT_TAGVAR(archive_cmds_need_lc,$1)=yes |
| 7275 | _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' |
| 7276 | _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' |
| 7277 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ |
| 7278 | $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' |
| 7279 |
| 7280 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' |
| 7281 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 7282 | case $host_os in |
| 7283 | solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; |
| 7284 | *) |
| 7285 | # The compiler driver will combine and reorder linker options, |
| 7286 | # but understands '-z linker_flag'. |
| 7287 | # Supported since Solaris 2.6 (maybe 2.5.1?) |
| 7288 | _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' |
| 7289 | ;; |
| 7290 | esac |
| 7291 | _LT_TAGVAR(link_all_deplibs, $1)=yes |
| 7292 |
| 7293 | output_verbose_link_cmd='func_echo_all' |
| 7294 |
| 7295 | # Archives containing C++ object files must be created using |
| 7296 | # "CC -xar", where "CC" is the Sun C++ compiler. This is |
| 7297 | # necessary to make sure instantiated templates are included |
| 7298 | # in the archive. |
| 7299 | _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' |
| 7300 | ;; |
| 7301 | gcx*) |
| 7302 | # Green Hills C++ Compiler |
| 7303 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' |
| 7304 |
| 7305 | # The C++ compiler must be used to create the archive. |
| 7306 | _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' |
| 7307 | ;; |
| 7308 | *) |
| 7309 | # GNU C++ compiler with Solaris linker |
| 7310 | if test yes,no = "$GXX,$with_gnu_ld"; then |
| 7311 | _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' |
| 7312 | if $CC --version | $GREP -v '^2\.7' > /dev/null; then |
| 7313 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' |
| 7314 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ |
| 7315 | $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' |
| 7316 |
| 7317 | # Commands to make compiler produce verbose output that lists |
| 7318 | # what "hidden" libraries, object files and flags are used when |
| 7319 | # linking a shared library. |
| 7320 | output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' |
| 7321 | else |
| 7322 | # g++ 2.7 appears to require '-G' NOT '-shared' on this |
| 7323 | # platform. |
| 7324 | _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' |
| 7325 | _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ |
| 7326 | $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' |
| 7327 |
| 7328 | # Commands to make compiler produce verbose output that lists |
| 7329 | # what "hidden" libraries, object files and flags are used when |
| 7330 | # linking a shared library. |
| 7331 | output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' |
| 7332 | fi |
| 7333 |
| 7334 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' |
| 7335 | case $host_os in |
| 7336 | solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; |
| 7337 | *) |
| 7338 | _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' |
| 7339 | ;; |
| 7340 | esac |
| 7341 | fi |
| 7342 | ;; |
| 7343 | esac |
| 7344 | ;; |
| 7345 |
| 7346 | sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) |
| 7347 | _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' |
| 7348 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no |
| 7349 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 7350 | runpath_var='LD_RUN_PATH' |
| 7351 |
| 7352 | case $cc_basename in |
| 7353 | CC*) |
| 7354 | _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 7355 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 7356 | ;; |
| 7357 | *) |
| 7358 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 7359 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 7360 | ;; |
| 7361 | esac |
| 7362 | ;; |
| 7363 |
| 7364 | sysv5* | sco3.2v5* | sco5v6*) |
| 7365 | # Note: We CANNOT use -z defs as we might desire, because we do not |
| 7366 | # link with -lc, and that would cause any symbols used from libc to |
| 7367 | # always be unresolved, which means just about no library would |
| 7368 | # ever link correctly. If we're not using GNU ld we use -z text |
| 7369 | # though, which does catch some bad symbols but isn't as heavy-handed |
| 7370 | # as -z defs. |
| 7371 | _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' |
| 7372 | _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' |
| 7373 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no |
| 7374 | _LT_TAGVAR(hardcode_shlibpath_var, $1)=no |
| 7375 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' |
| 7376 | _LT_TAGVAR(hardcode_libdir_separator, $1)=':' |
| 7377 | _LT_TAGVAR(link_all_deplibs, $1)=yes |
| 7378 | _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' |
| 7379 | runpath_var='LD_RUN_PATH' |
| 7380 |
| 7381 | case $cc_basename in |
| 7382 | CC*) |
| 7383 | _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 7384 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 7385 | _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ |
| 7386 | '"$_LT_TAGVAR(old_archive_cmds, $1)" |
| 7387 | _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ |
| 7388 | '"$_LT_TAGVAR(reload_cmds, $1)" |
| 7389 | ;; |
| 7390 | *) |
| 7391 | _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 7392 | _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' |
| 7393 | ;; |
| 7394 | esac |
| 7395 | ;; |
| 7396 |
| 7397 | tandem*) |
| 7398 | case $cc_basename in |
| 7399 | NCC*) |
| 7400 | # NonStop-UX NCC 3.20 |
| 7401 | # FIXME: insert proper C++ library support |
| 7402 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 7403 | ;; |
| 7404 | *) |
| 7405 | # FIXME: insert proper C++ library support |
| 7406 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 7407 | ;; |
| 7408 | esac |
| 7409 | ;; |
| 7410 |
| 7411 | vxworks*) |
| 7412 | # FIXME: insert proper C++ library support |
| 7413 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 7414 | ;; |
| 7415 |
| 7416 | *) |
| 7417 | # FIXME: insert proper C++ library support |
| 7418 | _LT_TAGVAR(ld_shlibs, $1)=no |
| 7419 | ;; |
| 7420 | esac |
| 7421 |
| 7422 | AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) |
| 7423 | test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no |
| 7424 |
| 7425 | _LT_TAGVAR(GCC, $1)=$GXX |
| 7426 | _LT_TAGVAR(LD, $1)=$LD |
| 7427 |
| 7428 | ## CAVEAT EMPTOR: |
| 7429 | ## There is no encapsulation within the following macros, do not change |
| 7430 | ## the running order or otherwise move them around unless you know exactly |
| 7431 | ## what you are doing... |
| 7432 | _LT_SYS_HIDDEN_LIBDEPS($1) |
| 7433 | _LT_COMPILER_PIC($1) |
| 7434 | _LT_COMPILER_C_O($1) |
| 7435 | _LT_COMPILER_FILE_LOCKS($1) |
| 7436 | _LT_LINKER_SHLIBS($1) |
| 7437 | _LT_SYS_DYNAMIC_LINKER($1) |
| 7438 | _LT_LINKER_HARDCODE_LIBPATH($1) |
| 7439 |
| 7440 | _LT_CONFIG($1) |
| 7441 | fi # test -n "$compiler" |
| 7442 |
| 7443 | CC=$lt_save_CC |
| 7444 | CFLAGS=$lt_save_CFLAGS |
| 7445 | LDCXX=$LD |
| 7446 | LD=$lt_save_LD |
| 7447 | GCC=$lt_save_GCC |
| 7448 | with_gnu_ld=$lt_save_with_gnu_ld |
| 7449 | lt_cv_path_LDCXX=$lt_cv_path_LD |
| 7450 | lt_cv_path_LD=$lt_save_path_LD |
| 7451 | lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld |
| 7452 | lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld |
| 7453 | fi # test yes != "$_lt_caught_CXX_error" |
| 7454 |
| 7455 | AC_LANG_POP |
| 7456 | ])# _LT_LANG_CXX_CONFIG |
| 7457 |
| 7458 |
| 7459 | # _LT_FUNC_STRIPNAME_CNF |
| 7460 | # ---------------------- |
| 7461 | # func_stripname_cnf prefix suffix name |
| 7462 | # strip PREFIX and SUFFIX off of NAME. |
| 7463 | # PREFIX and SUFFIX must not contain globbing or regex special |
| 7464 | # characters, hashes, percent signs, but SUFFIX may contain a leading |
| 7465 | # dot (in which case that matches only a dot). |
| 7466 | # |
| 7467 | # This function is identical to the (non-XSI) version of func_stripname, |
| 7468 | # except this one can be used by m4 code that may be executed by configure, |
| 7469 | # rather than the libtool script. |
| 7470 | m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl |
| 7471 | AC_REQUIRE([_LT_DECL_SED]) |
| 7472 | AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) |
| 7473 | func_stripname_cnf () |
| 7474 | { |
| 7475 | case @S|@2 in |
| 7476 | .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; |
| 7477 | *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; |
| 7478 | esac |
| 7479 | } # func_stripname_cnf |
| 7480 | ])# _LT_FUNC_STRIPNAME_CNF |
| 7481 |
| 7482 |
| 7483 | # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) |
| 7484 | # --------------------------------- |
| 7485 | # Figure out "hidden" library dependencies from verbose |
| 7486 | # compiler output when linking a shared library. |
| 7487 | # Parse the compiler output and extract the necessary |
| 7488 | # objects, libraries and library flags. |
| 7489 | m4_defun([_LT_SYS_HIDDEN_LIBDEPS], |
| 7490 | [m4_require([_LT_FILEUTILS_DEFAULTS])dnl |
| 7491 | AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl |
| 7492 | # Dependencies to place before and after the object being linked: |
| 7493 | _LT_TAGVAR(predep_objects, $1)= |
| 7494 | _LT_TAGVAR(postdep_objects, $1)= |
| 7495 | _LT_TAGVAR(predeps, $1)= |
| 7496 | _LT_TAGVAR(postdeps, $1)= |
| 7497 | _LT_TAGVAR(compiler_lib_search_path, $1)= |
| 7498 |
| 7499 | dnl we can't use the lt_simple_compile_test_code here, |
| 7500 | dnl because it contains code intended for an executable, |
| 7501 | dnl not a library. It's possible we should let each |
| 7502 | dnl tag define a new lt_????_link_test_code variable, |
| 7503 | dnl but it's only used here... |
| 7504 | m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF |
| 7505 | int a; |
| 7506 | void foo (void) { a = 0; } |
| 7507 | _LT_EOF |
| 7508 | ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF |
| 7509 | class Foo |
| 7510 | { |
| 7511 | public: |
| 7512 | Foo (void) { a = 0; } |
| 7513 | private: |
| 7514 | int a; |
| 7515 | }; |
| 7516 | _LT_EOF |
| 7517 | ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF |
| 7518 | subroutine foo |
| 7519 | implicit none |
| 7520 | integer*4 a |
| 7521 | a=0 |
| 7522 | return |
| 7523 | end |
| 7524 | _LT_EOF |
| 7525 | ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF |
| 7526 | subroutine foo |
| 7527 | implicit none |
| 7528 | integer a |
| 7529 | a=0 |
| 7530 | return |
| 7531 | end |
| 7532 | _LT_EOF |
| 7533 | ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF |
| 7534 | public class foo { |
| 7535 | private int a; |
| 7536 | public void bar (void) { |
| 7537 | a = 0; |
| 7538 | } |
| 7539 | }; |
| 7540 | _LT_EOF |
| 7541 | ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF |
| 7542 | package foo |
| 7543 | func foo() { |
| 7544 | } |
| 7545 | _LT_EOF |
| 7546 | ]) |
| 7547 |
| 7548 | _lt_libdeps_save_CFLAGS=$CFLAGS |
| 7549 | case "$CC $CFLAGS " in #( |
| 7550 | *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; |
| 7551 | *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; |
| 7552 | *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; |
| 7553 | esac |
| 7554 |
| 7555 | dnl Parse the compiler output and extract the necessary |
| 7556 | dnl objects, libraries and library flags. |
| 7557 | if AC_TRY_EVAL(ac_compile); then |
| 7558 | # Parse the compiler output and extract the necessary |
| 7559 | # objects, libraries and library flags. |
| 7560 |
| 7561 | # Sentinel used to keep track of whether or not we are before |
| 7562 | # the conftest object file. |
| 7563 | pre_test_object_deps_done=no |
| 7564 |
| 7565 | for p in `eval "$output_verbose_link_cmd"`; do |
| 7566 | case $prev$p in |
| 7567 |
| 7568 | -L* | -R* | -l*) |
| 7569 | # Some compilers place space between "-{L,R}" and the path. |
| 7570 | # Remove the space. |
| 7571 | if test x-L = "$p" || |
| 7572 | test x-R = "$p"; then |
| 7573 | prev=$p |
| 7574 | continue |
| 7575 | fi |
| 7576 |
| 7577 | # Expand the sysroot to ease extracting the directories later. |
| 7578 | if test -z "$prev"; then |
| 7579 | case $p in |
| 7580 | -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; |
| 7581 | -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; |
| 7582 | -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; |
| 7583 | esac |
| 7584 | fi |
| 7585 | case $p in |
| 7586 | =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; |
| 7587 | esac |
| 7588 | if test no = "$pre_test_object_deps_done"; then |
| 7589 | case $prev in |
| 7590 | -L | -R) |
| 7591 | # Internal compiler library paths should come after those |
| 7592 | # provided the user. The postdeps already come after the |
| 7593 | # user supplied libs so there is no need to process them. |
| 7594 | if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then |
| 7595 | _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p |
| 7596 | else |
| 7597 | _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" |
| 7598 | fi |
| 7599 | ;; |
| 7600 | # The "-l" case would never come before the object being |
| 7601 | # linked, so don't bother handling this case. |
| 7602 | esac |
| 7603 | else |
| 7604 | if test -z "$_LT_TAGVAR(postdeps, $1)"; then |
| 7605 | _LT_TAGVAR(postdeps, $1)=$prev$p |
| 7606 | else |
| 7607 | _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" |
| 7608 | fi |
| 7609 | fi |
| 7610 | prev= |
| 7611 | ;; |
| 7612 |
| 7613 | *.lto.$objext) ;; # Ignore GCC LTO objects |
| 7614 | *.$objext) |
| 7615 | # This assumes that the test object file only shows up |
| 7616 | # once in the compiler output. |
| 7617 | if test "$p" = "conftest.$objext"; then |
| 7618 | pre_test_object_deps_done=yes |
| 7619 | continue |
| 7620 | fi |
| 7621 |
| 7622 | if test no = "$pre_test_object_deps_done"; then |
| 7623 | if test -z "$_LT_TAGVAR(predep_objects, $1)"; then |
| 7624 | _LT_TAGVAR(predep_objects, $1)=$p |
| 7625 | else |
| 7626 | _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" |
| 7627 | fi |
| 7628 | else |
| 7629 | if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then |
| 7630 | _LT_TAGVAR(postdep_objects, $1)=$p |
| 7631 | else |
| 7632 | _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" |
| 7633 | fi |
| 7634 | fi |
| 7635 | ;; |
| 7636 |
| 7637 | *) ;; # Ignore the rest. |
| 7638 |
| 7639 | esac |
| 7640 | done |
| 7641 |
| 7642 | # Clean up. |
| 7643 | rm -f a.out a.exe |
| 7644 | else |
| 7645 | echo "libtool.m4: error: problem compiling $1 test program" |
| 7646 | fi |
| 7647 |
| 7648 | $RM -f confest.$objext |
| 7649 | CFLAGS=$_lt_libdeps_save_CFLAGS |
| 7650 |
| 7651 | # PORTME: override above test on systems where it is broken |
| 7652 | m4_if([$1], [CXX], |
| 7653 | [case $host_os in |
| 7654 | interix[[3-9]]*) |
| 7655 | # Interix 3.5 installs completely hosed .la files for C++, so rather than |
| 7656 | # hack all around it, let's just trust "g++" to DTRT. |
| 7657 | _LT_TAGVAR(predep_objects,$1)= |
| 7658 | _LT_TAGVAR(postdep_objects,$1)= |
| 7659 | _LT_TAGVAR(postdeps,$1)= |
| 7660 | ;; |
| 7661 | esac |
| 7662 | ]) |
| 7663 |
| 7664 | case " $_LT_TAGVAR(postdeps, $1) " in |
| 7665 | *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; |
| 7666 | esac |
| 7667 | _LT_TAGVAR(compiler_lib_search_dirs, $1)= |
| 7668 | if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then |
| 7669 | _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` |
| 7670 | fi |
| 7671 | _LT_TAGDECL([], [compiler_lib_search_dirs], [1], |
| 7672 | [The directories searched by this compiler when creating a shared library]) |
| 7673 | _LT_TAGDECL([], [predep_objects], [1], |
| 7674 | [Dependencies to place before and after the objects being linked to |
| 7675 | create a shared library]) |
| 7676 | _LT_TAGDECL([], [postdep_objects], [1]) |
| 7677 | _LT_TAGDECL([], [predeps], [1]) |
| 7678 | _LT_TAGDECL([], [postdeps], [1]) |
| 7679 | _LT_TAGDECL([], [compiler_lib_search_path], [1], |
| 7680 | [The library search path used internally by the compiler when linking |
| 7681 | a shared library]) |
| 7682 | ])# _LT_SYS_HIDDEN_LIBDEPS |
| 7683 |
| 7684 |
| 7685 | # _LT_LANG_F77_CONFIG([TAG]) |
| 7686 | # -------------------------- |
| 7687 | # Ensure that the configuration variables for a Fortran 77 compiler are |
| 7688 | # suitably defined. These variables are subsequently used by _LT_CONFIG |
| 7689 | # to write the compiler configuration to 'libtool'. |
| 7690 | m4_defun([_LT_LANG_F77_CONFIG], |
| 7691 | [AC_LANG_PUSH(Fortran 77) |
| 7692 | if test -z "$F77" || test no = "$F77"; then |
| 7693 | _lt_disable_F77=yes |
| 7694 | fi |
| 7695 |
| 7696 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no |
| 7697 | _LT_TAGVAR(allow_undefined_flag, $1)= |
| 7698 | _LT_TAGVAR(always_export_symbols, $1)=no |
| 7699 | _LT_TAGVAR(archive_expsym_cmds, $1)= |
| 7700 | _LT_TAGVAR(export_dynamic_flag_spec, $1)= |
| 7701 | _LT_TAGVAR(hardcode_direct, $1)=no |
| 7702 | _LT_TAGVAR(hardcode_direct_absolute, $1)=no |
| 7703 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= |
| 7704 | _LT_TAGVAR(hardcode_libdir_separator, $1)= |
| 7705 | _LT_TAGVAR(hardcode_minus_L, $1)=no |
| 7706 | _LT_TAGVAR(hardcode_automatic, $1)=no |
| 7707 | _LT_TAGVAR(inherit_rpath, $1)=no |
| 7708 | _LT_TAGVAR(module_cmds, $1)= |
| 7709 | _LT_TAGVAR(module_expsym_cmds, $1)= |
| 7710 | _LT_TAGVAR(link_all_deplibs, $1)=unknown |
| 7711 | _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds |
| 7712 | _LT_TAGVAR(reload_flag, $1)=$reload_flag |
| 7713 | _LT_TAGVAR(reload_cmds, $1)=$reload_cmds |
| 7714 | _LT_TAGVAR(no_undefined_flag, $1)= |
| 7715 | _LT_TAGVAR(whole_archive_flag_spec, $1)= |
| 7716 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no |
| 7717 |
| 7718 | # Source file extension for f77 test sources. |
| 7719 | ac_ext=f |
| 7720 |
| 7721 | # Object file extension for compiled f77 test sources. |
| 7722 | objext=o |
| 7723 | _LT_TAGVAR(objext, $1)=$objext |
| 7724 |
| 7725 | # No sense in running all these tests if we already determined that |
| 7726 | # the F77 compiler isn't working. Some variables (like enable_shared) |
| 7727 | # are currently assumed to apply to all compilers on this platform, |
| 7728 | # and will be corrupted by setting them based on a non-working compiler. |
| 7729 | if test yes != "$_lt_disable_F77"; then |
| 7730 | # Code to be used in simple compile tests |
| 7731 | lt_simple_compile_test_code="\ |
| 7732 | subroutine t |
| 7733 | return |
| 7734 | end |
| 7735 | " |
| 7736 |
| 7737 | # Code to be used in simple link tests |
| 7738 | lt_simple_link_test_code="\ |
| 7739 | program t |
| 7740 | end |
| 7741 | " |
| 7742 |
| 7743 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. |
| 7744 | _LT_TAG_COMPILER |
| 7745 |
| 7746 | # save warnings/boilerplate of simple test code |
| 7747 | _LT_COMPILER_BOILERPLATE |
| 7748 | _LT_LINKER_BOILERPLATE |
| 7749 |
| 7750 | # Allow CC to be a program name with arguments. |
| 7751 | lt_save_CC=$CC |
| 7752 | lt_save_GCC=$GCC |
| 7753 | lt_save_CFLAGS=$CFLAGS |
| 7754 | CC=${F77-"f77"} |
| 7755 | CFLAGS=$FFLAGS |
| 7756 | compiler=$CC |
| 7757 | _LT_TAGVAR(compiler, $1)=$CC |
| 7758 | _LT_CC_BASENAME([$compiler]) |
| 7759 | GCC=$G77 |
| 7760 | if test -n "$compiler"; then |
| 7761 | AC_MSG_CHECKING([if libtool supports shared libraries]) |
| 7762 | AC_MSG_RESULT([$can_build_shared]) |
| 7763 |
| 7764 | AC_MSG_CHECKING([whether to build shared libraries]) |
| 7765 | test no = "$can_build_shared" && enable_shared=no |
| 7766 |
| 7767 | # On AIX, shared libraries and static libraries use the same namespace, and |
| 7768 | # are all built from PIC. |
| 7769 | case $host_os in |
| 7770 | aix3*) |
| 7771 | test yes = "$enable_shared" && enable_static=no |
| 7772 | if test -n "$RANLIB"; then |
| 7773 | archive_cmds="$archive_cmds~\$RANLIB \$lib" |
| 7774 | postinstall_cmds='$RANLIB $lib' |
| 7775 | fi |
| 7776 | ;; |
| 7777 | aix[[4-9]]*) |
| 7778 | if test ia64 != "$host_cpu"; then |
| 7779 | case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in |
| 7780 | yes,aix,yes) ;; # shared object as lib.so file only |
| 7781 | yes,svr4,*) ;; # shared object as lib.so archive member only |
| 7782 | yes,*) enable_static=no ;; # shared object in lib.a archive as well |
| 7783 | esac |
| 7784 | fi |
| 7785 | ;; |
| 7786 | esac |
| 7787 | AC_MSG_RESULT([$enable_shared]) |
| 7788 |
| 7789 | AC_MSG_CHECKING([whether to build static libraries]) |
| 7790 | # Make sure either enable_shared or enable_static is yes. |
| 7791 | test yes = "$enable_shared" || enable_static=yes |
| 7792 | AC_MSG_RESULT([$enable_static]) |
| 7793 |
| 7794 | _LT_TAGVAR(GCC, $1)=$G77 |
| 7795 | _LT_TAGVAR(LD, $1)=$LD |
| 7796 |
| 7797 | ## CAVEAT EMPTOR: |
| 7798 | ## There is no encapsulation within the following macros, do not change |
| 7799 | ## the running order or otherwise move them around unless you know exactly |
| 7800 | ## what you are doing... |
| 7801 | _LT_COMPILER_PIC($1) |
| 7802 | _LT_COMPILER_C_O($1) |
| 7803 | _LT_COMPILER_FILE_LOCKS($1) |
| 7804 | _LT_LINKER_SHLIBS($1) |
| 7805 | _LT_SYS_DYNAMIC_LINKER($1) |
| 7806 | _LT_LINKER_HARDCODE_LIBPATH($1) |
| 7807 |
| 7808 | _LT_CONFIG($1) |
| 7809 | fi # test -n "$compiler" |
| 7810 |
| 7811 | GCC=$lt_save_GCC |
| 7812 | CC=$lt_save_CC |
| 7813 | CFLAGS=$lt_save_CFLAGS |
| 7814 | fi # test yes != "$_lt_disable_F77" |
| 7815 |
| 7816 | AC_LANG_POP |
| 7817 | ])# _LT_LANG_F77_CONFIG |
| 7818 |
| 7819 |
| 7820 | # _LT_LANG_FC_CONFIG([TAG]) |
| 7821 | # ------------------------- |
| 7822 | # Ensure that the configuration variables for a Fortran compiler are |
| 7823 | # suitably defined. These variables are subsequently used by _LT_CONFIG |
| 7824 | # to write the compiler configuration to 'libtool'. |
| 7825 | m4_defun([_LT_LANG_FC_CONFIG], |
| 7826 | [AC_LANG_PUSH(Fortran) |
| 7827 |
| 7828 | if test -z "$FC" || test no = "$FC"; then |
| 7829 | _lt_disable_FC=yes |
| 7830 | fi |
| 7831 |
| 7832 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no |
| 7833 | _LT_TAGVAR(allow_undefined_flag, $1)= |
| 7834 | _LT_TAGVAR(always_export_symbols, $1)=no |
| 7835 | _LT_TAGVAR(archive_expsym_cmds, $1)= |
| 7836 | _LT_TAGVAR(export_dynamic_flag_spec, $1)= |
| 7837 | _LT_TAGVAR(hardcode_direct, $1)=no |
| 7838 | _LT_TAGVAR(hardcode_direct_absolute, $1)=no |
| 7839 | _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= |
| 7840 | _LT_TAGVAR(hardcode_libdir_separator, $1)= |
| 7841 | _LT_TAGVAR(hardcode_minus_L, $1)=no |
| 7842 | _LT_TAGVAR(hardcode_automatic, $1)=no |
| 7843 | _LT_TAGVAR(inherit_rpath, $1)=no |
| 7844 | _LT_TAGVAR(module_cmds, $1)= |
| 7845 | _LT_TAGVAR(module_expsym_cmds, $1)= |
| 7846 | _LT_TAGVAR(link_all_deplibs, $1)=unknown |
| 7847 | _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds |
| 7848 | _LT_TAGVAR(reload_flag, $1)=$reload_flag |
| 7849 | _LT_TAGVAR(reload_cmds, $1)=$reload_cmds |
| 7850 | _LT_TAGVAR(no_undefined_flag, $1)= |
| 7851 | _LT_TAGVAR(whole_archive_flag_spec, $1)= |
| 7852 | _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no |
| 7853 |
| 7854 | # Source file extension for fc test sources. |
| 7855 | ac_ext=${ac_fc_srcext-f} |
| 7856 |
| 7857 | # Object file extension for compiled fc test sources. |
| 7858 | objext=o |
| 7859 | _LT_TAGVAR(objext, $1)=$objext |
| 7860 |
| 7861 | # No sense in running all these tests if we already determined that |
| 7862 | # the FC compiler isn't working. Some variables (like enable_shared) |
| 7863 | # are currently assumed to apply to all compilers on this platform, |
| 7864 | # and will be corrupted by setting them based on a non-working compiler. |
| 7865 | if test yes != "$_lt_disable_FC"; then |
| 7866 | # Code to be used in simple compile tests |
| 7867 | lt_simple_compile_test_code="\ |
| 7868 | subroutine t |
| 7869 | return |
| 7870 | end |
| 7871 | " |
| 7872 |
| 7873 | # Code to be used in simple link tests |
| 7874 | lt_simple_link_test_code="\ |
| 7875 | program t |
| 7876 | end |
| 7877 | " |
| 7878 |
| 7879 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. |
| 7880 | _LT_TAG_COMPILER |
| 7881 |
| 7882 | # save warnings/boilerplate of simple test code |
| 7883 | _LT_COMPILER_BOILERPLATE |
| 7884 | _LT_LINKER_BOILERPLATE |
| 7885 |
| 7886 | # Allow CC to be a program name with arguments. |
| 7887 | lt_save_CC=$CC |
| 7888 | lt_save_GCC=$GCC |
| 7889 | lt_save_CFLAGS=$CFLAGS |
| 7890 | CC=${FC-"f95"} |
| 7891 | CFLAGS=$FCFLAGS |
| 7892 | compiler=$CC |
| 7893 | GCC=$ac_cv_fc_compiler_gnu |
| 7894 |
| 7895 | _LT_TAGVAR(compiler, $1)=$CC |
| 7896 | _LT_CC_BASENAME([$compiler]) |
| 7897 |
| 7898 | if test -n "$compiler"; then |
| 7899 | AC_MSG_CHECKING([if libtool supports shared libraries]) |
| 7900 | AC_MSG_RESULT([$can_build_shared]) |
| 7901 |
| 7902 | AC_MSG_CHECKING([whether to build shared libraries]) |
| 7903 | test no = "$can_build_shared" && enable_shared=no |
| 7904 |
| 7905 | # On AIX, shared libraries and static libraries use the same namespace, and |
| 7906 | # are all built from PIC. |
| 7907 | case $host_os in |
| 7908 | aix3*) |
| 7909 | test yes = "$enable_shared" && enable_static=no |
| 7910 | if test -n "$RANLIB"; then |
| 7911 | archive_cmds="$archive_cmds~\$RANLIB \$lib" |
| 7912 | postinstall_cmds='$RANLIB $lib' |
| 7913 | fi |
| 7914 | ;; |
| 7915 | aix[[4-9]]*) |
| 7916 | if test ia64 != "$host_cpu"; then |
| 7917 | case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in |
| 7918 | yes,aix,yes) ;; # shared object as lib.so file only |
| 7919 | yes,svr4,*) ;; # shared object as lib.so archive member only |
| 7920 | yes,*) enable_static=no ;; # shared object in lib.a archive as well |
| 7921 | esac |
| 7922 | fi |
| 7923 | ;; |
| 7924 | esac |
| 7925 | AC_MSG_RESULT([$enable_shared]) |
| 7926 |
| 7927 | AC_MSG_CHECKING([whether to build static libraries]) |
| 7928 | # Make sure either enable_shared or enable_static is yes. |
| 7929 | test yes = "$enable_shared" || enable_static=yes |
| 7930 | AC_MSG_RESULT([$enable_static]) |
| 7931 |
| 7932 | _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu |
| 7933 | _LT_TAGVAR(LD, $1)=$LD |
| 7934 |
| 7935 | ## CAVEAT EMPTOR: |
| 7936 | ## There is no encapsulation within the following macros, do not change |
| 7937 | ## the running order or otherwise move them around unless you know exactly |
| 7938 | ## what you are doing... |
| 7939 | _LT_SYS_HIDDEN_LIBDEPS($1) |
| 7940 | _LT_COMPILER_PIC($1) |
| 7941 | _LT_COMPILER_C_O($1) |
| 7942 | _LT_COMPILER_FILE_LOCKS($1) |
| 7943 | _LT_LINKER_SHLIBS($1) |
| 7944 | _LT_SYS_DYNAMIC_LINKER($1) |
| 7945 | _LT_LINKER_HARDCODE_LIBPATH($1) |
| 7946 |
| 7947 | _LT_CONFIG($1) |
| 7948 | fi # test -n "$compiler" |
| 7949 |
| 7950 | GCC=$lt_save_GCC |
| 7951 | CC=$lt_save_CC |
| 7952 | CFLAGS=$lt_save_CFLAGS |
| 7953 | fi # test yes != "$_lt_disable_FC" |
| 7954 |
| 7955 | AC_LANG_POP |
| 7956 | ])# _LT_LANG_FC_CONFIG |
| 7957 |
| 7958 |
| 7959 | # _LT_LANG_GCJ_CONFIG([TAG]) |
| 7960 | # -------------------------- |
| 7961 | # Ensure that the configuration variables for the GNU Java Compiler compiler |
| 7962 | # are suitably defined. These variables are subsequently used by _LT_CONFIG |
| 7963 | # to write the compiler configuration to 'libtool'. |
| 7964 | m4_defun([_LT_LANG_GCJ_CONFIG], |
| 7965 | [AC_REQUIRE([LT_PROG_GCJ])dnl |
| 7966 | AC_LANG_SAVE |
| 7967 |
| 7968 | # Source file extension for Java test sources. |
| 7969 | ac_ext=java |
| 7970 |
| 7971 | # Object file extension for compiled Java test sources. |
| 7972 | objext=o |
| 7973 | _LT_TAGVAR(objext, $1)=$objext |
| 7974 |
| 7975 | # Code to be used in simple compile tests |
| 7976 | lt_simple_compile_test_code="class foo {}" |
| 7977 |
| 7978 | # Code to be used in simple link tests |
| 7979 | lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' |
| 7980 |
| 7981 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. |
| 7982 | _LT_TAG_COMPILER |
| 7983 |
| 7984 | # save warnings/boilerplate of simple test code |
| 7985 | _LT_COMPILER_BOILERPLATE |
| 7986 | _LT_LINKER_BOILERPLATE |
| 7987 |
| 7988 | # Allow CC to be a program name with arguments. |
| 7989 | lt_save_CC=$CC |
| 7990 | lt_save_CFLAGS=$CFLAGS |
| 7991 | lt_save_GCC=$GCC |
| 7992 | GCC=yes |
| 7993 | CC=${GCJ-"gcj"} |
| 7994 | CFLAGS=$GCJFLAGS |
| 7995 | compiler=$CC |
| 7996 | _LT_TAGVAR(compiler, $1)=$CC |
| 7997 | _LT_TAGVAR(LD, $1)=$LD |
| 7998 | _LT_CC_BASENAME([$compiler]) |
| 7999 |
| 8000 | # GCJ did not exist at the time GCC didn't implicitly link libc in. |
| 8001 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no |
| 8002 |
| 8003 | _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds |
| 8004 | _LT_TAGVAR(reload_flag, $1)=$reload_flag |
| 8005 | _LT_TAGVAR(reload_cmds, $1)=$reload_cmds |
| 8006 |
| 8007 | if test -n "$compiler"; then |
| 8008 | _LT_COMPILER_NO_RTTI($1) |
| 8009 | _LT_COMPILER_PIC($1) |
| 8010 | _LT_COMPILER_C_O($1) |
| 8011 | _LT_COMPILER_FILE_LOCKS($1) |
| 8012 | _LT_LINKER_SHLIBS($1) |
| 8013 | _LT_LINKER_HARDCODE_LIBPATH($1) |
| 8014 |
| 8015 | _LT_CONFIG($1) |
| 8016 | fi |
| 8017 |
| 8018 | AC_LANG_RESTORE |
| 8019 |
| 8020 | GCC=$lt_save_GCC |
| 8021 | CC=$lt_save_CC |
| 8022 | CFLAGS=$lt_save_CFLAGS |
| 8023 | ])# _LT_LANG_GCJ_CONFIG |
| 8024 |
| 8025 |
| 8026 | # _LT_LANG_GO_CONFIG([TAG]) |
| 8027 | # -------------------------- |
| 8028 | # Ensure that the configuration variables for the GNU Go compiler |
| 8029 | # are suitably defined. These variables are subsequently used by _LT_CONFIG |
| 8030 | # to write the compiler configuration to 'libtool'. |
| 8031 | m4_defun([_LT_LANG_GO_CONFIG], |
| 8032 | [AC_REQUIRE([LT_PROG_GO])dnl |
| 8033 | AC_LANG_SAVE |
| 8034 |
| 8035 | # Source file extension for Go test sources. |
| 8036 | ac_ext=go |
| 8037 |
| 8038 | # Object file extension for compiled Go test sources. |
| 8039 | objext=o |
| 8040 | _LT_TAGVAR(objext, $1)=$objext |
| 8041 |
| 8042 | # Code to be used in simple compile tests |
| 8043 | lt_simple_compile_test_code="package main; func main() { }" |
| 8044 |
| 8045 | # Code to be used in simple link tests |
| 8046 | lt_simple_link_test_code='package main; func main() { }' |
| 8047 |
| 8048 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. |
| 8049 | _LT_TAG_COMPILER |
| 8050 |
| 8051 | # save warnings/boilerplate of simple test code |
| 8052 | _LT_COMPILER_BOILERPLATE |
| 8053 | _LT_LINKER_BOILERPLATE |
| 8054 |
| 8055 | # Allow CC to be a program name with arguments. |
| 8056 | lt_save_CC=$CC |
| 8057 | lt_save_CFLAGS=$CFLAGS |
| 8058 | lt_save_GCC=$GCC |
| 8059 | GCC=yes |
| 8060 | CC=${GOC-"gccgo"} |
| 8061 | CFLAGS=$GOFLAGS |
| 8062 | compiler=$CC |
| 8063 | _LT_TAGVAR(compiler, $1)=$CC |
| 8064 | _LT_TAGVAR(LD, $1)=$LD |
| 8065 | _LT_CC_BASENAME([$compiler]) |
| 8066 |
| 8067 | # Go did not exist at the time GCC didn't implicitly link libc in. |
| 8068 | _LT_TAGVAR(archive_cmds_need_lc, $1)=no |
| 8069 |
| 8070 | _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds |
| 8071 | _LT_TAGVAR(reload_flag, $1)=$reload_flag |
| 8072 | _LT_TAGVAR(reload_cmds, $1)=$reload_cmds |
| 8073 |
| 8074 | if test -n "$compiler"; then |
| 8075 | _LT_COMPILER_NO_RTTI($1) |
| 8076 | _LT_COMPILER_PIC($1) |
| 8077 | _LT_COMPILER_C_O($1) |
| 8078 | _LT_COMPILER_FILE_LOCKS($1) |
| 8079 | _LT_LINKER_SHLIBS($1) |
| 8080 | _LT_LINKER_HARDCODE_LIBPATH($1) |
| 8081 |
| 8082 | _LT_CONFIG($1) |
| 8083 | fi |
| 8084 |
| 8085 | AC_LANG_RESTORE |
| 8086 |
| 8087 | GCC=$lt_save_GCC |
| 8088 | CC=$lt_save_CC |
| 8089 | CFLAGS=$lt_save_CFLAGS |
| 8090 | ])# _LT_LANG_GO_CONFIG |
| 8091 |
| 8092 |
| 8093 | # _LT_LANG_RC_CONFIG([TAG]) |
| 8094 | # ------------------------- |
| 8095 | # Ensure that the configuration variables for the Windows resource compiler |
| 8096 | # are suitably defined. These variables are subsequently used by _LT_CONFIG |
| 8097 | # to write the compiler configuration to 'libtool'. |
| 8098 | m4_defun([_LT_LANG_RC_CONFIG], |
| 8099 | [AC_REQUIRE([LT_PROG_RC])dnl |
| 8100 | AC_LANG_SAVE |
| 8101 |
| 8102 | # Source file extension for RC test sources. |
| 8103 | ac_ext=rc |
| 8104 |
| 8105 | # Object file extension for compiled RC test sources. |
| 8106 | objext=o |
| 8107 | _LT_TAGVAR(objext, $1)=$objext |
| 8108 |
| 8109 | # Code to be used in simple compile tests |
| 8110 | lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' |
| 8111 |
| 8112 | # Code to be used in simple link tests |
| 8113 | lt_simple_link_test_code=$lt_simple_compile_test_code |
| 8114 |
| 8115 | # ltmain only uses $CC for tagged configurations so make sure $CC is set. |
| 8116 | _LT_TAG_COMPILER |
| 8117 |
| 8118 | # save warnings/boilerplate of simple test code |
| 8119 | _LT_COMPILER_BOILERPLATE |
| 8120 | _LT_LINKER_BOILERPLATE |
| 8121 |
| 8122 | # Allow CC to be a program name with arguments. |
| 8123 | lt_save_CC=$CC |
| 8124 | lt_save_CFLAGS=$CFLAGS |
| 8125 | lt_save_GCC=$GCC |
| 8126 | GCC= |
| 8127 | CC=${RC-"windres"} |
| 8128 | CFLAGS= |
| 8129 | compiler=$CC |
| 8130 | _LT_TAGVAR(compiler, $1)=$CC |
| 8131 | _LT_CC_BASENAME([$compiler]) |
| 8132 | _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes |
| 8133 |
| 8134 | if test -n "$compiler"; then |
| 8135 | : |
| 8136 | _LT_CONFIG($1) |
| 8137 | fi |
| 8138 |
| 8139 | GCC=$lt_save_GCC |
| 8140 | AC_LANG_RESTORE |
| 8141 | CC=$lt_save_CC |
| 8142 | CFLAGS=$lt_save_CFLAGS |
| 8143 | ])# _LT_LANG_RC_CONFIG |
| 8144 |
| 8145 |
| 8146 | # LT_PROG_GCJ |
| 8147 | # ----------- |
| 8148 | AC_DEFUN([LT_PROG_GCJ], |
| 8149 | [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], |
| 8150 | [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], |
| 8151 | [AC_CHECK_TOOL(GCJ, gcj,) |
| 8152 | test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" |
| 8153 | AC_SUBST(GCJFLAGS)])])[]dnl |
| 8154 | ]) |
| 8155 |
| 8156 | # Old name: |
| 8157 | AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) |
| 8158 | dnl aclocal-1.4 backwards compatibility: |
| 8159 | dnl AC_DEFUN([LT_AC_PROG_GCJ], []) |
| 8160 |
| 8161 |
| 8162 | # LT_PROG_GO |
| 8163 | # ---------- |
| 8164 | AC_DEFUN([LT_PROG_GO], |
| 8165 | [AC_CHECK_TOOL(GOC, gccgo,) |
| 8166 | ]) |
| 8167 |
| 8168 |
| 8169 | # LT_PROG_RC |
| 8170 | # ---------- |
| 8171 | AC_DEFUN([LT_PROG_RC], |
| 8172 | [AC_CHECK_TOOL(RC, windres,) |
| 8173 | ]) |
| 8174 |
| 8175 | # Old name: |
| 8176 | AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) |
| 8177 | dnl aclocal-1.4 backwards compatibility: |
| 8178 | dnl AC_DEFUN([LT_AC_PROG_RC], []) |
| 8179 |
| 8180 |
| 8181 | # _LT_DECL_EGREP |
| 8182 | # -------------- |
| 8183 | # If we don't have a new enough Autoconf to choose the best grep |
| 8184 | # available, choose the one first in the user's PATH. |
| 8185 | m4_defun([_LT_DECL_EGREP], |
| 8186 | [AC_REQUIRE([AC_PROG_EGREP])dnl |
| 8187 | AC_REQUIRE([AC_PROG_FGREP])dnl |
| 8188 | test -z "$GREP" && GREP=grep |
| 8189 | _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) |
| 8190 | _LT_DECL([], [EGREP], [1], [An ERE matcher]) |
| 8191 | _LT_DECL([], [FGREP], [1], [A literal string matcher]) |
| 8192 | dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too |
| 8193 | AC_SUBST([GREP]) |
| 8194 | ]) |
| 8195 |
| 8196 |
| 8197 | # _LT_DECL_OBJDUMP |
| 8198 | # -------------- |
| 8199 | # If we don't have a new enough Autoconf to choose the best objdump |
| 8200 | # available, choose the one first in the user's PATH. |
| 8201 | m4_defun([_LT_DECL_OBJDUMP], |
| 8202 | [AC_CHECK_TOOL(OBJDUMP, objdump, false) |
| 8203 | test -z "$OBJDUMP" && OBJDUMP=objdump |
| 8204 | _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) |
| 8205 | AC_SUBST([OBJDUMP]) |
| 8206 | ]) |
| 8207 |
| 8208 | # _LT_DECL_DLLTOOL |
| 8209 | # ---------------- |
| 8210 | # Ensure DLLTOOL variable is set. |
| 8211 | m4_defun([_LT_DECL_DLLTOOL], |
| 8212 | [AC_CHECK_TOOL(DLLTOOL, dlltool, false) |
| 8213 | test -z "$DLLTOOL" && DLLTOOL=dlltool |
| 8214 | _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) |
| 8215 | AC_SUBST([DLLTOOL]) |
| 8216 | ]) |
| 8217 |
| 8218 | # _LT_DECL_SED |
| 8219 | # ------------ |
| 8220 | # Check for a fully-functional sed program, that truncates |
| 8221 | # as few characters as possible. Prefer GNU sed if found. |
| 8222 | m4_defun([_LT_DECL_SED], |
| 8223 | [AC_PROG_SED |
| 8224 | test -z "$SED" && SED=sed |
| 8225 | Xsed="$SED -e 1s/^X//" |
| 8226 | _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) |
| 8227 | _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], |
| 8228 | [Sed that helps us avoid accidentally triggering echo(1) options like -n]) |
| 8229 | ])# _LT_DECL_SED |
| 8230 |
| 8231 | m4_ifndef([AC_PROG_SED], [ |
| 8232 | # NOTE: This macro has been submitted for inclusion into # |
| 8233 | # GNU Autoconf as AC_PROG_SED. When it is available in # |
| 8234 | # a released version of Autoconf we should remove this # |
| 8235 | # macro and use it instead. # |
| 8236 |
| 8237 | m4_defun([AC_PROG_SED], |
| 8238 | [AC_MSG_CHECKING([for a sed that does not truncate output]) |
| 8239 | AC_CACHE_VAL(lt_cv_path_SED, |
| 8240 | [# Loop through the user's path and test for sed and gsed. |
| 8241 | # Then use that list of sed's as ones to test for truncation. |
| 8242 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 8243 | for as_dir in $PATH |
| 8244 | do |
| 8245 | IFS=$as_save_IFS |
| 8246 | test -z "$as_dir" && as_dir=. |
| 8247 | for lt_ac_prog in sed gsed; do |
| 8248 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 8249 | if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then |
| 8250 | lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" |
| 8251 | fi |
| 8252 | done |
| 8253 | done |
| 8254 | done |
| 8255 | IFS=$as_save_IFS |
| 8256 | lt_ac_max=0 |
| 8257 | lt_ac_count=0 |
| 8258 | # Add /usr/xpg4/bin/sed as it is typically found on Solaris |
| 8259 | # along with /bin/sed that truncates output. |
| 8260 | for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do |
| 8261 | test ! -f "$lt_ac_sed" && continue |
| 8262 | cat /dev/null > conftest.in |
| 8263 | lt_ac_count=0 |
| 8264 | echo $ECHO_N "0123456789$ECHO_C" >conftest.in |
| 8265 | # Check for GNU sed and select it if it is found. |
| 8266 | if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then |
| 8267 | lt_cv_path_SED=$lt_ac_sed |
| 8268 | break |
| 8269 | fi |
| 8270 | while true; do |
| 8271 | cat conftest.in conftest.in >conftest.tmp |
| 8272 | mv conftest.tmp conftest.in |
| 8273 | cp conftest.in conftest.nl |
| 8274 | echo >>conftest.nl |
| 8275 | $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break |
| 8276 | cmp -s conftest.out conftest.nl || break |
| 8277 | # 10000 chars as input seems more than enough |
| 8278 | test 10 -lt "$lt_ac_count" && break |
| 8279 | lt_ac_count=`expr $lt_ac_count + 1` |
| 8280 | if test "$lt_ac_count" -gt "$lt_ac_max"; then |
| 8281 | lt_ac_max=$lt_ac_count |
| 8282 | lt_cv_path_SED=$lt_ac_sed |
| 8283 | fi |
| 8284 | done |
| 8285 | done |
| 8286 | ]) |
| 8287 | SED=$lt_cv_path_SED |
| 8288 | AC_SUBST([SED]) |
| 8289 | AC_MSG_RESULT([$SED]) |
| 8290 | ])#AC_PROG_SED |
| 8291 | ])#m4_ifndef |
| 8292 |
| 8293 | # Old name: |
| 8294 | AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) |
| 8295 | dnl aclocal-1.4 backwards compatibility: |
| 8296 | dnl AC_DEFUN([LT_AC_PROG_SED], []) |
| 8297 |
| 8298 |
| 8299 | # _LT_CHECK_SHELL_FEATURES |
| 8300 | # ------------------------ |
| 8301 | # Find out whether the shell is Bourne or XSI compatible, |
| 8302 | # or has some other useful features. |
| 8303 | m4_defun([_LT_CHECK_SHELL_FEATURES], |
| 8304 | [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then |
| 8305 | lt_unset=unset |
| 8306 | else |
| 8307 | lt_unset=false |
| 8308 | fi |
| 8309 | _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl |
| 8310 |
| 8311 | # test EBCDIC or ASCII |
| 8312 | case `echo X|tr X '\101'` in |
| 8313 | A) # ASCII based system |
| 8314 | # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr |
| 8315 | lt_SP2NL='tr \040 \012' |
| 8316 | lt_NL2SP='tr \015\012 \040\040' |
| 8317 | ;; |
| 8318 | *) # EBCDIC based system |
| 8319 | lt_SP2NL='tr \100 \n' |
| 8320 | lt_NL2SP='tr \r\n \100\100' |
| 8321 | ;; |
| 8322 | esac |
| 8323 | _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl |
| 8324 | _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl |
| 8325 | ])# _LT_CHECK_SHELL_FEATURES |
| 8326 |
| 8327 |
| 8328 | # _LT_PATH_CONVERSION_FUNCTIONS |
| 8329 | # ----------------------------- |
| 8330 | # Determine what file name conversion functions should be used by |
| 8331 | # func_to_host_file (and, implicitly, by func_to_host_path). These are needed |
| 8332 | # for certain cross-compile configurations and native mingw. |
| 8333 | m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], |
| 8334 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl |
| 8335 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
| 8336 | AC_MSG_CHECKING([how to convert $build file names to $host format]) |
| 8337 | AC_CACHE_VAL(lt_cv_to_host_file_cmd, |
| 8338 | [case $host in |
| 8339 | *-*-mingw* ) |
| 8340 | case $build in |
| 8341 | *-*-mingw* ) # actually msys |
| 8342 | lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 |
| 8343 | ;; |
| 8344 | *-*-cygwin* ) |
| 8345 | lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 |
| 8346 | ;; |
| 8347 | * ) # otherwise, assume *nix |
| 8348 | lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 |
| 8349 | ;; |
| 8350 | esac |
| 8351 | ;; |
| 8352 | *-*-cygwin* ) |
| 8353 | case $build in |
| 8354 | *-*-mingw* ) # actually msys |
| 8355 | lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin |
| 8356 | ;; |
| 8357 | *-*-cygwin* ) |
| 8358 | lt_cv_to_host_file_cmd=func_convert_file_noop |
| 8359 | ;; |
| 8360 | * ) # otherwise, assume *nix |
| 8361 | lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin |
| 8362 | ;; |
| 8363 | esac |
| 8364 | ;; |
| 8365 | * ) # unhandled hosts (and "normal" native builds) |
| 8366 | lt_cv_to_host_file_cmd=func_convert_file_noop |
| 8367 | ;; |
| 8368 | esac |
| 8369 | ]) |
| 8370 | to_host_file_cmd=$lt_cv_to_host_file_cmd |
| 8371 | AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) |
| 8372 | _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], |
| 8373 | [0], [convert $build file names to $host format])dnl |
| 8374 |
| 8375 | AC_MSG_CHECKING([how to convert $build file names to toolchain format]) |
| 8376 | AC_CACHE_VAL(lt_cv_to_tool_file_cmd, |
| 8377 | [#assume ordinary cross tools, or native build. |
| 8378 | lt_cv_to_tool_file_cmd=func_convert_file_noop |
| 8379 | case $host in |
| 8380 | *-*-mingw* ) |
| 8381 | case $build in |
| 8382 | *-*-mingw* ) # actually msys |
| 8383 | lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 |
| 8384 | ;; |
| 8385 | esac |
| 8386 | ;; |
| 8387 | esac |
| 8388 | ]) |
| 8389 | to_tool_file_cmd=$lt_cv_to_tool_file_cmd |
| 8390 | AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) |
| 8391 | _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], |
| 8392 | [0], [convert $build files to toolchain format])dnl |
| 8393 | ])# _LT_PATH_CONVERSION_FUNCTIONS |
| 8394 |
| 8395 | # Helper functions for option handling. -*- Autoconf -*- |
| 8396 | # |
| 8397 | # Copyright (C) 2004-2005, 2007-2009, 2011-2018 Free Software |
| 8398 | # Foundation, Inc. |
| 8399 | # Written by Gary V. Vaughan, 2004 |
| 8400 | # |
| 8401 | # This file is free software; the Free Software Foundation gives |
| 8402 | # unlimited permission to copy and/or distribute it, with or without |
| 8403 | # modifications, as long as this notice is preserved. |
| 8404 |
| 8405 | # serial 8 ltoptions.m4 |
| 8406 |
| 8407 | # This is to help aclocal find these macros, as it can't see m4_define. |
| 8408 | AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) |
| 8409 |
| 8410 |
| 8411 | # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) |
| 8412 | # ------------------------------------------ |
| 8413 | m4_define([_LT_MANGLE_OPTION], |
| 8414 | [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) |
| 8415 |
| 8416 |
| 8417 | # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) |
| 8418 | # --------------------------------------- |
| 8419 | # Set option OPTION-NAME for macro MACRO-NAME, and if there is a |
| 8420 | # matching handler defined, dispatch to it. Other OPTION-NAMEs are |
| 8421 | # saved as a flag. |
| 8422 | m4_define([_LT_SET_OPTION], |
| 8423 | [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl |
| 8424 | m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), |
| 8425 | _LT_MANGLE_DEFUN([$1], [$2]), |
| 8426 | [m4_warning([Unknown $1 option '$2'])])[]dnl |
| 8427 | ]) |
| 8428 |
| 8429 |
| 8430 | # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) |
| 8431 | # ------------------------------------------------------------ |
| 8432 | # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. |
| 8433 | m4_define([_LT_IF_OPTION], |
| 8434 | [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) |
| 8435 |
| 8436 |
| 8437 | # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) |
| 8438 | # ------------------------------------------------------- |
| 8439 | # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME |
| 8440 | # are set. |
| 8441 | m4_define([_LT_UNLESS_OPTIONS], |
| 8442 | [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), |
| 8443 | [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), |
| 8444 | [m4_define([$0_found])])])[]dnl |
| 8445 | m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 |
| 8446 | ])[]dnl |
| 8447 | ]) |
| 8448 |
| 8449 |
| 8450 | # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) |
| 8451 | # ---------------------------------------- |
| 8452 | # OPTION-LIST is a space-separated list of Libtool options associated |
| 8453 | # with MACRO-NAME. If any OPTION has a matching handler declared with |
| 8454 | # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about |
| 8455 | # the unknown option and exit. |
| 8456 | m4_defun([_LT_SET_OPTIONS], |
| 8457 | [# Set options |
| 8458 | m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), |
| 8459 | [_LT_SET_OPTION([$1], _LT_Option)]) |
| 8460 |
| 8461 | m4_if([$1],[LT_INIT],[ |
| 8462 | dnl |
| 8463 | dnl Simply set some default values (i.e off) if boolean options were not |
| 8464 | dnl specified: |
| 8465 | _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no |
| 8466 | ]) |
| 8467 | _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no |
| 8468 | ]) |
| 8469 | dnl |
| 8470 | dnl If no reference was made to various pairs of opposing options, then |
| 8471 | dnl we run the default mode handler for the pair. For example, if neither |
| 8472 | dnl 'shared' nor 'disable-shared' was passed, we enable building of shared |
| 8473 | dnl archives by default: |
| 8474 | _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) |
| 8475 | _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) |
| 8476 | _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) |
| 8477 | _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], |
| 8478 | [_LT_ENABLE_FAST_INSTALL]) |
| 8479 | _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], |
| 8480 | [_LT_WITH_AIX_SONAME([aix])]) |
| 8481 | ]) |
| 8482 | ])# _LT_SET_OPTIONS |
| 8483 |
| 8484 |
| 8485 |
| 8486 | # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) |
| 8487 | # ----------------------------------------- |
| 8488 | m4_define([_LT_MANGLE_DEFUN], |
| 8489 | [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) |
| 8490 |
| 8491 |
| 8492 | # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) |
| 8493 | # ----------------------------------------------- |
| 8494 | m4_define([LT_OPTION_DEFINE], |
| 8495 | [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl |
| 8496 | ])# LT_OPTION_DEFINE |
| 8497 |
| 8498 |
| 8499 | # dlopen |
| 8500 | # ------ |
| 8501 | LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes |
| 8502 | ]) |
| 8503 |
| 8504 | AU_DEFUN([AC_LIBTOOL_DLOPEN], |
| 8505 | [_LT_SET_OPTION([LT_INIT], [dlopen]) |
| 8506 | AC_DIAGNOSE([obsolete], |
| 8507 | [$0: Remove this warning and the call to _LT_SET_OPTION when you |
| 8508 | put the 'dlopen' option into LT_INIT's first parameter.]) |
| 8509 | ]) |
| 8510 |
| 8511 | dnl aclocal-1.4 backwards compatibility: |
| 8512 | dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) |
| 8513 |
| 8514 |
| 8515 | # win32-dll |
| 8516 | # --------- |
| 8517 | # Declare package support for building win32 dll's. |
| 8518 | LT_OPTION_DEFINE([LT_INIT], [win32-dll], |
| 8519 | [enable_win32_dll=yes |
| 8520 |
| 8521 | case $host in |
| 8522 | *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) |
| 8523 | AC_CHECK_TOOL(AS, as, false) |
| 8524 | AC_CHECK_TOOL(DLLTOOL, dlltool, false) |
| 8525 | AC_CHECK_TOOL(OBJDUMP, objdump, false) |
| 8526 | ;; |
| 8527 | esac |
| 8528 |
| 8529 | test -z "$AS" && AS=as |
| 8530 | _LT_DECL([], [AS], [1], [Assembler program])dnl |
| 8531 |
| 8532 | test -z "$DLLTOOL" && DLLTOOL=dlltool |
| 8533 | _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl |
| 8534 |
| 8535 | test -z "$OBJDUMP" && OBJDUMP=objdump |
| 8536 | _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl |
| 8537 | ])# win32-dll |
| 8538 |
| 8539 | AU_DEFUN([AC_LIBTOOL_WIN32_DLL], |
| 8540 | [AC_REQUIRE([AC_CANONICAL_HOST])dnl |
| 8541 | _LT_SET_OPTION([LT_INIT], [win32-dll]) |
| 8542 | AC_DIAGNOSE([obsolete], |
| 8543 | [$0: Remove this warning and the call to _LT_SET_OPTION when you |
| 8544 | put the 'win32-dll' option into LT_INIT's first parameter.]) |
| 8545 | ]) |
| 8546 |
| 8547 | dnl aclocal-1.4 backwards compatibility: |
| 8548 | dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) |
| 8549 |
| 8550 |
| 8551 | # _LT_ENABLE_SHARED([DEFAULT]) |
| 8552 | # ---------------------------- |
| 8553 | # implement the --enable-shared flag, and supports the 'shared' and |
| 8554 | # 'disable-shared' LT_INIT options. |
| 8555 | # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. |
| 8556 | m4_define([_LT_ENABLE_SHARED], |
| 8557 | [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl |
| 8558 | AC_ARG_ENABLE([shared], |
| 8559 | [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], |
| 8560 | [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], |
| 8561 | [p=${PACKAGE-default} |
| 8562 | case $enableval in |
| 8563 | yes) enable_shared=yes ;; |
| 8564 | no) enable_shared=no ;; |
| 8565 | *) |
| 8566 | enable_shared=no |
| 8567 | # Look at the argument we got. We use all the common list separators. |
| 8568 | lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, |
| 8569 | for pkg in $enableval; do |
| 8570 | IFS=$lt_save_ifs |
| 8571 | if test "X$pkg" = "X$p"; then |
| 8572 | enable_shared=yes |
| 8573 | fi |
| 8574 | done |
| 8575 | IFS=$lt_save_ifs |
| 8576 | ;; |
| 8577 | esac], |
| 8578 | [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) |
| 8579 |
| 8580 | _LT_DECL([build_libtool_libs], [enable_shared], [0], |
| 8581 | [Whether or not to build shared libraries]) |
| 8582 | ])# _LT_ENABLE_SHARED |
| 8583 |
| 8584 | LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) |
| 8585 | LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) |
| 8586 |
| 8587 | # Old names: |
| 8588 | AC_DEFUN([AC_ENABLE_SHARED], |
| 8589 | [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) |
| 8590 | ]) |
| 8591 |
| 8592 | AC_DEFUN([AC_DISABLE_SHARED], |
| 8593 | [_LT_SET_OPTION([LT_INIT], [disable-shared]) |
| 8594 | ]) |
| 8595 |
| 8596 | AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) |
| 8597 | AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) |
| 8598 |
| 8599 | dnl aclocal-1.4 backwards compatibility: |
| 8600 | dnl AC_DEFUN([AM_ENABLE_SHARED], []) |
| 8601 | dnl AC_DEFUN([AM_DISABLE_SHARED], []) |
| 8602 |
| 8603 |
| 8604 |
| 8605 | # _LT_ENABLE_STATIC([DEFAULT]) |
| 8606 | # ---------------------------- |
| 8607 | # implement the --enable-static flag, and support the 'static' and |
| 8608 | # 'disable-static' LT_INIT options. |
| 8609 | # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. |
| 8610 | m4_define([_LT_ENABLE_STATIC], |
| 8611 | [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl |
| 8612 | AC_ARG_ENABLE([static], |
| 8613 | [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], |
| 8614 | [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], |
| 8615 | [p=${PACKAGE-default} |
| 8616 | case $enableval in |
| 8617 | yes) enable_static=yes ;; |
| 8618 | no) enable_static=no ;; |
| 8619 | *) |
| 8620 | enable_static=no |
| 8621 | # Look at the argument we got. We use all the common list separators. |
| 8622 | lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, |
| 8623 | for pkg in $enableval; do |
| 8624 | IFS=$lt_save_ifs |
| 8625 | if test "X$pkg" = "X$p"; then |
| 8626 | enable_static=yes |
| 8627 | fi |
| 8628 | done |
| 8629 | IFS=$lt_save_ifs |
| 8630 | ;; |
| 8631 | esac], |
| 8632 | [enable_static=]_LT_ENABLE_STATIC_DEFAULT) |
| 8633 |
| 8634 | _LT_DECL([build_old_libs], [enable_static], [0], |
| 8635 | [Whether or not to build static libraries]) |
| 8636 | ])# _LT_ENABLE_STATIC |
| 8637 |
| 8638 | LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) |
| 8639 | LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) |
| 8640 |
| 8641 | # Old names: |
| 8642 | AC_DEFUN([AC_ENABLE_STATIC], |
| 8643 | [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) |
| 8644 | ]) |
| 8645 |
| 8646 | AC_DEFUN([AC_DISABLE_STATIC], |
| 8647 | [_LT_SET_OPTION([LT_INIT], [disable-static]) |
| 8648 | ]) |
| 8649 |
| 8650 | AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) |
| 8651 | AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) |
| 8652 |
| 8653 | dnl aclocal-1.4 backwards compatibility: |
| 8654 | dnl AC_DEFUN([AM_ENABLE_STATIC], []) |
| 8655 | dnl AC_DEFUN([AM_DISABLE_STATIC], []) |
| 8656 |
| 8657 |
| 8658 |
| 8659 | # _LT_ENABLE_FAST_INSTALL([DEFAULT]) |
| 8660 | # ---------------------------------- |
| 8661 | # implement the --enable-fast-install flag, and support the 'fast-install' |
| 8662 | # and 'disable-fast-install' LT_INIT options. |
| 8663 | # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. |
| 8664 | m4_define([_LT_ENABLE_FAST_INSTALL], |
| 8665 | [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl |
| 8666 | AC_ARG_ENABLE([fast-install], |
| 8667 | [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], |
| 8668 | [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], |
| 8669 | [p=${PACKAGE-default} |
| 8670 | case $enableval in |
| 8671 | yes) enable_fast_install=yes ;; |
| 8672 | no) enable_fast_install=no ;; |
| 8673 | *) |
| 8674 | enable_fast_install=no |
| 8675 | # Look at the argument we got. We use all the common list separators. |
| 8676 | lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, |
| 8677 | for pkg in $enableval; do |
| 8678 | IFS=$lt_save_ifs |
| 8679 | if test "X$pkg" = "X$p"; then |
| 8680 | enable_fast_install=yes |
| 8681 | fi |
| 8682 | done |
| 8683 | IFS=$lt_save_ifs |
| 8684 | ;; |
| 8685 | esac], |
| 8686 | [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) |
| 8687 |
| 8688 | _LT_DECL([fast_install], [enable_fast_install], [0], |
| 8689 | [Whether or not to optimize for fast installation])dnl |
| 8690 | ])# _LT_ENABLE_FAST_INSTALL |
| 8691 |
| 8692 | LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) |
| 8693 | LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) |
| 8694 |
| 8695 | # Old names: |
| 8696 | AU_DEFUN([AC_ENABLE_FAST_INSTALL], |
| 8697 | [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) |
| 8698 | AC_DIAGNOSE([obsolete], |
| 8699 | [$0: Remove this warning and the call to _LT_SET_OPTION when you put |
| 8700 | the 'fast-install' option into LT_INIT's first parameter.]) |
| 8701 | ]) |
| 8702 |
| 8703 | AU_DEFUN([AC_DISABLE_FAST_INSTALL], |
| 8704 | [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) |
| 8705 | AC_DIAGNOSE([obsolete], |
| 8706 | [$0: Remove this warning and the call to _LT_SET_OPTION when you put |
| 8707 | the 'disable-fast-install' option into LT_INIT's first parameter.]) |
| 8708 | ]) |
| 8709 |
| 8710 | dnl aclocal-1.4 backwards compatibility: |
| 8711 | dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) |
| 8712 | dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) |
| 8713 |
| 8714 |
| 8715 | # _LT_WITH_AIX_SONAME([DEFAULT]) |
| 8716 | # ---------------------------------- |
| 8717 | # implement the --with-aix-soname flag, and support the `aix-soname=aix' |
| 8718 | # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT |
| 8719 | # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. |
| 8720 | m4_define([_LT_WITH_AIX_SONAME], |
| 8721 | [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl |
| 8722 | shared_archive_member_spec= |
| 8723 | case $host,$enable_shared in |
| 8724 | power*-*-aix[[5-9]]*,yes) |
| 8725 | AC_MSG_CHECKING([which variant of shared library versioning to provide]) |
| 8726 | AC_ARG_WITH([aix-soname], |
| 8727 | [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], |
| 8728 | [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], |
| 8729 | [case $withval in |
| 8730 | aix|svr4|both) |
| 8731 | ;; |
| 8732 | *) |
| 8733 | AC_MSG_ERROR([Unknown argument to --with-aix-soname]) |
| 8734 | ;; |
| 8735 | esac |
| 8736 | lt_cv_with_aix_soname=$with_aix_soname], |
| 8737 | [AC_CACHE_VAL([lt_cv_with_aix_soname], |
| 8738 | [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) |
| 8739 | with_aix_soname=$lt_cv_with_aix_soname]) |
| 8740 | AC_MSG_RESULT([$with_aix_soname]) |
| 8741 | if test aix != "$with_aix_soname"; then |
| 8742 | # For the AIX way of multilib, we name the shared archive member |
| 8743 | # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', |
| 8744 | # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. |
| 8745 | # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, |
| 8746 | # the AIX toolchain works better with OBJECT_MODE set (default 32). |
| 8747 | if test 64 = "${OBJECT_MODE-32}"; then |
| 8748 | shared_archive_member_spec=shr_64 |
| 8749 | else |
| 8750 | shared_archive_member_spec=shr |
| 8751 | fi |
| 8752 | fi |
| 8753 | ;; |
| 8754 | *) |
| 8755 | with_aix_soname=aix |
| 8756 | ;; |
| 8757 | esac |
| 8758 |
| 8759 | _LT_DECL([], [shared_archive_member_spec], [0], |
| 8760 | [Shared archive member basename, for filename based shared library versioning on AIX])dnl |
| 8761 | ])# _LT_WITH_AIX_SONAME |
| 8762 |
| 8763 | LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) |
| 8764 | LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) |
| 8765 | LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) |
| 8766 |
| 8767 |
| 8768 | # _LT_WITH_PIC([MODE]) |
| 8769 | # -------------------- |
| 8770 | # implement the --with-pic flag, and support the 'pic-only' and 'no-pic' |
| 8771 | # LT_INIT options. |
| 8772 | # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. |
| 8773 | m4_define([_LT_WITH_PIC], |
| 8774 | [AC_ARG_WITH([pic], |
| 8775 | [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], |
| 8776 | [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], |
| 8777 | [lt_p=${PACKAGE-default} |
| 8778 | case $withval in |
| 8779 | yes|no) pic_mode=$withval ;; |
| 8780 | *) |
| 8781 | pic_mode=default |
| 8782 | # Look at the argument we got. We use all the common list separators. |
| 8783 | lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, |
| 8784 | for lt_pkg in $withval; do |
| 8785 | IFS=$lt_save_ifs |
| 8786 | if test "X$lt_pkg" = "X$lt_p"; then |
| 8787 | pic_mode=yes |
| 8788 | fi |
| 8789 | done |
| 8790 | IFS=$lt_save_ifs |
| 8791 | ;; |
| 8792 | esac], |
| 8793 | [pic_mode=m4_default([$1], [default])]) |
| 8794 |
| 8795 | _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl |
| 8796 | ])# _LT_WITH_PIC |
| 8797 |
| 8798 | LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) |
| 8799 | LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) |
| 8800 |
| 8801 | # Old name: |
| 8802 | AU_DEFUN([AC_LIBTOOL_PICMODE], |
| 8803 | [_LT_SET_OPTION([LT_INIT], [pic-only]) |
| 8804 | AC_DIAGNOSE([obsolete], |
| 8805 | [$0: Remove this warning and the call to _LT_SET_OPTION when you |
| 8806 | put the 'pic-only' option into LT_INIT's first parameter.]) |
| 8807 | ]) |
| 8808 |
| 8809 | dnl aclocal-1.4 backwards compatibility: |
| 8810 | dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) |
| 8811 |
| 8812 |
| 8813 | m4_define([_LTDL_MODE], []) |
| 8814 | LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], |
| 8815 | [m4_define([_LTDL_MODE], [nonrecursive])]) |
| 8816 | LT_OPTION_DEFINE([LTDL_INIT], [recursive], |
| 8817 | [m4_define([_LTDL_MODE], [recursive])]) |
| 8818 | LT_OPTION_DEFINE([LTDL_INIT], [subproject], |
| 8819 | [m4_define([_LTDL_MODE], [subproject])]) |
| 8820 |
| 8821 | m4_define([_LTDL_TYPE], []) |
| 8822 | LT_OPTION_DEFINE([LTDL_INIT], [installable], |
| 8823 | [m4_define([_LTDL_TYPE], [installable])]) |
| 8824 | LT_OPTION_DEFINE([LTDL_INIT], [convenience], |
| 8825 | [m4_define([_LTDL_TYPE], [convenience])]) |
| 8826 |
| 8827 | # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- |
| 8828 | # |
| 8829 | # Copyright (C) 2004-2005, 2007-2008, 2011-2018 Free Software |
| 8830 | # Foundation, Inc. |
| 8831 | # Written by Gary V. Vaughan, 2004 |
| 8832 | # |
| 8833 | # This file is free software; the Free Software Foundation gives |
| 8834 | # unlimited permission to copy and/or distribute it, with or without |
| 8835 | # modifications, as long as this notice is preserved. |
| 8836 |
| 8837 | # serial 6 ltsugar.m4 |
| 8838 |
| 8839 | # This is to help aclocal find these macros, as it can't see m4_define. |
| 8840 | AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) |
| 8841 |
| 8842 |
| 8843 | # lt_join(SEP, ARG1, [ARG2...]) |
| 8844 | # ----------------------------- |
| 8845 | # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their |
| 8846 | # associated separator. |
| 8847 | # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier |
| 8848 | # versions in m4sugar had bugs. |
| 8849 | m4_define([lt_join], |
| 8850 | [m4_if([$#], [1], [], |
| 8851 | [$#], [2], [[$2]], |
| 8852 | [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) |
| 8853 | m4_define([_lt_join], |
| 8854 | [m4_if([$#$2], [2], [], |
| 8855 | [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) |
| 8856 |
| 8857 |
| 8858 | # lt_car(LIST) |
| 8859 | # lt_cdr(LIST) |
| 8860 | # ------------ |
| 8861 | # Manipulate m4 lists. |
| 8862 | # These macros are necessary as long as will still need to support |
| 8863 | # Autoconf-2.59, which quotes differently. |
| 8864 | m4_define([lt_car], [[$1]]) |
| 8865 | m4_define([lt_cdr], |
| 8866 | [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], |
| 8867 | [$#], 1, [], |
| 8868 | [m4_dquote(m4_shift($@))])]) |
| 8869 | m4_define([lt_unquote], $1) |
| 8870 |
| 8871 |
| 8872 | # lt_append(MACRO-NAME, STRING, [SEPARATOR]) |
| 8873 | # ------------------------------------------ |
| 8874 | # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. |
| 8875 | # Note that neither SEPARATOR nor STRING are expanded; they are appended |
| 8876 | # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). |
| 8877 | # No SEPARATOR is output if MACRO-NAME was previously undefined (different |
| 8878 | # than defined and empty). |
| 8879 | # |
| 8880 | # This macro is needed until we can rely on Autoconf 2.62, since earlier |
| 8881 | # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. |
| 8882 | m4_define([lt_append], |
| 8883 | [m4_define([$1], |
| 8884 | m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) |
| 8885 |
| 8886 |
| 8887 |
| 8888 | # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) |
| 8889 | # ---------------------------------------------------------- |
| 8890 | # Produce a SEP delimited list of all paired combinations of elements of |
| 8891 | # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list |
| 8892 | # has the form PREFIXmINFIXSUFFIXn. |
| 8893 | # Needed until we can rely on m4_combine added in Autoconf 2.62. |
| 8894 | m4_define([lt_combine], |
| 8895 | [m4_if(m4_eval([$# > 3]), [1], |
| 8896 | [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl |
| 8897 | [[m4_foreach([_Lt_prefix], [$2], |
| 8898 | [m4_foreach([_Lt_suffix], |
| 8899 | ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, |
| 8900 | [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) |
| 8901 |
| 8902 |
| 8903 | # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) |
| 8904 | # ----------------------------------------------------------------------- |
| 8905 | # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited |
| 8906 | # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. |
| 8907 | m4_define([lt_if_append_uniq], |
| 8908 | [m4_ifdef([$1], |
| 8909 | [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], |
| 8910 | [lt_append([$1], [$2], [$3])$4], |
| 8911 | [$5])], |
| 8912 | [lt_append([$1], [$2], [$3])$4])]) |
| 8913 |
| 8914 |
| 8915 | # lt_dict_add(DICT, KEY, VALUE) |
| 8916 | # ----------------------------- |
| 8917 | m4_define([lt_dict_add], |
| 8918 | [m4_define([$1($2)], [$3])]) |
| 8919 |
| 8920 |
| 8921 | # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) |
| 8922 | # -------------------------------------------- |
| 8923 | m4_define([lt_dict_add_subkey], |
| 8924 | [m4_define([$1($2:$3)], [$4])]) |
| 8925 |
| 8926 |
| 8927 | # lt_dict_fetch(DICT, KEY, [SUBKEY]) |
| 8928 | # ---------------------------------- |
| 8929 | m4_define([lt_dict_fetch], |
| 8930 | [m4_ifval([$3], |
| 8931 | m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), |
| 8932 | m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) |
| 8933 |
| 8934 |
| 8935 | # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) |
| 8936 | # ----------------------------------------------------------------- |
| 8937 | m4_define([lt_if_dict_fetch], |
| 8938 | [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], |
| 8939 | [$5], |
| 8940 | [$6])]) |
| 8941 |
| 8942 |
| 8943 | # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) |
| 8944 | # -------------------------------------------------------------- |
| 8945 | m4_define([lt_dict_filter], |
| 8946 | [m4_if([$5], [], [], |
| 8947 | [lt_join(m4_quote(m4_default([$4], [[, ]])), |
| 8948 | lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), |
| 8949 | [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl |
| 8950 | ]) |
| 8951 |
| 8952 | # ltversion.m4 -- version numbers -*- Autoconf -*- |
| 8953 | # |
| 8954 | # Copyright (C) 2004, 2011-2018 Free Software Foundation, Inc. |
| 8955 | # Written by Scott James Remnant, 2004 |
| 8956 | # |
| 8957 | # This file is free software; the Free Software Foundation gives |
| 8958 | # unlimited permission to copy and/or distribute it, with or without |
| 8959 | # modifications, as long as this notice is preserved. |
| 8960 |
| 8961 | # @configure_input@ |
| 8962 |
| 8963 | # serial 4221 ltversion.m4 |
| 8964 | # This file is part of GNU Libtool |
| 8965 |
| 8966 | m4_define([LT_PACKAGE_VERSION], [2.4.6.42-b88ce-dirty]) |
| 8967 | m4_define([LT_PACKAGE_REVISION], [2.4.6.42]) |
| 8968 |
| 8969 | AC_DEFUN([LTVERSION_VERSION], |
| 8970 | [macro_version='2.4.6.42-b88ce-dirty' |
| 8971 | macro_revision='2.4.6.42' |
| 8972 | _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) |
| 8973 | _LT_DECL(, macro_revision, 0) |
| 8974 | ]) |
| 8975 |
| 8976 | # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- |
| 8977 | # |
| 8978 | # Copyright (C) 2004-2005, 2007, 2009, 2011-2018 Free Software |
| 8979 | # Foundation, Inc. |
| 8980 | # Written by Scott James Remnant, 2004. |
| 8981 | # |
| 8982 | # This file is free software; the Free Software Foundation gives |
| 8983 | # unlimited permission to copy and/or distribute it, with or without |
| 8984 | # modifications, as long as this notice is preserved. |
| 8985 |
| 8986 | # serial 5 lt~obsolete.m4 |
| 8987 |
| 8988 | # These exist entirely to fool aclocal when bootstrapping libtool. |
| 8989 | # |
| 8990 | # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), |
| 8991 | # which have later been changed to m4_define as they aren't part of the |
| 8992 | # exported API, or moved to Autoconf or Automake where they belong. |
| 8993 | # |
| 8994 | # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN |
| 8995 | # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us |
| 8996 | # using a macro with the same name in our local m4/libtool.m4 it'll |
| 8997 | # pull the old libtool.m4 in (it doesn't see our shiny new m4_define |
| 8998 | # and doesn't know about Autoconf macros at all.) |
| 8999 | # |
| 9000 | # So we provide this file, which has a silly filename so it's always |
| 9001 | # included after everything else. This provides aclocal with the |
| 9002 | # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything |
| 9003 | # because those macros already exist, or will be overwritten later. |
| 9004 | # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. |
| 9005 | # |
| 9006 | # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. |
| 9007 | # Yes, that means every name once taken will need to remain here until |
| 9008 | # we give up compatibility with versions before 1.7, at which point |
| 9009 | # we need to keep only those names which we still refer to. |
| 9010 |
| 9011 | # This is to help aclocal find these macros, as it can't see m4_define. |
| 9012 | AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) |
| 9013 |
| 9014 | m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) |
| 9015 | m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) |
| 9016 | m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) |
| 9017 | m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) |
| 9018 | m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) |
| 9019 | m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) |
| 9020 | m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) |
| 9021 | m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) |
| 9022 | m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) |
| 9023 | m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) |
| 9024 | m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) |
| 9025 | m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) |
| 9026 | m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) |
| 9027 | m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) |
| 9028 | m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) |
| 9029 | m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) |
| 9030 | m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) |
| 9031 | m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) |
| 9032 | m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) |
| 9033 | m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) |
| 9034 | m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) |
| 9035 | m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) |
| 9036 | m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) |
| 9037 | m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) |
| 9038 | m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) |
| 9039 | m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) |
| 9040 | m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) |
| 9041 | m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) |
| 9042 | m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) |
| 9043 | m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) |
| 9044 | m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) |
| 9045 | m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) |
| 9046 | m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) |
| 9047 | m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) |
| 9048 | m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) |
| 9049 | m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) |
| 9050 | m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) |
| 9051 | m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) |
| 9052 | m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) |
| 9053 | m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) |
| 9054 | m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) |
| 9055 | m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) |
| 9056 | m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) |
| 9057 | m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) |
| 9058 | m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) |
| 9059 | m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) |
| 9060 | m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) |
| 9061 | m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) |
| 9062 | m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) |
| 9063 | m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) |
| 9064 | m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) |
| 9065 | m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) |
| 9066 | m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) |
| 9067 | m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) |
| 9068 | m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) |
| 9069 | m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) |
| 9070 | m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) |
| 9071 | m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) |
| 9072 | m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) |
| 9073 | m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) |
| 9074 | m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) |
| 9075 |
| 9076 | # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- |
| 9077 | # serial 11 (pkg-config-0.29.1) |
| 9078 |
| 9079 | dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. |
| 9080 | dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> |
| 9081 | dnl |
| 9082 | dnl This program is free software; you can redistribute it and/or modify |
| 9083 | dnl it under the terms of the GNU General Public License as published by |
| 9084 | dnl the Free Software Foundation; either version 2 of the License, or |
| 9085 | dnl (at your option) any later version. |
| 9086 | dnl |
| 9087 | dnl This program is distributed in the hope that it will be useful, but |
| 9088 | dnl WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9089 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 9090 | dnl General Public License for more details. |
| 9091 | dnl |
| 9092 | dnl You should have received a copy of the GNU General Public License |
| 9093 | dnl along with this program; if not, write to the Free Software |
| 9094 | dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA |
| 9095 | dnl 02111-1307, USA. |
| 9096 | dnl |
| 9097 | dnl As a special exception to the GNU General Public License, if you |
| 9098 | dnl distribute this file as part of a program that contains a |
| 9099 | dnl configuration script generated by Autoconf, you may include it under |
| 9100 | dnl the same distribution terms that you use for the rest of that |
| 9101 | dnl program. |
| 9102 |
| 9103 | dnl PKG_PREREQ(MIN-VERSION) |
| 9104 | dnl ----------------------- |
| 9105 | dnl Since: 0.29 |
| 9106 | dnl |
| 9107 | dnl Verify that the version of the pkg-config macros are at least |
| 9108 | dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's |
| 9109 | dnl installed version of pkg-config, this checks the developer's version |
| 9110 | dnl of pkg.m4 when generating configure. |
| 9111 | dnl |
| 9112 | dnl To ensure that this macro is defined, also add: |
| 9113 | dnl m4_ifndef([PKG_PREREQ], |
| 9114 | dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) |
| 9115 | dnl |
| 9116 | dnl See the "Since" comment for each macro you use to see what version |
| 9117 | dnl of the macros you require. |
| 9118 | m4_defun([PKG_PREREQ], |
| 9119 | [m4_define([PKG_MACROS_VERSION], [0.29.1]) |
| 9120 | m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, |
| 9121 | [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) |
| 9122 | ])dnl PKG_PREREQ |
| 9123 |
| 9124 | dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) |
| 9125 | dnl ---------------------------------- |
| 9126 | dnl Since: 0.16 |
| 9127 | dnl |
| 9128 | dnl Search for the pkg-config tool and set the PKG_CONFIG variable to |
| 9129 | dnl first found in the path. Checks that the version of pkg-config found |
| 9130 | dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is |
| 9131 | dnl used since that's the first version where most current features of |
| 9132 | dnl pkg-config existed. |
| 9133 | AC_DEFUN([PKG_PROG_PKG_CONFIG], |
| 9134 | [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) |
| 9135 | m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) |
| 9136 | m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) |
| 9137 | AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) |
| 9138 | AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) |
| 9139 | AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) |
| 9140 |
| 9141 | if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then |
| 9142 | AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) |
| 9143 | fi |
| 9144 | if test -n "$PKG_CONFIG"; then |
| 9145 | _pkg_min_version=m4_default([$1], [0.9.0]) |
| 9146 | AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) |
| 9147 | if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then |
| 9148 | AC_MSG_RESULT([yes]) |
| 9149 | else |
| 9150 | AC_MSG_RESULT([no]) |
| 9151 | PKG_CONFIG="" |
| 9152 | fi |
| 9153 | fi[]dnl |
| 9154 | ])dnl PKG_PROG_PKG_CONFIG |
| 9155 |
| 9156 | dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) |
| 9157 | dnl ------------------------------------------------------------------- |
| 9158 | dnl Since: 0.18 |
| 9159 | dnl |
| 9160 | dnl Check to see whether a particular set of modules exists. Similar to |
| 9161 | dnl PKG_CHECK_MODULES(), but does not set variables or print errors. |
| 9162 | dnl |
| 9163 | dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) |
| 9164 | dnl only at the first occurence in configure.ac, so if the first place |
| 9165 | dnl it's called might be skipped (such as if it is within an "if", you |
| 9166 | dnl have to call PKG_CHECK_EXISTS manually |
| 9167 | AC_DEFUN([PKG_CHECK_EXISTS], |
| 9168 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl |
| 9169 | if test -n "$PKG_CONFIG" && \ |
| 9170 | AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then |
| 9171 | m4_default([$2], [:]) |
| 9172 | m4_ifvaln([$3], [else |
| 9173 | $3])dnl |
| 9174 | fi]) |
| 9175 |
| 9176 | dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) |
| 9177 | dnl --------------------------------------------- |
| 9178 | dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting |
| 9179 | dnl pkg_failed based on the result. |
| 9180 | m4_define([_PKG_CONFIG], |
| 9181 | [if test -n "$$1"; then |
| 9182 | pkg_cv_[]$1="$$1" |
| 9183 | elif test -n "$PKG_CONFIG"; then |
| 9184 | PKG_CHECK_EXISTS([$3], |
| 9185 | [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` |
| 9186 | test "x$?" != "x0" && pkg_failed=yes ], |
| 9187 | [pkg_failed=yes]) |
| 9188 | else |
| 9189 | pkg_failed=untried |
| 9190 | fi[]dnl |
| 9191 | ])dnl _PKG_CONFIG |
| 9192 |
| 9193 | dnl _PKG_SHORT_ERRORS_SUPPORTED |
| 9194 | dnl --------------------------- |
| 9195 | dnl Internal check to see if pkg-config supports short errors. |
| 9196 | AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], |
| 9197 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) |
| 9198 | if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then |
| 9199 | _pkg_short_errors_supported=yes |
| 9200 | else |
| 9201 | _pkg_short_errors_supported=no |
| 9202 | fi[]dnl |
| 9203 | ])dnl _PKG_SHORT_ERRORS_SUPPORTED |
| 9204 |
| 9205 |
| 9206 | dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], |
| 9207 | dnl [ACTION-IF-NOT-FOUND]) |
| 9208 | dnl -------------------------------------------------------------- |
| 9209 | dnl Since: 0.4.0 |
| 9210 | dnl |
| 9211 | dnl Note that if there is a possibility the first call to |
| 9212 | dnl PKG_CHECK_MODULES might not happen, you should be sure to include an |
| 9213 | dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac |
| 9214 | AC_DEFUN([PKG_CHECK_MODULES], |
| 9215 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl |
| 9216 | AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl |
| 9217 | AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl |
| 9218 |
| 9219 | pkg_failed=no |
| 9220 | AC_MSG_CHECKING([for $1]) |
| 9221 |
| 9222 | _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) |
| 9223 | _PKG_CONFIG([$1][_LIBS], [libs], [$2]) |
| 9224 |
| 9225 | m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS |
| 9226 | and $1[]_LIBS to avoid the need to call pkg-config. |
| 9227 | See the pkg-config man page for more details.]) |
| 9228 |
| 9229 | if test $pkg_failed = yes; then |
| 9230 | AC_MSG_RESULT([no]) |
| 9231 | _PKG_SHORT_ERRORS_SUPPORTED |
| 9232 | if test $_pkg_short_errors_supported = yes; then |
| 9233 | $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` |
| 9234 | else |
| 9235 | $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` |
| 9236 | fi |
| 9237 | # Put the nasty error message in config.log where it belongs |
| 9238 | echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD |
| 9239 |
| 9240 | m4_default([$4], [AC_MSG_ERROR( |
| 9241 | [Package requirements ($2) were not met: |
| 9242 |
| 9243 | $$1_PKG_ERRORS |
| 9244 |
| 9245 | Consider adjusting the PKG_CONFIG_PATH environment variable if you |
| 9246 | installed software in a non-standard prefix. |
| 9247 |
| 9248 | _PKG_TEXT])[]dnl |
| 9249 | ]) |
| 9250 | elif test $pkg_failed = untried; then |
| 9251 | AC_MSG_RESULT([no]) |
| 9252 | m4_default([$4], [AC_MSG_FAILURE( |
| 9253 | [The pkg-config script could not be found or is too old. Make sure it |
| 9254 | is in your PATH or set the PKG_CONFIG environment variable to the full |
| 9255 | path to pkg-config. |
| 9256 |
| 9257 | _PKG_TEXT |
| 9258 |
| 9259 | To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl |
| 9260 | ]) |
| 9261 | else |
| 9262 | $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS |
| 9263 | $1[]_LIBS=$pkg_cv_[]$1[]_LIBS |
| 9264 | AC_MSG_RESULT([yes]) |
| 9265 | $3 |
| 9266 | fi[]dnl |
| 9267 | ])dnl PKG_CHECK_MODULES |
| 9268 |
| 9269 |
| 9270 | dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], |
| 9271 | dnl [ACTION-IF-NOT-FOUND]) |
| 9272 | dnl --------------------------------------------------------------------- |
| 9273 | dnl Since: 0.29 |
| 9274 | dnl |
| 9275 | dnl Checks for existence of MODULES and gathers its build flags with |
| 9276 | dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags |
| 9277 | dnl and VARIABLE-PREFIX_LIBS from --libs. |
| 9278 | dnl |
| 9279 | dnl Note that if there is a possibility the first call to |
| 9280 | dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to |
| 9281 | dnl include an explicit call to PKG_PROG_PKG_CONFIG in your |
| 9282 | dnl configure.ac. |
| 9283 | AC_DEFUN([PKG_CHECK_MODULES_STATIC], |
| 9284 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl |
| 9285 | _save_PKG_CONFIG=$PKG_CONFIG |
| 9286 | PKG_CONFIG="$PKG_CONFIG --static" |
| 9287 | PKG_CHECK_MODULES($@) |
| 9288 | PKG_CONFIG=$_save_PKG_CONFIG[]dnl |
| 9289 | ])dnl PKG_CHECK_MODULES_STATIC |
| 9290 |
| 9291 |
| 9292 | dnl PKG_INSTALLDIR([DIRECTORY]) |
| 9293 | dnl ------------------------- |
| 9294 | dnl Since: 0.27 |
| 9295 | dnl |
| 9296 | dnl Substitutes the variable pkgconfigdir as the location where a module |
| 9297 | dnl should install pkg-config .pc files. By default the directory is |
| 9298 | dnl $libdir/pkgconfig, but the default can be changed by passing |
| 9299 | dnl DIRECTORY. The user can override through the --with-pkgconfigdir |
| 9300 | dnl parameter. |
| 9301 | AC_DEFUN([PKG_INSTALLDIR], |
| 9302 | [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) |
| 9303 | m4_pushdef([pkg_description], |
| 9304 | [pkg-config installation directory @<:@]pkg_default[@:>@]) |
| 9305 | AC_ARG_WITH([pkgconfigdir], |
| 9306 | [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, |
| 9307 | [with_pkgconfigdir=]pkg_default) |
| 9308 | AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) |
| 9309 | m4_popdef([pkg_default]) |
| 9310 | m4_popdef([pkg_description]) |
| 9311 | ])dnl PKG_INSTALLDIR |
| 9312 |
| 9313 |
| 9314 | dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) |
| 9315 | dnl -------------------------------- |
| 9316 | dnl Since: 0.27 |
| 9317 | dnl |
| 9318 | dnl Substitutes the variable noarch_pkgconfigdir as the location where a |
| 9319 | dnl module should install arch-independent pkg-config .pc files. By |
| 9320 | dnl default the directory is $datadir/pkgconfig, but the default can be |
| 9321 | dnl changed by passing DIRECTORY. The user can override through the |
| 9322 | dnl --with-noarch-pkgconfigdir parameter. |
| 9323 | AC_DEFUN([PKG_NOARCH_INSTALLDIR], |
| 9324 | [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) |
| 9325 | m4_pushdef([pkg_description], |
| 9326 | [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) |
| 9327 | AC_ARG_WITH([noarch-pkgconfigdir], |
| 9328 | [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, |
| 9329 | [with_noarch_pkgconfigdir=]pkg_default) |
| 9330 | AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) |
| 9331 | m4_popdef([pkg_default]) |
| 9332 | m4_popdef([pkg_description]) |
| 9333 | ])dnl PKG_NOARCH_INSTALLDIR |
| 9334 |
| 9335 |
| 9336 | dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, |
| 9337 | dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) |
| 9338 | dnl ------------------------------------------- |
| 9339 | dnl Since: 0.28 |
| 9340 | dnl |
| 9341 | dnl Retrieves the value of the pkg-config variable for the given module. |
| 9342 | AC_DEFUN([PKG_CHECK_VAR], |
| 9343 | [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl |
| 9344 | AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl |
| 9345 |
| 9346 | _PKG_CONFIG([$1], [variable="][$3]["], [$2]) |
| 9347 | AS_VAR_COPY([$1], [pkg_cv_][$1]) |
| 9348 |
| 9349 | AS_VAR_IF([$1], [""], [$5], [$4])dnl |
| 9350 | ])dnl PKG_CHECK_VAR |
| 9351 |
| 9352 | dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, |
| 9353 | dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], |
| 9354 | dnl [DESCRIPTION], [DEFAULT]) |
| 9355 | dnl ------------------------------------------ |
| 9356 | dnl |
| 9357 | dnl Prepare a "--with-" configure option using the lowercase |
| 9358 | dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and |
| 9359 | dnl PKG_CHECK_MODULES in a single macro. |
| 9360 | AC_DEFUN([PKG_WITH_MODULES], |
| 9361 | [ |
| 9362 | m4_pushdef([with_arg], m4_tolower([$1])) |
| 9363 |
| 9364 | m4_pushdef([description], |
| 9365 | [m4_default([$5], [build with ]with_arg[ support])]) |
| 9366 |
| 9367 | m4_pushdef([def_arg], [m4_default([$6], [auto])]) |
| 9368 | m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) |
| 9369 | m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) |
| 9370 |
| 9371 | m4_case(def_arg, |
| 9372 | [yes],[m4_pushdef([with_without], [--without-]with_arg)], |
| 9373 | [m4_pushdef([with_without],[--with-]with_arg)]) |
| 9374 |
| 9375 | AC_ARG_WITH(with_arg, |
| 9376 | AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, |
| 9377 | [AS_TR_SH([with_]with_arg)=def_arg]) |
| 9378 |
| 9379 | AS_CASE([$AS_TR_SH([with_]with_arg)], |
| 9380 | [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], |
| 9381 | [auto],[PKG_CHECK_MODULES([$1],[$2], |
| 9382 | [m4_n([def_action_if_found]) $3], |
| 9383 | [m4_n([def_action_if_not_found]) $4])]) |
| 9384 |
| 9385 | m4_popdef([with_arg]) |
| 9386 | m4_popdef([description]) |
| 9387 | m4_popdef([def_arg]) |
| 9388 |
| 9389 | ])dnl PKG_WITH_MODULES |
| 9390 |
| 9391 | dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, |
| 9392 | dnl [DESCRIPTION], [DEFAULT]) |
| 9393 | dnl ----------------------------------------------- |
| 9394 | dnl |
| 9395 | dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES |
| 9396 | dnl check._[VARIABLE-PREFIX] is exported as make variable. |
| 9397 | AC_DEFUN([PKG_HAVE_WITH_MODULES], |
| 9398 | [ |
| 9399 | PKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) |
| 9400 |
| 9401 | AM_CONDITIONAL([HAVE_][$1], |
| 9402 | [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) |
| 9403 | ])dnl PKG_HAVE_WITH_MODULES |
| 9404 |
| 9405 | dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, |
| 9406 | dnl [DESCRIPTION], [DEFAULT]) |
| 9407 | dnl ------------------------------------------------------ |
| 9408 | dnl |
| 9409 | dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after |
| 9410 | dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make |
| 9411 | dnl and preprocessor variable. |
| 9412 | AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], |
| 9413 | [ |
| 9414 | PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) |
| 9415 |
| 9416 | AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], |
| 9417 | [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) |
| 9418 | ])dnl PKG_HAVE_DEFINE_WITH_MODULES |
| 9419 |
| 9420 | # Copyright (C) 2002-2018 Free Software Foundation, Inc. |
| 9421 | # |
| 9422 | # This file is free software; the Free Software Foundation |
| 9423 | # gives unlimited permission to copy and/or distribute it, |
| 9424 | # with or without modifications, as long as this notice is preserved. |
| 9425 |
| 9426 | # AM_AUTOMAKE_VERSION(VERSION) |
| 9427 | # ---------------------------- |
| 9428 | # Automake X.Y traces this macro to ensure aclocal.m4 has been |
| 9429 | # generated from the m4 files accompanying Automake X.Y. |
| 9430 | # (This private macro should not be called outside this file.) |
| 9431 | AC_DEFUN([AM_AUTOMAKE_VERSION], |
| 9432 | [am__api_version='1.16' |
| 9433 | dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to |
| 9434 | dnl require some minimum version. Point them to the right macro. |
| 9435 | m4_if([$1], [1.16.1], [], |
| 9436 | [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl |
| 9437 | ]) |
| 9438 |
| 9439 | # _AM_AUTOCONF_VERSION(VERSION) |
| 9440 | # ----------------------------- |
| 9441 | # aclocal traces this macro to find the Autoconf version. |
| 9442 | # This is a private macro too. Using m4_define simplifies |
| 9443 | # the logic in aclocal, which can simply ignore this definition. |
| 9444 | m4_define([_AM_AUTOCONF_VERSION], []) |
| 9445 |
| 9446 | # AM_SET_CURRENT_AUTOMAKE_VERSION |
| 9447 | # ------------------------------- |
| 9448 | # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. |
| 9449 | # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. |
| 9450 | AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], |
| 9451 | [AM_AUTOMAKE_VERSION([1.16.1])dnl |
| 9452 | m4_ifndef([AC_AUTOCONF_VERSION], |
| 9453 | [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl |
| 9454 | _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) |
| 9455 |
| 9456 | # Figure out how to run the assembler. -*- Autoconf -*- |
| 9457 |
| 9458 | # Copyright (C) 2001-2018 Free Software Foundation, Inc. |
| 9459 | # |
| 9460 | # This file is free software; the Free Software Foundation |
| 9461 | # gives unlimited permission to copy and/or distribute it, |
| 9462 | # with or without modifications, as long as this notice is preserved. |
| 9463 |
| 9464 | # AM_PROG_AS |
| 9465 | # ---------- |
| 9466 | AC_DEFUN([AM_PROG_AS], |
| 9467 | [# By default we simply use the C compiler to build assembly code. |
| 9468 | AC_REQUIRE([AC_PROG_CC]) |
| 9469 | test "${CCAS+set}" = set || CCAS=$CC |
| 9470 | test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS |
| 9471 | AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) |
| 9472 | AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) |
| 9473 | _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl |
| 9474 | ]) |
| 9475 |
| 9476 | # AM_AUX_DIR_EXPAND -*- Autoconf -*- |
| 9477 |
| 9478 | # Copyright (C) 2001-2018 Free Software Foundation, Inc. |
| 9479 | # |
| 9480 | # This file is free software; the Free Software Foundation |
| 9481 | # gives unlimited permission to copy and/or distribute it, |
| 9482 | # with or without modifications, as long as this notice is preserved. |
| 9483 |
| 9484 | # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets |
| 9485 | # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to |
| 9486 | # '$srcdir', '$srcdir/..', or '$srcdir/../..'. |
| 9487 | # |
| 9488 | # Of course, Automake must honor this variable whenever it calls a |
| 9489 | # tool from the auxiliary directory. The problem is that $srcdir (and |
| 9490 | # therefore $ac_aux_dir as well) can be either absolute or relative, |
| 9491 | # depending on how configure is run. This is pretty annoying, since |
| 9492 | # it makes $ac_aux_dir quite unusable in subdirectories: in the top |
| 9493 | # source directory, any form will work fine, but in subdirectories a |
| 9494 | # relative path needs to be adjusted first. |
| 9495 | # |
| 9496 | # $ac_aux_dir/missing |
| 9497 | # fails when called from a subdirectory if $ac_aux_dir is relative |
| 9498 | # $top_srcdir/$ac_aux_dir/missing |
| 9499 | # fails if $ac_aux_dir is absolute, |
| 9500 | # fails when called from a subdirectory in a VPATH build with |
| 9501 | # a relative $ac_aux_dir |
| 9502 | # |
| 9503 | # The reason of the latter failure is that $top_srcdir and $ac_aux_dir |
| 9504 | # are both prefixed by $srcdir. In an in-source build this is usually |
| 9505 | # harmless because $srcdir is '.', but things will broke when you |
| 9506 | # start a VPATH build or use an absolute $srcdir. |
| 9507 | # |
| 9508 | # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, |
| 9509 | # iff we strip the leading $srcdir from $ac_aux_dir. That would be: |
| 9510 | # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` |
| 9511 | # and then we would define $MISSING as |
| 9512 | # MISSING="\${SHELL} $am_aux_dir/missing" |
| 9513 | # This will work as long as MISSING is not called from configure, because |
| 9514 | # unfortunately $(top_srcdir) has no meaning in configure. |
| 9515 | # However there are other variables, like CC, which are often used in |
| 9516 | # configure, and could therefore not use this "fixed" $ac_aux_dir. |
| 9517 | # |
| 9518 | # Another solution, used here, is to always expand $ac_aux_dir to an |
| 9519 | # absolute PATH. The drawback is that using absolute paths prevent a |
| 9520 | # configured tree to be moved without reconfiguration. |
| 9521 |
| 9522 | AC_DEFUN([AM_AUX_DIR_EXPAND], |
| 9523 | [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl |
| 9524 | # Expand $ac_aux_dir to an absolute path. |
| 9525 | am_aux_dir=`cd "$ac_aux_dir" && pwd` |
| 9526 | ]) |
| 9527 |
| 9528 | # AM_CONDITIONAL -*- Autoconf -*- |
| 9529 |
| 9530 | # Copyright (C) 1997-2018 Free Software Foundation, Inc. |
| 9531 | # |
| 9532 | # This file is free software; the Free Software Foundation |
| 9533 | # gives unlimited permission to copy and/or distribute it, |
| 9534 | # with or without modifications, as long as this notice is preserved. |
| 9535 |
| 9536 | # AM_CONDITIONAL(NAME, SHELL-CONDITION) |
| 9537 | # ------------------------------------- |
| 9538 | # Define a conditional. |
| 9539 | AC_DEFUN([AM_CONDITIONAL], |
| 9540 | [AC_PREREQ([2.52])dnl |
| 9541 | m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], |
| 9542 | [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl |
| 9543 | AC_SUBST([$1_TRUE])dnl |
| 9544 | AC_SUBST([$1_FALSE])dnl |
| 9545 | _AM_SUBST_NOTMAKE([$1_TRUE])dnl |
| 9546 | _AM_SUBST_NOTMAKE([$1_FALSE])dnl |
| 9547 | m4_define([_AM_COND_VALUE_$1], [$2])dnl |
| 9548 | if $2; then |
| 9549 | $1_TRUE= |
| 9550 | $1_FALSE='#' |
| 9551 | else |
| 9552 | $1_TRUE='#' |
| 9553 | $1_FALSE= |
| 9554 | fi |
| 9555 | AC_CONFIG_COMMANDS_PRE( |
| 9556 | [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then |
| 9557 | AC_MSG_ERROR([[conditional "$1" was never defined. |
| 9558 | Usually this means the macro was only invoked conditionally.]]) |
| 9559 | fi])]) |
| 9560 |
| 9561 | # Copyright (C) 1999-2018 Free Software Foundation, Inc. |
| 9562 | # |
| 9563 | # This file is free software; the Free Software Foundation |
| 9564 | # gives unlimited permission to copy and/or distribute it, |
| 9565 | # with or without modifications, as long as this notice is preserved. |
| 9566 |
| 9567 |
| 9568 | # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be |
| 9569 | # written in clear, in which case automake, when reading aclocal.m4, |
| 9570 | # will think it sees a *use*, and therefore will trigger all it's |
| 9571 | # C support machinery. Also note that it means that autoscan, seeing |
| 9572 | # CC etc. in the Makefile, will ask for an AC_PROG_CC use... |
| 9573 |
| 9574 |
| 9575 | # _AM_DEPENDENCIES(NAME) |
| 9576 | # ---------------------- |
| 9577 | # See how the compiler implements dependency checking. |
| 9578 | # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". |
| 9579 | # We try a few techniques and use that to set a single cache variable. |
| 9580 | # |
| 9581 | # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was |
| 9582 | # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular |
| 9583 | # dependency, and given that the user is not expected to run this macro, |
| 9584 | # just rely on AC_PROG_CC. |
| 9585 | AC_DEFUN([_AM_DEPENDENCIES], |
| 9586 | [AC_REQUIRE([AM_SET_DEPDIR])dnl |
| 9587 | AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl |
| 9588 | AC_REQUIRE([AM_MAKE_INCLUDE])dnl |
| 9589 | AC_REQUIRE([AM_DEP_TRACK])dnl |
| 9590 |
| 9591 | m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], |
| 9592 | [$1], [CXX], [depcc="$CXX" am_compiler_list=], |
| 9593 | [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], |
| 9594 | [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], |
| 9595 | [$1], [UPC], [depcc="$UPC" am_compiler_list=], |
| 9596 | [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], |
| 9597 | [depcc="$$1" am_compiler_list=]) |
| 9598 |
| 9599 | AC_CACHE_CHECK([dependency style of $depcc], |
| 9600 | [am_cv_$1_dependencies_compiler_type], |
| 9601 | [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then |
| 9602 | # We make a subdir and do the tests there. Otherwise we can end up |
| 9603 | # making bogus files that we don't know about and never remove. For |
| 9604 | # instance it was reported that on HP-UX the gcc test will end up |
| 9605 | # making a dummy file named 'D' -- because '-MD' means "put the output |
| 9606 | # in D". |
| 9607 | rm -rf conftest.dir |
| 9608 | mkdir conftest.dir |
| 9609 | # Copy depcomp to subdir because otherwise we won't find it if we're |
| 9610 | # using a relative directory. |
| 9611 | cp "$am_depcomp" conftest.dir |
| 9612 | cd conftest.dir |
| 9613 | # We will build objects and dependencies in a subdirectory because |
| 9614 | # it helps to detect inapplicable dependency modes. For instance |
| 9615 | # both Tru64's cc and ICC support -MD to output dependencies as a |
| 9616 | # side effect of compilation, but ICC will put the dependencies in |
| 9617 | # the current directory while Tru64 will put them in the object |
| 9618 | # directory. |
| 9619 | mkdir sub |
| 9620 |
| 9621 | am_cv_$1_dependencies_compiler_type=none |
| 9622 | if test "$am_compiler_list" = ""; then |
| 9623 | am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` |
| 9624 | fi |
| 9625 | am__universal=false |
| 9626 | m4_case([$1], [CC], |
| 9627 | [case " $depcc " in #( |
| 9628 | *\ -arch\ *\ -arch\ *) am__universal=true ;; |
| 9629 | esac], |
| 9630 | [CXX], |
| 9631 | [case " $depcc " in #( |
| 9632 | *\ -arch\ *\ -arch\ *) am__universal=true ;; |
| 9633 | esac]) |
| 9634 |
| 9635 | for depmode in $am_compiler_list; do |
| 9636 | # Setup a source with many dependencies, because some compilers |
| 9637 | # like to wrap large dependency lists on column 80 (with \), and |
| 9638 | # we should not choose a depcomp mode which is confused by this. |
| 9639 | # |
| 9640 | # We need to recreate these files for each test, as the compiler may |
| 9641 | # overwrite some of them when testing with obscure command lines. |
| 9642 | # This happens at least with the AIX C compiler. |
| 9643 | : > sub/conftest.c |
| 9644 | for i in 1 2 3 4 5 6; do |
| 9645 | echo '#include "conftst'$i'.h"' >> sub/conftest.c |
| 9646 | # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with |
| 9647 | # Solaris 10 /bin/sh. |
| 9648 | echo '/* dummy */' > sub/conftst$i.h |
| 9649 | done |
| 9650 | echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf |
| 9651 |
| 9652 | # We check with '-c' and '-o' for the sake of the "dashmstdout" |
| 9653 | # mode. It turns out that the SunPro C++ compiler does not properly |
| 9654 | # handle '-M -o', and we need to detect this. Also, some Intel |
| 9655 | # versions had trouble with output in subdirs. |
| 9656 | am__obj=sub/conftest.${OBJEXT-o} |
| 9657 | am__minus_obj="-o $am__obj" |
| 9658 | case $depmode in |
| 9659 | gcc) |
| 9660 | # This depmode causes a compiler race in universal mode. |
| 9661 | test "$am__universal" = false || continue |
| 9662 | ;; |
| 9663 | nosideeffect) |
| 9664 | # After this tag, mechanisms are not by side-effect, so they'll |
| 9665 | # only be used when explicitly requested. |
| 9666 | if test "x$enable_dependency_tracking" = xyes; then |
| 9667 | continue |
| 9668 | else |
| 9669 | break |
| 9670 | fi |
| 9671 | ;; |
| 9672 | msvc7 | msvc7msys | msvisualcpp | msvcmsys) |
| 9673 | # This compiler won't grok '-c -o', but also, the minuso test has |
| 9674 | # not run yet. These depmodes are late enough in the game, and |
| 9675 | # so weak that their functioning should not be impacted. |
| 9676 | am__obj=conftest.${OBJEXT-o} |
| 9677 | am__minus_obj= |
| 9678 | ;; |
| 9679 | none) break ;; |
| 9680 | esac |
| 9681 | if depmode=$depmode \ |
| 9682 | source=sub/conftest.c object=$am__obj \ |
| 9683 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ |
| 9684 | $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ |
| 9685 | >/dev/null 2>conftest.err && |
| 9686 | grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && |
| 9687 | grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && |
| 9688 | grep $am__obj sub/conftest.Po > /dev/null 2>&1 && |
| 9689 | ${MAKE-make} -s -f confmf > /dev/null 2>&1; then |
| 9690 | # icc doesn't choke on unknown options, it will just issue warnings |
| 9691 | # or remarks (even with -Werror). So we grep stderr for any message |
| 9692 | # that says an option was ignored or not supported. |
| 9693 | # When given -MP, icc 7.0 and 7.1 complain thusly: |
| 9694 | # icc: Command line warning: ignoring option '-M'; no argument required |
| 9695 | # The diagnosis changed in icc 8.0: |
| 9696 | # icc: Command line remark: option '-MP' not supported |
| 9697 | if (grep 'ignoring option' conftest.err || |
| 9698 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else |
| 9699 | am_cv_$1_dependencies_compiler_type=$depmode |
| 9700 | break |
| 9701 | fi |
| 9702 | fi |
| 9703 | done |
| 9704 |
| 9705 | cd .. |
| 9706 | rm -rf conftest.dir |
| 9707 | else |
| 9708 | am_cv_$1_dependencies_compiler_type=none |
| 9709 | fi |
| 9710 | ]) |
| 9711 | AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) |
| 9712 | AM_CONDITIONAL([am__fastdep$1], [ |
| 9713 | test "x$enable_dependency_tracking" != xno \ |
| 9714 | && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) |
| 9715 | ]) |
| 9716 |
| 9717 |
| 9718 | # AM_SET_DEPDIR |
| 9719 | # ------------- |
| 9720 | # Choose a directory name for dependency files. |
| 9721 | # This macro is AC_REQUIREd in _AM_DEPENDENCIES. |
| 9722 | AC_DEFUN([AM_SET_DEPDIR], |
| 9723 | [AC_REQUIRE([AM_SET_LEADING_DOT])dnl |
| 9724 | AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl |
| 9725 | ]) |
| 9726 |
| 9727 |
| 9728 | # AM_DEP_TRACK |
| 9729 | # ------------ |
| 9730 | AC_DEFUN([AM_DEP_TRACK], |
| 9731 | [AC_ARG_ENABLE([dependency-tracking], [dnl |
| 9732 | AS_HELP_STRING( |
| 9733 | [--enable-dependency-tracking], |
| 9734 | [do not reject slow dependency extractors]) |
| 9735 | AS_HELP_STRING( |
| 9736 | [--disable-dependency-tracking], |
| 9737 | [speeds up one-time build])]) |
| 9738 | if test "x$enable_dependency_tracking" != xno; then |
| 9739 | am_depcomp="$ac_aux_dir/depcomp" |
| 9740 | AMDEPBACKSLASH='\' |
| 9741 | am__nodep='_no' |
| 9742 | fi |
| 9743 | AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) |
| 9744 | AC_SUBST([AMDEPBACKSLASH])dnl |
| 9745 | _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl |
| 9746 | AC_SUBST([am__nodep])dnl |
| 9747 | _AM_SUBST_NOTMAKE([am__nodep])dnl |
| 9748 | ]) |
| 9749 |
| 9750 | # Generate code to set up dependency tracking. -*- Autoconf -*- |
| 9751 |
| 9752 | # Copyright (C) 1999-2018 Free Software Foundation, Inc. |
| 9753 | # |
| 9754 | # This file is free software; the Free Software Foundation |
| 9755 | # gives unlimited permission to copy and/or distribute it, |
| 9756 | # with or without modifications, as long as this notice is preserved. |
| 9757 |
| 9758 | # _AM_OUTPUT_DEPENDENCY_COMMANDS |
| 9759 | # ------------------------------ |
| 9760 | AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], |
| 9761 | [{ |
| 9762 | # Older Autoconf quotes --file arguments for eval, but not when files |
| 9763 | # are listed without --file. Let's play safe and only enable the eval |
| 9764 | # if we detect the quoting. |
| 9765 | # TODO: see whether this extra hack can be removed once we start |
| 9766 | # requiring Autoconf 2.70 or later. |
| 9767 | AS_CASE([$CONFIG_FILES], |
| 9768 | [*\'*], [eval set x "$CONFIG_FILES"], |
| 9769 | [*], [set x $CONFIG_FILES]) |
| 9770 | shift |
| 9771 | # Used to flag and report bootstrapping failures. |
| 9772 | am_rc=0 |
| 9773 | for am_mf |
| 9774 | do |
| 9775 | # Strip MF so we end up with the name of the file. |
| 9776 | am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` |
| 9777 | # Check whether this is an Automake generated Makefile which includes |
| 9778 | # dependency-tracking related rules and includes. |
| 9779 | # Grep'ing the whole file directly is not great: AIX grep has a line |
| 9780 | # limit of 2048, but all sed's we know have understand at least 4000. |
| 9781 | sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ |
| 9782 | || continue |
| 9783 | am_dirpart=`AS_DIRNAME(["$am_mf"])` |
| 9784 | am_filepart=`AS_BASENAME(["$am_mf"])` |
| 9785 | AM_RUN_LOG([cd "$am_dirpart" \ |
| 9786 | && sed -e '/# am--include-marker/d' "$am_filepart" \ |
| 9787 | | $MAKE -f - am--depfiles]) || am_rc=$? |
| 9788 | done |
| 9789 | if test $am_rc -ne 0; then |
| 9790 | AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments |
| 9791 | for automatic dependency tracking. Try re-running configure with the |
| 9792 | '--disable-dependency-tracking' option to at least be able to build |
| 9793 | the package (albeit without support for automatic dependency tracking).]) |
| 9794 | fi |
| 9795 | AS_UNSET([am_dirpart]) |
| 9796 | AS_UNSET([am_filepart]) |
| 9797 | AS_UNSET([am_mf]) |
| 9798 | AS_UNSET([am_rc]) |
| 9799 | rm -f conftest-deps.mk |
| 9800 | } |
| 9801 | ])# _AM_OUTPUT_DEPENDENCY_COMMANDS |
| 9802 |
| 9803 |
| 9804 | # AM_OUTPUT_DEPENDENCY_COMMANDS |
| 9805 | # ----------------------------- |
| 9806 | # This macro should only be invoked once -- use via AC_REQUIRE. |
| 9807 | # |
| 9808 | # This code is only required when automatic dependency tracking is enabled. |
| 9809 | # This creates each '.Po' and '.Plo' makefile fragment that we'll need in |
| 9810 | # order to bootstrap the dependency handling code. |
| 9811 | AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], |
| 9812 | [AC_CONFIG_COMMANDS([depfiles], |
| 9813 | [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], |
| 9814 | [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) |
| 9815 |
| 9816 | # Do all the work for Automake. -*- Autoconf -*- |
| 9817 |
| 9818 | # Copyright (C) 1996-2018 Free Software Foundation, Inc. |
| 9819 | # |
| 9820 | # This file is free software; the Free Software Foundation |
| 9821 | # gives unlimited permission to copy and/or distribute it, |
| 9822 | # with or without modifications, as long as this notice is preserved. |
| 9823 |
| 9824 | # This macro actually does too much. Some checks are only needed if |
| 9825 | # your package does certain things. But this isn't really a big deal. |
| 9826 |
| 9827 | dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. |
| 9828 | m4_define([AC_PROG_CC], |
| 9829 | m4_defn([AC_PROG_CC]) |
| 9830 | [_AM_PROG_CC_C_O |
| 9831 | ]) |
| 9832 |
| 9833 | # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) |
| 9834 | # AM_INIT_AUTOMAKE([OPTIONS]) |
| 9835 | # ----------------------------------------------- |
| 9836 | # The call with PACKAGE and VERSION arguments is the old style |
| 9837 | # call (pre autoconf-2.50), which is being phased out. PACKAGE |
| 9838 | # and VERSION should now be passed to AC_INIT and removed from |
| 9839 | # the call to AM_INIT_AUTOMAKE. |
| 9840 | # We support both call styles for the transition. After |
| 9841 | # the next Automake release, Autoconf can make the AC_INIT |
| 9842 | # arguments mandatory, and then we can depend on a new Autoconf |
| 9843 | # release and drop the old call support. |
| 9844 | AC_DEFUN([AM_INIT_AUTOMAKE], |
| 9845 | [AC_PREREQ([2.65])dnl |
| 9846 | dnl Autoconf wants to disallow AM_ names. We explicitly allow |
| 9847 | dnl the ones we care about. |
| 9848 | m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl |
| 9849 | AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl |
| 9850 | AC_REQUIRE([AC_PROG_INSTALL])dnl |
| 9851 | if test "`cd $srcdir && pwd`" != "`pwd`"; then |
| 9852 | # Use -I$(srcdir) only when $(srcdir) != ., so that make's output |
| 9853 | # is not polluted with repeated "-I." |
| 9854 | AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl |
| 9855 | # test to see if srcdir already configured |
| 9856 | if test -f $srcdir/config.status; then |
| 9857 | AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) |
| 9858 | fi |
| 9859 | fi |
| 9860 |
| 9861 | # test whether we have cygpath |
| 9862 | if test -z "$CYGPATH_W"; then |
| 9863 | if (cygpath --version) >/dev/null 2>/dev/null; then |
| 9864 | CYGPATH_W='cygpath -w' |
| 9865 | else |
| 9866 | CYGPATH_W=echo |
| 9867 | fi |
| 9868 | fi |
| 9869 | AC_SUBST([CYGPATH_W]) |
| 9870 |
| 9871 | # Define the identity of the package. |
| 9872 | dnl Distinguish between old-style and new-style calls. |
| 9873 | m4_ifval([$2], |
| 9874 | [AC_DIAGNOSE([obsolete], |
| 9875 | [$0: two- and three-arguments forms are deprecated.]) |
| 9876 | m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl |
| 9877 | AC_SUBST([PACKAGE], [$1])dnl |
| 9878 | AC_SUBST([VERSION], [$2])], |
| 9879 | [_AM_SET_OPTIONS([$1])dnl |
| 9880 | dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. |
| 9881 | m4_if( |
| 9882 | m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), |
| 9883 | [ok:ok],, |
| 9884 | [m4_fatal([AC_INIT should be called with package and version arguments])])dnl |
| 9885 | AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl |
| 9886 | AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl |
| 9887 |
| 9888 | _AM_IF_OPTION([no-define],, |
| 9889 | [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) |
| 9890 | AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl |
| 9891 |
| 9892 | # Some tools Automake needs. |
| 9893 | AC_REQUIRE([AM_SANITY_CHECK])dnl |
| 9894 | AC_REQUIRE([AC_ARG_PROGRAM])dnl |
| 9895 | AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) |
| 9896 | AM_MISSING_PROG([AUTOCONF], [autoconf]) |
| 9897 | AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) |
| 9898 | AM_MISSING_PROG([AUTOHEADER], [autoheader]) |
| 9899 | AM_MISSING_PROG([MAKEINFO], [makeinfo]) |
| 9900 | AC_REQUIRE([AM_PROG_INSTALL_SH])dnl |
| 9901 | AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl |
| 9902 | AC_REQUIRE([AC_PROG_MKDIR_P])dnl |
| 9903 | # For better backward compatibility. To be removed once Automake 1.9.x |
| 9904 | # dies out for good. For more background, see: |
| 9905 | # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> |
| 9906 | # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> |
| 9907 | AC_SUBST([mkdir_p], ['$(MKDIR_P)']) |
| 9908 | # We need awk for the "check" target (and possibly the TAP driver). The |
| 9909 | # system "awk" is bad on some platforms. |
| 9910 | AC_REQUIRE([AC_PROG_AWK])dnl |
| 9911 | AC_REQUIRE([AC_PROG_MAKE_SET])dnl |
| 9912 | AC_REQUIRE([AM_SET_LEADING_DOT])dnl |
| 9913 | _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], |
| 9914 | [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], |
| 9915 | [_AM_PROG_TAR([v7])])]) |
| 9916 | _AM_IF_OPTION([no-dependencies],, |
| 9917 | [AC_PROVIDE_IFELSE([AC_PROG_CC], |
| 9918 | [_AM_DEPENDENCIES([CC])], |
| 9919 | [m4_define([AC_PROG_CC], |
| 9920 | m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl |
| 9921 | AC_PROVIDE_IFELSE([AC_PROG_CXX], |
| 9922 | [_AM_DEPENDENCIES([CXX])], |
| 9923 | [m4_define([AC_PROG_CXX], |
| 9924 | m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl |
| 9925 | AC_PROVIDE_IFELSE([AC_PROG_OBJC], |
| 9926 | [_AM_DEPENDENCIES([OBJC])], |
| 9927 | [m4_define([AC_PROG_OBJC], |
| 9928 | m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl |
| 9929 | AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], |
| 9930 | [_AM_DEPENDENCIES([OBJCXX])], |
| 9931 | [m4_define([AC_PROG_OBJCXX], |
| 9932 | m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl |
| 9933 | ]) |
| 9934 | AC_REQUIRE([AM_SILENT_RULES])dnl |
| 9935 | dnl The testsuite driver may need to know about EXEEXT, so add the |
| 9936 | dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This |
| 9937 | dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. |
| 9938 | AC_CONFIG_COMMANDS_PRE(dnl |
| 9939 | [m4_provide_if([_AM_COMPILER_EXEEXT], |
| 9940 | [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl |
| 9941 |
| 9942 | # POSIX will say in a future version that running "rm -f" with no argument |
| 9943 | # is OK; and we want to be able to make that assumption in our Makefile |
| 9944 | # recipes. So use an aggressive probe to check that the usage we want is |
| 9945 | # actually supported "in the wild" to an acceptable degree. |
| 9946 | # See automake bug#10828. |
| 9947 | # To make any issue more visible, cause the running configure to be aborted |
| 9948 | # by default if the 'rm' program in use doesn't match our expectations; the |
| 9949 | # user can still override this though. |
| 9950 | if rm -f && rm -fr && rm -rf; then : OK; else |
| 9951 | cat >&2 <<'END' |
| 9952 | Oops! |
| 9953 |
| 9954 | Your 'rm' program seems unable to run without file operands specified |
| 9955 | on the command line, even when the '-f' option is present. This is contrary |
| 9956 | to the behaviour of most rm programs out there, and not conforming with |
| 9957 | the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> |
| 9958 |
| 9959 | Please tell bug-automake@gnu.org about your system, including the value |
| 9960 | of your $PATH and any error possibly output before this message. This |
| 9961 | can help us improve future automake versions. |
| 9962 |
| 9963 | END |
| 9964 | if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then |
| 9965 | echo 'Configuration will proceed anyway, since you have set the' >&2 |
| 9966 | echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 |
| 9967 | echo >&2 |
| 9968 | else |
| 9969 | cat >&2 <<'END' |
| 9970 | Aborting the configuration process, to ensure you take notice of the issue. |
| 9971 |
| 9972 | You can download and install GNU coreutils to get an 'rm' implementation |
| 9973 | that behaves properly: <https://www.gnu.org/software/coreutils/>. |
| 9974 |
| 9975 | If you want to complete the configuration process using your problematic |
| 9976 | 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM |
| 9977 | to "yes", and re-run configure. |
| 9978 |
| 9979 | END |
| 9980 | AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) |
| 9981 | fi |
| 9982 | fi |
| 9983 | dnl The trailing newline in this macro's definition is deliberate, for |
| 9984 | dnl backward compatibility and to allow trailing 'dnl'-style comments |
| 9985 | dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. |
| 9986 | ]) |
| 9987 |
| 9988 | dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not |
| 9989 | dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further |
| 9990 | dnl mangled by Autoconf and run in a shell conditional statement. |
| 9991 | m4_define([_AC_COMPILER_EXEEXT], |
| 9992 | m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) |
| 9993 |
| 9994 | # When config.status generates a header, we must update the stamp-h file. |
| 9995 | # This file resides in the same directory as the config header |
| 9996 | # that is generated. The stamp files are numbered to have different names. |
| 9997 |
| 9998 | # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the |
| 9999 | # loop where config.status creates the headers, so we can generate |
| 10000 | # our stamp files there. |
| 10001 | AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], |
| 10002 | [# Compute $1's index in $config_headers. |
| 10003 | _am_arg=$1 |
| 10004 | _am_stamp_count=1 |
| 10005 | for _am_header in $config_headers :; do |
| 10006 | case $_am_header in |
| 10007 | $_am_arg | $_am_arg:* ) |
| 10008 | break ;; |
| 10009 | * ) |
| 10010 | _am_stamp_count=`expr $_am_stamp_count + 1` ;; |
| 10011 | esac |
| 10012 | done |
| 10013 | echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) |
| 10014 |
| 10015 | # Copyright (C) 2001-2018 Free Software Foundation, Inc. |
| 10016 | # |
| 10017 | # This file is free software; the Free Software Foundation |
| 10018 | # gives unlimited permission to copy and/or distribute it, |
| 10019 | # with or without modifications, as long as this notice is preserved. |
| 10020 |
| 10021 | # AM_PROG_INSTALL_SH |
| 10022 | # ------------------ |
| 10023 | # Define $install_sh. |
| 10024 | AC_DEFUN([AM_PROG_INSTALL_SH], |
| 10025 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
| 10026 | if test x"${install_sh+set}" != xset; then |
| 10027 | case $am_aux_dir in |
| 10028 | *\ * | *\ *) |
| 10029 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; |
| 10030 | *) |
| 10031 | install_sh="\${SHELL} $am_aux_dir/install-sh" |
| 10032 | esac |
| 10033 | fi |
| 10034 | AC_SUBST([install_sh])]) |
| 10035 |
| 10036 | # Copyright (C) 2003-2018 Free Software Foundation, Inc. |
| 10037 | # |
| 10038 | # This file is free software; the Free Software Foundation |
| 10039 | # gives unlimited permission to copy and/or distribute it, |
| 10040 | # with or without modifications, as long as this notice is preserved. |
| 10041 |
| 10042 | # Check whether the underlying file-system supports filenames |
| 10043 | # with a leading dot. For instance MS-DOS doesn't. |
| 10044 | AC_DEFUN([AM_SET_LEADING_DOT], |
| 10045 | [rm -rf .tst 2>/dev/null |
| 10046 | mkdir .tst 2>/dev/null |
| 10047 | if test -d .tst; then |
| 10048 | am__leading_dot=. |
| 10049 | else |
| 10050 | am__leading_dot=_ |
| 10051 | fi |
| 10052 | rmdir .tst 2>/dev/null |
| 10053 | AC_SUBST([am__leading_dot])]) |
| 10054 |
| 10055 | # Check to see how 'make' treats includes. -*- Autoconf -*- |
| 10056 |
| 10057 | # Copyright (C) 2001-2018 Free Software Foundation, Inc. |
| 10058 | # |
| 10059 | # This file is free software; the Free Software Foundation |
| 10060 | # gives unlimited permission to copy and/or distribute it, |
| 10061 | # with or without modifications, as long as this notice is preserved. |
| 10062 |
| 10063 | # AM_MAKE_INCLUDE() |
| 10064 | # ----------------- |
| 10065 | # Check whether make has an 'include' directive that can support all |
| 10066 | # the idioms we need for our automatic dependency tracking code. |
| 10067 | AC_DEFUN([AM_MAKE_INCLUDE], |
| 10068 | [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) |
| 10069 | cat > confinc.mk << 'END' |
| 10070 | am__doit: |
| 10071 | @echo this is the am__doit target >confinc.out |
| 10072 | .PHONY: am__doit |
| 10073 | END |
| 10074 | am__include="#" |
| 10075 | am__quote= |
| 10076 | # BSD make does it like this. |
| 10077 | echo '.include "confinc.mk" # ignored' > confmf.BSD |
| 10078 | # Other make implementations (GNU, Solaris 10, AIX) do it like this. |
| 10079 | echo 'include confinc.mk # ignored' > confmf.GNU |
| 10080 | _am_result=no |
| 10081 | for s in GNU BSD; do |
| 10082 | AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) |
| 10083 | AS_CASE([$?:`cat confinc.out 2>/dev/null`], |
| 10084 | ['0:this is the am__doit target'], |
| 10085 | [AS_CASE([$s], |
| 10086 | [BSD], [am__include='.include' am__quote='"'], |
| 10087 | [am__include='include' am__quote=''])]) |
| 10088 | if test "$am__include" != "#"; then |
| 10089 | _am_result="yes ($s style)" |
| 10090 | break |
| 10091 | fi |
| 10092 | done |
| 10093 | rm -f confinc.* confmf.* |
| 10094 | AC_MSG_RESULT([${_am_result}]) |
| 10095 | AC_SUBST([am__include])]) |
| 10096 | AC_SUBST([am__quote])]) |
| 10097 |
| 10098 | # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- |
| 10099 |
| 10100 | # Copyright (C) 1997-2018 Free Software Foundation, Inc. |
| 10101 | # |
| 10102 | # This file is free software; the Free Software Foundation |
| 10103 | # gives unlimited permission to copy and/or distribute it, |
| 10104 | # with or without modifications, as long as this notice is preserved. |
| 10105 |
| 10106 | # AM_MISSING_PROG(NAME, PROGRAM) |
| 10107 | # ------------------------------ |
| 10108 | AC_DEFUN([AM_MISSING_PROG], |
| 10109 | [AC_REQUIRE([AM_MISSING_HAS_RUN]) |
| 10110 | $1=${$1-"${am_missing_run}$2"} |
| 10111 | AC_SUBST($1)]) |
| 10112 |
| 10113 | # AM_MISSING_HAS_RUN |
| 10114 | # ------------------ |
| 10115 | # Define MISSING if not defined so far and test if it is modern enough. |
| 10116 | # If it is, set am_missing_run to use it, otherwise, to nothing. |
| 10117 | AC_DEFUN([AM_MISSING_HAS_RUN], |
| 10118 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
| 10119 | AC_REQUIRE_AUX_FILE([missing])dnl |
| 10120 | if test x"${MISSING+set}" != xset; then |
| 10121 | case $am_aux_dir in |
| 10122 | *\ * | *\ *) |
| 10123 | MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; |
| 10124 | *) |
| 10125 | MISSING="\${SHELL} $am_aux_dir/missing" ;; |
| 10126 | esac |
| 10127 | fi |
| 10128 | # Use eval to expand $SHELL |
| 10129 | if eval "$MISSING --is-lightweight"; then |
| 10130 | am_missing_run="$MISSING " |
| 10131 | else |
| 10132 | am_missing_run= |
| 10133 | AC_MSG_WARN(['missing' script is too old or missing]) |
| 10134 | fi |
| 10135 | ]) |
| 10136 |
| 10137 | # Helper functions for option handling. -*- Autoconf -*- |
| 10138 |
| 10139 | # Copyright (C) 2001-2018 Free Software Foundation, Inc. |
| 10140 | # |
| 10141 | # This file is free software; the Free Software Foundation |
| 10142 | # gives unlimited permission to copy and/or distribute it, |
| 10143 | # with or without modifications, as long as this notice is preserved. |
| 10144 |
| 10145 | # _AM_MANGLE_OPTION(NAME) |
| 10146 | # ----------------------- |
| 10147 | AC_DEFUN([_AM_MANGLE_OPTION], |
| 10148 | [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) |
| 10149 |
| 10150 | # _AM_SET_OPTION(NAME) |
| 10151 | # -------------------- |
| 10152 | # Set option NAME. Presently that only means defining a flag for this option. |
| 10153 | AC_DEFUN([_AM_SET_OPTION], |
| 10154 | [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) |
| 10155 |
| 10156 | # _AM_SET_OPTIONS(OPTIONS) |
| 10157 | # ------------------------ |
| 10158 | # OPTIONS is a space-separated list of Automake options. |
| 10159 | AC_DEFUN([_AM_SET_OPTIONS], |
| 10160 | [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) |
| 10161 |
| 10162 | # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) |
| 10163 | # ------------------------------------------- |
| 10164 | # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. |
| 10165 | AC_DEFUN([_AM_IF_OPTION], |
| 10166 | [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) |
| 10167 |
| 10168 | # Copyright (C) 1999-2018 Free Software Foundation, Inc. |
| 10169 | # |
| 10170 | # This file is free software; the Free Software Foundation |
| 10171 | # gives unlimited permission to copy and/or distribute it, |
| 10172 | # with or without modifications, as long as this notice is preserved. |
| 10173 |
| 10174 | # _AM_PROG_CC_C_O |
| 10175 | # --------------- |
| 10176 | # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC |
| 10177 | # to automatically call this. |
| 10178 | AC_DEFUN([_AM_PROG_CC_C_O], |
| 10179 | [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl |
| 10180 | AC_REQUIRE_AUX_FILE([compile])dnl |
| 10181 | AC_LANG_PUSH([C])dnl |
| 10182 | AC_CACHE_CHECK( |
| 10183 | [whether $CC understands -c and -o together], |
| 10184 | [am_cv_prog_cc_c_o], |
| 10185 | [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) |
| 10186 | # Make sure it works both with $CC and with simple cc. |
| 10187 | # Following AC_PROG_CC_C_O, we do the test twice because some |
| 10188 | # compilers refuse to overwrite an existing .o file with -o, |
| 10189 | # though they will create one. |
| 10190 | am_cv_prog_cc_c_o=yes |
| 10191 | for am_i in 1 2; do |
| 10192 | if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ |
| 10193 | && test -f conftest2.$ac_objext; then |
| 10194 | : OK |
| 10195 | else |
| 10196 | am_cv_prog_cc_c_o=no |
| 10197 | break |
| 10198 | fi |
| 10199 | done |
| 10200 | rm -f core conftest* |
| 10201 | unset am_i]) |
| 10202 | if test "$am_cv_prog_cc_c_o" != yes; then |
| 10203 | # Losing compiler, so override with the script. |
| 10204 | # FIXME: It is wrong to rewrite CC. |
| 10205 | # But if we don't then we get into trouble of one sort or another. |
| 10206 | # A longer-term fix would be to have automake use am__CC in this case, |
| 10207 | # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" |
| 10208 | CC="$am_aux_dir/compile $CC" |
| 10209 | fi |
| 10210 | AC_LANG_POP([C])]) |
| 10211 |
| 10212 | # For backward compatibility. |
| 10213 | AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) |
| 10214 |
| 10215 | # Copyright (C) 2001-2018 Free Software Foundation, Inc. |
| 10216 | # |
| 10217 | # This file is free software; the Free Software Foundation |
| 10218 | # gives unlimited permission to copy and/or distribute it, |
| 10219 | # with or without modifications, as long as this notice is preserved. |
| 10220 |
| 10221 | # AM_RUN_LOG(COMMAND) |
| 10222 | # ------------------- |
| 10223 | # Run COMMAND, save the exit status in ac_status, and log it. |
| 10224 | # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) |
| 10225 | AC_DEFUN([AM_RUN_LOG], |
| 10226 | [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD |
| 10227 | ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD |
| 10228 | ac_status=$? |
| 10229 | echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD |
| 10230 | (exit $ac_status); }]) |
| 10231 |
| 10232 | # Check to make sure that the build environment is sane. -*- Autoconf -*- |
| 10233 |
| 10234 | # Copyright (C) 1996-2018 Free Software Foundation, Inc. |
| 10235 | # |
| 10236 | # This file is free software; the Free Software Foundation |
| 10237 | # gives unlimited permission to copy and/or distribute it, |
| 10238 | # with or without modifications, as long as this notice is preserved. |
| 10239 |
| 10240 | # AM_SANITY_CHECK |
| 10241 | # --------------- |
| 10242 | AC_DEFUN([AM_SANITY_CHECK], |
| 10243 | [AC_MSG_CHECKING([whether build environment is sane]) |
| 10244 | # Reject unsafe characters in $srcdir or the absolute working directory |
| 10245 | # name. Accept space and tab only in the latter. |
| 10246 | am_lf=' |
| 10247 | ' |
| 10248 | case `pwd` in |
| 10249 | *[[\\\"\#\$\&\'\`$am_lf]]*) |
| 10250 | AC_MSG_ERROR([unsafe absolute working directory name]);; |
| 10251 | esac |
| 10252 | case $srcdir in |
| 10253 | *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) |
| 10254 | AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; |
| 10255 | esac |
| 10256 |
| 10257 | # Do 'set' in a subshell so we don't clobber the current shell's |
| 10258 | # arguments. Must try -L first in case configure is actually a |
| 10259 | # symlink; some systems play weird games with the mod time of symlinks |
| 10260 | # (eg FreeBSD returns the mod time of the symlink's containing |
| 10261 | # directory). |
| 10262 | if ( |
| 10263 | am_has_slept=no |
| 10264 | for am_try in 1 2; do |
| 10265 | echo "timestamp, slept: $am_has_slept" > conftest.file |
| 10266 | set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` |
| 10267 | if test "$[*]" = "X"; then |
| 10268 | # -L didn't work. |
| 10269 | set X `ls -t "$srcdir/configure" conftest.file` |
| 10270 | fi |
| 10271 | if test "$[*]" != "X $srcdir/configure conftest.file" \ |
| 10272 | && test "$[*]" != "X conftest.file $srcdir/configure"; then |
| 10273 |
| 10274 | # If neither matched, then we have a broken ls. This can happen |
| 10275 | # if, for instance, CONFIG_SHELL is bash and it inherits a |
| 10276 | # broken ls alias from the environment. This has actually |
| 10277 | # happened. Such a system could not be considered "sane". |
| 10278 | AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken |
| 10279 | alias in your environment]) |
| 10280 | fi |
| 10281 | if test "$[2]" = conftest.file || test $am_try -eq 2; then |
| 10282 | break |
| 10283 | fi |
| 10284 | # Just in case. |
| 10285 | sleep 1 |
| 10286 | am_has_slept=yes |
| 10287 | done |
| 10288 | test "$[2]" = conftest.file |
| 10289 | ) |
| 10290 | then |
| 10291 | # Ok. |
| 10292 | : |
| 10293 | else |
| 10294 | AC_MSG_ERROR([newly created file is older than distributed files! |
| 10295 | Check your system clock]) |
| 10296 | fi |
| 10297 | AC_MSG_RESULT([yes]) |
| 10298 | # If we didn't sleep, we still need to ensure time stamps of config.status and |
| 10299 | # generated files are strictly newer. |
| 10300 | am_sleep_pid= |
| 10301 | if grep 'slept: no' conftest.file >/dev/null 2>&1; then |
| 10302 | ( sleep 1 ) & |
| 10303 | am_sleep_pid=$! |
| 10304 | fi |
| 10305 | AC_CONFIG_COMMANDS_PRE( |
| 10306 | [AC_MSG_CHECKING([that generated files are newer than configure]) |
| 10307 | if test -n "$am_sleep_pid"; then |
| 10308 | # Hide warnings about reused PIDs. |
| 10309 | wait $am_sleep_pid 2>/dev/null |
| 10310 | fi |
| 10311 | AC_MSG_RESULT([done])]) |
| 10312 | rm -f conftest.file |
| 10313 | ]) |
| 10314 |
| 10315 | # Copyright (C) 2009-2018 Free Software Foundation, Inc. |
| 10316 | # |
| 10317 | # This file is free software; the Free Software Foundation |
| 10318 | # gives unlimited permission to copy and/or distribute it, |
| 10319 | # with or without modifications, as long as this notice is preserved. |
| 10320 |
| 10321 | # AM_SILENT_RULES([DEFAULT]) |
| 10322 | # -------------------------- |
| 10323 | # Enable less verbose build rules; with the default set to DEFAULT |
| 10324 | # ("yes" being less verbose, "no" or empty being verbose). |
| 10325 | AC_DEFUN([AM_SILENT_RULES], |
| 10326 | [AC_ARG_ENABLE([silent-rules], [dnl |
| 10327 | AS_HELP_STRING( |
| 10328 | [--enable-silent-rules], |
| 10329 | [less verbose build output (undo: "make V=1")]) |
| 10330 | AS_HELP_STRING( |
| 10331 | [--disable-silent-rules], |
| 10332 | [verbose build output (undo: "make V=0")])dnl |
| 10333 | ]) |
| 10334 | case $enable_silent_rules in @%:@ ((( |
| 10335 | yes) AM_DEFAULT_VERBOSITY=0;; |
| 10336 | no) AM_DEFAULT_VERBOSITY=1;; |
| 10337 | *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; |
| 10338 | esac |
| 10339 | dnl |
| 10340 | dnl A few 'make' implementations (e.g., NonStop OS and NextStep) |
| 10341 | dnl do not support nested variable expansions. |
| 10342 | dnl See automake bug#9928 and bug#10237. |
| 10343 | am_make=${MAKE-make} |
| 10344 | AC_CACHE_CHECK([whether $am_make supports nested variables], |
| 10345 | [am_cv_make_support_nested_variables], |
| 10346 | [if AS_ECHO([['TRUE=$(BAR$(V)) |
| 10347 | BAR0=false |
| 10348 | BAR1=true |
| 10349 | V=1 |
| 10350 | am__doit: |
| 10351 | @$(TRUE) |
| 10352 | .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then |
| 10353 | am_cv_make_support_nested_variables=yes |
| 10354 | else |
| 10355 | am_cv_make_support_nested_variables=no |
| 10356 | fi]) |
| 10357 | if test $am_cv_make_support_nested_variables = yes; then |
| 10358 | dnl Using '$V' instead of '$(V)' breaks IRIX make. |
| 10359 | AM_V='$(V)' |
| 10360 | AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' |
| 10361 | else |
| 10362 | AM_V=$AM_DEFAULT_VERBOSITY |
| 10363 | AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY |
| 10364 | fi |
| 10365 | AC_SUBST([AM_V])dnl |
| 10366 | AM_SUBST_NOTMAKE([AM_V])dnl |
| 10367 | AC_SUBST([AM_DEFAULT_V])dnl |
| 10368 | AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl |
| 10369 | AC_SUBST([AM_DEFAULT_VERBOSITY])dnl |
| 10370 | AM_BACKSLASH='\' |
| 10371 | AC_SUBST([AM_BACKSLASH])dnl |
| 10372 | _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl |
| 10373 | ]) |
| 10374 |
| 10375 | # Copyright (C) 2001-2018 Free Software Foundation, Inc. |
| 10376 | # |
| 10377 | # This file is free software; the Free Software Foundation |
| 10378 | # gives unlimited permission to copy and/or distribute it, |
| 10379 | # with or without modifications, as long as this notice is preserved. |
| 10380 |
| 10381 | # AM_PROG_INSTALL_STRIP |
| 10382 | # --------------------- |
| 10383 | # One issue with vendor 'install' (even GNU) is that you can't |
| 10384 | # specify the program used to strip binaries. This is especially |
| 10385 | # annoying in cross-compiling environments, where the build's strip |
| 10386 | # is unlikely to handle the host's binaries. |
| 10387 | # Fortunately install-sh will honor a STRIPPROG variable, so we |
| 10388 | # always use install-sh in "make install-strip", and initialize |
| 10389 | # STRIPPROG with the value of the STRIP variable (set by the user). |
| 10390 | AC_DEFUN([AM_PROG_INSTALL_STRIP], |
| 10391 | [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl |
| 10392 | # Installed binaries are usually stripped using 'strip' when the user |
| 10393 | # run "make install-strip". However 'strip' might not be the right |
| 10394 | # tool to use in cross-compilation environments, therefore Automake |
| 10395 | # will honor the 'STRIP' environment variable to overrule this program. |
| 10396 | dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. |
| 10397 | if test "$cross_compiling" != no; then |
| 10398 | AC_CHECK_TOOL([STRIP], [strip], :) |
| 10399 | fi |
| 10400 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" |
| 10401 | AC_SUBST([INSTALL_STRIP_PROGRAM])]) |
| 10402 |
| 10403 | # Copyright (C) 2006-2018 Free Software Foundation, Inc. |
| 10404 | # |
| 10405 | # This file is free software; the Free Software Foundation |
| 10406 | # gives unlimited permission to copy and/or distribute it, |
| 10407 | # with or without modifications, as long as this notice is preserved. |
| 10408 |
| 10409 | # _AM_SUBST_NOTMAKE(VARIABLE) |
| 10410 | # --------------------------- |
| 10411 | # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. |
| 10412 | # This macro is traced by Automake. |
| 10413 | AC_DEFUN([_AM_SUBST_NOTMAKE]) |
| 10414 |
| 10415 | # AM_SUBST_NOTMAKE(VARIABLE) |
| 10416 | # -------------------------- |
| 10417 | # Public sister of _AM_SUBST_NOTMAKE. |
| 10418 | AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) |
| 10419 |
| 10420 | # Check how to create a tarball. -*- Autoconf -*- |
| 10421 |
| 10422 | # Copyright (C) 2004-2018 Free Software Foundation, Inc. |
| 10423 | # |
| 10424 | # This file is free software; the Free Software Foundation |
| 10425 | # gives unlimited permission to copy and/or distribute it, |
| 10426 | # with or without modifications, as long as this notice is preserved. |
| 10427 |
| 10428 | # _AM_PROG_TAR(FORMAT) |
| 10429 | # -------------------- |
| 10430 | # Check how to create a tarball in format FORMAT. |
| 10431 | # FORMAT should be one of 'v7', 'ustar', or 'pax'. |
| 10432 | # |
| 10433 | # Substitute a variable $(am__tar) that is a command |
| 10434 | # writing to stdout a FORMAT-tarball containing the directory |
| 10435 | # $tardir. |
| 10436 | # tardir=directory && $(am__tar) > result.tar |
| 10437 | # |
| 10438 | # Substitute a variable $(am__untar) that extract such |
| 10439 | # a tarball read from stdin. |
| 10440 | # $(am__untar) < result.tar |
| 10441 | # |
| 10442 | AC_DEFUN([_AM_PROG_TAR], |
| 10443 | [# Always define AMTAR for backward compatibility. Yes, it's still used |
| 10444 | # in the wild :-( We should find a proper way to deprecate it ... |
| 10445 | AC_SUBST([AMTAR], ['$${TAR-tar}']) |
| 10446 |
| 10447 | # We'll loop over all known methods to create a tar archive until one works. |
| 10448 | _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' |
| 10449 |
| 10450 | m4_if([$1], [v7], |
| 10451 | [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], |
| 10452 |
| 10453 | [m4_case([$1], |
| 10454 | [ustar], |
| 10455 | [# The POSIX 1988 'ustar' format is defined with fixed-size fields. |
| 10456 | # There is notably a 21 bits limit for the UID and the GID. In fact, |
| 10457 | # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 |
| 10458 | # and bug#13588). |
| 10459 | am_max_uid=2097151 # 2^21 - 1 |
| 10460 | am_max_gid=$am_max_uid |
| 10461 | # The $UID and $GID variables are not portable, so we need to resort |
| 10462 | # to the POSIX-mandated id(1) utility. Errors in the 'id' calls |
| 10463 | # below are definitely unexpected, so allow the users to see them |
| 10464 | # (that is, avoid stderr redirection). |
| 10465 | am_uid=`id -u || echo unknown` |
| 10466 | am_gid=`id -g || echo unknown` |
| 10467 | AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) |
| 10468 | if test $am_uid -le $am_max_uid; then |
| 10469 | AC_MSG_RESULT([yes]) |
| 10470 | else |
| 10471 | AC_MSG_RESULT([no]) |
| 10472 | _am_tools=none |
| 10473 | fi |
| 10474 | AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) |
| 10475 | if test $am_gid -le $am_max_gid; then |
| 10476 | AC_MSG_RESULT([yes]) |
| 10477 | else |
| 10478 | AC_MSG_RESULT([no]) |
| 10479 | _am_tools=none |
| 10480 | fi], |
| 10481 |
| 10482 | [pax], |
| 10483 | [], |
| 10484 |
| 10485 | [m4_fatal([Unknown tar format])]) |
| 10486 |
| 10487 | AC_MSG_CHECKING([how to create a $1 tar archive]) |
| 10488 |
| 10489 | # Go ahead even if we have the value already cached. We do so because we |
| 10490 | # need to set the values for the 'am__tar' and 'am__untar' variables. |
| 10491 | _am_tools=${am_cv_prog_tar_$1-$_am_tools} |
| 10492 |
| 10493 | for _am_tool in $_am_tools; do |
| 10494 | case $_am_tool in |
| 10495 | gnutar) |
| 10496 | for _am_tar in tar gnutar gtar; do |
| 10497 | AM_RUN_LOG([$_am_tar --version]) && break |
| 10498 | done |
| 10499 | am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' |
| 10500 | am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' |
| 10501 | am__untar="$_am_tar -xf -" |
| 10502 | ;; |
| 10503 | plaintar) |
| 10504 | # Must skip GNU tar: if it does not support --format= it doesn't create |
| 10505 | # ustar tarball either. |
| 10506 | (tar --version) >/dev/null 2>&1 && continue |
| 10507 | am__tar='tar chf - "$$tardir"' |
| 10508 | am__tar_='tar chf - "$tardir"' |
| 10509 | am__untar='tar xf -' |
| 10510 | ;; |
| 10511 | pax) |
| 10512 | am__tar='pax -L -x $1 -w "$$tardir"' |
| 10513 | am__tar_='pax -L -x $1 -w "$tardir"' |
| 10514 | am__untar='pax -r' |
| 10515 | ;; |
| 10516 | cpio) |
| 10517 | am__tar='find "$$tardir" -print | cpio -o -H $1 -L' |
| 10518 | am__tar_='find "$tardir" -print | cpio -o -H $1 -L' |
| 10519 | am__untar='cpio -i -H $1 -d' |
| 10520 | ;; |
| 10521 | none) |
| 10522 | am__tar=false |
| 10523 | am__tar_=false |
| 10524 | am__untar=false |
| 10525 | ;; |
| 10526 | esac |
| 10527 |
| 10528 | # If the value was cached, stop now. We just wanted to have am__tar |
| 10529 | # and am__untar set. |
| 10530 | test -n "${am_cv_prog_tar_$1}" && break |
| 10531 |
| 10532 | # tar/untar a dummy directory, and stop if the command works. |
| 10533 | rm -rf conftest.dir |
| 10534 | mkdir conftest.dir |
| 10535 | echo GrepMe > conftest.dir/file |
| 10536 | AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) |
| 10537 | rm -rf conftest.dir |
| 10538 | if test -s conftest.tar; then |
| 10539 | AM_RUN_LOG([$am__untar <conftest.tar]) |
| 10540 | AM_RUN_LOG([cat conftest.dir/file]) |
| 10541 | grep GrepMe conftest.dir/file >/dev/null 2>&1 && break |
| 10542 | fi |
| 10543 | done |
| 10544 | rm -rf conftest.dir |
| 10545 |
| 10546 | AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) |
| 10547 | AC_MSG_RESULT([$am_cv_prog_tar_$1])]) |
| 10548 |
| 10549 | AC_SUBST([am__tar]) |
| 10550 | AC_SUBST([am__untar]) |
| 10551 | ]) # _AM_PROG_TAR |
| 10552 |
| 10553 |