~ubuntu-branches/ubuntu/precise/netatalk/precise

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Rittau
  • Date: 2004-01-19 12:43:49 UTC
  • Revision ID: james.westby@ubuntu.com-20040119124349-es563jbp0hk0ae51
Tags: upstream-1.6.4
ImportĀ upstreamĀ versionĀ 1.6.4

Show diffs side-by-side

added added

removed removed

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