~ubuntu-branches/ubuntu/breezy/quagga/breezy-security

« back to all changes in this revision

Viewing changes to m4/libtool.m4

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Mueller
  • Date: 2005-05-20 13:16:12 UTC
  • Revision ID: james.westby@ubuntu.com-20050520131612-pr6paalox60o3x3n
Tags: upstream-0.99.1
ImportĀ upstreamĀ versionĀ 0.99.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 
2
 
 
3
m4_define([_LT_COPYING], [dnl
 
4
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
 
5
# Free Software Foundation, Inc.
 
6
#
 
7
# This file is part of GNU Libtool:
 
8
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 
9
#
 
10
# This program is free software; you can redistribute it and/or modify
 
11
# it under the terms of the GNU General Public License as published by
 
12
# the Free Software Foundation; either version 2 of the License, or
 
13
# (at your option) any later version.
 
14
#
 
15
# This program is distributed in the hope that it will be useful, but
 
16
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
17
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
18
# General Public License for more details.
 
19
#
 
20
# You should have received a copy of the GNU General Public License
 
21
# along with this program; if not, write to the Free Software
 
22
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
23
#
 
24
# As a special exception to the GNU General Public License, if you
 
25
# distribute this file as part of a program that contains a
 
26
# configuration script generated by Autoconf, you may include it under
 
27
# the same distribution terms that you use for the rest of that program.
 
28
])
 
29
 
 
30
# serial 49 LT_INIT
 
31
 
 
32
 
 
33
# LT_PREREQ(VERSION)
 
34
# ------------------
 
35
# Complain and exit if this libtool version is less that VERSION.
 
36
m4_define([LT_PREREQ],
 
37
[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
 
38
       [m4_default([$3],
 
39
                   [m4_fatal([Libtool version $1 or higher is required],
 
40
                             63)])],
 
41
       [$2])])
 
42
 
 
43
 
 
44
# LT_INIT([OPTIONS])
 
45
# --------------------------
 
46
AC_DEFUN([LT_INIT],
 
47
[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
 
48
dnl Autoconf doesn't catch unexpanded LT_ macros by default:
 
49
m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
 
50
m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW)$])dnl
 
51
dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
 
52
dnl unless we require an AC_DEFUNed macro:
 
53
AC_REQUIRE([LTOPTIONS_VERSION])dnl
 
54
AC_REQUIRE([LTSUGAR_VERSION])dnl
 
55
AC_REQUIRE([LTVERSION_VERSION])dnl
 
56
AC_REQUIRE([_LT_PROG_LTMAIN])dnl
 
57
AC_BEFORE([$0], [LT_LANG])dnl
 
58
 
 
59
# This can be used to rebuild libtool when needed
 
60
LIBTOOL_DEPS="$ltmain"
 
61
 
 
62
# Always use our own libtool.
 
63
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
64
AC_SUBST(LIBTOOL)dnl
 
65
 
 
66
# Set options
 
67
_LT_SET_OPTIONS([$1])dnl
 
68
 
 
69
_LT_SETUP
 
70
 
 
71
# Only expand once:
 
72
m4_define([LT_INIT])
 
73
])# _LT_INIT
 
74
 
 
75
# Old names:
 
76
AU_DEFUN([AC_PROG_LIBTOOL],         [LT_INIT])
 
77
AU_DEFUN([AM_PROG_LIBTOOL],         [LT_INIT])
 
78
 
 
79
 
 
80
# _LT_SETUP
 
81
# ---------
 
82
m4_define([_LT_SETUP],
 
83
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
84
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
85
_LT_DECL([], [host_alias], [0], [The host system])dnl
 
86
_LT_DECL([], [host], [0])dnl
 
87
dnl
 
88
AC_REQUIRE([AC_PROG_CC])dnl
 
89
AC_REQUIRE([AC_PROG_LD])dnl
 
90
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
 
91
AC_REQUIRE([AC_PROG_NM])dnl
 
92
dnl
 
93
AC_REQUIRE([AC_PROG_LN_S])dnl
 
94
test -z "$LN_S" && LN_S="ln -s"
 
95
_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
 
96
dnl
 
97
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
 
98
AC_REQUIRE([AC_LIBTOOL_SYS_OLD_ARCHIVE])dnl
 
99
AC_REQUIRE([AC_LIBTOOL_SYS_MAX_CMD_LEN])dnl
 
100
AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
 
101
AC_REQUIRE([AC_OBJEXT])dnl
 
102
_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
 
103
AC_REQUIRE([AC_EXEEXT])dnl
 
104
_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
 
105
dnl
 
106
 
 
107
_LT_CONFIG_LIBTOOL_INIT([
 
108
# See if we are running on zsh, and set the options which allow our
 
109
# commands through without removal of \ escapes INIT.
 
110
if test -n "\${ZSH_VERSION+set}" ; then
 
111
   setopt NO_GLOB_SUBST
 
112
fi
 
113
])
 
114
if test -n "${ZSH_VERSION+set}" ; then
 
115
   setopt NO_GLOB_SUBST
 
116
fi
 
117
 
 
118
AC_LIBTOOL_OBJDIR
 
119
 
 
120
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
121
_LT_AC_PROG_ECHO_BACKSLASH
 
122
 
 
123
case $host_os in
 
124
aix3*)
 
125
  # AIX sometimes has problems with the GCC collect2 program.  For some
 
126
  # reason, if we set the COLLECT_NAMES environment variable, the problems
 
127
  # vanish in a puff of smoke.
 
128
  if test "X${COLLECT_NAMES+set}" != Xset; then
 
129
    COLLECT_NAMES=
 
130
    export COLLECT_NAMES
 
131
  fi
 
132
  ;;
 
133
esac
 
134
 
 
135
# Sed substitution that helps us do robust quoting.  It backslashifies
 
136
# metacharacters that are still active within double-quoted strings.
 
137
Xsed='sed -e s/^X//'
 
138
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
 
139
 
 
140
# Same as above, but do not quote variable references.
 
141
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
 
142
 
 
143
# Sed substitution to delay expansion of an escaped shell variable in a
 
144
# double_quote_subst'ed string.
 
145
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
 
146
 
 
147
# Sed substitution to delay expansion of an escaped single quote.
 
148
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
 
149
 
 
150
# Sed substitution to avoid accidental globbing in evaled expressions
 
151
no_glob_subst='s/\*/\\\*/g'
 
152
 
 
153
# Constants:
 
154
rm="rm -f"
 
155
 
 
156
# Global variables:
 
157
default_ofile=libtool
 
158
ofile="$default_ofile"
 
159
can_build_shared=yes
 
160
 
 
161
# All known linkers require a `.a' archive for static linking (except M$VC,
 
162
# which needs '.lib').
 
163
libext=a
 
164
 
 
165
with_gnu_ld="$lt_cv_prog_gnu_ld"
 
166
 
 
167
old_CC="$CC"
 
168
old_CFLAGS="$CFLAGS"
 
169
 
 
170
# Set sane defaults for various variables
 
171
test -z "$CC" && CC=cc
 
172
test -z "$LTCC" && LTCC=$CC
 
173
test -z "$LD" && LD=ld
 
174
test -z "$ac_objext" && ac_objext=o
 
175
 
 
176
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
 
177
 
 
178
# Only perform the check for file, if the check method requires it
 
179
test -z "$MAGIC_CMD" && MAGIC_CMD=file
 
180
case $deplibs_check_method in
 
181
file_magic*)
 
182
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
 
183
    AC_PATH_MAGIC
 
184
  fi
 
185
  ;;
 
186
esac
 
187
 
 
188
AC_ARG_ENABLE([libtool-lock],
 
189
    [AC_HELP_STRING([--disable-libtool-lock],
 
190
        [avoid locking (might break parallel builds)])])
 
191
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
192
 
 
193
# Use C for the default configuration in the libtool script
 
194
LT_SUPPORTED_TAG([CC])
 
195
_LT_LANG_C_CONFIG
 
196
_LT_LANG_DEFAULT_CONFIG
 
197
_LT_CONFIG_COMMANDS
 
198
])# _LT_SETUP
 
199
 
 
200
 
 
201
# _LT_PROG_LTMAIN
 
202
# ---------------
 
203
# In libtool itself `ltmain.sh' is in the build tree, but everything else
 
204
# ships it in the source tree, for completeness, if we find a copy in the
 
205
# build tree use that before falling back to auxdir.
 
206
#
 
207
# Note that this code is called both from `configure', and `config.status'
 
208
# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
 
209
# `config.status' has no value for ac_aux_dir unless we are using Automake,
 
210
# so we pass a copy along to make sure it has a sensible value anyway.
 
211
AC_DEFUN([_LT_PROG_LTMAIN],
 
212
[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
 
213
_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
 
214
case $ac_aux_dir in
 
215
  $srcdir)   ltmain=./ltmain.sh ;;
 
216
  $srcdir/*) ltmain=`expr "$ac_aux_dir" : "$srcdir/\(.*\)"`/ltmain.sh ;;
 
217
esac
 
218
test -f "$ltmain" || ltmain="$ac_aux_dir/ltmain.sh"
 
219
])# _LT_PROG_LTMAIN
 
220
 
 
221
 
 
222
 
 
223
## ------------------------------------- ##
 
224
## Accumulate code for creating libtool. ##
 
225
## ------------------------------------- ##
 
226
 
 
227
# So that we can recreate a full libtool script including additional
 
228
# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
 
229
# in macros and then make a single call at the end using the `libtool'
 
230
# label.
 
231
 
 
232
# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
 
233
# ----------------------------------------
 
234
# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
 
235
m4_define([_LT_CONFIG_LIBTOOL_INIT],
 
236
[m4_ifval([$1],
 
237
          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
 
238
                     [$1
 
239
])])])
 
240
 
 
241
# Initialize.
 
242
m4_define([_LT_OUTPUT_LIBTOOL_INIT])
 
243
 
 
244
# _LT_CONFIG_LIBTOOL([COMMANDS])
 
245
# ------------------------------
 
246
# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
 
247
m4_define([_LT_CONFIG_LIBTOOL],
 
248
[m4_ifval([$1],
 
249
          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
 
250
                     [$1
 
251
])])])
 
252
 
 
253
# Initialize.
 
254
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
 
255
 
 
256
 
 
257
# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
 
258
# ---------------------------------------------------
 
259
m4_define([_LT_CONFIG_SAVE_COMMANDS],
 
260
[_LT_CONFIG_LIBTOOL([$1])
 
261
_LT_CONFIG_LIBTOOL_INIT([$2])
 
262
])
 
263
 
 
264
 
 
265
# _LT_FORMAT_COMMENT([COMMENT])
 
266
# -----------------------------
 
267
# Add leading comment marks to the start of each line, and a trailing
 
268
# full-stop to the whole comment if one is not present already.
 
269
m4_define([_LT_FORMAT_COMMENT],
 
270
[m4_ifval([$1], [
 
271
m4_bpatsubst([$1], [^ *], [# ])]m4_bmatch([$1], [[!?.]$], [], [.])
 
272
)])
 
273
 
 
274
 
 
275
 
 
276
## ------------------------ ##
 
277
## FIXME: Eliminate VARNAME ##
 
278
## ------------------------ ##
 
279
 
 
280
# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
 
281
# -------------------------------------------------------------------
 
282
# CONFIGNAME is the name given to the value in the libtool script.
 
283
# VARNAME is the (base) name used in the configure script.
 
284
# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
 
285
# VARNAME.  Any other value will be used directly.
 
286
m4_define([_LT_DECL],
 
287
[lt_if_append_uniq([lt_decl_varnames], [$2], [[, ]],
 
288
    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
 
289
        [m4_ifval([$1], [$1], [$2])])
 
290
    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
 
291
    m4_ifval([$4],
 
292
        [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
 
293
    lt_dict_add_subkey([lt_decl_dict], [$2],
 
294
        [tagged?], [m4_ifval([$5], [yes], [no])])])
 
295
])
 
296
 
 
297
 
 
298
# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
 
299
# --------------------------------------------------------
 
300
m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
 
301
 
 
302
 
 
303
# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
 
304
# -------------------------------------------------
 
305
m4_define([lt_decl_tag_varnames],
 
306
[_lt_decl_filter([tagged?], [yes], $@)])
 
307
m4_define([_lt_decl_filter],
 
308
[m4_case([$#],
 
309
  [0], [m4_fatal([$0: too few arguments: $#])],
 
310
  [1], [m4_fatal([$0: too few arguments: $#: $1])],
 
311
  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
 
312
  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
 
313
  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
 
314
])
 
315
 
 
316
 
 
317
# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
 
318
# ---------------------------------------------------
 
319
m4_define([lt_decl_quote_varnames],
 
320
[_lt_decl_filter([value], [1], $@)])
 
321
 
 
322
# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
 
323
# ----------------------------------------------------
 
324
m4_define([lt_decl_dquote_varnames],
 
325
[_lt_decl_filter([value], [2], $@)])
 
326
 
 
327
 
 
328
# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
 
329
# ----------------------------------------------------
 
330
m4_define([lt_decl_varnames_tagged],
 
331
[_$0(m4_quote(m4_default([$1], [[, ]])),
 
332
     m4_quote(m4_if([$2], [],
 
333
                     m4_quote(lt_decl_tag_varnames),
 
334
                  m4_quote(m4_shift($@)))),
 
335
     m4_split(m4_normalize(m4_quote(_LT_TAGS))))])
 
336
m4_define([_lt_decl_varnames_tagged], [lt_combine([$1], [$2], [_], $3)])
 
337
 
 
338
 
 
339
# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
 
340
# ------------------------------------------------
 
341
m4_define([lt_decl_all_varnames],
 
342
[_$0(m4_quote(m4_default([$1], [[, ]])),
 
343
     m4_if([$2], [],
 
344
           m4_quote(lt_decl_varnames),
 
345
        m4_quote(m4_shift($@))))[]dnl
 
346
])
 
347
m4_define([_lt_decl_all_varnames],
 
348
[lt_join($@, lt_decl_varnames_tagged([$1],
 
349
                        lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
 
350
])
 
351
 
 
352
 
 
353
# _LT_CONFIG_STATUS_DECLARE([VARNAME])
 
354
# ------------------------------------
 
355
# Quote a variable value, and forward it to `config.status' so that its
 
356
# declaration there will have the same value as in `configure'.  VARNAME
 
357
# must have a single quote delimited value for this to work.
 
358
m4_define([_LT_CONFIG_STATUS_DECLARE],
 
359
[$1='`$echo "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
 
360
 
 
361
 
 
362
# _LT_CONFIG_STATUS_DECLARATIONS
 
363
# ------------------------------
 
364
# We delimit libtool config variables with single quotes, so when
 
365
# we write them to config.status, we have to be sure to quote all
 
366
# embedded single quotes properly.  In configure, this macro expands
 
367
# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
 
368
#
 
369
#    <var>='`$echo "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
 
370
m4_define([_LT_CONFIG_STATUS_DECLARATIONS],
 
371
[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
 
372
    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
 
373
 
 
374
 
 
375
# _LT_LIBTOOL_TAGS
 
376
# ----------------
 
377
# Output comment and list of tags supported by the script
 
378
m4_define([_LT_LIBTOOL_TAGS],
 
379
[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
 
380
available_tags="[]_LT_TAGS[]"dnl
 
381
])
 
382
 
 
383
# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
 
384
# -----------------------------------
 
385
# Extract the dictionary values for VARNAME (optionally with TAG) and
 
386
# expand to a commented shell variable setting:
 
387
#
 
388
#    # Some comment about what VAR is for.
 
389
#    visible_name=$lt_internal_name
 
390
m4_define([_LT_LIBTOOL_DECLARE],
 
391
[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
 
392
                                           [description])))[]dnl
 
393
m4_pushdef([_libtool_name],
 
394
    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
 
395
m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
 
396
    [0], [_libtool_name=[$]$1],
 
397
    [1], [_libtool_name=$lt_[]$1],
 
398
    [2], [_libtool_name=$lt_[]$1],
 
399
    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
 
400
m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
 
401
])
 
402
 
 
403
# _LT_LIBTOOL_CONFIG_VARS
 
404
# -----------------------
 
405
# Produce commented declarations of non-tagged libtool config variables
 
406
# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
 
407
# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
 
408
# section) are produced by _LT_LIBTOOL_TAG_VARS.
 
409
m4_define([_LT_LIBTOOL_CONFIG_VARS],
 
410
[m4_foreach([_lt_var],
 
411
    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
 
412
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
 
413
 
 
414
# _LT_LIBTOOL_TAG_VARS(TAG)
 
415
# -------------------------
 
416
m4_define([_LT_LIBTOOL_TAG_VARS],
 
417
[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
 
418
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
 
419
 
 
420
 
 
421
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
 
422
# ---------------------------------
 
423
m4_define([_LT_AC_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
 
424
 
 
425
 
 
426
# _LT_CONFIG_COMMANDS
 
427
# -------------------
 
428
# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
 
429
# variables for single and double quote escaping we saved from calls
 
430
# to _LT_DECL, we can put quote escaped variables declarations
 
431
# into `config.status', and then the shell code to quote escape them in
 
432
# for loops in `config.status'.  Finally, any additional code accumulated
 
433
# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
 
434
m4_define([_LT_CONFIG_COMMANDS],
 
435
[AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [
 
436
 
 
437
# The HP-UX ksh and POSIX shell print the target directory to stdout
 
438
# if CDPATH is set.
 
439
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
440
 
 
441
sed_quote_subst='$sed_quote_subst'
 
442
double_quote_subst='$double_quote_subst'
 
443
delay_variable_subst='$delay_variable_subst'
 
444
_LT_CONFIG_STATUS_DECLARATIONS
 
445
LTCC='$LTCC'
 
446
compiler='$compiler_DEFAULT'
 
447
 
 
448
# Quote evaled strings.
 
449
for var in lt_decl_all_varnames([[ ]], lt_decl_quote_varnames); do
 
450
    eval "lt_\$var=\\\\\\"\\\`\\\$echo \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
 
451
done
 
452
 
 
453
# Double-quote double-evaled strings.
 
454
for var in lt_decl_all_varnames([[ ]], lt_decl_dquote_varnames); do
 
455
    eval "lt_\$var=\\\\\\"\\\`\\\$echo \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
 
456
done
 
457
 
 
458
# Fix-up fallback echo if it was mangled by the above quoting rules.
 
459
case \$lt_echo in
 
460
*'\\\[$]0 --fallback-echo"')dnl "
 
461
  lt_echo=\`\$echo "X\$lt_echo" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
 
462
  ;;
 
463
esac
 
464
 
 
465
_LT_OUTPUT_LIBTOOL_INIT
 
466
])
 
467
])#_LT_CONFIG_COMMANDS
 
468
 
 
469
 
 
470
# _LT_CONFIG(TAG)
 
471
# ----------------------------
 
472
# If TAG is the built-in tag, create an initial libtool script with a
 
473
# default configuration from the untagged config vars.  Otherwise add code
 
474
# to config.status for appending the configuration named by TAG from the
 
475
# matching tagged config vars.
 
476
m4_define([_LT_CONFIG],
 
477
[_LT_CONFIG_SAVE_COMMANDS([
 
478
  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
 
479
  m4_if(_LT_TAG, [C], [
 
480
    # See if we are running on zsh, and set the options which allow our
 
481
    # commands through without removal of \ escapes.
 
482
    if test -n "${ZSH_VERSION+set}" ; then
 
483
      setopt NO_GLOB_SUBST
 
484
    fi
 
485
 
 
486
    cfgfile="${ofile}T"
 
487
    trap "$rm \"$cfgfile\"; exit 1" 1 2 15
 
488
    $rm -f "$cfgfile"
 
489
 
 
490
    cat <<_LT_EOF >> "$cfgfile"
 
491
#! $SHELL
 
492
 
 
493
# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
 
494
# Generated automatically by config.status (GNU $PACKAGE$TIMESTAMP) $VERSION
 
495
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 
496
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
 
497
#
 
498
_LT_COPYING
 
499
 
 
500
_LT_LIBTOOL_TAGS
 
501
 
 
502
# ### BEGIN LIBTOOL CONFIG
 
503
_LT_LIBTOOL_CONFIG_VARS
 
504
_LT_LIBTOOL_TAG_VARS
 
505
# ### END LIBTOOL CONFIG
 
506
 
 
507
# The HP-UX ksh and POSIX shell print the target directory to stdout
 
508
# if CDPATH is set.
 
509
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
510
 
 
511
_LT_EOF
 
512
 
 
513
  case $host_os in
 
514
  aix3*)
 
515
    cat <<\_LT_EOF >> "$cfgfile"
 
516
# AIX sometimes has problems with the GCC collect2 program.  For some
 
517
# reason, if we set the COLLECT_NAMES environment variable, the problems
 
518
# vanish in a puff of smoke.
 
519
if test "X${COLLECT_NAMES+set}" != Xset; then
 
520
  COLLECT_NAMES=
 
521
  export COLLECT_NAMES
 
522
fi
 
523
_LT_EOF
 
524
    ;;
 
525
  esac
 
526
 
 
527
  _LT_PROG_LTMAIN
 
528
 
 
529
  # We use sed instead of cat because bash on DJGPP gets confused if
 
530
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
 
531
  # text mode, it properly converts lines to CR/LF.  This bash problem
 
532
  # is reportedly fixed, but why not run on old versions too?
 
533
  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
 
534
 
 
535
  mv -f "$cfgfile" "$ofile" ||
 
536
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
 
537
  chmod +x "$ofile"
 
538
],
 
539
[cat <<_LT_EOF >> "$ofile"
 
540
 
 
541
dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
 
542
dnl in a comment (ie after a #).
 
543
# ### BEGIN LIBTOOL TAG CONFIG: $1
 
544
_LT_LIBTOOL_TAG_VARS(_LT_TAG)
 
545
# ### END LIBTOOL TAG CONFIG: $1
 
546
_LT_EOF
 
547
])dnl /m4_if
 
548
],
 
549
[m4_if([$1], [], [
 
550
    PACKAGE='$PACKAGE'
 
551
    VERSION='$VERSION'
 
552
    TIMESTAMP='$TIMESTAMP'
 
553
    rm='$rm'
 
554
    ofile='$ofile'], [])
 
555
])dnl /_LT_CONFIG_SAVE_COMMANDS
 
556
])# _LT_CONFIG
 
557
 
 
558
 
 
559
# LT_SUPPORTED_TAG(TAG)
 
560
# ---------------------
 
561
# Trace this macro to discover what tags are supported by the libtool
 
562
# --tag option, using:
 
563
#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
 
564
AC_DEFUN([LT_SUPPORTED_TAG], [])
 
565
 
 
566
 
 
567
# C support is built-in for now
 
568
m4_define([_LT_LANG_C_enabled], [])
 
569
m4_define([_LT_TAGS], [])
 
570
 
 
571
# LT_LANG(LANG)
 
572
# -------------
 
573
# Enable libtool support for the given language if not already enabled.
 
574
AC_DEFUN([LT_LANG],
 
575
[m4_case([$1],
 
576
  [C],                  [_LT_LANG(C)],
 
577
  [C++],                [_LT_LANG(CXX)],
 
578
  [Java],               [_LT_LANG(GCJ)],
 
579
  [Fortran 77],         [_LT_LANG(F77)],
 
580
  [Windows Resource],   [_LT_LANG(RC)],
 
581
  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
 
582
    [_LT_LANG($1)],
 
583
    [m4_fatal([$0: unsupported language: "$1"])])])dnl
 
584
])# LT_LANG
 
585
 
 
586
# _LT_LANG(LANGNAME)
 
587
# ------------------
 
588
m4_define([_LT_LANG],
 
589
[m4_ifdef([_LT_LANG_]$1[_enabled], [],
 
590
  [LT_SUPPORTED_TAG([$1])dnl
 
591
  m4_append([_LT_TAGS], [$1 ])dnl
 
592
  m4_define([_LT_LANG_]$1[_enabled], [])dnl
 
593
  _LT_LANG_$1_CONFIG($1)])dnl
 
594
])# _LT_LANG
 
595
 
 
596
# _LT_LANG_DEFAULT_CONFIG
 
597
# -----------------------
 
598
m4_define([_LT_LANG_DEFAULT_CONFIG],
 
599
[AC_PROVIDE_IFELSE([AC_PROG_CXX],
 
600
  [LT_LANG(CXX)],
 
601
  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
 
602
 
 
603
AC_PROVIDE_IFELSE([AC_PROG_F77],
 
604
  [LT_LANG(F77)],
 
605
  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
 
606
 
 
607
dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
 
608
dnl pulling things in needlessly.
 
609
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
 
610
  [LT_LANG(GCJ)],
 
611
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
 
612
    [LT_LANG(GCJ)],
 
613
    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
 
614
      [LT_LANG(GCJ)],
 
615
      [m4_ifdef([AC_PROG_GCJ],
 
616
        [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
 
617
       m4_ifdef([A][M_PROG_GCJ],
 
618
        [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
 
619
       m4_ifdef([LT_PROG_GCJ],
 
620
        [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
 
621
 
 
622
AC_PROVIDE_IFELSE([LT_PROG_RC],
 
623
  [LT_LANG(RC)],
 
624
  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
 
625
])# _LT_LANG_DEFAULT_CONFIG
 
626
 
 
627
# Obsolete macros
 
628
AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
 
629
AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
 
630
AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java])])
 
631
 
 
632
 
 
633
# _LT_AC_SYS_COMPILER
 
634
# -------------------
 
635
AC_DEFUN([_LT_AC_SYS_COMPILER],
 
636
[AC_REQUIRE([AC_PROG_CC])dnl
 
637
 
 
638
_LT_DECL([LTCC], [CC], [1], [A C compiler])
 
639
_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
 
640
_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU C compiler?])
 
641
 
 
642
# If no C compiler was specified, use CC.
 
643
LTCC=${LTCC-"$CC"}
 
644
 
 
645
# Allow CC to be a program name with arguments.
 
646
compiler=$CC
 
647
])# _LT_AC_SYS_COMPILER
 
648
 
 
649
 
 
650
# _LT_AC_SYS_LIBPATH_AIX
 
651
# ----------------------
 
652
# Links a minimal program and checks the executable
 
653
# for the system default hardcoded library path. In most cases,
 
654
# this is /usr/lib:/lib, but when the MPI compilers are used
 
655
# the location of the communication and MPI libs are included too.
 
656
# If we don't find anything, use the default library path according
 
657
# to the aix ld manual.
 
658
m4_define([_LT_AC_SYS_LIBPATH_AIX],
 
659
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
 
660
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 
661
}'`
 
662
# Check for a 64-bit object if we didn't find anything.
 
663
if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
 
664
}'`; fi],[])
 
665
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
666
])# _LT_AC_SYS_LIBPATH_AIX
 
667
 
 
668
 
 
669
# _LT_AC_SHELL_INIT(ARG)
 
670
# ----------------------
 
671
m4_define([_LT_AC_SHELL_INIT],
 
672
[ifdef([AC_DIVERSION_NOTICE],
 
673
             [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
 
674
         [AC_DIVERT_PUSH(NOTICE)])
 
675
$1
 
676
AC_DIVERT_POP
 
677
])# _LT_AC_SHELL_INIT
 
678
 
 
679
 
 
680
# _LT_AC_PROG_ECHO_BACKSLASH
 
681
# --------------------------
 
682
# Add some code to the start of the generated configure script which
 
683
# will find an echo command which doesn't interpret backslashes.
 
684
m4_define([_LT_AC_PROG_ECHO_BACKSLASH],
 
685
[_LT_AC_SHELL_INIT([
 
686
# Check that we are running under the correct shell.
 
687
SHELL=${CONFIG_SHELL-/bin/sh}
 
688
 
 
689
case X$ECHO in
 
690
X*--fallback-echo)
 
691
  # Remove one level of quotation (which was required for Make).
 
692
  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
 
693
  ;;
 
694
esac
 
695
 
 
696
echo=${ECHO-echo}
 
697
if test "X[$]1" = X--no-reexec; then
 
698
  # Discard the --no-reexec flag, and continue.
 
699
  shift
 
700
elif test "X[$]1" = X--fallback-echo; then
 
701
  # Avoid inline document here, it may be left over
 
702
  :
 
703
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
 
704
  # Yippee, $echo works!
 
705
  :
 
706
else
 
707
  # Restart under the correct shell.
 
708
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
 
709
fi
 
710
 
 
711
if test "X[$]1" = X--fallback-echo; then
 
712
  # used as fallback echo
 
713
  shift
 
714
  cat <<_LT_EOF
 
715
[$]*
 
716
_LT_EOF
 
717
  exit 0
 
718
fi
 
719
 
 
720
# The HP-UX ksh and POSIX shell print the target directory to stdout
 
721
# if CDPATH is set.
 
722
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
723
 
 
724
if test -z "$ECHO"; then
 
725
if test "X${echo_test_string+set}" != Xset; then
 
726
# find a string as large as possible, as long as the shell can cope with it
 
727
  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
 
728
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
 
729
    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
 
730
       echo_test_string="`eval $cmd`" &&
 
731
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
 
732
    then
 
733
      break
 
734
    fi
 
735
  done
 
736
fi
 
737
 
 
738
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
 
739
   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
 
740
   test "X$echo_testing_string" = "X$echo_test_string"; then
 
741
  :
 
742
else
 
743
  # The Solaris, AIX, and Digital Unix default echo programs unquote
 
744
  # backslashes.  This makes it impossible to quote backslashes using
 
745
  #   echo "$something" | sed 's/\\/\\\\/g'
 
746
  #
 
747
  # So, first we look for a working echo in the user's PATH.
 
748
 
 
749
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
750
  for dir in $PATH /usr/ucb; do
 
751
    IFS="$lt_save_ifs"
 
752
    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
 
753
       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
 
754
       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
 
755
       test "X$echo_testing_string" = "X$echo_test_string"; then
 
756
      echo="$dir/echo"
 
757
      break
 
758
    fi
 
759
  done
 
760
  IFS="$lt_save_ifs"
 
761
 
 
762
  if test "X$echo" = Xecho; then
 
763
    # We didn't find a better echo, so look for alternatives.
 
764
    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
 
765
       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
 
766
       test "X$echo_testing_string" = "X$echo_test_string"; then
 
767
      # This shell has a builtin print -r that does the trick.
 
768
      echo='print -r'
 
769
    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
 
770
         test "X$CONFIG_SHELL" != X/bin/ksh; then
 
771
      # If we have ksh, try running configure again with it.
 
772
      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
 
773
      export ORIGINAL_CONFIG_SHELL
 
774
      CONFIG_SHELL=/bin/ksh
 
775
      export CONFIG_SHELL
 
776
      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
 
777
    else
 
778
      # Try using printf.
 
779
      echo='printf %s\n'
 
780
      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
 
781
         echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
 
782
         test "X$echo_testing_string" = "X$echo_test_string"; then
 
783
        # Cool, printf works
 
784
        :
 
785
      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
 
786
           test "X$echo_testing_string" = 'X\t' &&
 
787
           echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
 
788
           test "X$echo_testing_string" = "X$echo_test_string"; then
 
789
        CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
 
790
        export CONFIG_SHELL
 
791
        SHELL="$CONFIG_SHELL"
 
792
        export SHELL
 
793
        echo="$CONFIG_SHELL [$]0 --fallback-echo"
 
794
      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
 
795
           test "X$echo_testing_string" = 'X\t' &&
 
796
           echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
 
797
           test "X$echo_testing_string" = "X$echo_test_string"; then
 
798
        echo="$CONFIG_SHELL [$]0 --fallback-echo"
 
799
      else
 
800
        # maybe with a smaller string...
 
801
        prev=:
 
802
 
 
803
        for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
 
804
          if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
 
805
          then
 
806
            break
 
807
          fi
 
808
          prev="$cmd"
 
809
        done
 
810
 
 
811
        if test "$prev" != 'sed 50q "[$]0"'; then
 
812
          echo_test_string=`eval $prev`
 
813
          export echo_test_string
 
814
          exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
 
815
        else
 
816
          # Oops.  We lost completely, so just stick with echo.
 
817
          echo=echo
 
818
        fi
 
819
      fi
 
820
    fi
 
821
  fi
 
822
fi
 
823
fi
 
824
 
 
825
# Copy echo and quote the copy suitably for passing to libtool from
 
826
# the Makefile, instead of quoting the original, which is used later.
 
827
ECHO=$echo
 
828
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
 
829
   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
 
830
fi
 
831
 
 
832
AC_SUBST(ECHO)
 
833
])
 
834
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
 
835
_LT_DECL([], [echo], [1],
 
836
    [An echo program that does not interpret backslashes])
 
837
])# _LT_AC_PROG_ECHO_BACKSLASH
 
838
 
 
839
 
 
840
# _LT_AC_LOCK
 
841
# -----------
 
842
AC_DEFUN([_LT_AC_LOCK],
 
843
[AC_REQUIRE([AC_OBJEXT])dnl
 
844
AC_ARG_ENABLE([libtool-lock],
 
845
    [AC_HELP_STRING([--disable-libtool-lock],
 
846
        [avoid locking (might break parallel builds)])])
 
847
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
848
 
 
849
# Some flags need to be propagated to the compiler or linker for good
 
850
# libtool support.
 
851
case $host in
 
852
ia64-*-hpux*)
 
853
  # Find out which ABI we are using.
 
854
  echo 'int i;' > conftest.$ac_ext
 
855
  if AC_TRY_EVAL(ac_compile); then
 
856
    case `/usr/bin/file conftest.$ac_objext` in
 
857
    *ELF-32*)
 
858
      HPUX_IA64_MODE="32"
 
859
      ;;
 
860
    *ELF-64*)
 
861
      HPUX_IA64_MODE="64"
 
862
      ;;
 
863
    esac
 
864
  fi
 
865
  rm -rf conftest*
 
866
  ;;
 
867
*-*-irix6*)
 
868
  # Find out which ABI we are using.
 
869
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
 
870
  if AC_TRY_EVAL(ac_compile); then
 
871
   if test "$lt_cv_prog_gnu_ld" = yes; then
 
872
    case `/usr/bin/file conftest.$ac_objext` in
 
873
    *32-bit*)
 
874
      LD="${LD-ld} -melf32bsmip"
 
875
      ;;
 
876
    *N32*)
 
877
      LD="${LD-ld} -melf32bmipn32"
 
878
      ;;
 
879
    *64-bit*)
 
880
      LD="${LD-ld} -melf64bmip"
 
881
      ;;
 
882
    esac
 
883
   else
 
884
    case `/usr/bin/file conftest.$ac_objext` in
 
885
    *32-bit*)
 
886
      LD="${LD-ld} -32"
 
887
      ;;
 
888
    *N32*)
 
889
      LD="${LD-ld} -n32"
 
890
      ;;
 
891
    *64-bit*)
 
892
      LD="${LD-ld} -64"
 
893
      ;;
 
894
    esac
 
895
   fi
 
896
  fi
 
897
  rm -rf conftest*
 
898
  ;;
 
899
 
 
900
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
 
901
  # Find out which ABI we are using.
 
902
  echo 'int i;' > conftest.$ac_ext
 
903
  if AC_TRY_EVAL(ac_compile); then
 
904
    case "`/usr/bin/file conftest.o`" in
 
905
    *32-bit*)
 
906
      case $host in
 
907
        x86_64-*linux*)
 
908
          LD="${LD-ld} -m elf_i386"
 
909
          ;;
 
910
        ppc64-*linux*|powerpc64-*linux*)
 
911
          LD="${LD-ld} -m elf32ppclinux"
 
912
          ;;
 
913
        s390x-*linux*)
 
914
          LD="${LD-ld} -m elf_s390"
 
915
          ;;
 
916
        sparc64-*linux*)
 
917
          LD="${LD-ld} -m elf32_sparc"
 
918
          ;;
 
919
      esac
 
920
      ;;
 
921
    *64-bit*)
 
922
      case $host in
 
923
        x86_64-*linux*)
 
924
          LD="${LD-ld} -m elf_x86_64"
 
925
          ;;
 
926
        ppc*-*linux*|powerpc*-*linux*)
 
927
          LD="${LD-ld} -m elf64ppc"
 
928
          ;;
 
929
        s390*-*linux*)
 
930
          LD="${LD-ld} -m elf64_s390"
 
931
          ;;
 
932
        sparc*-*linux*)
 
933
          LD="${LD-ld} -m elf64_sparc"
 
934
          ;;
 
935
      esac
 
936
      ;;
 
937
    esac
 
938
  fi
 
939
  rm -rf conftest*
 
940
  ;;
 
941
 
 
942
*-*-sco3.2v5*)
 
943
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
 
944
  SAVE_CFLAGS="$CFLAGS"
 
945
  CFLAGS="$CFLAGS -belf"
 
946
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
 
947
    [AC_LANG_PUSH(C)
 
948
     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
 
949
     AC_LANG_POP])
 
950
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
 
951
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
 
952
    CFLAGS="$SAVE_CFLAGS"
 
953
  fi
 
954
  ;;
 
955
esac
 
956
 
 
957
need_locks="$enable_libtool_lock"
 
958
])# _LT_AC_LOCK
 
959
 
 
960
 
 
961
# AC_LIBTOOL_SYS_OLD_ARCHIVE
 
962
# --------------------------
 
963
AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE],
 
964
[AC_CHECK_TOOL(AR, ar, false)
 
965
test -z "$AR" && AR=ar
 
966
test -z "$AR_FLAGS" && AR_FLAGS=cru
 
967
_LT_DECL([], [AR], [1], [The archiver])
 
968
_LT_DECL([], [AR_FLAGS], [1])
 
969
 
 
970
AC_CHECK_TOOL(STRIP, strip, :)
 
971
test -z "$STRIP" && STRIP=:
 
972
_LT_DECL([], [STRIP], [1], [A symbol stripping program])
 
973
 
 
974
AC_CHECK_TOOL(RANLIB, ranlib, :)
 
975
test -z "$RANLIB" && RANLIB=:
 
976
_LT_DECL([], [RANLIB], [1],
 
977
    [Commands used to install an old-style archive])
 
978
 
 
979
# Determine commands to create old-style static archives.
 
980
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
 
981
old_postinstall_cmds='chmod 644 $oldlib'
 
982
old_postuninstall_cmds=
 
983
 
 
984
if test -n "$RANLIB"; then
 
985
  case $host_os in
 
986
  openbsd*)
 
987
    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
 
988
    ;;
 
989
  *)
 
990
    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
 
991
    ;;
 
992
  esac
 
993
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
 
994
fi
 
995
_LT_DECL([], [old_postinstall_cmds], [2])
 
996
_LT_DECL([], [old_postuninstall_cmds], [2])
 
997
_LT_TAGDECL([], [old_archive_cmds], [2],
 
998
    [Commands used to build an old-style archive])
 
999
])# AC_LIBTOOL_SYS_OLD_ARCHIVE
 
1000
 
 
1001
 
 
1002
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
1003
#               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
 
1004
# ----------------------------------------------------------------
 
1005
# Check whether the given compiler option works
 
1006
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
 
1007
[AC_REQUIRE([AC_OBJEXT])dnl
 
1008
AC_REQUIRE([LT_AC_PROG_SED])dnl
 
1009
AC_CACHE_CHECK([$1], [$2],
 
1010
  [$2=no
 
1011
  m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
 
1012
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
1013
   lt_compiler_flag="$3"
 
1014
   # Insert the option either (1) after the last *FLAGS variable, or
 
1015
   # (2) before a word containing "conftest.", or (3) at the end.
 
1016
   # Note that $ac_compile itself does not contain backslashes and begins
 
1017
   # with a dollar sign (not a hyphen), so the echo should work correctly.
 
1018
   # The option is referenced via a variable to avoid confusing sed.
 
1019
   lt_compile=`echo "$ac_compile" | $SED \
 
1020
   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
 
1021
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
 
1022
   -e 's:$: $lt_compiler_flag:'`
 
1023
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
1024
   (eval "$lt_compile" 2>conftest.err)
 
1025
   ac_status=$?
 
1026
   cat conftest.err >&AS_MESSAGE_LOG_FD
 
1027
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
1028
   if (exit $ac_status) && test -s "$ac_outfile"; then
 
1029
     # The compiler can only warn and ignore the option if not recognized
 
1030
     # So say no if there are warnings
 
1031
     if test ! -s conftest.err; then
 
1032
       $2=yes
 
1033
     fi
 
1034
   fi
 
1035
   $rm conftest*
 
1036
])
 
1037
 
 
1038
if test x"[$]$2" = xyes; then
 
1039
    m4_if([$5], , :, [$5])
 
1040
else
 
1041
    m4_if([$6], , :, [$6])
 
1042
fi
 
1043
])# AC_LIBTOOL_COMPILER_OPTION
 
1044
 
 
1045
 
 
1046
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
 
1047
#                          [ACTION-SUCCESS], [ACTION-FAILURE])
 
1048
# ------------------------------------------------------------
 
1049
# Check whether the given compiler option works
 
1050
m4_define([AC_LIBTOOL_LINKER_OPTION],
 
1051
[AC_CACHE_CHECK([$1], [$2],
 
1052
  [$2=no
 
1053
   save_LDFLAGS="$LDFLAGS"
 
1054
   LDFLAGS="$LDFLAGS $3"
 
1055
   printf "$lt_simple_link_test_code" > conftest.$ac_ext
 
1056
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
 
1057
     # The compiler can only warn and ignore the option if not recognized
 
1058
     # So say no if there are warnings
 
1059
     if test -s conftest.err; then
 
1060
       # Append any errors to the config.log.
 
1061
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
 
1062
     else
 
1063
       $2=yes
 
1064
     fi
 
1065
   fi
 
1066
   $rm conftest*
 
1067
   LDFLAGS="$save_LDFLAGS"
 
1068
])
 
1069
 
 
1070
if test x"[$]$2" = xyes; then
 
1071
    m4_if([$4], , :, [$4])
 
1072
else
 
1073
    m4_if([$5], , :, [$5])
 
1074
fi
 
1075
])# AC_LIBTOOL_LINKER_OPTION
 
1076
 
 
1077
 
 
1078
# AC_LIBTOOL_SYS_MAX_CMD_LEN
 
1079
# --------------------------
 
1080
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
 
1081
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
1082
# find the maximum length of command line arguments
 
1083
AC_MSG_CHECKING([the maximum length of command line arguments])
 
1084
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
 
1085
  i=0
 
1086
  teststring="ABCD"
 
1087
 
 
1088
  case $build_os in
 
1089
  msdosdjgpp*)
 
1090
    # On DJGPP, this test can blow up pretty badly due to problems in libc
 
1091
    # (any single argument exceeding 2000 bytes causes a buffer overrun
 
1092
    # during glob expansion).  Even if it were fixed, the result of this
 
1093
    # check would be larger than it should be.
 
1094
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
 
1095
    ;;
 
1096
 
 
1097
  gnu*)
 
1098
    # Under GNU Hurd, this test is not required because there is
 
1099
    # no limit to the length of command line arguments.
 
1100
    # Libtool will interpret -1 as no limit whatsoever
 
1101
    lt_cv_sys_max_cmd_len=-1;
 
1102
    ;;
 
1103
 
 
1104
  cygwin* | mingw*)
 
1105
    # On Win9x/ME, this test blows up -- it succeeds, but takes
 
1106
    # about 5 minutes as the teststring grows exponentially.
 
1107
    # Worse, since 9x/ME are not pre-emptively multitasking,
 
1108
    # you end up with a "frozen" computer, even though with patience
 
1109
    # the test eventually succeeds (with a max line length of 256k).
 
1110
    # Instead, let's just punt: use the minimum linelength reported by
 
1111
    # all of the supported platforms: 8192 (on NT/2K/XP).
 
1112
    lt_cv_sys_max_cmd_len=8192;
 
1113
    ;;
 
1114
 
 
1115
  amigaos*)
 
1116
    # On AmigaOS with pdksh, this test takes hours, literally.
 
1117
    # So we just punt and use a minimum line length of 8192.
 
1118
    lt_cv_sys_max_cmd_len=8192;
 
1119
    ;;
 
1120
 
 
1121
  netbsd* | freebsd* | openbsd* | darwin* )
 
1122
    # This has been around since 386BSD, at least.  Likely further.
 
1123
    if test -x /sbin/sysctl; then
 
1124
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
 
1125
    elif test -x /usr/sbin/sysctl; then
 
1126
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
 
1127
    else
 
1128
      lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
 
1129
    fi
 
1130
    # And add a safety zone
 
1131
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
 
1132
    ;;
 
1133
 *)
 
1134
    # Make teststring a little bigger before we do anything with it.
 
1135
    # a 1K string should be a reasonable start.
 
1136
    for i in 1 2 3 4 5 6 7 8 ; do
 
1137
      teststring=$teststring$teststring
 
1138
    done
 
1139
    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
 
1140
    # If test is not a shell built-in, we'll probably end up computing a
 
1141
    # maximum length that is only half of the actual maximum length, but
 
1142
    # we can't tell.
 
1143
    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
 
1144
               = "XX$teststring$teststring") >/dev/null 2>&1 &&
 
1145
            test $i != 17 # 1/2 MB should be enough
 
1146
    do
 
1147
      i=`expr $i + 1`
 
1148
      teststring=$teststring$teststring
 
1149
    done
 
1150
    # Only check the string length outside the loop.
 
1151
    lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
 
1152
    teststring=
 
1153
    # Add a significant safety factor because C++ compilers can tack on massive
 
1154
    # amounts of additional arguments before passing them to the linker.
 
1155
    # It appears as though 1/2 is a usable value.
 
1156
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
 
1157
    ;;
 
1158
  esac
 
1159
])
 
1160
if test -n $lt_cv_sys_max_cmd_len ; then
 
1161
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
 
1162
else
 
1163
  AC_MSG_RESULT(none)
 
1164
fi
 
1165
_LT_DECL([max_cmd_len], [lt_cv_sys_max_cmd_len], [0],
 
1166
    [What is the maximum length of a command?])
 
1167
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
 
1168
 
 
1169
 
 
1170
# _LT_AC_CHECK_DLFCN
 
1171
# --------------------
 
1172
AC_DEFUN([_LT_AC_CHECK_DLFCN],
 
1173
[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
 
1174
])# _LT_AC_CHECK_DLFCN
 
1175
 
 
1176
 
 
1177
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
 
1178
#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
 
1179
# ------------------------------------------------------------------
 
1180
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
 
1181
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
 
1182
if test "$cross_compiling" = yes; then :
 
1183
  [$4]
 
1184
else
 
1185
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
 
1186
  lt_status=$lt_dlunknown
 
1187
  cat > conftest.$ac_ext <<_LT_EOF
 
1188
[#line __oline__ "configure"
 
1189
#include "confdefs.h"
 
1190
 
 
1191
#if HAVE_DLFCN_H
 
1192
#include <dlfcn.h>
 
1193
#endif
 
1194
 
 
1195
#include <stdio.h>
 
1196
 
 
1197
#ifdef RTLD_GLOBAL
 
1198
#  define LT_DLGLOBAL           RTLD_GLOBAL
 
1199
#else
 
1200
#  ifdef DL_GLOBAL
 
1201
#    define LT_DLGLOBAL         DL_GLOBAL
 
1202
#  else
 
1203
#    define LT_DLGLOBAL         0
 
1204
#  endif
 
1205
#endif
 
1206
 
 
1207
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
 
1208
   find out it does not work in some platform. */
 
1209
#ifndef LT_DLLAZY_OR_NOW
 
1210
#  ifdef RTLD_LAZY
 
1211
#    define LT_DLLAZY_OR_NOW            RTLD_LAZY
 
1212
#  else
 
1213
#    ifdef DL_LAZY
 
1214
#      define LT_DLLAZY_OR_NOW          DL_LAZY
 
1215
#    else
 
1216
#      ifdef RTLD_NOW
 
1217
#        define LT_DLLAZY_OR_NOW        RTLD_NOW
 
1218
#      else
 
1219
#        ifdef DL_NOW
 
1220
#          define LT_DLLAZY_OR_NOW      DL_NOW
 
1221
#        else
 
1222
#          define LT_DLLAZY_OR_NOW      0
 
1223
#        endif
 
1224
#      endif
 
1225
#    endif
 
1226
#  endif
 
1227
#endif
 
1228
 
 
1229
#ifdef __cplusplus
 
1230
extern "C" void exit (int);
 
1231
#endif
 
1232
 
 
1233
void fnord() { int i=42;}
 
1234
int main ()
 
1235
{
 
1236
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
 
1237
  int status = $lt_dlunknown;
 
1238
 
 
1239
  if (self)
 
1240
    {
 
1241
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
 
1242
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
 
1243
      /* dlclose (self); */
 
1244
    }
 
1245
 
 
1246
    exit (status);
 
1247
}]
 
1248
_LT_EOF
 
1249
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
 
1250
    (./conftest; exit; ) 2>/dev/null
 
1251
    lt_status=$?
 
1252
    case x$lt_status in
 
1253
      x$lt_dlno_uscore) $1 ;;
 
1254
      x$lt_dlneed_uscore) $2 ;;
 
1255
      x$lt_unknown|x*) $3 ;;
 
1256
    esac
 
1257
  else :
 
1258
    # compilation failed
 
1259
    $3
 
1260
  fi
 
1261
fi
 
1262
rm -fr conftest*
 
1263
])# _LT_AC_TRY_DLOPEN_SELF
 
1264
 
 
1265
 
 
1266
# AC_LIBTOOL_DLOPEN_SELF
 
1267
# -------------------
 
1268
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
 
1269
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
 
1270
if test "x$enable_dlopen" != xyes; then
 
1271
  enable_dlopen=unknown
 
1272
  enable_dlopen_self=unknown
 
1273
  enable_dlopen_self_static=unknown
 
1274
else
 
1275
  lt_cv_dlopen=no
 
1276
  lt_cv_dlopen_libs=
 
1277
 
 
1278
  case $host_os in
 
1279
  beos*)
 
1280
    lt_cv_dlopen="load_add_on"
 
1281
    lt_cv_dlopen_libs=
 
1282
    lt_cv_dlopen_self=yes
 
1283
    ;;
 
1284
 
 
1285
  mingw* | pw32*)
 
1286
    lt_cv_dlopen="LoadLibrary"
 
1287
    lt_cv_dlopen_libs=
 
1288
   ;;
 
1289
 
 
1290
  cygwin*)
 
1291
    lt_cv_dlopen="dlopen"
 
1292
    lt_cv_dlopen_libs=
 
1293
   ;;
 
1294
 
 
1295
  darwin*)
 
1296
  # if libdl is installed we need to link against it
 
1297
    AC_CHECK_LIB([dl], [dlopen],
 
1298
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
 
1299
    lt_cv_dlopen="dyld"
 
1300
    lt_cv_dlopen_libs=
 
1301
    lt_cv_dlopen_self=yes
 
1302
    ])
 
1303
   ;;
 
1304
 
 
1305
  *)
 
1306
    AC_CHECK_FUNC([shl_load],
 
1307
          [lt_cv_dlopen="shl_load"],
 
1308
      [AC_CHECK_LIB([dld], [shl_load],
 
1309
            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
 
1310
        [AC_CHECK_FUNC([dlopen],
 
1311
              [lt_cv_dlopen="dlopen"],
 
1312
          [AC_CHECK_LIB([dl], [dlopen],
 
1313
                [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
 
1314
            [AC_CHECK_LIB([svld], [dlopen],
 
1315
                  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
 
1316
              [AC_CHECK_LIB([dld], [dld_link],
 
1317
                    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
 
1318
              ])
 
1319
            ])
 
1320
          ])
 
1321
        ])
 
1322
      ])
 
1323
    ;;
 
1324
  esac
 
1325
 
 
1326
  if test "x$lt_cv_dlopen" != xno; then
 
1327
    enable_dlopen=yes
 
1328
  else
 
1329
    enable_dlopen=no
 
1330
  fi
 
1331
 
 
1332
  case $lt_cv_dlopen in
 
1333
  dlopen)
 
1334
    save_CPPFLAGS="$CPPFLAGS"
 
1335
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
 
1336
 
 
1337
    save_LDFLAGS="$LDFLAGS"
 
1338
    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
1339
 
 
1340
    save_LIBS="$LIBS"
 
1341
    LIBS="$lt_cv_dlopen_libs $LIBS"
 
1342
 
 
1343
    AC_CACHE_CHECK([whether a program can dlopen itself],
 
1344
          lt_cv_dlopen_self, [dnl
 
1345
          _LT_AC_TRY_DLOPEN_SELF(
 
1346
            lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
 
1347
            lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
 
1348
    ])
 
1349
 
 
1350
    if test "x$lt_cv_dlopen_self" = xyes; then
 
1351
      LDFLAGS="$LDFLAGS $link_static_flag"
 
1352
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
 
1353
          lt_cv_dlopen_self_static, [dnl
 
1354
          _LT_AC_TRY_DLOPEN_SELF(
 
1355
            lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
 
1356
            lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
 
1357
      ])
 
1358
    fi
 
1359
 
 
1360
    CPPFLAGS="$save_CPPFLAGS"
 
1361
    LDFLAGS="$save_LDFLAGS"
 
1362
    LIBS="$save_LIBS"
 
1363
    ;;
 
1364
  esac
 
1365
 
 
1366
  case $lt_cv_dlopen_self in
 
1367
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
 
1368
  *) enable_dlopen_self=unknown ;;
 
1369
  esac
 
1370
 
 
1371
  case $lt_cv_dlopen_self_static in
 
1372
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
 
1373
  *) enable_dlopen_self_static=unknown ;;
 
1374
  esac
 
1375
fi
 
1376
_LT_DECL([dlopen_support], [enable_dlopen], [0],
 
1377
         [Whether dlopen is supported])
 
1378
_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
 
1379
         [Whether dlopen of programs is supported])
 
1380
_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
 
1381
         [Whether dlopen of statically linked programs is supported])
 
1382
])# AC_LIBTOOL_DLOPEN_SELF
 
1383
 
 
1384
 
 
1385
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
 
1386
# ---------------------------------
 
1387
# Check to see if options -c and -o are simultaneously supported by compiler
 
1388
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
 
1389
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
1390
AC_REQUIRE([AC_OBJEXT])dnl
 
1391
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
 
1392
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
 
1393
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
 
1394
   $rm -r conftest 2>/dev/null
 
1395
   mkdir conftest
 
1396
   cd conftest
 
1397
   mkdir out
 
1398
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
1399
 
 
1400
   lt_compiler_flag="-o out/conftest2.$ac_objext"
 
1401
   # Insert the option either (1) after the last *FLAGS variable, or
 
1402
   # (2) before a word containing "conftest.", or (3) at the end.
 
1403
   # Note that $ac_compile itself does not contain backslashes and begins
 
1404
   # with a dollar sign (not a hyphen), so the echo should work correctly.
 
1405
   lt_compile=`echo "$ac_compile" | $SED \
 
1406
   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
 
1407
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
 
1408
   -e 's:$: $lt_compiler_flag:'`
 
1409
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
 
1410
   (eval "$lt_compile" 2>out/conftest.err)
 
1411
   ac_status=$?
 
1412
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
 
1413
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
 
1414
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
 
1415
   then
 
1416
     # The compiler can only warn and ignore the option if not recognized
 
1417
     # So say no if there are warnings
 
1418
     if test ! -s out/conftest.err; then
 
1419
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
1420
     fi
 
1421
   fi
 
1422
   chmod u+w .
 
1423
   $rm conftest*
 
1424
   # SGI C++ compiler will create directory out/ii_files/ for
 
1425
   # template instantiation
 
1426
   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
 
1427
   $rm out/* && rmdir out
 
1428
   cd ..
 
1429
   rmdir conftest
 
1430
   $rm conftest*
 
1431
])
 
1432
_LT_DECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
 
1433
        [Does compiler simultaneously support -c and -o options?])
 
1434
])# AC_LIBTOOL_PROG_CC_C_O
 
1435
 
 
1436
 
 
1437
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
 
1438
# -----------------------------------------
 
1439
# Check to see if we can do hard links to lock some files if needed
 
1440
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
 
1441
[AC_REQUIRE([AC_LIBTOOL_PROG_CC_C_O])dnl
 
1442
AC_REQUIRE([_LT_AC_LOCK])dnl
 
1443
 
 
1444
hard_links="nottested"
 
1445
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
 
1446
  # do not overwrite the value of need_locks provided by the user
 
1447
  AC_MSG_CHECKING([if we can lock with hard links])
 
1448
  hard_links=yes
 
1449
  $rm conftest*
 
1450
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
 
1451
  touch conftest.a
 
1452
  ln conftest.a conftest.b 2>&5 || hard_links=no
 
1453
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
 
1454
  AC_MSG_RESULT([$hard_links])
 
1455
  if test "$hard_links" = no; then
 
1456
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
 
1457
    need_locks=warn
 
1458
  fi
 
1459
else
 
1460
  need_locks=no
 
1461
fi
 
1462
_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
 
1463
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
 
1464
 
 
1465
 
 
1466
# AC_LIBTOOL_OBJDIR
 
1467
# -----------------
 
1468
AC_DEFUN([AC_LIBTOOL_OBJDIR],
 
1469
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
 
1470
[rm -f .libs 2>/dev/null
 
1471
mkdir .libs 2>/dev/null
 
1472
if test -d .libs; then
 
1473
  lt_cv_objdir=.libs
 
1474
else
 
1475
  # MS-DOS does not allow filenames that begin with a dot.
 
1476
  lt_cv_objdir=_libs
 
1477
fi
 
1478
rmdir .libs 2>/dev/null])
 
1479
objdir=$lt_cv_objdir
 
1480
_LT_DECL([], [objdir], [0],
 
1481
         [The name of the directory that contains temporary libtool files])dnl
 
1482
])# AC_LIBTOOL_OBJDIR
 
1483
 
 
1484
 
 
1485
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
 
1486
# ----------------------------------------------
 
1487
# Check hardcoding attributes.
 
1488
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
 
1489
[AC_MSG_CHECKING([how to hardcode library paths into programs])
 
1490
_LT_AC_TAGVAR(hardcode_action, $1)=
 
1491
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
 
1492
   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" ||
 
1493
   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
 
1494
 
 
1495
  # We can hardcode non-existant directories.
 
1496
  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
 
1497
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
 
1498
     # have to relink, otherwise we might link with an installed library
 
1499
     # when we should be linking with a yet-to-be-installed one
 
1500
     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
 
1501
     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
 
1502
    # Linking always hardcodes the temporary library directory.
 
1503
    _LT_AC_TAGVAR(hardcode_action, $1)=relink
 
1504
  else
 
1505
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
 
1506
    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
 
1507
  fi
 
1508
else
 
1509
  # We cannot hardcode anything, or else we can only hardcode existing
 
1510
  # directories.
 
1511
  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
 
1512
fi
 
1513
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
 
1514
 
 
1515
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink ||
 
1516
   test "$_LT_AC_TAGVAR(inherit_rpath, $1)" = yes; then
 
1517
  # Fast installation is not supported
 
1518
  enable_fast_install=no
 
1519
elif test "$shlibpath_overrides_runpath" = yes ||
 
1520
     test "$enable_shared" = no; then
 
1521
  # Fast installation is not necessary
 
1522
  enable_fast_install=needless
 
1523
fi
 
1524
_LT_TAGDECL([], [hardcode_action], [0],
 
1525
    [How to hardcode a shared library path into an executable])
 
1526
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
 
1527
 
 
1528
 
 
1529
# AC_LIBTOOL_SYS_LIB_STRIP
 
1530
# ------------------------
 
1531
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
 
1532
[AC_REQUIRE([LT_AC_PROG_EGREP])
 
1533
striplib=
 
1534
old_striplib=
 
1535
AC_MSG_CHECKING([whether stripping libraries is possible])
 
1536
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
 
1537
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
 
1538
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
 
1539
  AC_MSG_RESULT([yes])
 
1540
else
 
1541
# FIXME - insert some real tests, host_os isn't really good enough
 
1542
  case $host_os in
 
1543
   darwin*)
 
1544
       if test -n "$STRIP" ; then
 
1545
         striplib="$STRIP -x"
 
1546
         AC_MSG_RESULT([yes])
 
1547
       else
 
1548
         AC_MSG_RESULT([no])
 
1549
       fi
 
1550
       ;;
 
1551
   *)
 
1552
  AC_MSG_RESULT([no])
 
1553
    ;;
 
1554
  esac
 
1555
fi
 
1556
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
 
1557
_LT_DECL([], [striplib], [1])
 
1558
])# AC_LIBTOOL_SYS_LIB_STRIP
 
1559
 
 
1560
 
 
1561
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
 
1562
# -----------------------------
 
1563
# PORTME Fill in your ld.so characteristics
 
1564
m4_defun([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
 
1565
[AC_REQUIRE([LT_AC_PROG_EGREP])
 
1566
AC_MSG_CHECKING([dynamic linker characteristics])
 
1567
m4_case([$1],
 
1568
        [C], [withGCC=$GCC],
 
1569
        [CXX], [withGCC=$GXX],
 
1570
        [F77], [withGCC=$G77],
 
1571
        [withGCC=$GCC])
 
1572
library_names_spec=
 
1573
libname_spec='lib$name'
 
1574
soname_spec=
 
1575
shrext_cmds=".so"
 
1576
postinstall_cmds=
 
1577
postuninstall_cmds=
 
1578
finish_cmds=
 
1579
finish_eval=
 
1580
shlibpath_var=
 
1581
shlibpath_overrides_runpath=unknown
 
1582
version_type=none
 
1583
dynamic_linker="$host_os ld.so"
 
1584
sys_lib_dlsearch_path_spec="/lib /usr/lib"
 
1585
if test "$withGCC" = yes; then
 
1586
  sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
 
1587
  if echo "$sys_lib_search_path_spec" | $GREP ';' >/dev/null ; then
 
1588
    # if the path contains ";" then we assume it to be the separator
 
1589
    # otherwise default to the standard path separator (i.e. ":") - it is
 
1590
    # assumed that no part of a normal pathname contains ";" but that should
 
1591
    # okay in the real world where ";" in dirpaths is itself problematic.
 
1592
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
 
1593
  else
 
1594
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
 
1595
  fi
 
1596
else
 
1597
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 
1598
fi
 
1599
need_lib_prefix=unknown
 
1600
hardcode_into_libs=no
 
1601
 
 
1602
# when you set need_version to no, make sure it does not cause -set_version
 
1603
# flags to be left without arguments
 
1604
need_version=unknown
 
1605
 
 
1606
case $host_os in
 
1607
aix3*)
 
1608
  version_type=linux
 
1609
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
 
1610
  shlibpath_var=LIBPATH
 
1611
 
 
1612
  # AIX 3 has no versioning support, so we append a major version to the name.
 
1613
  soname_spec='${libname}${release}${shared_ext}$major'
 
1614
  ;;
 
1615
 
 
1616
aix4* | aix5*)
 
1617
  version_type=linux
 
1618
  need_lib_prefix=no
 
1619
  need_version=no
 
1620
  hardcode_into_libs=yes
 
1621
  if test "$host_cpu" = ia64; then
 
1622
    # AIX 5 supports IA64
 
1623
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
 
1624
    shlibpath_var=LD_LIBRARY_PATH
 
1625
  else
 
1626
    # With GCC up to 2.95.x, collect2 would create an import file
 
1627
    # for dependence libraries.  The import file would start with
 
1628
    # the line `#! .'.  This would cause the generated library to
 
1629
    # depend on `.', always an invalid library.  This was fixed in
 
1630
    # development snapshots of GCC prior to 3.0.
 
1631
    case $host_os in
 
1632
      aix4 | aix4.[[01]] | aix4.[[01]].*)
 
1633
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 
1634
           echo ' yes '
 
1635
           echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
 
1636
        :
 
1637
      else
 
1638
        can_build_shared=no
 
1639
      fi
 
1640
      ;;
 
1641
    esac
 
1642
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
 
1643
    # soname into executable. Probably we can add versioning support to
 
1644
    # collect2, so additional links can be useful in future.
 
1645
    if test "$aix_use_runtimelinking" = yes; then
 
1646
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
 
1647
      # instead of lib<name>.a to let people know that these are not
 
1648
      # typical AIX shared libraries.
 
1649
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1650
    else
 
1651
      # We preserve .a as extension for shared libraries through AIX4.2
 
1652
      # and later when we are not doing run time linking.
 
1653
      library_names_spec='${libname}${release}.a $libname.a'
 
1654
      soname_spec='${libname}${release}${shared_ext}$major'
 
1655
    fi
 
1656
    shlibpath_var=LIBPATH
 
1657
  fi
 
1658
  ;;
 
1659
 
 
1660
amigaos*)
 
1661
  if test "$host_cpu" = m68k; then
 
1662
    library_names_spec='$libname.ixlibrary $libname.a'
 
1663
    # Create ${libname}_ixlibrary.a entries in /sys/libs.
 
1664
    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'
 
1665
  else
 
1666
    dynamic_linker=no
 
1667
  fi
 
1668
  ;;
 
1669
 
 
1670
beos*)
 
1671
  library_names_spec='${libname}${shared_ext}'
 
1672
  dynamic_linker="$host_os ld.so"
 
1673
  shlibpath_var=LIBRARY_PATH
 
1674
  ;;
 
1675
 
 
1676
bsdi[[45]]*)
 
1677
  version_type=linux
 
1678
  need_version=no
 
1679
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1680
  soname_spec='${libname}${release}${shared_ext}$major'
 
1681
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
 
1682
  shlibpath_var=LD_LIBRARY_PATH
 
1683
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
 
1684
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
 
1685
  # the default ld.so.conf also contains /usr/contrib/lib and
 
1686
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
 
1687
  # libtool to hard-code these into programs
 
1688
  ;;
 
1689
 
 
1690
cygwin* | mingw* | pw32*)
 
1691
  version_type=windows
 
1692
  shrext_cmds=".dll"
 
1693
  need_version=no
 
1694
  need_lib_prefix=no
 
1695
 
 
1696
  case $withGCC,$host_os in
 
1697
  yes,cygwin* | yes,mingw* | yes,pw32*)
 
1698
    library_names_spec='$libname.dll.a'
 
1699
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
 
1700
    postinstall_cmds='base_file=`basename \${file}`~
 
1701
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
 
1702
      dldir=$destdir/`dirname \$dlpath`~
 
1703
      test -d \$dldir || mkdir -p \$dldir~
 
1704
      $install_prog $dir/$dlname \$dldir/$dlname'
 
1705
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
 
1706
      dlpath=$dir/\$dldll~
 
1707
       $rm \$dlpath'
 
1708
    shlibpath_overrides_runpath=yes
 
1709
 
 
1710
    case $host_os in
 
1711
    cygwin*)
 
1712
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
 
1713
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
1714
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
 
1715
      ;;
 
1716
    mingw*)
 
1717
      # MinGW DLLs use traditional 'lib' prefix
 
1718
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
 
1719
      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
 
1720
      if echo "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
 
1721
        # It is most probably a Windows format PATH printed by
 
1722
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
 
1723
        # path with ; separators, and with drive letters. We can handle the
 
1724
        # drive letters (cygwin fileutils understands them), so leave them,
 
1725
        # especially as we might pass files found there to a mingw objdump,
 
1726
        # which wouldn't understand a cygwinified path. Ahh.
 
1727
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
 
1728
      else
 
1729
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
 
1730
      fi
 
1731
      ;;
 
1732
    pw32*)
 
1733
      # pw32 DLLs use 'pw' prefix rather than 'lib'
 
1734
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
1735
      ;;
 
1736
    esac
 
1737
    ;;
 
1738
 
 
1739
  *)
 
1740
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
 
1741
    ;;
 
1742
  esac
 
1743
  dynamic_linker='Win32 ld.exe'
 
1744
  # FIXME: first we should search . and the directory the executable is in
 
1745
  shlibpath_var=PATH
 
1746
  ;;
 
1747
 
 
1748
darwin* | rhapsody*)
 
1749
  dynamic_linker="$host_os dyld"
 
1750
  version_type=darwin
 
1751
  need_lib_prefix=no
 
1752
  need_version=no
 
1753
  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
 
1754
  soname_spec='${libname}${release}${major}$shared_ext'
 
1755
  shlibpath_overrides_runpath=yes
 
1756
  shlibpath_var=DYLD_LIBRARY_PATH
 
1757
  shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
 
1758
  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
 
1759
  if test "$withGCC" = yes; then
 
1760
    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | $GREP "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
 
1761
  else
 
1762
    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
 
1763
  fi
 
1764
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
 
1765
  ;;
 
1766
 
 
1767
dgux*)
 
1768
  version_type=linux
 
1769
  need_lib_prefix=no
 
1770
  need_version=no
 
1771
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
 
1772
  soname_spec='${libname}${release}${shared_ext}$major'
 
1773
  shlibpath_var=LD_LIBRARY_PATH
 
1774
  ;;
 
1775
 
 
1776
freebsd1*)
 
1777
  dynamic_linker=no
 
1778
  ;;
 
1779
 
 
1780
kfreebsd*-gnu)
 
1781
  version_type=linux
 
1782
  need_lib_prefix=no
 
1783
  need_version=no
 
1784
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
1785
  soname_spec='${libname}${release}${shared_ext}$major'
 
1786
  shlibpath_var=LD_LIBRARY_PATH
 
1787
  shlibpath_overrides_runpath=no
 
1788
  hardcode_into_libs=yes
 
1789
  dynamic_linker='GNU ld.so'
 
1790
  ;;
 
1791
 
 
1792
freebsd*)
 
1793
  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
 
1794
  version_type=freebsd-$objformat
 
1795
  case $version_type in
 
1796
    freebsd-elf*)
 
1797
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
 
1798
      need_version=no
 
1799
      need_lib_prefix=no
 
1800
      ;;
 
1801
    freebsd-*)
 
1802
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
 
1803
      need_version=yes
 
1804
      ;;
 
1805
  esac
 
1806
  shlibpath_var=LD_LIBRARY_PATH
 
1807
  case $host_os in
 
1808
  freebsd2*)
 
1809
    shlibpath_overrides_runpath=yes
 
1810
    ;;
 
1811
  freebsd3.[01]* | freebsdelf3.[01]*)
 
1812
    shlibpath_overrides_runpath=yes
 
1813
    hardcode_into_libs=yes
 
1814
    ;;
 
1815
  *) # from 3.2 on
 
1816
    shlibpath_overrides_runpath=no
 
1817
    hardcode_into_libs=yes
 
1818
    ;;
 
1819
  esac
 
1820
  ;;
 
1821
 
 
1822
gnu*)
 
1823
  version_type=linux
 
1824
  need_lib_prefix=no
 
1825
  need_version=no
 
1826
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
 
1827
  soname_spec='${libname}${release}${shared_ext}$major'
 
1828
  shlibpath_var=LD_LIBRARY_PATH
 
1829
  hardcode_into_libs=yes
 
1830
  ;;
 
1831
 
 
1832
hpux9* | hpux10* | hpux11*)
 
1833
  # Give a soname corresponding to the major version so that dld.sl refuses to
 
1834
  # link against other versions.
 
1835
  version_type=sunos
 
1836
  need_lib_prefix=no
 
1837
  need_version=no
 
1838
  case "$host_cpu" in
 
1839
  ia64*)
 
1840
    shrext_cmds='.so'
 
1841
    hardcode_into_libs=yes
 
1842
    dynamic_linker="$host_os dld.so"
 
1843
    shlibpath_var=LD_LIBRARY_PATH
 
1844
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 
1845
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1846
    soname_spec='${libname}${release}${shared_ext}$major'
 
1847
    if test "X$HPUX_IA64_MODE" = X32; then
 
1848
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
 
1849
    else
 
1850
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
 
1851
    fi
 
1852
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 
1853
    ;;
 
1854
   hppa*64*)
 
1855
     shrext_cmds='.sl'
 
1856
     hardcode_into_libs=yes
 
1857
     dynamic_linker="$host_os dld.sl"
 
1858
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
 
1859
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
 
1860
     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1861
     soname_spec='${libname}${release}${shared_ext}$major'
 
1862
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
 
1863
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
 
1864
     ;;
 
1865
   *)
 
1866
    shrext_cmds='.sl'
 
1867
    dynamic_linker="$host_os dld.sl"
 
1868
    shlibpath_var=SHLIB_PATH
 
1869
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
 
1870
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1871
    soname_spec='${libname}${release}${shared_ext}$major'
 
1872
    ;;
 
1873
  esac
 
1874
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
 
1875
  postinstall_cmds='chmod 555 $lib'
 
1876
  ;;
 
1877
 
 
1878
irix5* | irix6* | nonstopux*)
 
1879
  case $host_os in
 
1880
    nonstopux*) version_type=nonstopux ;;
 
1881
    *)
 
1882
        if test "$lt_cv_prog_gnu_ld" = yes; then
 
1883
                version_type=linux
 
1884
        else
 
1885
                version_type=irix
 
1886
        fi ;;
 
1887
  esac
 
1888
  need_lib_prefix=no
 
1889
  need_version=no
 
1890
  soname_spec='${libname}${release}${shared_ext}$major'
 
1891
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
 
1892
  case $host_os in
 
1893
  irix5* | nonstopux*)
 
1894
    libsuff= shlibsuff=
 
1895
    ;;
 
1896
  *)
 
1897
    case $LD in # libtool.m4 will add one of these switches to LD
 
1898
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
 
1899
      libsuff= shlibsuff= libmagic=32-bit;;
 
1900
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
 
1901
      libsuff=32 shlibsuff=N32 libmagic=N32;;
 
1902
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
 
1903
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
 
1904
    *) libsuff= shlibsuff= libmagic=never-match;;
 
1905
    esac
 
1906
    ;;
 
1907
  esac
 
1908
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
 
1909
  shlibpath_overrides_runpath=no
 
1910
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
 
1911
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
 
1912
  hardcode_into_libs=yes
 
1913
  ;;
 
1914
 
 
1915
# No shared lib support for Linux oldld, aout, or coff.
 
1916
linux*oldld* | linux*aout* | linux*coff*)
 
1917
  dynamic_linker=no
 
1918
  ;;
 
1919
 
 
1920
# This must be Linux ELF.
 
1921
linux*)
 
1922
  version_type=linux
 
1923
  need_lib_prefix=no
 
1924
  need_version=no
 
1925
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1926
  soname_spec='${libname}${release}${shared_ext}$major'
 
1927
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
 
1928
  shlibpath_var=LD_LIBRARY_PATH
 
1929
  shlibpath_overrides_runpath=no
 
1930
  # This implies no fast_install, which is unacceptable.
 
1931
  # Some rework will be needed to allow for fast_install
 
1932
  # before this can be enabled.
 
1933
  hardcode_into_libs=yes
 
1934
 
 
1935
  # Append ld.so.conf contents to the search path
 
1936
  if test -f /etc/ld.so.conf; then
 
1937
    lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '`
 
1938
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
 
1939
  fi
 
1940
 
 
1941
  # We used to test for /lib/ld.so.1 and disable shared libraries on
 
1942
  # powerpc, because MkLinux only supported shared libraries with the
 
1943
  # GNU dynamic linker.  Since this was broken with cross compilers,
 
1944
  # most powerpc-linux boxes support dynamic linking these days and
 
1945
  # people can always --disable-shared, the test was removed, and we
 
1946
  # assume the GNU/Linux dynamic linker is in use.
 
1947
  dynamic_linker='GNU/Linux ld.so'
 
1948
  ;;
 
1949
 
 
1950
knetbsd*-gnu)
 
1951
  version_type=linux
 
1952
  need_lib_prefix=no
 
1953
  need_version=no
 
1954
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
1955
  soname_spec='${libname}${release}${shared_ext}$major'
 
1956
  shlibpath_var=LD_LIBRARY_PATH
 
1957
  shlibpath_overrides_runpath=no
 
1958
  hardcode_into_libs=yes
 
1959
  dynamic_linker='GNU ld.so'
 
1960
  ;;
 
1961
 
 
1962
netbsd*)
 
1963
  version_type=sunos
 
1964
  need_lib_prefix=no
 
1965
  need_version=no
 
1966
  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 
1967
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
1968
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 
1969
    dynamic_linker='NetBSD (a.out) ld.so'
 
1970
  else
 
1971
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
1972
    soname_spec='${libname}${release}${shared_ext}$major'
 
1973
    dynamic_linker='NetBSD ld.elf_so'
 
1974
  fi
 
1975
  shlibpath_var=LD_LIBRARY_PATH
 
1976
  shlibpath_overrides_runpath=yes
 
1977
  hardcode_into_libs=yes
 
1978
  ;;
 
1979
 
 
1980
newsos6)
 
1981
  version_type=linux
 
1982
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1983
  shlibpath_var=LD_LIBRARY_PATH
 
1984
  shlibpath_overrides_runpath=yes
 
1985
  ;;
 
1986
 
 
1987
*nto* | *qnx*)
 
1988
  version_type=qnx
 
1989
  need_lib_prefix=no
 
1990
  need_version=no
 
1991
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
1992
  soname_spec='${libname}${release}${shared_ext}$major'
 
1993
  shlibpath_var=LD_LIBRARY_PATH
 
1994
  shlibpath_overrides_runpath=no
 
1995
  hardcode_into_libs=yes
 
1996
  dynamic_linker='ldqnx.so'
 
1997
  ;;
 
1998
 
 
1999
openbsd*)
 
2000
  version_type=sunos
 
2001
  need_lib_prefix=no
 
2002
  need_version=no
 
2003
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
2004
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 
2005
  shlibpath_var=LD_LIBRARY_PATH
 
2006
  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
2007
    case $host_os in
 
2008
      openbsd2.[[89]] | openbsd2.[[89]].*)
 
2009
        shlibpath_overrides_runpath=no
 
2010
        ;;
 
2011
      *)
 
2012
        shlibpath_overrides_runpath=yes
 
2013
        ;;
 
2014
      esac
 
2015
  else
 
2016
    shlibpath_overrides_runpath=yes
 
2017
  fi
 
2018
  ;;
 
2019
 
 
2020
os2*)
 
2021
  libname_spec='$name'
 
2022
  shrext_cmds=".dll"
 
2023
  need_lib_prefix=no
 
2024
  library_names_spec='$libname${shared_ext} $libname.a'
 
2025
  dynamic_linker='OS/2 ld.exe'
 
2026
  shlibpath_var=LIBPATH
 
2027
  ;;
 
2028
 
 
2029
osf3* | osf4* | osf5*)
 
2030
  version_type=osf
 
2031
  need_lib_prefix=no
 
2032
  need_version=no
 
2033
  soname_spec='${libname}${release}${shared_ext}$major'
 
2034
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
2035
  shlibpath_var=LD_LIBRARY_PATH
 
2036
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
 
2037
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
 
2038
  ;;
 
2039
 
 
2040
sco3.2v5*)
 
2041
  version_type=osf
 
2042
  soname_spec='${libname}${release}${shared_ext}$major'
 
2043
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
2044
  shlibpath_var=LD_LIBRARY_PATH
 
2045
  ;;
 
2046
 
 
2047
solaris*)
 
2048
  version_type=linux
 
2049
  need_lib_prefix=no
 
2050
  need_version=no
 
2051
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
2052
  soname_spec='${libname}${release}${shared_ext}$major'
 
2053
  shlibpath_var=LD_LIBRARY_PATH
 
2054
  shlibpath_overrides_runpath=yes
 
2055
  hardcode_into_libs=yes
 
2056
  # ldd complains unless libraries are executable
 
2057
  postinstall_cmds='chmod +x $lib'
 
2058
  ;;
 
2059
 
 
2060
sunos4*)
 
2061
  version_type=sunos
 
2062
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
 
2063
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
 
2064
  shlibpath_var=LD_LIBRARY_PATH
 
2065
  shlibpath_overrides_runpath=yes
 
2066
  if test "$with_gnu_ld" = yes; then
 
2067
    need_lib_prefix=no
 
2068
  fi
 
2069
  need_version=yes
 
2070
  ;;
 
2071
 
 
2072
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
2073
  version_type=linux
 
2074
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
2075
  soname_spec='${libname}${release}${shared_ext}$major'
 
2076
  shlibpath_var=LD_LIBRARY_PATH
 
2077
  case $host_vendor in
 
2078
    sni)
 
2079
      shlibpath_overrides_runpath=no
 
2080
      need_lib_prefix=no
 
2081
      runpath_var=LD_RUN_PATH
 
2082
      ;;
 
2083
    siemens)
 
2084
      need_lib_prefix=no
 
2085
      ;;
 
2086
    motorola)
 
2087
      need_lib_prefix=no
 
2088
      need_version=no
 
2089
      shlibpath_overrides_runpath=no
 
2090
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
 
2091
      ;;
 
2092
  esac
 
2093
  ;;
 
2094
 
 
2095
sysv4*MP*)
 
2096
  if test -d /usr/nec ;then
 
2097
    version_type=linux
 
2098
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
 
2099
    soname_spec='$libname${shared_ext}.$major'
 
2100
    shlibpath_var=LD_LIBRARY_PATH
 
2101
  fi
 
2102
  ;;
 
2103
 
 
2104
uts4*)
 
2105
  version_type=linux
 
2106
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 
2107
  soname_spec='${libname}${release}${shared_ext}$major'
 
2108
  shlibpath_var=LD_LIBRARY_PATH
 
2109
  ;;
 
2110
 
 
2111
*)
 
2112
  dynamic_linker=no
 
2113
  ;;
 
2114
esac
 
2115
AC_MSG_RESULT([$dynamic_linker])
 
2116
test "$dynamic_linker" = no && can_build_shared=no
 
2117
_LT_DECL([], [need_lib_prefix], [0],
 
2118
    [Do we need the "lib" prefix for modules?])
 
2119
_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
 
2120
_LT_DECL([], [version_type], [0], [Library versioning type])
 
2121
_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
 
2122
_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
 
2123
_LT_DECL([], [shlibpath_overrides_runpath], [0],
 
2124
    [Is shibpath searched before the hard-coded library search path?])
 
2125
_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
 
2126
_LT_DECL([], [library_names_spec], [1],
 
2127
    [List of archive names.  First name is the real one, the rest are links.
 
2128
    The last name is the one that the linker finds with -lNAME])
 
2129
_LT_DECL([], [soname_spec], [1],
 
2130
    [The coded name of the library, if different from the real name])
 
2131
_LT_DECL([], [postinstall_cmds], [2],
 
2132
    [Command to use after installation of a shared archive])
 
2133
_LT_DECL([], [postuninstall_cmds], [2],
 
2134
    [Command to use after uninstallation of a shared archive])
 
2135
_LT_DECL([], [finish_cmds], [2],
 
2136
    [Commands used to finish a libtool library installation in a directory])
 
2137
_LT_DECL([], [finish_eval], [1],
 
2138
    [As "finish_cmds", except a single script fragment to be evaled but
 
2139
    not shown])
 
2140
_LT_DECL([], [hardcode_into_libs], [0],
 
2141
    [Whether we should hardcode library paths into libraries])
 
2142
_LT_DECL([], [sys_lib_search_path_spec], [2],
 
2143
    [Compile-time system search path for libraries])
 
2144
_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
 
2145
    [Run-time system search path for libraries])
 
2146
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
 
2147
 
 
2148
 
 
2149
# AC_PATH_TOOL_PREFIX
 
2150
# -------------------
 
2151
# find a file program which can recognise shared library
 
2152
AC_DEFUN([AC_PATH_TOOL_PREFIX],
 
2153
[AC_REQUIRE([LT_AC_PROG_EGREP])dnl
 
2154
AC_MSG_CHECKING([for $1])
 
2155
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
 
2156
[case $MAGIC_CMD in
 
2157
[[\\/*] |  ?:[\\/]*])
 
2158
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
 
2159
  ;;
 
2160
*)
 
2161
  lt_save_MAGIC_CMD="$MAGIC_CMD"
 
2162
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
2163
dnl $ac_dummy forces splitting on constant user-supplied paths.
 
2164
dnl POSIX.2 word splitting is done only on the output of word expansions,
 
2165
dnl not every word.  This closes a longstanding sh security hole.
 
2166
  ac_dummy="m4_if([$2], , $PATH, [$2])"
 
2167
  for ac_dir in $ac_dummy; do
 
2168
    IFS="$lt_save_ifs"
 
2169
    test -z "$ac_dir" && ac_dir=.
 
2170
    if test -f $ac_dir/$1; then
 
2171
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
 
2172
      if test -n "$file_magic_test_file"; then
 
2173
        case $deplibs_check_method in
 
2174
        "file_magic "*)
 
2175
          file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
 
2176
          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 
2177
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
 
2178
            $EGREP "$file_magic_regex" > /dev/null; then
 
2179
            :
 
2180
          else
 
2181
            cat <<_LT_EOF 1>&2
 
2182
 
 
2183
*** Warning: the command libtool uses to detect shared libraries,
 
2184
*** $file_magic_cmd, produces output that libtool cannot recognize.
 
2185
*** The result is that libtool may fail to recognize shared libraries
 
2186
*** as such.  This will affect the creation of libtool libraries that
 
2187
*** depend on shared libraries, but programs linked with such libtool
 
2188
*** libraries will work regardless of this problem.  Nevertheless, you
 
2189
*** may want to report the problem to your system manager and/or to
 
2190
*** bug-libtool@gnu.org
 
2191
 
 
2192
_LT_EOF
 
2193
          fi ;;
 
2194
        esac
 
2195
      fi
 
2196
      break
 
2197
    fi
 
2198
  done
 
2199
  IFS="$lt_save_ifs"
 
2200
  MAGIC_CMD="$lt_save_MAGIC_CMD"
 
2201
  ;;
 
2202
esac])
 
2203
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 
2204
if test -n "$MAGIC_CMD"; then
 
2205
  AC_MSG_RESULT($MAGIC_CMD)
 
2206
else
 
2207
  AC_MSG_RESULT(no)
 
2208
fi
 
2209
_LT_DECL([], [MAGIC_CMD], [0],
 
2210
         [Used to examine libraries when file_magic_cmd begins "file"])dnl
 
2211
])# AC_PATH_TOOL_PREFIX
 
2212
 
 
2213
 
 
2214
# AC_PATH_MAGIC
 
2215
# -------------
 
2216
# find a file program which can recognise a shared library
 
2217
AC_DEFUN([AC_PATH_MAGIC],
 
2218
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
 
2219
if test -z "$lt_cv_path_MAGIC_CMD"; then
 
2220
  if test -n "$ac_tool_prefix"; then
 
2221
    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
 
2222
  else
 
2223
    MAGIC_CMD=:
 
2224
  fi
 
2225
fi
 
2226
])# AC_PATH_MAGIC
 
2227
 
 
2228
 
 
2229
# AC_PROG_LD
 
2230
# ----------
 
2231
# find the pathname to the GNU or non-GNU linker
 
2232
AC_DEFUN([AC_PROG_LD],
 
2233
[AC_ARG_WITH([gnu-ld],
 
2234
    [AC_HELP_STRING([--with-gnu-ld],
 
2235
        [assume the C compiler uses GNU ld @<:@default=no@:>@])],
 
2236
    [test "$withval" = no || with_gnu_ld=yes],
 
2237
    [with_gnu_ld=no])
 
2238
AC_REQUIRE([LT_AC_PROG_SED])dnl
 
2239
AC_REQUIRE([LT_AC_PROG_EGREP])dnl
 
2240
AC_REQUIRE([AC_PROG_CC])dnl
 
2241
AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
2242
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 
2243
 
 
2244
ac_prog=ld
 
2245
if test "$GCC" = yes; then
 
2246
  # Check if gcc -print-prog-name=ld gives a path.
 
2247
  AC_MSG_CHECKING([for ld used by $CC])
 
2248
  case $host in
 
2249
  *-*-mingw*)
 
2250
    # gcc leaves a trailing carriage return which upsets mingw
 
2251
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
 
2252
  *)
 
2253
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
 
2254
  esac
 
2255
  case $ac_prog in
 
2256
    # Accept absolute paths.
 
2257
    [[\\/]]* | ?:[[\\/]]*)
 
2258
      re_direlt='/[[^/]][[^/]]*/\.\./'
 
2259
      # Canonicalize the pathname of ld
 
2260
      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
 
2261
      while echo $ac_prog | $GREP "$re_direlt" > /dev/null 2>&1; do
 
2262
        ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
 
2263
      done
 
2264
      test -z "$LD" && LD="$ac_prog"
 
2265
      ;;
 
2266
  "")
 
2267
    # If it fails, then pretend we aren't using GCC.
 
2268
    ac_prog=ld
 
2269
    ;;
 
2270
  *)
 
2271
    # If it is relative, then search for the first ld in PATH.
 
2272
    with_gnu_ld=unknown
 
2273
    ;;
 
2274
  esac
 
2275
elif test "$with_gnu_ld" = yes; then
 
2276
  AC_MSG_CHECKING([for GNU ld])
 
2277
else
 
2278
  AC_MSG_CHECKING([for non-GNU ld])
 
2279
fi
 
2280
AC_CACHE_VAL(lt_cv_path_LD,
 
2281
[if test -z "$LD"; then
 
2282
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
2283
  for ac_dir in $PATH; do
 
2284
    IFS="$lt_save_ifs"
 
2285
    test -z "$ac_dir" && ac_dir=.
 
2286
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
 
2287
      lt_cv_path_LD="$ac_dir/$ac_prog"
 
2288
      # Check to see if the program is GNU ld.  I'd rather use --version,
 
2289
      # but apparently some GNU ld's only accept -v.
 
2290
      # Break only if it was the GNU/non-GNU ld that we prefer.
 
2291
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
 
2292
      *GNU* | *'with BFD'*)
 
2293
        test "$with_gnu_ld" != no && break
 
2294
        ;;
 
2295
      *)
 
2296
        test "$with_gnu_ld" != yes && break
 
2297
        ;;
 
2298
      esac
 
2299
    fi
 
2300
  done
 
2301
  IFS="$lt_save_ifs"
 
2302
else
 
2303
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
 
2304
fi])
 
2305
LD="$lt_cv_path_LD"
 
2306
if test -n "$LD"; then
 
2307
  AC_MSG_RESULT($LD)
 
2308
else
 
2309
  AC_MSG_RESULT(no)
 
2310
fi
 
2311
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
 
2312
AC_PROG_LD_GNU
 
2313
AC_SUBST([LD])
 
2314
 
 
2315
_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
 
2316
])# AC_PROG_LD
 
2317
 
 
2318
# Old name:
 
2319
AU_DEFUN([AM_PROG_LD], [AC_PROG_LD])
 
2320
 
 
2321
 
 
2322
# AC_PROG_LD_GNU
 
2323
# --------------
 
2324
AC_DEFUN([AC_PROG_LD_GNU],
 
2325
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
 
2326
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
 
2327
case `$LD -v 2>&1 </dev/null` in
 
2328
*GNU* | *'with BFD'*)
 
2329
  lt_cv_prog_gnu_ld=yes
 
2330
  ;;
 
2331
*)
 
2332
  lt_cv_prog_gnu_ld=no
 
2333
  ;;
 
2334
esac])
 
2335
with_gnu_ld=$lt_cv_prog_gnu_ld
 
2336
])# AC_PROG_LD_GNU
 
2337
 
 
2338
 
 
2339
# AC_PROG_LD_RELOAD_FLAG
 
2340
# ----------------------
 
2341
# find reload flag for linker
 
2342
#   -- PORTME Some linkers may need a different reload flag.
 
2343
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
 
2344
[AC_CACHE_CHECK([for $LD option to reload object files],
 
2345
  lt_cv_ld_reload_flag,
 
2346
  [lt_cv_ld_reload_flag='-r'])
 
2347
reload_flag=$lt_cv_ld_reload_flag
 
2348
case $reload_flag in
 
2349
"" | " "*) ;;
 
2350
*) reload_flag=" $reload_flag" ;;
 
2351
esac
 
2352
reload_cmds='$LD$reload_flag -o $output$reload_objs'
 
2353
case $host_os in
 
2354
  darwin*)
 
2355
    if test "$GCC" = yes; then
 
2356
      reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
 
2357
    else
 
2358
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
 
2359
    fi
 
2360
    ;;
 
2361
esac
 
2362
_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
 
2363
_LT_DECL([], [reload_cmds], [2])dnl
 
2364
])# AC_PROG_LD_RELOAD_FLAG
 
2365
 
 
2366
 
 
2367
# AC_DEPLIBS_CHECK_METHOD
 
2368
# -----------------------
 
2369
# how to check for library dependencies
 
2370
#  -- PORTME fill in with the dynamic library characteristics
 
2371
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
 
2372
[AC_REQUIRE([LT_AC_PROG_EGREP])
 
2373
AC_CACHE_CHECK([how to recognise dependent libraries],
 
2374
lt_cv_deplibs_check_method,
 
2375
[lt_cv_file_magic_cmd='$MAGIC_CMD'
 
2376
lt_cv_file_magic_test_file=
 
2377
lt_cv_deplibs_check_method='unknown'
 
2378
# Need to set the preceding variable on all platforms that support
 
2379
# interlibrary dependencies.
 
2380
# 'none' -- dependencies not supported.
 
2381
# `unknown' -- same as none, but documents that we really don't know.
 
2382
# 'pass_all' -- all dependencies passed with no checks.
 
2383
# 'test_compile' -- check by making test program.
 
2384
# 'file_magic [[regex]]' -- check by looking for files in library path
 
2385
# which responds to the $file_magic_cmd with a given extended regex.
 
2386
# If you have `file' or equivalent on your system and you're not sure
 
2387
# whether `pass_all' will *always* work, you probably want this one.
 
2388
 
 
2389
case $host_os in
 
2390
aix4* | aix5*)
 
2391
  lt_cv_deplibs_check_method=pass_all
 
2392
  ;;
 
2393
 
 
2394
beos*)
 
2395
  lt_cv_deplibs_check_method=pass_all
 
2396
  ;;
 
2397
 
 
2398
bsdi[[45]]*)
 
2399
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
 
2400
  lt_cv_file_magic_cmd='/usr/bin/file -L'
 
2401
  lt_cv_file_magic_test_file=/shlib/libc.so
 
2402
  ;;
 
2403
 
 
2404
cygwin*)
 
2405
  # func_win32_libid is a shell function defined in ltmain.sh
 
2406
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
 
2407
  lt_cv_file_magic_cmd='func_win32_libid'
 
2408
  ;;
 
2409
 
 
2410
  # Base MSYS/MinGW do not provide the 'file' command needed by
 
2411
  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
 
2412
mingw* | pw32*)
 
2413
  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
 
2414
  lt_cv_file_magic_cmd='$OBJDUMP -f'
 
2415
  ;;
 
2416
 
 
2417
darwin* | rhapsody*)
 
2418
  lt_cv_deplibs_check_method=pass_all
 
2419
  ;;
 
2420
 
 
2421
freebsd* | kfreebsd*-gnu)
 
2422
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
 
2423
    case $host_cpu in
 
2424
    i*86 )
 
2425
      # Not sure whether the presence of OpenBSD here was a mistake.
 
2426
      # Let's accept both of them until this is cleared up.
 
2427
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
 
2428
      lt_cv_file_magic_cmd=/usr/bin/file
 
2429
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
 
2430
      ;;
 
2431
    esac
 
2432
  else
 
2433
    lt_cv_deplibs_check_method=pass_all
 
2434
  fi
 
2435
  ;;
 
2436
 
 
2437
gnu*)
 
2438
  lt_cv_deplibs_check_method=pass_all
 
2439
  ;;
 
2440
 
 
2441
hpux10.20* | hpux11*)
 
2442
  lt_cv_file_magic_cmd=/usr/bin/file
 
2443
  case "$host_cpu" in
 
2444
  ia64*)
 
2445
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
 
2446
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
 
2447
    ;;
 
2448
  hppa*64*)
 
2449
    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
 
2450
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
 
2451
    ;;
 
2452
  *)
 
2453
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
 
2454
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
 
2455
    ;;
 
2456
  esac
 
2457
  ;;
 
2458
 
 
2459
irix5* | irix6* | nonstopux*)
 
2460
  case $LD in
 
2461
  *-32|*"-32 ") libmagic=32-bit;;
 
2462
  *-n32|*"-n32 ") libmagic=N32;;
 
2463
  *-64|*"-64 ") libmagic=64-bit;;
 
2464
  *) libmagic=never-match;;
 
2465
  esac
 
2466
  lt_cv_deplibs_check_method=pass_all
 
2467
  ;;
 
2468
 
 
2469
# This must be Linux ELF.
 
2470
linux*)
 
2471
  case $host_cpu in
 
2472
  alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*)
 
2473
    lt_cv_deplibs_check_method=pass_all ;;
 
2474
  *)
 
2475
    # glibc up to 2.1.1 does not perform some relocations on ARM
 
2476
    # this will be overridden with pass_all, but let us keep it just in case
 
2477
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
 
2478
  esac
 
2479
  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
 
2480
  lt_cv_deplibs_check_method=pass_all
 
2481
  ;;
 
2482
 
 
2483
netbsd* | knetbsd*-gnu)
 
2484
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
 
2485
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
 
2486
  else
 
2487
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
 
2488
  fi
 
2489
  ;;
 
2490
 
 
2491
newos6*)
 
2492
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
 
2493
  lt_cv_file_magic_cmd=/usr/bin/file
 
2494
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
 
2495
  ;;
 
2496
 
 
2497
*nto* | *qnx*)
 
2498
  lt_cv_deplibs_check_method=pass_all
 
2499
  ;;
 
2500
 
 
2501
openbsd*)
 
2502
  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
2503
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
 
2504
  else
 
2505
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
 
2506
  fi
 
2507
  ;;
 
2508
 
 
2509
osf3* | osf4* | osf5*)
 
2510
  lt_cv_deplibs_check_method=pass_all
 
2511
  ;;
 
2512
 
 
2513
sco3.2v5*)
 
2514
  lt_cv_deplibs_check_method=pass_all
 
2515
  ;;
 
2516
 
 
2517
solaris*)
 
2518
  lt_cv_deplibs_check_method=pass_all
 
2519
  ;;
 
2520
 
 
2521
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
2522
  case $host_vendor in
 
2523
  motorola)
 
2524
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
 
2525
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
 
2526
    ;;
 
2527
  ncr)
 
2528
    lt_cv_deplibs_check_method=pass_all
 
2529
    ;;
 
2530
  sequent)
 
2531
    lt_cv_file_magic_cmd='/bin/file'
 
2532
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
 
2533
    ;;
 
2534
  sni)
 
2535
    lt_cv_file_magic_cmd='/bin/file'
 
2536
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
 
2537
    lt_cv_file_magic_test_file=/lib/libc.so
 
2538
    ;;
 
2539
  siemens)
 
2540
    lt_cv_deplibs_check_method=pass_all
 
2541
    ;;
 
2542
  esac
 
2543
  ;;
 
2544
 
 
2545
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
 
2546
  lt_cv_deplibs_check_method=pass_all
 
2547
  ;;
 
2548
esac
 
2549
])
 
2550
file_magic_cmd=$lt_cv_file_magic_cmd
 
2551
deplibs_check_method=$lt_cv_deplibs_check_method
 
2552
test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
2553
 
 
2554
_LT_DECL([], [deplibs_check_method], [1],
 
2555
    [Method to check whether dependent libraries are shared objects])
 
2556
_LT_DECL([], [file_magic_cmd], [1],
 
2557
    [Command to use when deplibs_check_method == "file_magic"])
 
2558
])# AC_DEPLIBS_CHECK_METHOD
 
2559
 
 
2560
 
 
2561
# AC_PROG_NM
 
2562
# ----------
 
2563
# find the pathname to a BSD-compatible name lister
 
2564
AC_DEFUN([AC_PROG_NM],
 
2565
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
 
2566
[if test -n "$NM"; then
 
2567
  # Let the user override the test.
 
2568
  lt_cv_path_NM="$NM"
 
2569
else
 
2570
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
2571
  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
 
2572
    IFS="$lt_save_ifs"
 
2573
    test -z "$ac_dir" && ac_dir=.
 
2574
    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
 
2575
    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
 
2576
      # Check to see if the nm accepts a BSD-compat flag.
 
2577
      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
 
2578
      #   nm: unknown option "B" ignored
 
2579
      # Tru64's nm complains that /dev/null is an invalid object file
 
2580
      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
 
2581
      */dev/null* | *'Invalid file or object type'*)
 
2582
        lt_cv_path_NM="$tmp_nm -B"
 
2583
        break
 
2584
        ;;
 
2585
      *)
 
2586
        case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
 
2587
        */dev/null*)
 
2588
          lt_cv_path_NM="$tmp_nm -p"
 
2589
          break
 
2590
          ;;
 
2591
        *)
 
2592
          lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
 
2593
          continue # so that we can try to find one that supports BSD flags
 
2594
          ;;
 
2595
        esac
 
2596
      esac
 
2597
    fi
 
2598
  done
 
2599
  IFS="$lt_save_ifs"
 
2600
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
 
2601
fi])
 
2602
NM="$lt_cv_path_NM"
 
2603
test -z "$NM" && NM=nm
 
2604
AC_SUBST([NM])
 
2605
_LT_DECL([], [NM], [1], [A BSD-compatible nm program])dnl
 
2606
])# AC_PROG_NM
 
2607
 
 
2608
# Old name:
 
2609
AU_DEFUN([AM_PROG_NM], [AC_PROG_NM])
 
2610
 
 
2611
 
 
2612
# AC_CHECK_LIBM
 
2613
# -------------
 
2614
# check for math library
 
2615
AC_DEFUN([AC_CHECK_LIBM],
 
2616
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
2617
LIBM=
 
2618
case $host in
 
2619
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
 
2620
  # These system don't have libm, or don't need it
 
2621
  ;;
 
2622
*-ncr-sysv4.3*)
 
2623
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
 
2624
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
 
2625
  ;;
 
2626
*)
 
2627
  AC_CHECK_LIB(m, cos, LIBM="-lm")
 
2628
  ;;
 
2629
esac
 
2630
])# AC_CHECK_LIBM
 
2631
 
 
2632
 
 
2633
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
 
2634
# -------------------------------------------
 
2635
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
 
2636
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
 
2637
 
 
2638
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
2639
 
 
2640
if test "$GCC" = yes; then
 
2641
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
2642
 
 
2643
  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
 
2644
    lt_cv_prog_compiler_rtti_exceptions,
 
2645
    [-fno-rtti -fno-exceptions], [],
 
2646
    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
 
2647
fi
 
2648
_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
 
2649
        [Compiler flag to turn off builtin functions])
 
2650
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
 
2651
 
 
2652
 
 
2653
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
2654
# ---------------------------------
 
2655
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
 
2656
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
 
2657
AC_REQUIRE([LT_AC_PROG_EGREP])dnl
 
2658
AC_REQUIRE([AC_PROG_CC])dnl
 
2659
AC_REQUIRE([AC_PROG_LD])dnl
 
2660
AC_REQUIRE([AC_PROG_NM])dnl
 
2661
AC_REQUIRE([AC_OBJEXT])dnl
 
2662
# Check for command to grab the raw symbol name followed by C symbol from nm.
 
2663
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
 
2664
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
 
2665
[
 
2666
# These are sane defaults that work on at least a few old systems.
 
2667
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
 
2668
 
 
2669
# Character class describing NM global symbol codes.
 
2670
symcode='[[BCDEGRST]]'
 
2671
 
 
2672
# Regexp to match symbols that can be accessed directly from C.
 
2673
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
 
2674
 
 
2675
# Transform the above into a raw symbol and a C symbol.
 
2676
symxfrm='\1 \2\3 \3'
 
2677
 
 
2678
# Transform an extracted symbol line into a proper C declaration
 
2679
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
 
2680
 
 
2681
# Transform an extracted symbol line into symbol name and symbol address
 
2682
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
 
2683
 
 
2684
# Define system-specific variables.
 
2685
case $host_os in
 
2686
aix*)
 
2687
  symcode='[[BCDT]]'
 
2688
  ;;
 
2689
cygwin* | mingw* | pw32*)
 
2690
  symcode='[[ABCDGISTW]]'
 
2691
  ;;
 
2692
hpux*) # Its linker distinguishes data from code symbols
 
2693
  if test "$host_cpu" = ia64; then
 
2694
    symcode='[[ABCDEGRST]]'
 
2695
  fi
 
2696
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
2697
  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
 
2698
  ;;
 
2699
irix* | nonstopux*)
 
2700
  symcode='[[BCDEGRST]]'
 
2701
  ;;
 
2702
osf*)
 
2703
  symcode='[[BCDEGQRST]]'
 
2704
  ;;
 
2705
solaris* | sysv5*)
 
2706
  symcode='[[BDRT]]'
 
2707
  ;;
 
2708
sysv4)
 
2709
  symcode='[[DFNSTU]]'
 
2710
  ;;
 
2711
esac
 
2712
 
 
2713
# Handle CRLF in mingw tool chain
 
2714
opt_cr=
 
2715
case $build_os in
 
2716
mingw*)
 
2717
  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
 
2718
  ;;
 
2719
esac
 
2720
 
 
2721
# If we're using GNU nm, then use its standard symbol codes.
 
2722
case `$NM -V 2>&1` in
 
2723
*GNU* | *'with BFD'*)
 
2724
  symcode='[[ABCDGIRSTW]]' ;;
 
2725
esac
 
2726
 
 
2727
# Try without a prefix undercore, then with it.
 
2728
for ac_symprfx in "" "_"; do
 
2729
 
 
2730
  # Write the raw and C identifiers.
 
2731
  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[      ]]\($symcode$symcode*\)[[       ]][[    ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
 
2732
 
 
2733
  # Check to see that the pipe works correctly.
 
2734
  pipe_works=no
 
2735
 
 
2736
  rm -f conftest*
 
2737
  cat > conftest.$ac_ext <<_LT_EOF
 
2738
#ifdef __cplusplus
 
2739
extern "C" {
 
2740
#endif
 
2741
char nm_test_var;
 
2742
void nm_test_func(){}
 
2743
#ifdef __cplusplus
 
2744
}
 
2745
#endif
 
2746
int main(){nm_test_var='a';nm_test_func();return(0);}
 
2747
_LT_EOF
 
2748
 
 
2749
  if AC_TRY_EVAL(ac_compile); then
 
2750
    # Now try to grab the symbols.
 
2751
    nlist=conftest.nm
 
2752
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
 
2753
      # Try sorting and uniquifying the output.
 
2754
      if sort "$nlist" | uniq > "$nlist"T; then
 
2755
        mv -f "$nlist"T "$nlist"
 
2756
      else
 
2757
        rm -f "$nlist"T
 
2758
      fi
 
2759
 
 
2760
      # Make sure that we snagged all the symbols we need.
 
2761
      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
 
2762
        if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
 
2763
          cat <<_LT_EOF > conftest.$ac_ext
 
2764
#ifdef __cplusplus
 
2765
extern "C" {
 
2766
#endif
 
2767
 
 
2768
_LT_EOF
 
2769
          # Now generate the symbol file.
 
2770
          eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
 
2771
 
 
2772
          cat <<_LT_EOF >> conftest.$ac_ext
 
2773
 
 
2774
/* The mapping between symbol names and symbols.  */
 
2775
const struct {
 
2776
  const char *originator;
 
2777
  const struct {
 
2778
    const char *name;
 
2779
    void       *address;
 
2780
  } symbols[[]];
 
2781
}
 
2782
lt__PROGRAM__LTX_preloaded_symbols =
 
2783
{
 
2784
  "@PROGRAM@",
 
2785
  {
 
2786
_LT_EOF
 
2787
          $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
 
2788
          cat <<\_LT_EOF >> conftest.$ac_ext
 
2789
  {0, (void *) 0}
 
2790
  }
 
2791
};
 
2792
 
 
2793
/* This works around a problem in FreeBSD linker */
 
2794
#ifdef FREEBSD_WORKAROUND
 
2795
static const void *lt_preloaded_setup() {
 
2796
  return lt__PROGRAM__LTX_preloaded_symbols;
 
2797
}
 
2798
#endif
 
2799
 
 
2800
#ifdef __cplusplus
 
2801
}
 
2802
#endif
 
2803
_LT_EOF
 
2804
          # Now try linking the two files.
 
2805
          mv conftest.$ac_objext conftstm.$ac_objext
 
2806
          lt_save_LIBS="$LIBS"
 
2807
          lt_save_CFLAGS="$CFLAGS"
 
2808
          LIBS="conftstm.$ac_objext"
 
2809
          CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
 
2810
          if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
 
2811
            pipe_works=yes
 
2812
          fi
 
2813
          LIBS="$lt_save_LIBS"
 
2814
          CFLAGS="$lt_save_CFLAGS"
 
2815
        else
 
2816
          echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
 
2817
        fi
 
2818
      else
 
2819
        echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
 
2820
      fi
 
2821
    else
 
2822
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
 
2823
    fi
 
2824
  else
 
2825
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
 
2826
    cat conftest.$ac_ext >&5
 
2827
  fi
 
2828
  rm -f conftest* conftst*
 
2829
 
 
2830
  # Do not use the global_symbol_pipe unless it works.
 
2831
  if test "$pipe_works" = yes; then
 
2832
    break
 
2833
  else
 
2834
    lt_cv_sys_global_symbol_pipe=
 
2835
  fi
 
2836
done
 
2837
])
 
2838
if test -z "$lt_cv_sys_global_symbol_pipe"; then
 
2839
  lt_cv_sys_global_symbol_to_cdecl=
 
2840
fi
 
2841
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
 
2842
  AC_MSG_RESULT(failed)
 
2843
else
 
2844
  AC_MSG_RESULT(ok)
 
2845
fi
 
2846
 
 
2847
_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
 
2848
    [Take the output of nm and produce a listing of raw symbols and C names])
 
2849
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
 
2850
    [Transform the output of nm in a proper C declaration])
 
2851
_LT_DECL([global_symbol_to_c_name_address],
 
2852
    [lt_cv_sys_global_symbol_to_c_name_address], [1],
 
2853
    [Transform the output of nm in a C name address pair])
 
2854
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
 
2855
 
 
2856
 
 
2857
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
 
2858
# ---------------------------------------
 
2859
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
 
2860
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
 
2861
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
2862
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
 
2863
 
 
2864
AC_MSG_CHECKING([for $compiler option to produce PIC])
 
2865
m4_if([$1], [CXX], [
 
2866
  # C++ specific cases for pic, static, wl, etc.
 
2867
  if test "$GXX" = yes; then
 
2868
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
2869
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
2870
 
 
2871
    case $host_os in
 
2872
    aix*)
 
2873
      # All AIX code is PIC.
 
2874
      if test "$host_cpu" = ia64; then
 
2875
        # AIX 5 now supports IA64 processor
 
2876
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
2877
      fi
 
2878
      ;;
 
2879
    amigaos*)
 
2880
      if test "$host_cpu" = m68k; then
 
2881
        # FIXME: we need at least 68020 code to build shared libraries, but
 
2882
        # adding the `-m68020' flag to GCC prevents building anything better,
 
2883
        # like `-m68040'.
 
2884
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
 
2885
      fi
 
2886
      ;;
 
2887
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
2888
      # PIC is the default for these OSes.
 
2889
      ;;
 
2890
    mingw* | os2* | pw32*)
 
2891
      # This hack is so that the source file can tell whether it is being
 
2892
      # built for inclusion in a dll (and should export symbols for example).
 
2893
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
2894
      ;;
 
2895
    darwin* | rhapsody*)
 
2896
      # PIC is the default on this platform
 
2897
      # Common symbols not allowed in MH_DYLIB files
 
2898
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
 
2899
      ;;
 
2900
    *djgpp*)
 
2901
      # DJGPP does not support shared libraries at all
 
2902
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
2903
      ;;
 
2904
    sysv4*MP*)
 
2905
      if test -d /usr/nec; then
 
2906
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
 
2907
      fi
 
2908
      ;;
 
2909
    hpux*)
 
2910
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
2911
      # not for PA HP-UX.
 
2912
      case "$host_cpu" in
 
2913
      hppa*64*|ia64*)
 
2914
        ;;
 
2915
      *)
 
2916
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
2917
        ;;
 
2918
      esac
 
2919
      ;;
 
2920
    *qnx* | *nto*)
 
2921
      # QNX uses GNU C++, but need to define -shared option too, otherwise
 
2922
      # it will coredump.
 
2923
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
 
2924
      ;;
 
2925
    *)
 
2926
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
2927
      ;;
 
2928
    esac
 
2929
  else
 
2930
    case $host_os in
 
2931
      aix4* | aix5*)
 
2932
        # All AIX code is PIC.
 
2933
        if test "$host_cpu" = ia64; then
 
2934
          # AIX 5 now supports IA64 processor
 
2935
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
2936
        else
 
2937
          _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
 
2938
        fi
 
2939
        ;;
 
2940
      chorus*)
 
2941
        case $cc_basename in
 
2942
        cxch68)
 
2943
          # Green Hills C++ Compiler
 
2944
          # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
 
2945
          ;;
 
2946
        esac
 
2947
        ;;
 
2948
       darwin*)
 
2949
         # PIC is the default on this platform
 
2950
         # Common symbols not allowed in MH_DYLIB files
 
2951
         case "$cc_basename" in
 
2952
           xlc*)
 
2953
           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
 
2954
           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
2955
           ;;
 
2956
         esac
 
2957
       ;;
 
2958
      dgux*)
 
2959
        case $cc_basename in
 
2960
          ec++)
 
2961
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
2962
            ;;
 
2963
          ghcx)
 
2964
            # Green Hills C++ Compiler
 
2965
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
2966
            ;;
 
2967
          *)
 
2968
            ;;
 
2969
        esac
 
2970
        ;;
 
2971
      freebsd* | kfreebsd*-gnu)
 
2972
        # FreeBSD uses GNU C++
 
2973
        ;;
 
2974
      hpux9* | hpux10* | hpux11*)
 
2975
        case $cc_basename in
 
2976
          CC)
 
2977
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
2978
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
 
2979
            if test "$host_cpu" != ia64; then
 
2980
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
2981
            fi
 
2982
            ;;
 
2983
          aCC)
 
2984
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
2985
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
 
2986
            case "$host_cpu" in
 
2987
            hppa*64*|ia64*)
 
2988
              # +Z the default
 
2989
              ;;
 
2990
            *)
 
2991
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
2992
              ;;
 
2993
            esac
 
2994
            ;;
 
2995
          *)
 
2996
            ;;
 
2997
        esac
 
2998
        ;;
 
2999
      irix5* | irix6* | nonstopux*)
 
3000
        case $cc_basename in
 
3001
          CC)
 
3002
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
3003
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
3004
            # CC pic flag -KPIC is the default.
 
3005
            ;;
 
3006
          *)
 
3007
            ;;
 
3008
        esac
 
3009
        ;;
 
3010
      linux*)
 
3011
        case $cc_basename in
 
3012
          KCC)
 
3013
            # KAI C++ Compiler
 
3014
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 
3015
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
3016
            ;;
 
3017
          icpc)
 
3018
            # Intel C++
 
3019
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
3020
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
3021
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
3022
            ;;
 
3023
          cxx)
 
3024
            # Compaq C++
 
3025
            # Make sure the PIC flag is empty.  It appears that all Alpha
 
3026
            # Linux and Compaq Tru64 Unix objects are PIC.
 
3027
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
3028
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
3029
            ;;
 
3030
          *)
 
3031
            ;;
 
3032
        esac
 
3033
        ;;
 
3034
      lynxos*)
 
3035
        ;;
 
3036
      m88k*)
 
3037
        ;;
 
3038
      mvs*)
 
3039
        case $cc_basename in
 
3040
          cxx)
 
3041
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
 
3042
            ;;
 
3043
          *)
 
3044
            ;;
 
3045
        esac
 
3046
        ;;
 
3047
      netbsd*)
 
3048
        ;;
 
3049
      *qnx* | *nto*)
 
3050
        # QNX uses GNU C++, but need to define -shared option too, otherwise
 
3051
        # it will coredump.
 
3052
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
 
3053
        ;;
 
3054
      osf3* | osf4* | osf5*)
 
3055
        case $cc_basename in
 
3056
          KCC)
 
3057
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
 
3058
            ;;
 
3059
          RCC)
 
3060
            # Rational C++ 2.4.1
 
3061
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
3062
            ;;
 
3063
          cxx)
 
3064
            # Digital/Compaq C++
 
3065
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
3066
            # Make sure the PIC flag is empty.  It appears that all Alpha
 
3067
            # Linux and Compaq Tru64 Unix objects are PIC.
 
3068
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
3069
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
3070
            ;;
 
3071
          *)
 
3072
            ;;
 
3073
        esac
 
3074
        ;;
 
3075
      psos*)
 
3076
        ;;
 
3077
      sco*)
 
3078
        case $cc_basename in
 
3079
          CC)
 
3080
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
3081
            ;;
 
3082
          *)
 
3083
            ;;
 
3084
        esac
 
3085
        ;;
 
3086
      solaris*)
 
3087
        case $cc_basename in
 
3088
          CC)
 
3089
            # Sun C++ 4.2, 5.x and Centerline C++
 
3090
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
3091
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
3092
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
3093
            ;;
 
3094
          gcx)
 
3095
            # Green Hills C++ Compiler
 
3096
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
3097
            ;;
 
3098
          *)
 
3099
            ;;
 
3100
        esac
 
3101
        ;;
 
3102
      sunos4*)
 
3103
        case $cc_basename in
 
3104
          CC)
 
3105
            # Sun C++ 4.x
 
3106
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
3107
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
3108
            ;;
 
3109
          lcc)
 
3110
            # Lucid
 
3111
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
3112
            ;;
 
3113
          *)
 
3114
            ;;
 
3115
        esac
 
3116
        ;;
 
3117
      tandem*)
 
3118
        case $cc_basename in
 
3119
          NCC)
 
3120
            # NonStop-UX NCC 3.20
 
3121
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
3122
            ;;
 
3123
          *)
 
3124
            ;;
 
3125
        esac
 
3126
        ;;
 
3127
      unixware*)
 
3128
        ;;
 
3129
      vxworks*)
 
3130
        ;;
 
3131
      *)
 
3132
        _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
3133
        ;;
 
3134
    esac
 
3135
  fi
 
3136
],
 
3137
[
 
3138
  if test "$GCC" = yes; then
 
3139
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
3140
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
3141
 
 
3142
    case $host_os in
 
3143
      aix*)
 
3144
      # All AIX code is PIC.
 
3145
      if test "$host_cpu" = ia64; then
 
3146
        # AIX 5 now supports IA64 processor
 
3147
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
3148
      fi
 
3149
      ;;
 
3150
 
 
3151
    amigaos*)
 
3152
      if test "$host_cpu" = m68k; then
 
3153
        # FIXME: we need at least 68020 code to build shared libraries, but
 
3154
        # adding the `-m68020' flag to GCC prevents building anything better,
 
3155
        # like `-m68040'.
 
3156
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
 
3157
      fi
 
3158
      ;;
 
3159
 
 
3160
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 
3161
      # PIC is the default for these OSes.
 
3162
      ;;
 
3163
 
 
3164
    mingw* | pw32* | os2*)
 
3165
      # This hack is so that the source file can tell whether it is being
 
3166
      # built for inclusion in a dll (and should export symbols for example).
 
3167
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
3168
      ;;
 
3169
 
 
3170
    darwin* | rhapsody*)
 
3171
      # PIC is the default on this platform
 
3172
      # Common symbols not allowed in MH_DYLIB files
 
3173
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
 
3174
      ;;
 
3175
 
 
3176
    hpux*)
 
3177
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
3178
      # not for PA HP-UX.
 
3179
      case "$host_cpu" in
 
3180
      hppa*64*|ia64*)
 
3181
        # +Z the default
 
3182
        ;;
 
3183
      *)
 
3184
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
3185
        ;;
 
3186
      esac
 
3187
      ;;
 
3188
 
 
3189
    msdosdjgpp*)
 
3190
      # Just because we use GCC doesn't mean we suddenly get shared libraries
 
3191
      # on systems that don't support them.
 
3192
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
3193
      enable_shared=no
 
3194
      ;;
 
3195
 
 
3196
    *nto* | *qnx*)
 
3197
      # QNX uses GNU C++, but need to define -shared option too, otherwise
 
3198
      # it will coredump.
 
3199
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
 
3200
      ;;
 
3201
 
 
3202
    sysv4*MP*)
 
3203
      if test -d /usr/nec; then
 
3204
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
 
3205
      fi
 
3206
      ;;
 
3207
 
 
3208
    *)
 
3209
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 
3210
      ;;
 
3211
    esac
 
3212
  else
 
3213
    # PORTME Check for flag to pass linker flags through the system compiler.
 
3214
    case $host_os in
 
3215
    aix*)
 
3216
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
3217
      if test "$host_cpu" = ia64; then
 
3218
        # AIX 5 now supports IA64 processor
 
3219
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
3220
      else
 
3221
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
 
3222
      fi
 
3223
      ;;
 
3224
      darwin*)
 
3225
        # PIC is the default on this platform
 
3226
        # Common symbols not allowed in MH_DYLIB files
 
3227
       case "$cc_basename" in
 
3228
         xlc*)
 
3229
         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
 
3230
         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
3231
         ;;
 
3232
       esac
 
3233
       ;;
 
3234
 
 
3235
    mingw* | pw32* | os2*)
 
3236
      # This hack is so that the source file can tell whether it is being
 
3237
      # built for inclusion in a dll (and should export symbols for example).
 
3238
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
 
3239
      ;;
 
3240
 
 
3241
    hpux9* | hpux10* | hpux11*)
 
3242
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
3243
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
 
3244
      # not for PA HP-UX.
 
3245
      case "$host_cpu" in
 
3246
      hppa*64*|ia64*)
 
3247
        # +Z the default
 
3248
        ;;
 
3249
      *)
 
3250
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
 
3251
        ;;
 
3252
      esac
 
3253
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
 
3254
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 
3255
      ;;
 
3256
 
 
3257
    irix5* | irix6* | nonstopux*)
 
3258
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
3259
      # PIC (with -KPIC) is the default.
 
3260
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
3261
      ;;
 
3262
 
 
3263
    linux*)
 
3264
      case $CC in
 
3265
      icc* | ecc*)
 
3266
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
3267
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
3268
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
 
3269
        ;;
 
3270
      ccc*)
 
3271
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
3272
        # All Alpha code is PIC.
 
3273
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
3274
        ;;
 
3275
      esac
 
3276
      ;;
 
3277
 
 
3278
    newsos6)
 
3279
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
3280
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
3281
      ;;
 
3282
 
 
3283
    *nto* | *qnx*)
 
3284
      # QNX uses GNU C++, but need to define -shared option too, otherwise
 
3285
      # it will coredump.
 
3286
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
 
3287
      ;;
 
3288
 
 
3289
    osf3* | osf4* | osf5*)
 
3290
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
3291
      # All OSF/1 code is PIC.
 
3292
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
 
3293
      ;;
 
3294
 
 
3295
    sco3.2v5*)
 
3296
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
 
3297
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
 
3298
      ;;
 
3299
 
 
3300
    solaris*)
 
3301
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
3302
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
3303
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
3304
      ;;
 
3305
 
 
3306
    sunos4*)
 
3307
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
 
3308
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
 
3309
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
3310
      ;;
 
3311
 
 
3312
    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
3313
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
3314
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
3315
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
3316
      ;;
 
3317
 
 
3318
    sysv4*MP*)
 
3319
      if test -d /usr/nec ;then
 
3320
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
 
3321
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
3322
      fi
 
3323
      ;;
 
3324
 
 
3325
    uts4*)
 
3326
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
 
3327
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
3328
      ;;
 
3329
 
 
3330
    *)
 
3331
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
3332
      ;;
 
3333
    esac
 
3334
  fi
 
3335
])
 
3336
case "$host_os" in
 
3337
  # For platforms which do not support PIC, -DPIC is meaningless:
 
3338
  *djgpp*)
 
3339
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
3340
    ;;
 
3341
  *)
 
3342
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
 
3343
    ;;
 
3344
esac
 
3345
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
 
3346
_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
 
3347
        [How to pass a linker flag through the compiler])
 
3348
 
 
3349
#
 
3350
# Check to make sure the PIC flag actually works.
 
3351
#
 
3352
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
 
3353
  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
 
3354
    [_LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1)],
 
3355
    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
 
3356
    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
 
3357
     "" | " "*) ;;
 
3358
     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
 
3359
     esac],
 
3360
    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
 
3361
     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
 
3362
fi
 
3363
_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
 
3364
        [Additional compiler flags for building library objects])
 
3365
 
 
3366
#
 
3367
# Check to make sure the static flag actually works.
 
3368
#
 
3369
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
 
3370
  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
 
3371
  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
 
3372
  [],
 
3373
  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
 
3374
_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
 
3375
        [Compiler flag to prevent dynamic linking])
 
3376
])# AC_LIBTOOL_PROG_COMPILER_PIC
 
3377
 
 
3378
 
 
3379
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
 
3380
# ------------------------------------
 
3381
# See if the linker supports building shared libraries.
 
3382
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
 
3383
[AC_REQUIRE([LT_AC_PROG_EGREP])dnl
 
3384
AC_REQUIRE([AC_PROG_LD])dnl
 
3385
AC_REQUIRE([AC_PROG_NM])dnl
 
3386
AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
 
3387
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 
3388
m4_if([$1], [CXX], [
 
3389
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
3390
  case $host_os in
 
3391
  aix4* | aix5*)
 
3392
    # If we're using GNU nm, then we don't want the "-C" option.
 
3393
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
3394
    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
 
3395
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
 
3396
    else
 
3397
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
 
3398
    fi
 
3399
    ;;
 
3400
  pw32*)
 
3401
    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
 
3402
  ;;
 
3403
  cygwin* | mingw*)
 
3404
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
 
3405
  ;;
 
3406
  *)
 
3407
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
3408
  ;;
 
3409
  esac
 
3410
], [
 
3411
  runpath_var=
 
3412
  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
3413
  _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
3414
  _LT_AC_TAGVAR(archive_cmds, $1)=
 
3415
  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
3416
  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
3417
  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
3418
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
 
3419
  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
 
3420
  _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
3421
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
3422
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
3423
  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
3424
  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
3425
  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
3426
  _LT_AC_TAGVAR(inherit_rpath, $1)=no
 
3427
  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
3428
  _LT_AC_TAGVAR(module_cmds, $1)=
 
3429
  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
 
3430
  _LT_AC_TAGVAR(old_archive_from_new_cmds, $1)=
 
3431
  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
 
3432
  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
 
3433
  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
3434
  # include_expsyms should be a list of space-separated symbols to be *always*
 
3435
  # included in the symbol list
 
3436
  _LT_AC_TAGVAR(include_expsyms, $1)=
 
3437
  # exclude_expsyms can be an extended regexp of symbols to exclude
 
3438
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
 
3439
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
 
3440
  # as well as any symbol that contains `d'.
 
3441
  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
 
3442
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
 
3443
  # platforms (ab)use it in PIC code, but their linkers get confused if
 
3444
  # the symbol is explicitly referenced.  Since portable code cannot
 
3445
  # rely on this symbol name, it's probably fine to never include it in
 
3446
  # preloaded symbol tables.
 
3447
  extract_expsyms_cmds=
 
3448
 
 
3449
  case $host_os in
 
3450
  cygwin* | mingw* | pw32*)
 
3451
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
 
3452
    # When not using gcc, we currently assume that we are using
 
3453
    # Microsoft Visual C++.
 
3454
    if test "$GCC" != yes; then
 
3455
      with_gnu_ld=no
 
3456
    fi
 
3457
    ;;
 
3458
  openbsd*)
 
3459
    with_gnu_ld=no
 
3460
    ;;
 
3461
  esac
 
3462
 
 
3463
  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
3464
  if test "$with_gnu_ld" = yes; then
 
3465
    # If archive_cmds runs LD, not CC, wlarc should be empty
 
3466
    wlarc='${wl}'
 
3467
 
 
3468
    # See if GNU ld supports shared libraries.
 
3469
    case $host_os in
 
3470
    aix3* | aix4* | aix5*)
 
3471
      # On AIX/PPC, the GNU linker is very broken
 
3472
      if test "$host_cpu" != ia64; then
 
3473
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3474
        cat <<_LT_EOF 1>&2
 
3475
 
 
3476
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
 
3477
*** to be unable to reliably create shared libraries on AIX.
 
3478
*** Therefore, libtool is disabling shared libraries support.  If you
 
3479
*** really care for shared libraries, you may want to modify your PATH
 
3480
*** so that a non-GNU linker is found, and then restart.
 
3481
 
 
3482
_LT_EOF
 
3483
      fi
 
3484
      ;;
 
3485
 
 
3486
    amigaos*)
 
3487
      if test "$host_cpu" = m68k; then
 
3488
        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
 
3489
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
3490
        _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
3491
      fi
 
3492
 
 
3493
      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
 
3494
      # that the semantics of dynamic libraries on AmigaOS, at least up
 
3495
      # to version 4, is to share data among multiple programs linked
 
3496
      # with the same dynamic library.  Since this doesn't match the
 
3497
      # behavior of shared libraries on other platforms, we can't use
 
3498
      # them.
 
3499
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3500
      ;;
 
3501
 
 
3502
    beos*)
 
3503
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
 
3504
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
3505
        # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
 
3506
        # support --undefined.  This deserves some investigation.  FIXME
 
3507
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
3508
      else
 
3509
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3510
      fi
 
3511
      ;;
 
3512
 
 
3513
    cygwin* | mingw* | pw32*)
 
3514
      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 
3515
      # as there is no search path for DLLs.
 
3516
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
3517
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
3518
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
3519
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
3520
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
 
3521
 
 
3522
      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
 
3523
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
 
3524
        # If the export-symbols file already is a .def file (1st line
 
3525
        # is EXPORTS), use it as is; otherwise, prepend...
 
3526
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
3527
          cp $export_symbols $output_objdir/$soname.def;
 
3528
        else
 
3529
          echo EXPORTS > $output_objdir/$soname.def;
 
3530
          cat $export_symbols >> $output_objdir/$soname.def;
 
3531
        fi~
 
3532
        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
 
3533
      else
 
3534
        ld_shlibs=no
 
3535
      fi
 
3536
      ;;
 
3537
 
 
3538
    netbsd*)
 
3539
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 
3540
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 
3541
        wlarc=
 
3542
      else
 
3543
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
3544
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
3545
      fi
 
3546
      ;;
 
3547
 
 
3548
    solaris* | sysv5*)
 
3549
      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
 
3550
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3551
        cat <<_LT_EOF 1>&2
 
3552
 
 
3553
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
 
3554
*** create shared libraries on Solaris systems.  Therefore, libtool
 
3555
*** is disabling shared libraries support.  We urge you to upgrade GNU
 
3556
*** binutils to release 2.9.1 or newer.  Another option is to modify
 
3557
*** your PATH or compiler configuration so that the native linker is
 
3558
*** used, and then restart.
 
3559
 
 
3560
_LT_EOF
 
3561
      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
 
3562
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
3563
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
3564
      else
 
3565
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3566
      fi
 
3567
      ;;
 
3568
 
 
3569
    sunos4*)
 
3570
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
3571
      wlarc=
 
3572
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
3573
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3574
      ;;
 
3575
 
 
3576
  linux*)
 
3577
    if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null; then
 
3578
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
3579
      case `$LD -v 2>&1` in
 
3580
        *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
 
3581
        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
 
3582
        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
 
3583
        *\ 2.11.*) ;; # other 2.11 versions
 
3584
        *) supports_anon_versioning=yes ;;
 
3585
      esac
 
3586
      if test "x$supports_anon_versioning" = xyes; then
 
3587
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~$echo "local: *; };" >> $output_objdir/$libname.ver~$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
 
3588
      else
 
3589
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)=$_LT_AC_TAGVAR(archive_cmds, $1)
 
3590
      fi
 
3591
    else
 
3592
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3593
    fi
 
3594
    ;;
 
3595
 
 
3596
    *)
 
3597
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
 
3598
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
3599
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
3600
      else
 
3601
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3602
      fi
 
3603
      ;;
 
3604
    esac
 
3605
 
 
3606
    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
 
3607
      runpath_var=LD_RUN_PATH
 
3608
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
3609
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
3610
      # ancient GNU ld didn't support --whole-archive et. al.
 
3611
      if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
 
3612
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
3613
      else
 
3614
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
3615
      fi
 
3616
    fi
 
3617
  else
 
3618
    # PORTME fill in a description of your system's linker (not GNU ld)
 
3619
    case $host_os in
 
3620
    aix3*)
 
3621
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
3622
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
3623
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
 
3624
      # Note: this linker hardcodes the directories in LIBPATH if there
 
3625
      # are no directories specified by -L.
 
3626
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
3627
      if test "$GCC" = yes && test -z "$link_static_flag"; then
 
3628
        # Neither direct hardcoding nor static linking is supported with a
 
3629
        # broken collect2.
 
3630
        _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
3631
      fi
 
3632
      ;;
 
3633
 
 
3634
    aix4* | aix5*)
 
3635
      if test "$host_cpu" = ia64; then
 
3636
        # On IA64, the linker does run time linking by default, so we don't
 
3637
        # have to do anything special.
 
3638
        aix_use_runtimelinking=no
 
3639
        exp_sym_flag='-Bexport'
 
3640
        no_entry_flag=""
 
3641
      else
 
3642
        # If we're using GNU nm, then we don't want the "-C" option.
 
3643
        # -C means demangle to AIX nm, but means don't demangle with GNU nm
 
3644
        if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
 
3645
          _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
 
3646
        else
 
3647
          _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
 
3648
        fi
 
3649
        aix_use_runtimelinking=no
 
3650
 
 
3651
        # Test if we are trying to use run time linking or normal
 
3652
        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
 
3653
        # need to do runtime linking.
 
3654
        case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
 
3655
          for ld_flag in $LDFLAGS; do
 
3656
          if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
 
3657
            aix_use_runtimelinking=yes
 
3658
            break
 
3659
          fi
 
3660
          done
 
3661
        esac
 
3662
 
 
3663
        exp_sym_flag='-bexport'
 
3664
        no_entry_flag='-bnoentry'
 
3665
      fi
 
3666
 
 
3667
      # When large executables or shared objects are built, AIX ld can
 
3668
      # have problems creating the table of contents.  If linking a library
 
3669
      # or program results in "error TOC overflow" add -mminimal-toc to
 
3670
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 
3671
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
3672
 
 
3673
      _LT_AC_TAGVAR(archive_cmds, $1)=''
 
3674
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
3675
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
 
3676
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
3677
 
 
3678
      if test "$GCC" = yes; then
 
3679
        case $host_os in aix4.[012]|aix4.[012].*)
 
3680
        # We only want to do this on AIX 4.2 and lower, the check
 
3681
        # below for broken collect2 doesn't work under 4.3+
 
3682
          collect2name=`${CC} -print-prog-name=collect2`
 
3683
          if test -f "$collect2name" &&
 
3684
           strings "$collect2name" | $GREP resolve_lib_name >/dev/null
 
3685
          then
 
3686
          # We have reworked collect2
 
3687
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
3688
          else
 
3689
          # We have old collect2
 
3690
          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
3691
          # It fails to find uninstalled libraries when the uninstalled
 
3692
          # path is not listed in the libpath.  Setting hardcode_minus_L
 
3693
          # to unsupported forces relinking
 
3694
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
3695
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
3696
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
3697
          fi
 
3698
        esac
 
3699
        shared_flag='-shared'
 
3700
      else
 
3701
        # not using gcc
 
3702
        if test "$host_cpu" = ia64; then
 
3703
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 
3704
        # chokes on -Wl,-G. The following line is correct:
 
3705
          shared_flag='-G'
 
3706
        else
 
3707
        if test "$aix_use_runtimelinking" = yes; then
 
3708
            shared_flag='${wl}-G'
 
3709
          else
 
3710
            shared_flag='${wl}-bM:SRE'
 
3711
        fi
 
3712
        fi
 
3713
      fi
 
3714
 
 
3715
      # It seems that -bexpall does not export symbols beginning with
 
3716
      # underscore (_), so it is better to generate a list of symbols to export.
 
3717
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
3718
      if test "$aix_use_runtimelinking" = yes; then
 
3719
        # Warning - without using the other runtime loading flags (-brtl),
 
3720
        # -berok will link without error, but may produce a broken library.
 
3721
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
 
3722
        # Determine the default libpath from the value encoded in an
 
3723
        # empty executable.
 
3724
       _LT_AC_SYS_LIBPATH_AIX
 
3725
       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
3726
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 
3727
      else
 
3728
        if test "$host_cpu" = ia64; then
 
3729
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 
3730
          _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
 
3731
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
 
3732
        else
 
3733
         # Determine the default libpath from the value encoded in an
 
3734
         # empty executable.
 
3735
         _LT_AC_SYS_LIBPATH_AIX
 
3736
         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
3737
          # Warning - without using the other run time loading flags,
 
3738
          # -berok will link without error, but may produce a broken library.
 
3739
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 
3740
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
 
3741
          # -bexpall does not export symbols beginning with underscore (_)
 
3742
          _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
3743
          # Exported symbols can be pulled into shared objects from archives
 
3744
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
 
3745
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
3746
          # This is similar to how AIX traditionally builds it's shared libraries.
 
3747
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
 
3748
        fi
 
3749
      fi
 
3750
      ;;
 
3751
 
 
3752
    amigaos*)
 
3753
      if test "$host_cpu" = m68k; then
 
3754
        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
 
3755
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
3756
        _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
3757
      fi
 
3758
      # see comment about different semantics on the GNU ld section
 
3759
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3760
      ;;
 
3761
 
 
3762
    bsdi[[45]]*)
 
3763
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
 
3764
      ;;
 
3765
 
 
3766
    cygwin* | mingw* | pw32*)
 
3767
      # When not using gcc, we currently assume that we are using
 
3768
      # Microsoft Visual C++.
 
3769
      # hardcode_libdir_flag_spec is actually meaningless, as there is
 
3770
      # no search path for DLLs.
 
3771
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
 
3772
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
3773
      # Tell ltmain to make .lib files, not .a files.
 
3774
      libext=lib
 
3775
      # Tell ltmain to make .dll files, not .so files.
 
3776
      shrext_cmds=".dll"
 
3777
      # FIXME: Setting linknames here is a bad hack.
 
3778
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
 
3779
      # The linker will automatically build a .lib file if we build a DLL.
 
3780
      _LT_AC_TAGVAR(old_archive_from_new_cmds, $1)='true'
 
3781
      # FIXME: Should let the user specify the lib program.
 
3782
      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
 
3783
      fix_srcfile_path='`cygpath -w "$srcfile"`'
 
3784
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
3785
      ;;
 
3786
 
 
3787
    darwin* | rhapsody*)
 
3788
      case "$host_os" in
 
3789
        rhapsody* | darwin1.[[012]])
 
3790
         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
 
3791
         ;;
 
3792
       *) # Darwin 1.3 on
 
3793
         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
 
3794
           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
 
3795
         else
 
3796
           case ${MACOSX_DEPLOYMENT_TARGET} in
 
3797
             10.[[012]])
 
3798
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
 
3799
               ;;
 
3800
             10.*)
 
3801
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
 
3802
               ;;
 
3803
           esac
 
3804
         fi
 
3805
         ;;
 
3806
      esac
 
3807
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
3808
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
3809
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
 
3810
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
3811
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
 
3812
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
3813
    if test "$GCC" = yes ; then
 
3814
        output_verbose_link_cmd='echo'
 
3815
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 
3816
      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
3817
      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
 
3818
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
3819
      _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
3820
    else
 
3821
      case "$cc_basename" in
 
3822
        xlc*)
 
3823
         output_verbose_link_cmd='echo'
 
3824
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
 
3825
          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
3826
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
 
3827
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
3828
          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
3829
          ;;
 
3830
       *)
 
3831
         _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3832
          ;;
 
3833
      esac
 
3834
    fi
 
3835
      ;;
 
3836
    dgux*)
 
3837
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
3838
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
3839
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3840
      ;;
 
3841
 
 
3842
    freebsd1*)
 
3843
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3844
      ;;
 
3845
 
 
3846
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
 
3847
    # support.  Future versions do this automatically, but an explicit c++rt0.o
 
3848
    # does not break anything, and helps significantly (at the cost of a little
 
3849
    # extra space).
 
3850
    freebsd2.2*)
 
3851
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
 
3852
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
3853
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
3854
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3855
      ;;
 
3856
 
 
3857
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
 
3858
    freebsd2*)
 
3859
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
3860
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
3861
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
3862
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3863
      ;;
 
3864
 
 
3865
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
 
3866
    freebsd* | kfreebsd*-gnu)
 
3867
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
 
3868
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
3869
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
3870
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3871
      ;;
 
3872
 
 
3873
    hpux9*)
 
3874
      if test "$GCC" = yes; then
 
3875
        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
3876
      else
 
3877
        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
3878
      fi
 
3879
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
3880
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3881
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
3882
 
 
3883
      # hardcode_minus_L: Not really in the search PATH,
 
3884
      # but as the default location of the library.
 
3885
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
3886
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
3887
      ;;
 
3888
 
 
3889
    hpux10*)
 
3890
     if test "$GCC" = yes -a "$with_gnu_ld" = no; then
 
3891
       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
3892
     else
 
3893
       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
 
3894
     fi
 
3895
     if test "$with_gnu_ld" = no; then
 
3896
       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
3897
       _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
 
3898
       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3899
       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
3900
       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
3901
       # hardcode_minus_L: Not really in the search PATH,
 
3902
       # but as the default location of the library.
 
3903
       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
3904
     fi
 
3905
     ;;
 
3906
 
 
3907
     hpux11*)
 
3908
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
 
3909
        case "$host_cpu" in
 
3910
        hppa*64*|ia64*)
 
3911
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
3912
          ;;
 
3913
        *)
 
3914
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
3915
          ;;
 
3916
        esac
 
3917
      else
 
3918
        case "$host_cpu" in
 
3919
        hppa*64*|ia64*)
 
3920
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
3921
          ;;
 
3922
        *)
 
3923
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
3924
          ;;
 
3925
        esac
 
3926
      fi
 
3927
      if test "$with_gnu_ld" = no; then
 
3928
        case "$host_cpu" in
 
3929
        hppa*64*)
 
3930
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
3931
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3932
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
3933
          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3934
          ;;
 
3935
        ia64*)
 
3936
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
3937
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
3938
          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3939
 
 
3940
          # hardcode_minus_L: Not really in the search PATH,
 
3941
          # but as the default location of the library.
 
3942
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
3943
          ;;
 
3944
        *)
 
3945
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
3946
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3947
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
3948
          _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
3949
 
 
3950
          # hardcode_minus_L: Not really in the search PATH,
 
3951
          # but as the default location of the library.
 
3952
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
3953
          ;;
 
3954
        esac
 
3955
      fi
 
3956
      ;;
 
3957
 
 
3958
    irix5* | irix6* | nonstopux*)
 
3959
      if test "$GCC" = yes; then
 
3960
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
3961
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
 
3962
      else
 
3963
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 
3964
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
 
3965
      fi
 
3966
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)='no'
 
3967
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
3968
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3969
      _LT_AC_TAGVAR(inherit_rpath, $1)=yes
 
3970
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
3971
      ;;
 
3972
 
 
3973
    netbsd*)
 
3974
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 
3975
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
 
3976
      else
 
3977
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
 
3978
      fi
 
3979
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
3980
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
3981
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3982
      ;;
 
3983
 
 
3984
    newsos6)
 
3985
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
3986
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
3987
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
3988
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3989
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3990
      ;;
 
3991
 
 
3992
    *nto* | *qnx*)
 
3993
      ;;
 
3994
 
 
3995
    openbsd*)
 
3996
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
3997
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
3998
      if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
3999
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
4000
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
 
4001
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
4002
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
4003
      else
 
4004
       case $host_os in
 
4005
         openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
 
4006
           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 
4007
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
4008
           ;;
 
4009
         *)
 
4010
           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
4011
           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
4012
           ;;
 
4013
       esac
 
4014
      fi
 
4015
      ;;
 
4016
 
 
4017
    os2*)
 
4018
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
4019
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
4020
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
4021
      _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
 
4022
      _LT_AC_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
 
4023
      ;;
 
4024
 
 
4025
    osf3*)
 
4026
      if test "$GCC" = yes; then
 
4027
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
4028
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
4029
      else
 
4030
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
4031
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 
4032
      fi
 
4033
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)='no'
 
4034
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
4035
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
4036
      ;;
 
4037
 
 
4038
    osf4* | osf5*)      # as osf3* with the addition of -msym flag
 
4039
      if test "$GCC" = yes; then
 
4040
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
4041
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 
4042
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
4043
      else
 
4044
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
4045
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 
4046
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
 
4047
        $CC -shared${allow_undefined_flag} -input $lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
 
4048
 
 
4049
        # Both c and cxx compiler support -rpath directly
 
4050
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
4051
      fi
 
4052
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)='no'
 
4053
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
4054
      ;;
 
4055
 
 
4056
    sco3.2v5*)
 
4057
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
4058
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
4059
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
 
4060
      runpath_var=LD_RUN_PATH
 
4061
      hardcode_runpath_var=yes
 
4062
      ;;
 
4063
 
 
4064
    solaris*)
 
4065
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
 
4066
      if test "$GCC" = yes; then
 
4067
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
4068
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
4069
          $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
 
4070
      else
 
4071
        case `$CC -V 2>&1` in
 
4072
        *"Compilers 5.0"*)
 
4073
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
4074
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
4075
          $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
 
4076
          ;;
 
4077
        *)
 
4078
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
 
4079
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
4080
          $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
 
4081
          ;;
 
4082
        esac
 
4083
      fi
 
4084
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
4085
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
4086
      case $host_os in
 
4087
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 
4088
      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
 
4089
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
 
4090
      esac
 
4091
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
4092
      ;;
 
4093
 
 
4094
    sunos4*)
 
4095
      if test "x$host_vendor" = xsequent; then
 
4096
        # Use $CC to link under sequent, because it throws in some extra .o
 
4097
        # files that make .init and .fini sections work.
 
4098
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
 
4099
      else
 
4100
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
 
4101
      fi
 
4102
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
4103
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
4104
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
4105
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
4106
      ;;
 
4107
 
 
4108
    sysv4)
 
4109
      case $host_vendor in
 
4110
        sni)
 
4111
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
4112
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
 
4113
        ;;
 
4114
        siemens)
 
4115
          ## LD is ld it makes a PLAMLIB
 
4116
          ## CC just makes a GrossModule.
 
4117
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 
4118
          _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
 
4119
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
4120
        ;;
 
4121
        motorola)
 
4122
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
4123
          _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
 
4124
        ;;
 
4125
      esac
 
4126
      runpath_var='LD_RUN_PATH'
 
4127
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
4128
      ;;
 
4129
 
 
4130
    sysv4.3*)
 
4131
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
4132
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
4133
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
 
4134
      ;;
 
4135
 
 
4136
    sysv4*MP*)
 
4137
      if test -d /usr/nec; then
 
4138
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
4139
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
4140
        runpath_var=LD_RUN_PATH
 
4141
        hardcode_runpath_var=yes
 
4142
        _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
4143
      fi
 
4144
      ;;
 
4145
 
 
4146
    sysv4.2uw2*)
 
4147
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 
4148
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
4149
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
4150
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
4151
      hardcode_runpath_var=yes
 
4152
      runpath_var=LD_RUN_PATH
 
4153
      ;;
 
4154
 
 
4155
   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
 
4156
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
 
4157
      if test "$GCC" = yes; then
 
4158
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
4159
      else
 
4160
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
4161
      fi
 
4162
      runpath_var='LD_RUN_PATH'
 
4163
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
4164
      ;;
 
4165
 
 
4166
    sysv5*)
 
4167
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
 
4168
      # $CC -shared without GNU ld will not create a library from C++
 
4169
      # object files and a static libstdc++, better avoid it by now
 
4170
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
4171
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
4172
                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
 
4173
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
4174
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
4175
      runpath_var='LD_RUN_PATH'
 
4176
      ;;
 
4177
 
 
4178
    uts4*)
 
4179
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 
4180
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
4181
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
4182
      ;;
 
4183
 
 
4184
    *)
 
4185
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4186
      ;;
 
4187
    esac
 
4188
 
 
4189
    if test x$host_vendor = xsni; then
 
4190
      case $host in
 
4191
      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
4192
        export_dynamic_flag_spec='${wl}-Blargedynsym'
 
4193
        ;;
 
4194
      esac
 
4195
    fi
 
4196
  fi
 
4197
])
 
4198
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
 
4199
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
4200
 
 
4201
_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
 
4202
_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
 
4203
_LT_DECL([], [extract_expsyms_cmds], [2],
 
4204
    [The commands to extract the exported symbol list from a shared archive])
 
4205
 
 
4206
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
 
4207
if test "$GCC" = yes; then
 
4208
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 
4209
fi
 
4210
_LT_DECL([], [variables_saved_for_relink], [1],
 
4211
    [Variables whose values should be saved in libtool wrapper scripts and
 
4212
    restored at link time])
 
4213
 
 
4214
#
 
4215
# Do we need to explicitly link libc?
 
4216
#
 
4217
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
 
4218
x|xyes)
 
4219
  # Assume -lc should be added
 
4220
  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
4221
 
 
4222
  if test "$enable_shared" = yes && test "$GCC" = yes; then
 
4223
    case $_LT_AC_TAGVAR(archive_cmds, $1) in
 
4224
    *'~'*)
 
4225
      # FIXME: we may have to deal with multi-command sequences.
 
4226
      ;;
 
4227
    '$CC '*)
 
4228
      # Test whether the compiler implicitly links with -lc since on some
 
4229
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
 
4230
      # to ld, don't add -lc before -lgcc.
 
4231
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
 
4232
      $rm conftest*
 
4233
      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
4234
 
 
4235
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
 
4236
        soname=conftest
 
4237
        lib=conftest
 
4238
        libobjs=conftest.$ac_objext
 
4239
        deplibs=
 
4240
        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
 
4241
        compiler_flags=-v
 
4242
        linker_flags=-v
 
4243
        verstring=
 
4244
        output_objdir=.
 
4245
        libname=conftest
 
4246
        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
 
4247
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
4248
        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
 
4249
        then
 
4250
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
4251
        else
 
4252
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
4253
        fi
 
4254
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
 
4255
      else
 
4256
        cat conftest.err 1>&5
 
4257
      fi
 
4258
      $rm conftest*
 
4259
      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
 
4260
      ;;
 
4261
    esac
 
4262
  fi
 
4263
  ;;
 
4264
esac
 
4265
 
 
4266
_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
 
4267
    [Whether or not to add -lc for building shared libraries])
 
4268
_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
 
4269
    [enable_shared_with_static_runtimes], [0],
 
4270
    [Whether or not to disallow shared libs when runtime libs are static])
 
4271
_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
 
4272
    [Compiler flag to allow reflexive dlopens])
 
4273
_LT_TAGDECL([], [whole_archive_flag_spec], [1],
 
4274
    [Compiler flag to generate shared objects directly from archives])
 
4275
_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
 
4276
    [Create an old-style archive from a shared archive])
 
4277
_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
 
4278
    [Create a temporary old-style archive to link instead of a shared archive])
 
4279
_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
 
4280
_LT_TAGDECL([], [archive_expsym_cmds], [2])
 
4281
_LT_TAGDECL([], [module_cmds], [2],
 
4282
    [Commands used to build a loadable module if different from building
 
4283
    a shared archive.])
 
4284
_LT_TAGDECL([], [module_expsym_cmds], [2])
 
4285
_LT_TAGDECL([], [allow_undefined_flag], [1],
 
4286
    [Flag that allows shared libraries with undefined symbols to be built])
 
4287
_LT_TAGDECL([], [no_undefined_flag], [1],
 
4288
    [Flag that enforces no undefined symbols])
 
4289
_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
 
4290
    [Flag to hardcode $libdir into a binary during linking.
 
4291
    This must work even if $libdir does not exist])
 
4292
_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
 
4293
    [If ld is used when linking, flag to hardcode $libdir into a binary
 
4294
    during linking.  This must work even if $libdir does not exist])
 
4295
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
 
4296
    [Whether we need a single "-rpath" flag with a separated argument])
 
4297
_LT_TAGDECL([], [hardcode_direct], [0],
 
4298
    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
 
4299
    DIR into the resulting binary])
 
4300
_LT_TAGDECL([], [hardcode_minus_L], [0],
 
4301
    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
 
4302
    into the resulting binary])
 
4303
_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
 
4304
    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
 
4305
    into the resulting binary])
 
4306
_LT_TAGDECL([], [hardcode_automatic], [0],
 
4307
    [Set to "yes" if building a shared library automatically hardcodes DIR
 
4308
    into the library and all subsequent libraries and executables linked
 
4309
    against it])
 
4310
_LT_TAGDECL([], [inherit_rpath], [0],
 
4311
    [Set to yes if linker adds runtime paths of dependent libraries
 
4312
    to runtime path list])
 
4313
_LT_TAGDECL([], [link_all_deplibs], [0],
 
4314
    [Whether libtool must link a program against all its dependency libraries])
 
4315
_LT_TAGDECL([], [fix_srcfile_path], [1],
 
4316
    [Fix the shell variable $srcfile for the compiler])
 
4317
_LT_TAGDECL([], [always_export_symbols], [0],
 
4318
    [Set to "yes" if exported symbols are required])
 
4319
_LT_TAGDECL([], [export_symbols_cmds], [2],
 
4320
    [The commands to list exported symbols])
 
4321
_LT_TAGDECL([], [exclude_expsyms], [1],
 
4322
    [Symbols that should not be listed in the preloaded symbols])
 
4323
_LT_TAGDECL([], [include_expsyms], [1],
 
4324
    [Symbols that must always be exported])
 
4325
dnl FIXME: Not yet implemented
 
4326
dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
 
4327
dnl    [Compiler flag to generate thread safe objects])
 
4328
])# AC_LIBTOOL_PROG_LD_SHLIBS
 
4329
 
 
4330
 
 
4331
# _LT_LANG_C_CONFIG([TAG])
 
4332
# ------------------------
 
4333
# Ensure that the configuration variables for a C compiler are suitably
 
4334
# defined.  These variables are subsequently used by _LT_CONFIG to write
 
4335
# the compiler configuration to `libtool'.
 
4336
m4_define([_LT_LANG_C_CONFIG],
 
4337
[AC_REQUIRE([LT_AC_PROG_EGREP])
 
4338
lt_save_CC="$CC"
 
4339
AC_LANG_PUSH(C)
 
4340
 
 
4341
# Source file extension for C test sources.
 
4342
ac_ext=c
 
4343
 
 
4344
# Object file extension for compiled C test sources.
 
4345
objext=o
 
4346
_LT_AC_TAGVAR(objext, $1)=$objext
 
4347
 
 
4348
# Code to be used in simple compile tests
 
4349
lt_simple_compile_test_code="int some_variable = 0;\n"
 
4350
 
 
4351
# Code to be used in simple link tests
 
4352
lt_simple_link_test_code='int main(){return(0);}\n'
 
4353
 
 
4354
_LT_AC_SYS_COMPILER
 
4355
# Save the default compiler, since it gets overwritten when the other
 
4356
# tags are being tested, and _LT_AC_TAGVAR(compiler, []) is a NOP.
 
4357
compiler_DEFAULT=$CC
 
4358
 
 
4359
#
 
4360
# Check for any special shared library compilation flags.
 
4361
#
 
4362
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
 
4363
if test "$GCC" = no; then
 
4364
  case $host_os in
 
4365
  sco3.2v5*)
 
4366
    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
 
4367
    ;;
 
4368
  esac
 
4369
fi
 
4370
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
 
4371
  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
 
4372
  if echo "$old_CC $old_CFLAGS " | $GREP "[[    ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[        ]]" >/dev/null; then :
 
4373
  else
 
4374
    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
 
4375
    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
 
4376
  fi
 
4377
fi
 
4378
 
 
4379
 
 
4380
## CAVEAT EMPTOR:
 
4381
## There is no encapsulation within the following macros, do not change
 
4382
## the running order or otherwise move them around unless you know exactly
 
4383
## what you are doing...
 
4384
if test -n "$compiler"; then
 
4385
  AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
 
4386
  AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
4387
  AC_LIBTOOL_PROG_CC_C_O($1)
 
4388
  AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
4389
  AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
4390
  AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
4391
  AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
4392
  AC_LIBTOOL_SYS_LIB_STRIP
 
4393
  AC_LIBTOOL_DLOPEN_SELF($1)
 
4394
 
 
4395
  # Report which library types will actually be built
 
4396
  AC_MSG_CHECKING([if libtool supports shared libraries])
 
4397
  AC_MSG_RESULT([$can_build_shared])
 
4398
 
 
4399
  AC_MSG_CHECKING([whether to build shared libraries])
 
4400
  test "$can_build_shared" = "no" && enable_shared=no
 
4401
 
 
4402
  # On AIX, shared libraries and static libraries use the same namespace, and
 
4403
  # are all built from PIC.
 
4404
  case "$host_os" in
 
4405
  aix3*)
 
4406
    test "$enable_shared" = yes && enable_static=no
 
4407
    if test -n "$RANLIB"; then
 
4408
      archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
4409
      postinstall_cmds='$RANLIB $lib'
 
4410
    fi
 
4411
    ;;
 
4412
 
 
4413
  aix4* | aix5*)
 
4414
    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
 
4415
      test "$enable_shared" = yes && enable_static=no
 
4416
    fi
 
4417
    ;;
 
4418
  esac
 
4419
  AC_MSG_RESULT([$enable_shared])
 
4420
 
 
4421
  AC_MSG_CHECKING([whether to build static libraries])
 
4422
  # Make sure either enable_shared or enable_static is yes.
 
4423
  test "$enable_shared" = yes || enable_static=yes
 
4424
  AC_MSG_RESULT([$enable_static])
 
4425
 
 
4426
  _LT_CONFIG($1)
 
4427
fi
 
4428
AC_LANG_POP
 
4429
CC="$lt_save_CC"
 
4430
])# _LT_LANG_C_CONFIG
 
4431
 
 
4432
 
 
4433
# _LT_LANG_CXX_CONFIG([TAG])
 
4434
# --------------------------
 
4435
# Ensure that the configuration variables for a C++ compiler are suitably
 
4436
# defined.  These variables are subsequently used by _LT_CONFIG to write
 
4437
# the compiler configuration to `libtool'.
 
4438
m4_define([_LT_LANG_CXX_CONFIG],
 
4439
[AC_LANG_PUSH(C++)
 
4440
AC_REQUIRE([LT_AC_PROG_EGREP])
 
4441
AC_REQUIRE([AC_PROG_CXX])
 
4442
AC_REQUIRE([AC_PROG_CXXCPP])
 
4443
 
 
4444
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
4445
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
4446
_LT_AC_TAGVAR(always_export_symbols, $1)=no
 
4447
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
4448
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
4449
_LT_AC_TAGVAR(hardcode_direct, $1)=no
 
4450
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
4451
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
4452
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
4453
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
4454
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
 
4455
_LT_AC_TAGVAR(inherit_rpath, $1)=no
 
4456
_LT_AC_TAGVAR(module_cmds, $1)=
 
4457
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
 
4458
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
4459
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
4460
_LT_AC_TAGVAR(no_undefined_flag, $1)=
 
4461
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
4462
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
4463
 
 
4464
# Source file extension for C++ test sources.
 
4465
ac_ext=cc
 
4466
 
 
4467
# Object file extension for compiled C++ test sources.
 
4468
objext=o
 
4469
_LT_AC_TAGVAR(objext, $1)=$objext
 
4470
 
 
4471
# Code to be used in simple compile tests
 
4472
lt_simple_compile_test_code="int some_variable = 0;\n"
 
4473
 
 
4474
# Code to be used in simple link tests
 
4475
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
 
4476
 
 
4477
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
4478
_LT_AC_SYS_COMPILER
 
4479
 
 
4480
# Allow CC to be a program name with arguments.
 
4481
lt_save_CC=$CC
 
4482
lt_save_LD=$LD
 
4483
lt_save_GCC=$GCC
 
4484
GCC=$GXX
 
4485
lt_save_with_gnu_ld=$with_gnu_ld
 
4486
lt_save_path_LD=$lt_cv_path_LD
 
4487
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
 
4488
  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
 
4489
else
 
4490
  unset lt_cv_prog_gnu_ld
 
4491
fi
 
4492
if test -n "${lt_cv_path_LDCXX+set}"; then
 
4493
  lt_cv_path_LD=$lt_cv_path_LDCXX
 
4494
else
 
4495
  unset lt_cv_path_LD
 
4496
fi
 
4497
test -z "${LDCXX+set}" || LD=$LDCXX
 
4498
CC=${CXX-"c++"}
 
4499
compiler=$CC
 
4500
_LT_AC_TAGVAR(compiler, $1)=$CC
 
4501
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
 
4502
 
 
4503
if test -n "$compiler"; then
 
4504
  # We don't want -fno-exception when compiling C++ code, so set the
 
4505
  # no_builtin_flag separately
 
4506
  if test "$GXX" = yes; then
 
4507
    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
4508
  else
 
4509
    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
4510
  fi
 
4511
 
 
4512
  if test "$GXX" = yes; then
 
4513
    # Set up default GNU C++ configuration
 
4514
 
 
4515
    AC_PROG_LD
 
4516
 
 
4517
    # Check if GNU C++ uses GNU ld as the underlying linker, since the
 
4518
    # archiving commands below assume that GNU ld is being used.
 
4519
    if test "$with_gnu_ld" = yes; then
 
4520
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
4521
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
4522
 
 
4523
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
4524
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
4525
 
 
4526
      # If archive_cmds runs LD, not CC, wlarc should be empty
 
4527
      # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
 
4528
      #     investigate it a little bit more. (MM)
 
4529
      wlarc='${wl}'
 
4530
 
 
4531
      # ancient GNU ld didn't support --whole-archive et. al.
 
4532
      if eval "`$CC -print-prog-name=ld` --help 2>&1" |
 
4533
        $GREP 'no-whole-archive' > /dev/null; then
 
4534
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
4535
      else
 
4536
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
4537
      fi
 
4538
    else
 
4539
      with_gnu_ld=no
 
4540
      wlarc=
 
4541
 
 
4542
      # A generic and very simple default shared library creation
 
4543
      # command for GNU C++ for the case where it uses the native
 
4544
      # linker, instead of GNU ld.  If possible, this setting should
 
4545
      # overridden to take advantage of the native linker features on
 
4546
      # the platform it is being used on.
 
4547
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
 
4548
    fi
 
4549
 
 
4550
    # Commands to make compiler produce verbose output that lists
 
4551
    # what "hidden" libraries, object files and flags are used when
 
4552
    # linking a shared library.
 
4553
    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
 
4554
 
 
4555
  else
 
4556
    GXX=no
 
4557
    with_gnu_ld=no
 
4558
    wlarc=
 
4559
  fi
 
4560
 
 
4561
  # PORTME: fill in a description of your system's C++ link characteristics
 
4562
  AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
 
4563
  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
4564
  case $host_os in
 
4565
    aix3*)
 
4566
      # FIXME: insert proper C++ library support
 
4567
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4568
      ;;
 
4569
    aix4* | aix5*)
 
4570
      if test "$host_cpu" = ia64; then
 
4571
        # On IA64, the linker does run time linking by default, so we don't
 
4572
        # have to do anything special.
 
4573
        aix_use_runtimelinking=no
 
4574
        exp_sym_flag='-Bexport'
 
4575
        no_entry_flag=""
 
4576
      else
 
4577
        aix_use_runtimelinking=no
 
4578
 
 
4579
        # Test if we are trying to use run time linking or normal
 
4580
        # AIX style linking. If -brtl is somewhere in LDFLAGS, we
 
4581
        # need to do runtime linking.
 
4582
        case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
 
4583
        for ld_flag in $LDFLAGS; do
 
4584
          case $ld_flag in
 
4585
          *-brtl*)
 
4586
            aix_use_runtimelinking=yes
 
4587
            break
 
4588
            ;;
 
4589
          esac
 
4590
        done
 
4591
        esac
 
4592
 
 
4593
        exp_sym_flag='-bexport'
 
4594
        no_entry_flag='-bnoentry'
 
4595
      fi
 
4596
 
 
4597
      # When large executables or shared objects are built, AIX ld can
 
4598
      # have problems creating the table of contents.  If linking a library
 
4599
      # or program results in "error TOC overflow" add -mminimal-toc to
 
4600
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 
4601
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
4602
 
 
4603
      _LT_AC_TAGVAR(archive_cmds, $1)=''
 
4604
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
4605
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
 
4606
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
4607
 
 
4608
      if test "$GXX" = yes; then
 
4609
        case $host_os in aix4.[012]|aix4.[012].*)
 
4610
        # We only want to do this on AIX 4.2 and lower, the check
 
4611
        # below for broken collect2 doesn't work under 4.3+
 
4612
        collect2name=`${CC} -print-prog-name=collect2`
 
4613
        if test -f "$collect2name" &&
 
4614
           strings "$collect2name" | $GREP resolve_lib_name >/dev/null
 
4615
        then
 
4616
          # We have reworked collect2
 
4617
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
4618
        else
 
4619
          # We have old collect2
 
4620
          _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
 
4621
          # It fails to find uninstalled libraries when the uninstalled
 
4622
          # path is not listed in the libpath.  Setting hardcode_minus_L
 
4623
          # to unsupported forces relinking
 
4624
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
4625
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
4626
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
4627
        fi
 
4628
        esac
 
4629
        shared_flag='-shared'
 
4630
      else
 
4631
        # not using gcc
 
4632
        if test "$host_cpu" = ia64; then
 
4633
        # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
 
4634
        # chokes on -Wl,-G. The following line is correct:
 
4635
        shared_flag='-G'
 
4636
        else
 
4637
        if test "$aix_use_runtimelinking" = yes; then
 
4638
          shared_flag='${wl}-G'
 
4639
        else
 
4640
          shared_flag='${wl}-bM:SRE'
 
4641
        fi
 
4642
        fi
 
4643
      fi
 
4644
 
 
4645
      # It seems that -bexpall does not export symbols beginning with
 
4646
      # underscore (_), so it is better to generate a list of symbols to export.
 
4647
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
4648
      if test "$aix_use_runtimelinking" = yes; then
 
4649
        # Warning - without using the other runtime loading flags (-brtl),
 
4650
        # -berok will link without error, but may produce a broken library.
 
4651
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
 
4652
        # Determine the default libpath from the value encoded in an empty
 
4653
        # executable.
 
4654
        _LT_AC_SYS_LIBPATH_AIX
 
4655
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
4656
 
 
4657
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
 
4658
       else
 
4659
        if test "$host_cpu" = ia64; then
 
4660
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
 
4661
        _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
 
4662
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
 
4663
        else
 
4664
        # Determine the default libpath from the value encoded in an
 
4665
        # empty executable.
 
4666
        _LT_AC_SYS_LIBPATH_AIX
 
4667
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
 
4668
        # Warning - without using the other run time loading flags,
 
4669
        # -berok will link without error, but may produce a broken library.
 
4670
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
 
4671
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
 
4672
        # -bexpall does not export symbols beginning with underscore (_)
 
4673
        _LT_AC_TAGVAR(always_export_symbols, $1)=yes
 
4674
        # Exported symbols can be pulled into shared objects from archives
 
4675
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
 
4676
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
 
4677
        # This is similar to how AIX traditionally builds it's shared libraries.
 
4678
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
 
4679
        fi
 
4680
      fi
 
4681
      ;;
 
4682
    chorus*)
 
4683
      case $cc_basename in
 
4684
        *)
 
4685
        # FIXME: insert proper C++ library support
 
4686
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4687
        ;;
 
4688
      esac
 
4689
      ;;
 
4690
 
 
4691
    cygwin* | mingw* | pw32*)
 
4692
      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
 
4693
      # as there is no search path for DLLs.
 
4694
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
4695
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
4696
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
 
4697
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
 
4698
 
 
4699
      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
 
4700
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
 
4701
        # If the export-symbols file already is a .def file (1st line
 
4702
        # is EXPORTS), use it as is; otherwise, prepend...
 
4703
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
 
4704
        cp $export_symbols $output_objdir/$soname.def;
 
4705
        else
 
4706
        echo EXPORTS > $output_objdir/$soname.def;
 
4707
        cat $export_symbols >> $output_objdir/$soname.def;
 
4708
        fi~
 
4709
        $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
 
4710
      else
 
4711
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4712
      fi
 
4713
    ;;
 
4714
      darwin* | rhapsody*)
 
4715
        case "$host_os" in
 
4716
        rhapsody* | darwin1.[[012]])
 
4717
         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
 
4718
         ;;
 
4719
       *) # Darwin 1.3 on
 
4720
         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
 
4721
           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
 
4722
         else
 
4723
           case ${MACOSX_DEPLOYMENT_TARGET} in
 
4724
             10.[[012]])
 
4725
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
 
4726
               ;;
 
4727
             10.*)
 
4728
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
 
4729
               ;;
 
4730
           esac
 
4731
         fi
 
4732
         ;;
 
4733
        esac
 
4734
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
4735
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
4736
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
 
4737
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
4738
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
 
4739
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
4740
 
 
4741
    if test "$GXX" = yes ; then
 
4742
      lt_int_apple_cc_single_mod=no
 
4743
      output_verbose_link_cmd='echo'
 
4744
      if $CC -dumpspecs 2>&1 | $GREP 'single_module' >/dev/null ; then
 
4745
       lt_int_apple_cc_single_mod=yes
 
4746
      fi
 
4747
      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
 
4748
       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 
4749
      else
 
4750
          _LT_AC_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'
 
4751
        fi
 
4752
        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
4753
        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
 
4754
          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
 
4755
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
4756
          else
 
4757
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
4758
          fi
 
4759
            _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
4760
      else
 
4761
      case "$cc_basename" in
 
4762
        xlc*)
 
4763
         output_verbose_link_cmd='echo'
 
4764
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
 
4765
          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
4766
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
 
4767
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
4768
          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
4769
          ;;
 
4770
       *)
 
4771
         _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4772
          ;;
 
4773
      esac
 
4774
      fi
 
4775
        ;;
 
4776
 
 
4777
    dgux*)
 
4778
      case $cc_basename in
 
4779
        ec++)
 
4780
        # FIXME: insert proper C++ library support
 
4781
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4782
        ;;
 
4783
        ghcx)
 
4784
        # Green Hills C++ Compiler
 
4785
        # FIXME: insert proper C++ library support
 
4786
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4787
        ;;
 
4788
        *)
 
4789
        # FIXME: insert proper C++ library support
 
4790
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4791
        ;;
 
4792
      esac
 
4793
      ;;
 
4794
    freebsd[12]*)
 
4795
      # C++ shared libraries reported to be fairly broken before switch to ELF
 
4796
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4797
      ;;
 
4798
    freebsd-elf*)
 
4799
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
4800
      ;;
 
4801
    freebsd* | kfreebsd*-gnu)
 
4802
      # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
 
4803
      # conventions
 
4804
      _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
4805
      ;;
 
4806
    gnu*)
 
4807
      ;;
 
4808
    hpux9*)
 
4809
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
4810
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
4811
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
4812
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
4813
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
4814
                                # but as the default
 
4815
                                # location of the library.
 
4816
 
 
4817
      case $cc_basename in
 
4818
      CC)
 
4819
        # FIXME: insert proper C++ library support
 
4820
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4821
        ;;
 
4822
      aCC)
 
4823
        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
4824
        # Commands to make compiler produce verbose output that lists
 
4825
        # what "hidden" libraries, object files and flags are used when
 
4826
        # linking a shared library.
 
4827
        #
 
4828
        # There doesn't appear to be a way to prevent this compiler from
 
4829
        # explicitly linking system object files so we need to strip them
 
4830
        # from the output so that they don't get included in the library
 
4831
        # dependencies.
 
4832
        output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
4833
        ;;
 
4834
      *)
 
4835
        if test "$GXX" = yes; then
 
4836
          _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
 
4837
        else
 
4838
          # FIXME: insert proper C++ library support
 
4839
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4840
        fi
 
4841
        ;;
 
4842
      esac
 
4843
      ;;
 
4844
    hpux10*|hpux11*)
 
4845
      if test $with_gnu_ld = no; then
 
4846
        case "$host_cpu" in
 
4847
        hppa*64*)
 
4848
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
4849
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
4850
          ;;
 
4851
        ia64*)
 
4852
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
 
4853
          ;;
 
4854
        *)
 
4855
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
4856
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
4857
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
4858
          ;;
 
4859
        esac
 
4860
      fi
 
4861
      case "$host_cpu" in
 
4862
      hppa*64*)
 
4863
        _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
4864
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
4865
        ;;
 
4866
      ia64*)
 
4867
        _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
4868
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
4869
        _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
4870
                                              # but as the default
 
4871
                                              # location of the library.
 
4872
        ;;
 
4873
      *)
 
4874
        _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
4875
        _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
 
4876
                                              # but as the default
 
4877
                                              # location of the library.
 
4878
        ;;
 
4879
      esac
 
4880
 
 
4881
      case $cc_basename in
 
4882
        CC)
 
4883
        # FIXME: insert proper C++ library support
 
4884
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4885
        ;;
 
4886
        aCC)
 
4887
        case "$host_cpu" in
 
4888
        hppa*64*|ia64*)
 
4889
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
 
4890
          ;;
 
4891
        *)
 
4892
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
4893
          ;;
 
4894
        esac
 
4895
        # Commands to make compiler produce verbose output that lists
 
4896
        # what "hidden" libraries, object files and flags are used when
 
4897
        # linking a shared library.
 
4898
        #
 
4899
        # There doesn't appear to be a way to prevent this compiler from
 
4900
        # explicitly linking system object files so we need to strip them
 
4901
        # from the output so that they don't get included in the library
 
4902
        # dependencies.
 
4903
        output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
4904
        ;;
 
4905
        *)
 
4906
        if test "$GXX" = yes; then
 
4907
          if test $with_gnu_ld = no; then
 
4908
            case "$host_cpu" in
 
4909
            ia64*|hppa*64*)
 
4910
              _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
 
4911
              ;;
 
4912
            *)
 
4913
              _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
4914
              ;;
 
4915
            esac
 
4916
          fi
 
4917
        else
 
4918
          # FIXME: insert proper C++ library support
 
4919
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4920
        fi
 
4921
        ;;
 
4922
      esac
 
4923
      ;;
 
4924
    irix5* | irix6*)
 
4925
      case $cc_basename in
 
4926
        CC)
 
4927
        # SGI C++
 
4928
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
 
4929
 
 
4930
        # Archives containing C++ object files must be created using
 
4931
        # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
 
4932
        # necessary to make sure instantiated templates are included
 
4933
        # in the archive.
 
4934
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
 
4935
        ;;
 
4936
        *)
 
4937
        if test "$GXX" = yes; then
 
4938
          if test "$with_gnu_ld" = no; then
 
4939
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
 
4940
          else
 
4941
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
 
4942
          fi
 
4943
        fi
 
4944
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
4945
        ;;
 
4946
      esac
 
4947
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
4948
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
4949
      _LT_AC_TAGVAR(inherit_rpath, $1)=yes
 
4950
      ;;
 
4951
    linux*)
 
4952
      case $cc_basename in
 
4953
        KCC)
 
4954
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
4955
 
 
4956
        # KCC will only create a shared library if the output file
 
4957
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
4958
        # to its proper name (with version) after linking.
 
4959
        _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
4960
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
 
4961
        # Commands to make compiler produce verbose output that lists
 
4962
        # what "hidden" libraries, object files and flags are used when
 
4963
        # linking a shared library.
 
4964
        #
 
4965
        # There doesn't appear to be a way to prevent this compiler from
 
4966
        # explicitly linking system object files so we need to strip them
 
4967
        # from the output so that they don't get included in the library
 
4968
        # dependencies.
 
4969
        output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
4970
 
 
4971
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
 
4972
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
4973
 
 
4974
        # Archives containing C++ object files must be created using
 
4975
        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
 
4976
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
 
4977
        ;;
 
4978
        icpc)
 
4979
        # Intel C++
 
4980
        with_gnu_ld=yes
 
4981
        # version 8.0 and above of icpc choke on multiply defined symbols
 
4982
        # if we add $predep_objects and $postdep_objects, however 7.1 and
 
4983
        # earlier do not add the objects themselves.
 
4984
        case `$CC -V 2>&1` in
 
4985
        *"Version 7."*)
 
4986
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
4987
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
4988
          ;;
 
4989
        *)  # Version 8.0 or newer
 
4990
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
4991
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
4992
          ;;
 
4993
        esac
 
4994
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
4995
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
4996
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
4997
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
 
4998
        ;;
 
4999
        cxx)
 
5000
        # Compaq C++
 
5001
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
5002
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
 
5003
 
 
5004
        runpath_var=LD_RUN_PATH
 
5005
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
5006
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5007
 
 
5008
        # Commands to make compiler produce verbose output that lists
 
5009
        # what "hidden" libraries, object files and flags are used when
 
5010
        # linking a shared library.
 
5011
        #
 
5012
        # There doesn't appear to be a way to prevent this compiler from
 
5013
        # explicitly linking system object files so we need to strip them
 
5014
        # from the output so that they don't get included in the library
 
5015
        # dependencies.
 
5016
        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
5017
        ;;
 
5018
      esac
 
5019
      ;;
 
5020
    lynxos*)
 
5021
      # FIXME: insert proper C++ library support
 
5022
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5023
      ;;
 
5024
    m88k*)
 
5025
      # FIXME: insert proper C++ library support
 
5026
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5027
      ;;
 
5028
    mvs*)
 
5029
      case $cc_basename in
 
5030
        cxx)
 
5031
        # FIXME: insert proper C++ library support
 
5032
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5033
        ;;
 
5034
        *)
 
5035
        # FIXME: insert proper C++ library support
 
5036
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5037
        ;;
 
5038
      esac
 
5039
      ;;
 
5040
    netbsd*)
 
5041
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
 
5042
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
 
5043
        wlarc=
 
5044
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
5045
        _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
5046
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5047
      fi
 
5048
      # Workaround some broken pre-1.5 toolchains
 
5049
      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
 
5050
      ;;
 
5051
    *nto* | *qnx*)
 
5052
      _LT_AC_TAGVAR(ld_shlibs, $1)=yes
 
5053
      ;;
 
5054
    openbsd2*)
 
5055
      # C++ shared libraries are fairly broken
 
5056
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5057
      ;;
 
5058
    openbsd*)
 
5059
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
 
5060
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
5061
      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
5062
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
 
5063
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
5064
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
5065
      fi
 
5066
      output_verbose_link_cmd='echo'
 
5067
      ;;
 
5068
    osf3*)
 
5069
      case $cc_basename in
 
5070
        KCC)
 
5071
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
5072
 
 
5073
        # KCC will only create a shared library if the output file
 
5074
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
5075
        # to its proper name (with version) after linking.
 
5076
        _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
5077
 
 
5078
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
5079
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5080
 
 
5081
        # Archives containing C++ object files must be created using
 
5082
        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
 
5083
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
 
5084
 
 
5085
        ;;
 
5086
        RCC)
 
5087
        # Rational C++ 2.4.1
 
5088
        # FIXME: insert proper C++ library support
 
5089
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5090
        ;;
 
5091
        cxx)
 
5092
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
5093
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
 
5094
 
 
5095
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
5096
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5097
 
 
5098
        # Commands to make compiler produce verbose output that lists
 
5099
        # what "hidden" libraries, object files and flags are used when
 
5100
        # linking a shared library.
 
5101
        #
 
5102
        # There doesn't appear to be a way to prevent this compiler from
 
5103
        # explicitly linking system object files so we need to strip them
 
5104
        # from the output so that they don't get included in the library
 
5105
        # dependencies.
 
5106
        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
5107
        ;;
 
5108
        *)
 
5109
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
5110
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
5111
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
 
5112
 
 
5113
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
5114
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5115
 
 
5116
          # Commands to make compiler produce verbose output that lists
 
5117
          # what "hidden" libraries, object files and flags are used when
 
5118
          # linking a shared library.
 
5119
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
 
5120
 
 
5121
        else
 
5122
          # FIXME: insert proper C++ library support
 
5123
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5124
        fi
 
5125
        ;;
 
5126
      esac
 
5127
      ;;
 
5128
    osf4* | osf5*)
 
5129
      case $cc_basename in
 
5130
        KCC)
 
5131
        # Kuck and Associates, Inc. (KAI) C++ Compiler
 
5132
 
 
5133
        # KCC will only create a shared library if the output file
 
5134
        # ends with ".so" (or ".sl" for HP-UX), so rename the library
 
5135
        # to its proper name (with version) after linking.
 
5136
        _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
 
5137
 
 
5138
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
5139
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5140
 
 
5141
        # Archives containing C++ object files must be created using
 
5142
        # the KAI C++ compiler.
 
5143
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
 
5144
        ;;
 
5145
        RCC)
 
5146
        # Rational C++ 2.4.1
 
5147
        # FIXME: insert proper C++ library support
 
5148
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5149
        ;;
 
5150
        cxx)
 
5151
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
 
5152
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
 
5153
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
 
5154
          echo "-hidden">> $lib.exp~
 
5155
          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
 
5156
          $rm $lib.exp'
 
5157
 
 
5158
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
 
5159
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5160
 
 
5161
        # Commands to make compiler produce verbose output that lists
 
5162
        # what "hidden" libraries, object files and flags are used when
 
5163
        # linking a shared library.
 
5164
        #
 
5165
        # There doesn't appear to be a way to prevent this compiler from
 
5166
        # explicitly linking system object files so we need to strip them
 
5167
        # from the output so that they don't get included in the library
 
5168
        # dependencies.
 
5169
        output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
5170
        ;;
 
5171
        *)
 
5172
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
5173
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
 
5174
         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
 
5175
 
 
5176
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
 
5177
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
5178
 
 
5179
          # Commands to make compiler produce verbose output that lists
 
5180
          # what "hidden" libraries, object files and flags are used when
 
5181
          # linking a shared library.
 
5182
          output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
 
5183
 
 
5184
        else
 
5185
          # FIXME: insert proper C++ library support
 
5186
          _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5187
        fi
 
5188
        ;;
 
5189
      esac
 
5190
      ;;
 
5191
    psos*)
 
5192
      # FIXME: insert proper C++ library support
 
5193
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5194
      ;;
 
5195
    sco*)
 
5196
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
5197
      case $cc_basename in
 
5198
        CC)
 
5199
        # FIXME: insert proper C++ library support
 
5200
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5201
        ;;
 
5202
        *)
 
5203
        # FIXME: insert proper C++ library support
 
5204
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5205
        ;;
 
5206
      esac
 
5207
      ;;
 
5208
    sunos4*)
 
5209
      case $cc_basename in
 
5210
        CC)
 
5211
        # Sun C++ 4.x
 
5212
        # FIXME: insert proper C++ library support
 
5213
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5214
        ;;
 
5215
        lcc)
 
5216
        # Lucid
 
5217
        # FIXME: insert proper C++ library support
 
5218
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5219
        ;;
 
5220
        *)
 
5221
        # FIXME: insert proper C++ library support
 
5222
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5223
        ;;
 
5224
      esac
 
5225
      ;;
 
5226
    solaris*)
 
5227
      case $cc_basename in
 
5228
        CC)
 
5229
        # Sun C++ 4.2, 5.x and Centerline C++
 
5230
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
 
5231
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
5232
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
5233
        $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
5234
 
 
5235
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
 
5236
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
5237
        case $host_os in
 
5238
          solaris2.[0-5] | solaris2.[0-5].*) ;;
 
5239
          *)
 
5240
            # The C++ compiler is used as linker so we must use $wl
 
5241
            # flag to pass the commands to the underlying system
 
5242
            # linker. We must also pass each convience library through
 
5243
            # to the system linker between allextract/defaultextract.
 
5244
            # The C++ compiler will combine linker options so we
 
5245
            # cannot just pass the convience library names through
 
5246
            # without $wl.
 
5247
            # Supported since Solaris 2.6 (maybe 2.5.1?)
 
5248
            _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
 
5249
            ;;
 
5250
        esac
 
5251
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
5252
 
 
5253
        # Commands to make compiler produce verbose output that lists
 
5254
        # what "hidden" libraries, object files and flags are used when
 
5255
        # linking a shared library.
 
5256
        #
 
5257
        # There doesn't appear to be a way to prevent this compiler from
 
5258
        # explicitly linking system object files so we need to strip them
 
5259
        # from the output so that they don't get included in the library
 
5260
        # dependencies.
 
5261
        output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
 
5262
 
 
5263
        # Archives containing C++ object files must be created using
 
5264
        # "CC -xar", where "CC" is the Sun C++ compiler.  This is
 
5265
        # necessary to make sure instantiated templates are included
 
5266
        # in the archive.
 
5267
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
 
5268
        ;;
 
5269
        gcx)
 
5270
        # Green Hills C++ Compiler
 
5271
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
5272
 
 
5273
        # The C++ compiler must be used to create the archive.
 
5274
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
 
5275
        ;;
 
5276
        *)
 
5277
        # GNU C++ compiler with Solaris linker
 
5278
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
 
5279
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
 
5280
          if $CC --version | $GREP -v '^2\.7' > /dev/null; then
 
5281
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
5282
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
5283
                $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
5284
 
 
5285
            # Commands to make compiler produce verbose output that lists
 
5286
            # what "hidden" libraries, object files and flags are used when
 
5287
            # linking a shared library.
 
5288
            output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
 
5289
          else
 
5290
            # g++ 2.7 appears to require `-G' NOT `-shared' on this
 
5291
            # platform.
 
5292
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
5293
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 
5294
                $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
 
5295
 
 
5296
            # Commands to make compiler produce verbose output that lists
 
5297
            # what "hidden" libraries, object files and flags are used when
 
5298
            # linking a shared library.
 
5299
            output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
 
5300
          fi
 
5301
 
 
5302
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
 
5303
        fi
 
5304
        ;;
 
5305
      esac
 
5306
      ;;
 
5307
    sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
 
5308
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
5309
      ;;
 
5310
    tandem*)
 
5311
      case $cc_basename in
 
5312
        NCC)
 
5313
        # NonStop-UX NCC 3.20
 
5314
        # FIXME: insert proper C++ library support
 
5315
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5316
        ;;
 
5317
        *)
 
5318
        # FIXME: insert proper C++ library support
 
5319
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5320
        ;;
 
5321
      esac
 
5322
      ;;
 
5323
    vxworks*)
 
5324
      # FIXME: insert proper C++ library support
 
5325
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5326
      ;;
 
5327
    *)
 
5328
      # FIXME: insert proper C++ library support
 
5329
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
5330
      ;;
 
5331
  esac
 
5332
  AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
 
5333
  test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
5334
 
 
5335
  _LT_AC_TAGVAR(GCC, $1)="$GXX"
 
5336
  _LT_AC_TAGVAR(LD, $1)="$LD"
 
5337
 
 
5338
  ## CAVEAT EMPTOR:
 
5339
  ## There is no encapsulation within the following macros, do not change
 
5340
  ## the running order or otherwise move them around unless you know exactly
 
5341
  ## what you are doing...
 
5342
  AC_LIBTOOL_POSTDEP_PREDEP($1)
 
5343
  AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
5344
  AC_LIBTOOL_PROG_CC_C_O($1)
 
5345
  AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
5346
  AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
5347
  AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
5348
  AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
5349
  AC_LIBTOOL_SYS_LIB_STRIP
 
5350
  AC_LIBTOOL_DLOPEN_SELF($1)
 
5351
 
 
5352
  _LT_CONFIG($1)
 
5353
fi
 
5354
 
 
5355
AC_LANG_POP
 
5356
CC=$lt_save_CC
 
5357
LDCXX=$LD
 
5358
LD=$lt_save_LD
 
5359
GCC=$lt_save_GCC
 
5360
with_gnu_ldcxx=$with_gnu_ld
 
5361
with_gnu_ld=$lt_save_with_gnu_ld
 
5362
lt_cv_path_LDCXX=$lt_cv_path_LD
 
5363
lt_cv_path_LD=$lt_save_path_LD
 
5364
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
 
5365
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
 
5366
])# _LT_LANG_CXX_CONFIG
 
5367
 
 
5368
 
 
5369
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
 
5370
# ------------------------------------
 
5371
# Figure out "hidden" library dependencies from verbose
 
5372
# compiler output when linking a shared library.
 
5373
# Parse the compiler output and extract the necessary
 
5374
# objects, libraries and library flags.
 
5375
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
 
5376
# Dependencies to place before and after the object being linked:
 
5377
_LT_AC_TAGVAR(predep_objects, $1)=
 
5378
_LT_AC_TAGVAR(postdep_objects, $1)=
 
5379
_LT_AC_TAGVAR(predeps, $1)=
 
5380
_LT_AC_TAGVAR(postdeps, $1)=
 
5381
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
 
5382
 
 
5383
dnl we can't use the lt_simple_compile_test_code here,
 
5384
dnl because it contains code intended for an executable,
 
5385
dnl not a library.  It's possible we should let each
 
5386
dnl tag define a new lt_????_link_test_code variable,
 
5387
dnl but it's only used here...
 
5388
m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
 
5389
int a;
 
5390
void foo (void) { a = 0; }
 
5391
_LT_EOF
 
5392
], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
 
5393
class Foo
 
5394
{
 
5395
public:
 
5396
  Foo (void) { a = 0; }
 
5397
private:
 
5398
  int a;
 
5399
};
 
5400
_LT_EOF
 
5401
], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
 
5402
      subroutine foo
 
5403
      implicit none
 
5404
      integer*4 a
 
5405
      a=0
 
5406
      return
 
5407
      end
 
5408
_LT_EOF
 
5409
], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
 
5410
public class foo {
 
5411
  private int a;
 
5412
  public void bar (void) {
 
5413
    a = 0;
 
5414
  }
 
5415
};
 
5416
_LT_EOF
 
5417
])
 
5418
dnl Parse the compiler output and extract the necessary
 
5419
dnl objects, libraries and library flags.
 
5420
if AC_TRY_EVAL(ac_compile); then
 
5421
  # Parse the compiler output and extract the necessary
 
5422
  # objects, libraries and library flags.
 
5423
 
 
5424
  # Sentinel used to keep track of whether or not we are before
 
5425
  # the conftest object file.
 
5426
  pre_test_object_deps_done=no
 
5427
 
 
5428
  # The `*' in the case matches for architectures that use `case' in
 
5429
  # $output_verbose_cmd can trigger glob expansion during the loop
 
5430
  # eval without this substitution.
 
5431
  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
 
5432
 
 
5433
  for p in `eval $output_verbose_link_cmd`; do
 
5434
    case $p in
 
5435
 
 
5436
    -L* | -R* | -l*)
 
5437
       # Some compilers place space between "-{L,R}" and the path.
 
5438
       # Remove the space.
 
5439
       if test $p = "-L" ||
 
5440
          test $p = "-R"; then
 
5441
         prev=$p
 
5442
         continue
 
5443
       else
 
5444
         prev=
 
5445
       fi
 
5446
 
 
5447
       if test "$pre_test_object_deps_done" = no; then
 
5448
         case $p in
 
5449
         -L* | -R*)
 
5450
           # Internal compiler library paths should come after those
 
5451
           # provided the user.  The postdeps already come after the
 
5452
           # user supplied libs so there is no need to process them.
 
5453
           if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
 
5454
             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
 
5455
           else
 
5456
             _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
 
5457
           fi
 
5458
           ;;
 
5459
         # The "-l" case would never come before the object being
 
5460
         # linked, so don't bother handling this case.
 
5461
         esac
 
5462
       else
 
5463
         if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
 
5464
           _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
 
5465
         else
 
5466
           _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
 
5467
         fi
 
5468
       fi
 
5469
       ;;
 
5470
 
 
5471
    *.$objext)
 
5472
       # This assumes that the test object file only shows up
 
5473
       # once in the compiler output.
 
5474
       if test "$p" = "conftest.$objext"; then
 
5475
         pre_test_object_deps_done=yes
 
5476
         continue
 
5477
       fi
 
5478
 
 
5479
       if test "$pre_test_object_deps_done" = no; then
 
5480
         if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
 
5481
           _LT_AC_TAGVAR(predep_objects, $1)="$p"
 
5482
         else
 
5483
           _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
 
5484
         fi
 
5485
       else
 
5486
         if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
 
5487
           _LT_AC_TAGVAR(postdep_objects, $1)="$p"
 
5488
         else
 
5489
           _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
 
5490
         fi
 
5491
       fi
 
5492
       ;;
 
5493
 
 
5494
    *) ;; # Ignore the rest.
 
5495
 
 
5496
    esac
 
5497
  done
 
5498
 
 
5499
  # Clean up.
 
5500
  rm -f a.out a.exe
 
5501
else
 
5502
  echo "libtool.m4: error: problem compiling $1 test program"
 
5503
fi
 
5504
 
 
5505
$rm -f confest.$objext
 
5506
 
 
5507
case " $_LT_AC_TAGVAR(postdeps, $1) " in
 
5508
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
 
5509
esac
 
5510
_LT_TAGDECL([], [predep_objects], [1],
 
5511
    [Dependencies to place before and after  the objects being linked to
 
5512
    create a shared library])
 
5513
_LT_TAGDECL([], [postdep_objects], [1])
 
5514
_LT_TAGDECL([], [predeps], [1])
 
5515
_LT_TAGDECL([], [postdeps], [1])
 
5516
_LT_TAGDECL([], [compiler_lib_search_path], [1],
 
5517
    [The library search path used internally by the compiler when linking
 
5518
    a shared library])
 
5519
])# AC_LIBTOOL_POSTDEP_PREDEP
 
5520
 
 
5521
# _LT_LANG_F77_CONFIG([TAG])
 
5522
# --------------------------
 
5523
# Ensure that the configuration variables for a Fortran 77 compiler are
 
5524
# suitably defined.  These variables are subsequently used by _LT_CONFIG
 
5525
# to write the compiler configuration to `libtool'.
 
5526
m4_define([_LT_LANG_F77_CONFIG],
 
5527
[AC_REQUIRE([AC_PROG_F77])
 
5528
AC_LANG_PUSH(Fortran 77)
 
5529
 
 
5530
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
5531
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
 
5532
_LT_AC_TAGVAR(always_export_symbols, $1)=no
 
5533
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
 
5534
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
5535
_LT_AC_TAGVAR(hardcode_direct, $1)=no
 
5536
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
5537
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
 
5538
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
 
5539
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
5540
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
 
5541
_LT_AC_TAGVAR(inherit_rpath, $1)=no
 
5542
_LT_AC_TAGVAR(module_cmds, $1)=
 
5543
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
 
5544
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
 
5545
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
5546
_LT_AC_TAGVAR(no_undefined_flag, $1)=
 
5547
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
5548
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
5549
 
 
5550
# Source file extension for f77 test sources.
 
5551
ac_ext=f
 
5552
 
 
5553
# Object file extension for compiled f77 test sources.
 
5554
objext=o
 
5555
_LT_AC_TAGVAR(objext, $1)=$objext
 
5556
 
 
5557
# Code to be used in simple compile tests
 
5558
lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
 
5559
 
 
5560
# Code to be used in simple link tests
 
5561
lt_simple_link_test_code="      program t\n      end\n"
 
5562
 
 
5563
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
5564
_LT_AC_SYS_COMPILER
 
5565
 
 
5566
# Allow CC to be a program name with arguments.
 
5567
lt_save_CC="$CC"
 
5568
CC=${F77-"f77"}
 
5569
compiler=$CC
 
5570
_LT_AC_TAGVAR(compiler, $1)=$CC
 
5571
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
 
5572
 
 
5573
if test -n "$compiler"; then
 
5574
  AC_MSG_CHECKING([if libtool supports shared libraries])
 
5575
  AC_MSG_RESULT([$can_build_shared])
 
5576
 
 
5577
  AC_MSG_CHECKING([whether to build shared libraries])
 
5578
  test "$can_build_shared" = "no" && enable_shared=no
 
5579
 
 
5580
  # On AIX, shared libraries and static libraries use the same namespace, and
 
5581
  # are all built from PIC.
 
5582
  case "$host_os" in
 
5583
  aix3*)
 
5584
    test "$enable_shared" = yes && enable_static=no
 
5585
    if test -n "$RANLIB"; then
 
5586
      archive_cmds="$archive_cmds~\$RANLIB \$lib"
 
5587
      postinstall_cmds='$RANLIB $lib'
 
5588
    fi
 
5589
    ;;
 
5590
  aix4* | aix5*)
 
5591
    test "$enable_shared" = yes && enable_static=no
 
5592
    ;;
 
5593
  esac
 
5594
  AC_MSG_RESULT([$enable_shared])
 
5595
 
 
5596
  AC_MSG_CHECKING([whether to build static libraries])
 
5597
  # Make sure either enable_shared or enable_static is yes.
 
5598
  test "$enable_shared" = yes || enable_static=yes
 
5599
  AC_MSG_RESULT([$enable_static])
 
5600
 
 
5601
  test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
5602
 
 
5603
  _LT_AC_TAGVAR(GCC, $1)="$G77"
 
5604
  _LT_AC_TAGVAR(LD, $1)="$LD"
 
5605
 
 
5606
  ## CAVEAT EMPTOR:
 
5607
  ## There is no encapsulation within the following macros, do not change
 
5608
  ## the running order or otherwise move them around unless you know exactly
 
5609
  ## what you are doing...
 
5610
  AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
5611
  AC_LIBTOOL_PROG_CC_C_O($1)
 
5612
  AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
5613
  AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
5614
  AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
5615
  AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
5616
  AC_LIBTOOL_SYS_LIB_STRIP
 
5617
 
 
5618
  _LT_CONFIG($1)
 
5619
fi
 
5620
 
 
5621
AC_LANG_POP
 
5622
CC="$lt_save_CC"
 
5623
])# _LT_LANG_F77_CONFIG
 
5624
 
 
5625
 
 
5626
# _LT_LANG_GCJ_CONFIG([TAG])
 
5627
# --------------------------
 
5628
# Ensure that the configuration variables for the GNU Java Compiler compiler
 
5629
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
 
5630
# to write the compiler configuration to `libtool'.
 
5631
m4_define([_LT_LANG_GCJ_CONFIG],
 
5632
[AC_REQUIRE([LT_PROG_GCJ])
 
5633
AC_LANG_SAVE
 
5634
 
 
5635
# Source file extension for Java test sources.
 
5636
ac_ext=java
 
5637
 
 
5638
# Object file extension for compiled Java test sources.
 
5639
objext=o
 
5640
_LT_AC_TAGVAR(objext, $1)=$objext
 
5641
 
 
5642
# Code to be used in simple compile tests
 
5643
lt_simple_compile_test_code="class foo {}\n"
 
5644
 
 
5645
# Code to be used in simple link tests
 
5646
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
 
5647
 
 
5648
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
5649
_LT_AC_SYS_COMPILER
 
5650
 
 
5651
# Allow CC to be a program name with arguments.
 
5652
lt_save_CC="$CC"
 
5653
CC=${GCJ-"gcj"}
 
5654
compiler=$CC
 
5655
_LT_AC_TAGVAR(compiler, $1)=$CC
 
5656
 
 
5657
# GCJ did not exist at the time GCC didn't implicitly link libc in.
 
5658
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
5659
 
 
5660
## CAVEAT EMPTOR:
 
5661
## There is no encapsulation within the following macros, do not change
 
5662
## the running order or otherwise move them around unless you know exactly
 
5663
## what you are doing...
 
5664
if test -n "$compiler"; then
 
5665
  AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
 
5666
  AC_LIBTOOL_PROG_COMPILER_PIC($1)
 
5667
  AC_LIBTOOL_PROG_CC_C_O($1)
 
5668
  AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
 
5669
  AC_LIBTOOL_PROG_LD_SHLIBS($1)
 
5670
  AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
 
5671
  AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
 
5672
  AC_LIBTOOL_SYS_LIB_STRIP
 
5673
  AC_LIBTOOL_DLOPEN_SELF($1)
 
5674
 
 
5675
  _LT_CONFIG($1)
 
5676
fi
 
5677
 
 
5678
AC_LANG_RESTORE
 
5679
CC="$lt_save_CC"
 
5680
])# _LT_LANG_GCJ_CONFIG
 
5681
 
 
5682
 
 
5683
# _LT_LANG_RC_CONFIG([TAG])
 
5684
# --------------------------
 
5685
# Ensure that the configuration variables for the Windows resource compiler
 
5686
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
 
5687
# to write the compiler configuration to `libtool'.
 
5688
m4_define([_LT_LANG_RC_CONFIG],
 
5689
[AC_REQUIRE([LT_PROG_RC])
 
5690
AC_LANG_SAVE
 
5691
 
 
5692
# Source file extension for RC test sources.
 
5693
ac_ext=rc
 
5694
 
 
5695
# Object file extension for compiled RC test sources.
 
5696
objext=o
 
5697
_LT_AC_TAGVAR(objext, $1)=$objext
 
5698
 
 
5699
# Code to be used in simple compile tests
 
5700
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
 
5701
 
 
5702
# Code to be used in simple link tests
 
5703
lt_simple_link_test_code="$lt_simple_compile_test_code"
 
5704
 
 
5705
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
5706
_LT_AC_SYS_COMPILER
 
5707
 
 
5708
# Allow CC to be a program name with arguments.
 
5709
lt_save_CC="$CC"
 
5710
CC=${RC-"windres"}
 
5711
compiler=$CC
 
5712
_LT_AC_TAGVAR(compiler, $1)=$CC
 
5713
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
5714
 
 
5715
if test -n "$compiler"; then
 
5716
  :
 
5717
  _LT_CONFIG($1)
 
5718
fi
 
5719
 
 
5720
AC_LANG_RESTORE
 
5721
CC="$lt_save_CC"
 
5722
])# _LT_LANG_RC_CONFIG
 
5723
 
 
5724
 
 
5725
AC_DEFUN([LT_PROG_GCJ],
 
5726
[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
 
5727
  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
 
5728
    [AC_CHECK_TOOL(GCJ, gcj,)
 
5729
      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
 
5730
      AC_SUBST(GCJFLAGS)])])dnl
 
5731
])
 
5732
AU_DEFUN([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
 
5733
 
 
5734
AC_DEFUN([LT_PROG_RC],
 
5735
[AC_CHECK_TOOL(RC, windres,)
 
5736
])
 
5737
AU_DEFUN([LT_AC_PROG_RC], [LT_PROG_RC])
 
5738
 
 
5739
 
 
5740
# LT_AC_PROG_EGREP
 
5741
# ----------------
 
5742
# If we don't have a new enough Autoconf to choose the best grep
 
5743
# available, choose the one first in the user's PATH.
 
5744
AC_DEFUN([LT_AC_PROG_EGREP],
 
5745
[AC_REQUIRE([AC_PROG_EGREP])
 
5746
test -z "$GREP" && GREP=grep
 
5747
_LT_DECL([], [GREP], [1], [A grep program that handles long line])
 
5748
_LT_DECL([], [EGREP], [1], [An ERE matcher])
 
5749
])
 
5750
 
 
5751
 
 
5752
# LT_AC_PROG_SED
 
5753
# --------------
 
5754
# Check for a fully-functional sed program, that truncates
 
5755
# as few characters as possible.  Prefer GNU sed if found.
 
5756
AC_DEFUN([LT_AC_PROG_SED],
 
5757
[AC_PROG_SED
 
5758
test -z "$SED" && SED=sed
 
5759
_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
 
5760
_LT_DECL([], [Xsed], ["\$SED -e s/^X//"],
 
5761
    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
 
5762
])# LT_AC_PROG_SED
 
5763
 
 
5764
m4_ifndef([AC_PROG_SED], [
 
5765
############################################################
 
5766
# NOTE: This macro has been submitted for inclusion into   #
 
5767
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
 
5768
#  a released version of Autoconf we should remove this    #
 
5769
#  macro and use it instead.                               #
 
5770
############################################################
 
5771
 
 
5772
m4_define([AC_PROG_SED],
 
5773
[AC_MSG_CHECKING([for a sed that does not truncate output])
 
5774
AC_CACHE_VAL(lt_cv_path_SED,
 
5775
[# Loop through the user's path and test for sed and gsed.
 
5776
# Then use that list of sed's as ones to test for truncation.
 
5777
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
5778
for as_dir in $PATH
 
5779
do
 
5780
  IFS=$as_save_IFS
 
5781
  test -z "$as_dir" && as_dir=.
 
5782
  for lt_ac_prog in sed gsed; do
 
5783
    for ac_exec_ext in '' $ac_executable_extensions; do
 
5784
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
 
5785
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
 
5786
      fi
 
5787
    done
 
5788
  done
 
5789
done
 
5790
lt_ac_max=0
 
5791
lt_ac_count=0
 
5792
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
 
5793
# along with /bin/sed that truncates output.
 
5794
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
 
5795
  test ! -f $lt_ac_sed && break
 
5796
  cat /dev/null > conftest.in
 
5797
  lt_ac_count=0
 
5798
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
 
5799
  # Check for GNU sed and select it if it is found.
 
5800
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
 
5801
    lt_cv_path_SED=$lt_ac_sed
 
5802
    break
 
5803
  fi
 
5804
  while true; do
 
5805
    cat conftest.in conftest.in >conftest.tmp
 
5806
    mv conftest.tmp conftest.in
 
5807
    cp conftest.in conftest.nl
 
5808
    echo >>conftest.nl
 
5809
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
 
5810
    cmp -s conftest.out conftest.nl || break
 
5811
    # 10000 chars as input seems more than enough
 
5812
    test $lt_ac_count -gt 10 && break
 
5813
    lt_ac_count=`expr $lt_ac_count + 1`
 
5814
    if test $lt_ac_count -gt $lt_ac_max; then
 
5815
      lt_ac_max=$lt_ac_count
 
5816
      lt_cv_path_SED=$lt_ac_sed
 
5817
    fi
 
5818
  done
 
5819
done
 
5820
])
 
5821
SED=$lt_cv_path_SED
 
5822
AC_SUBST([SED])
 
5823
AC_MSG_RESULT([$SED])
 
5824
])#AC_PROG_SED
 
5825
])#m4_ifndef