~ubuntu-branches/ubuntu/maverick/ipmitool/maverick

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Petter Reinholdtsen
  • Date: 2005-04-07 01:18:44 UTC
  • Revision ID: james.westby@ubuntu.com-20050407011844-a1b206z5iefiu5vi
Tags: upstream-1.8.1
ImportĀ upstreamĀ versionĀ 1.8.1

Show diffs side-by-side

added added

removed removed

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