~ubuntu-branches/ubuntu/breezy/gettext/breezy

« back to all changes in this revision

Viewing changes to autoconf-lib-link/tests/rpathz/aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Santiago Vila
  • Date: 2004-03-14 17:40:02 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040314174002-p1ad5ldve1hqzhye
Tags: 0.14.1-2
* Added libexpat1-dev to Build-Depends, for glade support.
* Added libc0.1-dev to Build-Depends, for GNU/kFreeBSD.
* Removed special-casing of knetbsd-gnu in debian/rules.

Show diffs side-by-side

added added

removed removed

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