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