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