~ubuntu-branches/debian/experimental/libtorrent/experimental

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Jose Luis Rivas
  • Date: 2007-03-31 10:31:05 UTC
  • mto: (4.1.4 gutsy) (6.2.1 squeeze) (1.3.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20070331103105-jzpp1rml6ud0ff75
Tags: upstream-0.11.4
ImportĀ upstreamĀ versionĀ 0.11.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# generated automatically by aclocal 1.9.2 -*- Autoconf -*-
 
1
# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*-
2
2
 
3
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
 
3
# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
4
4
# Free Software Foundation, Inc.
5
5
# This file is free software; the Free Software Foundation
6
6
# gives unlimited permission to copy and/or distribute it,
11
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
12
# PARTICULAR PURPOSE.
13
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
 
14
837
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
15
838
 
16
 
# serial 47 AC_PROG_LIBTOOL
 
839
# serial 48 AC_PROG_LIBTOOL
17
840
 
18
841
 
19
842
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
123
946
 
124
947
# Sed substitution that helps us do robust quoting.  It backslashifies
125
948
# metacharacters that are still active within double-quoted strings.
126
 
Xsed='sed -e s/^X//'
 
949
Xsed='sed -e 1s/^X//'
127
950
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
128
951
 
129
952
# Same as above, but do not quote variable references.
143
966
default_ofile=libtool
144
967
can_build_shared=yes
145
968
 
146
 
# All known linkers require a `.a' archive for static linking (except M$VC,
 
969
# All known linkers require a `.a' archive for static linking (except MSVC,
147
970
# which needs '.lib').
148
971
libext=a
149
972
ltmain="$ac_aux_dir/ltmain.sh"
163
986
test -z "$AS" && AS=as
164
987
test -z "$CC" && CC=cc
165
988
test -z "$LTCC" && LTCC=$CC
 
989
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
166
990
test -z "$DLLTOOL" && DLLTOOL=dlltool
167
991
test -z "$LD" && LD=ld
168
992
test -z "$LN_S" && LN_S="ln -s"
182
1006
if test -n "$RANLIB"; then
183
1007
  case $host_os in
184
1008
  openbsd*)
185
 
    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
 
1009
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
186
1010
    ;;
187
1011
  *)
188
 
    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
 
1012
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
189
1013
    ;;
190
1014
  esac
191
1015
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
192
1016
fi
193
1017
 
 
1018
_LT_CC_BASENAME([$compiler])
 
1019
 
194
1020
# Only perform the check for file, if the check method requires it
195
1021
case $deplibs_check_method in
196
1022
file_magic*)
231
1057
# If no C compiler was specified, use CC.
232
1058
LTCC=${LTCC-"$CC"}
233
1059
 
 
1060
# If no C compiler flags were specified, use CFLAGS.
 
1061
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
 
1062
 
234
1063
# Allow CC to be a program name with arguments.
235
1064
compiler=$CC
236
1065
])# _LT_AC_SYS_COMPILER
237
1066
 
238
1067
 
 
1068
# _LT_CC_BASENAME(CC)
 
1069
# -------------------
 
1070
# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
 
1071
AC_DEFUN([_LT_CC_BASENAME],
 
1072
[for cc_temp in $1""; do
 
1073
  case $cc_temp in
 
1074
    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
 
1075
    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
 
1076
    \-*) ;;
 
1077
    *) break;;
 
1078
  esac
 
1079
done
 
1080
cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
 
1081
])
 
1082
 
 
1083
 
 
1084
# _LT_COMPILER_BOILERPLATE
 
1085
# ------------------------
 
1086
# Check for compiler boilerplate output or warnings with
 
1087
# the simple compiler test code.
 
1088
AC_DEFUN([_LT_COMPILER_BOILERPLATE],
 
1089
[ac_outfile=conftest.$ac_objext
 
1090
printf "$lt_simple_compile_test_code" >conftest.$ac_ext
 
1091
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
 
1092
_lt_compiler_boilerplate=`cat conftest.err`
 
1093
$rm conftest*
 
1094
])# _LT_COMPILER_BOILERPLATE
 
1095
 
 
1096
 
 
1097
# _LT_LINKER_BOILERPLATE
 
1098
# ----------------------
 
1099
# Check for linker boilerplate output or warnings with
 
1100
# the simple link test code.
 
1101
AC_DEFUN([_LT_LINKER_BOILERPLATE],
 
1102
[ac_outfile=conftest.$ac_objext
 
1103
printf "$lt_simple_link_test_code" >conftest.$ac_ext
 
1104
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
 
1105
_lt_linker_boilerplate=`cat conftest.err`
 
1106
$rm conftest*
 
1107
])# _LT_LINKER_BOILERPLATE
 
1108
 
 
1109
 
239
1110
# _LT_AC_SYS_LIBPATH_AIX
240
1111
# ----------------------
241
1112
# Links a minimal program and checks the executable
308
1179
 
309
1180
# The HP-UX ksh and POSIX shell print the target directory to stdout
310
1181
# if CDPATH is set.
311
 
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
 
1182
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
312
1183
 
313
1184
if test -z "$ECHO"; then
314
1185
if test "X${echo_test_string+set}" != Xset; then
315
1186
# find a string as large as possible, as long as the shell can cope with it
316
1187
  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
317
1188
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
318
 
    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
319
 
       echo_test_string="`eval $cmd`" &&
 
1189
    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
 
1190
       echo_test_string=`eval $cmd` &&
320
1191
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
321
1192
    then
322
1193
      break
485
1356
  # Find out which ABI we are using.
486
1357
  echo 'int i;' > conftest.$ac_ext
487
1358
  if AC_TRY_EVAL(ac_compile); then
488
 
    case "`/usr/bin/file conftest.o`" in
 
1359
    case `/usr/bin/file conftest.o` in
489
1360
    *32-bit*)
490
1361
      case $host in
491
1362
        x86_64-*linux*)
536
1407
    CFLAGS="$SAVE_CFLAGS"
537
1408
  fi
538
1409
  ;;
 
1410
sparc*-*solaris*)
 
1411
  # Find out which ABI we are using.
 
1412
  echo 'int i;' > conftest.$ac_ext
 
1413
  if AC_TRY_EVAL(ac_compile); then
 
1414
    case `/usr/bin/file conftest.o` in
 
1415
    *64-bit*)
 
1416
      case $lt_cv_prog_gnu_ld in
 
1417
      yes*) LD="${LD-ld} -m elf64_sparc" ;;
 
1418
      *)    LD="${LD-ld} -64" ;;
 
1419
      esac
 
1420
      ;;
 
1421
    esac
 
1422
  fi
 
1423
  rm -rf conftest*
 
1424
  ;;
 
1425
 
539
1426
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
540
1427
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
541
1428
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
567
1454
   # with a dollar sign (not a hyphen), so the echo should work correctly.
568
1455
   # The option is referenced via a variable to avoid confusing sed.
569
1456
   lt_compile=`echo "$ac_compile" | $SED \
570
 
   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
 
1457
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
571
1458
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
572
1459
   -e 's:$: $lt_compiler_flag:'`
573
1460
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
577
1464
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
578
1465
   if (exit $ac_status) && test -s "$ac_outfile"; then
579
1466
     # The compiler can only warn and ignore the option if not recognized
580
 
     # So say no if there are warnings
581
 
     if test ! -s conftest.err; then
 
1467
     # So say no if there are warnings other than the usual output.
 
1468
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
 
1469
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
 
1470
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
582
1471
       $2=yes
583
1472
     fi
584
1473
   fi
604
1493
   LDFLAGS="$LDFLAGS $3"
605
1494
   printf "$lt_simple_link_test_code" > conftest.$ac_ext
606
1495
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
607
 
     # The compiler can only warn and ignore the option if not recognized
 
1496
     # The linker can only warn and ignore the option if not recognized
608
1497
     # So say no if there are warnings
609
1498
     if test -s conftest.err; then
610
1499
       # Append any errors to the config.log.
611
1500
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
 
1501
       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
 
1502
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
 
1503
       if diff conftest.exp conftest.er2 >/dev/null; then
 
1504
         $2=yes
 
1505
       fi
612
1506
     else
613
1507
       $2=yes
614
1508
     fi
667
1561
    lt_cv_sys_max_cmd_len=8192;
668
1562
    ;;
669
1563
 
670
 
 *)
 
1564
  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
 
1565
    # This has been around since 386BSD, at least.  Likely further.
 
1566
    if test -x /sbin/sysctl; then
 
1567
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
 
1568
    elif test -x /usr/sbin/sysctl; then
 
1569
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
 
1570
    else
 
1571
      lt_cv_sys_max_cmd_len=65536       # usable default for all BSDs
 
1572
    fi
 
1573
    # And add a safety zone
 
1574
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
 
1575
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
 
1576
    ;;
 
1577
 
 
1578
  interix*)
 
1579
    # We know the value 262144 and hardcode it with a safety zone (like BSD)
 
1580
    lt_cv_sys_max_cmd_len=196608
 
1581
    ;;
 
1582
 
 
1583
  osf*)
 
1584
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
 
1585
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
 
1586
    # nice to cause kernel panics so lets avoid the loop below.
 
1587
    # First set a reasonable default.
 
1588
    lt_cv_sys_max_cmd_len=16384
 
1589
    #
 
1590
    if test -x /sbin/sysconfig; then
 
1591
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
 
1592
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
 
1593
      esac
 
1594
    fi
 
1595
    ;;
 
1596
  sco3.2v5*)
 
1597
    lt_cv_sys_max_cmd_len=102400
 
1598
    ;;
 
1599
  sysv5* | sco5v6* | sysv4.2uw2*)
 
1600
    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
 
1601
    if test -n "$kargmax"; then
 
1602
      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[        ]]//'`
 
1603
    else
 
1604
      lt_cv_sys_max_cmd_len=32768
 
1605
    fi
 
1606
    ;;
 
1607
  *)
671
1608
    # If test is not a shell built-in, we'll probably end up computing a
672
1609
    # maximum length that is only half of the actual maximum length, but
673
1610
    # we can't tell.
674
 
    while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
 
1611
    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
 
1612
    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
675
1613
               = "XX$teststring") >/dev/null 2>&1 &&
676
1614
            new_result=`expr "X$teststring" : ".*" 2>&1` &&
677
1615
            lt_cv_sys_max_cmd_len=$new_result &&
697
1635
 
698
1636
 
699
1637
# _LT_AC_CHECK_DLFCN
700
 
# --------------------
 
1638
# ------------------
701
1639
AC_DEFUN([_LT_AC_CHECK_DLFCN],
702
1640
[AC_CHECK_HEADERS(dlfcn.h)dnl
703
1641
])# _LT_AC_CHECK_DLFCN
705
1643
 
706
1644
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
707
1645
#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
708
 
# ------------------------------------------------------------------
 
1646
# ---------------------------------------------------------------------
709
1647
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
710
1648
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
711
1649
if test "$cross_compiling" = yes; then :
771
1709
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
772
1710
      /* dlclose (self); */
773
1711
    }
 
1712
  else
 
1713
    puts (dlerror ());
774
1714
 
775
1715
    exit (status);
776
1716
}]
777
1717
EOF
778
1718
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
779
 
    (./conftest; exit; ) 2>/dev/null
 
1719
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
780
1720
    lt_status=$?
781
1721
    case x$lt_status in
782
1722
      x$lt_dlno_uscore) $1 ;;
783
1723
      x$lt_dlneed_uscore) $2 ;;
784
 
      x$lt_unknown|x*) $3 ;;
 
1724
      x$lt_dlunknown|x*) $3 ;;
785
1725
    esac
786
1726
  else :
787
1727
    # compilation failed
793
1733
 
794
1734
 
795
1735
# AC_LIBTOOL_DLOPEN_SELF
796
 
# -------------------
 
1736
# ----------------------
797
1737
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
798
1738
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
799
1739
if test "x$enable_dlopen" != xyes; then
864
1804
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
865
1805
 
866
1806
    save_LDFLAGS="$LDFLAGS"
867
 
    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
1807
    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
868
1808
 
869
1809
    save_LIBS="$LIBS"
870
1810
    LIBS="$lt_cv_dlopen_libs $LIBS"
877
1817
    ])
878
1818
 
879
1819
    if test "x$lt_cv_dlopen_self" = xyes; then
880
 
      LDFLAGS="$LDFLAGS $link_static_flag"
 
1820
      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
881
1821
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
882
1822
          lt_cv_dlopen_self_static, [dnl
883
1823
          _LT_AC_TRY_DLOPEN_SELF(
925
1865
   # Note that $ac_compile itself does not contain backslashes and begins
926
1866
   # with a dollar sign (not a hyphen), so the echo should work correctly.
927
1867
   lt_compile=`echo "$ac_compile" | $SED \
928
 
   -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
 
1868
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
929
1869
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
930
1870
   -e 's:$: $lt_compiler_flag:'`
931
1871
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
937
1877
   then
938
1878
     # The compiler can only warn and ignore the option if not recognized
939
1879
     # So say no if there are warnings
940
 
     if test ! -s out/conftest.err; then
 
1880
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
 
1881
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
 
1882
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
941
1883
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
942
1884
     fi
943
1885
   fi
944
 
   chmod u+w .
 
1886
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
945
1887
   $rm conftest*
946
1888
   # SGI C++ compiler will create directory out/ii_files/ for
947
1889
   # template instantiation
1005
1947
[AC_MSG_CHECKING([how to hardcode library paths into programs])
1006
1948
_LT_AC_TAGVAR(hardcode_action, $1)=
1007
1949
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1008
 
   test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
1009
 
   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
 
1950
   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
 
1951
   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1010
1952
 
1011
1953
  # We can hardcode non-existant directories.
1012
1954
  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1173
2115
  shlibpath_var=LIBRARY_PATH
1174
2116
  ;;
1175
2117
 
1176
 
bsdi4*)
 
2118
bsdi[[45]]*)
1177
2119
  version_type=linux
1178
2120
  need_version=no
1179
2121
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1201
2143
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1202
2144
      dldir=$destdir/`dirname \$dlpath`~
1203
2145
      test -d \$dldir || mkdir -p \$dldir~
1204
 
      $install_prog $dir/$dlname \$dldir/$dlname'
 
2146
      $install_prog $dir/$dlname \$dldir/$dlname~
 
2147
      chmod a+x \$dldir/$dlname'
1205
2148
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1206
2149
      dlpath=$dir/\$dldll~
1207
2150
       $rm \$dlpath'
1231
2174
      ;;
1232
2175
    pw32*)
1233
2176
      # pw32 DLLs use 'pw' prefix rather than 'lib'
1234
 
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
 
2177
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1235
2178
      ;;
1236
2179
    esac
1237
2180
    ;;
1254
2197
  soname_spec='${libname}${release}${major}$shared_ext'
1255
2198
  shlibpath_overrides_runpath=yes
1256
2199
  shlibpath_var=DYLD_LIBRARY_PATH
1257
 
  shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
 
2200
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1258
2201
  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1259
2202
  if test "$GCC" = yes; then
1260
2203
    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"`
1289
2232
  dynamic_linker='GNU ld.so'
1290
2233
  ;;
1291
2234
 
1292
 
freebsd*)
1293
 
  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
 
2235
freebsd* | dragonfly*)
 
2236
  # DragonFly does not have aout.  When/if they implement a new
 
2237
  # versioning mechanism, adjust this.
 
2238
  if test -x /usr/bin/objformat; then
 
2239
    objformat=`/usr/bin/objformat`
 
2240
  else
 
2241
    case $host_os in
 
2242
    freebsd[[123]]*) objformat=aout ;;
 
2243
    *) objformat=elf ;;
 
2244
    esac
 
2245
  fi
1294
2246
  version_type=freebsd-$objformat
1295
2247
  case $version_type in
1296
2248
    freebsd-elf*)
1308
2260
  freebsd2*)
1309
2261
    shlibpath_overrides_runpath=yes
1310
2262
    ;;
1311
 
  freebsd3.[01]* | freebsdelf3.[01]*)
 
2263
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
1312
2264
    shlibpath_overrides_runpath=yes
1313
2265
    hardcode_into_libs=yes
1314
2266
    ;;
1315
 
  *) # from 3.2 on
 
2267
  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
 
2268
  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
1316
2269
    shlibpath_overrides_runpath=no
1317
2270
    hardcode_into_libs=yes
1318
2271
    ;;
 
2272
  freebsd*) # from 4.6 on
 
2273
    shlibpath_overrides_runpath=yes
 
2274
    hardcode_into_libs=yes
 
2275
    ;;
1319
2276
  esac
1320
2277
  ;;
1321
2278
 
1335
2292
  version_type=sunos
1336
2293
  need_lib_prefix=no
1337
2294
  need_version=no
1338
 
  case "$host_cpu" in
 
2295
  case $host_cpu in
1339
2296
  ia64*)
1340
2297
    shrext_cmds='.so'
1341
2298
    hardcode_into_libs=yes
1375
2332
  postinstall_cmds='chmod 555 $lib'
1376
2333
  ;;
1377
2334
 
 
2335
interix3*)
 
2336
  version_type=linux
 
2337
  need_lib_prefix=no
 
2338
  need_version=no
 
2339
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
 
2340
  soname_spec='${libname}${release}${shared_ext}$major'
 
2341
  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
 
2342
  shlibpath_var=LD_LIBRARY_PATH
 
2343
  shlibpath_overrides_runpath=no
 
2344
  hardcode_into_libs=yes
 
2345
  ;;
 
2346
 
1378
2347
irix5* | irix6* | nonstopux*)
1379
2348
  case $host_os in
1380
2349
    nonstopux*) version_type=nonstopux ;;
1432
2401
  # before this can be enabled.
1433
2402
  hardcode_into_libs=yes
1434
2403
 
1435
 
  # find out which ABI we are using
1436
 
  libsuff=
1437
 
  case "$host_cpu" in
1438
 
  x86_64*|s390x*|powerpc64*)
1439
 
    echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1440
 
    if AC_TRY_EVAL(ac_compile); then
1441
 
      case `/usr/bin/file conftest.$ac_objext` in
1442
 
      *64-bit*)
1443
 
        libsuff=64
1444
 
        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
1445
 
        ;;
1446
 
      esac
1447
 
    fi
1448
 
    rm -rf conftest*
1449
 
    ;;
1450
 
  esac
1451
 
 
1452
2404
  # Append ld.so.conf contents to the search path
1453
2405
  if test -f /etc/ld.so.conf; then
1454
 
    lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '`
1455
 
    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
 
2406
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,    ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
 
2407
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
1456
2408
  fi
1457
2409
 
1458
2410
  # We used to test for /lib/ld.so.1 and disable shared libraries on
1513
2465
 
1514
2466
openbsd*)
1515
2467
  version_type=sunos
 
2468
  sys_lib_dlsearch_path_spec="/usr/lib"
1516
2469
  need_lib_prefix=no
1517
 
  need_version=yes
 
2470
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
 
2471
  case $host_os in
 
2472
    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
 
2473
    *)                         need_version=no  ;;
 
2474
  esac
1518
2475
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1519
2476
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1520
2477
  shlibpath_var=LD_LIBRARY_PATH
1552
2509
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1553
2510
  ;;
1554
2511
 
1555
 
sco3.2v5*)
1556
 
  version_type=osf
1557
 
  soname_spec='${libname}${release}${shared_ext}$major'
1558
 
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1559
 
  shlibpath_var=LD_LIBRARY_PATH
1560
 
  ;;
1561
 
 
1562
2512
solaris*)
1563
2513
  version_type=linux
1564
2514
  need_lib_prefix=no
1584
2534
  need_version=yes
1585
2535
  ;;
1586
2536
 
1587
 
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
2537
sysv4 | sysv4.3*)
1588
2538
  version_type=linux
1589
2539
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1590
2540
  soname_spec='${libname}${release}${shared_ext}$major'
1617
2567
  fi
1618
2568
  ;;
1619
2569
 
 
2570
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
 
2571
  version_type=freebsd-elf
 
2572
  need_lib_prefix=no
 
2573
  need_version=no
 
2574
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
 
2575
  soname_spec='${libname}${release}${shared_ext}$major'
 
2576
  shlibpath_var=LD_LIBRARY_PATH
 
2577
  hardcode_into_libs=yes
 
2578
  if test "$with_gnu_ld" = yes; then
 
2579
    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
 
2580
    shlibpath_overrides_runpath=no
 
2581
  else
 
2582
    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
 
2583
    shlibpath_overrides_runpath=yes
 
2584
    case $host_os in
 
2585
      sco3.2v5*)
 
2586
        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
 
2587
        ;;
 
2588
    esac
 
2589
  fi
 
2590
  sys_lib_dlsearch_path_spec='/usr/lib'
 
2591
  ;;
 
2592
 
1620
2593
uts4*)
1621
2594
  version_type=linux
1622
2595
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1630
2603
esac
1631
2604
AC_MSG_RESULT([$dynamic_linker])
1632
2605
test "$dynamic_linker" = no && can_build_shared=no
 
2606
 
 
2607
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
 
2608
if test "$GCC" = yes; then
 
2609
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 
2610
fi
1633
2611
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1634
2612
 
1635
2613
 
1654
2632
      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1655
2633
    fi
1656
2634
  fi
 
2635
  if test -z "$LTCFLAGS"; then
 
2636
    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
 
2637
  fi
1657
2638
 
1658
2639
  # Extract list of available tagged configurations in $ofile.
1659
2640
  # Note that this assumes the entire list is on one line.
1680
2661
 
1681
2662
      case $tagname in
1682
2663
      CXX)
1683
 
        if test -n "$CXX" && test "X$CXX" != "Xno"; then
 
2664
        if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
 
2665
            ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
 
2666
            (test "X$CXX" != "Xg++"))) ; then
1684
2667
          AC_LIBTOOL_LANG_CXX_CONFIG
1685
2668
        else
1686
2669
          tagname=""
1742
2725
 
1743
2726
# AC_LIBTOOL_WIN32_DLL
1744
2727
# --------------------
1745
 
# declare package support for building win32 dll's
 
2728
# declare package support for building win32 DLLs
1746
2729
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1747
2730
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1748
2731
])# AC_LIBTOOL_WIN32_DLL
1780
2763
 
1781
2764
# AC_DISABLE_SHARED
1782
2765
# -----------------
1783
 
#- set the default shared flag to --disable-shared
 
2766
# set the default shared flag to --disable-shared
1784
2767
AC_DEFUN([AC_DISABLE_SHARED],
1785
2768
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1786
2769
AC_ENABLE_SHARED(no)
1916
2899
      if test -n "$file_magic_test_file"; then
1917
2900
        case $deplibs_check_method in
1918
2901
        "file_magic "*)
1919
 
          file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
 
2902
          file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
1920
2903
          MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1921
2904
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1922
2905
            $EGREP "$file_magic_regex" > /dev/null; then
2026
3009
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2027
3010
      lt_cv_path_LD="$ac_dir/$ac_prog"
2028
3011
      # Check to see if the program is GNU ld.  I'd rather use --version,
2029
 
      # but apparently some GNU ld's only accept -v.
 
3012
      # but apparently some variants of GNU ld only accept -v.
2030
3013
      # Break only if it was the GNU/non-GNU ld that we prefer.
2031
3014
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2032
3015
      *GNU* | *'with BFD'*)
2058
3041
AC_DEFUN([AC_PROG_LD_GNU],
2059
3042
[AC_REQUIRE([AC_PROG_EGREP])dnl
2060
3043
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2061
 
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
 
3044
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
2062
3045
case `$LD -v 2>&1 </dev/null` in
2063
3046
*GNU* | *'with BFD'*)
2064
3047
  lt_cv_prog_gnu_ld=yes
2085
3068
*) reload_flag=" $reload_flag" ;;
2086
3069
esac
2087
3070
reload_cmds='$LD$reload_flag -o $output$reload_objs'
 
3071
case $host_os in
 
3072
  darwin*)
 
3073
    if test "$GCC" = yes; then
 
3074
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
 
3075
    else
 
3076
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
 
3077
    fi
 
3078
    ;;
 
3079
esac
2088
3080
])# AC_PROG_LD_RELOAD_FLAG
2089
3081
 
2090
3082
 
2118
3110
  lt_cv_deplibs_check_method=pass_all
2119
3111
  ;;
2120
3112
 
2121
 
bsdi4*)
 
3113
bsdi[[45]]*)
2122
3114
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2123
3115
  lt_cv_file_magic_cmd='/usr/bin/file -L'
2124
3116
  lt_cv_file_magic_test_file=/shlib/libc.so
2141
3133
  lt_cv_deplibs_check_method=pass_all
2142
3134
  ;;
2143
3135
 
2144
 
freebsd* | kfreebsd*-gnu)
 
3136
freebsd* | kfreebsd*-gnu | dragonfly*)
2145
3137
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2146
3138
    case $host_cpu in
2147
3139
    i*86 )
2148
3140
      # Not sure whether the presence of OpenBSD here was a mistake.
2149
3141
      # Let's accept both of them until this is cleared up.
2150
 
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
 
3142
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2151
3143
      lt_cv_file_magic_cmd=/usr/bin/file
2152
3144
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2153
3145
      ;;
2163
3155
 
2164
3156
hpux10.20* | hpux11*)
2165
3157
  lt_cv_file_magic_cmd=/usr/bin/file
2166
 
  case "$host_cpu" in
 
3158
  case $host_cpu in
2167
3159
  ia64*)
2168
3160
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2169
3161
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2179
3171
  esac
2180
3172
  ;;
2181
3173
 
 
3174
interix3*)
 
3175
  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
 
3176
  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
 
3177
  ;;
 
3178
 
2182
3179
irix5* | irix6* | nonstopux*)
2183
3180
  case $LD in
2184
3181
  *-32|*"-32 ") libmagic=32-bit;;
2191
3188
 
2192
3189
# This must be Linux ELF.
2193
3190
linux*)
2194
 
  case $host_cpu in
2195
 
  alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*|x86_64*)
2196
 
    lt_cv_deplibs_check_method=pass_all ;;
2197
 
  *)
2198
 
    # glibc up to 2.1.1 does not perform some relocations on ARM
2199
 
    # this will be overridden with pass_all, but let us keep it just in case
2200
 
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
2201
 
  esac
2202
 
  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2203
3191
  lt_cv_deplibs_check_method=pass_all
2204
3192
  ;;
2205
3193
 
2222
3210
  ;;
2223
3211
 
2224
3212
openbsd*)
2225
 
  lt_cv_file_magic_cmd=/usr/bin/file
2226
 
  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2227
3213
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2228
 
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
 
3214
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2229
3215
  else
2230
 
    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
 
3216
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2231
3217
  fi
2232
3218
  ;;
2233
3219
 
2235
3221
  lt_cv_deplibs_check_method=pass_all
2236
3222
  ;;
2237
3223
 
2238
 
sco3.2v5*)
2239
 
  lt_cv_deplibs_check_method=pass_all
2240
 
  ;;
2241
 
 
2242
3224
solaris*)
2243
3225
  lt_cv_deplibs_check_method=pass_all
2244
3226
  ;;
2245
3227
 
2246
 
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
3228
sysv4 | sysv4.3*)
2247
3229
  case $host_vendor in
2248
3230
  motorola)
2249
3231
    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]]'
2264
3246
  siemens)
2265
3247
    lt_cv_deplibs_check_method=pass_all
2266
3248
    ;;
 
3249
  pc)
 
3250
    lt_cv_deplibs_check_method=pass_all
 
3251
    ;;
2267
3252
  esac
2268
3253
  ;;
2269
3254
 
2270
 
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
 
3255
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2271
3256
  lt_cv_deplibs_check_method=pass_all
2272
3257
  ;;
2273
3258
esac
2287
3272
  # Let the user override the test.
2288
3273
  lt_cv_path_NM="$NM"
2289
3274
else
2290
 
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2291
 
  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2292
 
    IFS="$lt_save_ifs"
2293
 
    test -z "$ac_dir" && ac_dir=.
2294
 
    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
2295
 
    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2296
 
      # Check to see if the nm accepts a BSD-compat flag.
2297
 
      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2298
 
      #   nm: unknown option "B" ignored
2299
 
      # Tru64's nm complains that /dev/null is an invalid object file
2300
 
      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2301
 
      */dev/null* | *'Invalid file or object type'*)
2302
 
        lt_cv_path_NM="$tmp_nm -B"
2303
 
        break
2304
 
        ;;
2305
 
      *)
2306
 
        case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2307
 
        */dev/null*)
2308
 
          lt_cv_path_NM="$tmp_nm -p"
 
3275
  lt_nm_to_check="${ac_tool_prefix}nm"
 
3276
  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
 
3277
    lt_nm_to_check="$lt_nm_to_check nm"
 
3278
  fi
 
3279
  for lt_tmp_nm in $lt_nm_to_check; do
 
3280
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 
3281
    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
 
3282
      IFS="$lt_save_ifs"
 
3283
      test -z "$ac_dir" && ac_dir=.
 
3284
      tmp_nm="$ac_dir/$lt_tmp_nm"
 
3285
      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
 
3286
        # Check to see if the nm accepts a BSD-compat flag.
 
3287
        # Adding the `sed 1q' prevents false positives on HP-UX, which says:
 
3288
        #   nm: unknown option "B" ignored
 
3289
        # Tru64's nm complains that /dev/null is an invalid object file
 
3290
        case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
 
3291
        */dev/null* | *'Invalid file or object type'*)
 
3292
          lt_cv_path_NM="$tmp_nm -B"
2309
3293
          break
2310
3294
          ;;
2311
3295
        *)
2312
 
          lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2313
 
          continue # so that we can try to find one that supports BSD flags
 
3296
          case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
 
3297
          */dev/null*)
 
3298
            lt_cv_path_NM="$tmp_nm -p"
 
3299
            break
 
3300
            ;;
 
3301
          *)
 
3302
            lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
 
3303
            continue # so that we can try to find one that supports BSD flags
 
3304
            ;;
 
3305
          esac
2314
3306
          ;;
2315
3307
        esac
2316
 
      esac
2317
 
    fi
 
3308
      fi
 
3309
    done
 
3310
    IFS="$lt_save_ifs"
2318
3311
  done
2319
 
  IFS="$lt_save_ifs"
2320
3312
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2321
3313
fi])
2322
3314
NM="$lt_cv_path_NM"
2348
3340
# -----------------------------------
2349
3341
# sets LIBLTDL to the link flags for the libltdl convenience library and
2350
3342
# LTDLINCL to the include flags for the libltdl header and adds
2351
 
# --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
2352
 
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
2353
 
# DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
2354
 
# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
2355
 
# '${top_srcdir}/' (note the single quotes!).  If your package is not
2356
 
# flat and you're not using automake, define top_builddir and
2357
 
# top_srcdir appropriately in the Makefiles.
 
3343
# --enable-ltdl-convenience to the configure arguments.  Note that
 
3344
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
 
3345
# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
 
3346
# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
 
3347
# (note the single quotes!).  If your package is not flat and you're not
 
3348
# using automake, define top_builddir and top_srcdir appropriately in
 
3349
# the Makefiles.
2358
3350
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2359
3351
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2360
3352
  case $enable_ltdl_convenience in
2373
3365
# -----------------------------------
2374
3366
# sets LIBLTDL to the link flags for the libltdl installable library and
2375
3367
# LTDLINCL to the include flags for the libltdl header and adds
2376
 
# --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
2377
 
# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
2378
 
# DIRECTORY is not provided and an installed libltdl is not found, it is
2379
 
# assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
2380
 
# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
2381
 
# quotes!).  If your package is not flat and you're not using automake,
2382
 
# define top_builddir and top_srcdir appropriately in the Makefiles.
 
3368
# --enable-ltdl-install to the configure arguments.  Note that
 
3369
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
 
3370
# and an installed libltdl is not found, it is assumed to be `libltdl'.
 
3371
# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
 
3372
# '${top_srcdir}/' (note the single quotes!).  If your package is not
 
3373
# flat and you're not using automake, define top_builddir and top_srcdir
 
3374
# appropriately in the Makefiles.
2383
3375
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2384
3376
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2385
3377
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2417
3409
# ---------------
2418
3410
AC_DEFUN([_LT_AC_LANG_CXX],
2419
3411
[AC_REQUIRE([AC_PROG_CXX])
2420
 
AC_REQUIRE([AC_PROG_CXXCPP])
 
3412
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2421
3413
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2422
3414
])# _LT_AC_LANG_CXX
2423
3415
 
 
3416
# _LT_AC_PROG_CXXCPP
 
3417
# ------------------
 
3418
AC_DEFUN([_LT_AC_PROG_CXXCPP],
 
3419
[
 
3420
AC_REQUIRE([AC_PROG_CXX])
 
3421
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
 
3422
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
 
3423
    (test "X$CXX" != "Xg++"))) ; then
 
3424
  AC_PROG_CXXCPP
 
3425
fi
 
3426
])# _LT_AC_PROG_CXXCPP
2424
3427
 
2425
3428
# AC_LIBTOOL_F77
2426
3429
# --------------
2460
3463
 
2461
3464
 
2462
3465
# AC_LIBTOOL_RC
2463
 
# --------------
 
3466
# -------------
2464
3467
# enable support for Windows resource files
2465
3468
AC_DEFUN([AC_LIBTOOL_RC],
2466
3469
[AC_REQUIRE([LT_AC_PROG_RC])
2493
3496
 
2494
3497
_LT_AC_SYS_COMPILER
2495
3498
 
2496
 
#
2497
 
# Check for any special shared library compilation flags.
2498
 
#
2499
 
_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
2500
 
if test "$GCC" = no; then
2501
 
  case $host_os in
2502
 
  sco3.2v5*)
2503
 
    _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
2504
 
    ;;
2505
 
  esac
2506
 
fi
2507
 
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
2508
 
  AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
2509
 
  if echo "$old_CC $old_CFLAGS " | grep "[[     ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[        ]]" >/dev/null; then :
2510
 
  else
2511
 
    AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
2512
 
    _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
2513
 
  fi
2514
 
fi
2515
 
 
2516
 
 
2517
 
#
2518
 
# Check to make sure the static flag actually works.
2519
 
#
2520
 
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
2521
 
  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
2522
 
  $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
2523
 
  [],
2524
 
  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
2525
 
 
 
3499
# save warnings/boilerplate of simple test code
 
3500
_LT_COMPILER_BOILERPLATE
 
3501
_LT_LINKER_BOILERPLATE
2526
3502
 
2527
3503
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2528
3504
AC_LIBTOOL_PROG_COMPILER_PIC($1)
2532
3508
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2533
3509
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2534
3510
AC_LIBTOOL_SYS_LIB_STRIP
2535
 
AC_LIBTOOL_DLOPEN_SELF($1)
 
3511
AC_LIBTOOL_DLOPEN_SELF
2536
3512
 
2537
 
# Report which librarie types wil actually be built
 
3513
# Report which library types will actually be built
2538
3514
AC_MSG_CHECKING([if libtool supports shared libraries])
2539
3515
AC_MSG_RESULT([$can_build_shared])
2540
3516
 
2543
3519
 
2544
3520
# On AIX, shared libraries and static libraries use the same namespace, and
2545
3521
# are all built from PIC.
2546
 
case "$host_os" in
 
3522
case $host_os in
2547
3523
aix3*)
2548
3524
  test "$enable_shared" = yes && enable_static=no
2549
3525
  if test -n "$RANLIB"; then
2556
3532
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2557
3533
    test "$enable_shared" = yes && enable_static=no
2558
3534
  fi
2559
 
  ;;
2560
 
  darwin* | rhapsody*)
2561
 
  if test "$GCC" = yes; then
2562
 
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2563
 
    case "$host_os" in
2564
 
    rhapsody* | darwin1.[[012]])
2565
 
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
2566
 
      ;;
2567
 
    *) # Darwin 1.3 on
2568
 
      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
2569
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
2570
 
      else
2571
 
        case ${MACOSX_DEPLOYMENT_TARGET} in
2572
 
          10.[[012]])
2573
 
            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
2574
 
            ;;
2575
 
          10.*)
2576
 
            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
2577
 
            ;;
2578
 
        esac
2579
 
      fi
2580
 
      ;;
2581
 
    esac
2582
 
    output_verbose_link_cmd='echo'
2583
 
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
2584
 
    _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
2585
 
    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
2586
 
    _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}'
2587
 
    _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}'
2588
 
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
2589
 
    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
2590
 
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2591
 
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
2592
 
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2593
 
  else
2594
 
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
2595
 
  fi
2596
3535
    ;;
2597
3536
esac
2598
3537
AC_MSG_RESULT([$enable_shared])
2618
3557
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2619
3558
[AC_LANG_PUSH(C++)
2620
3559
AC_REQUIRE([AC_PROG_CXX])
2621
 
AC_REQUIRE([AC_PROG_CXXCPP])
 
3560
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2622
3561
 
2623
3562
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2624
3563
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
2630
3569
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2631
3570
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2632
3571
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
 
3572
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2633
3573
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
2634
3574
_LT_AC_TAGVAR(module_cmds, $1)=
2635
3575
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
2647
3587
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2648
3588
 
2649
3589
# Source file extension for C++ test sources.
2650
 
ac_ext=cc
 
3590
ac_ext=cpp
2651
3591
 
2652
3592
# Object file extension for compiled C++ test sources.
2653
3593
objext=o
2657
3597
lt_simple_compile_test_code="int some_variable = 0;\n"
2658
3598
 
2659
3599
# Code to be used in simple link tests
2660
 
lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
 
3600
lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
2661
3601
 
2662
3602
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
2663
3603
_LT_AC_SYS_COMPILER
2664
3604
 
 
3605
# save warnings/boilerplate of simple test code
 
3606
_LT_COMPILER_BOILERPLATE
 
3607
_LT_LINKER_BOILERPLATE
 
3608
 
2665
3609
# Allow CC to be a program name with arguments.
2666
3610
lt_save_CC=$CC
2667
3611
lt_save_LD=$LD
2672
3616
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2673
3617
  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2674
3618
else
2675
 
  unset lt_cv_prog_gnu_ld
 
3619
  $as_unset lt_cv_prog_gnu_ld
2676
3620
fi
2677
3621
if test -n "${lt_cv_path_LDCXX+set}"; then
2678
3622
  lt_cv_path_LD=$lt_cv_path_LDCXX
2679
3623
else
2680
 
  unset lt_cv_path_LD
 
3624
  $as_unset lt_cv_path_LD
2681
3625
fi
2682
3626
test -z "${LDCXX+set}" || LD=$LDCXX
2683
3627
CC=${CXX-"c++"}
2684
3628
compiler=$CC
2685
3629
_LT_AC_TAGVAR(compiler, $1)=$CC
2686
 
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
 
3630
_LT_CC_BASENAME([$compiler])
2687
3631
 
2688
3632
# We don't want -fno-exception wen compiling C++ code, so set the
2689
3633
# no_builtin_flag separately
2772
3716
            ;;
2773
3717
          esac
2774
3718
        done
 
3719
        ;;
2775
3720
      esac
2776
3721
 
2777
3722
      exp_sym_flag='-bexport'
2790
3735
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2791
3736
 
2792
3737
    if test "$GXX" = yes; then
2793
 
      case $host_os in aix4.[012]|aix4.[012].*)
 
3738
      case $host_os in aix4.[[012]]|aix4.[[012]].*)
2794
3739
      # We only want to do this on AIX 4.2 and lower, the check
2795
3740
      # below for broken collect2 doesn't work under 4.3+
2796
3741
        collect2name=`${CC} -print-prog-name=collect2`
2809
3754
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2810
3755
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2811
3756
        fi
 
3757
        ;;
2812
3758
      esac
2813
3759
      shared_flag='-shared'
 
3760
      if test "$aix_use_runtimelinking" = yes; then
 
3761
        shared_flag="$shared_flag "'${wl}-G'
 
3762
      fi
2814
3763
    else
2815
3764
      # not using gcc
2816
3765
      if test "$host_cpu" = ia64; then
2837
3786
      _LT_AC_SYS_LIBPATH_AIX
2838
3787
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2839
3788
 
2840
 
      _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"
 
3789
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
2841
3790
     else
2842
3791
      if test "$host_cpu" = ia64; then
2843
3792
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
2844
3793
        _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
2845
 
        _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"
 
3794
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
2846
3795
      else
2847
3796
        # Determine the default libpath from the value encoded in an empty executable.
2848
3797
        _LT_AC_SYS_LIBPATH_AIX
2851
3800
        # -berok will link without error, but may produce a broken library.
2852
3801
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
2853
3802
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
2854
 
        # -bexpall does not export symbols beginning with underscore (_)
2855
 
        _LT_AC_TAGVAR(always_export_symbols, $1)=yes
2856
3803
        # Exported symbols can be pulled into shared objects from archives
2857
 
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
 
3804
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
2858
3805
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
2859
 
        # This is similar to how AIX traditionally builds it's shared libraries.
2860
 
        _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'
 
3806
        # This is similar to how AIX traditionally builds its shared libraries.
 
3807
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
2861
3808
      fi
2862
3809
    fi
2863
3810
    ;;
 
3811
 
 
3812
  beos*)
 
3813
    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
3814
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
 
3815
      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
 
3816
      # support --undefined.  This deserves some investigation.  FIXME
 
3817
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
3818
    else
 
3819
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3820
    fi
 
3821
    ;;
 
3822
 
2864
3823
  chorus*)
2865
3824
    case $cc_basename in
2866
3825
      *)
2879
3838
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
2880
3839
 
2881
3840
    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
2882
 
      _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'
 
3841
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
2883
3842
      # If the export-symbols file already is a .def file (1st line
2884
3843
      # is EXPORTS), use it as is; otherwise, prepend...
2885
3844
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
2888
3847
        echo EXPORTS > $output_objdir/$soname.def;
2889
3848
        cat $export_symbols >> $output_objdir/$soname.def;
2890
3849
      fi~
2891
 
      $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'
 
3850
      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
2892
3851
    else
2893
3852
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
2894
3853
    fi
2895
3854
  ;;
2896
 
 
2897
 
  darwin* | rhapsody*)
2898
 
  if test "$GXX" = yes; then
2899
 
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2900
 
    case "$host_os" in
2901
 
    rhapsody* | darwin1.[[012]])
2902
 
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
2903
 
      ;;
2904
 
    *) # Darwin 1.3 on
2905
 
      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
2906
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
2907
 
      else
2908
 
        case ${MACOSX_DEPLOYMENT_TARGET} in
2909
 
          10.[[012]])
2910
 
            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
2911
 
            ;;
2912
 
          10.*)
2913
 
            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
2914
 
            ;;
 
3855
      darwin* | rhapsody*)
 
3856
        case $host_os in
 
3857
        rhapsody* | darwin1.[[012]])
 
3858
         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
 
3859
         ;;
 
3860
       *) # Darwin 1.3 on
 
3861
         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
 
3862
           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
 
3863
         else
 
3864
           case ${MACOSX_DEPLOYMENT_TARGET} in
 
3865
             10.[[012]])
 
3866
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
 
3867
               ;;
 
3868
             10.*)
 
3869
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
 
3870
               ;;
 
3871
           esac
 
3872
         fi
 
3873
         ;;
2915
3874
        esac
2916
 
      fi
2917
 
      ;;
2918
 
    esac
2919
 
    lt_int_apple_cc_single_mod=no
2920
 
    output_verbose_link_cmd='echo'
2921
 
    if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
2922
 
      lt_int_apple_cc_single_mod=yes
2923
 
    fi
2924
 
    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
2925
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
2926
 
    else
2927
 
      _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'
2928
 
    fi
2929
 
    _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
3875
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
3876
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
3877
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
 
3878
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
3879
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
 
3880
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2930
3881
 
2931
 
    # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
2932
 
    if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
2933
 
      _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}'
2934
 
    else
2935
 
      _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}'
2936
 
    fi
2937
 
    _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}'
2938
 
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
2939
 
    _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
2940
 
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2941
 
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
2942
 
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2943
 
  else
2944
 
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
2945
 
  fi
2946
 
    ;;
 
3882
    if test "$GXX" = yes ; then
 
3883
      lt_int_apple_cc_single_mod=no
 
3884
      output_verbose_link_cmd='echo'
 
3885
      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
 
3886
       lt_int_apple_cc_single_mod=yes
 
3887
      fi
 
3888
      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
 
3889
       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 
3890
      else
 
3891
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 
3892
        fi
 
3893
        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
3894
        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
 
3895
          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
 
3896
            _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}'
 
3897
          else
 
3898
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
3899
          fi
 
3900
            _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}'
 
3901
      else
 
3902
      case $cc_basename in
 
3903
        xlc*)
 
3904
         output_verbose_link_cmd='echo'
 
3905
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
 
3906
          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
3907
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
 
3908
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 
3909
          _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}'
 
3910
          ;;
 
3911
       *)
 
3912
         _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
3913
          ;;
 
3914
      esac
 
3915
      fi
 
3916
        ;;
2947
3917
 
2948
3918
  dgux*)
2949
3919
    case $cc_basename in
2950
 
      ec++)
 
3920
      ec++*)
2951
3921
        # FIXME: insert proper C++ library support
2952
3922
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
2953
3923
        ;;
2954
 
      ghcx)
 
3924
      ghcx*)
2955
3925
        # Green Hills C++ Compiler
2956
3926
        # FIXME: insert proper C++ library support
2957
3927
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
2962
3932
        ;;
2963
3933
    esac
2964
3934
    ;;
2965
 
  freebsd[12]*)
 
3935
  freebsd[[12]]*)
2966
3936
    # C++ shared libraries reported to be fairly broken before switch to ELF
2967
3937
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
2968
3938
    ;;
2969
3939
  freebsd-elf*)
2970
3940
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2971
3941
    ;;
2972
 
  freebsd* | kfreebsd*-gnu)
 
3942
  freebsd* | kfreebsd*-gnu | dragonfly*)
2973
3943
    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
2974
3944
    # conventions
2975
3945
    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
2986
3956
                                # location of the library.
2987
3957
 
2988
3958
    case $cc_basename in
2989
 
    CC)
 
3959
    CC*)
2990
3960
      # FIXME: insert proper C++ library support
2991
3961
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
2992
3962
      ;;
2993
 
    aCC)
 
3963
    aCC*)
2994
3964
      _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'
2995
3965
      # Commands to make compiler produce verbose output that lists
2996
3966
      # what "hidden" libraries, object files and flags are used when
3000
3970
      # explicitly linking system object files so we need to strip them
3001
3971
      # from the output so that they don't get included in the library
3002
3972
      # dependencies.
3003
 
      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'
 
3973
      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'
3004
3974
      ;;
3005
3975
    *)
3006
3976
      if test "$GXX" = yes; then
3014
3984
    ;;
3015
3985
  hpux10*|hpux11*)
3016
3986
    if test $with_gnu_ld = no; then
3017
 
      case "$host_cpu" in
3018
 
      hppa*64*)
3019
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
3987
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
3988
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
3989
 
 
3990
      case $host_cpu in
 
3991
      hppa*64*|ia64*)
3020
3992
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3021
 
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3022
 
        ;;
3023
 
      ia64*)
3024
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3025
3993
        ;;
3026
3994
      *)
3027
 
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3028
 
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3029
3995
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3030
3996
        ;;
3031
3997
      esac
3032
3998
    fi
3033
 
    case "$host_cpu" in
3034
 
    hppa*64*)
3035
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3036
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3037
 
      ;;
3038
 
    ia64*)
3039
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3040
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3041
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3042
 
                                              # but as the default
3043
 
                                              # location of the library.
 
3999
    case $host_cpu in
 
4000
    hppa*64*|ia64*)
 
4001
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
4002
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3044
4003
      ;;
3045
4004
    *)
3046
4005
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3051
4010
    esac
3052
4011
 
3053
4012
    case $cc_basename in
3054
 
      CC)
 
4013
      CC*)
3055
4014
        # FIXME: insert proper C++ library support
3056
4015
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3057
4016
        ;;
3058
 
      aCC)
3059
 
        case "$host_cpu" in
3060
 
        hppa*64*|ia64*)
3061
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
 
4017
      aCC*)
 
4018
        case $host_cpu in
 
4019
        hppa*64*)
 
4020
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
4021
          ;;
 
4022
        ia64*)
 
4023
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3062
4024
          ;;
3063
4025
        *)
3064
4026
          _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'
3077
4039
      *)
3078
4040
        if test "$GXX" = yes; then
3079
4041
          if test $with_gnu_ld = no; then
3080
 
            case "$host_cpu" in
3081
 
            ia64*|hppa*64*)
3082
 
              _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
 
4042
            case $host_cpu in
 
4043
            hppa*64*)
 
4044
              _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
4045
              ;;
 
4046
            ia64*)
 
4047
              _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3083
4048
              ;;
3084
4049
            *)
3085
4050
              _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'
3093
4058
        ;;
3094
4059
    esac
3095
4060
    ;;
 
4061
  interix3*)
 
4062
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
4063
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
4064
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
4065
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
4066
    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
 
4067
    # Instead, shared libraries are loaded at an image base (0x10000000 by
 
4068
    # default) and relocated if they conflict, which is a slow very memory
 
4069
    # consuming and fragmenting process.  To avoid this, we pick a random,
 
4070
    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
 
4071
    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
 
4072
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
 
4073
    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
 
4074
    ;;
3096
4075
  irix5* | irix6*)
3097
4076
    case $cc_basename in
3098
 
      CC)
 
4077
      CC*)
3099
4078
        # SGI C++
3100
 
        _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'
 
4079
        _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 ${output_objdir}/so_locations -o $lib'
3101
4080
 
3102
4081
        # Archives containing C++ object files must be created using
3103
4082
        # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
3108
4087
      *)
3109
4088
        if test "$GXX" = yes; then
3110
4089
          if test "$with_gnu_ld" = no; then
3111
 
            _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'
 
4090
            _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}${output_objdir}/so_locations -o $lib'
3112
4091
          else
3113
4092
            _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'
3114
4093
          fi
3121
4100
    ;;
3122
4101
  linux*)
3123
4102
    case $cc_basename in
3124
 
      KCC)
 
4103
      KCC*)
3125
4104
        # Kuck and Associates, Inc. (KAI) C++ Compiler
3126
4105
 
3127
4106
        # KCC will only create a shared library if the output file
3146
4125
        # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3147
4126
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3148
4127
        ;;
3149
 
      icpc)
 
4128
      icpc*)
3150
4129
        # Intel C++
3151
4130
        with_gnu_ld=yes
 
4131
        # version 8.0 and above of icpc choke on multiply defined symbols
 
4132
        # if we add $predep_objects and $postdep_objects, however 7.1 and
 
4133
        # earlier do not add the objects themselves.
 
4134
        case `$CC -V 2>&1` in
 
4135
        *"Version 7."*)
 
4136
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
4137
          _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'
 
4138
          ;;
 
4139
        *)  # Version 8.0 or newer
 
4140
          tmp_idyn=
 
4141
          case $host_cpu in
 
4142
            ia64*) tmp_idyn=' -i_dynamic';;
 
4143
          esac
 
4144
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
4145
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
4146
          ;;
 
4147
        esac
3152
4148
        _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3153
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3154
 
        _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'
3155
4149
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3156
4150
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3157
4151
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3158
4152
        ;;
3159
 
      cxx)
 
4153
      pgCC*)
 
4154
        # Portland Group C++ compiler
 
4155
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
 
4156
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
 
4157
 
 
4158
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
4159
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
4160
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
 
4161
        ;;
 
4162
      cxx*)
3160
4163
        # Compaq C++
3161
4164
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3162
4165
        _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'
3187
4190
    ;;
3188
4191
  mvs*)
3189
4192
    case $cc_basename in
3190
 
      cxx)
 
4193
      cxx*)
3191
4194
        # FIXME: insert proper C++ library support
3192
4195
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3193
4196
        ;;
3208
4211
    # Workaround some broken pre-1.5 toolchains
3209
4212
    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3210
4213
    ;;
 
4214
  openbsd2*)
 
4215
    # C++ shared libraries are fairly broken
 
4216
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
4217
    ;;
 
4218
  openbsd*)
 
4219
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
4220
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
4221
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
 
4222
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
4223
    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 
4224
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
 
4225
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
4226
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
4227
    fi
 
4228
    output_verbose_link_cmd='echo'
 
4229
    ;;
3211
4230
  osf3*)
3212
4231
    case $cc_basename in
3213
 
      KCC)
 
4232
      KCC*)
3214
4233
        # Kuck and Associates, Inc. (KAI) C++ Compiler
3215
4234
 
3216
4235
        # KCC will only create a shared library if the output file
3226
4245
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3227
4246
 
3228
4247
        ;;
3229
 
      RCC)
 
4248
      RCC*)
3230
4249
        # Rational C++ 2.4.1
3231
4250
        # FIXME: insert proper C++ library support
3232
4251
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3233
4252
        ;;
3234
 
      cxx)
 
4253
      cxx*)
3235
4254
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3236
 
        _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'
 
4255
        _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 ${output_objdir}/so_locations -o $lib'
3237
4256
 
3238
4257
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3239
4258
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3251
4270
      *)
3252
4271
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3253
4272
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3254
 
          _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'
 
4273
          _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}${output_objdir}/so_locations -o $lib'
3255
4274
 
3256
4275
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3257
4276
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3270
4289
    ;;
3271
4290
  osf4* | osf5*)
3272
4291
    case $cc_basename in
3273
 
      KCC)
 
4292
      KCC*)
3274
4293
        # Kuck and Associates, Inc. (KAI) C++ Compiler
3275
4294
 
3276
4295
        # KCC will only create a shared library if the output file
3285
4304
        # the KAI C++ compiler.
3286
4305
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3287
4306
        ;;
3288
 
      RCC)
 
4307
      RCC*)
3289
4308
        # Rational C++ 2.4.1
3290
4309
        # FIXME: insert proper C++ library support
3291
4310
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3292
4311
        ;;
3293
 
      cxx)
 
4312
      cxx*)
3294
4313
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3295
 
        _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'
 
4314
        _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 ${output_objdir}/so_locations -o $lib'
3296
4315
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3297
4316
          echo "-hidden">> $lib.exp~
3298
 
          $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~
 
4317
          $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 ${output_objdir}/so_locations -o $lib~
3299
4318
          $rm $lib.exp'
3300
4319
 
3301
4320
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3314
4333
      *)
3315
4334
        if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3316
4335
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3317
 
         _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'
 
4336
         _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}${output_objdir}/so_locations -o $lib'
3318
4337
 
3319
4338
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3320
4339
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3335
4354
    # FIXME: insert proper C++ library support
3336
4355
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3337
4356
    ;;
3338
 
  sco*)
3339
 
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3340
 
    case $cc_basename in
3341
 
      CC)
3342
 
        # FIXME: insert proper C++ library support
3343
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3344
 
        ;;
3345
 
      *)
3346
 
        # FIXME: insert proper C++ library support
3347
 
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3348
 
        ;;
3349
 
    esac
3350
 
    ;;
3351
4357
  sunos4*)
3352
4358
    case $cc_basename in
3353
 
      CC)
 
4359
      CC*)
3354
4360
        # Sun C++ 4.x
3355
4361
        # FIXME: insert proper C++ library support
3356
4362
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3357
4363
        ;;
3358
 
      lcc)
 
4364
      lcc*)
3359
4365
        # Lucid
3360
4366
        # FIXME: insert proper C++ library support
3361
4367
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3368
4374
    ;;
3369
4375
  solaris*)
3370
4376
    case $cc_basename in
3371
 
      CC)
 
4377
      CC*)
3372
4378
        # Sun C++ 4.2, 5.x and Centerline C++
 
4379
        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
3373
4380
        _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3374
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
 
4381
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3375
4382
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3376
 
        $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'
 
4383
        $CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3377
4384
 
3378
4385
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3379
4386
        _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3380
4387
        case $host_os in
3381
 
          solaris2.[0-5] | solaris2.[0-5].*) ;;
 
4388
          solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3382
4389
          *)
3383
4390
            # The C++ compiler is used as linker so we must use $wl
3384
4391
            # flag to pass the commands to the underlying system
3385
 
            # linker.
 
4392
            # linker. We must also pass each convience library through
 
4393
            # to the system linker between allextract/defaultextract.
 
4394
            # The C++ compiler will combine linker options so we
 
4395
            # cannot just pass the convience library names through
 
4396
            # without $wl.
3386
4397
            # Supported since Solaris 2.6 (maybe 2.5.1?)
3387
 
            _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
 
4398
            _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
3388
4399
            ;;
3389
4400
        esac
3390
4401
        _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3391
4402
 
3392
 
        # Commands to make compiler produce verbose output that lists
3393
 
        # what "hidden" libraries, object files and flags are used when
3394
 
        # linking a shared library.
3395
 
        #
3396
 
        # There doesn't appear to be a way to prevent this compiler from
3397
 
        # explicitly linking system object files so we need to strip them
3398
 
        # from the output so that they don't get included in the library
3399
 
        # dependencies.
3400
 
        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'
 
4403
        output_verbose_link_cmd='echo'
3401
4404
 
3402
4405
        # Archives containing C++ object files must be created using
3403
4406
        # "CC -xar", where "CC" is the Sun C++ compiler.  This is
3405
4408
        # in the archive.
3406
4409
        _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3407
4410
        ;;
3408
 
      gcx)
 
4411
      gcx*)
3409
4412
        # Green Hills C++ Compiler
3410
4413
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3411
4414
 
3443
4446
        ;;
3444
4447
    esac
3445
4448
    ;;
3446
 
  sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
3447
 
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
4449
  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
 
4450
    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
4451
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
4452
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
4453
    runpath_var='LD_RUN_PATH'
 
4454
 
 
4455
    case $cc_basename in
 
4456
      CC*)
 
4457
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
4458
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
4459
        ;;
 
4460
      *)
 
4461
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
4462
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
4463
        ;;
 
4464
    esac
 
4465
    ;;
 
4466
  sysv5* | sco3.2v5* | sco5v6*)
 
4467
    # Note: We can NOT use -z defs as we might desire, because we do not
 
4468
    # link with -lc, and that would cause any symbols used from libc to
 
4469
    # always be unresolved, which means just about no library would
 
4470
    # ever link correctly.  If we're not using GNU ld we use -z text
 
4471
    # though, which does catch some bad symbols but isn't as heavy-handed
 
4472
    # as -z defs.
 
4473
    # For security reasons, it is highly recommended that you always
 
4474
    # use absolute paths for naming shared libraries, and exclude the
 
4475
    # DT_RUNPATH tag from executables and libraries.  But doing so
 
4476
    # requires that you compile everything twice, which is a pain.
 
4477
    # So that behaviour is only enabled if SCOABSPATH is set to a
 
4478
    # non-empty value in the environment.  Most likely only useful for
 
4479
    # creating official distributions of packages.
 
4480
    # This is a hack until libtool officially supports absolute path
 
4481
    # names for shared libraries.
 
4482
    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
4483
    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
 
4484
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
4485
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
4486
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
 
4487
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
 
4488
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
4489
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
 
4490
    runpath_var='LD_RUN_PATH'
 
4491
 
 
4492
    case $cc_basename in
 
4493
      CC*)
 
4494
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
4495
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
4496
        ;;
 
4497
      *)
 
4498
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
4499
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
4500
        ;;
 
4501
    esac
3448
4502
    ;;
3449
4503
  tandem*)
3450
4504
    case $cc_basename in
3451
 
      NCC)
 
4505
      NCC*)
3452
4506
        # NonStop-UX NCC 3.20
3453
4507
        # FIXME: insert proper C++ library support
3454
4508
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3481
4535
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3482
4536
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3483
4537
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3484
 
AC_LIBTOOL_SYS_LIB_STRIP
3485
 
AC_LIBTOOL_DLOPEN_SELF($1)
3486
4538
 
3487
4539
AC_LIBTOOL_CONFIG($1)
3488
4540
 
3500
4552
])# AC_LIBTOOL_LANG_CXX_CONFIG
3501
4553
 
3502
4554
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3503
 
# ------------------------
 
4555
# ------------------------------------
3504
4556
# Figure out "hidden" library dependencies from verbose
3505
4557
# compiler output when linking a shared library.
3506
4558
# Parse the compiler output and extract the necessary
3554
4606
  # The `*' in the case matches for architectures that use `case' in
3555
4607
  # $output_verbose_cmd can trigger glob expansion during the loop
3556
4608
  # eval without this substitution.
3557
 
  output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
 
4609
  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
3558
4610
 
3559
4611
  for p in `eval $output_verbose_link_cmd`; do
3560
4612
    case $p in
3630
4682
 
3631
4683
$rm -f confest.$objext
3632
4684
 
 
4685
# PORTME: override above test on systems where it is broken
 
4686
ifelse([$1],[CXX],
 
4687
[case $host_os in
 
4688
interix3*)
 
4689
  # Interix 3.5 installs completely hosed .la files for C++, so rather than
 
4690
  # hack all around it, let's just trust "g++" to DTRT.
 
4691
  _LT_AC_TAGVAR(predep_objects,$1)=
 
4692
  _LT_AC_TAGVAR(postdep_objects,$1)=
 
4693
  _LT_AC_TAGVAR(postdeps,$1)=
 
4694
  ;;
 
4695
 
 
4696
solaris*)
 
4697
  case $cc_basename in
 
4698
  CC*)
 
4699
    # Adding this requires a known-good setup of shared libraries for
 
4700
    # Sun compiler versions before 5.6, else PIC objects from an old
 
4701
    # archive will be linked into the output, leading to subtle bugs.
 
4702
    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
 
4703
    ;;
 
4704
  esac
 
4705
  ;;
 
4706
esac
 
4707
])
 
4708
 
3633
4709
case " $_LT_AC_TAGVAR(postdeps, $1) " in
3634
4710
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3635
4711
esac
3636
4712
])# AC_LIBTOOL_POSTDEP_PREDEP
3637
4713
 
3638
4714
# AC_LIBTOOL_LANG_F77_CONFIG
3639
 
# ------------------------
 
4715
# --------------------------
3640
4716
# Ensure that the configuration vars for the C compiler are
3641
4717
# suitably defined.  Those variables are subsequently used by
3642
4718
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3680
4756
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3681
4757
_LT_AC_SYS_COMPILER
3682
4758
 
 
4759
# save warnings/boilerplate of simple test code
 
4760
_LT_COMPILER_BOILERPLATE
 
4761
_LT_LINKER_BOILERPLATE
 
4762
 
3683
4763
# Allow CC to be a program name with arguments.
3684
4764
lt_save_CC="$CC"
3685
4765
CC=${F77-"f77"}
3686
4766
compiler=$CC
3687
4767
_LT_AC_TAGVAR(compiler, $1)=$CC
3688
 
cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
 
4768
_LT_CC_BASENAME([$compiler])
3689
4769
 
3690
4770
AC_MSG_CHECKING([if libtool supports shared libraries])
3691
4771
AC_MSG_RESULT([$can_build_shared])
3695
4775
 
3696
4776
# On AIX, shared libraries and static libraries use the same namespace, and
3697
4777
# are all built from PIC.
3698
 
case "$host_os" in
 
4778
case $host_os in
3699
4779
aix3*)
3700
4780
  test "$enable_shared" = yes && enable_static=no
3701
4781
  if test -n "$RANLIB"; then
3704
4784
  fi
3705
4785
  ;;
3706
4786
aix4* | aix5*)
3707
 
  test "$enable_shared" = yes && enable_static=no
 
4787
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
 
4788
    test "$enable_shared" = yes && enable_static=no
 
4789
  fi
3708
4790
  ;;
3709
4791
esac
3710
4792
AC_MSG_RESULT([$enable_shared])
3714
4796
test "$enable_shared" = yes || enable_static=yes
3715
4797
AC_MSG_RESULT([$enable_static])
3716
4798
 
3717
 
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3718
 
 
3719
4799
_LT_AC_TAGVAR(GCC, $1)="$G77"
3720
4800
_LT_AC_TAGVAR(LD, $1)="$LD"
3721
4801
 
3725
4805
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3726
4806
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3727
4807
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3728
 
AC_LIBTOOL_SYS_LIB_STRIP
3729
 
 
3730
4808
 
3731
4809
AC_LIBTOOL_CONFIG($1)
3732
4810
 
3755
4833
lt_simple_compile_test_code="class foo {}\n"
3756
4834
 
3757
4835
# Code to be used in simple link tests
3758
 
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
 
4836
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
3759
4837
 
3760
4838
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3761
4839
_LT_AC_SYS_COMPILER
3762
4840
 
 
4841
# save warnings/boilerplate of simple test code
 
4842
_LT_COMPILER_BOILERPLATE
 
4843
_LT_LINKER_BOILERPLATE
 
4844
 
3763
4845
# Allow CC to be a program name with arguments.
3764
4846
lt_save_CC="$CC"
3765
4847
CC=${GCJ-"gcj"}
3766
4848
compiler=$CC
3767
4849
_LT_AC_TAGVAR(compiler, $1)=$CC
 
4850
_LT_CC_BASENAME([$compiler])
3768
4851
 
3769
4852
# GCJ did not exist at the time GCC didn't implicitly link libc in.
3770
4853
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3771
4854
 
 
4855
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
4856
 
3772
4857
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3773
4858
AC_LIBTOOL_PROG_COMPILER_PIC($1)
3774
4859
AC_LIBTOOL_PROG_CC_C_O($1)
3776
4861
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3777
4862
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3778
4863
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3779
 
AC_LIBTOOL_SYS_LIB_STRIP
3780
 
AC_LIBTOOL_DLOPEN_SELF($1)
3781
4864
 
3782
4865
AC_LIBTOOL_CONFIG($1)
3783
4866
 
3787
4870
 
3788
4871
 
3789
4872
# AC_LIBTOOL_LANG_RC_CONFIG
3790
 
# --------------------------
 
4873
# -------------------------
3791
4874
# Ensure that the configuration vars for the Windows resource compiler are
3792
4875
# suitably defined.  Those variables are subsequently used by
3793
4876
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3811
4894
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3812
4895
_LT_AC_SYS_COMPILER
3813
4896
 
 
4897
# save warnings/boilerplate of simple test code
 
4898
_LT_COMPILER_BOILERPLATE
 
4899
_LT_LINKER_BOILERPLATE
 
4900
 
3814
4901
# Allow CC to be a program name with arguments.
3815
4902
lt_save_CC="$CC"
3816
4903
CC=${RC-"windres"}
3817
4904
compiler=$CC
3818
4905
_LT_AC_TAGVAR(compiler, $1)=$CC
 
4906
_LT_CC_BASENAME([$compiler])
3819
4907
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3820
4908
 
3821
4909
AC_LIBTOOL_CONFIG($1)
3845
4933
  # Now quote all the things that may contain metacharacters while being
3846
4934
  # careful not to overquote the AC_SUBSTed values.  We take copies of the
3847
4935
  # variables and quote the copies for generation of the libtool script.
3848
 
  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
 
4936
  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
3849
4937
    SED SHELL STRIP \
3850
4938
    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
3851
4939
    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
3951
5039
#
3952
5040
# You should have received a copy of the GNU General Public License
3953
5041
# along with this program; if not, write to the Free Software
3954
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
5042
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
3955
5043
#
3956
5044
# As a special exception to the GNU General Public License, if you
3957
5045
# distribute this file as part of a program that contains a
3962
5050
SED=$lt_SED
3963
5051
 
3964
5052
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
3965
 
Xsed="$SED -e s/^X//"
 
5053
Xsed="$SED -e 1s/^X//"
3966
5054
 
3967
5055
# The HP-UX ksh and POSIX shell print the target directory to stdout
3968
5056
# if CDPATH is set.
3969
 
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
 
5057
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
3970
5058
 
3971
5059
# The names of the tagged configurations supported by this script.
3972
5060
available_tags=
3997
5085
# The host system.
3998
5086
host_alias=$host_alias
3999
5087
host=$host
 
5088
host_os=$host_os
 
5089
 
 
5090
# The build system.
 
5091
build_alias=$build_alias
 
5092
build=$build
 
5093
build_os=$build_os
4000
5094
 
4001
5095
# An echo program that does not interpret backslashes.
4002
5096
echo=$lt_echo
4008
5102
# A C compiler.
4009
5103
LTCC=$lt_LTCC
4010
5104
 
 
5105
# LTCC compiler flags.
 
5106
LTCFLAGS=$lt_LTCFLAGS
 
5107
 
4011
5108
# A language-specific compiler.
4012
5109
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4013
5110
 
4073
5170
# Does compiler simultaneously support -c and -o options?
4074
5171
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4075
5172
 
4076
 
# Must we lock files when doing compilation ?
 
5173
# Must we lock files when doing compilation?
4077
5174
need_locks=$lt_need_locks
4078
5175
 
4079
5176
# Do we need the lib prefix for modules?
4347
5444
# Regexp to match symbols that can be accessed directly from C.
4348
5445
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4349
5446
 
4350
 
# Transform the above into a raw symbol and a C symbol.
4351
 
symxfrm='\1 \2\3 \3'
4352
 
 
4353
5447
# Transform an extracted symbol line into a proper C declaration
4354
5448
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4355
5449
 
4371
5465
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4372
5466
  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'"
4373
5467
  ;;
 
5468
linux*)
 
5469
  if test "$host_cpu" = ia64; then
 
5470
    symcode='[[ABCDGIRSTW]]'
 
5471
    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
 
5472
    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'"
 
5473
  fi
 
5474
  ;;
4374
5475
irix* | nonstopux*)
4375
5476
  symcode='[[BCDEGRST]]'
4376
5477
  ;;
4377
5478
osf*)
4378
5479
  symcode='[[BCDEGQRST]]'
4379
5480
  ;;
4380
 
solaris* | sysv5*)
 
5481
solaris*)
4381
5482
  symcode='[[BDRT]]'
4382
5483
  ;;
 
5484
sco3.2v5*)
 
5485
  symcode='[[DT]]'
 
5486
  ;;
 
5487
sysv4.2uw2*)
 
5488
  symcode='[[DT]]'
 
5489
  ;;
 
5490
sysv5* | sco5v6* | unixware* | OpenUNIX*)
 
5491
  symcode='[[ABDT]]'
 
5492
  ;;
4383
5493
sysv4)
4384
5494
  symcode='[[DFNSTU]]'
4385
5495
  ;;
4402
5512
# Try without a prefix undercore, then with it.
4403
5513
for ac_symprfx in "" "_"; do
4404
5514
 
 
5515
  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
 
5516
  symxfrm="\\1 $ac_symprfx\\2 \\2"
 
5517
 
4405
5518
  # Write the raw and C identifiers.
4406
 
  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[      ]]\($symcode$symcode*\)[[       ]][[    ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
 
5519
  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[      ]]\($symcode$symcode*\)[[       ]][[    ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4407
5520
 
4408
5521
  # Check to see that the pipe works correctly.
4409
5522
  pipe_works=no
4559
5672
      # DJGPP does not support shared libraries at all
4560
5673
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4561
5674
      ;;
 
5675
    interix3*)
 
5676
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
 
5677
      # Instead, we relocate shared libraries at runtime.
 
5678
      ;;
4562
5679
    sysv4*MP*)
4563
5680
      if test -d /usr/nec; then
4564
5681
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4567
5684
    hpux*)
4568
5685
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4569
5686
      # not for PA HP-UX.
4570
 
      case "$host_cpu" in
 
5687
      case $host_cpu in
4571
5688
      hppa*64*|ia64*)
4572
5689
        ;;
4573
5690
      *)
4592
5709
        ;;
4593
5710
      chorus*)
4594
5711
        case $cc_basename in
4595
 
        cxch68)
 
5712
        cxch68*)
4596
5713
          # Green Hills C++ Compiler
4597
5714
          # _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"
4598
5715
          ;;
4599
5716
        esac
4600
5717
        ;;
 
5718
       darwin*)
 
5719
         # PIC is the default on this platform
 
5720
         # Common symbols not allowed in MH_DYLIB files
 
5721
         case $cc_basename in
 
5722
           xlc*)
 
5723
           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
 
5724
           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5725
           ;;
 
5726
         esac
 
5727
       ;;
4601
5728
      dgux*)
4602
5729
        case $cc_basename in
4603
 
          ec++)
 
5730
          ec++*)
4604
5731
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4605
5732
            ;;
4606
 
          ghcx)
 
5733
          ghcx*)
4607
5734
            # Green Hills C++ Compiler
4608
5735
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4609
5736
            ;;
4611
5738
            ;;
4612
5739
        esac
4613
5740
        ;;
4614
 
      freebsd* | kfreebsd*-gnu)
 
5741
      freebsd* | kfreebsd*-gnu | dragonfly*)
4615
5742
        # FreeBSD uses GNU C++
4616
5743
        ;;
4617
5744
      hpux9* | hpux10* | hpux11*)
4618
5745
        case $cc_basename in
4619
 
          CC)
 
5746
          CC*)
4620
5747
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4621
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
 
5748
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4622
5749
            if test "$host_cpu" != ia64; then
4623
5750
              _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4624
5751
            fi
4625
5752
            ;;
4626
 
          aCC)
 
5753
          aCC*)
4627
5754
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4628
 
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4629
 
            case "$host_cpu" in
 
5755
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
 
5756
            case $host_cpu in
4630
5757
            hppa*64*|ia64*)
4631
5758
              # +Z the default
4632
5759
              ;;
4639
5766
            ;;
4640
5767
        esac
4641
5768
        ;;
 
5769
      interix*)
 
5770
        # This is c89, which is MS Visual C++ (no shared libs)
 
5771
        # Anyone wants to do a port?
 
5772
        ;;
4642
5773
      irix5* | irix6* | nonstopux*)
4643
5774
        case $cc_basename in
4644
 
          CC)
 
5775
          CC*)
4645
5776
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4646
5777
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4647
5778
            # CC pic flag -KPIC is the default.
4652
5783
        ;;
4653
5784
      linux*)
4654
5785
        case $cc_basename in
4655
 
          KCC)
 
5786
          KCC*)
4656
5787
            # KAI C++ Compiler
4657
5788
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4658
5789
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4659
5790
            ;;
4660
 
          icpc)
 
5791
          icpc* | ecpc*)
4661
5792
            # Intel C++
4662
5793
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4663
5794
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4664
5795
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4665
5796
            ;;
4666
 
          cxx)
 
5797
          pgCC*)
 
5798
            # Portland Group C++ compiler.
 
5799
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5800
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
 
5801
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5802
            ;;
 
5803
          cxx*)
4667
5804
            # Compaq C++
4668
5805
            # Make sure the PIC flag is empty.  It appears that all Alpha
4669
5806
            # Linux and Compaq Tru64 Unix objects are PIC.
4680
5817
        ;;
4681
5818
      mvs*)
4682
5819
        case $cc_basename in
4683
 
          cxx)
 
5820
          cxx*)
4684
5821
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4685
5822
            ;;
4686
5823
          *)
4691
5828
        ;;
4692
5829
      osf3* | osf4* | osf5*)
4693
5830
        case $cc_basename in
4694
 
          KCC)
 
5831
          KCC*)
4695
5832
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4696
5833
            ;;
4697
 
          RCC)
 
5834
          RCC*)
4698
5835
            # Rational C++ 2.4.1
4699
5836
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4700
5837
            ;;
4701
 
          cxx)
 
5838
          cxx*)
4702
5839
            # Digital/Compaq C++
4703
5840
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4704
5841
            # Make sure the PIC flag is empty.  It appears that all Alpha
4712
5849
        ;;
4713
5850
      psos*)
4714
5851
        ;;
4715
 
      sco*)
4716
 
        case $cc_basename in
4717
 
          CC)
4718
 
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4719
 
            ;;
4720
 
          *)
4721
 
            ;;
4722
 
        esac
4723
 
        ;;
4724
5852
      solaris*)
4725
5853
        case $cc_basename in
4726
 
          CC)
 
5854
          CC*)
4727
5855
            # Sun C++ 4.2, 5.x and Centerline C++
4728
5856
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4729
5857
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4730
5858
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4731
5859
            ;;
4732
 
          gcx)
 
5860
          gcx*)
4733
5861
            # Green Hills C++ Compiler
4734
5862
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4735
5863
            ;;
4739
5867
        ;;
4740
5868
      sunos4*)
4741
5869
        case $cc_basename in
4742
 
          CC)
 
5870
          CC*)
4743
5871
            # Sun C++ 4.x
4744
5872
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4745
5873
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4746
5874
            ;;
4747
 
          lcc)
 
5875
          lcc*)
4748
5876
            # Lucid
4749
5877
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4750
5878
            ;;
4754
5882
        ;;
4755
5883
      tandem*)
4756
5884
        case $cc_basename in
4757
 
          NCC)
 
5885
          NCC*)
4758
5886
            # NonStop-UX NCC 3.20
4759
5887
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4760
5888
            ;;
4762
5890
            ;;
4763
5891
        esac
4764
5892
        ;;
4765
 
      unixware*)
 
5893
      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
 
5894
        case $cc_basename in
 
5895
          CC*)
 
5896
            _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
5897
            _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
5898
            _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
5899
            ;;
 
5900
        esac
4766
5901
        ;;
4767
5902
      vxworks*)
4768
5903
        ;;
4809
5944
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4810
5945
      ;;
4811
5946
 
 
5947
    interix3*)
 
5948
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
 
5949
      # Instead, we relocate shared libraries at runtime.
 
5950
      ;;
 
5951
 
4812
5952
    msdosdjgpp*)
4813
5953
      # Just because we use GCC doesn't mean we suddenly get shared libraries
4814
5954
      # on systems that don't support them.
4825
5965
    hpux*)
4826
5966
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4827
5967
      # not for PA HP-UX.
4828
 
      case "$host_cpu" in
 
5968
      case $host_cpu in
4829
5969
      hppa*64*|ia64*)
4830
5970
        # +Z the default
4831
5971
        ;;
4851
5991
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4852
5992
      fi
4853
5993
      ;;
 
5994
      darwin*)
 
5995
        # PIC is the default on this platform
 
5996
        # Common symbols not allowed in MH_DYLIB files
 
5997
       case $cc_basename in
 
5998
         xlc*)
 
5999
         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
 
6000
         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6001
         ;;
 
6002
       esac
 
6003
       ;;
4854
6004
 
4855
6005
    mingw* | pw32* | os2*)
4856
6006
      # This hack is so that the source file can tell whether it is being
4862
6012
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4863
6013
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4864
6014
      # not for PA HP-UX.
4865
 
      case "$host_cpu" in
 
6015
      case $host_cpu in
4866
6016
      hppa*64*|ia64*)
4867
6017
        # +Z the default
4868
6018
        ;;
4886
6036
      ;;
4887
6037
 
4888
6038
    linux*)
4889
 
      case $CC in
 
6039
      case $cc_basename in
4890
6040
      icc* | ecc*)
4891
6041
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4892
6042
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4893
6043
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4894
6044
        ;;
 
6045
      pgcc* | pgf77* | pgf90* | pgf95*)
 
6046
        # Portland Group compilers (*not* the Pentium gcc compiler,
 
6047
        # which looks to be a dead project)
 
6048
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6049
        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
 
6050
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6051
        ;;
4895
6052
      ccc*)
4896
6053
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4897
6054
        # All Alpha code is PIC.
4906
6063
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4907
6064
      ;;
4908
6065
 
4909
 
    sco3.2v5*)
4910
 
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
4911
 
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
4912
 
      ;;
4913
 
 
4914
6066
    solaris*)
4915
 
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4916
6067
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4917
6068
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6069
      case $cc_basename in
 
6070
      f77* | f90* | f95*)
 
6071
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
 
6072
      *)
 
6073
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
 
6074
      esac
4918
6075
      ;;
4919
6076
 
4920
6077
    sunos4*)
4923
6080
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4924
6081
      ;;
4925
6082
 
4926
 
    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 
6083
    sysv4 | sysv4.2uw2* | sysv4.3*)
4927
6084
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4928
6085
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4929
6086
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4936
6093
      fi
4937
6094
      ;;
4938
6095
 
 
6096
    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
 
6097
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6098
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
 
6099
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
 
6100
      ;;
 
6101
 
 
6102
    unicos*)
 
6103
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
 
6104
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
 
6105
      ;;
 
6106
 
4939
6107
    uts4*)
4940
6108
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4941
6109
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4963
6131
    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4964
6132
     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
4965
6133
fi
4966
 
case "$host_os" in
 
6134
case $host_os in
4967
6135
  # For platforms which do not support PIC, -DPIC is meaningless:
4968
6136
  *djgpp*)
4969
6137
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4972
6140
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
4973
6141
    ;;
4974
6142
esac
 
6143
 
 
6144
#
 
6145
# Check to make sure the static flag actually works.
 
6146
#
 
6147
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
 
6148
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
 
6149
  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
 
6150
  $lt_tmp_static_flag,
 
6151
  [],
 
6152
  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
4975
6153
])
4976
6154
 
4977
6155
 
4996
6174
    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
4997
6175
  ;;
4998
6176
  cygwin* | mingw*)
4999
 
    _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'
 
6177
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5000
6178
  ;;
5001
6179
  *)
5002
6180
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5039
6217
  # rely on this symbol name, it's probably fine to never include it in
5040
6218
  # preloaded symbol tables.
5041
6219
  extract_expsyms_cmds=
5042
 
 
 
6220
  # Just being paranoid about ensuring that cc_basename is set.
 
6221
  _LT_CC_BASENAME([$compiler])
5043
6222
  case $host_os in
5044
6223
  cygwin* | mingw* | pw32*)
5045
6224
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
5049
6228
      with_gnu_ld=no
5050
6229
    fi
5051
6230
    ;;
 
6231
  interix*)
 
6232
    # we just hope/assume this is gcc and not c89 (= MSVC++)
 
6233
    with_gnu_ld=yes
 
6234
    ;;
5052
6235
  openbsd*)
5053
6236
    with_gnu_ld=no
5054
6237
    ;;
5059
6242
    # If archive_cmds runs LD, not CC, wlarc should be empty
5060
6243
    wlarc='${wl}'
5061
6244
 
 
6245
    # Set some defaults for GNU ld with shared library support. These
 
6246
    # are reset later if shared libraries are not supported. Putting them
 
6247
    # here allows them to be overridden if necessary.
 
6248
    runpath_var=LD_RUN_PATH
 
6249
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
 
6250
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 
6251
    # ancient GNU ld didn't support --whole-archive et. al.
 
6252
    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
 
6253
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 
6254
      else
 
6255
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
 
6256
    fi
 
6257
    supports_anon_versioning=no
 
6258
    case `$LD -v 2>/dev/null` in
 
6259
      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
 
6260
      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
 
6261
      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
 
6262
      *\ 2.11.*) ;; # other 2.11 versions
 
6263
      *) supports_anon_versioning=yes ;;
 
6264
    esac
 
6265
 
5062
6266
    # See if GNU ld supports shared libraries.
5063
6267
    case $host_os in
5064
6268
    aix3* | aix4* | aix5*)
5109
6313
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5110
6314
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
5111
6315
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5112
 
      _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'
 
6316
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5113
6317
 
5114
6318
      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5115
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
 
6319
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5116
6320
        # If the export-symbols file already is a .def file (1st line
5117
6321
        # is EXPORTS), use it as is; otherwise, prepend...
5118
6322
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5121
6325
          echo EXPORTS > $output_objdir/$soname.def;
5122
6326
          cat $export_symbols >> $output_objdir/$soname.def;
5123
6327
        fi~
5124
 
        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
5125
 
      else
5126
 
        ld_shlibs=no
 
6328
        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
 
6329
      else
 
6330
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
6331
      fi
 
6332
      ;;
 
6333
 
 
6334
    interix3*)
 
6335
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
6336
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6337
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
 
6338
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
6339
      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
 
6340
      # Instead, shared libraries are loaded at an image base (0x10000000 by
 
6341
      # default) and relocated if they conflict, which is a slow very memory
 
6342
      # consuming and fragmenting process.  To avoid this, we pick a random,
 
6343
      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
 
6344
      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
 
6345
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
 
6346
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
 
6347
      ;;
 
6348
 
 
6349
    linux*)
 
6350
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
6351
        tmp_addflag=
 
6352
        case $cc_basename,$host_cpu in
 
6353
        pgcc*)                          # Portland Group C compiler
 
6354
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
 
6355
          tmp_addflag=' $pic_flag'
 
6356
          ;;
 
6357
        pgf77* | pgf90* | pgf95*)       # Portland Group f77 and f90 compilers
 
6358
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
 
6359
          tmp_addflag=' $pic_flag -Mnomain' ;;
 
6360
        ecc*,ia64* | icc*,ia64*)                # Intel C compiler on ia64
 
6361
          tmp_addflag=' -i_dynamic' ;;
 
6362
        efc*,ia64* | ifort*,ia64*)      # Intel Fortran compiler on ia64
 
6363
          tmp_addflag=' -i_dynamic -nofor_main' ;;
 
6364
        ifc* | ifort*)                  # Intel Fortran compiler
 
6365
          tmp_addflag=' -nofor_main' ;;
 
6366
        esac
 
6367
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
6368
 
 
6369
        if test $supports_anon_versioning = yes; then
 
6370
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
 
6371
  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
 
6372
  $echo "local: *; };" >> $output_objdir/$libname.ver~
 
6373
          $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
 
6374
        fi
 
6375
      else
 
6376
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
5127
6377
      fi
5128
6378
      ;;
5129
6379
 
5137
6387
      fi
5138
6388
      ;;
5139
6389
 
5140
 
    solaris* | sysv5*)
 
6390
    solaris*)
5141
6391
      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5142
6392
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
5143
6393
        cat <<EOF 1>&2
5158
6408
      fi
5159
6409
      ;;
5160
6410
 
 
6411
    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
 
6412
      case `$LD -v 2>&1` in
 
6413
        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
 
6414
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
6415
        cat <<_LT_EOF 1>&2
 
6416
 
 
6417
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
 
6418
*** reliably create shared libraries on SCO systems.  Therefore, libtool
 
6419
*** is disabling shared libraries support.  We urge you to upgrade GNU
 
6420
*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
 
6421
*** your PATH or compiler configuration so that the native linker is
 
6422
*** used, and then restart.
 
6423
 
 
6424
_LT_EOF
 
6425
        ;;
 
6426
        *)
 
6427
          if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
 
6428
            _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
 
6429
            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
 
6430
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
 
6431
          else
 
6432
            _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
6433
          fi
 
6434
        ;;
 
6435
      esac
 
6436
      ;;
 
6437
 
5161
6438
    sunos4*)
5162
6439
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5163
6440
      wlarc=
5165
6442
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5166
6443
      ;;
5167
6444
 
5168
 
  linux*)
5169
 
    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5170
 
        tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5171
 
        _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds"
5172
 
      supports_anon_versioning=no
5173
 
      case `$LD -v 2>/dev/null` in
5174
 
        *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5175
 
        *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5176
 
        *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5177
 
        *\ 2.11.*) ;; # other 2.11 versions
5178
 
        *) supports_anon_versioning=yes ;;
5179
 
      esac
5180
 
      if test $supports_anon_versioning = yes; then
5181
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5182
 
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5183
 
$echo "local: *; };" >> $output_objdir/$libname.ver~
5184
 
        $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5185
 
      else
5186
 
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds"
5187
 
      fi
5188
 
    else
5189
 
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5190
 
    fi
5191
 
    ;;
5192
 
 
5193
6445
    *)
5194
6446
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5195
6447
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5200
6452
      ;;
5201
6453
    esac
5202
6454
 
5203
 
    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
5204
 
      runpath_var=LD_RUN_PATH
5205
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5206
 
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5207
 
      # ancient GNU ld didn't support --whole-archive et. al.
5208
 
      if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5209
 
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5210
 
      else
5211
 
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5212
 
      fi
 
6455
    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
 
6456
      runpath_var=
 
6457
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
 
6458
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
 
6459
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5213
6460
    fi
5214
6461
  else
5215
6462
    # PORTME fill in a description of your system's linker (not GNU ld)
5221
6468
      # Note: this linker hardcodes the directories in LIBPATH if there
5222
6469
      # are no directories specified by -L.
5223
6470
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5224
 
      if test "$GCC" = yes && test -z "$link_static_flag"; then
 
6471
      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5225
6472
        # Neither direct hardcoding nor static linking is supported with a
5226
6473
        # broken collect2.
5227
6474
        _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5255
6502
            break
5256
6503
          fi
5257
6504
          done
 
6505
          ;;
5258
6506
        esac
5259
6507
 
5260
6508
        exp_sym_flag='-bexport'
5273
6521
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5274
6522
 
5275
6523
      if test "$GCC" = yes; then
5276
 
        case $host_os in aix4.[012]|aix4.[012].*)
 
6524
        case $host_os in aix4.[[012]]|aix4.[[012]].*)
5277
6525
        # We only want to do this on AIX 4.2 and lower, the check
5278
6526
        # below for broken collect2 doesn't work under 4.3+
5279
6527
          collect2name=`${CC} -print-prog-name=collect2`
5292
6540
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5293
6541
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5294
6542
          fi
 
6543
          ;;
5295
6544
        esac
5296
6545
        shared_flag='-shared'
 
6546
        if test "$aix_use_runtimelinking" = yes; then
 
6547
          shared_flag="$shared_flag "'${wl}-G'
 
6548
        fi
5297
6549
      else
5298
6550
        # not using gcc
5299
6551
        if test "$host_cpu" = ia64; then
5301
6553
        # chokes on -Wl,-G. The following line is correct:
5302
6554
          shared_flag='-G'
5303
6555
        else
5304
 
        if test "$aix_use_runtimelinking" = yes; then
 
6556
          if test "$aix_use_runtimelinking" = yes; then
5305
6557
            shared_flag='${wl}-G'
5306
6558
          else
5307
6559
            shared_flag='${wl}-bM:SRE'
5308
 
        fi
 
6560
          fi
5309
6561
        fi
5310
6562
      fi
5311
6563
 
5319
6571
       # Determine the default libpath from the value encoded in an empty executable.
5320
6572
       _LT_AC_SYS_LIBPATH_AIX
5321
6573
       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5322
 
        _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"
 
6574
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5323
6575
       else
5324
6576
        if test "$host_cpu" = ia64; then
5325
6577
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5326
6578
          _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5327
 
          _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"
 
6579
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
5328
6580
        else
5329
6581
         # Determine the default libpath from the value encoded in an empty executable.
5330
6582
         _LT_AC_SYS_LIBPATH_AIX
5333
6585
          # -berok will link without error, but may produce a broken library.
5334
6586
          _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5335
6587
          _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5336
 
          # -bexpall does not export symbols beginning with underscore (_)
5337
 
          _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5338
6588
          # Exported symbols can be pulled into shared objects from archives
5339
 
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
 
6589
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5340
6590
          _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5341
 
          # This is similar to how AIX traditionally builds it's shared libraries.
5342
 
          _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'
 
6591
          # This is similar to how AIX traditionally builds its shared libraries.
 
6592
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5343
6593
        fi
5344
6594
      fi
5345
6595
      ;;
5352
6602
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5353
6603
      ;;
5354
6604
 
5355
 
    bsdi4*)
 
6605
    bsdi[[45]]*)
5356
6606
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5357
6607
      ;;
5358
6608
 
5373
6623
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5374
6624
      # FIXME: Should let the user specify the lib program.
5375
6625
      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
5376
 
      fix_srcfile_path='`cygpath -w "$srcfile"`'
 
6626
      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5377
6627
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5378
6628
      ;;
5379
6629
 
5380
6630
    darwin* | rhapsody*)
5381
 
    if test "$GXX" = yes ; then
 
6631
      case $host_os in
 
6632
        rhapsody* | darwin1.[[012]])
 
6633
         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
 
6634
         ;;
 
6635
       *) # Darwin 1.3 on
 
6636
         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
 
6637
           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
 
6638
         else
 
6639
           case ${MACOSX_DEPLOYMENT_TARGET} in
 
6640
             10.[[012]])
 
6641
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
 
6642
               ;;
 
6643
             10.*)
 
6644
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
 
6645
               ;;
 
6646
           esac
 
6647
         fi
 
6648
         ;;
 
6649
      esac
5382
6650
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5383
 
      case "$host_os" in
5384
 
      rhapsody* | darwin1.[[012]])
5385
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
5386
 
        ;;
5387
 
      *) # Darwin 1.3 on
5388
 
      if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
5389
 
        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
5390
 
      else
5391
 
        case ${MACOSX_DEPLOYMENT_TARGET} in
5392
 
          10.[[012]])
5393
 
            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
5394
 
            ;;
5395
 
          10.*)
5396
 
            _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
5397
 
            ;;
5398
 
        esac
5399
 
      fi
5400
 
        ;;
5401
 
      esac
5402
 
        lt_int_apple_cc_single_mod=no
 
6651
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
6652
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
 
6653
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
 
6654
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
 
6655
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
6656
    if test "$GCC" = yes ; then
5403
6657
        output_verbose_link_cmd='echo'
5404
 
        if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
5405
 
          lt_int_apple_cc_single_mod=yes
5406
 
        fi
5407
 
        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
5408
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5409
 
        else
5410
 
        _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'
5411
 
      fi
5412
 
      _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5413
 
      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
5414
 
        if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
5415
 
          _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}'
5416
 
        else
5417
 
          _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}'
5418
 
        fi
 
6658
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
 
6659
      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
6660
      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
 
6661
      _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}'
 
6662
      _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}'
 
6663
    else
 
6664
      case $cc_basename in
 
6665
        xlc*)
 
6666
         output_verbose_link_cmd='echo'
 
6667
         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
 
6668
         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
 
6669
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
 
6670
         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5419
6671
          _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}'
5420
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
5421
 
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
5422
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5423
 
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
5424
 
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5425
 
    else
5426
 
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
6672
          ;;
 
6673
       *)
 
6674
         _LT_AC_TAGVAR(ld_shlibs, $1)=no
 
6675
          ;;
 
6676
      esac
5427
6677
    fi
5428
6678
      ;;
5429
6679
 
5457
6707
      ;;
5458
6708
 
5459
6709
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5460
 
    freebsd* | kfreebsd*-gnu)
 
6710
    freebsd* | kfreebsd*-gnu | dragonfly*)
5461
6711
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5462
6712
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5463
6713
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5480
6730
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5481
6731
      ;;
5482
6732
 
5483
 
    hpux10* | hpux11*)
5484
 
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5485
 
        case "$host_cpu" in
5486
 
        hppa*64*|ia64*)
 
6733
    hpux10*)
 
6734
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
 
6735
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 
6736
      else
 
6737
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
 
6738
      fi
 
6739
      if test "$with_gnu_ld" = no; then
 
6740
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
6741
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
6742
 
 
6743
        _LT_AC_TAGVAR(hardcode_direct, $1)=yes
 
6744
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
 
6745
 
 
6746
        # hardcode_minus_L: Not really in the search PATH,
 
6747
        # but as the default location of the library.
 
6748
        _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
6749
      fi
 
6750
      ;;
 
6751
 
 
6752
    hpux11*)
 
6753
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
 
6754
        case $host_cpu in
 
6755
        hppa*64*)
5487
6756
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5488
6757
          ;;
 
6758
        ia64*)
 
6759
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 
6760
          ;;
5489
6761
        *)
5490
6762
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5491
6763
          ;;
5492
6764
        esac
5493
6765
      else
5494
 
        case "$host_cpu" in
5495
 
        hppa*64*|ia64*)
5496
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
 
6766
        case $host_cpu in
 
6767
        hppa*64*)
 
6768
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6769
          ;;
 
6770
        ia64*)
 
6771
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5497
6772
          ;;
5498
6773
        *)
5499
 
          _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
 
6774
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5500
6775
          ;;
5501
6776
        esac
5502
6777
      fi
5503
6778
      if test "$with_gnu_ld" = no; then
5504
 
        case "$host_cpu" in
5505
 
        hppa*64*)
5506
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
6779
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
 
6780
        _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
 
6781
 
 
6782
        case $host_cpu in
 
6783
        hppa*64*|ia64*)
5507
6784
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5508
 
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5509
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
5510
 
          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5511
 
          ;;
5512
 
        ia64*)
5513
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5514
 
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
5515
 
          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5516
 
 
5517
 
          # hardcode_minus_L: Not really in the search PATH,
5518
 
          # but as the default location of the library.
5519
 
          _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
 
6785
          _LT_AC_TAGVAR(hardcode_direct, $1)=no
 
6786
          _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5520
6787
          ;;
5521
6788
        *)
5522
 
          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5523
 
          _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5524
6789
          _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5525
6790
          _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5526
6791
 
5568
6833
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5569
6834
      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5570
6835
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 
6836
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5571
6837
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5572
6838
        _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5573
6839
      else
5613
6879
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5614
6880
        _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'
5615
6881
        _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~
5616
 
        $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'
 
6882
        $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
5617
6883
 
5618
6884
        # Both c and cxx compiler support -rpath directly
5619
6885
        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5621
6887
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5622
6888
      ;;
5623
6889
 
5624
 
    sco3.2v5*)
5625
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5626
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5627
 
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5628
 
      runpath_var=LD_RUN_PATH
5629
 
      hardcode_runpath_var=yes
5630
 
      ;;
5631
 
 
5632
6890
    solaris*)
5633
6891
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5634
6892
      if test "$GCC" = yes; then
 
6893
        wlarc='${wl}'
5635
6894
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5636
6895
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5637
6896
          $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
5638
6897
      else
 
6898
        wlarc=''
5639
6899
        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5640
6900
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5641
6901
        $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5644
6904
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5645
6905
      case $host_os in
5646
6906
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5647
 
      *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5648
 
        _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
 
6907
      *)
 
6908
        # The compiler driver will combine linker options so we
 
6909
        # cannot just pass the convience library names through
 
6910
        # without $wl, iff we do not link with $LD.
 
6911
        # Luckily, gcc supports the same syntax we need for Sun Studio.
 
6912
        # Supported since Solaris 2.6 (maybe 2.5.1?)
 
6913
        case $wlarc in
 
6914
        '')
 
6915
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
 
6916
        *)
 
6917
          _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
 
6918
        esac ;;
5649
6919
      esac
5650
6920
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5651
6921
      ;;
5702
6972
      fi
5703
6973
      ;;
5704
6974
 
5705
 
    sysv4.2uw2*)
5706
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5707
 
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5708
 
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5709
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5710
 
      hardcode_runpath_var=yes
5711
 
      runpath_var=LD_RUN_PATH
5712
 
      ;;
5713
 
 
5714
 
   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
5715
 
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
5716
 
      if test "$GCC" = yes; then
5717
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5718
 
      else
5719
 
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5720
 
      fi
5721
 
      runpath_var='LD_RUN_PATH'
5722
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5723
 
      ;;
5724
 
 
5725
 
    sysv5*)
5726
 
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5727
 
      # $CC -shared without GNU ld will not create a library from C++
5728
 
      # object files and a static libstdc++, better avoid it by now
5729
 
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5730
 
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5731
 
                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5732
 
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5733
 
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5734
 
      runpath_var='LD_RUN_PATH'
 
6975
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
 
6976
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
6977
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
6978
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
6979
      runpath_var='LD_RUN_PATH'
 
6980
 
 
6981
      if test "$GCC" = yes; then
 
6982
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6983
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6984
      else
 
6985
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6986
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
 
6987
      fi
 
6988
      ;;
 
6989
 
 
6990
    sysv5* | sco3.2v5* | sco5v6*)
 
6991
      # Note: We can NOT use -z defs as we might desire, because we do not
 
6992
      # link with -lc, and that would cause any symbols used from libc to
 
6993
      # always be unresolved, which means just about no library would
 
6994
      # ever link correctly.  If we're not using GNU ld we use -z text
 
6995
      # though, which does catch some bad symbols but isn't as heavy-handed
 
6996
      # as -z defs.
 
6997
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
 
6998
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
 
6999
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
 
7000
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
 
7001
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
 
7002
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
 
7003
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
7004
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
 
7005
      runpath_var='LD_RUN_PATH'
 
7006
 
 
7007
      if test "$GCC" = yes; then
 
7008
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7009
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7010
      else
 
7011
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7012
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
 
7013
      fi
5735
7014
      ;;
5736
7015
 
5737
7016
    uts4*)
5749
7028
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
5750
7029
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5751
7030
 
5752
 
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
5753
 
if test "$GCC" = yes; then
5754
 
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5755
 
fi
5756
 
 
5757
7031
#
5758
7032
# Do we need to explicitly link libc?
5759
7033
#
5781
7055
        libobjs=conftest.$ac_objext
5782
7056
        deplibs=
5783
7057
        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
 
7058
        pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
5784
7059
        compiler_flags=-v
5785
7060
        linker_flags=-v
5786
7061
        verstring=
5906
7181
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
5907
7182
# along with /bin/sed that truncates output.
5908
7183
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
5909
 
  test ! -f $lt_ac_sed && break
 
7184
  test ! -f $lt_ac_sed && continue
5910
7185
  cat /dev/null > conftest.in
5911
7186
  lt_ac_count=0
5912
7187
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
5931
7206
    fi
5932
7207
  done
5933
7208
done
 
7209
])
5934
7210
SED=$lt_cv_path_SED
5935
 
])
5936
7211
AC_MSG_RESULT([$SED])
5937
7212
])
5938
7213
 
5939
 
 
5940
 
dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
5941
 
dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
5942
 
dnl also defines GSTUFF_PKG_ERRORS on error
5943
 
AC_DEFUN([PKG_CHECK_MODULES], [
5944
 
  succeeded=no
5945
 
 
5946
 
  if test -z "$PKG_CONFIG"; then
5947
 
    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
5948
 
  fi
5949
 
 
5950
 
  if test "$PKG_CONFIG" = "no" ; then
5951
 
     echo "*** The pkg-config script could not be found. Make sure it is"
5952
 
     echo "*** in your path, or set the PKG_CONFIG environment variable"
5953
 
     echo "*** to the full path to pkg-config."
5954
 
     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
5955
 
  else
5956
 
     PKG_CONFIG_MIN_VERSION=0.9.0
5957
 
     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
5958
 
        AC_MSG_CHECKING(for $2)
5959
 
 
5960
 
        if $PKG_CONFIG --exists "$2" ; then
5961
 
            AC_MSG_RESULT(yes)
5962
 
            succeeded=yes
5963
 
 
5964
 
            AC_MSG_CHECKING($1_CFLAGS)
5965
 
            $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
5966
 
            AC_MSG_RESULT($$1_CFLAGS)
5967
 
 
5968
 
            AC_MSG_CHECKING($1_LIBS)
5969
 
            $1_LIBS=`$PKG_CONFIG --libs "$2"`
5970
 
            AC_MSG_RESULT($$1_LIBS)
5971
 
        else
5972
 
            $1_CFLAGS=""
5973
 
            $1_LIBS=""
5974
 
            ## If we have a custom action on failure, don't print errors, but 
5975
 
            ## do set a variable so people can do so.
5976
 
            $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
5977
 
            ifelse([$4], ,echo $$1_PKG_ERRORS,)
5978
 
        fi
5979
 
 
5980
 
        AC_SUBST($1_CFLAGS)
5981
 
        AC_SUBST($1_LIBS)
5982
 
     else
5983
 
        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
5984
 
        echo "*** See http://www.freedesktop.org/software/pkgconfig"
5985
 
     fi
5986
 
  fi
5987
 
 
5988
 
  if test $succeeded = yes; then
5989
 
     ifelse([$3], , :, [$3])
5990
 
  else
5991
 
     ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
5992
 
  fi
5993
 
])
5994
 
 
5995
 
 
5996
 
 
5997
 
#                                                        -*- Autoconf -*-
5998
 
# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
5999
 
# Generated from amversion.in; do not edit by hand.
6000
 
 
6001
 
# This program is free software; you can redistribute it and/or modify
6002
 
# it under the terms of the GNU General Public License as published by
6003
 
# the Free Software Foundation; either version 2, or (at your option)
6004
 
# any later version.
6005
 
 
6006
 
# This program is distributed in the hope that it will be useful,
6007
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6008
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6009
 
# GNU General Public License for more details.
6010
 
 
6011
 
# You should have received a copy of the GNU General Public License
6012
 
# along with this program; if not, write to the Free Software
6013
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6014
 
 
6015
 
# AM_AUTOMAKE_VERSION(VERSION)
6016
 
# ----------------------------
6017
 
# Automake X.Y traces this macro to ensure aclocal.m4 has been
6018
 
# generated from the m4 files accompanying Automake X.Y.
6019
 
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
6020
 
 
6021
 
# AM_SET_CURRENT_AUTOMAKE_VERSION
6022
 
# -------------------------------
6023
 
# Call AM_AUTOMAKE_VERSION so it can be traced.
6024
 
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
6025
 
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
6026
 
         [AM_AUTOMAKE_VERSION([1.9.2])])
6027
 
 
6028
 
# AM_AUX_DIR_EXPAND
6029
 
 
6030
 
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
6031
 
 
6032
 
# This program is free software; you can redistribute it and/or modify
6033
 
# it under the terms of the GNU General Public License as published by
6034
 
# the Free Software Foundation; either version 2, or (at your option)
6035
 
# any later version.
6036
 
 
6037
 
# This program is distributed in the hope that it will be useful,
6038
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6039
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6040
 
# GNU General Public License for more details.
6041
 
 
6042
 
# You should have received a copy of the GNU General Public License
6043
 
# along with this program; if not, write to the Free Software
6044
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6045
 
# 02111-1307, USA.
6046
 
 
6047
 
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
6048
 
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
6049
 
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
6050
 
#
6051
 
# Of course, Automake must honor this variable whenever it calls a
6052
 
# tool from the auxiliary directory.  The problem is that $srcdir (and
6053
 
# therefore $ac_aux_dir as well) can be either absolute or relative,
6054
 
# depending on how configure is run.  This is pretty annoying, since
6055
 
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
6056
 
# source directory, any form will work fine, but in subdirectories a
6057
 
# relative path needs to be adjusted first.
6058
 
#
6059
 
# $ac_aux_dir/missing
6060
 
#    fails when called from a subdirectory if $ac_aux_dir is relative
6061
 
# $top_srcdir/$ac_aux_dir/missing
6062
 
#    fails if $ac_aux_dir is absolute,
6063
 
#    fails when called from a subdirectory in a VPATH build with
6064
 
#          a relative $ac_aux_dir
6065
 
#
6066
 
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
6067
 
# are both prefixed by $srcdir.  In an in-source build this is usually
6068
 
# harmless because $srcdir is `.', but things will broke when you
6069
 
# start a VPATH build or use an absolute $srcdir.
6070
 
#
6071
 
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
6072
 
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
6073
 
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
6074
 
# and then we would define $MISSING as
6075
 
#   MISSING="\${SHELL} $am_aux_dir/missing"
6076
 
# This will work as long as MISSING is not called from configure, because
6077
 
# unfortunately $(top_srcdir) has no meaning in configure.
6078
 
# However there are other variables, like CC, which are often used in
6079
 
# configure, and could therefore not use this "fixed" $ac_aux_dir.
6080
 
#
6081
 
# Another solution, used here, is to always expand $ac_aux_dir to an
6082
 
# absolute PATH.  The drawback is that using absolute paths prevent a
6083
 
# configured tree to be moved without reconfiguration.
6084
 
 
6085
 
AC_DEFUN([AM_AUX_DIR_EXPAND],
6086
 
[dnl Rely on autoconf to set up CDPATH properly.
6087
 
AC_PREREQ([2.50])dnl
6088
 
# expand $ac_aux_dir to an absolute path
6089
 
am_aux_dir=`cd $ac_aux_dir && pwd`
6090
 
])
6091
 
 
6092
 
# AM_CONDITIONAL                                              -*- Autoconf -*-
6093
 
 
6094
 
# Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
6095
 
 
6096
 
# This program is free software; you can redistribute it and/or modify
6097
 
# it under the terms of the GNU General Public License as published by
6098
 
# the Free Software Foundation; either version 2, or (at your option)
6099
 
# any later version.
6100
 
 
6101
 
# This program is distributed in the hope that it will be useful,
6102
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6103
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6104
 
# GNU General Public License for more details.
6105
 
 
6106
 
# You should have received a copy of the GNU General Public License
6107
 
# along with this program; if not, write to the Free Software
6108
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6109
 
# 02111-1307, USA.
6110
 
 
6111
 
# serial 6
6112
 
 
6113
 
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
6114
 
# -------------------------------------
6115
 
# Define a conditional.
6116
 
AC_DEFUN([AM_CONDITIONAL],
6117
 
[AC_PREREQ(2.52)dnl
6118
 
 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
6119
 
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
6120
 
AC_SUBST([$1_TRUE])
6121
 
AC_SUBST([$1_FALSE])
6122
 
if $2; then
6123
 
  $1_TRUE=
6124
 
  $1_FALSE='#'
6125
 
else
6126
 
  $1_TRUE='#'
6127
 
  $1_FALSE=
 
7214
AC_DEFUN([TORRENT_CHECK_CXXFLAGS], [
 
7215
 
 
7216
  AC_MSG_CHECKING([for user-defined CXXFLAGS])
 
7217
 
 
7218
  if test -n "$CXXFLAGS"; then
 
7219
    AC_MSG_RESULT([user-defined "$CXXFLAGS"])
 
7220
  else
 
7221
    CXXFLAGS="-O2 -Wall"
 
7222
    AC_MSG_RESULT([default "$CXXFLAGS"])
 
7223
  fi
 
7224
])
 
7225
 
 
7226
 
 
7227
AC_DEFUN([TORRENT_ENABLE_DEBUG], [
 
7228
  AC_ARG_ENABLE(debug,
 
7229
    [  --enable-debug          enable debug information [[default=yes]]],
 
7230
    [
 
7231
        if test "$enableval" = "yes"; then
 
7232
            CXXFLAGS="$CXXFLAGS -g -DDEBUG"
 
7233
        else
 
7234
            CXXFLAGS="$CXXFLAGS -DNDEBUG"
 
7235
        fi
 
7236
    ],[
 
7237
        CXXFLAGS="$CXXFLAGS -g -DDEBUG"
 
7238
  ])
 
7239
])
 
7240
 
 
7241
 
 
7242
AC_DEFUN([TORRENT_ENABLE_WERROR], [
 
7243
  AC_ARG_ENABLE(werror,
 
7244
    [  --enable-werror         enable the -Werror and -Wall flag [[default=no]]],
 
7245
    [
 
7246
        if test "$enableval" = "yes"; then
 
7247
            CXXFLAGS="$CXXFLAGS -Werror -Wall"
 
7248
        fi
 
7249
  ])
 
7250
])
 
7251
 
 
7252
 
 
7253
AC_DEFUN([TORRENT_ENABLE_EXTRA_DEBUG], [
 
7254
  AC_ARG_ENABLE(extra-debug,
 
7255
    [  --enable-extra-debug    enable extra debugging checks. [[default=no]]],
 
7256
    [
 
7257
        if test "$enableval" = "yes"; then
 
7258
            AC_DEFINE(USE_EXTRA_DEBUG, 1, Enable extra debugging checks.)
 
7259
        fi
 
7260
    ])
 
7261
])
 
7262
 
 
7263
 
 
7264
AC_DEFUN([TORRENT_OTFD], [
 
7265
  AC_LANG_PUSH(C++)
 
7266
  AC_MSG_CHECKING(for proper overloaded template function disambiguation)
 
7267
 
 
7268
  AC_COMPILE_IFELSE(
 
7269
    [[template <typename T> void f(T&) {}
 
7270
      template <typename T> void f(T*) {}
 
7271
      int main() { int *i = 0; f(*i); f(i); }
 
7272
    ]],
 
7273
    [
 
7274
      AC_MSG_RESULT(yes)
 
7275
    ], [
 
7276
      AC_MSG_RESULT(no)
 
7277
      AC_MSG_ERROR([your compiler does not properly handle overloaded template function disambiguation])
 
7278
  ])
 
7279
 
 
7280
  AC_LANG_POP(C++)
 
7281
])
 
7282
 
 
7283
 
 
7284
AC_DEFUN([TORRENT_MINCORE_SIGNEDNESS], [
 
7285
  AC_LANG_PUSH(C++)
 
7286
  AC_MSG_CHECKING(signedness of mincore parameter)
 
7287
 
 
7288
  AC_COMPILE_IFELSE(
 
7289
    [[#include <sys/types.h>
 
7290
      #include <sys/mman.h>
 
7291
      #include <unistd.h>
 
7292
      void f() { mincore((char*)0, 0, (unsigned char*)0); }
 
7293
    ]],
 
7294
    [
 
7295
      AC_DEFINE(USE_MINCORE, 1, Use mincore)
 
7296
      AC_DEFINE(USE_MINCORE_UNSIGNED, 1, use unsigned char* in mincore)
 
7297
      AC_MSG_RESULT(unsigned)
 
7298
    ],
 
7299
    [
 
7300
      AC_COMPILE_IFELSE(
 
7301
        [[#include <sys/types.h>
 
7302
          #include <sys/mman.h>
 
7303
          #include <unistd.h>
 
7304
          void f() { mincore((char*)0, 0, (char*)0); }
 
7305
        ]],
 
7306
        [
 
7307
          AC_DEFINE(USE_MINCORE, 1, Use mincore)
 
7308
          AC_DEFINE(USE_MINCORE_UNSIGNED, 0, use char* in mincore)
 
7309
          AC_MSG_RESULT(signed)
 
7310
        ],
 
7311
        [
 
7312
          AC_MSG_ERROR([failed, do *not* attempt to use --disable-mincore unless you are running Win32.])
 
7313
      ])
 
7314
  ])
 
7315
 
 
7316
  AC_LANG_POP(C++)
 
7317
])
 
7318
 
 
7319
AC_DEFUN([TORRENT_MINCORE], [
 
7320
  AC_ARG_ENABLE(mincore,
 
7321
    [  --disable-mincore       disable mincore check [[default=enable]]],
 
7322
    [
 
7323
      if test "$enableval" = "yes"; then
 
7324
        TORRENT_MINCORE_SIGNEDNESS()
 
7325
      else
 
7326
        AC_MSG_CHECKING(for mincore)
 
7327
        AC_MSG_RESULT(disabled)
 
7328
      fi
 
7329
    ],[
 
7330
        TORRENT_MINCORE_SIGNEDNESS()
 
7331
    ])
 
7332
])
 
7333
 
 
7334
AC_DEFUN([TORRENT_CHECK_MADVISE], [
 
7335
  AC_MSG_CHECKING(for madvise)
 
7336
 
 
7337
  AC_COMPILE_IFELSE(
 
7338
    [[#include <sys/types.h>
 
7339
          #include <sys/mman.h>
 
7340
          void f() { static char test[1024]; madvise((void *)test, sizeof(test), MADV_NORMAL); }
 
7341
    ]],
 
7342
    [
 
7343
      AC_MSG_RESULT(yes)
 
7344
      AC_DEFINE(USE_MADVISE, 1, Use madvise)
 
7345
    ], [
 
7346
      AC_MSG_RESULT(no)
 
7347
  ])
 
7348
])
 
7349
 
 
7350
AC_DEFUN([TORRENT_CHECK_EXECINFO], [
 
7351
  AC_MSG_CHECKING(for execinfo.h)
 
7352
 
 
7353
  AC_COMPILE_IFELSE(
 
7354
    [[#include <execinfo.h>
 
7355
      int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;}
 
7356
    ]],
 
7357
    [
 
7358
      AC_MSG_RESULT(yes)
 
7359
      AC_DEFINE(USE_EXECINFO, 1, Use execinfo.h)
 
7360
    ], [
 
7361
      AC_MSG_RESULT(no)
 
7362
  ])
 
7363
])
 
7364
 
 
7365
AC_DEFUN([TORRENT_CHECK_ALIGNED], [
 
7366
  AC_MSG_CHECKING(the byte alignment)
 
7367
 
 
7368
  AC_RUN_IFELSE(
 
7369
    [[#include <inttypes.h>
 
7370
      int main() {
 
7371
        char buf[8] = { 0, 0, 0, 0, 1, 0, 0, 0 };
 
7372
        int i;
 
7373
        for (i = 1; i < 4; ++i)
 
7374
          if (*(uint32_t*)(buf + i) == 0) return -1;
 
7375
        return 0;
 
7376
        }
 
7377
    ]],
 
7378
    [
 
7379
      AC_MSG_RESULT(none needed)
 
7380
    ], [
 
7381
      AC_DEFINE(USE_ALIGNED, 1, Require byte alignment)
 
7382
      AC_MSG_RESULT(required)
 
7383
  ])
 
7384
])
 
7385
 
 
7386
 
 
7387
AC_DEFUN([TORRENT_ENABLE_ALIGNED], [
 
7388
  AC_ARG_ENABLE(aligned,
 
7389
    [  --enable-aligned        enable alignment safe code [[default=check]]],
 
7390
    [
 
7391
        if test "$enableval" = "yes"; then
 
7392
          AC_DEFINE(USE_ALIGNED, 1, Require byte alignment)
 
7393
        fi
 
7394
    ],[
 
7395
        TORRENT_CHECK_ALIGNED
 
7396
  ])
 
7397
])
 
7398
 
 
7399
 
 
7400
AC_DEFUN([TORRENT_DISABLE_IPV6], [
 
7401
  AC_ARG_ENABLE(ipv6,
 
7402
    [  --enable-ipv6           disable ipv6 [[default=no]]],
 
7403
    [
 
7404
        if test "$enableval" = "yes"; then
 
7405
            AC_DEFINE(RAK_USE_INET6, 1, enable ipv6 stuff)
 
7406
        fi
 
7407
    ])
 
7408
])
 
7409
 
 
7410
AC_DEFUN([TORRENT_CHECK_XFS], [
 
7411
  AC_MSG_CHECKING(for XFS support)
 
7412
 
 
7413
  AC_COMPILE_IFELSE(
 
7414
    [[#include <xfs/libxfs.h>
 
7415
      #include <sys/ioctl.h>
 
7416
      int main() {
 
7417
        struct xfs_flock64 l;
 
7418
        ioctl(0, XFS_IOC_RESVSP64, &l);
 
7419
        return 0;
 
7420
      }
 
7421
    ]],
 
7422
    [
 
7423
      AC_DEFINE(USE_XFS, 1, Use XFS filesystem stuff.)
 
7424
      AC_MSG_RESULT(yes)
 
7425
    ], [
 
7426
      AC_MSG_RESULT(no)
 
7427
    ])
 
7428
])
 
7429
 
 
7430
 
 
7431
AC_DEFUN([TORRENT_WITHOUT_XFS], [
 
7432
  AC_ARG_WITH(xfs,
 
7433
    [  --without-xfs           Do not check for XFS filesystem support],
 
7434
    [
 
7435
      if test "$withval" = "yes"; then
 
7436
        TORRENT_CHECK_XFS
 
7437
      fi
 
7438
    ], [
 
7439
        TORRENT_CHECK_XFS
 
7440
    ])
 
7441
])
 
7442
 
 
7443
 
 
7444
AC_DEFUN([TORRENT_WITH_XFS], [
 
7445
  AC_ARG_WITH(xfs,
 
7446
    [  --with-xfs           Check for XFS filesystem support],
 
7447
    [
 
7448
      if test "$withval" = "yes"; then
 
7449
        TORRENT_CHECK_XFS
 
7450
      fi
 
7451
    ])
 
7452
])
 
7453
 
 
7454
 
 
7455
AC_DEFUN([TORRENT_CHECK_EPOLL], [
 
7456
  AC_MSG_CHECKING(for epoll support)
 
7457
 
 
7458
  AC_COMPILE_IFELSE(
 
7459
    [[#include <sys/epoll.h>
 
7460
      int main() {
 
7461
        int fd = epoll_create(100);
 
7462
        return 0;
 
7463
      }
 
7464
    ]],
 
7465
    [
 
7466
      AC_DEFINE(USE_EPOLL, 1, Use epoll.)
 
7467
      AC_MSG_RESULT(yes)
 
7468
    ], [
 
7469
      AC_MSG_RESULT(no)
 
7470
    ])
 
7471
])
 
7472
 
 
7473
 
 
7474
AC_DEFUN([TORRENT_WITHOUT_EPOLL], [
 
7475
  AC_ARG_WITH(epoll,
 
7476
    [  --without-epoll         Do not check for epoll support.],
 
7477
    [
 
7478
      if test "$withval" = "yes"; then
 
7479
        TORRENT_CHECK_EPOLL
 
7480
      fi
 
7481
    ], [
 
7482
        TORRENT_CHECK_EPOLL
 
7483
    ])
 
7484
])
 
7485
 
 
7486
 
 
7487
AC_DEFUN([TORRENT_WITH_KQUEUE], [
 
7488
  AC_ARG_WITH(kqueue,
 
7489
    [  --with-kqueue                  enable kqueue. [[default=no]]],
 
7490
    [
 
7491
        if test "$withval" = "yes"; then
 
7492
            AC_DEFINE(USE_KQUEUE, 1, Enable kqueue.)
 
7493
        fi
 
7494
    ])
 
7495
])
 
7496
 
 
7497
 
 
7498
AC_DEFUN([TORRENT_WITHOUT_VARIABLE_FDSET], [
 
7499
  AC_ARG_WITH(variable-fdset,
 
7500
 
 
7501
    [  --without-variable-fdset       do not use non-portable variable sized fd_set's.],
 
7502
    [
 
7503
      if test "$withval" = "yes"; then
 
7504
        AC_DEFINE(USE_VARIABLE_FDSET, 1, defined when we allow the use of fd_set's of any size)
 
7505
      fi
 
7506
    ], [
 
7507
      AC_DEFINE(USE_VARIABLE_FDSET, 1, defined when we allow the use of fd_set's of any size)
 
7508
    ])
 
7509
])
 
7510
 
 
7511
 
 
7512
AC_DEFUN([TORRENT_CHECK_POSIX_FALLOCATE], [
 
7513
  AC_MSG_CHECKING(for posix_fallocate)
 
7514
 
 
7515
  AC_COMPILE_IFELSE(
 
7516
    [[#include <fcntl.h>
 
7517
      int main() {
 
7518
        posix_fallocate(0, 0, 0);
 
7519
        return 0;
 
7520
      }
 
7521
    ]],
 
7522
    [
 
7523
      AC_DEFINE(USE_POSIX_FALLOCATE, 1, posix_fallocate supported.)
 
7524
      AC_MSG_RESULT(yes)
 
7525
    ], [
 
7526
      AC_MSG_RESULT(no)
 
7527
    ])
 
7528
])
 
7529
 
 
7530
 
 
7531
AC_DEFUN([TORRENT_WITH_POSIX_FALLOCATE], [
 
7532
  AC_ARG_WITH(posix-fallocate,
 
7533
    [  --with-posix-fallocate  Check for and use posix_fallocate to allocate files.],
 
7534
    [
 
7535
      if test "$withval" = "yes"; then
 
7536
        TORRENT_CHECK_POSIX_FALLOCATE
 
7537
      fi
 
7538
    ])
 
7539
])
 
7540
 
 
7541
AC_DEFUN([TORRENT_WITHOUT_NCURSESW], [
 
7542
  AC_ARG_WITH(ncursesw,
 
7543
    [  --without-ncursesw      Don't try to use wide char ncurses.],
 
7544
    [
 
7545
      if test "$withval" = "no"; then
 
7546
        AC_SEARCH_LIBS(add_wch, ncursesw,
 
7547
          AC_DEFINE(HAVE_NCURSESW, 1, defined if ncurses wide character support is available),
 
7548
          AC_SEARCH_LIBS(wbkgdset, ncurses curses,,echo "*** The ncurses library is required!";exit 1)
 
7549
        )
 
7550
      else
 
7551
        AC_SEARCH_LIBS(wbkgdset, ncurses curses,,echo "*** The ncurses library is required!";exit 1)
 
7552
      fi
 
7553
    ],[
 
7554
      AC_SEARCH_LIBS(add_wch, ncursesw,
 
7555
        AC_DEFINE(HAVE_NCURSESW, 1, defined if ncurses wide character support is available),
 
7556
        AC_SEARCH_LIBS(wbkgdset, ncurses curses,,echo "*** The ncurses library is required!";exit 1)
 
7557
      )
 
7558
    ])
 
7559
])
 
7560
 
 
7561
AC_DEFUN([TORRENT_CHECK_STATVFS], [
 
7562
  AC_CHECK_HEADERS(sys/vfs.h sys/statvfs.h sys/statfs.h)
 
7563
 
 
7564
  AC_MSG_CHECKING(for statvfs)
 
7565
 
 
7566
  AC_TRY_LINK(
 
7567
    [
 
7568
      #if HAVE_SYS_VFS_H
 
7569
      #include <sys/vfs.h>
 
7570
      #endif
 
7571
      #if HAVE_SYS_STATVFS_H
 
7572
      #include <sys/statvfs.h>
 
7573
      #endif
 
7574
      #if HAVE_SYS_STATFS_H
 
7575
      #include <sys/statfs.h>
 
7576
      #endif
 
7577
    ],[
 
7578
      struct statvfs s; fsblkcnt_t c;
 
7579
      statvfs("", &s);
 
7580
      fstatvfs(0, &s);
 
7581
    ],
 
7582
    [
 
7583
      AC_DEFINE(FS_STAT_FD, [fstatvfs(fd, &m_stat) == 0], Function to determine filesystem stats from fd)
 
7584
      AC_DEFINE(FS_STAT_FN, [statvfs(fn, &m_stat) == 0], Function to determine filesystem stats from filename)
 
7585
      AC_DEFINE(FS_STAT_STRUCT, [struct statvfs], Type of second argument to statfs function)
 
7586
      AC_DEFINE(FS_STAT_SIZE_TYPE, [unsigned long], Type of block size member in stat struct)
 
7587
      AC_DEFINE(FS_STAT_COUNT_TYPE, [fsblkcnt_t], Type of block count member in stat struct)
 
7588
      AC_DEFINE(FS_STAT_BLOCK_SIZE, [(m_stat.f_frsize)], Determine the block size)
 
7589
      AC_MSG_RESULT(ok)
 
7590
      have_stat_vfs=yes
 
7591
    ],
 
7592
    [
 
7593
      AC_MSG_RESULT(no)
 
7594
      have_stat_vfs=no
 
7595
    ])
 
7596
])
 
7597
 
 
7598
AC_DEFUN([TORRENT_CHECK_STATFS], [
 
7599
  AC_CHECK_HEADERS(sys/statfs.h sys/param.h sys/mount.h)
 
7600
 
 
7601
  AC_MSG_CHECKING(for statfs)
 
7602
 
 
7603
  AC_TRY_LINK(
 
7604
    [
 
7605
      #if HAVE_SYS_STATFS_H
 
7606
      #include <sys/statfs.h>
 
7607
      #endif
 
7608
      #if HAVE_SYS_PARAM_H
 
7609
      #include <sys/param.h>
 
7610
      #endif
 
7611
      #if HAVE_SYS_MOUNT_H
 
7612
      #include <sys/mount.h>
 
7613
      #endif
 
7614
    ],[
 
7615
      struct statfs s;
 
7616
      statfs("", &s);
 
7617
      fstatfs(0, &s);
 
7618
    ],
 
7619
    [
 
7620
      AC_DEFINE(FS_STAT_FD, [fstatfs(fd, &m_stat) == 0], Function to determine filesystem stats from fd)
 
7621
      AC_DEFINE(FS_STAT_FN, [statfs(fn, &m_stat) == 0], Function to determine filesystem stats from filename)
 
7622
      AC_DEFINE(FS_STAT_STRUCT, [struct statfs], Type of second argument to statfs function)
 
7623
      AC_DEFINE(FS_STAT_SIZE_TYPE, [long], Type of block size member in stat struct)
 
7624
      AC_DEFINE(FS_STAT_COUNT_TYPE, [long], Type of block count member in stat struct)
 
7625
      AC_DEFINE(FS_STAT_BLOCK_SIZE, [(m_stat.f_bsize)], Determine the block size)
 
7626
      AC_MSG_RESULT(ok)
 
7627
    ],
 
7628
    [
 
7629
      AC_MSG_RESULT(no)
 
7630
    ])
 
7631
])
 
7632
 
 
7633
AC_DEFUN([TORRENT_DISABLED_STATFS], [
 
7634
      AC_DEFINE(FS_STAT_FD, [(errno = ENOSYS) == 0], Function to determine filesystem stats from fd)
 
7635
      AC_DEFINE(FS_STAT_FN, [(errno = ENOSYS) == 0], Function to determine filesystem stats from filename)
 
7636
      AC_DEFINE(FS_STAT_STRUCT, [struct {blocksize_type  f_bsize; blockcount_type f_bavail;}], Type of second argument to statfs function)
 
7637
      AC_DEFINE(FS_STAT_SIZE_TYPE, [int], Type of block size member in stat struct)
 
7638
      AC_DEFINE(FS_STAT_COUNT_TYPE, [int], Type of block count member in stat struct)
 
7639
      AC_DEFINE(FS_STAT_BLOCK_SIZE, [(4096)], Determine the block size)
 
7640
      AC_MSG_RESULT(No filesystem stats available)
 
7641
])
 
7642
 
 
7643
AC_DEFUN([TORRENT_WITHOUT_STATVFS], [
 
7644
  AC_ARG_WITH(statvfs,
 
7645
    [  --without-statvfs       Don't try to use statvfs to find free diskspace.],
 
7646
    [
 
7647
      if test "$withval" = "yes"; then
 
7648
        TORRENT_CHECK_STATVFS
 
7649
      else
 
7650
        have_stat_vfs=no
 
7651
      fi
 
7652
    ],
 
7653
    [
 
7654
      TORRENT_CHECK_STATVFS
 
7655
    ])
 
7656
])
 
7657
 
 
7658
AC_DEFUN([TORRENT_WITHOUT_STATFS], [
 
7659
  AC_ARG_WITH(statfs,
 
7660
    [  --without-statfs        Don't try to use statfs to find free diskspace.],
 
7661
    [
 
7662
      if test "$have_stat_vfs" = "no"; then
 
7663
        if test "$withval" = "yes"; then
 
7664
          TORRENT_CHECK_STATFS
 
7665
        else
 
7666
          TORRENT_DISABLED_STATFS
 
7667
        fi
 
7668
      fi
 
7669
    ],
 
7670
    [
 
7671
      if test "$have_stat_vfs" = "no"; then
 
7672
        TORRENT_CHECK_STATFS
 
7673
        if test "$have_stat_vfs" = "no"; then
 
7674
          TORRENT_DISABLED_STATFS
 
7675
        fi
 
7676
      fi
 
7677
    ])
 
7678
])
 
7679
 
 
7680
AC_DEFUN([TORRENT_WITH_ADDRESS_SPACE], [
 
7681
  AC_ARG_WITH(address-space,
 
7682
    AC_HELP_STRING([--with-address-space=MB], [Change the default address space size, default 1024 MB.]),
 
7683
    [
 
7684
      if test ! -z $withval -a "$withval" != "yes" -a "$withval" != "no"; then
 
7685
        AC_DEFINE_UNQUOTED(DEFAULT_ADDRESS_SPACE_SIZE, [$withval])
 
7686
      else
 
7687
        AC_MSG_ERROR(--with-address-space requires a parameter.)
 
7688
      fi
 
7689
    ],
 
7690
    [
 
7691
      AC_CHECK_SIZEOF(long)
 
7692
 
 
7693
      if test $ac_cv_sizeof_long = 8; then
 
7694
        AC_DEFINE(DEFAULT_ADDRESS_SPACE_SIZE, 4096, Default address space size.)
 
7695
      else
 
7696
        AC_DEFINE(DEFAULT_ADDRESS_SPACE_SIZE, 1024, Default address space size.)
 
7697
      fi
 
7698
    ])
 
7699
])
 
7700
 
 
7701
# Functions to check for attributes support in compiler
 
7702
 
 
7703
AC_DEFUN([CC_ATTRIBUTE_CONSTRUCTOR], [
 
7704
        AC_CACHE_CHECK([if compiler supports __attribute__((constructor))],
 
7705
                [cc_cv_attribute_constructor],
 
7706
                [AC_COMPILE_IFELSE([
 
7707
                        void ctor() __attribute__((constructor));
 
7708
                        void ctor() { };
 
7709
                        ],
 
7710
                        [cc_cv_attribute_constructor=yes],
 
7711
                        [cc_cv_attribute_constructor=no])
 
7712
                ])
 
7713
        
 
7714
        if test "x$cc_cv_attribute_constructor" = "xyes"; then
 
7715
                AC_DEFINE([SUPPORT_ATTRIBUTE_CONSTRUCTOR], 1, [Define this if the compiler supports the constructor attribute])
 
7716
                $1
 
7717
        else
 
7718
                true
 
7719
                $2
 
7720
        fi
 
7721
])
 
7722
 
 
7723
AC_DEFUN([CC_ATTRIBUTE_FORMAT], [
 
7724
        AC_CACHE_CHECK([if compiler supports __attribute__((format(printf, n, n)))],
 
7725
                [cc_cv_attribute_format],
 
7726
                [AC_COMPILE_IFELSE([
 
7727
                        void __attribute__((format(printf, 1, 2))) printflike(const char *fmt, ...) { }
 
7728
                        ],
 
7729
                        [cc_cv_attribute_format=yes],
 
7730
                        [cc_cv_attribute_format=no])
 
7731
                ])
 
7732
        
 
7733
        if test "x$cc_cv_attribute_format" = "xyes"; then
 
7734
                AC_DEFINE([SUPPORT_ATTRIBUTE_FORMAT], 1, [Define this if the compiler supports the format attribute])
 
7735
                $1
 
7736
        else
 
7737
                true
 
7738
                $2
 
7739
        fi
 
7740
])
 
7741
 
 
7742
AC_DEFUN([CC_ATTRIBUTE_INTERNAL], [
 
7743
        AC_CACHE_CHECK([if compiler supports __attribute__((visibility("internal")))],
 
7744
                [cc_cv_attribute_internal],
 
7745
                [AC_COMPILE_IFELSE([
 
7746
                        void __attribute__((visibility("internal"))) internal_function() { }
 
7747
                        ],
 
7748
                        [cc_cv_attribute_internal=yes],
 
7749
                        [cc_cv_attribute_internal=no])
 
7750
                ])
 
7751
        
 
7752
        if test "x$cc_cv_attribute_internal" = "xyes"; then
 
7753
                AC_DEFINE([SUPPORT_ATTRIBUTE_INTERNAL], 1, [Define this if the compiler supports the internal visibility attribute])
 
7754
                $1
 
7755
        else
 
7756
                true
 
7757
                $2
 
7758
        fi
 
7759
])
 
7760
 
 
7761
AC_DEFUN([CC_ATTRIBUTE_VISIBILITY], [
 
7762
        AC_LANG_PUSH(C++)
 
7763
 
 
7764
        tmp_CXXFLAGS=$CXXFLAGS
 
7765
        CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
 
7766
 
 
7767
        AC_CACHE_CHECK([if compiler supports __attribute__((visibility("default")))],
 
7768
                [cc_cv_attribute_visibility],
 
7769
                [AC_COMPILE_IFELSE([
 
7770
                        void __attribute__((visibility("default"))) visibility_function() { }
 
7771
                        ],
 
7772
                        [cc_cv_attribute_visibility=yes],
 
7773
                        [cc_cv_attribute_visibility=no])
 
7774
                ])
 
7775
        
 
7776
        CXXFLAGS=$tmp_CXXFLAGS
 
7777
        AC_LANG_POP(C++)
 
7778
 
 
7779
        if test "x$cc_cv_attribute_visibility" = "xyes"; then
 
7780
                AC_DEFINE([SUPPORT_ATTRIBUTE_VISIBILITY], 1, [Define this if the compiler supports the visibility attributes.])
 
7781
                CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
 
7782
                $1
 
7783
        else
 
7784
                true
 
7785
                $2
 
7786
        fi
 
7787
 
 
7788
])
 
7789
 
 
7790
AC_DEFUN([CC_ATTRIBUTE_NONNULL], [
 
7791
        AC_CACHE_CHECK([if compiler supports __attribute__((nonnull()))],
 
7792
                [cc_cv_attribute_nonnull],
 
7793
                [AC_COMPILE_IFELSE([
 
7794
                        void some_function(void *foo, void *bar) __attribute__((nonnull()));
 
7795
                        void some_function(void *foo, void *bar) { }
 
7796
                        ],
 
7797
                        [cc_cv_attribute_nonnull=yes],
 
7798
                        [cc_cv_attribute_nonnull=no])
 
7799
                ])
 
7800
        
 
7801
        if test "x$cc_cv_attribute_nonnull" = "xyes"; then
 
7802
                AC_DEFINE([SUPPORT_ATTRIBUTE_NONNULL], 1, [Define this if the compiler supports the nonnull attribute])
 
7803
                $1
 
7804
        else
 
7805
                true
 
7806
                $2
 
7807
        fi
 
7808
])
 
7809
 
 
7810
AC_DEFUN([CC_ATTRIBUTE_UNUSED], [
 
7811
        AC_CACHE_CHECK([if compiler supports __attribute__((unused))],
 
7812
                [cc_cv_attribute_unused],
 
7813
                [AC_COMPILE_IFELSE([
 
7814
                        void some_function(void *foo, __attribute__((unused)) void *bar);
 
7815
                        ],
 
7816
                        [cc_cv_attribute_unused=yes],
 
7817
                        [cc_cv_attribute_unused=no])
 
7818
                ])
 
7819
        
 
7820
        if test "x$cc_cv_attribute_unused" = "xyes"; then
 
7821
                AC_DEFINE([SUPPORT_ATTRIBUTE_UNUSED], 1, [Define this if the compiler supports the unused attribute])
 
7822
                $1
 
7823
        else
 
7824
                true
 
7825
                $2
 
7826
        fi
 
7827
])
 
7828
 
 
7829
AC_DEFUN([CC_FUNC_EXPECT], [
 
7830
        AC_CACHE_CHECK([if compiler has __builtin_expect function],
 
7831
                [cc_cv_func_expect],
 
7832
                [AC_COMPILE_IFELSE([
 
7833
                        int some_function()
 
7834
                        {
 
7835
                                int a = 3;
 
7836
                                return (int)__builtin_expect(a, 3);
 
7837
                        }
 
7838
                        ],
 
7839
                        [cc_cv_func_expect=yes],
 
7840
                        [cc_cv_func_expect=no])
 
7841
                ])
 
7842
        
 
7843
        if test "x$cc_cv_func_expect" = "xyes"; then
 
7844
                AC_DEFINE([SUPPORT__BUILTIN_EXPECT], 1, [Define this if the compiler supports __builtin_expect() function])
 
7845
                $1
 
7846
        else
 
7847
                true
 
7848
                $2
 
7849
        fi
 
7850
])
 
7851
 
 
7852
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
 
7853
 
7854
# Copyright Ā© 2004 Scott James Remnant <scott@netsplit.com>.
 
7855
#
 
7856
# This program is free software; you can redistribute it and/or modify
 
7857
# it under the terms of the GNU General Public License as published by
 
7858
# the Free Software Foundation; either version 2 of the License, or
 
7859
# (at your option) any later version.
 
7860
#
 
7861
# This program is distributed in the hope that it will be useful, but
 
7862
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
7863
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
7864
# General Public License for more details.
 
7865
#
 
7866
# You should have received a copy of the GNU General Public License
 
7867
# along with this program; if not, write to the Free Software
 
7868
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
7869
#
 
7870
# As a special exception to the GNU General Public License, if you
 
7871
# distribute this file as part of a program that contains a
 
7872
# configuration script generated by Autoconf, you may include it under
 
7873
# the same distribution terms that you use for the rest of that program.
 
7874
 
 
7875
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
 
7876
# ----------------------------------
 
7877
AC_DEFUN([PKG_PROG_PKG_CONFIG],
 
7878
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
 
7879
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
 
7880
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
 
7881
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
 
7882
        AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
6128
7883
fi
6129
 
AC_CONFIG_COMMANDS_PRE(
6130
 
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
6131
 
  AC_MSG_ERROR([[conditional "$1" was never defined.
6132
 
Usually this means the macro was only invoked conditionally.]])
6133
 
fi])])
6134
 
 
6135
 
# serial 7                                              -*- Autoconf -*-
6136
 
 
6137
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
6138
 
# Free Software Foundation, Inc.
6139
 
 
6140
 
# This program is free software; you can redistribute it and/or modify
6141
 
# it under the terms of the GNU General Public License as published by
6142
 
# the Free Software Foundation; either version 2, or (at your option)
6143
 
# any later version.
6144
 
 
6145
 
# This program is distributed in the hope that it will be useful,
6146
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6147
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6148
 
# GNU General Public License for more details.
6149
 
 
6150
 
# You should have received a copy of the GNU General Public License
6151
 
# along with this program; if not, write to the Free Software
6152
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6153
 
# 02111-1307, USA.
6154
 
 
6155
 
 
6156
 
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
6157
 
# written in clear, in which case automake, when reading aclocal.m4,
6158
 
# will think it sees a *use*, and therefore will trigger all it's
6159
 
# C support machinery.  Also note that it means that autoscan, seeing
6160
 
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
6161
 
 
6162
 
 
6163
 
 
6164
 
# _AM_DEPENDENCIES(NAME)
6165
 
# ----------------------
6166
 
# See how the compiler implements dependency checking.
6167
 
# NAME is "CC", "CXX", "GCJ", or "OBJC".
6168
 
# We try a few techniques and use that to set a single cache variable.
6169
 
#
6170
 
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
6171
 
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
6172
 
# dependency, and given that the user is not expected to run this macro,
6173
 
# just rely on AC_PROG_CC.
6174
 
AC_DEFUN([_AM_DEPENDENCIES],
6175
 
[AC_REQUIRE([AM_SET_DEPDIR])dnl
6176
 
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
6177
 
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
6178
 
AC_REQUIRE([AM_DEP_TRACK])dnl
6179
 
 
6180
 
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
6181
 
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
6182
 
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
6183
 
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
6184
 
                   [depcc="$$1"   am_compiler_list=])
6185
 
 
6186
 
AC_CACHE_CHECK([dependency style of $depcc],
6187
 
               [am_cv_$1_dependencies_compiler_type],
6188
 
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6189
 
  # We make a subdir and do the tests there.  Otherwise we can end up
6190
 
  # making bogus files that we don't know about and never remove.  For
6191
 
  # instance it was reported that on HP-UX the gcc test will end up
6192
 
  # making a dummy file named `D' -- because `-MD' means `put the output
6193
 
  # in D'.
6194
 
  mkdir conftest.dir
6195
 
  # Copy depcomp to subdir because otherwise we won't find it if we're
6196
 
  # using a relative directory.
6197
 
  cp "$am_depcomp" conftest.dir
6198
 
  cd conftest.dir
6199
 
  # We will build objects and dependencies in a subdirectory because
6200
 
  # it helps to detect inapplicable dependency modes.  For instance
6201
 
  # both Tru64's cc and ICC support -MD to output dependencies as a
6202
 
  # side effect of compilation, but ICC will put the dependencies in
6203
 
  # the current directory while Tru64 will put them in the object
6204
 
  # directory.
6205
 
  mkdir sub
6206
 
 
6207
 
  am_cv_$1_dependencies_compiler_type=none
6208
 
  if test "$am_compiler_list" = ""; then
6209
 
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
6210
 
  fi
6211
 
  for depmode in $am_compiler_list; do
6212
 
    # Setup a source with many dependencies, because some compilers
6213
 
    # like to wrap large dependency lists on column 80 (with \), and
6214
 
    # we should not choose a depcomp mode which is confused by this.
6215
 
    #
6216
 
    # We need to recreate these files for each test, as the compiler may
6217
 
    # overwrite some of them when testing with obscure command lines.
6218
 
    # This happens at least with the AIX C compiler.
6219
 
    : > sub/conftest.c
6220
 
    for i in 1 2 3 4 5 6; do
6221
 
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
6222
 
      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6223
 
      # Solaris 8's {/usr,}/bin/sh.
6224
 
      touch sub/conftst$i.h
6225
 
    done
6226
 
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6227
 
 
6228
 
    case $depmode in
6229
 
    nosideeffect)
6230
 
      # after this tag, mechanisms are not by side-effect, so they'll
6231
 
      # only be used when explicitly requested
6232
 
      if test "x$enable_dependency_tracking" = xyes; then
6233
 
        continue
6234
 
      else
6235
 
        break
6236
 
      fi
6237
 
      ;;
6238
 
    none) break ;;
6239
 
    esac
6240
 
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
6241
 
    # mode.  It turns out that the SunPro C++ compiler does not properly
6242
 
    # handle `-M -o', and we need to detect this.
6243
 
    if depmode=$depmode \
6244
 
       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6245
 
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6246
 
       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
6247
 
         >/dev/null 2>conftest.err &&
6248
 
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6249
 
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
6250
 
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6251
 
      # icc doesn't choke on unknown options, it will just issue warnings
6252
 
      # or remarks (even with -Werror).  So we grep stderr for any message
6253
 
      # that says an option was ignored or not supported.
6254
 
      # When given -MP, icc 7.0 and 7.1 complain thusly:
6255
 
      #   icc: Command line warning: ignoring option '-M'; no argument required
6256
 
      # The diagnosis changed in icc 8.0:
6257
 
      #   icc: Command line remark: option '-MP' not supported
6258
 
      if (grep 'ignoring option' conftest.err ||
6259
 
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6260
 
        am_cv_$1_dependencies_compiler_type=$depmode
6261
 
        break
6262
 
      fi
 
7884
if test -n "$PKG_CONFIG"; then
 
7885
        _pkg_min_version=m4_default([$1], [0.9.0])
 
7886
        AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
 
7887
        if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
 
7888
                AC_MSG_RESULT([yes])
 
7889
        else
 
7890
                AC_MSG_RESULT([no])
 
7891
                PKG_CONFIG=""
 
7892
        fi
 
7893
                
 
7894
fi[]dnl
 
7895
])# PKG_PROG_PKG_CONFIG
 
7896
 
 
7897
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 
7898
#
 
7899
# Check to see whether a particular set of modules exists.  Similar
 
7900
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
 
7901
#
 
7902
#
 
7903
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
 
7904
# this or PKG_CHECK_MODULES is called, or make sure to call
 
7905
# PKG_CHECK_EXISTS manually
 
7906
# --------------------------------------------------------------
 
7907
AC_DEFUN([PKG_CHECK_EXISTS],
 
7908
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
7909
if test -n "$PKG_CONFIG" && \
 
7910
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
 
7911
  m4_ifval([$2], [$2], [:])
 
7912
m4_ifvaln([$3], [else
 
7913
  $3])dnl
 
7914
fi])
 
7915
 
 
7916
 
 
7917
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
 
7918
# ---------------------------------------------
 
7919
m4_define([_PKG_CONFIG],
 
7920
[if test -n "$PKG_CONFIG"; then
 
7921
    if test -n "$$1"; then
 
7922
        pkg_cv_[]$1="$$1"
 
7923
    else
 
7924
        PKG_CHECK_EXISTS([$3],
 
7925
                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
 
7926
                         [pkg_failed=yes])
6263
7927
    fi
6264
 
  done
6265
 
 
6266
 
  cd ..
6267
 
  rm -rf conftest.dir
6268
7928
else
6269
 
  am_cv_$1_dependencies_compiler_type=none
6270
 
fi
6271
 
])
6272
 
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
6273
 
AM_CONDITIONAL([am__fastdep$1], [
6274
 
  test "x$enable_dependency_tracking" != xno \
6275
 
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
6276
 
])
6277
 
 
6278
 
 
6279
 
# AM_SET_DEPDIR
6280
 
# -------------
6281
 
# Choose a directory name for dependency files.
6282
 
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
6283
 
AC_DEFUN([AM_SET_DEPDIR],
6284
 
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
6285
 
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
6286
 
])
6287
 
 
6288
 
 
6289
 
# AM_DEP_TRACK
6290
 
# ------------
6291
 
AC_DEFUN([AM_DEP_TRACK],
6292
 
[AC_ARG_ENABLE(dependency-tracking,
6293
 
[  --disable-dependency-tracking  speeds up one-time build
6294
 
  --enable-dependency-tracking   do not reject slow dependency extractors])
6295
 
if test "x$enable_dependency_tracking" != xno; then
6296
 
  am_depcomp="$ac_aux_dir/depcomp"
6297
 
  AMDEPBACKSLASH='\'
6298
 
fi
6299
 
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
6300
 
AC_SUBST([AMDEPBACKSLASH])
6301
 
])
6302
 
 
6303
 
# Generate code to set up dependency tracking.   -*- Autoconf -*-
6304
 
 
6305
 
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
6306
 
#   Free Software Foundation, Inc.
6307
 
 
6308
 
# This program is free software; you can redistribute it and/or modify
6309
 
# it under the terms of the GNU General Public License as published by
6310
 
# the Free Software Foundation; either version 2, or (at your option)
6311
 
# any later version.
6312
 
 
6313
 
# This program is distributed in the hope that it will be useful,
6314
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6315
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6316
 
# GNU General Public License for more details.
6317
 
 
6318
 
# You should have received a copy of the GNU General Public License
6319
 
# along with this program; if not, write to the Free Software
6320
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6321
 
# 02111-1307, USA.
6322
 
 
6323
 
#serial 2
6324
 
 
6325
 
# _AM_OUTPUT_DEPENDENCY_COMMANDS
6326
 
# ------------------------------
6327
 
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
6328
 
[for mf in $CONFIG_FILES; do
6329
 
  # Strip MF so we end up with the name of the file.
6330
 
  mf=`echo "$mf" | sed -e 's/:.*$//'`
6331
 
  # Check whether this is an Automake generated Makefile or not.
6332
 
  # We used to match only the files named `Makefile.in', but
6333
 
  # some people rename them; so instead we look at the file content.
6334
 
  # Grep'ing the first line is not enough: some people post-process
6335
 
  # each Makefile.in and add a new line on top of each file to say so.
6336
 
  # So let's grep whole file.
6337
 
  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
6338
 
    dirpart=`AS_DIRNAME("$mf")`
6339
 
  else
6340
 
    continue
6341
 
  fi
6342
 
  # Extract the definition of DEPDIR, am__include, and am__quote
6343
 
  # from the Makefile without running `make'.
6344
 
  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
6345
 
  test -z "$DEPDIR" && continue
6346
 
  am__include=`sed -n 's/^am__include = //p' < "$mf"`
6347
 
  test -z "am__include" && continue
6348
 
  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
6349
 
  # When using ansi2knr, U may be empty or an underscore; expand it
6350
 
  U=`sed -n 's/^U = //p' < "$mf"`
6351
 
  # Find all dependency output files, they are included files with
6352
 
  # $(DEPDIR) in their names.  We invoke sed twice because it is the
6353
 
  # simplest approach to changing $(DEPDIR) to its actual value in the
6354
 
  # expansion.
6355
 
  for file in `sed -n "
6356
 
    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
6357
 
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
6358
 
    # Make sure the directory exists.
6359
 
    test -f "$dirpart/$file" && continue
6360
 
    fdir=`AS_DIRNAME(["$file"])`
6361
 
    AS_MKDIR_P([$dirpart/$fdir])
6362
 
    # echo "creating $dirpart/$file"
6363
 
    echo '# dummy' > "$dirpart/$file"
6364
 
  done
6365
 
done
6366
 
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
6367
 
 
6368
 
 
6369
 
# AM_OUTPUT_DEPENDENCY_COMMANDS
 
7929
        pkg_failed=untried
 
7930
fi[]dnl
 
7931
])# _PKG_CONFIG
 
7932
 
 
7933
# _PKG_SHORT_ERRORS_SUPPORTED
6370
7934
# -----------------------------
6371
 
# This macro should only be invoked once -- use via AC_REQUIRE.
6372
 
#
6373
 
# This code is only required when automatic dependency tracking
6374
 
# is enabled.  FIXME.  This creates each `.P' file that we will
6375
 
# need in order to bootstrap the dependency handling code.
6376
 
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
6377
 
[AC_CONFIG_COMMANDS([depfiles],
6378
 
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
6379
 
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
6380
 
])
6381
 
 
6382
 
# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
6383
 
 
6384
 
# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
6385
 
 
6386
 
# This program is free software; you can redistribute it and/or modify
6387
 
# it under the terms of the GNU General Public License as published by
6388
 
# the Free Software Foundation; either version 2, or (at your option)
6389
 
# any later version.
6390
 
 
6391
 
# This program is distributed in the hope that it will be useful,
6392
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6393
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6394
 
# GNU General Public License for more details.
6395
 
 
6396
 
# You should have received a copy of the GNU General Public License
6397
 
# along with this program; if not, write to the Free Software
6398
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6399
 
# 02111-1307, USA.
6400
 
 
6401
 
# serial 7
6402
 
 
6403
 
# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
6404
 
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
6405
 
 
6406
 
# Do all the work for Automake.                            -*- Autoconf -*-
6407
 
 
6408
 
# This macro actually does too much some checks are only needed if
6409
 
# your package does certain things.  But this isn't really a big deal.
6410
 
 
6411
 
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
6412
 
# Free Software Foundation, Inc.
6413
 
 
6414
 
# This program is free software; you can redistribute it and/or modify
6415
 
# it under the terms of the GNU General Public License as published by
6416
 
# the Free Software Foundation; either version 2, or (at your option)
6417
 
# any later version.
6418
 
 
6419
 
# This program is distributed in the hope that it will be useful,
6420
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6421
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6422
 
# GNU General Public License for more details.
6423
 
 
6424
 
# You should have received a copy of the GNU General Public License
6425
 
# along with this program; if not, write to the Free Software
6426
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6427
 
# 02111-1307, USA.
6428
 
 
6429
 
# serial 11
6430
 
 
6431
 
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
6432
 
# AM_INIT_AUTOMAKE([OPTIONS])
6433
 
# -----------------------------------------------
6434
 
# The call with PACKAGE and VERSION arguments is the old style
6435
 
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
6436
 
# and VERSION should now be passed to AC_INIT and removed from
6437
 
# the call to AM_INIT_AUTOMAKE.
6438
 
# We support both call styles for the transition.  After
6439
 
# the next Automake release, Autoconf can make the AC_INIT
6440
 
# arguments mandatory, and then we can depend on a new Autoconf
6441
 
# release and drop the old call support.
6442
 
AC_DEFUN([AM_INIT_AUTOMAKE],
6443
 
[AC_PREREQ([2.58])dnl
6444
 
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
6445
 
dnl the ones we care about.
6446
 
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
6447
 
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
6448
 
AC_REQUIRE([AC_PROG_INSTALL])dnl
6449
 
# test to see if srcdir already configured
6450
 
if test "`cd $srcdir && pwd`" != "`pwd`" &&
6451
 
   test -f $srcdir/config.status; then
6452
 
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
6453
 
fi
6454
 
 
6455
 
# test whether we have cygpath
6456
 
if test -z "$CYGPATH_W"; then
6457
 
  if (cygpath --version) >/dev/null 2>/dev/null; then
6458
 
    CYGPATH_W='cygpath -w'
6459
 
  else
6460
 
    CYGPATH_W=echo
6461
 
  fi
6462
 
fi
6463
 
AC_SUBST([CYGPATH_W])
6464
 
 
6465
 
# Define the identity of the package.
6466
 
dnl Distinguish between old-style and new-style calls.
6467
 
m4_ifval([$2],
6468
 
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
6469
 
 AC_SUBST([PACKAGE], [$1])dnl
6470
 
 AC_SUBST([VERSION], [$2])],
6471
 
[_AM_SET_OPTIONS([$1])dnl
6472
 
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
6473
 
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
6474
 
 
6475
 
_AM_IF_OPTION([no-define],,
6476
 
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
6477
 
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
6478
 
 
6479
 
# Some tools Automake needs.
6480
 
AC_REQUIRE([AM_SANITY_CHECK])dnl
6481
 
AC_REQUIRE([AC_ARG_PROGRAM])dnl
6482
 
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
6483
 
AM_MISSING_PROG(AUTOCONF, autoconf)
6484
 
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
6485
 
AM_MISSING_PROG(AUTOHEADER, autoheader)
6486
 
AM_MISSING_PROG(MAKEINFO, makeinfo)
6487
 
AM_PROG_INSTALL_SH
6488
 
AM_PROG_INSTALL_STRIP
6489
 
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
6490
 
# We need awk for the "check" target.  The system "awk" is bad on
6491
 
# some platforms.
6492
 
AC_REQUIRE([AC_PROG_AWK])dnl
6493
 
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
6494
 
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
6495
 
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
6496
 
              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
6497
 
                             [_AM_PROG_TAR([v7])])])
6498
 
_AM_IF_OPTION([no-dependencies],,
6499
 
[AC_PROVIDE_IFELSE([AC_PROG_CC],
6500
 
                  [_AM_DEPENDENCIES(CC)],
6501
 
                  [define([AC_PROG_CC],
6502
 
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
6503
 
AC_PROVIDE_IFELSE([AC_PROG_CXX],
6504
 
                  [_AM_DEPENDENCIES(CXX)],
6505
 
                  [define([AC_PROG_CXX],
6506
 
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
6507
 
])
6508
 
])
6509
 
 
6510
 
 
6511
 
# When config.status generates a header, we must update the stamp-h file.
6512
 
# This file resides in the same directory as the config header
6513
 
# that is generated.  The stamp files are numbered to have different names.
6514
 
 
6515
 
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
6516
 
# loop where config.status creates the headers, so we can generate
6517
 
# our stamp files there.
6518
 
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
6519
 
[# Compute $1's index in $config_headers.
6520
 
_am_stamp_count=1
6521
 
for _am_header in $config_headers :; do
6522
 
  case $_am_header in
6523
 
    $1 | $1:* )
6524
 
      break ;;
6525
 
    * )
6526
 
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
6527
 
  esac
6528
 
done
6529
 
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
6530
 
 
6531
 
# AM_PROG_INSTALL_SH
6532
 
# ------------------
6533
 
# Define $install_sh.
6534
 
 
6535
 
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
6536
 
 
6537
 
# This program is free software; you can redistribute it and/or modify
6538
 
# it under the terms of the GNU General Public License as published by
6539
 
# the Free Software Foundation; either version 2, or (at your option)
6540
 
# any later version.
6541
 
 
6542
 
# This program is distributed in the hope that it will be useful,
6543
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6544
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6545
 
# GNU General Public License for more details.
6546
 
 
6547
 
# You should have received a copy of the GNU General Public License
6548
 
# along with this program; if not, write to the Free Software
6549
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6550
 
# 02111-1307, USA.
6551
 
 
6552
 
AC_DEFUN([AM_PROG_INSTALL_SH],
6553
 
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
6554
 
install_sh=${install_sh-"$am_aux_dir/install-sh"}
6555
 
AC_SUBST(install_sh)])
6556
 
 
6557
 
#                                                          -*- Autoconf -*-
6558
 
# Copyright (C) 2003  Free Software Foundation, Inc.
6559
 
 
6560
 
# This program is free software; you can redistribute it and/or modify
6561
 
# it under the terms of the GNU General Public License as published by
6562
 
# the Free Software Foundation; either version 2, or (at your option)
6563
 
# any later version.
6564
 
 
6565
 
# This program is distributed in the hope that it will be useful,
6566
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6567
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6568
 
# GNU General Public License for more details.
6569
 
 
6570
 
# You should have received a copy of the GNU General Public License
6571
 
# along with this program; if not, write to the Free Software
6572
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6573
 
# 02111-1307, USA.
6574
 
 
6575
 
# serial 1
6576
 
 
6577
 
# Check whether the underlying file-system supports filenames
6578
 
# with a leading dot.  For instance MS-DOS doesn't.
6579
 
AC_DEFUN([AM_SET_LEADING_DOT],
6580
 
[rm -rf .tst 2>/dev/null
6581
 
mkdir .tst 2>/dev/null
6582
 
if test -d .tst; then
6583
 
  am__leading_dot=.
6584
 
else
6585
 
  am__leading_dot=_
6586
 
fi
6587
 
rmdir .tst 2>/dev/null
6588
 
AC_SUBST([am__leading_dot])])
6589
 
 
6590
 
# Check to see how 'make' treats includes.      -*- Autoconf -*-
6591
 
 
6592
 
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
6593
 
 
6594
 
# This program is free software; you can redistribute it and/or modify
6595
 
# it under the terms of the GNU General Public License as published by
6596
 
# the Free Software Foundation; either version 2, or (at your option)
6597
 
# any later version.
6598
 
 
6599
 
# This program is distributed in the hope that it will be useful,
6600
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6601
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6602
 
# GNU General Public License for more details.
6603
 
 
6604
 
# You should have received a copy of the GNU General Public License
6605
 
# along with this program; if not, write to the Free Software
6606
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6607
 
# 02111-1307, USA.
6608
 
 
6609
 
# serial 2
6610
 
 
6611
 
# AM_MAKE_INCLUDE()
6612
 
# -----------------
6613
 
# Check to see how make treats includes.
6614
 
AC_DEFUN([AM_MAKE_INCLUDE],
6615
 
[am_make=${MAKE-make}
6616
 
cat > confinc << 'END'
6617
 
am__doit:
6618
 
        @echo done
6619
 
.PHONY: am__doit
6620
 
END
6621
 
# If we don't find an include directive, just comment out the code.
6622
 
AC_MSG_CHECKING([for style of include used by $am_make])
6623
 
am__include="#"
6624
 
am__quote=
6625
 
_am_result=none
6626
 
# First try GNU make style include.
6627
 
echo "include confinc" > confmf
6628
 
# We grep out `Entering directory' and `Leaving directory'
6629
 
# messages which can occur if `w' ends up in MAKEFLAGS.
6630
 
# In particular we don't look at `^make:' because GNU make might
6631
 
# be invoked under some other name (usually "gmake"), in which
6632
 
# case it prints its new name instead of `make'.
6633
 
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
6634
 
   am__include=include
6635
 
   am__quote=
6636
 
   _am_result=GNU
6637
 
fi
6638
 
# Now try BSD make style include.
6639
 
if test "$am__include" = "#"; then
6640
 
   echo '.include "confinc"' > confmf
6641
 
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
6642
 
      am__include=.include
6643
 
      am__quote="\""
6644
 
      _am_result=BSD
6645
 
   fi
6646
 
fi
6647
 
AC_SUBST([am__include])
6648
 
AC_SUBST([am__quote])
6649
 
AC_MSG_RESULT([$_am_result])
6650
 
rm -f confinc confmf
6651
 
])
6652
 
 
6653
 
#  -*- Autoconf -*-
6654
 
 
6655
 
 
6656
 
# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
6657
 
 
6658
 
# This program is free software; you can redistribute it and/or modify
6659
 
# it under the terms of the GNU General Public License as published by
6660
 
# the Free Software Foundation; either version 2, or (at your option)
6661
 
# any later version.
6662
 
 
6663
 
# This program is distributed in the hope that it will be useful,
6664
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6665
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6666
 
# GNU General Public License for more details.
6667
 
 
6668
 
# You should have received a copy of the GNU General Public License
6669
 
# along with this program; if not, write to the Free Software
6670
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6671
 
# 02111-1307, USA.
6672
 
 
6673
 
# serial 3
6674
 
 
6675
 
# AM_MISSING_PROG(NAME, PROGRAM)
6676
 
# ------------------------------
6677
 
AC_DEFUN([AM_MISSING_PROG],
6678
 
[AC_REQUIRE([AM_MISSING_HAS_RUN])
6679
 
$1=${$1-"${am_missing_run}$2"}
6680
 
AC_SUBST($1)])
6681
 
 
6682
 
 
6683
 
# AM_MISSING_HAS_RUN
6684
 
# ------------------
6685
 
# Define MISSING if not defined so far and test if it supports --run.
6686
 
# If it does, set am_missing_run to use it, otherwise, to nothing.
6687
 
AC_DEFUN([AM_MISSING_HAS_RUN],
6688
 
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
6689
 
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
6690
 
# Use eval to expand $SHELL
6691
 
if eval "$MISSING --run true"; then
6692
 
  am_missing_run="$MISSING --run "
6693
 
else
6694
 
  am_missing_run=
6695
 
  AC_MSG_WARN([`missing' script is too old or missing])
6696
 
fi
6697
 
])
6698
 
 
6699
 
# AM_PROG_MKDIR_P
6700
 
# ---------------
6701
 
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
6702
 
 
6703
 
# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
6704
 
 
6705
 
# This program is free software; you can redistribute it and/or modify
6706
 
# it under the terms of the GNU General Public License as published by
6707
 
# the Free Software Foundation; either version 2, or (at your option)
6708
 
# any later version.
6709
 
 
6710
 
# This program is distributed in the hope that it will be useful,
6711
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6712
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6713
 
# GNU General Public License for more details.
6714
 
 
6715
 
# You should have received a copy of the GNU General Public License
6716
 
# along with this program; if not, write to the Free Software
6717
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6718
 
# 02111-1307, USA.
6719
 
 
6720
 
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
6721
 
# created by `make install' are always world readable, even if the
6722
 
# installer happens to have an overly restrictive umask (e.g. 077).
6723
 
# This was a mistake.  There are at least two reasons why we must not
6724
 
# use `-m 0755':
6725
 
#   - it causes special bits like SGID to be ignored,
6726
 
#   - it may be too restrictive (some setups expect 775 directories).
6727
 
#
6728
 
# Do not use -m 0755 and let people choose whatever they expect by
6729
 
# setting umask.
6730
 
#
6731
 
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
6732
 
# Some implementations (such as Solaris 8's) are not thread-safe: if a
6733
 
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
6734
 
# concurrently, both version can detect that a/ is missing, but only
6735
 
# one can create it and the other will error out.  Consequently we
6736
 
# restrict ourselves to GNU make (using the --version option ensures
6737
 
# this.)
6738
 
AC_DEFUN([AM_PROG_MKDIR_P],
6739
 
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
6740
 
  # We used to keeping the `.' as first argument, in order to
6741
 
  # allow $(mkdir_p) to be used without argument.  As in
6742
 
  #   $(mkdir_p) $(somedir)
6743
 
  # where $(somedir) is conditionally defined.  However this is wrong
6744
 
  # for two reasons:
6745
 
  #  1. if the package is installed by a user who cannot write `.'
6746
 
  #     make install will fail,
6747
 
  #  2. the above comment should most certainly read
6748
 
  #     $(mkdir_p) $(DESTDIR)$(somedir)
6749
 
  #     so it does not work when $(somedir) is undefined and
6750
 
  #     $(DESTDIR) is not.
6751
 
  #  To support the latter case, we have to write
6752
 
  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
6753
 
  #  so the `.' trick is pointless.
6754
 
  mkdir_p='mkdir -p --'
6755
 
else
6756
 
  # On NextStep and OpenStep, the `mkdir' command does not
6757
 
  # recognize any option.  It will interpret all options as
6758
 
  # directories to create, and then abort because `.' already
6759
 
  # exists.
6760
 
  for d in ./-p ./--version;
6761
 
  do
6762
 
    test -d $d && rmdir $d
6763
 
  done
6764
 
  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
6765
 
  if test -f "$ac_aux_dir/mkinstalldirs"; then
6766
 
    mkdir_p='$(mkinstalldirs)'
6767
 
  else
6768
 
    mkdir_p='$(install_sh) -d'
6769
 
  fi
6770
 
fi
6771
 
AC_SUBST([mkdir_p])])
6772
 
 
6773
 
# Helper functions for option handling.                    -*- Autoconf -*-
6774
 
 
6775
 
# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
6776
 
 
6777
 
# This program is free software; you can redistribute it and/or modify
6778
 
# it under the terms of the GNU General Public License as published by
6779
 
# the Free Software Foundation; either version 2, or (at your option)
6780
 
# any later version.
6781
 
 
6782
 
# This program is distributed in the hope that it will be useful,
6783
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6784
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6785
 
# GNU General Public License for more details.
6786
 
 
6787
 
# You should have received a copy of the GNU General Public License
6788
 
# along with this program; if not, write to the Free Software
6789
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6790
 
# 02111-1307, USA.
6791
 
 
6792
 
# serial 2
6793
 
 
6794
 
# _AM_MANGLE_OPTION(NAME)
6795
 
# -----------------------
6796
 
AC_DEFUN([_AM_MANGLE_OPTION],
6797
 
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
6798
 
 
6799
 
# _AM_SET_OPTION(NAME)
6800
 
# ------------------------------
6801
 
# Set option NAME.  Presently that only means defining a flag for this option.
6802
 
AC_DEFUN([_AM_SET_OPTION],
6803
 
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
6804
 
 
6805
 
# _AM_SET_OPTIONS(OPTIONS)
6806
 
# ----------------------------------
6807
 
# OPTIONS is a space-separated list of Automake options.
6808
 
AC_DEFUN([_AM_SET_OPTIONS],
6809
 
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
6810
 
 
6811
 
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
6812
 
# -------------------------------------------
6813
 
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
6814
 
AC_DEFUN([_AM_IF_OPTION],
6815
 
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
6816
 
 
6817
 
#
6818
 
# Check to make sure that the build environment is sane.
6819
 
#
6820
 
 
6821
 
# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
6822
 
 
6823
 
# This program is free software; you can redistribute it and/or modify
6824
 
# it under the terms of the GNU General Public License as published by
6825
 
# the Free Software Foundation; either version 2, or (at your option)
6826
 
# any later version.
6827
 
 
6828
 
# This program is distributed in the hope that it will be useful,
6829
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6830
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6831
 
# GNU General Public License for more details.
6832
 
 
6833
 
# You should have received a copy of the GNU General Public License
6834
 
# along with this program; if not, write to the Free Software
6835
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6836
 
# 02111-1307, USA.
6837
 
 
6838
 
# serial 3
6839
 
 
6840
 
# AM_SANITY_CHECK
6841
 
# ---------------
6842
 
AC_DEFUN([AM_SANITY_CHECK],
6843
 
[AC_MSG_CHECKING([whether build environment is sane])
6844
 
# Just in case
6845
 
sleep 1
6846
 
echo timestamp > conftest.file
6847
 
# Do `set' in a subshell so we don't clobber the current shell's
6848
 
# arguments.  Must try -L first in case configure is actually a
6849
 
# symlink; some systems play weird games with the mod time of symlinks
6850
 
# (eg FreeBSD returns the mod time of the symlink's containing
6851
 
# directory).
6852
 
if (
6853
 
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
6854
 
   if test "$[*]" = "X"; then
6855
 
      # -L didn't work.
6856
 
      set X `ls -t $srcdir/configure conftest.file`
6857
 
   fi
6858
 
   rm -f conftest.file
6859
 
   if test "$[*]" != "X $srcdir/configure conftest.file" \
6860
 
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
6861
 
 
6862
 
      # If neither matched, then we have a broken ls.  This can happen
6863
 
      # if, for instance, CONFIG_SHELL is bash and it inherits a
6864
 
      # broken ls alias from the environment.  This has actually
6865
 
      # happened.  Such a system could not be considered "sane".
6866
 
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
6867
 
alias in your environment])
6868
 
   fi
6869
 
 
6870
 
   test "$[2]" = conftest.file
6871
 
   )
6872
 
then
6873
 
   # Ok.
6874
 
   :
6875
 
else
6876
 
   AC_MSG_ERROR([newly created file is older than distributed files!
6877
 
Check your system clock])
6878
 
fi
6879
 
AC_MSG_RESULT(yes)])
6880
 
 
6881
 
# AM_PROG_INSTALL_STRIP
6882
 
 
6883
 
# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
6884
 
 
6885
 
# This program is free software; you can redistribute it and/or modify
6886
 
# it under the terms of the GNU General Public License as published by
6887
 
# the Free Software Foundation; either version 2, or (at your option)
6888
 
# any later version.
6889
 
 
6890
 
# This program is distributed in the hope that it will be useful,
6891
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6892
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6893
 
# GNU General Public License for more details.
6894
 
 
6895
 
# You should have received a copy of the GNU General Public License
6896
 
# along with this program; if not, write to the Free Software
6897
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6898
 
# 02111-1307, USA.
6899
 
 
6900
 
# One issue with vendor `install' (even GNU) is that you can't
6901
 
# specify the program used to strip binaries.  This is especially
6902
 
# annoying in cross-compiling environments, where the build's strip
6903
 
# is unlikely to handle the host's binaries.
6904
 
# Fortunately install-sh will honor a STRIPPROG variable, so we
6905
 
# always use install-sh in `make install-strip', and initialize
6906
 
# STRIPPROG with the value of the STRIP variable (set by the user).
6907
 
AC_DEFUN([AM_PROG_INSTALL_STRIP],
6908
 
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
6909
 
# Installed binaries are usually stripped using `strip' when the user
6910
 
# run `make install-strip'.  However `strip' might not be the right
6911
 
# tool to use in cross-compilation environments, therefore Automake
6912
 
# will honor the `STRIP' environment variable to overrule this program.
6913
 
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
6914
 
if test "$cross_compiling" != no; then
6915
 
  AC_CHECK_TOOL([STRIP], [strip], :)
6916
 
fi
6917
 
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
6918
 
AC_SUBST([INSTALL_STRIP_PROGRAM])])
6919
 
 
6920
 
# Check how to create a tarball.                            -*- Autoconf -*-
6921
 
 
6922
 
# Copyright (C) 2004  Free Software Foundation, Inc.
6923
 
 
6924
 
# This program is free software; you can redistribute it and/or modify
6925
 
# it under the terms of the GNU General Public License as published by
6926
 
# the Free Software Foundation; either version 2, or (at your option)
6927
 
# any later version.
6928
 
 
6929
 
# This program is distributed in the hope that it will be useful,
6930
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6931
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6932
 
# GNU General Public License for more details.
6933
 
 
6934
 
# You should have received a copy of the GNU General Public License
6935
 
# along with this program; if not, write to the Free Software
6936
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
6937
 
# 02111-1307, USA.
6938
 
 
6939
 
# serial 1
6940
 
 
6941
 
 
6942
 
# _AM_PROG_TAR(FORMAT)
6943
 
# --------------------
6944
 
# Check how to create a tarball in format FORMAT.
6945
 
# FORMAT should be one of `v7', `ustar', or `pax'.
6946
 
#
6947
 
# Substitute a variable $(am__tar) that is a command
6948
 
# writing to stdout a FORMAT-tarball containing the directory
6949
 
# $tardir.
6950
 
#     tardir=directory && $(am__tar) > result.tar
6951
 
#
6952
 
# Substitute a variable $(am__untar) that extract such
6953
 
# a tarball read from stdin.
6954
 
#     $(am__untar) < result.tar
6955
 
AC_DEFUN([_AM_PROG_TAR],
6956
 
[# Always define AMTAR for backward compatibility.
6957
 
AM_MISSING_PROG([AMTAR], [tar])
6958
 
m4_if([$1], [v7],
6959
 
     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
6960
 
     [m4_case([$1], [ustar],, [pax],,
6961
 
              [m4_fatal([Unknown tar format])])
6962
 
AC_MSG_CHECKING([how to create a $1 tar archive])
6963
 
# Loop over all known methods to create a tar archive until one works.
6964
 
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
6965
 
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
6966
 
# Do not fold the above two line into one, because Tru64 sh and
6967
 
# Solaris sh will not grok spaces in the rhs of `-'.
6968
 
for _am_tool in $_am_tools
6969
 
do
6970
 
  case $_am_tool in
6971
 
  gnutar)
6972
 
    for _am_tar in tar gnutar gtar;
6973
 
    do
6974
 
      AM_RUN_LOG([$_am_tar --version]) && break
6975
 
    done
6976
 
    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
6977
 
    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
6978
 
    am__untar="$_am_tar -xf -"
6979
 
    ;;
6980
 
  plaintar)
6981
 
    # Must skip GNU tar: if it does not support --format= it doesn't create
6982
 
    # ustar tarball either.
6983
 
    (tar --version) >/dev/null 2>&1 && continue
6984
 
    am__tar='tar chf - "$$tardir"'
6985
 
    am__tar_='tar chf - "$tardir"'
6986
 
    am__untar='tar xf -'
6987
 
    ;;
6988
 
  pax)
6989
 
    am__tar='pax -L -x $1 -w "$$tardir"'
6990
 
    am__tar_='pax -L -x $1 -w "$tardir"'
6991
 
    am__untar='pax -r'
6992
 
    ;;
6993
 
  cpio)
6994
 
    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
6995
 
    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
6996
 
    am__untar='cpio -i -H $1 -d'
6997
 
    ;;
6998
 
  none)
6999
 
    am__tar=false
7000
 
    am__tar_=false
7001
 
    am__untar=false
7002
 
    ;;
7003
 
  esac
7004
 
 
7005
 
  # If the value was cached, stop now.  We just wanted to have am__tar
7006
 
  # and am__untar set.
7007
 
  test -n "${am_cv_prog_tar_$1}" && break
7008
 
 
7009
 
  # tar/untar a dummy directory, and stop if the command works
7010
 
  rm -rf conftest.dir
7011
 
  mkdir conftest.dir
7012
 
  echo GrepMe > conftest.dir/file
7013
 
  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
7014
 
  rm -rf conftest.dir
7015
 
  if test -s conftest.tar; then
7016
 
    AM_RUN_LOG([$am__untar <conftest.tar])
7017
 
    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
7018
 
  fi
7019
 
done
7020
 
rm -rf conftest.dir
7021
 
 
7022
 
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
7023
 
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
7024
 
AC_SUBST([am__tar])
7025
 
AC_SUBST([am__untar])
7026
 
]) # _AM_PROG_TAR
7027
 
 
7028
 
m4_include([scripts/attributes.m4])
7029
 
m4_include([scripts/checks.m4])
7030
 
m4_include([scripts/common.m4])
 
7935
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
 
7936
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
 
7937
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
 
7938
        _pkg_short_errors_supported=yes
 
7939
else
 
7940
        _pkg_short_errors_supported=no
 
7941
fi[]dnl
 
7942
])# _PKG_SHORT_ERRORS_SUPPORTED
 
7943
 
 
7944
 
 
7945
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
 
7946
# [ACTION-IF-NOT-FOUND])
 
7947
#
 
7948
#
 
7949
# Note that if there is a possibility the first call to
 
7950
# PKG_CHECK_MODULES might not happen, you should be sure to include an
 
7951
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
 
7952
#
 
7953
#
 
7954
# --------------------------------------------------------------
 
7955
AC_DEFUN([PKG_CHECK_MODULES],
 
7956
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 
7957
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 
7958
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
7959
 
 
7960
pkg_failed=no
 
7961
AC_MSG_CHECKING([for $1])
 
7962
 
 
7963
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 
7964
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
 
7965
 
 
7966
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
 
7967
and $1[]_LIBS to avoid the need to call pkg-config.
 
7968
See the pkg-config man page for more details.])
 
7969
 
 
7970
if test $pkg_failed = yes; then
 
7971
        _PKG_SHORT_ERRORS_SUPPORTED
 
7972
        if test $_pkg_short_errors_supported = yes; then
 
7973
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
 
7974
        else 
 
7975
                $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
 
7976
        fi
 
7977
        # Put the nasty error message in config.log where it belongs
 
7978
        echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
 
7979
 
 
7980
        ifelse([$4], , [AC_MSG_ERROR(dnl
 
7981
[Package requirements ($2) were not met:
 
7982
 
 
7983
$$1_PKG_ERRORS
 
7984
 
 
7985
Consider adjusting the PKG_CONFIG_PATH environment variable if you
 
7986
installed software in a non-standard prefix.
 
7987
 
 
7988
_PKG_TEXT
 
7989
])],
 
7990
                [AC_MSG_RESULT([no])
 
7991
                $4])
 
7992
elif test $pkg_failed = untried; then
 
7993
        ifelse([$4], , [AC_MSG_FAILURE(dnl
 
7994
[The pkg-config script could not be found or is too old.  Make sure it
 
7995
is in your PATH or set the PKG_CONFIG environment variable to the full
 
7996
path to pkg-config.
 
7997
 
 
7998
_PKG_TEXT
 
7999
 
 
8000
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
 
8001
                [$4])
 
8002
else
 
8003
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
 
8004
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
 
8005
        AC_MSG_RESULT([yes])
 
8006
        ifelse([$3], , :, [$3])
 
8007
fi[]dnl
 
8008
])# PKG_CHECK_MODULES
 
8009