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