acinclude/libtool.m4
author Sam Lantinga
Sun, 05 Apr 2020 08:58:47 -0700
changeset 13689 c3055b205671
parent 10590 e75e81f94e47
permissions -rw-r--r--
Fixed bug 5015 - SDL_RenderReadPixels on DirectX 11.1 backend seems to be broken

Konrad

It appears that I cannot use SDL_RenderReadPixels on a bound framebuffer (SDL_Texture set as render target) as it simply results in gibberish data. However, drawing that framebuffer into the default target (window surface) does render it correctly. Other backends (OpenGL, software, Direct3D) do work fine.

It looks to me like D3D11_RenderReadPixels just gets the general backbuffer and not the current render target and its backbuffer.

Here is the patch which actually fetches the current render target and its underlying ID3D11Resource which is ID3D11Texture2D.
slouken@3342
     1
##############################################################################
slouken@6442
     2
# Based on libtool-2.4.2
slouken@3342
     3
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
slouken@3342
     4
#
slouken@3342
     5
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
slouken@6442
     6
#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
slouken@6442
     7
#                 Foundation, Inc.
slouken@3342
     8
#   Written by Gordon Matzigkeit, 1996
slouken@3342
     9
#
slouken@3342
    10
# This file is free software; the Free Software Foundation gives
slouken@3342
    11
# unlimited permission to copy and/or distribute it, with or without
slouken@3342
    12
# modifications, as long as this notice is preserved.
slouken@3342
    13
slouken@3342
    14
m4_define([_LT_COPYING], [dnl
slouken@3342
    15
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
slouken@6442
    16
#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
slouken@6442
    17
#                 Foundation, Inc.
slouken@3342
    18
#   Written by Gordon Matzigkeit, 1996
slouken@3342
    19
#
slouken@3342
    20
#   This file is part of GNU Libtool.
slouken@3342
    21
#
slouken@3342
    22
# GNU Libtool is free software; you can redistribute it and/or
slouken@3342
    23
# modify it under the terms of the GNU General Public License as
slouken@3342
    24
# published by the Free Software Foundation; either version 2 of
slouken@3342
    25
# the License, or (at your option) any later version.
slouken@3342
    26
#
slouken@3342
    27
# As a special exception to the GNU General Public License,
slouken@3342
    28
# if you distribute this file as part of a program or library that
slouken@3342
    29
# is built using GNU Libtool, you may include this file under the
slouken@3342
    30
# same distribution terms that you use for the rest of that program.
slouken@3342
    31
#
slouken@3342
    32
# GNU Libtool is distributed in the hope that it will be useful,
slouken@3342
    33
# but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@3342
    34
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
slouken@3342
    35
# GNU General Public License for more details.
slouken@3342
    36
#
slouken@3342
    37
# You should have received a copy of the GNU General Public License
slouken@3342
    38
# along with GNU Libtool; see the file COPYING.  If not, a copy
slouken@3342
    39
# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
slouken@3342
    40
# obtained by writing to the Free Software Foundation, Inc.,
slouken@3342
    41
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
slouken@3342
    42
])
slouken@3342
    43
slouken@6442
    44
# serial 57 LT_INIT
slouken@3342
    45
slouken@3342
    46
slouken@3342
    47
# LT_PREREQ(VERSION)
slouken@3342
    48
# ------------------
slouken@3342
    49
# Complain and exit if this libtool version is less that VERSION.
slouken@3342
    50
m4_defun([LT_PREREQ],
slouken@3342
    51
[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
slouken@3342
    52
       [m4_default([$3],
slouken@3342
    53
		   [m4_fatal([Libtool version $1 or higher is required],
slouken@3342
    54
		             63)])],
slouken@3342
    55
       [$2])])
slouken@3342
    56
slouken@3342
    57
slouken@3342
    58
# _LT_CHECK_BUILDDIR
slouken@3342
    59
# ------------------
slouken@3342
    60
# Complain if the absolute build directory name contains unusual characters
slouken@3342
    61
m4_defun([_LT_CHECK_BUILDDIR],
slouken@3342
    62
[case `pwd` in
slouken@3342
    63
  *\ * | *\	*)
slouken@3342
    64
    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
slouken@3342
    65
esac
slouken@3342
    66
])
slouken@3342
    67
slouken@3342
    68
slouken@3342
    69
# LT_INIT([OPTIONS])
slouken@3342
    70
# ------------------
slouken@3342
    71
AC_DEFUN([LT_INIT],
slouken@3342
    72
[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
slouken@6442
    73
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
slouken@3342
    74
AC_BEFORE([$0], [LT_LANG])dnl
slouken@3342
    75
AC_BEFORE([$0], [LT_OUTPUT])dnl
slouken@3342
    76
AC_BEFORE([$0], [LTDL_INIT])dnl
slouken@3342
    77
m4_require([_LT_CHECK_BUILDDIR])dnl
slouken@3342
    78
slouken@3342
    79
dnl Autoconf doesn't catch unexpanded LT_ macros by default:
slouken@3342
    80
m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
slouken@3342
    81
m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
slouken@3342
    82
dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
slouken@3342
    83
dnl unless we require an AC_DEFUNed macro:
slouken@3342
    84
AC_REQUIRE([LTOPTIONS_VERSION])dnl
slouken@3342
    85
AC_REQUIRE([LTSUGAR_VERSION])dnl
slouken@3342
    86
AC_REQUIRE([LTVERSION_VERSION])dnl
slouken@3342
    87
AC_REQUIRE([LTOBSOLETE_VERSION])dnl
slouken@3342
    88
m4_require([_LT_PROG_LTMAIN])dnl
slouken@3342
    89
slouken@6442
    90
_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
slouken@6442
    91
slouken@3342
    92
dnl Parse OPTIONS
slouken@3342
    93
_LT_SET_OPTIONS([$0], [$1])
slouken@3342
    94
slouken@3342
    95
# This can be used to rebuild libtool when needed
slouken@3342
    96
LIBTOOL_DEPS="$ltmain"
slouken@3342
    97
slouken@3342
    98
# Always use our own libtool.
slouken@3342
    99
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
slouken@3342
   100
AC_SUBST(LIBTOOL)dnl
slouken@3342
   101
slouken@3342
   102
_LT_SETUP
slouken@3342
   103
slouken@3342
   104
# Only expand once:
slouken@3342
   105
m4_define([LT_INIT])
slouken@3342
   106
])# LT_INIT
slouken@3342
   107
slouken@3342
   108
# Old names:
slouken@3342
   109
AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
slouken@3342
   110
AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
slouken@3342
   111
dnl aclocal-1.4 backwards compatibility:
slouken@3342
   112
dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
slouken@3342
   113
dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
slouken@3342
   114
slouken@3342
   115
slouken@3342
   116
# _LT_CC_BASENAME(CC)
slouken@3342
   117
# -------------------
slouken@3342
   118
# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
slouken@3342
   119
m4_defun([_LT_CC_BASENAME],
slouken@3342
   120
[for cc_temp in $1""; do
slouken@3342
   121
  case $cc_temp in
slouken@3342
   122
    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
slouken@3342
   123
    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
slouken@3342
   124
    \-*) ;;
slouken@3342
   125
    *) break;;
slouken@3342
   126
  esac
slouken@3342
   127
done
slouken@6442
   128
cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
slouken@3342
   129
])
slouken@3342
   130
slouken@3342
   131
slouken@3342
   132
# _LT_FILEUTILS_DEFAULTS
slouken@3342
   133
# ----------------------
slouken@3342
   134
# It is okay to use these file commands and assume they have been set
slouken@3342
   135
# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
slouken@3342
   136
m4_defun([_LT_FILEUTILS_DEFAULTS],
slouken@3342
   137
[: ${CP="cp -f"}
slouken@3342
   138
: ${MV="mv -f"}
slouken@3342
   139
: ${RM="rm -f"}
slouken@3342
   140
])# _LT_FILEUTILS_DEFAULTS
slouken@3342
   141
slouken@3342
   142
slouken@3342
   143
# _LT_SETUP
slouken@3342
   144
# ---------
slouken@3342
   145
m4_defun([_LT_SETUP],
slouken@3342
   146
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
slouken@3342
   147
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
slouken@6442
   148
AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
slouken@6442
   149
AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
slouken@6442
   150
slouken@6442
   151
_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
slouken@6442
   152
dnl
slouken@3342
   153
_LT_DECL([], [host_alias], [0], [The host system])dnl
slouken@3342
   154
_LT_DECL([], [host], [0])dnl
slouken@3342
   155
_LT_DECL([], [host_os], [0])dnl
slouken@3342
   156
dnl
slouken@3342
   157
_LT_DECL([], [build_alias], [0], [The build system])dnl
slouken@3342
   158
_LT_DECL([], [build], [0])dnl
slouken@3342
   159
_LT_DECL([], [build_os], [0])dnl
slouken@3342
   160
dnl
slouken@3342
   161
AC_REQUIRE([AC_PROG_CC])dnl
slouken@3342
   162
AC_REQUIRE([LT_PATH_LD])dnl
slouken@3342
   163
AC_REQUIRE([LT_PATH_NM])dnl
slouken@3342
   164
dnl
slouken@3342
   165
AC_REQUIRE([AC_PROG_LN_S])dnl
slouken@3342
   166
test -z "$LN_S" && LN_S="ln -s"
slouken@3342
   167
_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
slouken@3342
   168
dnl
slouken@3342
   169
AC_REQUIRE([LT_CMD_MAX_LEN])dnl
slouken@3342
   170
_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
slouken@3342
   171
_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
slouken@3342
   172
dnl
slouken@3342
   173
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
slouken@3342
   174
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
slouken@6442
   175
m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
slouken@3342
   176
m4_require([_LT_CMD_RELOAD])dnl
slouken@3342
   177
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
slouken@6442
   178
m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
slouken@3342
   179
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
slouken@3342
   180
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
slouken@6442
   181
m4_require([_LT_WITH_SYSROOT])dnl
slouken@3342
   182
slouken@3342
   183
_LT_CONFIG_LIBTOOL_INIT([
slouken@3342
   184
# See if we are running on zsh, and set the options which allow our
slouken@3342
   185
# commands through without removal of \ escapes INIT.
slouken@3342
   186
if test -n "\${ZSH_VERSION+set}" ; then
slouken@3342
   187
   setopt NO_GLOB_SUBST
slouken@3342
   188
fi
slouken@3342
   189
])
slouken@3342
   190
if test -n "${ZSH_VERSION+set}" ; then
slouken@3342
   191
   setopt NO_GLOB_SUBST
slouken@3342
   192
fi
slouken@3342
   193
slouken@3342
   194
_LT_CHECK_OBJDIR
slouken@3342
   195
slouken@3342
   196
m4_require([_LT_TAG_COMPILER])dnl
slouken@3342
   197
slouken@3342
   198
case $host_os in
slouken@3342
   199
aix3*)
slouken@3342
   200
  # AIX sometimes has problems with the GCC collect2 program.  For some
slouken@3342
   201
  # reason, if we set the COLLECT_NAMES environment variable, the problems
slouken@3342
   202
  # vanish in a puff of smoke.
slouken@3342
   203
  if test "X${COLLECT_NAMES+set}" != Xset; then
slouken@3342
   204
    COLLECT_NAMES=
slouken@3342
   205
    export COLLECT_NAMES
slouken@3342
   206
  fi
slouken@3342
   207
  ;;
slouken@3342
   208
esac
slouken@3342
   209
slouken@3342
   210
# Global variables:
slouken@3342
   211
ofile=libtool
slouken@3342
   212
can_build_shared=yes
slouken@3342
   213
slouken@3342
   214
# All known linkers require a `.a' archive for static linking (except MSVC,
slouken@3342
   215
# which needs '.lib').
slouken@3342
   216
libext=a
slouken@3342
   217
slouken@3342
   218
with_gnu_ld="$lt_cv_prog_gnu_ld"
slouken@3342
   219
slouken@3342
   220
old_CC="$CC"
slouken@3342
   221
old_CFLAGS="$CFLAGS"
slouken@3342
   222
slouken@3342
   223
# Set sane defaults for various variables
slouken@3342
   224
test -z "$CC" && CC=cc
slouken@3342
   225
test -z "$LTCC" && LTCC=$CC
slouken@3342
   226
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
slouken@3342
   227
test -z "$LD" && LD=ld
slouken@3342
   228
test -z "$ac_objext" && ac_objext=o
slouken@3342
   229
slouken@3342
   230
_LT_CC_BASENAME([$compiler])
slouken@3342
   231
slouken@3342
   232
# Only perform the check for file, if the check method requires it
slouken@3342
   233
test -z "$MAGIC_CMD" && MAGIC_CMD=file
slouken@3342
   234
case $deplibs_check_method in
slouken@3342
   235
file_magic*)
slouken@3342
   236
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
slouken@3342
   237
    _LT_PATH_MAGIC
slouken@3342
   238
  fi
slouken@3342
   239
  ;;
slouken@3342
   240
esac
slouken@3342
   241
slouken@3342
   242
# Use C for the default configuration in the libtool script
slouken@3342
   243
LT_SUPPORTED_TAG([CC])
slouken@3342
   244
_LT_LANG_C_CONFIG
slouken@3342
   245
_LT_LANG_DEFAULT_CONFIG
slouken@3342
   246
_LT_CONFIG_COMMANDS
slouken@3342
   247
])# _LT_SETUP
slouken@3342
   248
slouken@3342
   249
slouken@6442
   250
# _LT_PREPARE_SED_QUOTE_VARS
slouken@6442
   251
# --------------------------
slouken@6442
   252
# Define a few sed substitution that help us do robust quoting.
slouken@6442
   253
m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
slouken@6442
   254
[# Backslashify metacharacters that are still active within
slouken@6442
   255
# double-quoted strings.
slouken@6442
   256
sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
slouken@6442
   257
slouken@6442
   258
# Same as above, but do not quote variable references.
slouken@6442
   259
double_quote_subst='s/\([["`\\]]\)/\\\1/g'
slouken@6442
   260
slouken@6442
   261
# Sed substitution to delay expansion of an escaped shell variable in a
slouken@6442
   262
# double_quote_subst'ed string.
slouken@6442
   263
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
slouken@6442
   264
slouken@6442
   265
# Sed substitution to delay expansion of an escaped single quote.
slouken@6442
   266
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
slouken@6442
   267
slouken@6442
   268
# Sed substitution to avoid accidental globbing in evaled expressions
slouken@6442
   269
no_glob_subst='s/\*/\\\*/g'
slouken@6442
   270
])
slouken@6442
   271
slouken@3342
   272
# _LT_PROG_LTMAIN
slouken@3342
   273
# ---------------
slouken@3342
   274
# Note that this code is called both from `configure', and `config.status'
slouken@3342
   275
# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
slouken@3342
   276
# `config.status' has no value for ac_aux_dir unless we are using Automake,
slouken@3342
   277
# so we pass a copy along to make sure it has a sensible value anyway.
slouken@3342
   278
m4_defun([_LT_PROG_LTMAIN],
slouken@3342
   279
[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
slouken@3342
   280
_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
slouken@3342
   281
ltmain="$ac_aux_dir/ltmain.sh"
slouken@3342
   282
])# _LT_PROG_LTMAIN
slouken@3342
   283
slouken@3342
   284
slouken@3342
   285
## ------------------------------------- ##
slouken@3342
   286
## Accumulate code for creating libtool. ##
slouken@3342
   287
## ------------------------------------- ##
slouken@3342
   288
slouken@3342
   289
# So that we can recreate a full libtool script including additional
slouken@3342
   290
# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
slouken@3342
   291
# in macros and then make a single call at the end using the `libtool'
slouken@3342
   292
# label.
slouken@3342
   293
slouken@3342
   294
slouken@3342
   295
# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
slouken@3342
   296
# ----------------------------------------
slouken@3342
   297
# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
slouken@3342
   298
m4_define([_LT_CONFIG_LIBTOOL_INIT],
slouken@3342
   299
[m4_ifval([$1],
slouken@3342
   300
          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
slouken@3342
   301
                     [$1
slouken@3342
   302
])])])
slouken@3342
   303
slouken@3342
   304
# Initialize.
slouken@3342
   305
m4_define([_LT_OUTPUT_LIBTOOL_INIT])
slouken@3342
   306
slouken@3342
   307
slouken@3342
   308
# _LT_CONFIG_LIBTOOL([COMMANDS])
slouken@3342
   309
# ------------------------------
slouken@3342
   310
# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
slouken@3342
   311
m4_define([_LT_CONFIG_LIBTOOL],
slouken@3342
   312
[m4_ifval([$1],
slouken@3342
   313
          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
slouken@3342
   314
                     [$1
slouken@3342
   315
])])])
slouken@3342
   316
slouken@3342
   317
# Initialize.
slouken@3342
   318
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
slouken@3342
   319
slouken@3342
   320
slouken@3342
   321
# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
slouken@3342
   322
# -----------------------------------------------------
slouken@3342
   323
m4_defun([_LT_CONFIG_SAVE_COMMANDS],
slouken@3342
   324
[_LT_CONFIG_LIBTOOL([$1])
slouken@3342
   325
_LT_CONFIG_LIBTOOL_INIT([$2])
slouken@3342
   326
])
slouken@3342
   327
slouken@3342
   328
slouken@3342
   329
# _LT_FORMAT_COMMENT([COMMENT])
slouken@3342
   330
# -----------------------------
slouken@3342
   331
# Add leading comment marks to the start of each line, and a trailing
slouken@3342
   332
# full-stop to the whole comment if one is not present already.
slouken@3342
   333
m4_define([_LT_FORMAT_COMMENT],
slouken@3342
   334
[m4_ifval([$1], [
slouken@3342
   335
m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
slouken@3342
   336
              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
slouken@3342
   337
)])
slouken@3342
   338
slouken@3342
   339
slouken@3342
   340
slouken@3342
   341
## ------------------------ ##
slouken@3342
   342
## FIXME: Eliminate VARNAME ##
slouken@3342
   343
## ------------------------ ##
slouken@3342
   344
slouken@3342
   345
slouken@3342
   346
# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
slouken@3342
   347
# -------------------------------------------------------------------
slouken@3342
   348
# CONFIGNAME is the name given to the value in the libtool script.
slouken@3342
   349
# VARNAME is the (base) name used in the configure script.
slouken@3342
   350
# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
slouken@3342
   351
# VARNAME.  Any other value will be used directly.
slouken@3342
   352
m4_define([_LT_DECL],
slouken@3342
   353
[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
slouken@3342
   354
    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
slouken@3342
   355
	[m4_ifval([$1], [$1], [$2])])
slouken@3342
   356
    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
slouken@3342
   357
    m4_ifval([$4],
slouken@3342
   358
	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
slouken@3342
   359
    lt_dict_add_subkey([lt_decl_dict], [$2],
slouken@3342
   360
	[tagged?], [m4_ifval([$5], [yes], [no])])])
slouken@3342
   361
])
slouken@3342
   362
slouken@3342
   363
slouken@3342
   364
# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
slouken@3342
   365
# --------------------------------------------------------
slouken@3342
   366
m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
slouken@3342
   367
slouken@3342
   368
slouken@3342
   369
# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
slouken@3342
   370
# ------------------------------------------------
slouken@3342
   371
m4_define([lt_decl_tag_varnames],
slouken@3342
   372
[_lt_decl_filter([tagged?], [yes], $@)])
slouken@3342
   373
slouken@3342
   374
slouken@3342
   375
# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
slouken@3342
   376
# ---------------------------------------------------------
slouken@3342
   377
m4_define([_lt_decl_filter],
slouken@3342
   378
[m4_case([$#],
slouken@3342
   379
  [0], [m4_fatal([$0: too few arguments: $#])],
slouken@3342
   380
  [1], [m4_fatal([$0: too few arguments: $#: $1])],
slouken@3342
   381
  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
slouken@3342
   382
  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
slouken@3342
   383
  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
slouken@3342
   384
])
slouken@3342
   385
slouken@3342
   386
slouken@3342
   387
# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
slouken@3342
   388
# --------------------------------------------------
slouken@3342
   389
m4_define([lt_decl_quote_varnames],
slouken@3342
   390
[_lt_decl_filter([value], [1], $@)])
slouken@3342
   391
slouken@3342
   392
slouken@3342
   393
# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
slouken@3342
   394
# ---------------------------------------------------
slouken@3342
   395
m4_define([lt_decl_dquote_varnames],
slouken@3342
   396
[_lt_decl_filter([value], [2], $@)])
slouken@3342
   397
slouken@3342
   398
slouken@3342
   399
# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
slouken@3342
   400
# ---------------------------------------------------
slouken@3342
   401
m4_define([lt_decl_varnames_tagged],
slouken@3342
   402
[m4_assert([$# <= 2])dnl
slouken@3342
   403
_$0(m4_quote(m4_default([$1], [[, ]])),
slouken@3342
   404
    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
slouken@3342
   405
    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
slouken@3342
   406
m4_define([_lt_decl_varnames_tagged],
slouken@3342
   407
[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
slouken@3342
   408
slouken@3342
   409
slouken@3342
   410
# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
slouken@3342
   411
# ------------------------------------------------
slouken@3342
   412
m4_define([lt_decl_all_varnames],
slouken@3342
   413
[_$0(m4_quote(m4_default([$1], [[, ]])),
slouken@3342
   414
     m4_if([$2], [],
slouken@3342
   415
	   m4_quote(lt_decl_varnames),
slouken@3342
   416
	m4_quote(m4_shift($@))))[]dnl
slouken@3342
   417
])
slouken@3342
   418
m4_define([_lt_decl_all_varnames],
slouken@3342
   419
[lt_join($@, lt_decl_varnames_tagged([$1],
slouken@3342
   420
			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
slouken@3342
   421
])
slouken@3342
   422
slouken@3342
   423
slouken@3342
   424
# _LT_CONFIG_STATUS_DECLARE([VARNAME])
slouken@3342
   425
# ------------------------------------
slouken@3342
   426
# Quote a variable value, and forward it to `config.status' so that its
slouken@3342
   427
# declaration there will have the same value as in `configure'.  VARNAME
slouken@3342
   428
# must have a single quote delimited value for this to work.
slouken@3342
   429
m4_define([_LT_CONFIG_STATUS_DECLARE],
slouken@6442
   430
[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
slouken@3342
   431
slouken@3342
   432
slouken@3342
   433
# _LT_CONFIG_STATUS_DECLARATIONS
slouken@3342
   434
# ------------------------------
slouken@3342
   435
# We delimit libtool config variables with single quotes, so when
slouken@3342
   436
# we write them to config.status, we have to be sure to quote all
slouken@3342
   437
# embedded single quotes properly.  In configure, this macro expands
slouken@3342
   438
# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
slouken@3342
   439
#
slouken@6442
   440
#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
slouken@3342
   441
m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
slouken@3342
   442
[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
slouken@3342
   443
    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
slouken@3342
   444
slouken@3342
   445
slouken@3342
   446
# _LT_LIBTOOL_TAGS
slouken@3342
   447
# ----------------
slouken@3342
   448
# Output comment and list of tags supported by the script
slouken@3342
   449
m4_defun([_LT_LIBTOOL_TAGS],
slouken@3342
   450
[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
slouken@3342
   451
available_tags="_LT_TAGS"dnl
slouken@3342
   452
])
slouken@3342
   453
slouken@3342
   454
slouken@3342
   455
# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
slouken@3342
   456
# -----------------------------------
slouken@3342
   457
# Extract the dictionary values for VARNAME (optionally with TAG) and
slouken@3342
   458
# expand to a commented shell variable setting:
slouken@3342
   459
#
slouken@3342
   460
#    # Some comment about what VAR is for.
slouken@3342
   461
#    visible_name=$lt_internal_name
slouken@3342
   462
m4_define([_LT_LIBTOOL_DECLARE],
slouken@3342
   463
[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
slouken@3342
   464
					   [description])))[]dnl
slouken@3342
   465
m4_pushdef([_libtool_name],
slouken@3342
   466
    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
slouken@3342
   467
m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
slouken@3342
   468
    [0], [_libtool_name=[$]$1],
slouken@3342
   469
    [1], [_libtool_name=$lt_[]$1],
slouken@3342
   470
    [2], [_libtool_name=$lt_[]$1],
slouken@3342
   471
    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
slouken@3342
   472
m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
slouken@3342
   473
])
slouken@3342
   474
slouken@3342
   475
slouken@3342
   476
# _LT_LIBTOOL_CONFIG_VARS
slouken@3342
   477
# -----------------------
slouken@3342
   478
# Produce commented declarations of non-tagged libtool config variables
slouken@3342
   479
# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
slouken@3342
   480
# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
slouken@3342
   481
# section) are produced by _LT_LIBTOOL_TAG_VARS.
slouken@3342
   482
m4_defun([_LT_LIBTOOL_CONFIG_VARS],
slouken@3342
   483
[m4_foreach([_lt_var],
slouken@3342
   484
    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
slouken@3342
   485
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
slouken@3342
   486
slouken@3342
   487
slouken@3342
   488
# _LT_LIBTOOL_TAG_VARS(TAG)
slouken@3342
   489
# -------------------------
slouken@3342
   490
m4_define([_LT_LIBTOOL_TAG_VARS],
slouken@3342
   491
[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
slouken@3342
   492
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
slouken@3342
   493
slouken@3342
   494
slouken@3342
   495
# _LT_TAGVAR(VARNAME, [TAGNAME])
slouken@3342
   496
# ------------------------------
slouken@3342
   497
m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
slouken@3342
   498
slouken@3342
   499
slouken@3342
   500
# _LT_CONFIG_COMMANDS
slouken@3342
   501
# -------------------
slouken@3342
   502
# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
slouken@3342
   503
# variables for single and double quote escaping we saved from calls
slouken@3342
   504
# to _LT_DECL, we can put quote escaped variables declarations
slouken@3342
   505
# into `config.status', and then the shell code to quote escape them in
slouken@3342
   506
# for loops in `config.status'.  Finally, any additional code accumulated
slouken@3342
   507
# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
slouken@3342
   508
m4_defun([_LT_CONFIG_COMMANDS],
slouken@3342
   509
[AC_PROVIDE_IFELSE([LT_OUTPUT],
slouken@3342
   510
	dnl If the libtool generation code has been placed in $CONFIG_LT,
slouken@3342
   511
	dnl instead of duplicating it all over again into config.status,
slouken@3342
   512
	dnl then we will have config.status run $CONFIG_LT later, so it
slouken@3342
   513
	dnl needs to know what name is stored there:
slouken@3342
   514
        [AC_CONFIG_COMMANDS([libtool],
slouken@3342
   515
            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
slouken@3342
   516
    dnl If the libtool generation code is destined for config.status,
slouken@3342
   517
    dnl expand the accumulated commands and init code now:
slouken@3342
   518
    [AC_CONFIG_COMMANDS([libtool],
slouken@3342
   519
        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
slouken@3342
   520
])#_LT_CONFIG_COMMANDS
slouken@3342
   521
slouken@3342
   522
slouken@3342
   523
# Initialize.
slouken@3342
   524
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
slouken@3342
   525
[
slouken@3342
   526
slouken@3342
   527
# The HP-UX ksh and POSIX shell print the target directory to stdout
slouken@3342
   528
# if CDPATH is set.
slouken@3342
   529
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
slouken@3342
   530
slouken@3342
   531
sed_quote_subst='$sed_quote_subst'
slouken@3342
   532
double_quote_subst='$double_quote_subst'
slouken@3342
   533
delay_variable_subst='$delay_variable_subst'
slouken@3342
   534
_LT_CONFIG_STATUS_DECLARATIONS
slouken@3342
   535
LTCC='$LTCC'
slouken@3342
   536
LTCFLAGS='$LTCFLAGS'
slouken@3342
   537
compiler='$compiler_DEFAULT'
slouken@3342
   538
slouken@6442
   539
# A function that is used when there is no print builtin or printf.
slouken@6442
   540
func_fallback_echo ()
slouken@6442
   541
{
slouken@6442
   542
  eval 'cat <<_LTECHO_EOF
slouken@6442
   543
\$[]1
slouken@6442
   544
_LTECHO_EOF'
slouken@6442
   545
}
slouken@6442
   546
slouken@3342
   547
# Quote evaled strings.
slouken@3342
   548
for var in lt_decl_all_varnames([[ \
slouken@3342
   549
]], lt_decl_quote_varnames); do
slouken@6442
   550
    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
slouken@3342
   551
    *[[\\\\\\\`\\"\\\$]]*)
slouken@6442
   552
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
slouken@3342
   553
      ;;
slouken@3342
   554
    *)
slouken@3342
   555
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
slouken@3342
   556
      ;;
slouken@3342
   557
    esac
slouken@3342
   558
done
slouken@3342
   559
slouken@3342
   560
# Double-quote double-evaled strings.
slouken@3342
   561
for var in lt_decl_all_varnames([[ \
slouken@3342
   562
]], lt_decl_dquote_varnames); do
slouken@6442
   563
    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
slouken@3342
   564
    *[[\\\\\\\`\\"\\\$]]*)
slouken@6442
   565
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
slouken@3342
   566
      ;;
slouken@3342
   567
    *)
slouken@3342
   568
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
slouken@3342
   569
      ;;
slouken@3342
   570
    esac
slouken@3342
   571
done
slouken@3342
   572
slouken@3342
   573
_LT_OUTPUT_LIBTOOL_INIT
slouken@3342
   574
])
slouken@3342
   575
slouken@6442
   576
# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
slouken@6442
   577
# ------------------------------------
slouken@6442
   578
# Generate a child script FILE with all initialization necessary to
slouken@6442
   579
# reuse the environment learned by the parent script, and make the
slouken@6442
   580
# file executable.  If COMMENT is supplied, it is inserted after the
slouken@6442
   581
# `#!' sequence but before initialization text begins.  After this
slouken@6442
   582
# macro, additional text can be appended to FILE to form the body of
slouken@6442
   583
# the child script.  The macro ends with non-zero status if the
slouken@6442
   584
# file could not be fully written (such as if the disk is full).
slouken@6442
   585
m4_ifdef([AS_INIT_GENERATED],
slouken@6442
   586
[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
slouken@6442
   587
[m4_defun([_LT_GENERATED_FILE_INIT],
slouken@6442
   588
[m4_require([AS_PREPARE])]dnl
slouken@6442
   589
[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
slouken@6442
   590
[lt_write_fail=0
slouken@6442
   591
cat >$1 <<_ASEOF || lt_write_fail=1
slouken@6442
   592
#! $SHELL
slouken@6442
   593
# Generated by $as_me.
slouken@6442
   594
$2
slouken@6442
   595
SHELL=\${CONFIG_SHELL-$SHELL}
slouken@6442
   596
export SHELL
slouken@6442
   597
_ASEOF
slouken@6442
   598
cat >>$1 <<\_ASEOF || lt_write_fail=1
slouken@6442
   599
AS_SHELL_SANITIZE
slouken@6442
   600
_AS_PREPARE
slouken@6442
   601
exec AS_MESSAGE_FD>&1
slouken@6442
   602
_ASEOF
slouken@6442
   603
test $lt_write_fail = 0 && chmod +x $1[]dnl
slouken@6442
   604
m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
slouken@3342
   605
slouken@3342
   606
# LT_OUTPUT
slouken@3342
   607
# ---------
slouken@3342
   608
# This macro allows early generation of the libtool script (before
slouken@3342
   609
# AC_OUTPUT is called), incase it is used in configure for compilation
slouken@3342
   610
# tests.
slouken@3342
   611
AC_DEFUN([LT_OUTPUT],
slouken@3342
   612
[: ${CONFIG_LT=./config.lt}
slouken@3342
   613
AC_MSG_NOTICE([creating $CONFIG_LT])
slouken@6442
   614
_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
slouken@6442
   615
[# Run this file to recreate a libtool stub with the current configuration.])
slouken@3342
   616
slouken@3342
   617
cat >>"$CONFIG_LT" <<\_LTEOF
slouken@6442
   618
lt_cl_silent=false
slouken@3342
   619
exec AS_MESSAGE_LOG_FD>>config.log
slouken@3342
   620
{
slouken@3342
   621
  echo
slouken@3342
   622
  AS_BOX([Running $as_me.])
slouken@3342
   623
} >&AS_MESSAGE_LOG_FD
slouken@3342
   624
slouken@3342
   625
lt_cl_help="\
slouken@3342
   626
\`$as_me' creates a local libtool stub from the current configuration,
slouken@3342
   627
for use in further configure time tests before the real libtool is
slouken@3342
   628
generated.
slouken@3342
   629
slouken@3342
   630
Usage: $[0] [[OPTIONS]]
slouken@3342
   631
slouken@3342
   632
  -h, --help      print this help, then exit
slouken@3342
   633
  -V, --version   print version number, then exit
slouken@3342
   634
  -q, --quiet     do not print progress messages
slouken@3342
   635
  -d, --debug     don't remove temporary files
slouken@3342
   636
slouken@3342
   637
Report bugs to <bug-libtool@gnu.org>."
slouken@3342
   638
slouken@3342
   639
lt_cl_version="\
slouken@3342
   640
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
slouken@3342
   641
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
slouken@3342
   642
configured by $[0], generated by m4_PACKAGE_STRING.
slouken@3342
   643
slouken@6442
   644
Copyright (C) 2011 Free Software Foundation, Inc.
slouken@3342
   645
This config.lt script is free software; the Free Software Foundation
slouken@3342
   646
gives unlimited permision to copy, distribute and modify it."
slouken@3342
   647
slouken@3342
   648
while test $[#] != 0
slouken@3342
   649
do
slouken@3342
   650
  case $[1] in
slouken@3342
   651
    --version | --v* | -V )
slouken@3342
   652
      echo "$lt_cl_version"; exit 0 ;;
slouken@3342
   653
    --help | --h* | -h )
slouken@3342
   654
      echo "$lt_cl_help"; exit 0 ;;
slouken@3342
   655
    --debug | --d* | -d )
slouken@3342
   656
      debug=: ;;
slouken@3342
   657
    --quiet | --q* | --silent | --s* | -q )
slouken@3342
   658
      lt_cl_silent=: ;;
slouken@3342
   659
slouken@3342
   660
    -*) AC_MSG_ERROR([unrecognized option: $[1]
slouken@3342
   661
Try \`$[0] --help' for more information.]) ;;
slouken@3342
   662
slouken@3342
   663
    *) AC_MSG_ERROR([unrecognized argument: $[1]
slouken@3342
   664
Try \`$[0] --help' for more information.]) ;;
slouken@3342
   665
  esac
slouken@3342
   666
  shift
slouken@3342
   667
done
slouken@3342
   668
slouken@3342
   669
if $lt_cl_silent; then
slouken@3342
   670
  exec AS_MESSAGE_FD>/dev/null
slouken@3342
   671
fi
slouken@3342
   672
_LTEOF
slouken@3342
   673
slouken@3342
   674
cat >>"$CONFIG_LT" <<_LTEOF
slouken@3342
   675
_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
slouken@3342
   676
_LTEOF
slouken@3342
   677
slouken@3342
   678
cat >>"$CONFIG_LT" <<\_LTEOF
slouken@3342
   679
AC_MSG_NOTICE([creating $ofile])
slouken@3342
   680
_LT_OUTPUT_LIBTOOL_COMMANDS
slouken@3342
   681
AS_EXIT(0)
slouken@3342
   682
_LTEOF
slouken@3342
   683
chmod +x "$CONFIG_LT"
slouken@3342
   684
slouken@3342
   685
# configure is writing to config.log, but config.lt does its own redirection,
slouken@3342
   686
# appending to config.log, which fails on DOS, as config.log is still kept
slouken@3342
   687
# open by configure.  Here we exec the FD to /dev/null, effectively closing
slouken@3342
   688
# config.log, so it can be properly (re)opened and appended to by config.lt.
slouken@6442
   689
lt_cl_success=:
slouken@6442
   690
test "$silent" = yes &&
slouken@6442
   691
  lt_config_lt_args="$lt_config_lt_args --quiet"
slouken@6442
   692
exec AS_MESSAGE_LOG_FD>/dev/null
slouken@6442
   693
$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
slouken@6442
   694
exec AS_MESSAGE_LOG_FD>>config.log
slouken@6442
   695
$lt_cl_success || AS_EXIT(1)
slouken@3342
   696
])# LT_OUTPUT
slouken@3342
   697
slouken@3342
   698
slouken@3342
   699
# _LT_CONFIG(TAG)
slouken@3342
   700
# ---------------
slouken@3342
   701
# If TAG is the built-in tag, create an initial libtool script with a
slouken@3342
   702
# default configuration from the untagged config vars.  Otherwise add code
slouken@3342
   703
# to config.status for appending the configuration named by TAG from the
slouken@3342
   704
# matching tagged config vars.
slouken@3342
   705
m4_defun([_LT_CONFIG],
slouken@3342
   706
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
slouken@3342
   707
_LT_CONFIG_SAVE_COMMANDS([
slouken@3342
   708
  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
slouken@3342
   709
  m4_if(_LT_TAG, [C], [
slouken@3342
   710
    # See if we are running on zsh, and set the options which allow our
slouken@3342
   711
    # commands through without removal of \ escapes.
slouken@3342
   712
    if test -n "${ZSH_VERSION+set}" ; then
slouken@3342
   713
      setopt NO_GLOB_SUBST
slouken@3342
   714
    fi
slouken@3342
   715
slouken@3342
   716
    cfgfile="${ofile}T"
slouken@3342
   717
    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
slouken@3342
   718
    $RM "$cfgfile"
slouken@3342
   719
slouken@3342
   720
    cat <<_LT_EOF >> "$cfgfile"
slouken@3342
   721
#! $SHELL
slouken@3342
   722
slouken@3342
   723
# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
slouken@3342
   724
# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
slouken@3342
   725
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
slouken@3342
   726
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
slouken@3342
   727
#
slouken@3342
   728
_LT_COPYING
slouken@3342
   729
_LT_LIBTOOL_TAGS
slouken@3342
   730
slouken@3342
   731
# ### BEGIN LIBTOOL CONFIG
slouken@3342
   732
_LT_LIBTOOL_CONFIG_VARS
slouken@3342
   733
_LT_LIBTOOL_TAG_VARS
slouken@3342
   734
# ### END LIBTOOL CONFIG
slouken@3342
   735
slouken@3342
   736
_LT_EOF
slouken@3342
   737
slouken@3342
   738
  case $host_os in
slouken@3342
   739
  aix3*)
slouken@3342
   740
    cat <<\_LT_EOF >> "$cfgfile"
slouken@3342
   741
# AIX sometimes has problems with the GCC collect2 program.  For some
slouken@3342
   742
# reason, if we set the COLLECT_NAMES environment variable, the problems
slouken@3342
   743
# vanish in a puff of smoke.
slouken@3342
   744
if test "X${COLLECT_NAMES+set}" != Xset; then
slouken@3342
   745
  COLLECT_NAMES=
slouken@3342
   746
  export COLLECT_NAMES
slouken@3342
   747
fi
slouken@3342
   748
_LT_EOF
slouken@3342
   749
    ;;
slouken@3342
   750
  esac
slouken@3342
   751
slouken@3342
   752
  _LT_PROG_LTMAIN
slouken@3342
   753
slouken@3342
   754
  # We use sed instead of cat because bash on DJGPP gets confused if
slouken@3342
   755
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
slouken@3342
   756
  # text mode, it properly converts lines to CR/LF.  This bash problem
slouken@3342
   757
  # is reportedly fixed, but why not run on old versions too?
slouken@6442
   758
  sed '$q' "$ltmain" >> "$cfgfile" \
slouken@6442
   759
     || (rm -f "$cfgfile"; exit 1)
slouken@6442
   760
slouken@6442
   761
  _LT_PROG_REPLACE_SHELLFNS
slouken@6442
   762
slouken@6442
   763
   mv -f "$cfgfile" "$ofile" ||
slouken@3342
   764
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
slouken@3342
   765
  chmod +x "$ofile"
slouken@3342
   766
],
slouken@3342
   767
[cat <<_LT_EOF >> "$ofile"
slouken@3342
   768
slouken@3342
   769
dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
slouken@3342
   770
dnl in a comment (ie after a #).
slouken@3342
   771
# ### BEGIN LIBTOOL TAG CONFIG: $1
slouken@3342
   772
_LT_LIBTOOL_TAG_VARS(_LT_TAG)
slouken@3342
   773
# ### END LIBTOOL TAG CONFIG: $1
slouken@3342
   774
_LT_EOF
slouken@3342
   775
])dnl /m4_if
slouken@3342
   776
],
slouken@3342
   777
[m4_if([$1], [], [
slouken@3342
   778
    PACKAGE='$PACKAGE'
slouken@3342
   779
    VERSION='$VERSION'
slouken@3342
   780
    TIMESTAMP='$TIMESTAMP'
slouken@3342
   781
    RM='$RM'
slouken@3342
   782
    ofile='$ofile'], [])
slouken@3342
   783
])dnl /_LT_CONFIG_SAVE_COMMANDS
slouken@3342
   784
])# _LT_CONFIG
slouken@3342
   785
slouken@3342
   786
slouken@3342
   787
# LT_SUPPORTED_TAG(TAG)
slouken@3342
   788
# ---------------------
slouken@3342
   789
# Trace this macro to discover what tags are supported by the libtool
slouken@3342
   790
# --tag option, using:
slouken@3342
   791
#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
slouken@3342
   792
AC_DEFUN([LT_SUPPORTED_TAG], [])
slouken@3342
   793
slouken@3342
   794
slouken@3342
   795
# C support is built-in for now
slouken@3342
   796
m4_define([_LT_LANG_C_enabled], [])
slouken@3342
   797
m4_define([_LT_TAGS], [])
slouken@3342
   798
slouken@3342
   799
slouken@3342
   800
# LT_LANG(LANG)
slouken@3342
   801
# -------------
slouken@3342
   802
# Enable libtool support for the given language if not already enabled.
slouken@3342
   803
AC_DEFUN([LT_LANG],
slouken@3342
   804
[AC_BEFORE([$0], [LT_OUTPUT])dnl
slouken@3342
   805
m4_case([$1],
slouken@3342
   806
  [C],			[_LT_LANG(C)],
slouken@3342
   807
  [C++],		[_LT_LANG(CXX)],
slouken@6442
   808
  [Go],			[_LT_LANG(GO)],
slouken@3342
   809
  [Java],		[_LT_LANG(GCJ)],
slouken@3342
   810
  [Fortran 77],		[_LT_LANG(F77)],
slouken@3342
   811
  [Fortran],		[_LT_LANG(FC)],
slouken@3342
   812
  [Windows Resource],	[_LT_LANG(RC)],
slouken@3342
   813
  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
slouken@3342
   814
    [_LT_LANG($1)],
slouken@3342
   815
    [m4_fatal([$0: unsupported language: "$1"])])])dnl
slouken@3342
   816
])# LT_LANG
slouken@3342
   817
slouken@3342
   818
slouken@3342
   819
# _LT_LANG(LANGNAME)
slouken@3342
   820
# ------------------
slouken@3342
   821
m4_defun([_LT_LANG],
slouken@3342
   822
[m4_ifdef([_LT_LANG_]$1[_enabled], [],
slouken@3342
   823
  [LT_SUPPORTED_TAG([$1])dnl
slouken@3342
   824
  m4_append([_LT_TAGS], [$1 ])dnl
slouken@3342
   825
  m4_define([_LT_LANG_]$1[_enabled], [])dnl
slouken@3342
   826
  _LT_LANG_$1_CONFIG($1)])dnl
slouken@3342
   827
])# _LT_LANG
slouken@3342
   828
slouken@3342
   829
slouken@6442
   830
m4_ifndef([AC_PROG_GO], [
slouken@6442
   831
############################################################
slouken@6442
   832
# NOTE: This macro has been submitted for inclusion into   #
slouken@6442
   833
#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
slouken@6442
   834
#  a released version of Autoconf we should remove this    #
slouken@6442
   835
#  macro and use it instead.                               #
slouken@6442
   836
############################################################
slouken@6442
   837
m4_defun([AC_PROG_GO],
slouken@6442
   838
[AC_LANG_PUSH(Go)dnl
slouken@6442
   839
AC_ARG_VAR([GOC],     [Go compiler command])dnl
slouken@6442
   840
AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
slouken@6442
   841
_AC_ARG_VAR_LDFLAGS()dnl
slouken@6442
   842
AC_CHECK_TOOL(GOC, gccgo)
slouken@6442
   843
if test -z "$GOC"; then
slouken@6442
   844
  if test -n "$ac_tool_prefix"; then
slouken@6442
   845
    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
slouken@6442
   846
  fi
slouken@6442
   847
fi
slouken@6442
   848
if test -z "$GOC"; then
slouken@6442
   849
  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
slouken@6442
   850
fi
slouken@6442
   851
])#m4_defun
slouken@6442
   852
])#m4_ifndef
slouken@6442
   853
slouken@6442
   854
slouken@3342
   855
# _LT_LANG_DEFAULT_CONFIG
slouken@3342
   856
# -----------------------
slouken@3342
   857
m4_defun([_LT_LANG_DEFAULT_CONFIG],
slouken@3342
   858
[AC_PROVIDE_IFELSE([AC_PROG_CXX],
slouken@3342
   859
  [LT_LANG(CXX)],
slouken@3342
   860
  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
slouken@3342
   861
slouken@3342
   862
AC_PROVIDE_IFELSE([AC_PROG_F77],
slouken@3342
   863
  [LT_LANG(F77)],
slouken@3342
   864
  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
slouken@3342
   865
slouken@3342
   866
AC_PROVIDE_IFELSE([AC_PROG_FC],
slouken@3342
   867
  [LT_LANG(FC)],
slouken@3342
   868
  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
slouken@3342
   869
slouken@3342
   870
dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
slouken@3342
   871
dnl pulling things in needlessly.
slouken@3342
   872
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
slouken@3342
   873
  [LT_LANG(GCJ)],
slouken@3342
   874
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
slouken@3342
   875
    [LT_LANG(GCJ)],
slouken@3342
   876
    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
slouken@3342
   877
      [LT_LANG(GCJ)],
slouken@3342
   878
      [m4_ifdef([AC_PROG_GCJ],
slouken@3342
   879
	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
slouken@3342
   880
       m4_ifdef([A][M_PROG_GCJ],
slouken@3342
   881
	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
slouken@3342
   882
       m4_ifdef([LT_PROG_GCJ],
slouken@3342
   883
	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
slouken@3342
   884
slouken@6442
   885
AC_PROVIDE_IFELSE([AC_PROG_GO],
slouken@6442
   886
  [LT_LANG(GO)],
slouken@6442
   887
  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
slouken@6442
   888
slouken@3342
   889
AC_PROVIDE_IFELSE([LT_PROG_RC],
slouken@3342
   890
  [LT_LANG(RC)],
slouken@3342
   891
  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
slouken@3342
   892
])# _LT_LANG_DEFAULT_CONFIG
slouken@3342
   893
slouken@3342
   894
# Obsolete macros:
slouken@3342
   895
AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
slouken@3342
   896
AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
slouken@3342
   897
AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
slouken@3342
   898
AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
slouken@6442
   899
AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
slouken@3342
   900
dnl aclocal-1.4 backwards compatibility:
slouken@3342
   901
dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
slouken@3342
   902
dnl AC_DEFUN([AC_LIBTOOL_F77], [])
slouken@3342
   903
dnl AC_DEFUN([AC_LIBTOOL_FC], [])
slouken@3342
   904
dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
slouken@6442
   905
dnl AC_DEFUN([AC_LIBTOOL_RC], [])
slouken@3342
   906
slouken@3342
   907
slouken@3342
   908
# _LT_TAG_COMPILER
slouken@3342
   909
# ----------------
slouken@3342
   910
m4_defun([_LT_TAG_COMPILER],
slouken@3342
   911
[AC_REQUIRE([AC_PROG_CC])dnl
slouken@3342
   912
slouken@3342
   913
_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
slouken@3342
   914
_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
slouken@3342
   915
_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
slouken@3342
   916
_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
slouken@3342
   917
slouken@3342
   918
# If no C compiler was specified, use CC.
slouken@3342
   919
LTCC=${LTCC-"$CC"}
slouken@3342
   920
slouken@3342
   921
# If no C compiler flags were specified, use CFLAGS.
slouken@3342
   922
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
slouken@3342
   923
slouken@3342
   924
# Allow CC to be a program name with arguments.
slouken@3342
   925
compiler=$CC
slouken@3342
   926
])# _LT_TAG_COMPILER
slouken@3342
   927
slouken@3342
   928
slouken@3342
   929
# _LT_COMPILER_BOILERPLATE
slouken@3342
   930
# ------------------------
slouken@3342
   931
# Check for compiler boilerplate output or warnings with
slouken@3342
   932
# the simple compiler test code.
slouken@3342
   933
m4_defun([_LT_COMPILER_BOILERPLATE],
slouken@3342
   934
[m4_require([_LT_DECL_SED])dnl
slouken@3342
   935
ac_outfile=conftest.$ac_objext
slouken@3342
   936
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
slouken@3342
   937
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
slouken@3342
   938
_lt_compiler_boilerplate=`cat conftest.err`
slouken@3342
   939
$RM conftest*
slouken@3342
   940
])# _LT_COMPILER_BOILERPLATE
slouken@3342
   941
slouken@3342
   942
slouken@3342
   943
# _LT_LINKER_BOILERPLATE
slouken@3342
   944
# ----------------------
slouken@3342
   945
# Check for linker boilerplate output or warnings with
slouken@3342
   946
# the simple link test code.
slouken@3342
   947
m4_defun([_LT_LINKER_BOILERPLATE],
slouken@3342
   948
[m4_require([_LT_DECL_SED])dnl
slouken@3342
   949
ac_outfile=conftest.$ac_objext
slouken@3342
   950
echo "$lt_simple_link_test_code" >conftest.$ac_ext
slouken@3342
   951
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
slouken@3342
   952
_lt_linker_boilerplate=`cat conftest.err`
slouken@3342
   953
$RM -r conftest*
slouken@3342
   954
])# _LT_LINKER_BOILERPLATE
slouken@3342
   955
slouken@3342
   956
# _LT_REQUIRED_DARWIN_CHECKS
slouken@3342
   957
# -------------------------
slouken@3342
   958
m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
slouken@3342
   959
  case $host_os in
slouken@3342
   960
    rhapsody* | darwin*)
slouken@3342
   961
    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
slouken@3342
   962
    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
slouken@3342
   963
    AC_CHECK_TOOL([LIPO], [lipo], [:])
slouken@3342
   964
    AC_CHECK_TOOL([OTOOL], [otool], [:])
slouken@3342
   965
    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
slouken@3342
   966
    _LT_DECL([], [DSYMUTIL], [1],
slouken@3342
   967
      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
slouken@3342
   968
    _LT_DECL([], [NMEDIT], [1],
slouken@3342
   969
      [Tool to change global to local symbols on Mac OS X])
slouken@3342
   970
    _LT_DECL([], [LIPO], [1],
slouken@3342
   971
      [Tool to manipulate fat objects and archives on Mac OS X])
slouken@3342
   972
    _LT_DECL([], [OTOOL], [1],
slouken@3342
   973
      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
slouken@3342
   974
    _LT_DECL([], [OTOOL64], [1],
slouken@3342
   975
      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
slouken@3342
   976
slouken@3342
   977
    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
slouken@3342
   978
      [lt_cv_apple_cc_single_mod=no
slouken@3342
   979
      if test -z "${LT_MULTI_MODULE}"; then
slouken@3342
   980
	# By default we will add the -single_module flag. You can override
slouken@3342
   981
	# by either setting the environment variable LT_MULTI_MODULE
slouken@3342
   982
	# non-empty at configure time, or by adding -multi_module to the
slouken@3342
   983
	# link flags.
slouken@3342
   984
	rm -rf libconftest.dylib*
slouken@3342
   985
	echo "int foo(void){return 1;}" > conftest.c
slouken@3342
   986
	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
slouken@3342
   987
-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
slouken@3342
   988
	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
slouken@3342
   989
	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
slouken@3342
   990
        _lt_result=$?
slouken@6442
   991
	# If there is a non-empty error log, and "single_module"
slouken@6442
   992
	# appears in it, assume the flag caused a linker warning
slouken@6442
   993
        if test -s conftest.err && $GREP single_module conftest.err; then
slouken@6442
   994
	  cat conftest.err >&AS_MESSAGE_LOG_FD
slouken@6442
   995
	# Otherwise, if the output was created with a 0 exit code from
slouken@6442
   996
	# the compiler, it worked.
slouken@6442
   997
	elif test -f libconftest.dylib && test $_lt_result -eq 0; then
slouken@3342
   998
	  lt_cv_apple_cc_single_mod=yes
slouken@3342
   999
	else
slouken@3342
  1000
	  cat conftest.err >&AS_MESSAGE_LOG_FD
slouken@3342
  1001
	fi
slouken@3342
  1002
	rm -rf libconftest.dylib*
slouken@3342
  1003
	rm -f conftest.*
slouken@3342
  1004
      fi])
slouken@6442
  1005
slouken@3342
  1006
    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
slouken@3342
  1007
      [lt_cv_ld_exported_symbols_list],
slouken@3342
  1008
      [lt_cv_ld_exported_symbols_list=no
slouken@3342
  1009
      save_LDFLAGS=$LDFLAGS
slouken@3342
  1010
      echo "_main" > conftest.sym
slouken@3342
  1011
      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
slouken@3342
  1012
      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
slouken@3342
  1013
	[lt_cv_ld_exported_symbols_list=yes],
slouken@3342
  1014
	[lt_cv_ld_exported_symbols_list=no])
slouken@3342
  1015
	LDFLAGS="$save_LDFLAGS"
slouken@3342
  1016
    ])
slouken@6442
  1017
slouken@6442
  1018
    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
slouken@6442
  1019
      [lt_cv_ld_force_load=no
slouken@6442
  1020
      cat > conftest.c << _LT_EOF
slouken@6442
  1021
int forced_loaded() { return 2;}
slouken@6442
  1022
_LT_EOF
slouken@6442
  1023
      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
slouken@6442
  1024
      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
slouken@6442
  1025
      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
slouken@6442
  1026
      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
slouken@6442
  1027
      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
slouken@6442
  1028
      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
slouken@6442
  1029
      cat > conftest.c << _LT_EOF
slouken@6442
  1030
int main() { return 0;}
slouken@6442
  1031
_LT_EOF
slouken@6442
  1032
      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
slouken@6442
  1033
      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
slouken@6442
  1034
      _lt_result=$?
slouken@6442
  1035
      if test -s conftest.err && $GREP force_load conftest.err; then
slouken@6442
  1036
	cat conftest.err >&AS_MESSAGE_LOG_FD
slouken@6442
  1037
      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
slouken@6442
  1038
	lt_cv_ld_force_load=yes
slouken@6442
  1039
      else
slouken@6442
  1040
	cat conftest.err >&AS_MESSAGE_LOG_FD
slouken@6442
  1041
      fi
slouken@6442
  1042
        rm -f conftest.err libconftest.a conftest conftest.c
slouken@6442
  1043
        rm -rf conftest.dSYM
slouken@6442
  1044
    ])
slouken@3342
  1045
    case $host_os in
slouken@3342
  1046
    rhapsody* | darwin1.[[012]])
slouken@3342
  1047
      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
slouken@3342
  1048
    darwin1.*)
slouken@3342
  1049
      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
slouken@3342
  1050
    darwin*) # darwin 5.x on
slouken@3342
  1051
      # if running on 10.5 or later, the deployment target defaults
slouken@3342
  1052
      # to the OS version, if on x86, and 10.4, the deployment
slouken@3342
  1053
      # target defaults to 10.4. Don't you love it?
slouken@3342
  1054
      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
slouken@3342
  1055
	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
slouken@3342
  1056
	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
slouken@3342
  1057
	10.[[012]]*)
slouken@3342
  1058
	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
slouken@3342
  1059
	10.*)
slouken@3342
  1060
	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
slouken@3342
  1061
      esac
slouken@3342
  1062
    ;;
slouken@3342
  1063
  esac
slouken@3342
  1064
    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
slouken@3342
  1065
      _lt_dar_single_mod='$single_module'
slouken@3342
  1066
    fi
slouken@3342
  1067
    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
slouken@3342
  1068
      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
slouken@3342
  1069
    else
slouken@3342
  1070
      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
slouken@3342
  1071
    fi
slouken@6442
  1072
    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
slouken@3342
  1073
      _lt_dsymutil='~$DSYMUTIL $lib || :'
slouken@3342
  1074
    else
slouken@3342
  1075
      _lt_dsymutil=
slouken@3342
  1076
    fi
slouken@3342
  1077
    ;;
slouken@3342
  1078
  esac
slouken@3342
  1079
])
slouken@3342
  1080
slouken@3342
  1081
slouken@6442
  1082
# _LT_DARWIN_LINKER_FEATURES([TAG])
slouken@6442
  1083
# ---------------------------------
slouken@3342
  1084
# Checks for linker and compiler features on darwin
slouken@3342
  1085
m4_defun([_LT_DARWIN_LINKER_FEATURES],
slouken@3342
  1086
[
slouken@3342
  1087
  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
slouken@3342
  1088
  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
slouken@3342
  1089
  _LT_TAGVAR(hardcode_direct, $1)=no
slouken@3342
  1090
  _LT_TAGVAR(hardcode_automatic, $1)=yes
slouken@3342
  1091
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
slouken@6442
  1092
  if test "$lt_cv_ld_force_load" = "yes"; then
slouken@6442
  1093
    _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\"`'
slouken@6442
  1094
    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
slouken@6442
  1095
                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
slouken@6442
  1096
  else
slouken@6442
  1097
    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
slouken@6442
  1098
  fi
slouken@3342
  1099
  _LT_TAGVAR(link_all_deplibs, $1)=yes
slouken@3342
  1100
  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
slouken@3342
  1101
  case $cc_basename in
slouken@3342
  1102
     ifort*) _lt_dar_can_shared=yes ;;
slouken@3342
  1103
     *) _lt_dar_can_shared=$GCC ;;
slouken@3342
  1104
  esac
slouken@3342
  1105
  if test "$_lt_dar_can_shared" = "yes"; then
slouken@6442
  1106
    output_verbose_link_cmd=func_echo_all
slouken@3342
  1107
    _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}"
slouken@3342
  1108
    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
slouken@3342
  1109
    _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}"
slouken@3342
  1110
    _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}"
slouken@3342
  1111
    m4_if([$1], [CXX],
slouken@3342
  1112
[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
slouken@3342
  1113
      _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}"
slouken@3342
  1114
      _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}"
slouken@3342
  1115
    fi
slouken@3342
  1116
],[])
slouken@3342
  1117
  else
slouken@3342
  1118
  _LT_TAGVAR(ld_shlibs, $1)=no
slouken@3342
  1119
  fi
slouken@3342
  1120
])
slouken@3342
  1121
slouken@6442
  1122
# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
slouken@6442
  1123
# ----------------------------------
slouken@3342
  1124
# Links a minimal program and checks the executable
slouken@3342
  1125
# for the system default hardcoded library path. In most cases,
slouken@3342
  1126
# this is /usr/lib:/lib, but when the MPI compilers are used
slouken@3342
  1127
# the location of the communication and MPI libs are included too.
slouken@3342
  1128
# If we don't find anything, use the default library path according
slouken@3342
  1129
# to the aix ld manual.
slouken@6442
  1130
# Store the results from the different compilers for each TAGNAME.
slouken@6442
  1131
# Allow to override them for all tags through lt_cv_aix_libpath.
slouken@3342
  1132
m4_defun([_LT_SYS_MODULE_PATH_AIX],
slouken@3342
  1133
[m4_require([_LT_DECL_SED])dnl
slouken@6442
  1134
if test "${lt_cv_aix_libpath+set}" = set; then
slouken@6442
  1135
  aix_libpath=$lt_cv_aix_libpath
slouken@6442
  1136
else
slouken@6442
  1137
  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
slouken@6442
  1138
  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
slouken@6442
  1139
  lt_aix_libpath_sed='[
slouken@6442
  1140
      /Import File Strings/,/^$/ {
slouken@6442
  1141
	  /^0/ {
slouken@6442
  1142
	      s/^0  *\([^ ]*\) *$/\1/
slouken@6442
  1143
	      p
slouken@6442
  1144
	  }
slouken@6442
  1145
      }]'
slouken@6442
  1146
  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
slouken@6442
  1147
  # Check for a 64-bit object if we didn't find anything.
slouken@6442
  1148
  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
slouken@6442
  1149
    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
slouken@6442
  1150
  fi],[])
slouken@6442
  1151
  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
slouken@6442
  1152
    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
slouken@6442
  1153
  fi
slouken@6442
  1154
  ])
slouken@6442
  1155
  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
slouken@6442
  1156
fi
slouken@3342
  1157
])# _LT_SYS_MODULE_PATH_AIX
slouken@3342
  1158
slouken@3342
  1159
slouken@3342
  1160
# _LT_SHELL_INIT(ARG)
slouken@3342
  1161
# -------------------
slouken@3342
  1162
m4_define([_LT_SHELL_INIT],
slouken@6442
  1163
[m4_divert_text([M4SH-INIT], [$1
slouken@6442
  1164
])])# _LT_SHELL_INIT
slouken@6442
  1165
slouken@3342
  1166
slouken@3342
  1167
slouken@3342
  1168
# _LT_PROG_ECHO_BACKSLASH
slouken@3342
  1169
# -----------------------
slouken@6442
  1170
# Find how we can fake an echo command that does not interpret backslash.
slouken@6442
  1171
# In particular, with Autoconf 2.60 or later we add some code to the start
slouken@6442
  1172
# of the generated configure script which will find a shell with a builtin
slouken@6442
  1173
# printf (which we can use as an echo command).
slouken@3342
  1174
m4_defun([_LT_PROG_ECHO_BACKSLASH],
slouken@6442
  1175
[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
slouken@6442
  1176
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
slouken@6442
  1177
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
slouken@6442
  1178
slouken@6442
  1179
AC_MSG_CHECKING([how to print strings])
slouken@6442
  1180
# Test print first, because it will be a builtin if present.
slouken@6442
  1181
if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
slouken@6442
  1182
   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
slouken@6442
  1183
  ECHO='print -r --'
slouken@6442
  1184
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
slouken@6442
  1185
  ECHO='printf %s\n'
slouken@3342
  1186
else
slouken@6442
  1187
  # Use this function as a fallback that always works.
slouken@6442
  1188
  func_fallback_echo ()
slouken@6442
  1189
  {
slouken@6442
  1190
    eval 'cat <<_LTECHO_EOF
slouken@6442
  1191
$[]1
slouken@6442
  1192
_LTECHO_EOF'
slouken@6442
  1193
  }
slouken@6442
  1194
  ECHO='func_fallback_echo'
slouken@3342
  1195
fi
slouken@3342
  1196
slouken@6442
  1197
# func_echo_all arg...
slouken@6442
  1198
# Invoke $ECHO with all args, space-separated.
slouken@6442
  1199
func_echo_all ()
slouken@6442
  1200
{
slouken@6442
  1201
    $ECHO "$*" 
slouken@6442
  1202
}
slouken@6442
  1203
slouken@6442
  1204
case "$ECHO" in
slouken@6442
  1205
  printf*) AC_MSG_RESULT([printf]) ;;
slouken@6442
  1206
  print*) AC_MSG_RESULT([print -r]) ;;
slouken@6442
  1207
  *) AC_MSG_RESULT([cat]) ;;
slouken@6442
  1208
esac
slouken@6442
  1209
slouken@6442
  1210
m4_ifdef([_AS_DETECT_SUGGESTED],
slouken@6442
  1211
[_AS_DETECT_SUGGESTED([
slouken@6442
  1212
  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
slouken@6442
  1213
    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
slouken@6442
  1214
    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
slouken@6442
  1215
    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
slouken@6442
  1216
    PATH=/empty FPATH=/empty; export PATH FPATH
slouken@6442
  1217
    test "X`printf %s $ECHO`" = "X$ECHO" \
slouken@6442
  1218
      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
slouken@6442
  1219
slouken@3342
  1220
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
slouken@6442
  1221
_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
slouken@3342
  1222
])# _LT_PROG_ECHO_BACKSLASH
slouken@3342
  1223
slouken@3342
  1224
slouken@6442
  1225
# _LT_WITH_SYSROOT
slouken@6442
  1226
# ----------------
slouken@6442
  1227
AC_DEFUN([_LT_WITH_SYSROOT],
slouken@6442
  1228
[AC_MSG_CHECKING([for sysroot])
slouken@6442
  1229
AC_ARG_WITH([sysroot],
slouken@6442
  1230
[  --with-sysroot[=DIR] Search for dependent libraries within DIR
slouken@6442
  1231
                        (or the compiler's sysroot if not specified).],
slouken@6442
  1232
[], [with_sysroot=no])
slouken@6442
  1233
slouken@6442
  1234
dnl lt_sysroot will always be passed unquoted.  We quote it here
slouken@6442
  1235
dnl in case the user passed a directory name.
slouken@6442
  1236
lt_sysroot=
slouken@6442
  1237
case ${with_sysroot} in #(
slouken@6442
  1238
 yes)
slouken@6442
  1239
   if test "$GCC" = yes; then
slouken@6442
  1240
     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
slouken@6442
  1241
   fi
slouken@6442
  1242
   ;; #(
slouken@6442
  1243
 /*)
slouken@6442
  1244
   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
slouken@6442
  1245
   ;; #(
slouken@6442
  1246
 no|'')
slouken@6442
  1247
   ;; #(
slouken@6442
  1248
 *)
slouken@6442
  1249
   AC_MSG_RESULT([${with_sysroot}])
slouken@6442
  1250
   AC_MSG_ERROR([The sysroot must be an absolute path.])
slouken@6442
  1251
   ;;
slouken@6442
  1252
esac
slouken@6442
  1253
slouken@6442
  1254
 AC_MSG_RESULT([${lt_sysroot:-no}])
slouken@6442
  1255
_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
slouken@6442
  1256
[dependent libraries, and in which our libraries should be installed.])])
slouken@6442
  1257
slouken@3342
  1258
# _LT_ENABLE_LOCK
slouken@3342
  1259
# ---------------
slouken@3342
  1260
m4_defun([_LT_ENABLE_LOCK],
slouken@3342
  1261
[AC_ARG_ENABLE([libtool-lock],
slouken@3342
  1262
  [AS_HELP_STRING([--disable-libtool-lock],
slouken@3342
  1263
    [avoid locking (might break parallel builds)])])
slouken@3342
  1264
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
slouken@3342
  1265
slouken@3342
  1266
# Some flags need to be propagated to the compiler or linker for good
slouken@3342
  1267
# libtool support.
slouken@3342
  1268
case $host in
slouken@3342
  1269
ia64-*-hpux*)
slouken@3342
  1270
  # Find out which ABI we are using.
slouken@3342
  1271
  echo 'int i;' > conftest.$ac_ext
slouken@3342
  1272
  if AC_TRY_EVAL(ac_compile); then
slouken@3342
  1273
    case `/usr/bin/file conftest.$ac_objext` in
slouken@3342
  1274
      *ELF-32*)
slouken@3342
  1275
	HPUX_IA64_MODE="32"
slouken@3342
  1276
	;;
slouken@3342
  1277
      *ELF-64*)
slouken@3342
  1278
	HPUX_IA64_MODE="64"
slouken@3342
  1279
	;;
slouken@3342
  1280
    esac
slouken@3342
  1281
  fi
slouken@3342
  1282
  rm -rf conftest*
slouken@3342
  1283
  ;;
slouken@3342
  1284
*-*-irix6*)
slouken@3342
  1285
  # Find out which ABI we are using.
slouken@6442
  1286
  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
slouken@3342
  1287
  if AC_TRY_EVAL(ac_compile); then
slouken@3342
  1288
    if test "$lt_cv_prog_gnu_ld" = yes; then
slouken@3342
  1289
      case `/usr/bin/file conftest.$ac_objext` in
slouken@3342
  1290
	*32-bit*)
slouken@3342
  1291
	  LD="${LD-ld} -melf32bsmip"
slouken@3342
  1292
	  ;;
slouken@3342
  1293
	*N32*)
slouken@3342
  1294
	  LD="${LD-ld} -melf32bmipn32"
slouken@3342
  1295
	  ;;
slouken@3342
  1296
	*64-bit*)
slouken@3342
  1297
	  LD="${LD-ld} -melf64bmip"
slouken@3342
  1298
	;;
slouken@3342
  1299
      esac
slouken@3342
  1300
    else
slouken@3342
  1301
      case `/usr/bin/file conftest.$ac_objext` in
slouken@3342
  1302
	*32-bit*)
slouken@3342
  1303
	  LD="${LD-ld} -32"
slouken@3342
  1304
	  ;;
slouken@3342
  1305
	*N32*)
slouken@3342
  1306
	  LD="${LD-ld} -n32"
slouken@3342
  1307
	  ;;
slouken@3342
  1308
	*64-bit*)
slouken@3342
  1309
	  LD="${LD-ld} -64"
slouken@3342
  1310
	  ;;
slouken@3342
  1311
      esac
slouken@3342
  1312
    fi
slouken@3342
  1313
  fi
slouken@3342
  1314
  rm -rf conftest*
slouken@3342
  1315
  ;;
slouken@3342
  1316
slouken@3342
  1317
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
slouken@3342
  1318
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
slouken@3342
  1319
  # Find out which ABI we are using.
slouken@3342
  1320
  echo 'int i;' > conftest.$ac_ext
slouken@3342
  1321
  if AC_TRY_EVAL(ac_compile); then
slouken@3342
  1322
    case `/usr/bin/file conftest.o` in
slouken@3342
  1323
      *32-bit*)
slouken@3342
  1324
	case $host in
slouken@3342
  1325
	  x86_64-*kfreebsd*-gnu)
slouken@3342
  1326
	    LD="${LD-ld} -m elf_i386_fbsd"
slouken@3342
  1327
	    ;;
slouken@3342
  1328
	  x86_64-*linux*)
slouken@3342
  1329
	    LD="${LD-ld} -m elf_i386"
slouken@3342
  1330
	    ;;
slouken@3342
  1331
	  ppc64-*linux*|powerpc64-*linux*)
slouken@3342
  1332
	    LD="${LD-ld} -m elf32ppclinux"
slouken@3342
  1333
	    ;;
slouken@3342
  1334
	  s390x-*linux*)
slouken@3342
  1335
	    LD="${LD-ld} -m elf_s390"
slouken@3342
  1336
	    ;;
slouken@3342
  1337
	  sparc64-*linux*)
slouken@3342
  1338
	    LD="${LD-ld} -m elf32_sparc"
slouken@3342
  1339
	    ;;
slouken@3342
  1340
	esac
slouken@3342
  1341
	;;
slouken@3342
  1342
      *64-bit*)
slouken@3342
  1343
	case $host in
slouken@3342
  1344
	  x86_64-*kfreebsd*-gnu)
slouken@3342
  1345
	    LD="${LD-ld} -m elf_x86_64_fbsd"
slouken@3342
  1346
	    ;;
slouken@3342
  1347
	  x86_64-*linux*)
slouken@3342
  1348
	    LD="${LD-ld} -m elf_x86_64"
slouken@3342
  1349
	    ;;
slouken@10590
  1350
	  powerpc64le-*linux*)
slouken@10590
  1351
	    LD="${LD-ld} -m elf64lppc"
slouken@10590
  1352
	    ;;
slouken@10590
  1353
	  powerpc64-*linux*)
slouken@3342
  1354
	    LD="${LD-ld} -m elf64ppc"
slouken@3342
  1355
	    ;;
slouken@3342
  1356
	  s390*-*linux*|s390*-*tpf*)
slouken@3342
  1357
	    LD="${LD-ld} -m elf64_s390"
slouken@3342
  1358
	    ;;
slouken@3342
  1359
	  sparc*-*linux*)
slouken@3342
  1360
	    LD="${LD-ld} -m elf64_sparc"
slouken@3342
  1361
	    ;;
slouken@3342
  1362
	esac
slouken@3342
  1363
	;;
slouken@3342
  1364
    esac
slouken@3342
  1365
  fi
slouken@3342
  1366
  rm -rf conftest*
slouken@3342
  1367
  ;;
slouken@3342
  1368
slouken@3342
  1369
*-*-sco3.2v5*)
slouken@3342
  1370
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
slouken@3342
  1371
  SAVE_CFLAGS="$CFLAGS"
slouken@3342
  1372
  CFLAGS="$CFLAGS -belf"
slouken@3342
  1373
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
slouken@3342
  1374
    [AC_LANG_PUSH(C)
slouken@3342
  1375
     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
slouken@3342
  1376
     AC_LANG_POP])
slouken@3342
  1377
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
slouken@3342
  1378
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
slouken@3342
  1379
    CFLAGS="$SAVE_CFLAGS"
slouken@3342
  1380
  fi
slouken@3342
  1381
  ;;
slouken@6442
  1382
*-*solaris*)
slouken@3342
  1383
  # Find out which ABI we are using.
slouken@3342
  1384
  echo 'int i;' > conftest.$ac_ext
slouken@3342
  1385
  if AC_TRY_EVAL(ac_compile); then
slouken@3342
  1386
    case `/usr/bin/file conftest.o` in
slouken@3342
  1387
    *64-bit*)
slouken@3342
  1388
      case $lt_cv_prog_gnu_ld in
slouken@6442
  1389
      yes*)
slouken@6442
  1390
        case $host in
slouken@6442
  1391
        i?86-*-solaris*)
slouken@6442
  1392
          LD="${LD-ld} -m elf_x86_64"
slouken@6442
  1393
          ;;
slouken@6442
  1394
        sparc*-*-solaris*)
slouken@6442
  1395
          LD="${LD-ld} -m elf64_sparc"
slouken@6442
  1396
          ;;
slouken@6442
  1397
        esac
slouken@6442
  1398
        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
slouken@6442
  1399
        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
slouken@6442
  1400
          LD="${LD-ld}_sol2"
slouken@6442
  1401
        fi
slouken@6442
  1402
        ;;
slouken@3342
  1403
      *)
slouken@3342
  1404
	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
slouken@3342
  1405
	  LD="${LD-ld} -64"
slouken@3342
  1406
	fi
slouken@3342
  1407
	;;
slouken@3342
  1408
      esac
slouken@3342
  1409
      ;;
slouken@3342
  1410
    esac
slouken@3342
  1411
  fi
slouken@3342
  1412
  rm -rf conftest*
slouken@3342
  1413
  ;;
slouken@3342
  1414
esac
slouken@3342
  1415
slouken@3342
  1416
need_locks="$enable_libtool_lock"
slouken@3342
  1417
])# _LT_ENABLE_LOCK
slouken@3342
  1418
slouken@3342
  1419
slouken@6442
  1420
# _LT_PROG_AR
slouken@6442
  1421
# -----------
slouken@6442
  1422
m4_defun([_LT_PROG_AR],
slouken@6442
  1423
[AC_CHECK_TOOLS(AR, [ar], false)
slouken@6442
  1424
: ${AR=ar}
slouken@6442
  1425
: ${AR_FLAGS=cru}
slouken@6442
  1426
_LT_DECL([], [AR], [1], [The archiver])
slouken@6442
  1427
_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
slouken@6442
  1428
slouken@6442
  1429
AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
slouken@6442
  1430
  [lt_cv_ar_at_file=no
slouken@6442
  1431
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
slouken@6442
  1432
     [echo conftest.$ac_objext > conftest.lst
slouken@6442
  1433
      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
slouken@6442
  1434
      AC_TRY_EVAL([lt_ar_try])
slouken@6442
  1435
      if test "$ac_status" -eq 0; then
slouken@6442
  1436
	# Ensure the archiver fails upon bogus file names.
slouken@6442
  1437
	rm -f conftest.$ac_objext libconftest.a
slouken@6442
  1438
	AC_TRY_EVAL([lt_ar_try])
slouken@6442
  1439
	if test "$ac_status" -ne 0; then
slouken@6442
  1440
          lt_cv_ar_at_file=@
slouken@6442
  1441
        fi
slouken@6442
  1442
      fi
slouken@6442
  1443
      rm -f conftest.* libconftest.a
slouken@6442
  1444
     ])
slouken@6442
  1445
  ])
slouken@6442
  1446
slouken@6442
  1447
if test "x$lt_cv_ar_at_file" = xno; then
slouken@6442
  1448
  archiver_list_spec=
slouken@6442
  1449
else
slouken@6442
  1450
  archiver_list_spec=$lt_cv_ar_at_file
slouken@6442
  1451
fi
slouken@6442
  1452
_LT_DECL([], [archiver_list_spec], [1],
slouken@6442
  1453
  [How to feed a file listing to the archiver])
slouken@6442
  1454
])# _LT_PROG_AR
slouken@6442
  1455
slouken@6442
  1456
slouken@3342
  1457
# _LT_CMD_OLD_ARCHIVE
slouken@3342
  1458
# -------------------
slouken@3342
  1459
m4_defun([_LT_CMD_OLD_ARCHIVE],
slouken@6442
  1460
[_LT_PROG_AR
slouken@3342
  1461
slouken@3342
  1462
AC_CHECK_TOOL(STRIP, strip, :)
slouken@3342
  1463
test -z "$STRIP" && STRIP=:
slouken@3342
  1464
_LT_DECL([], [STRIP], [1], [A symbol stripping program])
slouken@3342
  1465
slouken@3342
  1466
AC_CHECK_TOOL(RANLIB, ranlib, :)
slouken@3342
  1467
test -z "$RANLIB" && RANLIB=:
slouken@3342
  1468
_LT_DECL([], [RANLIB], [1],
slouken@3342
  1469
    [Commands used to install an old-style archive])
slouken@3342
  1470
slouken@3342
  1471
# Determine commands to create old-style static archives.
slouken@3342
  1472
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
slouken@3342
  1473
old_postinstall_cmds='chmod 644 $oldlib'
slouken@3342
  1474
old_postuninstall_cmds=
slouken@3342
  1475
slouken@3342
  1476
if test -n "$RANLIB"; then
slouken@3342
  1477
  case $host_os in
slouken@3342
  1478
  openbsd*)
slouken@6442
  1479
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
slouken@3342
  1480
    ;;
slouken@3342
  1481
  *)
slouken@6442
  1482
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
slouken@3342
  1483
    ;;
slouken@3342
  1484
  esac
slouken@6442
  1485
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
slouken@3342
  1486
fi
slouken@6442
  1487
slouken@6442
  1488
case $host_os in
slouken@6442
  1489
  darwin*)
slouken@6442
  1490
    lock_old_archive_extraction=yes ;;
slouken@6442
  1491
  *)
slouken@6442
  1492
    lock_old_archive_extraction=no ;;
slouken@6442
  1493
esac
slouken@3342
  1494
_LT_DECL([], [old_postinstall_cmds], [2])
slouken@3342
  1495
_LT_DECL([], [old_postuninstall_cmds], [2])
slouken@3342
  1496
_LT_TAGDECL([], [old_archive_cmds], [2],
slouken@3342
  1497
    [Commands used to build an old-style archive])
slouken@6442
  1498
_LT_DECL([], [lock_old_archive_extraction], [0],
slouken@6442
  1499
    [Whether to use a lock for old archive extraction])
slouken@3342
  1500
])# _LT_CMD_OLD_ARCHIVE
slouken@3342
  1501
slouken@3342
  1502
slouken@3342
  1503
# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
slouken@3342
  1504
#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
slouken@3342
  1505
# ----------------------------------------------------------------
slouken@3342
  1506
# Check whether the given compiler option works
slouken@3342
  1507
AC_DEFUN([_LT_COMPILER_OPTION],
slouken@3342
  1508
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
slouken@3342
  1509
m4_require([_LT_DECL_SED])dnl
slouken@3342
  1510
AC_CACHE_CHECK([$1], [$2],
slouken@3342
  1511
  [$2=no
slouken@3342
  1512
   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
slouken@3342
  1513
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
slouken@3342
  1514
   lt_compiler_flag="$3"
slouken@3342
  1515
   # Insert the option either (1) after the last *FLAGS variable, or
slouken@3342
  1516
   # (2) before a word containing "conftest.", or (3) at the end.
slouken@3342
  1517
   # Note that $ac_compile itself does not contain backslashes and begins
slouken@3342
  1518
   # with a dollar sign (not a hyphen), so the echo should work correctly.
slouken@3342
  1519
   # The option is referenced via a variable to avoid confusing sed.
slouken@3342
  1520
   lt_compile=`echo "$ac_compile" | $SED \
slouken@3342
  1521
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
slouken@3342
  1522
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
slouken@3342
  1523
   -e 's:$: $lt_compiler_flag:'`
slouken@6442
  1524
   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
slouken@3342
  1525
   (eval "$lt_compile" 2>conftest.err)
slouken@3342
  1526
   ac_status=$?
slouken@3342
  1527
   cat conftest.err >&AS_MESSAGE_LOG_FD
slouken@6442
  1528
   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
slouken@3342
  1529
   if (exit $ac_status) && test -s "$ac_outfile"; then
slouken@3342
  1530
     # The compiler can only warn and ignore the option if not recognized
slouken@3342
  1531
     # So say no if there are warnings other than the usual output.
slouken@6442
  1532
     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
slouken@3342
  1533
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
slouken@3342
  1534
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
slouken@3342
  1535
       $2=yes
slouken@3342
  1536
     fi
slouken@3342
  1537
   fi
slouken@3342
  1538
   $RM conftest*
slouken@3342
  1539
])
slouken@3342
  1540
slouken@3342
  1541
if test x"[$]$2" = xyes; then
slouken@3342
  1542
    m4_if([$5], , :, [$5])
slouken@3342
  1543
else
slouken@3342
  1544
    m4_if([$6], , :, [$6])
slouken@3342
  1545
fi
slouken@3342
  1546
])# _LT_COMPILER_OPTION
slouken@3342
  1547
slouken@3342
  1548
# Old name:
slouken@3342
  1549
AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
slouken@3342
  1550
dnl aclocal-1.4 backwards compatibility:
slouken@3342
  1551
dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
slouken@3342
  1552
slouken@3342
  1553
slouken@3342
  1554
# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
slouken@3342
  1555
#                  [ACTION-SUCCESS], [ACTION-FAILURE])
slouken@3342
  1556
# ----------------------------------------------------
slouken@3342
  1557
# Check whether the given linker option works
slouken@3342
  1558
AC_DEFUN([_LT_LINKER_OPTION],
slouken@3342
  1559
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
slouken@3342
  1560
m4_require([_LT_DECL_SED])dnl
slouken@3342
  1561
AC_CACHE_CHECK([$1], [$2],
slouken@3342
  1562
  [$2=no
slouken@3342
  1563
   save_LDFLAGS="$LDFLAGS"
slouken@3342
  1564
   LDFLAGS="$LDFLAGS $3"
slouken@3342
  1565
   echo "$lt_simple_link_test_code" > conftest.$ac_ext
slouken@3342
  1566
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
slouken@3342
  1567
     # The linker can only warn and ignore the option if not recognized
slouken@3342
  1568
     # So say no if there are warnings
slouken@3342
  1569
     if test -s conftest.err; then
slouken@3342
  1570
       # Append any errors to the config.log.
slouken@3342
  1571
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
slouken@6442
  1572
       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
slouken@3342
  1573
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
slouken@3342
  1574
       if diff conftest.exp conftest.er2 >/dev/null; then
slouken@3342
  1575
         $2=yes
slouken@3342
  1576
       fi
slouken@3342
  1577
     else
slouken@3342
  1578
       $2=yes
slouken@3342
  1579
     fi
slouken@3342
  1580
   fi
slouken@3342
  1581
   $RM -r conftest*
slouken@3342
  1582
   LDFLAGS="$save_LDFLAGS"
slouken@3342
  1583
])
slouken@3342
  1584
slouken@3342
  1585
if test x"[$]$2" = xyes; then
slouken@3342
  1586
    m4_if([$4], , :, [$4])
slouken@3342
  1587
else
slouken@3342
  1588
    m4_if([$5], , :, [$5])
slouken@3342
  1589
fi
slouken@3342
  1590
])# _LT_LINKER_OPTION
slouken@3342
  1591
slouken@3342
  1592
# Old name:
slouken@3342
  1593
AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
slouken@3342
  1594
dnl aclocal-1.4 backwards compatibility:
slouken@3342
  1595
dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
slouken@3342
  1596
slouken@3342
  1597
slouken@3342
  1598
# LT_CMD_MAX_LEN
slouken@3342
  1599
#---------------
slouken@3342
  1600
AC_DEFUN([LT_CMD_MAX_LEN],
slouken@3342
  1601
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
slouken@3342
  1602
# find the maximum length of command line arguments
slouken@3342
  1603
AC_MSG_CHECKING([the maximum length of command line arguments])
slouken@3342
  1604
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
slouken@3342
  1605
  i=0
slouken@3342
  1606
  teststring="ABCD"
slouken@3342
  1607
slouken@3342
  1608
  case $build_os in
slouken@3342
  1609
  msdosdjgpp*)
slouken@3342
  1610
    # On DJGPP, this test can blow up pretty badly due to problems in libc
slouken@3342
  1611
    # (any single argument exceeding 2000 bytes causes a buffer overrun
slouken@3342
  1612
    # during glob expansion).  Even if it were fixed, the result of this
slouken@3342
  1613
    # check would be larger than it should be.
slouken@3342
  1614
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
slouken@3342
  1615
    ;;
slouken@3342
  1616
slouken@3342
  1617
  gnu*)
slouken@3342
  1618
    # Under GNU Hurd, this test is not required because there is
slouken@3342
  1619
    # no limit to the length of command line arguments.
slouken@3342
  1620
    # Libtool will interpret -1 as no limit whatsoever
slouken@3342
  1621
    lt_cv_sys_max_cmd_len=-1;
slouken@3342
  1622
    ;;
slouken@3342
  1623
slouken@3342
  1624
  cygwin* | mingw* | cegcc*)
slouken@3342
  1625
    # On Win9x/ME, this test blows up -- it succeeds, but takes
slouken@3342
  1626
    # about 5 minutes as the teststring grows exponentially.
slouken@3342
  1627
    # Worse, since 9x/ME are not pre-emptively multitasking,
slouken@3342
  1628
    # you end up with a "frozen" computer, even though with patience
slouken@3342
  1629
    # the test eventually succeeds (with a max line length of 256k).
slouken@3342
  1630
    # Instead, let's just punt: use the minimum linelength reported by
slouken@3342
  1631
    # all of the supported platforms: 8192 (on NT/2K/XP).
slouken@3342
  1632
    lt_cv_sys_max_cmd_len=8192;
slouken@3342
  1633
    ;;
slouken@3342
  1634
slouken@6442
  1635
  mint*)
slouken@6442
  1636
    # On MiNT this can take a long time and run out of memory.
slouken@3342
  1637
    lt_cv_sys_max_cmd_len=8192;
slouken@3342
  1638
    ;;
slouken@3342
  1639
slouken@3342
  1640
  amigaos*)
slouken@3342
  1641
    # On AmigaOS with pdksh, this test takes hours, literally.
slouken@3342
  1642
    # So we just punt and use a minimum line length of 8192.
slouken@3342
  1643
    lt_cv_sys_max_cmd_len=8192;
slouken@3342
  1644
    ;;
slouken@3342
  1645
slouken@3342
  1646
  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
slouken@3342
  1647
    # This has been around since 386BSD, at least.  Likely further.
slouken@3342
  1648
    if test -x /sbin/sysctl; then
slouken@3342
  1649
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
slouken@3342
  1650
    elif test -x /usr/sbin/sysctl; then
slouken@3342
  1651
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
slouken@3342
  1652
    else
slouken@3342
  1653
      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
slouken@3342
  1654
    fi
slouken@3342
  1655
    # And add a safety zone
slouken@3342
  1656
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
slouken@3342
  1657
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
slouken@3342
  1658
    ;;
slouken@3342
  1659
slouken@3342
  1660
  interix*)
slouken@3342
  1661
    # We know the value 262144 and hardcode it with a safety zone (like BSD)
slouken@3342
  1662
    lt_cv_sys_max_cmd_len=196608
slouken@3342
  1663
    ;;
slouken@3342
  1664
slouken@6442
  1665
  os2*)
slouken@6442
  1666
    # The test takes a long time on OS/2.
slouken@6442
  1667
    lt_cv_sys_max_cmd_len=8192
slouken@6442
  1668
    ;;
slouken@6442
  1669
slouken@3342
  1670
  osf*)
slouken@3342
  1671
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
slouken@3342
  1672
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
slouken@3342
  1673
    # nice to cause kernel panics so lets avoid the loop below.
slouken@3342
  1674
    # First set a reasonable default.
slouken@3342
  1675
    lt_cv_sys_max_cmd_len=16384
slouken@3342
  1676
    #
slouken@3342
  1677
    if test -x /sbin/sysconfig; then
slouken@3342
  1678
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
slouken@3342
  1679
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
slouken@3342
  1680
      esac
slouken@3342
  1681
    fi
slouken@3342
  1682
    ;;
slouken@3342
  1683
  sco3.2v5*)
slouken@3342
  1684
    lt_cv_sys_max_cmd_len=102400
slouken@3342
  1685
    ;;
slouken@3342
  1686
  sysv5* | sco5v6* | sysv4.2uw2*)
slouken@3342
  1687
    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
slouken@3342
  1688
    if test -n "$kargmax"; then
slouken@3342
  1689
      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
slouken@3342
  1690
    else
slouken@3342
  1691
      lt_cv_sys_max_cmd_len=32768
slouken@3342
  1692
    fi
slouken@3342
  1693
    ;;
slouken@3342
  1694
  *)
slouken@3342
  1695
    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
slouken@3342
  1696
    if test -n "$lt_cv_sys_max_cmd_len"; then
slouken@3342
  1697
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
slouken@3342
  1698
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
slouken@3342
  1699
    else
slouken@3342
  1700
      # Make teststring a little bigger before we do anything with it.
slouken@3342
  1701
      # a 1K string should be a reasonable start.
slouken@3342
  1702
      for i in 1 2 3 4 5 6 7 8 ; do
slouken@3342
  1703
        teststring=$teststring$teststring
slouken@3342
  1704
      done
slouken@3342
  1705
      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
slouken@3342
  1706
      # If test is not a shell built-in, we'll probably end up computing a
slouken@3342
  1707
      # maximum length that is only half of the actual maximum length, but
slouken@3342
  1708
      # we can't tell.
slouken@6442
  1709
      while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
slouken@6442
  1710
	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
slouken@3342
  1711
	      test $i != 17 # 1/2 MB should be enough
slouken@3342
  1712
      do
slouken@3342
  1713
        i=`expr $i + 1`
slouken@3342
  1714
        teststring=$teststring$teststring
slouken@3342
  1715
      done
slouken@3342
  1716
      # Only check the string length outside the loop.
slouken@3342
  1717
      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
slouken@3342
  1718
      teststring=
slouken@3342
  1719
      # Add a significant safety factor because C++ compilers can tack on
slouken@3342
  1720
      # massive amounts of additional arguments before passing them to the
slouken@3342
  1721
      # linker.  It appears as though 1/2 is a usable value.
slouken@3342
  1722
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
slouken@3342
  1723
    fi
slouken@3342
  1724
    ;;
slouken@3342
  1725
  esac
slouken@3342
  1726
])
slouken@3342
  1727
if test -n $lt_cv_sys_max_cmd_len ; then
slouken@3342
  1728
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
slouken@3342
  1729
else
slouken@3342
  1730
  AC_MSG_RESULT(none)
slouken@3342
  1731
fi
slouken@3342
  1732
max_cmd_len=$lt_cv_sys_max_cmd_len
slouken@3342
  1733
_LT_DECL([], [max_cmd_len], [0],
slouken@3342
  1734
    [What is the maximum length of a command?])
slouken@3342
  1735
])# LT_CMD_MAX_LEN
slouken@3342
  1736
slouken@3342
  1737
# Old name:
slouken@3342
  1738
AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
slouken@3342
  1739
dnl aclocal-1.4 backwards compatibility:
slouken@3342
  1740
dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
slouken@3342
  1741
slouken@3342
  1742
slouken@3342
  1743
# _LT_HEADER_DLFCN
slouken@3342
  1744
# ----------------
slouken@3342
  1745
m4_defun([_LT_HEADER_DLFCN],
slouken@3342
  1746
[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
slouken@3342
  1747
])# _LT_HEADER_DLFCN
slouken@3342
  1748
slouken@3342
  1749
slouken@3342
  1750
# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
slouken@3342
  1751
#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
slouken@3342
  1752
# ----------------------------------------------------------------
slouken@3342
  1753
m4_defun([_LT_TRY_DLOPEN_SELF],
slouken@3342
  1754
[m4_require([_LT_HEADER_DLFCN])dnl
slouken@3342
  1755
if test "$cross_compiling" = yes; then :
slouken@3342
  1756
  [$4]
slouken@3342
  1757
else
slouken@3342
  1758
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
slouken@3342
  1759
  lt_status=$lt_dlunknown
slouken@3342
  1760
  cat > conftest.$ac_ext <<_LT_EOF
slouken@6442
  1761
[#line $LINENO "configure"
slouken@3342
  1762
#include "confdefs.h"
slouken@3342
  1763
slouken@3342
  1764
#if HAVE_DLFCN_H
slouken@3342
  1765
#include <dlfcn.h>
slouken@3342
  1766
#endif
slouken@3342
  1767
slouken@3342
  1768
#include <stdio.h>
slouken@3342
  1769
slouken@3342
  1770
#ifdef RTLD_GLOBAL
slouken@3342
  1771
#  define LT_DLGLOBAL		RTLD_GLOBAL
slouken@3342
  1772
#else
slouken@3342
  1773
#  ifdef DL_GLOBAL
slouken@3342
  1774
#    define LT_DLGLOBAL		DL_GLOBAL
slouken@3342
  1775
#  else
slouken@3342
  1776
#    define LT_DLGLOBAL		0
slouken@3342
  1777
#  endif
slouken@3342
  1778
#endif
slouken@3342
  1779
slouken@3342
  1780
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
slouken@3342
  1781
   find out it does not work in some platform. */
slouken@3342
  1782
#ifndef LT_DLLAZY_OR_NOW
slouken@3342
  1783
#  ifdef RTLD_LAZY
slouken@3342
  1784
#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
slouken@3342
  1785
#  else
slouken@3342
  1786
#    ifdef DL_LAZY
slouken@3342
  1787
#      define LT_DLLAZY_OR_NOW		DL_LAZY
slouken@3342
  1788
#    else
slouken@3342
  1789
#      ifdef RTLD_NOW
slouken@3342
  1790
#        define LT_DLLAZY_OR_NOW	RTLD_NOW
slouken@3342
  1791
#      else
slouken@3342
  1792
#        ifdef DL_NOW
slouken@3342
  1793
#          define LT_DLLAZY_OR_NOW	DL_NOW
slouken@3342
  1794
#        else
slouken@3342
  1795
#          define LT_DLLAZY_OR_NOW	0
slouken@3342
  1796
#        endif
slouken@3342
  1797
#      endif
slouken@3342
  1798
#    endif
slouken@3342
  1799
#  endif
slouken@3342
  1800
#endif
slouken@3342
  1801
slouken@6442
  1802
/* When -fvisbility=hidden is used, assume the code has been annotated
slouken@6442
  1803
   correspondingly for the symbols needed.  */
slouken@6442
  1804
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
slouken@6442
  1805
int fnord () __attribute__((visibility("default")));
slouken@6442
  1806
#endif
slouken@6442
  1807
slouken@6442
  1808
int fnord () { return 42; }
slouken@3342
  1809
int main ()
slouken@3342
  1810
{
slouken@3342
  1811
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
slouken@3342
  1812
  int status = $lt_dlunknown;
slouken@3342
  1813
slouken@3342
  1814
  if (self)
slouken@3342
  1815
    {
slouken@3342
  1816
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
slouken@6442
  1817
      else
slouken@6442
  1818
        {
slouken@6442
  1819
	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
slouken@6442
  1820
          else puts (dlerror ());
slouken@6442
  1821
	}
slouken@3342
  1822
      /* dlclose (self); */
slouken@3342
  1823
    }
slouken@3342
  1824
  else
slouken@3342
  1825
    puts (dlerror ());
slouken@3342
  1826
slouken@3342
  1827
  return status;
slouken@3342
  1828
}]
slouken@3342
  1829
_LT_EOF
slouken@3342
  1830
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
slouken@3342
  1831
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
slouken@3342
  1832
    lt_status=$?
slouken@3342
  1833
    case x$lt_status in
slouken@3342
  1834
      x$lt_dlno_uscore) $1 ;;
slouken@3342
  1835
      x$lt_dlneed_uscore) $2 ;;
slouken@3342
  1836
      x$lt_dlunknown|x*) $3 ;;
slouken@3342
  1837
    esac
slouken@3342
  1838
  else :
slouken@3342
  1839
    # compilation failed
slouken@3342
  1840
    $3
slouken@3342
  1841
  fi
slouken@3342
  1842
fi
slouken@3342
  1843
rm -fr conftest*
slouken@3342
  1844
])# _LT_TRY_DLOPEN_SELF
slouken@3342
  1845
slouken@3342
  1846
slouken@3342
  1847
# LT_SYS_DLOPEN_SELF
slouken@3342
  1848
# ------------------
slouken@3342
  1849
AC_DEFUN([LT_SYS_DLOPEN_SELF],
slouken@3342
  1850
[m4_require([_LT_HEADER_DLFCN])dnl
slouken@3342
  1851
if test "x$enable_dlopen" != xyes; then
slouken@3342
  1852
  enable_dlopen=unknown
slouken@3342
  1853
  enable_dlopen_self=unknown
slouken@3342
  1854
  enable_dlopen_self_static=unknown
slouken@3342
  1855
else
slouken@3342
  1856
  lt_cv_dlopen=no
slouken@3342
  1857
  lt_cv_dlopen_libs=
slouken@3342
  1858
slouken@3342
  1859
  case $host_os in
slouken@3342
  1860
  beos*)
slouken@3342
  1861
    lt_cv_dlopen="load_add_on"
slouken@3342
  1862
    lt_cv_dlopen_libs=
slouken@3342
  1863
    lt_cv_dlopen_self=yes
slouken@3342
  1864
    ;;
slouken@3342
  1865
slouken@3342
  1866
  mingw* | pw32* | cegcc*)
slouken@3342
  1867
    lt_cv_dlopen="LoadLibrary"
slouken@3342
  1868
    lt_cv_dlopen_libs=
slouken@3342
  1869
    ;;
slouken@3342
  1870
slouken@3342
  1871
  cygwin*)
slouken@3342
  1872
    lt_cv_dlopen="dlopen"
slouken@3342
  1873
    lt_cv_dlopen_libs=
slouken@3342
  1874
    ;;
slouken@3342
  1875
slouken@3342
  1876
  darwin*)
slouken@3342
  1877
  # if libdl is installed we need to link against it
slouken@3342
  1878
    AC_CHECK_LIB([dl], [dlopen],
slouken@3342
  1879
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
slouken@3342
  1880
    lt_cv_dlopen="dyld"
slouken@3342
  1881
    lt_cv_dlopen_libs=
slouken@3342
  1882
    lt_cv_dlopen_self=yes
slouken@3342
  1883
    ])
slouken@3342
  1884
    ;;
slouken@3342
  1885
slouken@3342
  1886
  *)
slouken@3342
  1887
    AC_CHECK_FUNC([shl_load],
slouken@3342
  1888
	  [lt_cv_dlopen="shl_load"],
slouken@3342
  1889
      [AC_CHECK_LIB([dld], [shl_load],
slouken@3342
  1890
	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
slouken@3342
  1891
	[AC_CHECK_FUNC([dlopen],
slouken@3342
  1892
	      [lt_cv_dlopen="dlopen"],
slouken@3342
  1893
	  [AC_CHECK_LIB([dl], [dlopen],
slouken@3342
  1894
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
slouken@3342
  1895
	    [AC_CHECK_LIB([svld], [dlopen],
slouken@3342
  1896
		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
slouken@3342
  1897
	      [AC_CHECK_LIB([dld], [dld_link],
slouken@3342
  1898
		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
slouken@3342
  1899
	      ])
slouken@3342
  1900
	    ])
slouken@3342
  1901
	  ])
slouken@3342
  1902
	])
slouken@3342
  1903
      ])
slouken@3342
  1904
    ;;
slouken@3342
  1905
  esac
slouken@3342
  1906
slouken@3342
  1907
  if test "x$lt_cv_dlopen" != xno; then
slouken@3342
  1908
    enable_dlopen=yes
slouken@3342
  1909
  else
slouken@3342
  1910
    enable_dlopen=no
slouken@3342
  1911
  fi
slouken@3342
  1912
slouken@3342
  1913
  case $lt_cv_dlopen in
slouken@3342
  1914
  dlopen)
slouken@3342
  1915
    save_CPPFLAGS="$CPPFLAGS"
slouken@3342
  1916
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
slouken@3342
  1917
slouken@3342
  1918
    save_LDFLAGS="$LDFLAGS"
slouken@3342
  1919
    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
slouken@3342
  1920
slouken@3342
  1921
    save_LIBS="$LIBS"
slouken@3342
  1922
    LIBS="$lt_cv_dlopen_libs $LIBS"
slouken@3342
  1923
slouken@3342
  1924
    AC_CACHE_CHECK([whether a program can dlopen itself],
slouken@3342
  1925
	  lt_cv_dlopen_self, [dnl
slouken@3342
  1926
	  _LT_TRY_DLOPEN_SELF(
slouken@3342
  1927
	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
slouken@3342
  1928
	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
slouken@3342
  1929
    ])
slouken@3342
  1930
slouken@3342
  1931
    if test "x$lt_cv_dlopen_self" = xyes; then
slouken@3342
  1932
      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
slouken@3342
  1933
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
slouken@3342
  1934
	  lt_cv_dlopen_self_static, [dnl
slouken@3342
  1935
	  _LT_TRY_DLOPEN_SELF(
slouken@3342
  1936
	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
slouken@3342
  1937
	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
slouken@3342
  1938
      ])
slouken@3342
  1939
    fi
slouken@3342
  1940
slouken@3342
  1941
    CPPFLAGS="$save_CPPFLAGS"
slouken@3342
  1942
    LDFLAGS="$save_LDFLAGS"
slouken@3342
  1943
    LIBS="$save_LIBS"
slouken@3342
  1944
    ;;
slouken@3342
  1945
  esac
slouken@3342
  1946
slouken@3342
  1947
  case $lt_cv_dlopen_self in
slouken@3342
  1948
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
slouken@3342
  1949
  *) enable_dlopen_self=unknown ;;
slouken@3342
  1950
  esac
slouken@3342
  1951
slouken@3342
  1952
  case $lt_cv_dlopen_self_static in
slouken@3342
  1953
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
slouken@3342
  1954
  *) enable_dlopen_self_static=unknown ;;
slouken@3342
  1955
  esac
slouken@3342
  1956
fi
slouken@3342
  1957
_LT_DECL([dlopen_support], [enable_dlopen], [0],
slouken@3342
  1958
	 [Whether dlopen is supported])
slouken@3342
  1959
_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
slouken@3342
  1960
	 [Whether dlopen of programs is supported])
slouken@3342
  1961
_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
slouken@3342
  1962
	 [Whether dlopen of statically linked programs is supported])
slouken@3342
  1963
])# LT_SYS_DLOPEN_SELF
slouken@3342
  1964
slouken@3342
  1965
# Old name:
slouken@3342
  1966
AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
slouken@3342
  1967
dnl aclocal-1.4 backwards compatibility:
slouken@3342
  1968
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
slouken@3342
  1969
slouken@3342
  1970
slouken@3342
  1971
# _LT_COMPILER_C_O([TAGNAME])
slouken@3342
  1972
# ---------------------------
slouken@3342
  1973
# Check to see if options -c and -o are simultaneously supported by compiler.
slouken@3342
  1974
# This macro does not hard code the compiler like AC_PROG_CC_C_O.
slouken@3342
  1975
m4_defun([_LT_COMPILER_C_O],
slouken@3342
  1976
[m4_require([_LT_DECL_SED])dnl
slouken@3342
  1977
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
slouken@3342
  1978
m4_require([_LT_TAG_COMPILER])dnl
slouken@3342
  1979
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
slouken@3342
  1980
  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
slouken@3342
  1981
  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
slouken@3342
  1982
   $RM -r conftest 2>/dev/null
slouken@3342
  1983
   mkdir conftest
slouken@3342
  1984
   cd conftest
slouken@3342
  1985
   mkdir out
slouken@3342
  1986
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
slouken@3342
  1987
slouken@3342
  1988
   lt_compiler_flag="-o out/conftest2.$ac_objext"
slouken@3342
  1989
   # Insert the option either (1) after the last *FLAGS variable, or
slouken@3342
  1990
   # (2) before a word containing "conftest.", or (3) at the end.
slouken@3342
  1991
   # Note that $ac_compile itself does not contain backslashes and begins
slouken@3342
  1992
   # with a dollar sign (not a hyphen), so the echo should work correctly.
slouken@3342
  1993
   lt_compile=`echo "$ac_compile" | $SED \
slouken@3342
  1994
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
slouken@3342
  1995
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
slouken@3342
  1996
   -e 's:$: $lt_compiler_flag:'`
slouken@6442
  1997
   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
slouken@3342
  1998
   (eval "$lt_compile" 2>out/conftest.err)
slouken@3342
  1999
   ac_status=$?
slouken@3342
  2000
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
slouken@6442
  2001
   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
slouken@3342
  2002
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
slouken@3342
  2003
   then
slouken@3342
  2004
     # The compiler can only warn and ignore the option if not recognized
slouken@3342
  2005
     # So say no if there are warnings
slouken@6442
  2006
     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
slouken@3342
  2007
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
slouken@3342
  2008
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
slouken@3342
  2009
       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
slouken@3342
  2010
     fi
slouken@3342
  2011
   fi
slouken@3342
  2012
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
slouken@3342
  2013
   $RM conftest*
slouken@3342
  2014
   # SGI C++ compiler will create directory out/ii_files/ for
slouken@3342
  2015
   # template instantiation
slouken@3342
  2016
   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
slouken@3342
  2017
   $RM out/* && rmdir out
slouken@3342
  2018
   cd ..
slouken@3342
  2019
   $RM -r conftest
slouken@3342
  2020
   $RM conftest*
slouken@3342
  2021
])
slouken@3342
  2022
_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
slouken@3342
  2023
	[Does compiler simultaneously support -c and -o options?])
slouken@3342
  2024
])# _LT_COMPILER_C_O
slouken@3342
  2025
slouken@3342
  2026
slouken@3342
  2027
# _LT_COMPILER_FILE_LOCKS([TAGNAME])
slouken@3342
  2028
# ----------------------------------
slouken@3342
  2029
# Check to see if we can do hard links to lock some files if needed
slouken@3342
  2030
m4_defun([_LT_COMPILER_FILE_LOCKS],
slouken@3342
  2031
[m4_require([_LT_ENABLE_LOCK])dnl
slouken@3342
  2032
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
slouken@3342
  2033
_LT_COMPILER_C_O([$1])
slouken@3342
  2034
slouken@3342
  2035
hard_links="nottested"
slouken@3342
  2036
if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
slouken@3342
  2037
  # do not overwrite the value of need_locks provided by the user
slouken@3342
  2038
  AC_MSG_CHECKING([if we can lock with hard links])
slouken@3342
  2039
  hard_links=yes
slouken@3342
  2040
  $RM conftest*
slouken@3342
  2041
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
slouken@3342
  2042
  touch conftest.a
slouken@3342
  2043
  ln conftest.a conftest.b 2>&5 || hard_links=no
slouken@3342
  2044
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
slouken@3342
  2045
  AC_MSG_RESULT([$hard_links])
slouken@3342
  2046
  if test "$hard_links" = no; then
slouken@3342
  2047
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
slouken@3342
  2048
    need_locks=warn
slouken@3342
  2049
  fi
slouken@3342
  2050
else
slouken@3342
  2051
  need_locks=no
slouken@3342
  2052
fi
slouken@3342
  2053
_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
slouken@3342
  2054
])# _LT_COMPILER_FILE_LOCKS
slouken@3342
  2055
slouken@3342
  2056
slouken@3342
  2057
# _LT_CHECK_OBJDIR
slouken@3342
  2058
# ----------------
slouken@3342
  2059
m4_defun([_LT_CHECK_OBJDIR],
slouken@3342
  2060
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
slouken@3342
  2061
[rm -f .libs 2>/dev/null
slouken@3342
  2062
mkdir .libs 2>/dev/null
slouken@3342
  2063
if test -d .libs; then
slouken@3342
  2064
  lt_cv_objdir=.libs
slouken@3342
  2065
else
slouken@3342
  2066
  # MS-DOS does not allow filenames that begin with a dot.
slouken@3342
  2067
  lt_cv_objdir=_libs
slouken@3342
  2068
fi
slouken@3342
  2069
rmdir .libs 2>/dev/null])
slouken@3342
  2070
objdir=$lt_cv_objdir
slouken@3342
  2071
_LT_DECL([], [objdir], [0],
slouken@3342
  2072
         [The name of the directory that contains temporary libtool files])dnl
slouken@3342
  2073
m4_pattern_allow([LT_OBJDIR])dnl
slouken@3342
  2074
AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
slouken@3342
  2075
  [Define to the sub-directory in which libtool stores uninstalled libraries.])
slouken@3342
  2076
])# _LT_CHECK_OBJDIR
slouken@3342
  2077
slouken@3342
  2078
slouken@3342
  2079
# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
slouken@3342
  2080
# --------------------------------------
slouken@3342
  2081
# Check hardcoding attributes.
slouken@3342
  2082
m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
slouken@3342
  2083
[AC_MSG_CHECKING([how to hardcode library paths into programs])
slouken@3342
  2084
_LT_TAGVAR(hardcode_action, $1)=
slouken@3342
  2085
if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
slouken@3342
  2086
   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
slouken@3342
  2087
   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
slouken@3342
  2088
slouken@3342
  2089
  # We can hardcode non-existent directories.
slouken@3342
  2090
  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
slouken@3342
  2091
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
slouken@3342
  2092
     # have to relink, otherwise we might link with an installed library
slouken@3342
  2093
     # when we should be linking with a yet-to-be-installed one
slouken@3342
  2094
     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
slouken@3342
  2095
     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
slouken@3342
  2096
    # Linking always hardcodes the temporary library directory.
slouken@3342
  2097
    _LT_TAGVAR(hardcode_action, $1)=relink
slouken@3342
  2098
  else
slouken@3342
  2099
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
slouken@3342
  2100
    _LT_TAGVAR(hardcode_action, $1)=immediate
slouken@3342
  2101
  fi
slouken@3342
  2102
else
slouken@3342
  2103
  # We cannot hardcode anything, or else we can only hardcode existing
slouken@3342
  2104
  # directories.
slouken@3342
  2105
  _LT_TAGVAR(hardcode_action, $1)=unsupported
slouken@3342
  2106
fi
slouken@3342
  2107
AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
slouken@3342
  2108
slouken@3342
  2109
if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
slouken@3342
  2110
   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
slouken@3342
  2111
  # Fast installation is not supported
slouken@3342
  2112
  enable_fast_install=no
slouken@3342
  2113
elif test "$shlibpath_overrides_runpath" = yes ||
slouken@3342
  2114
     test "$enable_shared" = no; then
slouken@3342
  2115
  # Fast installation is not necessary
slouken@3342
  2116
  enable_fast_install=needless
slouken@3342
  2117
fi
slouken@3342
  2118
_LT_TAGDECL([], [hardcode_action], [0],
slouken@3342
  2119
    [How to hardcode a shared library path into an executable])
slouken@3342
  2120
])# _LT_LINKER_HARDCODE_LIBPATH
slouken@3342
  2121
slouken@3342
  2122
slouken@3342
  2123
# _LT_CMD_STRIPLIB
slouken@3342
  2124
# ----------------
slouken@3342
  2125
m4_defun([_LT_CMD_STRIPLIB],
slouken@3342
  2126
[m4_require([_LT_DECL_EGREP])
slouken@3342
  2127
striplib=
slouken@3342
  2128
old_striplib=
slouken@3342
  2129
AC_MSG_CHECKING([whether stripping libraries is possible])
slouken@3342
  2130
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
slouken@3342
  2131
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
slouken@3342
  2132
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
slouken@3342
  2133
  AC_MSG_RESULT([yes])
slouken@3342
  2134
else
slouken@3342
  2135
# FIXME - insert some real tests, host_os isn't really good enough
slouken@3342
  2136
  case $host_os in
slouken@3342
  2137
  darwin*)
slouken@3342
  2138
    if test -n "$STRIP" ; then
slouken@3342
  2139
      striplib="$STRIP -x"
slouken@3342
  2140
      old_striplib="$STRIP -S"
slouken@3342
  2141
      AC_MSG_RESULT([yes])
slouken@3342
  2142
    else
slouken@3342
  2143
      AC_MSG_RESULT([no])
slouken@3342
  2144
    fi
slouken@3342
  2145
    ;;
slouken@3342
  2146
  *)
slouken@3342
  2147
    AC_MSG_RESULT([no])
slouken@3342
  2148
    ;;
slouken@3342
  2149
  esac
slouken@3342
  2150
fi
slouken@3342
  2151
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
slouken@3342
  2152
_LT_DECL([], [striplib], [1])
slouken@3342
  2153
])# _LT_CMD_STRIPLIB
slouken@3342
  2154
slouken@3342
  2155
slouken@3342
  2156
# _LT_SYS_DYNAMIC_LINKER([TAG])
slouken@3342
  2157
# -----------------------------
slouken@3342
  2158
# PORTME Fill in your ld.so characteristics
slouken@3342
  2159
m4_defun([_LT_SYS_DYNAMIC_LINKER],
slouken@3342
  2160
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
slouken@3342
  2161
m4_require([_LT_DECL_EGREP])dnl
slouken@3342
  2162
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
slouken@3342
  2163
m4_require([_LT_DECL_OBJDUMP])dnl
slouken@3342
  2164
m4_require([_LT_DECL_SED])dnl
slouken@6442
  2165
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
slouken@3342
  2166
AC_MSG_CHECKING([dynamic linker characteristics])
slouken@3342
  2167
m4_if([$1],
slouken@3342
  2168
	[], [
slouken@3342
  2169
if test "$GCC" = yes; then
slouken@3342
  2170
  case $host_os in
slouken@3342
  2171
    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
slouken@3342
  2172
    *) lt_awk_arg="/^libraries:/" ;;
slouken@3342
  2173
  esac
slouken@6442
  2174
  case $host_os in
slouken@6442
  2175
    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
slouken@6442
  2176
    *) lt_sed_strip_eq="s,=/,/,g" ;;
slouken@6442
  2177
  esac
slouken@6442
  2178
  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
slouken@6442
  2179
  case $lt_search_path_spec in
slouken@6442
  2180
  *\;*)
slouken@3342
  2181
    # if the path contains ";" then we assume it to be the separator
slouken@3342
  2182
    # otherwise default to the standard path separator (i.e. ":") - it is
slouken@3342
  2183
    # assumed that no part of a normal pathname contains ";" but that should
slouken@3342
  2184
    # okay in the real world where ";" in dirpaths is itself problematic.
slouken@6442
  2185
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
slouken@6442
  2186
    ;;
slouken@6442
  2187
  *)
slouken@6442
  2188
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
slouken@6442
  2189
    ;;
slouken@6442
  2190
  esac
slouken@3342
  2191
  # Ok, now we have the path, separated by spaces, we can step through it
icculus@9638
  2192
  # and add multilib dir if necessary...
slouken@3342
  2193
  lt_tmp_lt_search_path_spec=
icculus@9638
  2194
  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
icculus@9638
  2195
  # ...but if some path already ends with the multilib dir we assume
icculus@9638
  2196
  # that all is fine and trust -print-search-dirs as is (GCC 4.2 or newer).
icculus@9638
  2197
  case "$lt_multi_os_dir; $lt_search_path_spec " in
icculus@9638
  2198
  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
icculus@9638
  2199
    lt_multi_os_dir=
icculus@9638
  2200
    ;;
icculus@9638
  2201
  esac
slouken@3342
  2202
  for lt_sys_path in $lt_search_path_spec; do
icculus@9638
  2203
    if test -d "$lt_sys_path$lt_multi_os_dir"; then
icculus@9638
  2204
      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
icculus@9638
  2205
    elif test -n "$lt_multi_os_dir"; then
slouken@3342
  2206
      test -d "$lt_sys_path" && \
slouken@3342
  2207
	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
slouken@3342
  2208
    fi
slouken@3342
  2209
  done
slouken@6442
  2210
  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
slouken@3342
  2211
BEGIN {RS=" "; FS="/|\n";} {
slouken@3342
  2212
  lt_foo="";
slouken@3342
  2213
  lt_count=0;
slouken@3342
  2214
  for (lt_i = NF; lt_i > 0; lt_i--) {
slouken@3342
  2215
    if ($lt_i != "" && $lt_i != ".") {
slouken@3342
  2216
      if ($lt_i == "..") {
slouken@3342
  2217
        lt_count++;
slouken@3342
  2218
      } else {
slouken@3342
  2219
        if (lt_count == 0) {
slouken@3342
  2220
          lt_foo="/" $lt_i lt_foo;
slouken@3342
  2221
        } else {
slouken@3342
  2222
          lt_count--;
slouken@3342
  2223
        }
slouken@3342
  2224
      }
slouken@3342
  2225
    }
slouken@3342
  2226
  }
slouken@3342
  2227
  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
slouken@3342
  2228
  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
slouken@3342
  2229
}'`
slouken@6442
  2230
  # AWK program above erroneously prepends '/' to C:/dos/paths
slouken@6442
  2231
  # for these hosts.
slouken@6442
  2232
  case $host_os in
slouken@6442
  2233
    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
slouken@6442
  2234
      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
slouken@6442
  2235
  esac
slouken@6442
  2236
  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
slouken@3342
  2237
else
slouken@3342
  2238
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
slouken@3342
  2239
fi])
slouken@3342
  2240
library_names_spec=
slouken@3342
  2241
libname_spec='lib$name'
slouken@3342
  2242
soname_spec=
slouken@3342
  2243
shrext_cmds=".so"
slouken@3342
  2244
postinstall_cmds=
slouken@3342
  2245
postuninstall_cmds=
slouken@3342
  2246
finish_cmds=
slouken@3342
  2247
finish_eval=
slouken@3342
  2248
shlibpath_var=
slouken@3342
  2249
shlibpath_overrides_runpath=unknown
slouken@3342
  2250
version_type=none
slouken@3342
  2251
dynamic_linker="$host_os ld.so"
slouken@3342
  2252
sys_lib_dlsearch_path_spec="/lib /usr/lib"
slouken@3342
  2253
need_lib_prefix=unknown
slouken@3342
  2254
hardcode_into_libs=no
slouken@3342
  2255
slouken@3342
  2256
# when you set need_version to no, make sure it does not cause -set_version
slouken@3342
  2257
# flags to be left without arguments
slouken@3342
  2258
need_version=unknown
slouken@3342
  2259
slouken@3342
  2260
case $host_os in
slouken@3342
  2261
aix3*)
slouken@6442
  2262
  version_type=linux # correct to gnu/linux during the next big refactor
slouken@3342
  2263
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
slouken@3342
  2264
  shlibpath_var=LIBPATH
slouken@3342
  2265
slouken@3342
  2266
  # AIX 3 has no versioning support, so we append a major version to the name.
slouken@3342
  2267
  soname_spec='${libname}${release}${shared_ext}$major'
slouken@3342
  2268
  ;;
slouken@3342
  2269
slouken@3342
  2270
aix[[4-9]]*)
slouken@6442
  2271
  version_type=linux # correct to gnu/linux during the next big refactor
slouken@3342
  2272
  need_lib_prefix=no
slouken@3342
  2273
  need_version=no
slouken@3342
  2274
  hardcode_into_libs=yes
slouken@3342
  2275
  if test "$host_cpu" = ia64; then
slouken@3342
  2276
    # AIX 5 supports IA64
slouken@3342
  2277
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
slouken@3342
  2278
    shlibpath_var=LD_LIBRARY_PATH
slouken@3342
  2279
  else
slouken@3342
  2280
    # With GCC up to 2.95.x, collect2 would create an import file
slouken@3342
  2281
    # for dependence libraries.  The import file would start with
slouken@3342
  2282
    # the line `#! .'.  This would cause the generated library to
slouken@3342
  2283
    # depend on `.', always an invalid library.  This was fixed in
slouken@3342
  2284
    # development snapshots of GCC prior to 3.0.
slouken@3342
  2285
    case $host_os in
slouken@3342
  2286
      aix4 | aix4.[[01]] | aix4.[[01]].*)
slouken@3342
  2287
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
slouken@3342
  2288
	   echo ' yes '
slouken@3342
  2289
	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
slouken@3342
  2290
	:
slouken@3342
  2291
      else
slouken@3342
  2292
	can_build_shared=no
slouken@3342
  2293
      fi
slouken@3342
  2294
      ;;
slouken@3342
  2295
    esac
slouken@3342
  2296
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
slouken@3342
  2297
    # soname into executable. Probably we can add versioning support to
slouken@3342
  2298
    # collect2, so additional links can be useful in future.
slouken@3342
  2299
    if test "$aix_use_runtimelinking" = yes; then
slouken@3342
  2300
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
slouken@3342
  2301
      # instead of lib<name>.a to let people know that these are not
slouken@3342
  2302
      # typical AIX shared libraries.
slouken@3342
  2303
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
slouken@3342
  2304
    else
slouken@3342
  2305
      # We preserve .a as extension for shared libraries through AIX4.2
slouken@3342
  2306
      # and later when we are not doing run time linking.
slouken@3342
  2307
      library_names_spec='${libname}${release}.a $libname.a'
slouken@3342
  2308
      soname_spec='${libname}${release}${shared_ext}$major'
slouken@3342
  2309
    fi
slouken@3342
  2310
    shlibpath_var=LIBPATH
slouken@3342
  2311
  fi
slouken@3342
  2312
  ;;
slouken@3342
  2313
slouken@3342
  2314
amigaos*)
slouken@3342
  2315
  case $host_cpu in
slouken@3342
  2316
  powerpc)
slouken@3342
  2317
    # Since July 2007 AmigaOS4 officially supports .so libraries.
slouken@3342
  2318
    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
slouken@3342
  2319
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
slouken@3342
  2320
    ;;
slouken@3342
  2321
  m68k)
slouken@3342
  2322
    library_names_spec='$libname.ixlibrary $libname.a'
slouken@3342
  2323
    # Create ${libname}_ixlibrary.a entries in /sys/libs.
slouken@6442
  2324
    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
slouken@3342
  2325
    ;;
slouken@3342
  2326
  esac
slouken@3342
  2327
  ;;
slouken@3342
  2328
slouken@3342
  2329
beos*)
slouken@3342
  2330
  library_names_spec='${libname}${shared_ext}'
slouken@3342
  2331
  dynamic_linker="$host_os ld.so"
slouken@3342
  2332
  shlibpath_var=LIBRARY_PATH
slouken@3342
  2333
  ;;
slouken@3342
  2334
slouken@3342
  2335
bsdi[[45]]*)
slouken@6442
  2336
  version_type=linux # correct to gnu/linux during the next big refactor
slouken@3342
  2337
  need_version=no
slouken@3342
  2338
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
slouken@3342
  2339
  soname_spec='${libname}${release}${shared_ext}$major'
slouken@3342
  2340
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
slouken@3342
  2341
  shlibpath_var=LD_LIBRARY_PATH
slouken@3342
  2342
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
slouken@3342
  2343
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
slouken@3342
  2344
  # the default ld.so.conf also contains /usr/contrib/lib and
slouken@3342
  2345
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
slouken@3342
  2346
  # libtool to hard-code these into programs
slouken@3342
  2347
  ;;
slouken@3342
  2348
slouken@3342
  2349
cygwin* | mingw* | pw32* | cegcc*)
slouken@3342
  2350
  version_type=windows
slouken@3342
  2351
  shrext_cmds=".dll"
slouken@3342
  2352
  need_version=no
slouken@3342
  2353
  need_lib_prefix=no
slouken@3342
  2354
slouken@6442
  2355
  case $GCC,$cc_basename in
slouken@6442
  2356
  yes,*)
slouken@6442
  2357
    # gcc
slouken@3342
  2358
    library_names_spec='$libname.dll.a'
slouken@3342
  2359
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
slouken@3342
  2360
    postinstall_cmds='base_file=`basename \${file}`~
slouken@3342
  2361
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
slouken@3342
  2362
      dldir=$destdir/`dirname \$dlpath`~
slouken@3342
  2363
      test -d \$dldir || mkdir -p \$dldir~
slouken@3342
  2364
      $install_prog $dir/$dlname \$dldir/$dlname~
slouken@3342
  2365
      chmod a+x \$dldir/$dlname~
slouken@3342
  2366
      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
slouken@3342
  2367
        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
slouken@3342
  2368
      fi'
slouken@3342
  2369
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
slouken@3342
  2370
      dlpath=$dir/\$dldll~
slouken@3342
  2371
       $RM \$dlpath'
slouken@3342
  2372
    shlibpath_overrides_runpath=yes
slouken@3342
  2373
slouken@3342
  2374
    case $host_os in
slouken@3342
  2375
    cygwin*)
slouken@3342
  2376
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
slouken@6593
  2377
      #soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
slouken@6593
  2378
      soname_spec='`echo ${libname} | sed -e 's/^lib//'`${shared_ext}'
slouken@6442
  2379
m4_if([$1], [],[
slouken@6442
  2380
      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
slouken@3342
  2381
      ;;
slouken@3342
  2382
    mingw* | cegcc*)
slouken@3342
  2383
      # MinGW DLLs use traditional 'lib' prefix
slouken@6593
  2384
      #soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
slouken@6593
  2385
      soname_spec='`echo ${libname} | $SED -e 's/^lib//'`${shared_ext}'
slouken@3342
  2386
      ;;
slouken@3342
  2387
    pw32*)
slouken@3342
  2388
      # pw32 DLLs use 'pw' prefix rather than 'lib'
slouken@3342
  2389
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
slouken@3342
  2390
      ;;
slouken@3342
  2391
    esac
slouken@6442
  2392
    dynamic_linker='Win32 ld.exe'
slouken@6442
  2393
    ;;
slouken@6442
  2394
slouken@6442
  2395
  *,cl*)
slouken@6442
  2396
    # Native MSVC
slouken@6442
  2397
    libname_spec='$name'
slouken@6442
  2398
    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
slouken@6442
  2399
    library_names_spec='${libname}.dll.lib'
slouken@6442
  2400
slouken@6442
  2401
    case $build_os in
slouken@6442
  2402
    mingw*)
slouken@6442
  2403
      sys_lib_search_path_spec=
slouken@6442
  2404
      lt_save_ifs=$IFS
slouken@6442
  2405
      IFS=';'
slouken@6442
  2406
      for lt_path in $LIB
slouken@6442
  2407
      do
slouken@6442
  2408
        IFS=$lt_save_ifs
slouken@6442
  2409
        # Let DOS variable expansion print the short 8.3 style file name.
slouken@6442
  2410
        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
slouken@6442
  2411
        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
slouken@6442
  2412
      done
slouken@6442
  2413
      IFS=$lt_save_ifs
slouken@6442
  2414
      # Convert to MSYS style.
slouken@6442
  2415
      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
slouken@6442
  2416
      ;;
slouken@6442
  2417
    cygwin*)
slouken@6442
  2418
      # Convert to unix form, then to dos form, then back to unix form
slouken@6442
  2419
      # but this time dos style (no spaces!) so that the unix form looks
slouken@6442
  2420
      # like /cygdrive/c/PROGRA~1:/cygdr...
slouken@6442
  2421
      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
slouken@6442
  2422
      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
slouken@6442
  2423
      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
slouken@6442
  2424
      ;;
slouken@6442
  2425
    *)
slouken@6442
  2426
      sys_lib_search_path_spec="$LIB"
slouken@6442
  2427
      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
slouken@6442
  2428
        # It is most probably a Windows format PATH.
slouken@6442
  2429
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
slouken@6442
  2430
      else
slouken@6442
  2431
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
slouken@6442
  2432
      fi
slouken@6442
  2433
      # FIXME: find the short name or the path components, as spaces are
slouken@6442
  2434
      # common. (e.g. "Program Files" -> "PROGRA~1")
slouken@6442
  2435
      ;;
slouken@6442
  2436
    esac
slouken@6442
  2437
slouken@6442
  2438
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
slouken@6442
  2439
    postinstall_cmds='base_file=`basename \${file}`~
slouken@6442
  2440
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
slouken@6442
  2441
      dldir=$destdir/`dirname \$dlpath`~
slouken@6442
  2442
      test -d \$dldir || mkdir -p \$dldir~
slouken@6442
  2443
      $install_prog $dir/$dlname \$dldir/$dlname'
slouken@6442
  2444
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
slouken@6442
  2445
      dlpath=$dir/\$dldll~
slouken@6442
  2446
       $RM \$dlpath'
slouken@6442
  2447
    shlibpath_overrides_runpath=yes
slouken@6442
  2448
    dynamic_linker='Win32 link.exe'
slouken@3342
  2449
    ;;
slouken@3342
  2450
slouken@3342
  2451
  *)
slouken@6442
  2452
    # Assume MSVC wrapper
slouken@3342
  2453
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
slouken@6442
  2454
    dynamic_linker='Win32 ld.exe'
slouken@3342
  2455
    ;;
slouken@3342
  2456
  esac
slouken@3342
  2457
  # FIXME: first we should search . and the directory the executable is in
slouken@3342
  2458
  shlibpath_var=PATH
slouken@3342
  2459
  ;;
slouken@3342
  2460
slouken@3342
  2461
darwin* | rhapsody*)
slouken@3342
  2462
  dynamic_linker="$host_os dyld"
slouken@3342
  2463
  version_type=darwin
slouken@3342
  2464
  need_lib_prefix=no
slouken@3342
  2465
  need_version=no
slouken@3342
  2466
  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
slouken@3342
  2467
  soname_spec='${libname}${release}${major}$shared_ext'
slouken@3342
  2468
  shlibpath_overrides_runpath=yes
slouken@3342
  2469
  shlibpath_var=DYLD_LIBRARY_PATH
slouken@3342
  2470
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
slouken@3342
  2471
m4_if([$1], [],[
slouken@3342
  2472
  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
slouken@3342
  2473
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
slouken@3342
  2474
  ;;
slouken@3342
  2475
slouken@3342
  2476
dgux*)
slouken@6442
  2477
  version_type=linux # correct to gnu/linux during the next big refactor
slouken@3342
  2478
  need_lib_prefix=no
slouken@3342
  2479
  need_version=no
slouken@3342
  2480
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
slouken@3342
  2481
  soname_spec='${libname}${release}${shared_ext}$major'
slouken@3342
  2482
  shlibpath_var=LD_LIBRARY_PATH
slouken@3342
  2483
  ;;
slouken@3342
  2484
slouken@3342
  2485
freebsd* | dragonfly*)
slouken@3342
  2486
  # DragonFly does not have aout.  When/if they implement a new
slouken@3342
  2487
  # versioning mechanism, adjust this.
slouken@3342
  2488
  if test -x /usr/bin/objformat; then
slouken@3342
  2489
    objformat=`/usr/bin/objformat`
slouken@3342
  2490
  else
slouken@3342
  2491
    case $host_os in
slouken@6442
  2492
    freebsd[[23]].*) objformat=aout ;;
slouken@3342
  2493
    *) objformat=elf ;;
slouken@3342
  2494
    esac
slouken@3342
  2495
  fi
slouken@3342
  2496
  version_type=freebsd-$objformat
slouken@3342
  2497
  case $version_type in
slouken@3342
  2498
    freebsd-elf*)
slouken@3342
  2499
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
slouken@3342
  2500
      need_version=no
slouken@3342
  2501
      need_lib_prefix=no
slouken@3342
  2502
      ;;
slouken@3342
  2503
    freebsd-*)
slouken@3342
  2504
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
slouken@3342
  2505
      need_version=yes
slouken@3342
  2506
      ;;
slouken@3342
  2507
  esac
slouken@3342
  2508
  shlibpath_var=LD_LIBRARY_PATH
slouken@3342
  2509
  case $host_os in
slouken@6442
  2510
  freebsd2.*)
slouken@3342
  2511
    shlibpath_overrides_runpath=yes
slouken@3342
  2512
    ;;
slouken@3342
  2513
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
slouken@3342
  2514
    shlibpath_overrides_runpath=yes
slouken@3342
  2515
    hardcode_into_libs=yes
slouken@3342
  2516
    ;;
slouken@3342
  2517
  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
slouken@3342
  2518
  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
slouken@3342
  2519
    shlibpath_overrides_runpath=no
slouken@3342
  2520
    hardcode_into_libs=yes
slouken@3342
  2521
    ;;
slouken@3342
  2522
  *) # from 4.6 on, and DragonFly
slouken@3342
  2523
    shlibpath_overrides_runpath=yes
slouken@3342
  2524
    hardcode_into_libs=yes
slouken@3342
  2525
    ;;
slouken@3342
  2526
  esac
slouken@3342
  2527
  ;;
slouken@3342
  2528
slouken@3342
  2529
gnu*)
slouken@6442
  2530
  version_type=linux # correct to gnu/linux during the next big refactor
slouken@3342
  2531
  need_lib_prefix=no
slouken@3342
  2532
  need_version=no
slouken@3342
  2533
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
slouken@3342
  2534
  soname_spec='${libname}${release}${shared_ext}$major'
slouken@3342
  2535
  shlibpath_var=LD_LIBRARY_PATH
slouken@6442
  2536
  shlibpath_overrides_runpath=no
slouken@6442
  2537
  hardcode_into_libs=yes
slouken@6442
  2538
  ;;
slouken@6442
  2539
slouken@6442
  2540
haiku*)
slouken@6442
  2541
  version_type=linux # correct to gnu/linux during the next big refactor
slouken@6442
  2542
  need_lib_prefix=no
slouken@6442
  2543
  need_version=no
slouken@6442
  2544
  dynamic_linker="$host_os runtime_loader"
slouken@6442
  2545
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
slouken@6442
  2546
  soname_spec='${libname}${release}${shared_ext}$major'
slouken@6442
  2547
  shlibpath_var=LIBRARY_PATH
slouken@6442
  2548
  shlibpath_overrides_runpath=yes
slouken@6442
  2549
  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
slouken@3342
  2550
  hardcode_into_libs=yes
slouken@3342
  2551
  ;;
slouken@3342
  2552
slouken@3342
  2553
hpux9* | hpux10* | hpux11*)
slouken@3342
  2554
  # Give a soname corresponding to the major version so that dld.sl refuses to
slouken@3342
  2555
  # link against other versions.
slouken@3342
  2556
  version_type=sunos
slouken@3342
  2557
  need_lib_prefix=no
slouken@3342
  2558
  need_version=no
slouken@3342
  2559
  case $host_cpu in
slouken@3342
  2560
  ia64*)
slouken@3342
  2561
    shrext_cmds='.so'
slouken@3342
  2562
    hardcode_into_libs=yes
slouken@3342
  2563
    dynamic_linker="$host_os dld.so"
slouken@3342
  2564
    shlibpath_var=LD_LIBRARY_PATH
slouken@3342