~ubuntu-branches/ubuntu/feisty/comedilib/feisty

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): David Schleef
  • Date: 2003-09-23 18:11:12 UTC
  • Revision ID: james.westby@ubuntu.com-20030923181112-sat05jyh702rb1at
Tags: upstream-0.7.21
ImportĀ upstreamĀ versionĀ 0.7.21

Show diffs side-by-side

added added

removed removed

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