Statistics
| Branch: | Tag: | Revision:

root / aclocal.m4 @ 4012ec30

History | View | Annotate | Download (276 KB)

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
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
837

    
838
# serial 52 Debian 1.5.26-1ubuntu1 AC_PROG_LIBTOOL
839

    
840

    
841
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
842
# -----------------------------------------------------------
843
# If this macro is not defined by Autoconf, define it here.
844
m4_ifdef([AC_PROVIDE_IFELSE],
845
         [],
846
         [m4_define([AC_PROVIDE_IFELSE],
847
	         [m4_ifdef([AC_PROVIDE_$1],
848
		           [$2], [$3])])])
849

    
850

    
851
# AC_PROG_LIBTOOL
852
# ---------------
853
AC_DEFUN([AC_PROG_LIBTOOL],
854
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
855
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
856
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
857
  AC_PROVIDE_IFELSE([AC_PROG_CXX],
858
    [AC_LIBTOOL_CXX],
859
    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
860
  ])])
861
dnl And a similar setup for Fortran 77 support
862
  AC_PROVIDE_IFELSE([AC_PROG_F77],
863
    [AC_LIBTOOL_F77],
864
    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
865
])])
866

    
867
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
868
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
869
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
870
  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
871
    [AC_LIBTOOL_GCJ],
872
    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
873
      [AC_LIBTOOL_GCJ],
874
      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
875
	[AC_LIBTOOL_GCJ],
876
      [ifdef([AC_PROG_GCJ],
877
	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
878
       ifdef([A][M_PROG_GCJ],
879
	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
880
       ifdef([LT_AC_PROG_GCJ],
881
	     [define([LT_AC_PROG_GCJ],
882
		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
883
])])# AC_PROG_LIBTOOL
884

    
885

    
886
# _AC_PROG_LIBTOOL
887
# ----------------
888
AC_DEFUN([_AC_PROG_LIBTOOL],
889
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
890
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
891
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
892
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
893

    
894
# This can be used to rebuild libtool when needed
895
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
896

    
897
# Always use our own libtool.
898
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
899
AC_SUBST(LIBTOOL)dnl
900

    
901
# Prevent multiple expansion
902
define([AC_PROG_LIBTOOL], [])
903
])# _AC_PROG_LIBTOOL
904

    
905

    
906
# AC_LIBTOOL_SETUP
907
# ----------------
908
AC_DEFUN([AC_LIBTOOL_SETUP],
909
[AC_PREREQ(2.50)dnl
910
AC_REQUIRE([AC_ENABLE_SHARED])dnl
911
AC_REQUIRE([AC_ENABLE_STATIC])dnl
912
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
913
AC_REQUIRE([AC_CANONICAL_HOST])dnl
914
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
915
AC_REQUIRE([AC_PROG_CC])dnl
916
AC_REQUIRE([AC_PROG_LD])dnl
917
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
918
AC_REQUIRE([AC_PROG_NM])dnl
919

    
920
AC_REQUIRE([AC_PROG_LN_S])dnl
921
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
922
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
923
AC_REQUIRE([AC_OBJEXT])dnl
924
AC_REQUIRE([AC_EXEEXT])dnl
925
dnl
926
AC_LIBTOOL_SYS_MAX_CMD_LEN
927
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
928
AC_LIBTOOL_OBJDIR
929

    
930
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
931
_LT_AC_PROG_ECHO_BACKSLASH
932

    
933
case $host_os in
934
aix3*)
935
  # AIX sometimes has problems with the GCC collect2 program.  For some
936
  # reason, if we set the COLLECT_NAMES environment variable, the problems
937
  # vanish in a puff of smoke.
938
  if test "X${COLLECT_NAMES+set}" != Xset; then
939
    COLLECT_NAMES=
940
    export COLLECT_NAMES
941
  fi
942
  ;;
943
esac
944

    
945
# Sed substitution that helps us do robust quoting.  It backslashifies
946
# metacharacters that are still active within double-quoted strings.
947
Xsed='sed -e 1s/^X//'
948
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
949

    
950
# Same as above, but do not quote variable references.
951
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
952

    
953
# Sed substitution to delay expansion of an escaped shell variable in a
954
# double_quote_subst'ed string.
955
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
956

    
957
# Sed substitution to avoid accidental globbing in evaled expressions
958
no_glob_subst='s/\*/\\\*/g'
959

    
960
# Constants:
961
rm="rm -f"
962

    
963
# Global variables:
964
default_ofile=libtool
965
can_build_shared=yes
966

    
967
# All known linkers require a `.a' archive for static linking (except MSVC,
968
# which needs '.lib').
969
libext=a
970
ltmain="$ac_aux_dir/ltmain.sh"
971
ofile="$default_ofile"
972
with_gnu_ld="$lt_cv_prog_gnu_ld"
973

    
974
AC_CHECK_TOOL(AR, ar, false)
975
AC_CHECK_TOOL(RANLIB, ranlib, :)
976
AC_CHECK_TOOL(STRIP, strip, :)
977

    
978
old_CC="$CC"
979
old_CFLAGS="$CFLAGS"
980

    
981
# Set sane defaults for various variables
982
test -z "$AR" && AR=ar
983
test -z "$AR_FLAGS" && AR_FLAGS=cru
984
test -z "$AS" && AS=as
985
test -z "$CC" && CC=cc
986
test -z "$LTCC" && LTCC=$CC
987
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
988
test -z "$DLLTOOL" && DLLTOOL=dlltool
989
test -z "$LD" && LD=ld
990
test -z "$LN_S" && LN_S="ln -s"
991
test -z "$MAGIC_CMD" && MAGIC_CMD=file
992
test -z "$NM" && NM=nm
993
test -z "$SED" && SED=sed
994
test -z "$OBJDUMP" && OBJDUMP=objdump
995
test -z "$RANLIB" && RANLIB=:
996
test -z "$STRIP" && STRIP=:
997
test -z "$ac_objext" && ac_objext=o
998

    
999
# Determine commands to create old-style static archives.
1000
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1001
old_postinstall_cmds='chmod 644 $oldlib'
1002
old_postuninstall_cmds=
1003

    
1004
if test -n "$RANLIB"; then
1005
  case $host_os in
1006
  openbsd*)
1007
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1008
    ;;
1009
  *)
1010
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1011
    ;;
1012
  esac
1013
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1014
fi
1015

    
1016
_LT_CC_BASENAME([$compiler])
1017

    
1018
# Only perform the check for file, if the check method requires it
1019
case $deplibs_check_method in
1020
file_magic*)
1021
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1022
    AC_PATH_MAGIC
1023
  fi
1024
  ;;
1025
esac
1026

    
1027
_LT_REQUIRED_DARWIN_CHECKS
1028

    
1029
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1030
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1031
enable_win32_dll=yes, enable_win32_dll=no)
1032

    
1033
AC_ARG_ENABLE([libtool-lock],
1034
    [AC_HELP_STRING([--disable-libtool-lock],
1035
	[avoid locking (might break parallel builds)])])
1036
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1037

    
1038
AC_ARG_WITH([pic],
1039
    [AC_HELP_STRING([--with-pic],
1040
	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1041
    [pic_mode="$withval"],
1042
    [pic_mode=default])
1043
test -z "$pic_mode" && pic_mode=default
1044

    
1045
# Use C for the default configuration in the libtool script
1046
tagname=
1047
AC_LIBTOOL_LANG_C_CONFIG
1048
_LT_AC_TAGCONFIG
1049
])# AC_LIBTOOL_SETUP
1050

    
1051

    
1052
# _LT_AC_SYS_COMPILER
1053
# -------------------
1054
AC_DEFUN([_LT_AC_SYS_COMPILER],
1055
[AC_REQUIRE([AC_PROG_CC])dnl
1056

    
1057
# If no C compiler was specified, use CC.
1058
LTCC=${LTCC-"$CC"}
1059

    
1060
# If no C compiler flags were specified, use CFLAGS.
1061
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1062

    
1063
# Allow CC to be a program name with arguments.
1064
compiler=$CC
1065
])# _LT_AC_SYS_COMPILER
1066

    
1067

    
1068
# _LT_CC_BASENAME(CC)
1069
# -------------------
1070
# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1071
AC_DEFUN([_LT_CC_BASENAME],
1072
[for cc_temp in $1""; do
1073
  case $cc_temp in
1074
    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1075
    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1076
    \-*) ;;
1077
    *) break;;
1078
  esac
1079
done
1080
cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1081
])
1082

    
1083

    
1084
# _LT_COMPILER_BOILERPLATE
1085
# ------------------------
1086
# Check for compiler boilerplate output or warnings with
1087
# the simple compiler test code.
1088
AC_DEFUN([_LT_COMPILER_BOILERPLATE],
1089
[AC_REQUIRE([LT_AC_PROG_SED])dnl
1090
ac_outfile=conftest.$ac_objext
1091
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1092
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1093
_lt_compiler_boilerplate=`cat conftest.err`
1094
$rm conftest*
1095
])# _LT_COMPILER_BOILERPLATE
1096

    
1097

    
1098
# _LT_LINKER_BOILERPLATE
1099
# ----------------------
1100
# Check for linker boilerplate output or warnings with
1101
# the simple link test code.
1102
AC_DEFUN([_LT_LINKER_BOILERPLATE],
1103
[AC_REQUIRE([LT_AC_PROG_SED])dnl
1104
ac_outfile=conftest.$ac_objext
1105
echo "$lt_simple_link_test_code" >conftest.$ac_ext
1106
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1107
_lt_linker_boilerplate=`cat conftest.err`
1108
$rm -r conftest*
1109
])# _LT_LINKER_BOILERPLATE
1110

    
1111
# _LT_REQUIRED_DARWIN_CHECKS
1112
# --------------------------
1113
# Check for some things on darwin
1114
AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
1115
  case $host_os in
1116
    rhapsody* | darwin*)
1117
    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1118
    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1119

    
1120
    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1121
      [lt_cv_apple_cc_single_mod=no
1122
      if test -z "${LT_MULTI_MODULE}"; then
1123
   # By default we will add the -single_module flag. You can override
1124
   # by either setting the environment variable LT_MULTI_MODULE
1125
   # non-empty at configure time, or by adding -multi_module to the
1126
   # link flags.
1127
   echo "int foo(void){return 1;}" > conftest.c
1128
   $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1129
     -dynamiclib ${wl}-single_module conftest.c
1130
   if test -f libconftest.dylib; then
1131
     lt_cv_apple_cc_single_mod=yes
1132
     rm -rf libconftest.dylib*
1133
   fi
1134
   rm conftest.c
1135
      fi])
1136
    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1137
      [lt_cv_ld_exported_symbols_list],
1138
      [lt_cv_ld_exported_symbols_list=no
1139
      save_LDFLAGS=$LDFLAGS
1140
      echo "_main" > conftest.sym
1141
      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1142
      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1143
   [lt_cv_ld_exported_symbols_list=yes],
1144
   [lt_cv_ld_exported_symbols_list=no])
1145
   LDFLAGS="$save_LDFLAGS"
1146
    ])
1147
    case $host_os in
1148
    rhapsody* | darwin1.[[0123]])
1149
      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1150
    darwin1.*)
1151
     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1152
    darwin*)
1153
      # if running on 10.5 or later, the deployment target defaults
1154
      # to the OS version, if on x86, and 10.4, the deployment
1155
      # target defaults to 10.4. Don't you love it?
1156
      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1157
   10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1158
     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1159
   10.[[012]]*)
1160
     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1161
   10.*)
1162
     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1163
      esac
1164
    ;;
1165
  esac
1166
    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1167
      _lt_dar_single_mod='$single_module'
1168
    fi
1169
    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1170
      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1171
    else
1172
      _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
1173
    fi
1174
    if test "$DSYMUTIL" != ":"; then
1175
      _lt_dsymutil="~$DSYMUTIL \$lib || :"
1176
    else
1177
      _lt_dsymutil=
1178
    fi
1179
    ;;
1180
  esac
1181
])
1182

    
1183
# _LT_AC_SYS_LIBPATH_AIX
1184
# ----------------------
1185
# Links a minimal program and checks the executable
1186
# for the system default hardcoded library path. In most cases,
1187
# this is /usr/lib:/lib, but when the MPI compilers are used
1188
# the location of the communication and MPI libs are included too.
1189
# If we don't find anything, use the default library path according
1190
# to the aix ld manual.
1191
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1192
[AC_REQUIRE([LT_AC_PROG_SED])dnl
1193
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1194
lt_aix_libpath_sed='
1195
    /Import File Strings/,/^$/ {
1196
	/^0/ {
1197
	    s/^0  *\(.*\)$/\1/
1198
	    p
1199
	}
1200
    }'
1201
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1202
# Check for a 64-bit object if we didn't find anything.
1203
if test -z "$aix_libpath"; then
1204
  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1205
fi],[])
1206
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1207
])# _LT_AC_SYS_LIBPATH_AIX
1208

    
1209

    
1210
# _LT_AC_SHELL_INIT(ARG)
1211
# ----------------------
1212
AC_DEFUN([_LT_AC_SHELL_INIT],
1213
[ifdef([AC_DIVERSION_NOTICE],
1214
	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1215
	 [AC_DIVERT_PUSH(NOTICE)])
1216
$1
1217
AC_DIVERT_POP
1218
])# _LT_AC_SHELL_INIT
1219

    
1220

    
1221
# _LT_AC_PROG_ECHO_BACKSLASH
1222
# --------------------------
1223
# Add some code to the start of the generated configure script which
1224
# will find an echo command which doesn't interpret backslashes.
1225
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1226
[_LT_AC_SHELL_INIT([
1227
# Check that we are running under the correct shell.
1228
SHELL=${CONFIG_SHELL-/bin/sh}
1229

    
1230
case X$ECHO in
1231
X*--fallback-echo)
1232
  # Remove one level of quotation (which was required for Make).
1233
  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1234
  ;;
1235
esac
1236

    
1237
echo=${ECHO-echo}
1238
if test "X[$]1" = X--no-reexec; then
1239
  # Discard the --no-reexec flag, and continue.
1240
  shift
1241
elif test "X[$]1" = X--fallback-echo; then
1242
  # Avoid inline document here, it may be left over
1243
  :
1244
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1245
  # Yippee, $echo works!
1246
  :
1247
else
1248
  # Restart under the correct shell.
1249
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1250
fi
1251

    
1252
if test "X[$]1" = X--fallback-echo; then
1253
  # used as fallback echo
1254
  shift
1255
  cat <<EOF
1256
[$]*
1257
EOF
1258
  exit 0
1259
fi
1260

    
1261
# The HP-UX ksh and POSIX shell print the target directory to stdout
1262
# if CDPATH is set.
1263
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1264

    
1265
if test -z "$ECHO"; then
1266
if test "X${echo_test_string+set}" != Xset; then
1267
# find a string as large as possible, as long as the shell can cope with it
1268
  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1269
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1270
    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
1271
       echo_test_string=`eval $cmd` &&
1272
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1273
    then
1274
      break
1275
    fi
1276
  done
1277
fi
1278

    
1279
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1280
   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1281
   test "X$echo_testing_string" = "X$echo_test_string"; then
1282
  :
1283
else
1284
  # The Solaris, AIX, and Digital Unix default echo programs unquote
1285
  # backslashes.  This makes it impossible to quote backslashes using
1286
  #   echo "$something" | sed 's/\\/\\\\/g'
1287
  #
1288
  # So, first we look for a working echo in the user's PATH.
1289

    
1290
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1291
  for dir in $PATH /usr/ucb; do
1292
    IFS="$lt_save_ifs"
1293
    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1294
       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1295
       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1296
       test "X$echo_testing_string" = "X$echo_test_string"; then
1297
      echo="$dir/echo"
1298
      break
1299
    fi
1300
  done
1301
  IFS="$lt_save_ifs"
1302

    
1303
  if test "X$echo" = Xecho; then
1304
    # We didn't find a better echo, so look for alternatives.
1305
    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1306
       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1307
       test "X$echo_testing_string" = "X$echo_test_string"; then
1308
      # This shell has a builtin print -r that does the trick.
1309
      echo='print -r'
1310
    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1311
	 test "X$CONFIG_SHELL" != X/bin/ksh; then
1312
      # If we have ksh, try running configure again with it.
1313
      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1314
      export ORIGINAL_CONFIG_SHELL
1315
      CONFIG_SHELL=/bin/ksh
1316
      export CONFIG_SHELL
1317
      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1318
    else
1319
      # Try using printf.
1320
      echo='printf %s\n'
1321
      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1322
	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1323
	 test "X$echo_testing_string" = "X$echo_test_string"; then
1324
	# Cool, printf works
1325
	:
1326
      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1327
	   test "X$echo_testing_string" = 'X\t' &&
1328
	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1329
	   test "X$echo_testing_string" = "X$echo_test_string"; then
1330
	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1331
	export CONFIG_SHELL
1332
	SHELL="$CONFIG_SHELL"
1333
	export SHELL
1334
	echo="$CONFIG_SHELL [$]0 --fallback-echo"
1335
      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1336
	   test "X$echo_testing_string" = 'X\t' &&
1337
	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1338
	   test "X$echo_testing_string" = "X$echo_test_string"; then
1339
	echo="$CONFIG_SHELL [$]0 --fallback-echo"
1340
      else
1341
	# maybe with a smaller string...
1342
	prev=:
1343

    
1344
	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1345
	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1346
	  then
1347
	    break
1348
	  fi
1349
	  prev="$cmd"
1350
	done
1351

    
1352
	if test "$prev" != 'sed 50q "[$]0"'; then
1353
	  echo_test_string=`eval $prev`
1354
	  export echo_test_string
1355
	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1356
	else
1357
	  # Oops.  We lost completely, so just stick with echo.
1358
	  echo=echo
1359
	fi
1360
      fi
1361
    fi
1362
  fi
1363
fi
1364
fi
1365

    
1366
# Copy echo and quote the copy suitably for passing to libtool from
1367
# the Makefile, instead of quoting the original, which is used later.
1368
ECHO=$echo
1369
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1370
   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1371
fi
1372

    
1373
AC_SUBST(ECHO)
1374
])])# _LT_AC_PROG_ECHO_BACKSLASH
1375

    
1376

    
1377
# _LT_AC_LOCK
1378
# -----------
1379
AC_DEFUN([_LT_AC_LOCK],
1380
[AC_ARG_ENABLE([libtool-lock],
1381
    [AC_HELP_STRING([--disable-libtool-lock],
1382
	[avoid locking (might break parallel builds)])])
1383
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1384

    
1385
# Some flags need to be propagated to the compiler or linker for good
1386
# libtool support.
1387
case $host in
1388
ia64-*-hpux*)
1389
  # Find out which ABI we are using.
1390
  echo 'int i;' > conftest.$ac_ext
1391
  if AC_TRY_EVAL(ac_compile); then
1392
    case `/usr/bin/file conftest.$ac_objext` in
1393
    *ELF-32*)
1394
      HPUX_IA64_MODE="32"
1395
      ;;
1396
    *ELF-64*)
1397
      HPUX_IA64_MODE="64"
1398
      ;;
1399
    esac
1400
  fi
1401
  rm -rf conftest*
1402
  ;;
1403
*-*-irix6*)
1404
  # Find out which ABI we are using.
1405
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1406
  if AC_TRY_EVAL(ac_compile); then
1407
   if test "$lt_cv_prog_gnu_ld" = yes; then
1408
    case `/usr/bin/file conftest.$ac_objext` in
1409
    *32-bit*)
1410
      LD="${LD-ld} -melf32bsmip"
1411
      ;;
1412
    *N32*)
1413
      LD="${LD-ld} -melf32bmipn32"
1414
      ;;
1415
    *64-bit*)
1416
      LD="${LD-ld} -melf64bmip"
1417
      ;;
1418
    esac
1419
   else
1420
    case `/usr/bin/file conftest.$ac_objext` in
1421
    *32-bit*)
1422
      LD="${LD-ld} -32"
1423
      ;;
1424
    *N32*)
1425
      LD="${LD-ld} -n32"
1426
      ;;
1427
    *64-bit*)
1428
      LD="${LD-ld} -64"
1429
      ;;
1430
    esac
1431
   fi
1432
  fi
1433
  rm -rf conftest*
1434
  ;;
1435

    
1436
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1437
s390*-*linux*|sparc*-*linux*)
1438
  # Find out which ABI we are using.
1439
  echo 'int i;' > conftest.$ac_ext
1440
  if AC_TRY_EVAL(ac_compile); then
1441
    case `/usr/bin/file conftest.o` in
1442
    *32-bit*)
1443
      case $host in
1444
        x86_64-*kfreebsd*-gnu)
1445
          LD="${LD-ld} -m elf_i386_fbsd"
1446
          ;;
1447
        x86_64-*linux*)
1448
          LD="${LD-ld} -m elf_i386"
1449
          ;;
1450
        ppc64-*linux*|powerpc64-*linux*)
1451
          LD="${LD-ld} -m elf32ppclinux"
1452
          ;;
1453
        s390x-*linux*)
1454
          LD="${LD-ld} -m elf_s390"
1455
          ;;
1456
        sparc64-*linux*)
1457
          LD="${LD-ld} -m elf32_sparc"
1458
          ;;
1459
      esac
1460
      ;;
1461
    *64-bit*)
1462
      case $host in
1463
        x86_64-*kfreebsd*-gnu)
1464
          LD="${LD-ld} -m elf_x86_64_fbsd"
1465
          ;;
1466
        x86_64-*linux*)
1467
          LD="${LD-ld} -m elf_x86_64"
1468
          ;;
1469
        ppc*-*linux*|powerpc*-*linux*)
1470
          LD="${LD-ld} -m elf64ppc"
1471
          ;;
1472
        s390*-*linux*)
1473
          LD="${LD-ld} -m elf64_s390"
1474
          ;;
1475
        sparc*-*linux*)
1476
          LD="${LD-ld} -m elf64_sparc"
1477
          ;;
1478
      esac
1479
      ;;
1480
    esac
1481
  fi
1482
  rm -rf conftest*
1483
  ;;
1484

    
1485
*-*-sco3.2v5*)
1486
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1487
  SAVE_CFLAGS="$CFLAGS"
1488
  CFLAGS="$CFLAGS -belf"
1489
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1490
    [AC_LANG_PUSH(C)
1491
     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1492
     AC_LANG_POP])
1493
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1494
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1495
    CFLAGS="$SAVE_CFLAGS"
1496
  fi
1497
  ;;
1498
sparc*-*solaris*)
1499
  # Find out which ABI we are using.
1500
  echo 'int i;' > conftest.$ac_ext
1501
  if AC_TRY_EVAL(ac_compile); then
1502
    case `/usr/bin/file conftest.o` in
1503
    *64-bit*)
1504
      case $lt_cv_prog_gnu_ld in
1505
      yes*) LD="${LD-ld} -m elf64_sparc" ;;
1506
      *)
1507
        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1508
	  LD="${LD-ld} -64"
1509
	fi
1510
	;;
1511
      esac
1512
      ;;
1513
    esac
1514
  fi
1515
  rm -rf conftest*
1516
  ;;
1517

    
1518
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1519
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1520
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1521
  AC_CHECK_TOOL(AS, as, false)
1522
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
1523
  ;;
1524
  ])
1525
esac
1526

    
1527
need_locks="$enable_libtool_lock"
1528

    
1529
])# _LT_AC_LOCK
1530

    
1531

    
1532
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1533
#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1534
# ----------------------------------------------------------------
1535
# Check whether the given compiler option works
1536
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1537
[AC_REQUIRE([LT_AC_PROG_SED])
1538
AC_CACHE_CHECK([$1], [$2],
1539
  [$2=no
1540
  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1541
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1542
   lt_compiler_flag="$3"
1543
   # Insert the option either (1) after the last *FLAGS variable, or
1544
   # (2) before a word containing "conftest.", or (3) at the end.
1545
   # Note that $ac_compile itself does not contain backslashes and begins
1546
   # with a dollar sign (not a hyphen), so the echo should work correctly.
1547
   # The option is referenced via a variable to avoid confusing sed.
1548
   lt_compile=`echo "$ac_compile" | $SED \
1549
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1550
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1551
   -e 's:$: $lt_compiler_flag:'`
1552
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1553
   (eval "$lt_compile" 2>conftest.err)
1554
   ac_status=$?
1555
   cat conftest.err >&AS_MESSAGE_LOG_FD
1556
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1557
   if (exit $ac_status) && test -s "$ac_outfile"; then
1558
     # The compiler can only warn and ignore the option if not recognized
1559
     # So say no if there are warnings other than the usual output.
1560
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1561
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1562
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1563
       $2=yes
1564
     fi
1565
   fi
1566
   $rm conftest*
1567
])
1568

    
1569
if test x"[$]$2" = xyes; then
1570
    ifelse([$5], , :, [$5])
1571
else
1572
    ifelse([$6], , :, [$6])
1573
fi
1574
])# AC_LIBTOOL_COMPILER_OPTION
1575

    
1576

    
1577
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1578
#                          [ACTION-SUCCESS], [ACTION-FAILURE])
1579
# ------------------------------------------------------------
1580
# Check whether the given compiler option works
1581
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1582
[AC_REQUIRE([LT_AC_PROG_SED])dnl
1583
AC_CACHE_CHECK([$1], [$2],
1584
  [$2=no
1585
   save_LDFLAGS="$LDFLAGS"
1586
   LDFLAGS="$LDFLAGS $3"
1587
   echo "$lt_simple_link_test_code" > conftest.$ac_ext
1588
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1589
     # The linker can only warn and ignore the option if not recognized
1590
     # So say no if there are warnings
1591
     if test -s conftest.err; then
1592
       # Append any errors to the config.log.
1593
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1594
       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1595
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1596
       if diff conftest.exp conftest.er2 >/dev/null; then
1597
         $2=yes
1598
       fi
1599
     else
1600
       $2=yes
1601
     fi
1602
   fi
1603
   $rm -r conftest*
1604
   LDFLAGS="$save_LDFLAGS"
1605
])
1606

    
1607
if test x"[$]$2" = xyes; then
1608
    ifelse([$4], , :, [$4])
1609
else
1610
    ifelse([$5], , :, [$5])
1611
fi
1612
])# AC_LIBTOOL_LINKER_OPTION
1613

    
1614

    
1615
# AC_LIBTOOL_SYS_MAX_CMD_LEN
1616
# --------------------------
1617
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1618
[# find the maximum length of command line arguments
1619
AC_MSG_CHECKING([the maximum length of command line arguments])
1620
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1621
  i=0
1622
  teststring="ABCD"
1623

    
1624
  case $build_os in
1625
  msdosdjgpp*)
1626
    # On DJGPP, this test can blow up pretty badly due to problems in libc
1627
    # (any single argument exceeding 2000 bytes causes a buffer overrun
1628
    # during glob expansion).  Even if it were fixed, the result of this
1629
    # check would be larger than it should be.
1630
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1631
    ;;
1632

    
1633
  gnu*)
1634
    # Under GNU Hurd, this test is not required because there is
1635
    # no limit to the length of command line arguments.
1636
    # Libtool will interpret -1 as no limit whatsoever
1637
    lt_cv_sys_max_cmd_len=-1;
1638
    ;;
1639

    
1640
  cygwin* | mingw*)
1641
    # On Win9x/ME, this test blows up -- it succeeds, but takes
1642
    # about 5 minutes as the teststring grows exponentially.
1643
    # Worse, since 9x/ME are not pre-emptively multitasking,
1644
    # you end up with a "frozen" computer, even though with patience
1645
    # the test eventually succeeds (with a max line length of 256k).
1646
    # Instead, let's just punt: use the minimum linelength reported by
1647
    # all of the supported platforms: 8192 (on NT/2K/XP).
1648
    lt_cv_sys_max_cmd_len=8192;
1649
    ;;
1650

    
1651
  amigaos*)
1652
    # On AmigaOS with pdksh, this test takes hours, literally.
1653
    # So we just punt and use a minimum line length of 8192.
1654
    lt_cv_sys_max_cmd_len=8192;
1655
    ;;
1656

    
1657
  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1658
    # This has been around since 386BSD, at least.  Likely further.
1659
    if test -x /sbin/sysctl; then
1660
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1661
    elif test -x /usr/sbin/sysctl; then
1662
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1663
    else
1664
      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
1665
    fi
1666
    # And add a safety zone
1667
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1668
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1669
    ;;
1670

    
1671
  interix*)
1672
    # We know the value 262144 and hardcode it with a safety zone (like BSD)
1673
    lt_cv_sys_max_cmd_len=196608
1674
    ;;
1675

    
1676
  osf*)
1677
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1678
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1679
    # nice to cause kernel panics so lets avoid the loop below.
1680
    # First set a reasonable default.
1681
    lt_cv_sys_max_cmd_len=16384
1682
    #
1683
    if test -x /sbin/sysconfig; then
1684
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1685
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
1686
      esac
1687
    fi
1688
    ;;
1689
  sco3.2v5*)
1690
    lt_cv_sys_max_cmd_len=102400
1691
    ;;
1692
  sysv5* | sco5v6* | sysv4.2uw2*)
1693
    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1694
    if test -n "$kargmax"; then
1695
      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
1696
    else
1697
      lt_cv_sys_max_cmd_len=32768
1698
    fi
1699
    ;;
1700
  *)
1701
    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1702
    if test -n "$lt_cv_sys_max_cmd_len"; then
1703
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1704
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1705
    else
1706
      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1707
      while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
1708
	       = "XX$teststring") >/dev/null 2>&1 &&
1709
	      new_result=`expr "X$teststring" : ".*" 2>&1` &&
1710
	      lt_cv_sys_max_cmd_len=$new_result &&
1711
	      test $i != 17 # 1/2 MB should be enough
1712
      do
1713
        i=`expr $i + 1`
1714
        teststring=$teststring$teststring
1715
      done
1716
      teststring=
1717
      # Add a significant safety factor because C++ compilers can tack on massive
1718
      # amounts of additional arguments before passing them to the linker.
1719
      # It appears as though 1/2 is a usable value.
1720
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1721
    fi
1722
    ;;
1723
  esac
1724
])
1725
if test -n $lt_cv_sys_max_cmd_len ; then
1726
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1727
else
1728
  AC_MSG_RESULT(none)
1729
fi
1730
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1731

    
1732

    
1733
# _LT_AC_CHECK_DLFCN
1734
# ------------------
1735
AC_DEFUN([_LT_AC_CHECK_DLFCN],
1736
[AC_CHECK_HEADERS(dlfcn.h)dnl
1737
])# _LT_AC_CHECK_DLFCN
1738

    
1739

    
1740
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1741
#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1742
# ---------------------------------------------------------------------
1743
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1744
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1745
if test "$cross_compiling" = yes; then :
1746
  [$4]
1747
else
1748
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1749
  lt_status=$lt_dlunknown
1750
  cat > conftest.$ac_ext <<EOF
1751
[#line __oline__ "configure"
1752
#include "confdefs.h"
1753

    
1754
#if HAVE_DLFCN_H
1755
#include <dlfcn.h>
1756
#endif
1757

    
1758
#include <stdio.h>
1759

    
1760
#ifdef RTLD_GLOBAL
1761
#  define LT_DLGLOBAL		RTLD_GLOBAL
1762
#else
1763
#  ifdef DL_GLOBAL
1764
#    define LT_DLGLOBAL		DL_GLOBAL
1765
#  else
1766
#    define LT_DLGLOBAL		0
1767
#  endif
1768
#endif
1769

    
1770
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1771
   find out it does not work in some platform. */
1772
#ifndef LT_DLLAZY_OR_NOW
1773
#  ifdef RTLD_LAZY
1774
#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
1775
#  else
1776
#    ifdef DL_LAZY
1777
#      define LT_DLLAZY_OR_NOW		DL_LAZY
1778
#    else
1779
#      ifdef RTLD_NOW
1780
#        define LT_DLLAZY_OR_NOW	RTLD_NOW
1781
#      else
1782
#        ifdef DL_NOW
1783
#          define LT_DLLAZY_OR_NOW	DL_NOW
1784
#        else
1785
#          define LT_DLLAZY_OR_NOW	0
1786
#        endif
1787
#      endif
1788
#    endif
1789
#  endif
1790
#endif
1791

    
1792
#ifdef __cplusplus
1793
extern "C" void exit (int);
1794
#endif
1795

    
1796
void fnord() { int i=42;}
1797
int main ()
1798
{
1799
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1800
  int status = $lt_dlunknown;
1801

    
1802
  if (self)
1803
    {
1804
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1805
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1806
      /* dlclose (self); */
1807
    }
1808
  else
1809
    puts (dlerror ());
1810

    
1811
    exit (status);
1812
}]
1813
EOF
1814
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1815
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1816
    lt_status=$?
1817
    case x$lt_status in
1818
      x$lt_dlno_uscore) $1 ;;
1819
      x$lt_dlneed_uscore) $2 ;;
1820
      x$lt_dlunknown|x*) $3 ;;
1821
    esac
1822
  else :
1823
    # compilation failed
1824
    $3
1825
  fi
1826
fi
1827
rm -fr conftest*
1828
])# _LT_AC_TRY_DLOPEN_SELF
1829

    
1830

    
1831
# AC_LIBTOOL_DLOPEN_SELF
1832
# ----------------------
1833
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1834
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1835
if test "x$enable_dlopen" != xyes; then
1836
  enable_dlopen=unknown
1837
  enable_dlopen_self=unknown
1838
  enable_dlopen_self_static=unknown
1839
else
1840
  lt_cv_dlopen=no
1841
  lt_cv_dlopen_libs=
1842

    
1843
  case $host_os in
1844
  beos*)
1845
    lt_cv_dlopen="load_add_on"
1846
    lt_cv_dlopen_libs=
1847
    lt_cv_dlopen_self=yes
1848
    ;;
1849

    
1850
  mingw* | pw32*)
1851
    lt_cv_dlopen="LoadLibrary"
1852
    lt_cv_dlopen_libs=
1853
   ;;
1854

    
1855
  cygwin*)
1856
    lt_cv_dlopen="dlopen"
1857
    lt_cv_dlopen_libs=
1858
   ;;
1859

    
1860
  darwin*)
1861
  # if libdl is installed we need to link against it
1862
    AC_CHECK_LIB([dl], [dlopen],
1863
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1864
    lt_cv_dlopen="dyld"
1865
    lt_cv_dlopen_libs=
1866
    lt_cv_dlopen_self=yes
1867
    ])
1868
   ;;
1869

    
1870
  *)
1871
    AC_CHECK_FUNC([shl_load],
1872
	  [lt_cv_dlopen="shl_load"],
1873
      [AC_CHECK_LIB([dld], [shl_load],
1874
	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1875
	[AC_CHECK_FUNC([dlopen],
1876
	      [lt_cv_dlopen="dlopen"],
1877
	  [AC_CHECK_LIB([dl], [dlopen],
1878
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1879
	    [AC_CHECK_LIB([svld], [dlopen],
1880
		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1881
	      [AC_CHECK_LIB([dld], [dld_link],
1882
		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1883
	      ])
1884
	    ])
1885
	  ])
1886
	])
1887
      ])
1888
    ;;
1889
  esac
1890

    
1891
  if test "x$lt_cv_dlopen" != xno; then
1892
    enable_dlopen=yes
1893
  else
1894
    enable_dlopen=no
1895
  fi
1896

    
1897
  case $lt_cv_dlopen in
1898
  dlopen)
1899
    save_CPPFLAGS="$CPPFLAGS"
1900
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1901

    
1902
    save_LDFLAGS="$LDFLAGS"
1903
    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1904

    
1905
    save_LIBS="$LIBS"
1906
    LIBS="$lt_cv_dlopen_libs $LIBS"
1907

    
1908
    AC_CACHE_CHECK([whether a program can dlopen itself],
1909
	  lt_cv_dlopen_self, [dnl
1910
	  _LT_AC_TRY_DLOPEN_SELF(
1911
	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1912
	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1913
    ])
1914

    
1915
    if test "x$lt_cv_dlopen_self" = xyes; then
1916
      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1917
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1918
    	  lt_cv_dlopen_self_static, [dnl
1919
	  _LT_AC_TRY_DLOPEN_SELF(
1920
	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1921
	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1922
      ])
1923
    fi
1924

    
1925
    CPPFLAGS="$save_CPPFLAGS"
1926
    LDFLAGS="$save_LDFLAGS"
1927
    LIBS="$save_LIBS"
1928
    ;;
1929
  esac
1930

    
1931
  case $lt_cv_dlopen_self in
1932
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1933
  *) enable_dlopen_self=unknown ;;
1934
  esac
1935

    
1936
  case $lt_cv_dlopen_self_static in
1937
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1938
  *) enable_dlopen_self_static=unknown ;;
1939
  esac
1940
fi
1941
])# AC_LIBTOOL_DLOPEN_SELF
1942

    
1943

    
1944
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1945
# ---------------------------------
1946
# Check to see if options -c and -o are simultaneously supported by compiler
1947
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1948
[AC_REQUIRE([LT_AC_PROG_SED])dnl
1949
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1950
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1951
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1952
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1953
   $rm -r conftest 2>/dev/null
1954
   mkdir conftest
1955
   cd conftest
1956
   mkdir out
1957
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1958

    
1959
   lt_compiler_flag="-o out/conftest2.$ac_objext"
1960
   # Insert the option either (1) after the last *FLAGS variable, or
1961
   # (2) before a word containing "conftest.", or (3) at the end.
1962
   # Note that $ac_compile itself does not contain backslashes and begins
1963
   # with a dollar sign (not a hyphen), so the echo should work correctly.
1964
   lt_compile=`echo "$ac_compile" | $SED \
1965
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1966
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1967
   -e 's:$: $lt_compiler_flag:'`
1968
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1969
   (eval "$lt_compile" 2>out/conftest.err)
1970
   ac_status=$?
1971
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
1972
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1973
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
1974
   then
1975
     # The compiler can only warn and ignore the option if not recognized
1976
     # So say no if there are warnings
1977
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1978
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1979
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1980
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1981
     fi
1982
   fi
1983
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
1984
   $rm conftest*
1985
   # SGI C++ compiler will create directory out/ii_files/ for
1986
   # template instantiation
1987
   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1988
   $rm out/* && rmdir out
1989
   cd ..
1990
   rmdir conftest
1991
   $rm conftest*
1992
])
1993
])# AC_LIBTOOL_PROG_CC_C_O
1994

    
1995

    
1996
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1997
# -----------------------------------------
1998
# Check to see if we can do hard links to lock some files if needed
1999
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
2000
[AC_REQUIRE([_LT_AC_LOCK])dnl
2001

    
2002
hard_links="nottested"
2003
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2004
  # do not overwrite the value of need_locks provided by the user
2005
  AC_MSG_CHECKING([if we can lock with hard links])
2006
  hard_links=yes
2007
  $rm conftest*
2008
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2009
  touch conftest.a
2010
  ln conftest.a conftest.b 2>&5 || hard_links=no
2011
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2012
  AC_MSG_RESULT([$hard_links])
2013
  if test "$hard_links" = no; then
2014
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2015
    need_locks=warn
2016
  fi
2017
else
2018
  need_locks=no
2019
fi
2020
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
2021

    
2022

    
2023
# AC_LIBTOOL_OBJDIR
2024
# -----------------
2025
AC_DEFUN([AC_LIBTOOL_OBJDIR],
2026
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2027
[rm -f .libs 2>/dev/null
2028
mkdir .libs 2>/dev/null
2029
if test -d .libs; then
2030
  lt_cv_objdir=.libs
2031
else
2032
  # MS-DOS does not allow filenames that begin with a dot.
2033
  lt_cv_objdir=_libs
2034
fi
2035
rmdir .libs 2>/dev/null])
2036
objdir=$lt_cv_objdir
2037
])# AC_LIBTOOL_OBJDIR
2038

    
2039

    
2040
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
2041
# ----------------------------------------------
2042
# Check hardcoding attributes.
2043
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
2044
[AC_MSG_CHECKING([how to hardcode library paths into programs])
2045
_LT_AC_TAGVAR(hardcode_action, $1)=
2046
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
2047
   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
2048
   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2049

    
2050
  # We can hardcode non-existant directories.
2051
  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2052
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2053
     # have to relink, otherwise we might link with an installed library
2054
     # when we should be linking with a yet-to-be-installed one
2055
     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2056
     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2057
    # Linking always hardcodes the temporary library directory.
2058
    _LT_AC_TAGVAR(hardcode_action, $1)=relink
2059
  else
2060
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2061
    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
2062
  fi
2063
else
2064
  # We cannot hardcode anything, or else we can only hardcode existing
2065
  # directories.
2066
  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
2067
fi
2068
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
2069

    
2070
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
2071
  # Fast installation is not supported
2072
  enable_fast_install=no
2073
elif test "$shlibpath_overrides_runpath" = yes ||
2074
     test "$enable_shared" = no; then
2075
  # Fast installation is not necessary
2076
  enable_fast_install=needless
2077
fi
2078
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2079

    
2080

    
2081
# AC_LIBTOOL_SYS_LIB_STRIP
2082
# ------------------------
2083
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2084
[striplib=
2085
old_striplib=
2086
AC_MSG_CHECKING([whether stripping libraries is possible])
2087
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2088
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2089
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2090
  AC_MSG_RESULT([yes])
2091
else
2092
# FIXME - insert some real tests, host_os isn't really good enough
2093
  case $host_os in
2094
   darwin*)
2095
       if test -n "$STRIP" ; then
2096
         striplib="$STRIP -x"
2097
         old_striplib="$STRIP -S"
2098
         AC_MSG_RESULT([yes])
2099
       else
2100
  AC_MSG_RESULT([no])
2101
fi
2102
       ;;
2103
   *)
2104
  AC_MSG_RESULT([no])
2105
    ;;
2106
  esac
2107
fi
2108
])# AC_LIBTOOL_SYS_LIB_STRIP
2109

    
2110

    
2111
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2112
# -----------------------------
2113
# PORTME Fill in your ld.so characteristics
2114
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2115
[AC_REQUIRE([LT_AC_PROG_SED])dnl
2116
AC_MSG_CHECKING([dynamic linker characteristics])
2117
library_names_spec=
2118
libname_spec='lib$name'
2119
soname_spec=
2120
shrext_cmds=".so"
2121
postinstall_cmds=
2122
postuninstall_cmds=
2123
finish_cmds=
2124
finish_eval=
2125
shlibpath_var=
2126
shlibpath_overrides_runpath=unknown
2127
version_type=none
2128
dynamic_linker="$host_os ld.so"
2129
sys_lib_dlsearch_path_spec="/lib /usr/lib"
2130
m4_if($1,[],[
2131
if test "$GCC" = yes; then
2132
  case $host_os in
2133
    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2134
    *) lt_awk_arg="/^libraries:/" ;;
2135
  esac
2136
  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2137
  if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
2138
    # if the path contains ";" then we assume it to be the separator
2139
    # otherwise default to the standard path separator (i.e. ":") - it is
2140
    # assumed that no part of a normal pathname contains ";" but that should
2141
    # okay in the real world where ";" in dirpaths is itself problematic.
2142
    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2143
  else
2144
    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2145
  fi
2146
  # Ok, now we have the path, separated by spaces, we can step through it
2147
  # and add multilib dir if necessary.
2148
  lt_tmp_lt_search_path_spec=
2149
  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2150
  for lt_sys_path in $lt_search_path_spec; do
2151
    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2152
      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2153
    else
2154
      test -d "$lt_sys_path" && \
2155
	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2156
    fi
2157
  done
2158
  lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
2159
BEGIN {RS=" "; FS="/|\n";} {
2160
  lt_foo="";
2161
  lt_count=0;
2162
  for (lt_i = NF; lt_i > 0; lt_i--) {
2163
    if ($lt_i != "" && $lt_i != ".") {
2164
      if ($lt_i == "..") {
2165
        lt_count++;
2166
      } else {
2167
        if (lt_count == 0) {
2168
          lt_foo="/" $lt_i lt_foo;
2169
        } else {
2170
          lt_count--;
2171
        }
2172
      }
2173
    }
2174
  }
2175
  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2176
  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2177
}'`
2178
  sys_lib_search_path_spec=`echo $lt_search_path_spec`
2179
else
2180
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2181
fi])
2182
need_lib_prefix=unknown
2183
hardcode_into_libs=no
2184

    
2185
# when you set need_version to no, make sure it does not cause -set_version
2186
# flags to be left without arguments
2187
need_version=unknown
2188

    
2189
case $host_os in
2190
aix3*)
2191
  version_type=linux
2192
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2193
  shlibpath_var=LIBPATH
2194

    
2195
  # AIX 3 has no versioning support, so we append a major version to the name.
2196
  soname_spec='${libname}${release}${shared_ext}$major'
2197
  ;;
2198

    
2199
aix[[4-9]]*)
2200
  version_type=linux
2201
  need_lib_prefix=no
2202
  need_version=no
2203
  hardcode_into_libs=yes
2204
  if test "$host_cpu" = ia64; then
2205
    # AIX 5 supports IA64
2206
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2207
    shlibpath_var=LD_LIBRARY_PATH
2208
  else
2209
    # With GCC up to 2.95.x, collect2 would create an import file
2210
    # for dependence libraries.  The import file would start with
2211
    # the line `#! .'.  This would cause the generated library to
2212
    # depend on `.', always an invalid library.  This was fixed in
2213
    # development snapshots of GCC prior to 3.0.
2214
    case $host_os in
2215
      aix4 | aix4.[[01]] | aix4.[[01]].*)
2216
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2217
	   echo ' yes '
2218
	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2219
	:
2220
      else
2221
	can_build_shared=no
2222
      fi
2223
      ;;
2224
    esac
2225
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2226
    # soname into executable. Probably we can add versioning support to
2227
    # collect2, so additional links can be useful in future.
2228
    if test "$aix_use_runtimelinking" = yes; then
2229
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2230
      # instead of lib<name>.a to let people know that these are not
2231
      # typical AIX shared libraries.
2232
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2233
    else
2234
      # We preserve .a as extension for shared libraries through AIX4.2
2235
      # and later when we are not doing run time linking.
2236
      library_names_spec='${libname}${release}.a $libname.a'
2237
      soname_spec='${libname}${release}${shared_ext}$major'
2238
    fi
2239
    shlibpath_var=LIBPATH
2240
  fi
2241
  ;;
2242

    
2243
amigaos*)
2244
  library_names_spec='$libname.ixlibrary $libname.a'
2245
  # Create ${libname}_ixlibrary.a entries in /sys/libs.
2246
  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'
2247
  ;;
2248

    
2249
beos*)
2250
  library_names_spec='${libname}${shared_ext}'
2251
  dynamic_linker="$host_os ld.so"
2252
  shlibpath_var=LIBRARY_PATH
2253
  ;;
2254

    
2255
bsdi[[45]]*)
2256
  version_type=linux
2257
  need_version=no
2258
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2259
  soname_spec='${libname}${release}${shared_ext}$major'
2260
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2261
  shlibpath_var=LD_LIBRARY_PATH
2262
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2263
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2264
  # the default ld.so.conf also contains /usr/contrib/lib and
2265
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2266
  # libtool to hard-code these into programs
2267
  ;;
2268

    
2269
cygwin* | mingw* | pw32*)
2270
  version_type=windows
2271
  shrext_cmds=".dll"
2272
  need_version=no
2273
  need_lib_prefix=no
2274

    
2275
  case $GCC,$host_os in
2276
  yes,cygwin* | yes,mingw* | yes,pw32*)
2277
    library_names_spec='$libname.dll.a'
2278
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2279
    postinstall_cmds='base_file=`basename \${file}`~
2280
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2281
      dldir=$destdir/`dirname \$dlpath`~
2282
      test -d \$dldir || mkdir -p \$dldir~
2283
      $install_prog $dir/$dlname \$dldir/$dlname~
2284
      chmod a+x \$dldir/$dlname'
2285
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2286
      dlpath=$dir/\$dldll~
2287
       $rm \$dlpath'
2288
    shlibpath_overrides_runpath=yes
2289

    
2290
    case $host_os in
2291
    cygwin*)
2292
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2293
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2294
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2295
      ;;
2296
    mingw*)
2297
      # MinGW DLLs use traditional 'lib' prefix
2298
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2299
      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2300
      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2301
        # It is most probably a Windows format PATH printed by
2302
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
2303
        # path with ; separators, and with drive letters. We can handle the
2304
        # drive letters (cygwin fileutils understands them), so leave them,
2305
        # especially as we might pass files found there to a mingw objdump,
2306
        # which wouldn't understand a cygwinified path. Ahh.
2307
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2308
      else
2309
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2310
      fi
2311
      ;;
2312
    pw32*)
2313
      # pw32 DLLs use 'pw' prefix rather than 'lib'
2314
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2315
      ;;
2316
    esac
2317
    ;;
2318

    
2319
  *)
2320
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2321
    ;;
2322
  esac
2323
  dynamic_linker='Win32 ld.exe'
2324
  # FIXME: first we should search . and the directory the executable is in
2325
  shlibpath_var=PATH
2326
  ;;
2327

    
2328
darwin* | rhapsody*)
2329
  dynamic_linker="$host_os dyld"
2330
  version_type=darwin
2331
  need_lib_prefix=no
2332
  need_version=no
2333
  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2334
  soname_spec='${libname}${release}${major}$shared_ext'
2335
  shlibpath_overrides_runpath=yes
2336
  shlibpath_var=DYLD_LIBRARY_PATH
2337
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2338
  m4_if([$1], [],[
2339
  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 
2340
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2341
  ;;
2342

    
2343
dgux*)
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
  ;;
2351

    
2352
freebsd1*)
2353
  dynamic_linker=no
2354
  ;;
2355

    
2356
freebsd* | dragonfly*)
2357
  # DragonFly does not have aout.  When/if they implement a new
2358
  # versioning mechanism, adjust this.
2359
  if test -x /usr/bin/objformat; then
2360
    objformat=`/usr/bin/objformat`
2361
  else
2362
    case $host_os in
2363
    freebsd[[123]]*) objformat=aout ;;
2364
    *) objformat=elf ;;
2365
    esac
2366
  fi
2367
  version_type=freebsd-$objformat
2368
  case $version_type in
2369
    freebsd-elf*)
2370
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2371
      need_version=no
2372
      need_lib_prefix=no
2373
      ;;
2374
    freebsd-*)
2375
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2376
      need_version=yes
2377
      ;;
2378
  esac
2379
  shlibpath_var=LD_LIBRARY_PATH
2380
  case $host_os in
2381
  freebsd2*)
2382
    shlibpath_overrides_runpath=yes
2383
    ;;
2384
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2385
    shlibpath_overrides_runpath=yes
2386
    hardcode_into_libs=yes
2387
    ;;
2388
  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2389
  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2390
    shlibpath_overrides_runpath=no
2391
    hardcode_into_libs=yes
2392
    ;;
2393
  *) # from 4.6 on, and DragonFly
2394
    shlibpath_overrides_runpath=yes
2395
    hardcode_into_libs=yes
2396
    ;;
2397
  esac
2398
  ;;
2399

    
2400
gnu*)
2401
  version_type=linux
2402
  need_lib_prefix=no
2403
  need_version=no
2404
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2405
  soname_spec='${libname}${release}${shared_ext}$major'
2406
  shlibpath_var=LD_LIBRARY_PATH
2407
  hardcode_into_libs=yes
2408
  ;;
2409

    
2410
hpux9* | hpux10* | hpux11*)
2411
  # Give a soname corresponding to the major version so that dld.sl refuses to
2412
  # link against other versions.
2413
  version_type=sunos
2414
  need_lib_prefix=no
2415
  need_version=no
2416
  case $host_cpu in
2417
  ia64*)
2418
    shrext_cmds='.so'
2419
    hardcode_into_libs=yes
2420
    dynamic_linker="$host_os dld.so"
2421
    shlibpath_var=LD_LIBRARY_PATH
2422
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2423
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2424
    soname_spec='${libname}${release}${shared_ext}$major'
2425
    if test "X$HPUX_IA64_MODE" = X32; then
2426
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2427
    else
2428
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2429
    fi
2430
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2431
    ;;
2432
   hppa*64*)
2433
     shrext_cmds='.sl'
2434
     hardcode_into_libs=yes
2435
     dynamic_linker="$host_os dld.sl"
2436
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2437
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2438
     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2439
     soname_spec='${libname}${release}${shared_ext}$major'
2440
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2441
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2442
     ;;
2443
   *)
2444
    shrext_cmds='.sl'
2445
    dynamic_linker="$host_os dld.sl"
2446
    shlibpath_var=SHLIB_PATH
2447
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2448
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2449
    soname_spec='${libname}${release}${shared_ext}$major'
2450
    ;;
2451
  esac
2452
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
2453
  postinstall_cmds='chmod 555 $lib'
2454
  ;;
2455

    
2456
interix[[3-9]]*)
2457
  version_type=linux
2458
  need_lib_prefix=no
2459
  need_version=no
2460
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2461
  soname_spec='${libname}${release}${shared_ext}$major'
2462
  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2463
  shlibpath_var=LD_LIBRARY_PATH
2464
  shlibpath_overrides_runpath=no
2465
  hardcode_into_libs=yes
2466
  ;;
2467

    
2468
irix5* | irix6* | nonstopux*)
2469
  case $host_os in
2470
    nonstopux*) version_type=nonstopux ;;
2471
    *)
2472
	if test "$lt_cv_prog_gnu_ld" = yes; then
2473
		version_type=linux
2474
	else
2475
		version_type=irix
2476
	fi ;;
2477
  esac
2478
  need_lib_prefix=no
2479
  need_version=no
2480
  soname_spec='${libname}${release}${shared_ext}$major'
2481
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2482
  case $host_os in
2483
  irix5* | nonstopux*)
2484
    libsuff= shlibsuff=
2485
    ;;
2486
  *)
2487
    case $LD in # libtool.m4 will add one of these switches to LD
2488
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2489
      libsuff= shlibsuff= libmagic=32-bit;;
2490
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2491
      libsuff=32 shlibsuff=N32 libmagic=N32;;
2492
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2493
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
2494
    *) libsuff= shlibsuff= libmagic=never-match;;
2495
    esac
2496
    ;;
2497
  esac
2498
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2499
  shlibpath_overrides_runpath=no
2500
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2501
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2502
  hardcode_into_libs=yes
2503
  ;;
2504

    
2505
# No shared lib support for Linux oldld, aout, or coff.
2506
linux*oldld* | linux*aout* | linux*coff*)
2507
  dynamic_linker=no
2508
  ;;
2509

    
2510
# This must be Linux ELF.
2511
linux* | k*bsd*-gnu)
2512
  version_type=linux
2513
  need_lib_prefix=no
2514
  need_version=no
2515
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2516
  soname_spec='${libname}${release}${shared_ext}$major'
2517
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2518
  shlibpath_var=LD_LIBRARY_PATH
2519
  shlibpath_overrides_runpath=no
2520
  # This implies no fast_install, which is unacceptable.
2521
  # Some rework will be needed to allow for fast_install
2522
  # before this can be enabled.
2523
  hardcode_into_libs=yes
2524

    
2525
  # Append ld.so.conf contents to the search path
2526
  if test -f /etc/ld.so.conf; then
2527
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ 	]*hwcap[ 	]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
2528
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2529
  fi
2530

    
2531
  # We used to test for /lib/ld.so.1 and disable shared libraries on
2532
  # powerpc, because MkLinux only supported shared libraries with the
2533
  # GNU dynamic linker.  Since this was broken with cross compilers,
2534
  # most powerpc-linux boxes support dynamic linking these days and
2535
  # people can always --disable-shared, the test was removed, and we
2536
  # assume the GNU/Linux dynamic linker is in use.
2537
  dynamic_linker='GNU/Linux ld.so'
2538
  ;;
2539

    
2540
netbsdelf*-gnu)
2541
  version_type=linux
2542
  need_lib_prefix=no
2543
  need_version=no
2544
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2545
  soname_spec='${libname}${release}${shared_ext}$major'
2546
  shlibpath_var=LD_LIBRARY_PATH
2547
  shlibpath_overrides_runpath=no
2548
  hardcode_into_libs=yes
2549
  dynamic_linker='NetBSD ld.elf_so'
2550
  ;;
2551

    
2552
netbsd*)
2553
  version_type=sunos
2554
  need_lib_prefix=no
2555
  need_version=no
2556
  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2557
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2558
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2559
    dynamic_linker='NetBSD (a.out) ld.so'
2560
  else
2561
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2562
    soname_spec='${libname}${release}${shared_ext}$major'
2563
    dynamic_linker='NetBSD ld.elf_so'
2564
  fi
2565
  shlibpath_var=LD_LIBRARY_PATH
2566
  shlibpath_overrides_runpath=yes
2567
  hardcode_into_libs=yes
2568
  ;;
2569

    
2570
newsos6)
2571
  version_type=linux
2572
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2573
  shlibpath_var=LD_LIBRARY_PATH
2574
  shlibpath_overrides_runpath=yes
2575
  ;;
2576

    
2577
nto-qnx*)
2578
  version_type=linux
2579
  need_lib_prefix=no
2580
  need_version=no
2581
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2582
  soname_spec='${libname}${release}${shared_ext}$major'
2583
  shlibpath_var=LD_LIBRARY_PATH
2584
  shlibpath_overrides_runpath=yes
2585
  ;;
2586

    
2587
openbsd*)
2588
  version_type=sunos
2589
  sys_lib_dlsearch_path_spec="/usr/lib"
2590
  need_lib_prefix=no
2591
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2592
  case $host_os in
2593
    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2594
    *)                         need_version=no  ;;
2595
  esac
2596
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2597
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2598
  shlibpath_var=LD_LIBRARY_PATH
2599
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2600
    case $host_os in
2601
      openbsd2.[[89]] | openbsd2.[[89]].*)
2602
	shlibpath_overrides_runpath=no
2603
	;;
2604
      *)
2605
	shlibpath_overrides_runpath=yes
2606
	;;
2607
      esac
2608
  else
2609
    shlibpath_overrides_runpath=yes
2610
  fi
2611
  ;;
2612

    
2613
os2*)
2614
  libname_spec='$name'
2615
  shrext_cmds=".dll"
2616
  need_lib_prefix=no
2617
  library_names_spec='$libname${shared_ext} $libname.a'
2618
  dynamic_linker='OS/2 ld.exe'
2619
  shlibpath_var=LIBPATH
2620
  ;;
2621

    
2622
osf3* | osf4* | osf5*)
2623
  version_type=osf
2624
  need_lib_prefix=no
2625
  need_version=no
2626
  soname_spec='${libname}${release}${shared_ext}$major'
2627
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2628
  shlibpath_var=LD_LIBRARY_PATH
2629
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2630
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2631
  ;;
2632

    
2633
rdos*)
2634
  dynamic_linker=no
2635
  ;;
2636

    
2637
solaris*)
2638
  version_type=linux
2639
  need_lib_prefix=no
2640
  need_version=no
2641
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2642
  soname_spec='${libname}${release}${shared_ext}$major'
2643
  shlibpath_var=LD_LIBRARY_PATH
2644
  shlibpath_overrides_runpath=yes
2645
  hardcode_into_libs=yes
2646
  # ldd complains unless libraries are executable
2647
  postinstall_cmds='chmod +x $lib'
2648
  ;;
2649

    
2650
sunos4*)
2651
  version_type=sunos
2652
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2653
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2654
  shlibpath_var=LD_LIBRARY_PATH
2655
  shlibpath_overrides_runpath=yes
2656
  if test "$with_gnu_ld" = yes; then
2657
    need_lib_prefix=no
2658
  fi
2659
  need_version=yes
2660
  ;;
2661

    
2662
sysv4 | sysv4.3*)
2663
  version_type=linux
2664
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2665
  soname_spec='${libname}${release}${shared_ext}$major'
2666
  shlibpath_var=LD_LIBRARY_PATH
2667
  case $host_vendor in
2668
    sni)
2669
      shlibpath_overrides_runpath=no
2670
      need_lib_prefix=no
2671
      export_dynamic_flag_spec='${wl}-Blargedynsym'
2672
      runpath_var=LD_RUN_PATH
2673
      ;;
2674
    siemens)
2675
      need_lib_prefix=no
2676
      ;;
2677
    motorola)
2678
      need_lib_prefix=no
2679
      need_version=no
2680
      shlibpath_overrides_runpath=no
2681
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2682
      ;;
2683
  esac
2684
  ;;
2685

    
2686
sysv4*MP*)
2687
  if test -d /usr/nec ;then
2688
    version_type=linux
2689
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2690
    soname_spec='$libname${shared_ext}.$major'
2691
    shlibpath_var=LD_LIBRARY_PATH
2692
  fi
2693
  ;;
2694

    
2695
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2696
  version_type=freebsd-elf
2697
  need_lib_prefix=no
2698
  need_version=no
2699
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2700
  soname_spec='${libname}${release}${shared_ext}$major'
2701
  shlibpath_var=LD_LIBRARY_PATH
2702
  hardcode_into_libs=yes
2703
  if test "$with_gnu_ld" = yes; then
2704
    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2705
    shlibpath_overrides_runpath=no
2706
  else
2707
    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2708
    shlibpath_overrides_runpath=yes
2709
    case $host_os in
2710
      sco3.2v5*)
2711
        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2712
	;;
2713
    esac
2714
  fi
2715
  sys_lib_dlsearch_path_spec='/usr/lib'
2716
  ;;
2717

    
2718
uts4*)
2719
  version_type=linux
2720
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2721
  soname_spec='${libname}${release}${shared_ext}$major'
2722
  shlibpath_var=LD_LIBRARY_PATH
2723
  ;;
2724

    
2725
*)
2726
  dynamic_linker=no
2727
  ;;
2728
esac
2729
AC_MSG_RESULT([$dynamic_linker])
2730
test "$dynamic_linker" = no && can_build_shared=no
2731

    
2732
AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
2733
[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
2734
sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2735
AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
2736
[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
2737
sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2738

    
2739
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2740
if test "$GCC" = yes; then
2741
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2742
fi
2743
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2744

    
2745

    
2746
# _LT_AC_TAGCONFIG
2747
# ----------------
2748
AC_DEFUN([_LT_AC_TAGCONFIG],
2749
[AC_REQUIRE([LT_AC_PROG_SED])dnl
2750
AC_ARG_WITH([tags],
2751
    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2752
        [include additional configurations @<:@automatic@:>@])],
2753
    [tagnames="$withval"])
2754

    
2755
if test -f "$ltmain" && test -n "$tagnames"; then
2756
  if test ! -f "${ofile}"; then
2757
    AC_MSG_WARN([output file `$ofile' does not exist])
2758
  fi
2759

    
2760
  if test -z "$LTCC"; then
2761
    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2762
    if test -z "$LTCC"; then
2763
      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2764
    else
2765
      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2766
    fi
2767
  fi
2768
  if test -z "$LTCFLAGS"; then
2769
    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
2770
  fi
2771

    
2772
  # Extract list of available tagged configurations in $ofile.
2773
  # Note that this assumes the entire list is on one line.
2774
  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2775

    
2776
  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2777
  for tagname in $tagnames; do
2778
    IFS="$lt_save_ifs"
2779
    # Check whether tagname contains only valid characters
2780
    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2781
    "") ;;
2782
    *)  AC_MSG_ERROR([invalid tag name: $tagname])
2783
	;;
2784
    esac
2785

    
2786
    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2787
    then
2788
      AC_MSG_ERROR([tag name \"$tagname\" already exists])
2789
    fi
2790

    
2791
    # Update the list of available tags.
2792
    if test -n "$tagname"; then
2793
      echo appending configuration tag \"$tagname\" to $ofile
2794

    
2795
      case $tagname in
2796
      CXX)
2797
	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2798
	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2799
	    (test "X$CXX" != "Xg++"))) ; then
2800
	  AC_LIBTOOL_LANG_CXX_CONFIG
2801
	else
2802
	  tagname=""
2803
	fi
2804
	;;
2805

    
2806
      F77)
2807
	if test -n "$F77" && test "X$F77" != "Xno"; then
2808
	  AC_LIBTOOL_LANG_F77_CONFIG
2809
	else
2810
	  tagname=""
2811
	fi
2812
	;;
2813

    
2814
      GCJ)
2815
	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2816
	  AC_LIBTOOL_LANG_GCJ_CONFIG
2817
	else
2818
	  tagname=""
2819
	fi
2820
	;;
2821

    
2822
      RC)
2823
	AC_LIBTOOL_LANG_RC_CONFIG
2824
	;;
2825

    
2826
      *)
2827
	AC_MSG_ERROR([Unsupported tag name: $tagname])
2828
	;;
2829
      esac
2830

    
2831
      # Append the new tag name to the list of available tags.
2832
      if test -n "$tagname" ; then
2833
      available_tags="$available_tags $tagname"
2834
    fi
2835
    fi
2836
  done
2837
  IFS="$lt_save_ifs"
2838

    
2839
  # Now substitute the updated list of available tags.
2840
  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2841
    mv "${ofile}T" "$ofile"
2842
    chmod +x "$ofile"
2843
  else
2844
    rm -f "${ofile}T"
2845
    AC_MSG_ERROR([unable to update list of available tagged configurations.])
2846
  fi
2847
fi
2848
])# _LT_AC_TAGCONFIG
2849

    
2850

    
2851
# AC_LIBTOOL_DLOPEN
2852
# -----------------
2853
# enable checks for dlopen support
2854
AC_DEFUN([AC_LIBTOOL_DLOPEN],
2855
 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2856
])# AC_LIBTOOL_DLOPEN
2857

    
2858

    
2859
# AC_LIBTOOL_WIN32_DLL
2860
# --------------------
2861
# declare package support for building win32 DLLs
2862
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2863
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2864
])# AC_LIBTOOL_WIN32_DLL
2865

    
2866

    
2867
# AC_ENABLE_SHARED([DEFAULT])
2868
# ---------------------------
2869
# implement the --enable-shared flag
2870
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2871
AC_DEFUN([AC_ENABLE_SHARED],
2872
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2873
AC_ARG_ENABLE([shared],
2874
    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2875
	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2876
    [p=${PACKAGE-default}
2877
    case $enableval in
2878
    yes) enable_shared=yes ;;
2879
    no) enable_shared=no ;;
2880
    *)
2881
      enable_shared=no
2882
      # Look at the argument we got.  We use all the common list separators.
2883
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2884
      for pkg in $enableval; do
2885
	IFS="$lt_save_ifs"
2886
	if test "X$pkg" = "X$p"; then
2887
	  enable_shared=yes
2888
	fi
2889
      done
2890
      IFS="$lt_save_ifs"
2891
      ;;
2892
    esac],
2893
    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2894
])# AC_ENABLE_SHARED
2895

    
2896

    
2897
# AC_DISABLE_SHARED
2898
# -----------------
2899
# set the default shared flag to --disable-shared
2900
AC_DEFUN([AC_DISABLE_SHARED],
2901
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2902
AC_ENABLE_SHARED(no)
2903
])# AC_DISABLE_SHARED
2904

    
2905

    
2906
# AC_ENABLE_STATIC([DEFAULT])
2907
# ---------------------------
2908
# implement the --enable-static flag
2909
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2910
AC_DEFUN([AC_ENABLE_STATIC],
2911
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2912
AC_ARG_ENABLE([static],
2913
    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2914
	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2915
    [p=${PACKAGE-default}
2916
    case $enableval in
2917
    yes) enable_static=yes ;;
2918
    no) enable_static=no ;;
2919
    *)
2920
     enable_static=no
2921
      # Look at the argument we got.  We use all the common list separators.
2922
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2923
      for pkg in $enableval; do
2924
	IFS="$lt_save_ifs"
2925
	if test "X$pkg" = "X$p"; then
2926
	  enable_static=yes
2927
	fi
2928
      done
2929
      IFS="$lt_save_ifs"
2930
      ;;
2931
    esac],
2932
    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2933
])# AC_ENABLE_STATIC
2934

    
2935

    
2936
# AC_DISABLE_STATIC
2937
# -----------------
2938
# set the default static flag to --disable-static
2939
AC_DEFUN([AC_DISABLE_STATIC],
2940
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2941
AC_ENABLE_STATIC(no)
2942
])# AC_DISABLE_STATIC
2943

    
2944

    
2945
# AC_ENABLE_FAST_INSTALL([DEFAULT])
2946
# ---------------------------------
2947
# implement the --enable-fast-install flag
2948
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2949
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2950
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2951
AC_ARG_ENABLE([fast-install],
2952
    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2953
    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2954
    [p=${PACKAGE-default}
2955
    case $enableval in
2956
    yes) enable_fast_install=yes ;;
2957
    no) enable_fast_install=no ;;
2958
    *)
2959
      enable_fast_install=no
2960
      # Look at the argument we got.  We use all the common list separators.
2961
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2962
      for pkg in $enableval; do
2963
	IFS="$lt_save_ifs"
2964
	if test "X$pkg" = "X$p"; then
2965
	  enable_fast_install=yes
2966
	fi
2967
      done
2968
      IFS="$lt_save_ifs"
2969
      ;;
2970
    esac],
2971
    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2972
])# AC_ENABLE_FAST_INSTALL
2973

    
2974

    
2975
# AC_DISABLE_FAST_INSTALL
2976
# -----------------------
2977
# set the default to --disable-fast-install
2978
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2979
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2980
AC_ENABLE_FAST_INSTALL(no)
2981
])# AC_DISABLE_FAST_INSTALL
2982

    
2983

    
2984
# AC_LIBTOOL_PICMODE([MODE])
2985
# --------------------------
2986
# implement the --with-pic flag
2987
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
2988
AC_DEFUN([AC_LIBTOOL_PICMODE],
2989
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2990
pic_mode=ifelse($#,1,$1,default)
2991
])# AC_LIBTOOL_PICMODE
2992

    
2993

    
2994
# AC_PROG_EGREP
2995
# -------------
2996
# This is predefined starting with Autoconf 2.54, so this conditional
2997
# definition can be removed once we require Autoconf 2.54 or later.
2998
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2999
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
3000
   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3001
    then ac_cv_prog_egrep='grep -E'
3002
    else ac_cv_prog_egrep='egrep'
3003
    fi])
3004
 EGREP=$ac_cv_prog_egrep
3005
 AC_SUBST([EGREP])
3006
])])
3007

    
3008

    
3009
# AC_PATH_TOOL_PREFIX
3010
# -------------------
3011
# find a file program which can recognize shared library
3012
AC_DEFUN([AC_PATH_TOOL_PREFIX],
3013
[AC_REQUIRE([AC_PROG_EGREP])dnl
3014
AC_MSG_CHECKING([for $1])
3015
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3016
[case $MAGIC_CMD in
3017
[[\\/*] |  ?:[\\/]*])
3018
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3019
  ;;
3020
*)
3021
  lt_save_MAGIC_CMD="$MAGIC_CMD"
3022
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3023
dnl $ac_dummy forces splitting on constant user-supplied paths.
3024
dnl POSIX.2 word splitting is done only on the output of word expansions,
3025
dnl not every word.  This closes a longstanding sh security hole.
3026
  ac_dummy="ifelse([$2], , $PATH, [$2])"
3027
  for ac_dir in $ac_dummy; do
3028
    IFS="$lt_save_ifs"
3029
    test -z "$ac_dir" && ac_dir=.
3030
    if test -f $ac_dir/$1; then
3031
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3032
      if test -n "$file_magic_test_file"; then
3033
	case $deplibs_check_method in
3034
	"file_magic "*)
3035
	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3036
	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3037
	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3038
	    $EGREP "$file_magic_regex" > /dev/null; then
3039
	    :
3040
	  else
3041
	    cat <<EOF 1>&2
3042

    
3043
*** Warning: the command libtool uses to detect shared libraries,
3044
*** $file_magic_cmd, produces output that libtool cannot recognize.
3045
*** The result is that libtool may fail to recognize shared libraries
3046
*** as such.  This will affect the creation of libtool libraries that
3047
*** depend on shared libraries, but programs linked with such libtool
3048
*** libraries will work regardless of this problem.  Nevertheless, you
3049
*** may want to report the problem to your system manager and/or to
3050
*** bug-libtool@gnu.org
3051

    
3052
EOF
3053
	  fi ;;
3054
	esac
3055
      fi
3056
      break
3057
    fi
3058
  done
3059
  IFS="$lt_save_ifs"
3060
  MAGIC_CMD="$lt_save_MAGIC_CMD"
3061
  ;;
3062
esac])
3063
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3064
if test -n "$MAGIC_CMD"; then
3065
  AC_MSG_RESULT($MAGIC_CMD)
3066
else
3067
  AC_MSG_RESULT(no)
3068
fi
3069
])# AC_PATH_TOOL_PREFIX
3070

    
3071

    
3072
# AC_PATH_MAGIC
3073
# -------------
3074
# find a file program which can recognize a shared library
3075
AC_DEFUN([AC_PATH_MAGIC],
3076
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3077
if test -z "$lt_cv_path_MAGIC_CMD"; then
3078
  if test -n "$ac_tool_prefix"; then
3079
    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3080
  else
3081
    MAGIC_CMD=:
3082
  fi
3083
fi
3084
])# AC_PATH_MAGIC
3085

    
3086

    
3087
# AC_PROG_LD
3088
# ----------
3089
# find the pathname to the GNU or non-GNU linker
3090
AC_DEFUN([AC_PROG_LD],
3091
[AC_ARG_WITH([gnu-ld],
3092
    [AC_HELP_STRING([--with-gnu-ld],
3093
	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3094
    [test "$withval" = no || with_gnu_ld=yes],
3095
    [with_gnu_ld=no])
3096
AC_REQUIRE([LT_AC_PROG_SED])dnl
3097
AC_REQUIRE([AC_PROG_CC])dnl
3098
AC_REQUIRE([AC_CANONICAL_HOST])dnl
3099
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3100
ac_prog=ld
3101
if test "$GCC" = yes; then
3102
  # Check if gcc -print-prog-name=ld gives a path.
3103
  AC_MSG_CHECKING([for ld used by $CC])
3104
  case $host in
3105
  *-*-mingw*)
3106
    # gcc leaves a trailing carriage return which upsets mingw
3107
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3108
  *)
3109
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3110
  esac
3111
  case $ac_prog in
3112
    # Accept absolute paths.
3113
    [[\\/]]* | ?:[[\\/]]*)
3114
      re_direlt='/[[^/]][[^/]]*/\.\./'
3115
      # Canonicalize the pathname of ld
3116
      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
3117
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3118
	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
3119
      done
3120
      test -z "$LD" && LD="$ac_prog"
3121
      ;;
3122
  "")
3123
    # If it fails, then pretend we aren't using GCC.
3124
    ac_prog=ld
3125
    ;;
3126
  *)
3127
    # If it is relative, then search for the first ld in PATH.
3128
    with_gnu_ld=unknown
3129
    ;;
3130
  esac
3131
elif test "$with_gnu_ld" = yes; then
3132
  AC_MSG_CHECKING([for GNU ld])
3133
else
3134
  AC_MSG_CHECKING([for non-GNU ld])
3135
fi
3136
AC_CACHE_VAL(lt_cv_path_LD,
3137
[if test -z "$LD"; then
3138
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3139
  for ac_dir in $PATH; do
3140
    IFS="$lt_save_ifs"
3141
    test -z "$ac_dir" && ac_dir=.
3142
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3143
      lt_cv_path_LD="$ac_dir/$ac_prog"
3144
      # Check to see if the program is GNU ld.  I'd rather use --version,
3145
      # but apparently some variants of GNU ld only accept -v.
3146
      # Break only if it was the GNU/non-GNU ld that we prefer.
3147
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3148
      *GNU* | *'with BFD'*)
3149
	test "$with_gnu_ld" != no && break
3150
	;;
3151
      *)
3152
	test "$with_gnu_ld" != yes && break
3153
	;;
3154
      esac
3155
    fi
3156
  done
3157
  IFS="$lt_save_ifs"
3158
else
3159
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
3160
fi])
3161
LD="$lt_cv_path_LD"
3162
if test -n "$LD"; then
3163
  AC_MSG_RESULT($LD)
3164
else
3165
  AC_MSG_RESULT(no)
3166
fi
3167
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3168
AC_PROG_LD_GNU
3169
])# AC_PROG_LD
3170

    
3171

    
3172
# AC_PROG_LD_GNU
3173
# --------------
3174
AC_DEFUN([AC_PROG_LD_GNU],
3175
[AC_REQUIRE([AC_PROG_EGREP])dnl
3176
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3177
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3178
case `$LD -v 2>&1 </dev/null` in
3179
*GNU* | *'with BFD'*)
3180
  lt_cv_prog_gnu_ld=yes
3181
  ;;
3182
*)
3183
  lt_cv_prog_gnu_ld=no
3184
  ;;
3185
esac])
3186
with_gnu_ld=$lt_cv_prog_gnu_ld
3187
])# AC_PROG_LD_GNU
3188

    
3189

    
3190
# AC_PROG_LD_RELOAD_FLAG
3191
# ----------------------
3192
# find reload flag for linker
3193
#   -- PORTME Some linkers may need a different reload flag.
3194
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3195
[AC_CACHE_CHECK([for $LD option to reload object files],
3196
  lt_cv_ld_reload_flag,
3197
  [lt_cv_ld_reload_flag='-r'])
3198
reload_flag=$lt_cv_ld_reload_flag
3199
case $reload_flag in
3200
"" | " "*) ;;
3201
*) reload_flag=" $reload_flag" ;;
3202
esac
3203
reload_cmds='$LD$reload_flag -o $output$reload_objs'
3204
case $host_os in
3205
  darwin*)
3206
    if test "$GCC" = yes; then
3207
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3208
    else
3209
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
3210
    fi
3211
    ;;
3212
esac
3213
])# AC_PROG_LD_RELOAD_FLAG
3214

    
3215

    
3216
# AC_DEPLIBS_CHECK_METHOD
3217
# -----------------------
3218
# how to check for library dependencies
3219
#  -- PORTME fill in with the dynamic library characteristics
3220
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3221
[AC_CACHE_CHECK([how to recognize dependent libraries],
3222
lt_cv_deplibs_check_method,
3223
[lt_cv_file_magic_cmd='$MAGIC_CMD'
3224
lt_cv_file_magic_test_file=
3225
lt_cv_deplibs_check_method='unknown'
3226
# Need to set the preceding variable on all platforms that support
3227
# interlibrary dependencies.
3228
# 'none' -- dependencies not supported.
3229
# `unknown' -- same as none, but documents that we really don't know.
3230
# 'pass_all' -- all dependencies passed with no checks.
3231
# 'test_compile' -- check by making test program.
3232
# 'file_magic [[regex]]' -- check by looking for files in library path
3233
# which responds to the $file_magic_cmd with a given extended regex.
3234
# If you have `file' or equivalent on your system and you're not sure
3235
# whether `pass_all' will *always* work, you probably want this one.
3236

    
3237
case $host_os in
3238
aix[[4-9]]*)
3239
  lt_cv_deplibs_check_method=pass_all
3240
  ;;
3241

    
3242
beos*)
3243
  lt_cv_deplibs_check_method=pass_all
3244
  ;;
3245

    
3246
bsdi[[45]]*)
3247
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3248
  lt_cv_file_magic_cmd='/usr/bin/file -L'
3249
  lt_cv_file_magic_test_file=/shlib/libc.so
3250
  ;;
3251

    
3252
cygwin*)
3253
  # func_win32_libid is a shell function defined in ltmain.sh
3254
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3255
  lt_cv_file_magic_cmd='func_win32_libid'
3256
  ;;
3257

    
3258
mingw* | pw32*)
3259
  # Base MSYS/MinGW do not provide the 'file' command needed by
3260
  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3261
  # unless we find 'file', for example because we are cross-compiling.
3262
  if ( file / ) >/dev/null 2>&1; then
3263
    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3264
    lt_cv_file_magic_cmd='func_win32_libid'
3265
  else
3266
    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3267
    lt_cv_file_magic_cmd='$OBJDUMP -f'
3268
  fi
3269
  ;;
3270

    
3271
darwin* | rhapsody*)
3272
  lt_cv_deplibs_check_method=pass_all
3273
  ;;
3274

    
3275
freebsd* | dragonfly*)
3276
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3277
    case $host_cpu in
3278
    i*86 )
3279
      # Not sure whether the presence of OpenBSD here was a mistake.
3280
      # Let's accept both of them until this is cleared up.
3281
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3282
      lt_cv_file_magic_cmd=/usr/bin/file
3283
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3284
      ;;
3285
    esac
3286
  else
3287
    lt_cv_deplibs_check_method=pass_all
3288
  fi
3289
  ;;
3290

    
3291
gnu*)
3292
  lt_cv_deplibs_check_method=pass_all
3293
  ;;
3294

    
3295
hpux10.20* | hpux11*)
3296
  lt_cv_file_magic_cmd=/usr/bin/file
3297
  case $host_cpu in
3298
  ia64*)
3299
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3300
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3301
    ;;
3302
  hppa*64*)
3303
    [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]']
3304
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3305
    ;;
3306
  *)
3307
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3308
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3309
    ;;
3310
  esac
3311
  ;;
3312

    
3313
interix[[3-9]]*)
3314
  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3315
  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3316
  ;;
3317

    
3318
irix5* | irix6* | nonstopux*)
3319
  case $LD in
3320
  *-32|*"-32 ") libmagic=32-bit;;
3321
  *-n32|*"-n32 ") libmagic=N32;;
3322
  *-64|*"-64 ") libmagic=64-bit;;
3323
  *) libmagic=never-match;;
3324
  esac
3325
  lt_cv_deplibs_check_method=pass_all
3326
  ;;
3327

    
3328
# This must be Linux ELF.
3329
linux* | k*bsd*-gnu)
3330
  lt_cv_deplibs_check_method=pass_all
3331
  ;;
3332

    
3333
netbsd* | netbsdelf*-gnu)
3334
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3335
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3336
  else
3337
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3338
  fi
3339
  ;;
3340

    
3341
newos6*)
3342
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3343
  lt_cv_file_magic_cmd=/usr/bin/file
3344
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3345
  ;;
3346

    
3347
nto-qnx*)
3348
  lt_cv_deplibs_check_method=unknown
3349
  ;;
3350

    
3351
openbsd*)
3352
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3353
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3354
  else
3355
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3356
  fi
3357
  ;;
3358

    
3359
osf3* | osf4* | osf5*)
3360
  lt_cv_deplibs_check_method=pass_all
3361
  ;;
3362

    
3363
rdos*)
3364
  lt_cv_deplibs_check_method=pass_all
3365
  ;;
3366

    
3367
solaris*)
3368
  lt_cv_deplibs_check_method=pass_all
3369
  ;;
3370

    
3371
sysv4 | sysv4.3*)
3372
  case $host_vendor in
3373
  motorola)
3374
    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]]'
3375
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3376
    ;;
3377
  ncr)
3378
    lt_cv_deplibs_check_method=pass_all
3379
    ;;
3380
  sequent)
3381
    lt_cv_file_magic_cmd='/bin/file'
3382
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3383
    ;;
3384
  sni)
3385
    lt_cv_file_magic_cmd='/bin/file'
3386
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3387
    lt_cv_file_magic_test_file=/lib/libc.so
3388
    ;;
3389
  siemens)
3390
    lt_cv_deplibs_check_method=pass_all
3391
    ;;
3392
  pc)
3393
    lt_cv_deplibs_check_method=pass_all
3394
    ;;
3395
  esac
3396
  ;;
3397

    
3398
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3399
  lt_cv_deplibs_check_method=pass_all
3400
  ;;
3401
esac
3402
])
3403
file_magic_cmd=$lt_cv_file_magic_cmd
3404
deplibs_check_method=$lt_cv_deplibs_check_method
3405
test -z "$deplibs_check_method" && deplibs_check_method=unknown
3406
])# AC_DEPLIBS_CHECK_METHOD
3407

    
3408

    
3409
# AC_PROG_NM
3410
# ----------
3411
# find the pathname to a BSD-compatible name lister
3412
AC_DEFUN([AC_PROG_NM],
3413
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3414
[if test -n "$NM"; then
3415
  # Let the user override the test.
3416
  lt_cv_path_NM="$NM"
3417
else
3418
  lt_nm_to_check="${ac_tool_prefix}nm"
3419
  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3420
    lt_nm_to_check="$lt_nm_to_check nm"
3421
  fi
3422
  for lt_tmp_nm in $lt_nm_to_check; do
3423
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3424
    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3425
      IFS="$lt_save_ifs"
3426
      test -z "$ac_dir" && ac_dir=.
3427
      tmp_nm="$ac_dir/$lt_tmp_nm"
3428
      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3429
	# Check to see if the nm accepts a BSD-compat flag.
3430
	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3431
	#   nm: unknown option "B" ignored
3432
	# Tru64's nm complains that /dev/null is an invalid object file
3433
	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3434
	*/dev/null* | *'Invalid file or object type'*)
3435
	  lt_cv_path_NM="$tmp_nm -B"
3436
	  break
3437
	  ;;
3438
	*)
3439
	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3440
	  */dev/null*)
3441
	    lt_cv_path_NM="$tmp_nm -p"
3442
	    break
3443
	    ;;
3444
	  *)
3445
	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3446
	    continue # so that we can try to find one that supports BSD flags
3447
	    ;;
3448
	  esac
3449
	  ;;
3450
	esac
3451
      fi
3452
    done
3453
    IFS="$lt_save_ifs"
3454
  done
3455
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3456
fi])
3457
NM="$lt_cv_path_NM"
3458
])# AC_PROG_NM
3459

    
3460

    
3461
# AC_CHECK_LIBM
3462
# -------------
3463
# check for math library
3464
AC_DEFUN([AC_CHECK_LIBM],
3465
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3466
LIBM=
3467
case $host in
3468
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3469
  # These system don't have libm, or don't need it
3470
  ;;
3471
*-ncr-sysv4.3*)
3472
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3473
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3474
  ;;
3475
*)
3476
  AC_CHECK_LIB(m, cos, LIBM="-lm")
3477
  ;;
3478
esac
3479
])# AC_CHECK_LIBM
3480

    
3481

    
3482
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3483
# -----------------------------------
3484
# sets LIBLTDL to the link flags for the libltdl convenience library and
3485
# LTDLINCL to the include flags for the libltdl header and adds
3486
# --enable-ltdl-convenience to the configure arguments.  Note that
3487
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
3488
# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
3489
# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
3490
# (note the single quotes!).  If your package is not flat and you're not
3491
# using automake, define top_builddir and top_srcdir appropriately in
3492
# the Makefiles.
3493
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3494
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3495
  case $enable_ltdl_convenience in
3496
  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3497
  "") enable_ltdl_convenience=yes
3498
      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3499
  esac
3500
  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3501
  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3502
  # For backwards non-gettext consistent compatibility...
3503
  INCLTDL="$LTDLINCL"
3504
])# AC_LIBLTDL_CONVENIENCE
3505

    
3506

    
3507
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3508
# -----------------------------------
3509
# sets LIBLTDL to the link flags for the libltdl installable library and
3510
# LTDLINCL to the include flags for the libltdl header and adds
3511
# --enable-ltdl-install to the configure arguments.  Note that
3512
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
3513
# and an installed libltdl is not found, it is assumed to be `libltdl'.
3514
# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
3515
# '${top_srcdir}/' (note the single quotes!).  If your package is not
3516
# flat and you're not using automake, define top_builddir and top_srcdir
3517
# appropriately in the Makefiles.
3518
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3519
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3520
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3521
  AC_CHECK_LIB(ltdl, lt_dlinit,
3522
  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3523
  [if test x"$enable_ltdl_install" = xno; then
3524
     AC_MSG_WARN([libltdl not installed, but installation disabled])
3525
   else
3526
     enable_ltdl_install=yes
3527
   fi
3528
  ])
3529
  if test x"$enable_ltdl_install" = x"yes"; then
3530
    ac_configure_args="$ac_configure_args --enable-ltdl-install"
3531
    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3532
    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3533
  else
3534
    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3535
    LIBLTDL="-lltdl"
3536
    LTDLINCL=
3537
  fi
3538
  # For backwards non-gettext consistent compatibility...
3539
  INCLTDL="$LTDLINCL"
3540
])# AC_LIBLTDL_INSTALLABLE
3541

    
3542

    
3543
# AC_LIBTOOL_CXX
3544
# --------------
3545
# enable support for C++ libraries
3546
AC_DEFUN([AC_LIBTOOL_CXX],
3547
[AC_REQUIRE([_LT_AC_LANG_CXX])
3548
])# AC_LIBTOOL_CXX
3549

    
3550

    
3551
# _LT_AC_LANG_CXX
3552
# ---------------
3553
AC_DEFUN([_LT_AC_LANG_CXX],
3554
[AC_REQUIRE([AC_PROG_CXX])
3555
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3556
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3557
])# _LT_AC_LANG_CXX
3558

    
3559
# _LT_AC_PROG_CXXCPP
3560
# ------------------
3561
AC_DEFUN([_LT_AC_PROG_CXXCPP],
3562
[
3563
AC_REQUIRE([AC_PROG_CXX])
3564
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3565
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3566
    (test "X$CXX" != "Xg++"))) ; then
3567
  AC_PROG_CXXCPP
3568
fi
3569
])# _LT_AC_PROG_CXXCPP
3570

    
3571
# AC_LIBTOOL_F77
3572
# --------------
3573
# enable support for Fortran 77 libraries
3574
AC_DEFUN([AC_LIBTOOL_F77],
3575
[AC_REQUIRE([_LT_AC_LANG_F77])
3576
])# AC_LIBTOOL_F77
3577

    
3578

    
3579
# _LT_AC_LANG_F77
3580
# ---------------
3581
AC_DEFUN([_LT_AC_LANG_F77],
3582
[AC_REQUIRE([AC_PROG_F77])
3583
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3584
])# _LT_AC_LANG_F77
3585

    
3586

    
3587
# AC_LIBTOOL_GCJ
3588
# --------------
3589
# enable support for GCJ libraries
3590
AC_DEFUN([AC_LIBTOOL_GCJ],
3591
[AC_REQUIRE([_LT_AC_LANG_GCJ])
3592
])# AC_LIBTOOL_GCJ
3593

    
3594

    
3595
# _LT_AC_LANG_GCJ
3596
# ---------------
3597
AC_DEFUN([_LT_AC_LANG_GCJ],
3598
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3599
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3600
    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3601
      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3602
	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3603
	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3604
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3605
])# _LT_AC_LANG_GCJ
3606

    
3607

    
3608
# AC_LIBTOOL_RC
3609
# -------------
3610
# enable support for Windows resource files
3611
AC_DEFUN([AC_LIBTOOL_RC],
3612
[AC_REQUIRE([LT_AC_PROG_RC])
3613
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3614
])# AC_LIBTOOL_RC
3615

    
3616

    
3617
# AC_LIBTOOL_LANG_C_CONFIG
3618
# ------------------------
3619
# Ensure that the configuration vars for the C compiler are
3620
# suitably defined.  Those variables are subsequently used by
3621
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3622
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3623
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3624
[lt_save_CC="$CC"
3625
AC_LANG_PUSH(C)
3626

    
3627
# Source file extension for C test sources.
3628
ac_ext=c
3629

    
3630
# Object file extension for compiled C test sources.
3631
objext=o
3632
_LT_AC_TAGVAR(objext, $1)=$objext
3633

    
3634
# Code to be used in simple compile tests
3635
lt_simple_compile_test_code="int some_variable = 0;"
3636

    
3637
# Code to be used in simple link tests
3638
lt_simple_link_test_code='int main(){return(0);}'
3639

    
3640
_LT_AC_SYS_COMPILER
3641

    
3642
# save warnings/boilerplate of simple test code
3643
_LT_COMPILER_BOILERPLATE
3644
_LT_LINKER_BOILERPLATE
3645

    
3646
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3647
AC_LIBTOOL_PROG_COMPILER_PIC($1)
3648
AC_LIBTOOL_PROG_CC_C_O($1)
3649
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3650
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3651
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3652
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3653
AC_LIBTOOL_SYS_LIB_STRIP
3654
AC_LIBTOOL_DLOPEN_SELF
3655

    
3656
# Report which library types will actually be built
3657
AC_MSG_CHECKING([if libtool supports shared libraries])
3658
AC_MSG_RESULT([$can_build_shared])
3659

    
3660
AC_MSG_CHECKING([whether to build shared libraries])
3661
test "$can_build_shared" = "no" && enable_shared=no
3662

    
3663
# On AIX, shared libraries and static libraries use the same namespace, and
3664
# are all built from PIC.
3665
case $host_os in
3666
aix3*)
3667
  test "$enable_shared" = yes && enable_static=no
3668
  if test -n "$RANLIB"; then
3669
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
3670
    postinstall_cmds='$RANLIB $lib'
3671
  fi
3672
  ;;
3673

    
3674
aix[[4-9]]*)
3675
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3676
    test "$enable_shared" = yes && enable_static=no
3677
  fi
3678
    ;;
3679
esac
3680
AC_MSG_RESULT([$enable_shared])
3681

    
3682
AC_MSG_CHECKING([whether to build static libraries])
3683
# Make sure either enable_shared or enable_static is yes.
3684
test "$enable_shared" = yes || enable_static=yes
3685
AC_MSG_RESULT([$enable_static])
3686

    
3687
AC_LIBTOOL_CONFIG($1)
3688

    
3689
AC_LANG_POP
3690
CC="$lt_save_CC"
3691
])# AC_LIBTOOL_LANG_C_CONFIG
3692

    
3693

    
3694
# AC_LIBTOOL_LANG_CXX_CONFIG
3695
# --------------------------
3696
# Ensure that the configuration vars for the C compiler are
3697
# suitably defined.  Those variables are subsequently used by
3698
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3699
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3700
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3701
[AC_LANG_PUSH(C++)
3702
AC_REQUIRE([AC_PROG_CXX])
3703
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3704

    
3705
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3706
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3707
_LT_AC_TAGVAR(always_export_symbols, $1)=no
3708
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3709
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3710
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3711
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3712
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3713
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3714
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3715
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3716
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
3717
_LT_AC_TAGVAR(module_cmds, $1)=
3718
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
3719
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3720
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3721
_LT_AC_TAGVAR(no_undefined_flag, $1)=
3722
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3723
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3724

    
3725
# Dependencies to place before and after the object being linked:
3726
_LT_AC_TAGVAR(predep_objects, $1)=
3727
_LT_AC_TAGVAR(postdep_objects, $1)=
3728
_LT_AC_TAGVAR(predeps, $1)=
3729
_LT_AC_TAGVAR(postdeps, $1)=
3730
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3731
_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
3732

    
3733
# Source file extension for C++ test sources.
3734
ac_ext=cpp
3735

    
3736
# Object file extension for compiled C++ test sources.
3737
objext=o
3738
_LT_AC_TAGVAR(objext, $1)=$objext
3739

    
3740
# Code to be used in simple compile tests
3741
lt_simple_compile_test_code="int some_variable = 0;"
3742

    
3743
# Code to be used in simple link tests
3744
lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
3745

    
3746
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3747
_LT_AC_SYS_COMPILER
3748

    
3749
# save warnings/boilerplate of simple test code
3750
_LT_COMPILER_BOILERPLATE
3751
_LT_LINKER_BOILERPLATE
3752

    
3753
# Allow CC to be a program name with arguments.
3754
lt_save_CC=$CC
3755
lt_save_LD=$LD
3756
lt_save_GCC=$GCC
3757
GCC=$GXX
3758
lt_save_with_gnu_ld=$with_gnu_ld
3759
lt_save_path_LD=$lt_cv_path_LD
3760
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3761
  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3762
else
3763
  $as_unset lt_cv_prog_gnu_ld
3764
fi
3765
if test -n "${lt_cv_path_LDCXX+set}"; then
3766
  lt_cv_path_LD=$lt_cv_path_LDCXX
3767
else
3768
  $as_unset lt_cv_path_LD
3769
fi
3770
test -z "${LDCXX+set}" || LD=$LDCXX
3771
CC=${CXX-"c++"}
3772
compiler=$CC
3773
_LT_AC_TAGVAR(compiler, $1)=$CC
3774
_LT_CC_BASENAME([$compiler])
3775

    
3776
# We don't want -fno-exception wen compiling C++ code, so set the
3777
# no_builtin_flag separately
3778
if test "$GXX" = yes; then
3779
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3780
else
3781
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3782
fi
3783

    
3784
if test "$GXX" = yes; then
3785
  # Set up default GNU C++ configuration
3786

    
3787
  AC_PROG_LD
3788

    
3789
  # Check if GNU C++ uses GNU ld as the underlying linker, since the
3790
  # archiving commands below assume that GNU ld is being used.
3791
  if test "$with_gnu_ld" = yes; then
3792
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3793
    _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'
3794

    
3795
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3796
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3797

    
3798
    # If archive_cmds runs LD, not CC, wlarc should be empty
3799
    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3800
    #     investigate it a little bit more. (MM)
3801
    wlarc='${wl}'
3802

    
3803
    # ancient GNU ld didn't support --whole-archive et. al.
3804
    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3805
	grep 'no-whole-archive' > /dev/null; then
3806
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3807
    else
3808
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3809
    fi
3810
  else
3811
    with_gnu_ld=no
3812
    wlarc=
3813

    
3814
    # A generic and very simple default shared library creation
3815
    # command for GNU C++ for the case where it uses the native
3816
    # linker, instead of GNU ld.  If possible, this setting should
3817
    # overridden to take advantage of the native linker features on
3818
    # the platform it is being used on.
3819
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3820
  fi
3821

    
3822
  # Commands to make compiler produce verbose output that lists
3823
  # what "hidden" libraries, object files and flags are used when
3824
  # linking a shared library.
3825
  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3826

    
3827
else
3828
  GXX=no
3829
  with_gnu_ld=no
3830
  wlarc=
3831
fi
3832

    
3833
# PORTME: fill in a description of your system's C++ link characteristics
3834
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3835
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
3836
case $host_os in
3837
  aix3*)
3838
    # FIXME: insert proper C++ library support
3839
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3840
    ;;
3841
  aix[[4-9]]*)
3842
    if test "$host_cpu" = ia64; then
3843
      # On IA64, the linker does run time linking by default, so we don't
3844
      # have to do anything special.
3845
      aix_use_runtimelinking=no
3846
      exp_sym_flag='-Bexport'
3847
      no_entry_flag=""
3848
    else
3849
      aix_use_runtimelinking=no
3850

    
3851
      # Test if we are trying to use run time linking or normal
3852
      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3853
      # need to do runtime linking.
3854
      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
3855
	for ld_flag in $LDFLAGS; do
3856
	  case $ld_flag in
3857
	  *-brtl*)
3858
	    aix_use_runtimelinking=yes
3859
	    break
3860
	    ;;
3861
	  esac
3862
	done
3863
	;;
3864
      esac
3865

    
3866
      exp_sym_flag='-bexport'
3867
      no_entry_flag='-bnoentry'
3868
    fi
3869

    
3870
    # When large executables or shared objects are built, AIX ld can
3871
    # have problems creating the table of contents.  If linking a library
3872
    # or program results in "error TOC overflow" add -mminimal-toc to
3873
    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
3874
    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3875

    
3876
    _LT_AC_TAGVAR(archive_cmds, $1)=''
3877
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3878
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3879
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3880

    
3881
    if test "$GXX" = yes; then
3882
      case $host_os in aix4.[[012]]|aix4.[[012]].*)
3883
      # We only want to do this on AIX 4.2 and lower, the check
3884
      # below for broken collect2 doesn't work under 4.3+
3885
	collect2name=`${CC} -print-prog-name=collect2`
3886
	if test -f "$collect2name" && \
3887
	   strings "$collect2name" | grep resolve_lib_name >/dev/null
3888
	then
3889
	  # We have reworked collect2
3890
	  :
3891
	else
3892
	  # We have old collect2
3893
	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3894
	  # It fails to find uninstalled libraries when the uninstalled
3895
	  # path is not listed in the libpath.  Setting hardcode_minus_L
3896
	  # to unsupported forces relinking
3897
	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3898
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3899
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3900
	fi
3901
	;;
3902
      esac
3903
      shared_flag='-shared'
3904
      if test "$aix_use_runtimelinking" = yes; then
3905
	shared_flag="$shared_flag "'${wl}-G'
3906
      fi
3907
    else
3908
      # not using gcc
3909
      if test "$host_cpu" = ia64; then
3910
	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3911
	# chokes on -Wl,-G. The following line is correct:
3912
	shared_flag='-G'
3913
      else
3914
	if test "$aix_use_runtimelinking" = yes; then
3915
	  shared_flag='${wl}-G'
3916
	else
3917
	  shared_flag='${wl}-bM:SRE'
3918
	fi
3919
      fi
3920
    fi
3921

    
3922
    # It seems that -bexpall does not export symbols beginning with
3923
    # underscore (_), so it is better to generate a list of symbols to export.
3924
    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3925
    if test "$aix_use_runtimelinking" = yes; then
3926
      # Warning - without using the other runtime loading flags (-brtl),
3927
      # -berok will link without error, but may produce a broken library.
3928
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3929
      # Determine the default libpath from the value encoded in an empty executable.
3930
      _LT_AC_SYS_LIBPATH_AIX
3931
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3932

    
3933
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
3934
     else
3935
      if test "$host_cpu" = ia64; then
3936
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3937
	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3938
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
3939
      else
3940
	# Determine the default libpath from the value encoded in an empty executable.
3941
	_LT_AC_SYS_LIBPATH_AIX
3942
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3943
	# Warning - without using the other run time loading flags,
3944
	# -berok will link without error, but may produce a broken library.
3945
	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3946
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3947
	# Exported symbols can be pulled into shared objects from archives
3948
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
3949
	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3950
	# This is similar to how AIX traditionally builds its shared libraries.
3951
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3952
      fi
3953
    fi
3954
    ;;
3955

    
3956
  beos*)
3957
    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3958
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3959
      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3960
      # support --undefined.  This deserves some investigation.  FIXME
3961
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3962
    else
3963
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3964
    fi
3965
    ;;
3966

    
3967
  chorus*)
3968
    case $cc_basename in
3969
      *)
3970
	# FIXME: insert proper C++ library support
3971
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3972
	;;
3973
    esac
3974
    ;;
3975

    
3976
  cygwin* | mingw* | pw32*)
3977
    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3978
    # as there is no search path for DLLs.
3979
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3980
    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3981
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
3982
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3983

    
3984
    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3985
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3986
      # If the export-symbols file already is a .def file (1st line
3987
      # is EXPORTS), use it as is; otherwise, prepend...
3988
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3989
	cp $export_symbols $output_objdir/$soname.def;
3990
      else
3991
	echo EXPORTS > $output_objdir/$soname.def;
3992
	cat $export_symbols >> $output_objdir/$soname.def;
3993
      fi~
3994
      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3995
    else
3996
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3997
    fi
3998
  ;;
3999
      darwin* | rhapsody*)
4000
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4001
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
4002
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
4003
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4004
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
4005
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4006
      _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
4007
      if test "$GXX" = yes ; then
4008
      output_verbose_link_cmd='echo'
4009
      _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
4010
      _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
4011
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
4012
      _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
4013
      if test "$lt_cv_apple_cc_single_mod" != "yes"; then
4014
        _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
4015
        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
4016
      fi
4017
      else
4018
      case $cc_basename in
4019
        xlc*)
4020
         output_verbose_link_cmd='echo'
4021
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
4022
          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4023
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4024
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4025
          _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}'
4026
          ;;
4027
       *)
4028
         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4029
          ;;
4030
      esac
4031
      fi
4032
        ;;
4033

    
4034
  dgux*)
4035
    case $cc_basename in
4036
      ec++*)
4037
	# FIXME: insert proper C++ library support
4038
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4039
	;;
4040
      ghcx*)
4041
	# Green Hills C++ Compiler
4042
	# FIXME: insert proper C++ library support
4043
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4044
	;;
4045
      *)
4046
	# FIXME: insert proper C++ library support
4047
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4048
	;;
4049
    esac
4050
    ;;
4051
  freebsd[[12]]*)
4052
    # C++ shared libraries reported to be fairly broken before switch to ELF
4053
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4054
    ;;
4055
  freebsd-elf*)
4056
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4057
    ;;
4058
  freebsd* | dragonfly*)
4059
    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
4060
    # conventions
4061
    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4062
    ;;
4063
  gnu*)
4064
    ;;
4065
  hpux9*)
4066
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4067
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4068
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4069
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4070
    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4071
				# but as the default
4072
				# location of the library.
4073

    
4074
    case $cc_basename in
4075
    CC*)
4076
      # FIXME: insert proper C++ library support
4077
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
4078
      ;;
4079
    aCC*)
4080
      _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'
4081
      # Commands to make compiler produce verbose output that lists
4082
      # what "hidden" libraries, object files and flags are used when
4083
      # linking a shared library.
4084
      #
4085
      # There doesn't appear to be a way to prevent this compiler from
4086
      # explicitly linking system object files so we need to strip them
4087
      # from the output so that they don't get included in the library
4088
      # dependencies.
4089
      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'
4090
      ;;
4091
    *)
4092
      if test "$GXX" = yes; then
4093
        _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'
4094
      else
4095
        # FIXME: insert proper C++ library support
4096
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
4097
      fi
4098
      ;;
4099
    esac
4100
    ;;
4101
  hpux10*|hpux11*)
4102
    if test $with_gnu_ld = no; then
4103
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4104
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4105

    
4106
      case $host_cpu in
4107
      hppa*64*|ia64*) ;;
4108
      *)
4109
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4110
        ;;
4111
      esac
4112
    fi
4113
    case $host_cpu in
4114
    hppa*64*|ia64*)
4115
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
4116
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4117
      ;;
4118
    *)
4119
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4120
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4121
					      # but as the default
4122
					      # location of the library.
4123
      ;;
4124
    esac
4125

    
4126
    case $cc_basename in
4127
      CC*)
4128
	# FIXME: insert proper C++ library support
4129
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4130
	;;
4131
      aCC*)
4132
	case $host_cpu in
4133
	hppa*64*)
4134
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4135
	  ;;
4136
	ia64*)
4137
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4138
	  ;;
4139
	*)
4140
	  _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'
4141
	  ;;
4142
	esac
4143
	# Commands to make compiler produce verbose output that lists
4144
	# what "hidden" libraries, object files and flags are used when
4145
	# linking a shared library.
4146
	#
4147
	# There doesn't appear to be a way to prevent this compiler from
4148
	# explicitly linking system object files so we need to strip them
4149
	# from the output so that they don't get included in the library
4150
	# dependencies.
4151
	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'
4152
	;;
4153
      *)
4154
	if test "$GXX" = yes; then
4155
	  if test $with_gnu_ld = no; then
4156
	    case $host_cpu in
4157
	    hppa*64*)
4158
	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4159
	      ;;
4160
	    ia64*)
4161
	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4162
	      ;;
4163
	    *)
4164
	      _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'
4165
	      ;;
4166
	    esac
4167
	  fi
4168
	else
4169
	  # FIXME: insert proper C++ library support
4170
	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
4171
	fi
4172
	;;
4173
    esac
4174
    ;;
4175
  interix[[3-9]]*)
4176
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
4177
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4178
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4179
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4180
    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4181
    # Instead, shared libraries are loaded at an image base (0x10000000 by
4182
    # default) and relocated if they conflict, which is a slow very memory
4183
    # consuming and fragmenting process.  To avoid this, we pick a random,
4184
    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4185
    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
4186
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4187
    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
4188
    ;;
4189
  irix5* | irix6*)
4190
    case $cc_basename in
4191
      CC*)
4192
	# SGI C++
4193
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4194

    
4195
	# Archives containing C++ object files must be created using
4196
	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
4197
	# necessary to make sure instantiated templates are included
4198
	# in the archive.
4199
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4200
	;;
4201
      *)
4202
	if test "$GXX" = yes; then
4203
	  if test "$with_gnu_ld" = no; then
4204
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4205
	  else
4206
	    _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'
4207
	  fi
4208
	fi
4209
	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4210
	;;
4211
    esac
4212
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4213
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4214
    ;;
4215
  linux* | k*bsd*-gnu)
4216
    case $cc_basename in
4217
      KCC*)
4218
	# Kuck and Associates, Inc. (KAI) C++ Compiler
4219

    
4220
	# KCC will only create a shared library if the output file
4221
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
4222
	# to its proper name (with version) after linking.
4223
	_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'
4224
	_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'
4225
	# Commands to make compiler produce verbose output that lists
4226
	# what "hidden" libraries, object files and flags are used when
4227
	# linking a shared library.
4228
	#
4229
	# There doesn't appear to be a way to prevent this compiler from
4230
	# explicitly linking system object files so we need to strip them
4231
	# from the output so that they don't get included in the library
4232
	# dependencies.
4233
	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'
4234

    
4235
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4236
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4237

    
4238
	# Archives containing C++ object files must be created using
4239
	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
4240
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4241
	;;
4242
      icpc*)
4243
	# Intel C++
4244
	with_gnu_ld=yes
4245
	# version 8.0 and above of icpc choke on multiply defined symbols
4246
	# if we add $predep_objects and $postdep_objects, however 7.1 and
4247
	# earlier do not add the objects themselves.
4248
	case `$CC -V 2>&1` in
4249
	*"Version 7."*)
4250
  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4251
  	  _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'
4252
	  ;;
4253
	*)  # Version 8.0 or newer
4254
	  tmp_idyn=
4255
	  case $host_cpu in
4256
	    ia64*) tmp_idyn=' -i_dynamic';;
4257
	  esac
4258
  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4259
	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
4260
	  ;;
4261
	esac
4262
	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4263
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4264
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4265
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4266
	;;
4267
      pgCC* | pgcpp*)
4268
        # Portland Group C++ compiler
4269
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
4270
  	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
4271

    
4272
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4273
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4274
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
4275
        ;;
4276
      cxx*)
4277
	# Compaq C++
4278
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4279
	_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'
4280

    
4281
	runpath_var=LD_RUN_PATH
4282
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4283
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4284

    
4285
	# Commands to make compiler produce verbose output that lists
4286
	# what "hidden" libraries, object files and flags are used when
4287
	# linking a shared library.
4288
	#
4289
	# There doesn't appear to be a way to prevent this compiler from
4290
	# explicitly linking system object files so we need to strip them
4291
	# from the output so that they don't get included in the library
4292
	# dependencies.
4293
	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'
4294
	;;
4295
      *)
4296
	case `$CC -V 2>&1 | sed 5q` in
4297
	*Sun\ C*)
4298
	  # Sun C++ 5.9
4299
	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4300
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4301
	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
4302
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4303
	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
4304

    
4305
	  # Not sure whether something based on
4306
	  # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
4307
	  # would be better.
4308
	  output_verbose_link_cmd='echo'
4309

    
4310
	  # Archives containing C++ object files must be created using
4311
	  # "CC -xar", where "CC" is the Sun C++ compiler.  This is
4312
	  # necessary to make sure instantiated templates are included
4313
	  # in the archive.
4314
	  _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4315
	  ;;
4316
	esac
4317
	;;
4318
    esac
4319
    ;;
4320
  lynxos*)
4321
    # FIXME: insert proper C++ library support
4322
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4323
    ;;
4324
  m88k*)
4325
    # FIXME: insert proper C++ library support
4326
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4327
    ;;
4328
  mvs*)
4329
    case $cc_basename in
4330
      cxx*)
4331
	# FIXME: insert proper C++ library support
4332
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4333
	;;
4334
      *)
4335
	# FIXME: insert proper C++ library support
4336
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4337
	;;
4338
    esac
4339
    ;;
4340
  netbsd* | netbsdelf*-gnu)
4341
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4342
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4343
      wlarc=
4344
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4345
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4346
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4347
    fi
4348
    # Workaround some broken pre-1.5 toolchains
4349
    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4350
    ;;
4351
  openbsd2*)
4352
    # C++ shared libraries are fairly broken
4353
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4354
    ;;
4355
  openbsd*)
4356
    if test -f /usr/libexec/ld.so; then
4357
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4358
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4359
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4360
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4361
      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4362
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
4363
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4364
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4365
      fi
4366
      output_verbose_link_cmd='echo'
4367
    else
4368
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
4369
    fi
4370
    ;;
4371
  osf3*)
4372
    case $cc_basename in
4373
      KCC*)
4374
	# Kuck and Associates, Inc. (KAI) C++ Compiler
4375

    
4376
	# KCC will only create a shared library if the output file
4377
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
4378
	# to its proper name (with version) after linking.
4379
	_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'
4380

    
4381
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4382
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4383

    
4384
	# Archives containing C++ object files must be created using
4385
	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
4386
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4387

    
4388
	;;
4389
      RCC*)
4390
	# Rational C++ 2.4.1
4391
	# FIXME: insert proper C++ library support
4392
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4393
	;;
4394
      cxx*)
4395
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4396
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4397

    
4398
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4399
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4400

    
4401
	# Commands to make compiler produce verbose output that lists
4402
	# what "hidden" libraries, object files and flags are used when
4403
	# linking a shared library.
4404
	#
4405
	# There doesn't appear to be a way to prevent this compiler from
4406
	# explicitly linking system object files so we need to strip them
4407
	# from the output so that they don't get included in the library
4408
	# dependencies.
4409
	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'
4410
	;;
4411
      *)
4412
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4413
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4414
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4415

    
4416
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4417
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4418

    
4419
	  # Commands to make compiler produce verbose output that lists
4420
	  # what "hidden" libraries, object files and flags are used when
4421
	  # linking a shared library.
4422
	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4423

    
4424
	else
4425
	  # FIXME: insert proper C++ library support
4426
	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
4427
	fi
4428
	;;
4429
    esac
4430
    ;;
4431
  osf4* | osf5*)
4432
    case $cc_basename in
4433
      KCC*)
4434
	# Kuck and Associates, Inc. (KAI) C++ Compiler
4435

    
4436
	# KCC will only create a shared library if the output file
4437
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
4438
	# to its proper name (with version) after linking.
4439
	_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'
4440

    
4441
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4442
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4443

    
4444
	# Archives containing C++ object files must be created using
4445
	# the KAI C++ compiler.
4446
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4447
	;;
4448
      RCC*)
4449
	# Rational C++ 2.4.1
4450
	# FIXME: insert proper C++ library support
4451
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4452
	;;
4453
      cxx*)
4454
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4455
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4456
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4457
	  echo "-hidden">> $lib.exp~
4458
	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry ${output_objdir}/so_locations -o $lib~
4459
	  $rm $lib.exp'
4460

    
4461
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4462
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4463

    
4464
	# Commands to make compiler produce verbose output that lists
4465
	# what "hidden" libraries, object files and flags are used when
4466
	# linking a shared library.
4467
	#
4468
	# There doesn't appear to be a way to prevent this compiler from
4469
	# explicitly linking system object files so we need to strip them
4470
	# from the output so that they don't get included in the library
4471
	# dependencies.
4472
	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'
4473
	;;
4474
      *)
4475
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4476
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4477
	 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
4478

    
4479
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4480
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4481

    
4482
	  # Commands to make compiler produce verbose output that lists
4483
	  # what "hidden" libraries, object files and flags are used when
4484
	  # linking a shared library.
4485
	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4486

    
4487
	else
4488
	  # FIXME: insert proper C++ library support
4489
	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
4490
	fi
4491
	;;
4492
    esac
4493
    ;;
4494
  psos*)
4495
    # FIXME: insert proper C++ library support
4496
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4497
    ;;
4498
  sunos4*)
4499
    case $cc_basename in
4500
      CC*)
4501
	# Sun C++ 4.x
4502
	# FIXME: insert proper C++ library support
4503
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4504
	;;
4505
      lcc*)
4506
	# Lucid
4507
	# FIXME: insert proper C++ library support
4508
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4509
	;;
4510
      *)
4511
	# FIXME: insert proper C++ library support
4512
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4513
	;;
4514
    esac
4515
    ;;
4516
  solaris*)
4517
    case $cc_basename in
4518
      CC*)
4519
	# Sun C++ 4.2, 5.x and Centerline C++
4520
        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
4521
	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4522
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4523
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4524
	$CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4525

    
4526
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4527
	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4528
	case $host_os in
4529
	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4530
	  *)
4531
	    # The compiler driver will combine and reorder linker options,
4532
	    # but understands `-z linker_flag'.
4533
	    # Supported since Solaris 2.6 (maybe 2.5.1?)
4534
	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
4535
	    ;;
4536
	esac
4537
	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4538

    
4539
	output_verbose_link_cmd='echo'
4540

    
4541
	# Archives containing C++ object files must be created using
4542
	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
4543
	# necessary to make sure instantiated templates are included
4544
	# in the archive.
4545
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4546
	;;
4547
      gcx*)
4548
	# Green Hills C++ Compiler
4549
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4550

    
4551
	# The C++ compiler must be used to create the archive.
4552
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4553
	;;
4554
      *)
4555
	# GNU C++ compiler with Solaris linker
4556
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4557
	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4558
	  if $CC --version | grep -v '^2\.7' > /dev/null; then
4559
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4560
	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4561
		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4562

    
4563
	    # Commands to make compiler produce verbose output that lists
4564
	    # what "hidden" libraries, object files and flags are used when
4565
	    # linking a shared library.
4566
	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4567
	  else
4568
	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
4569
	    # platform.
4570
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4571
	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4572
		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4573

    
4574
	    # Commands to make compiler produce verbose output that lists
4575
	    # what "hidden" libraries, object files and flags are used when
4576
	    # linking a shared library.
4577
	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4578
	  fi
4579

    
4580
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4581
	  case $host_os in
4582
	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4583
	  *)
4584
	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4585
	    ;;
4586
	  esac
4587
	fi
4588
	;;
4589
    esac
4590
    ;;
4591
  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
4592
    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4593
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4594
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4595
    runpath_var='LD_RUN_PATH'
4596

    
4597
    case $cc_basename in
4598
      CC*)
4599
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4600
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4601
	;;
4602
      *)
4603
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4604
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4605
	;;
4606
    esac
4607
    ;;
4608
  sysv5* | sco3.2v5* | sco5v6*)
4609
    # Note: We can NOT use -z defs as we might desire, because we do not
4610
    # link with -lc, and that would cause any symbols used from libc to
4611
    # always be unresolved, which means just about no library would
4612
    # ever link correctly.  If we're not using GNU ld we use -z text
4613
    # though, which does catch some bad symbols but isn't as heavy-handed
4614
    # as -z defs.
4615
    # For security reasons, it is highly recommended that you always
4616
    # use absolute paths for naming shared libraries, and exclude the
4617
    # DT_RUNPATH tag from executables and libraries.  But doing so
4618
    # requires that you compile everything twice, which is a pain.
4619
    # So that behaviour is only enabled if SCOABSPATH is set to a
4620
    # non-empty value in the environment.  Most likely only useful for
4621
    # creating official distributions of packages.
4622
    # This is a hack until libtool officially supports absolute path
4623
    # names for shared libraries.
4624
    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4625
    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
4626
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4627
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4628
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
4629
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4630
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4631
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
4632
    runpath_var='LD_RUN_PATH'
4633

    
4634
    case $cc_basename in
4635
      CC*)
4636
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4637
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4638
	;;
4639
      *)
4640
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4641
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4642
	;;
4643
    esac
4644
    ;;
4645
  tandem*)
4646
    case $cc_basename in
4647
      NCC*)
4648
	# NonStop-UX NCC 3.20
4649
	# FIXME: insert proper C++ library support
4650
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4651
	;;
4652
      *)
4653
	# FIXME: insert proper C++ library support
4654
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4655
	;;
4656
    esac
4657
    ;;
4658
  vxworks*)
4659
    # FIXME: insert proper C++ library support
4660
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4661
    ;;
4662
  *)
4663
    # FIXME: insert proper C++ library support
4664
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4665
    ;;
4666
esac
4667
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4668
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4669

    
4670
_LT_AC_TAGVAR(GCC, $1)="$GXX"
4671
_LT_AC_TAGVAR(LD, $1)="$LD"
4672

    
4673
AC_LIBTOOL_POSTDEP_PREDEP($1)
4674
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4675
AC_LIBTOOL_PROG_CC_C_O($1)
4676
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4677
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4678
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4679
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4680

    
4681
AC_LIBTOOL_CONFIG($1)
4682

    
4683
AC_LANG_POP
4684
CC=$lt_save_CC
4685
LDCXX=$LD
4686
LD=$lt_save_LD
4687
GCC=$lt_save_GCC
4688
with_gnu_ldcxx=$with_gnu_ld
4689
with_gnu_ld=$lt_save_with_gnu_ld
4690
lt_cv_path_LDCXX=$lt_cv_path_LD
4691
lt_cv_path_LD=$lt_save_path_LD
4692
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4693
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4694
])# AC_LIBTOOL_LANG_CXX_CONFIG
4695

    
4696
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4697
# ------------------------------------
4698
# Figure out "hidden" library dependencies from verbose
4699
# compiler output when linking a shared library.
4700
# Parse the compiler output and extract the necessary
4701
# objects, libraries and library flags.
4702
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],
4703
[AC_REQUIRE([LT_AC_PROG_SED])dnl
4704
dnl we can't use the lt_simple_compile_test_code here,
4705
dnl because it contains code intended for an executable,
4706
dnl not a library.  It's possible we should let each
4707
dnl tag define a new lt_????_link_test_code variable,
4708
dnl but it's only used here...
4709
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4710
int a;
4711
void foo (void) { a = 0; }
4712
EOF
4713
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4714
class Foo
4715
{
4716
public:
4717
  Foo (void) { a = 0; }
4718
private:
4719
  int a;
4720
};
4721
EOF
4722
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4723
      subroutine foo
4724
      implicit none
4725
      integer*4 a
4726
      a=0
4727
      return
4728
      end
4729
EOF
4730
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4731
public class foo {
4732
  private int a;
4733
  public void bar (void) {
4734
    a = 0;
4735
  }
4736
};
4737
EOF
4738
])
4739
dnl Parse the compiler output and extract the necessary
4740
dnl objects, libraries and library flags.
4741
if AC_TRY_EVAL(ac_compile); then
4742
  # Parse the compiler output and extract the necessary
4743
  # objects, libraries and library flags.
4744

    
4745
  # Sentinel used to keep track of whether or not we are before
4746
  # the conftest object file.
4747
  pre_test_object_deps_done=no
4748

    
4749
  # The `*' in the case matches for architectures that use `case' in
4750
  # $output_verbose_cmd can trigger glob expansion during the loop
4751
  # eval without this substitution.
4752
  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
4753

    
4754
  for p in `eval $output_verbose_link_cmd`; do
4755
    case $p in
4756

    
4757
    -L* | -R* | -l*)
4758
       # Some compilers place space between "-{L,R}" and the path.
4759
       # Remove the space.
4760
       if test $p = "-L" \
4761
	  || test $p = "-R"; then
4762
	 prev=$p
4763
	 continue
4764
       else
4765
	 prev=
4766
       fi
4767

    
4768
       if test "$pre_test_object_deps_done" = no; then
4769
	 case $p in
4770
	 -L* | -R*)
4771
	   # Internal compiler library paths should come after those
4772
	   # provided the user.  The postdeps already come after the
4773
	   # user supplied libs so there is no need to process them.
4774
	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4775
	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4776
	   else
4777
	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4778
	   fi
4779
	   ;;
4780
	 # The "-l" case would never come before the object being
4781
	 # linked, so don't bother handling this case.
4782
	 esac
4783
       else
4784
	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4785
	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4786
	 else
4787
	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4788
	 fi
4789
       fi
4790
       ;;
4791

    
4792
    *.$objext)
4793
       # This assumes that the test object file only shows up
4794
       # once in the compiler output.
4795
       if test "$p" = "conftest.$objext"; then
4796
	 pre_test_object_deps_done=yes
4797
	 continue
4798
       fi
4799

    
4800
       if test "$pre_test_object_deps_done" = no; then
4801
	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4802
	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
4803
	 else
4804
	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4805
	 fi
4806
       else
4807
	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4808
	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
4809
	 else
4810
	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4811
	 fi
4812
       fi
4813
       ;;
4814

    
4815
    *) ;; # Ignore the rest.
4816

    
4817
    esac
4818
  done
4819

    
4820
  # Clean up.
4821
  rm -f a.out a.exe
4822
else
4823
  echo "libtool.m4: error: problem compiling $1 test program"
4824
fi
4825

    
4826
$rm -f confest.$objext
4827

    
4828
_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
4829
if test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4830
  _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
4831
fi
4832

    
4833
# PORTME: override above test on systems where it is broken
4834
ifelse([$1],[CXX],
4835
[case $host_os in
4836
interix[[3-9]]*)
4837
  # Interix 3.5 installs completely hosed .la files for C++, so rather than
4838
  # hack all around it, let's just trust "g++" to DTRT.
4839
  _LT_AC_TAGVAR(predep_objects,$1)=
4840
  _LT_AC_TAGVAR(postdep_objects,$1)=
4841
  _LT_AC_TAGVAR(postdeps,$1)=
4842
  ;;
4843

    
4844
linux*)
4845
  case `$CC -V 2>&1 | sed 5q` in
4846
  *Sun\ C*)
4847
    # Sun C++ 5.9
4848
    #
4849
    # The more standards-conforming stlport4 library is
4850
    # incompatible with the Cstd library. Avoid specifying
4851
    # it if it's in CXXFLAGS. Ignore libCrun as
4852
    # -library=stlport4 depends on it.
4853
    case " $CXX $CXXFLAGS " in
4854
    *" -library=stlport4 "*)
4855
      solaris_use_stlport4=yes
4856
      ;;
4857
    esac
4858
    if test "$solaris_use_stlport4" != yes; then
4859
      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
4860
    fi
4861
    ;;
4862
  esac
4863
  ;;
4864

    
4865
solaris*)
4866
  case $cc_basename in
4867
  CC*)
4868
    # The more standards-conforming stlport4 library is
4869
    # incompatible with the Cstd library. Avoid specifying
4870
    # it if it's in CXXFLAGS. Ignore libCrun as
4871
    # -library=stlport4 depends on it.
4872
    case " $CXX $CXXFLAGS " in
4873
    *" -library=stlport4 "*)
4874
      solaris_use_stlport4=yes
4875
      ;;
4876
    esac
4877

    
4878
    # Adding this requires a known-good setup of shared libraries for
4879
    # Sun compiler versions before 5.6, else PIC objects from an old
4880
    # archive will be linked into the output, leading to subtle bugs.
4881
    if test "$solaris_use_stlport4" != yes; then
4882
      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
4883
    fi
4884
    ;;
4885
  esac
4886
  ;;
4887
esac
4888
])
4889
case " $_LT_AC_TAGVAR(postdeps, $1) " in
4890
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4891
esac
4892
])# AC_LIBTOOL_POSTDEP_PREDEP
4893

    
4894
# AC_LIBTOOL_LANG_F77_CONFIG
4895
# --------------------------
4896
# Ensure that the configuration vars for the C compiler are
4897
# suitably defined.  Those variables are subsequently used by
4898
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4899
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4900
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4901
[AC_REQUIRE([AC_PROG_F77])
4902
AC_LANG_PUSH(Fortran 77)
4903

    
4904
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4905
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4906
_LT_AC_TAGVAR(always_export_symbols, $1)=no
4907
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4908
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4909
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4910
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4911
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4912
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4913
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4914
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
4915
_LT_AC_TAGVAR(module_cmds, $1)=
4916
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4917
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4918
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4919
_LT_AC_TAGVAR(no_undefined_flag, $1)=
4920
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4921
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4922

    
4923
# Source file extension for f77 test sources.
4924
ac_ext=f
4925

    
4926
# Object file extension for compiled f77 test sources.
4927
objext=o
4928
_LT_AC_TAGVAR(objext, $1)=$objext
4929

    
4930
# Code to be used in simple compile tests
4931
lt_simple_compile_test_code="\
4932
      subroutine t
4933
      return
4934
      end
4935
"
4936

    
4937
# Code to be used in simple link tests
4938
lt_simple_link_test_code="\
4939
      program t
4940
      end
4941
"
4942

    
4943
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4944
_LT_AC_SYS_COMPILER
4945

    
4946
# save warnings/boilerplate of simple test code
4947
_LT_COMPILER_BOILERPLATE
4948
_LT_LINKER_BOILERPLATE
4949

    
4950
# Allow CC to be a program name with arguments.
4951
lt_save_CC="$CC"
4952
CC=${F77-"f77"}
4953
compiler=$CC
4954
_LT_AC_TAGVAR(compiler, $1)=$CC
4955
_LT_CC_BASENAME([$compiler])
4956

    
4957
AC_MSG_CHECKING([if libtool supports shared libraries])
4958
AC_MSG_RESULT([$can_build_shared])
4959

    
4960
AC_MSG_CHECKING([whether to build shared libraries])
4961
test "$can_build_shared" = "no" && enable_shared=no
4962

    
4963
# On AIX, shared libraries and static libraries use the same namespace, and
4964
# are all built from PIC.
4965
case $host_os in
4966
aix3*)
4967
  test "$enable_shared" = yes && enable_static=no
4968
  if test -n "$RANLIB"; then
4969
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
4970
    postinstall_cmds='$RANLIB $lib'
4971
  fi
4972
  ;;
4973
aix[[4-9]]*)
4974
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4975
    test "$enable_shared" = yes && enable_static=no
4976
  fi
4977
  ;;
4978
esac
4979
AC_MSG_RESULT([$enable_shared])
4980

    
4981
AC_MSG_CHECKING([whether to build static libraries])
4982
# Make sure either enable_shared or enable_static is yes.
4983
test "$enable_shared" = yes || enable_static=yes
4984
AC_MSG_RESULT([$enable_static])
4985

    
4986
_LT_AC_TAGVAR(GCC, $1)="$G77"
4987
_LT_AC_TAGVAR(LD, $1)="$LD"
4988

    
4989
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4990
AC_LIBTOOL_PROG_CC_C_O($1)
4991
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4992
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4993
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4994
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4995

    
4996
AC_LIBTOOL_CONFIG($1)
4997

    
4998
AC_LANG_POP
4999
CC="$lt_save_CC"
5000
])# AC_LIBTOOL_LANG_F77_CONFIG
5001

    
5002

    
5003
# AC_LIBTOOL_LANG_GCJ_CONFIG
5004
# --------------------------
5005
# Ensure that the configuration vars for the C compiler are
5006
# suitably defined.  Those variables are subsequently used by
5007
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5008
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
5009
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
5010
[AC_LANG_SAVE
5011

    
5012
# Source file extension for Java test sources.
5013
ac_ext=java
5014

    
5015
# Object file extension for compiled Java test sources.
5016
objext=o
5017
_LT_AC_TAGVAR(objext, $1)=$objext
5018

    
5019
# Code to be used in simple compile tests
5020
lt_simple_compile_test_code="class foo {}"
5021

    
5022
# Code to be used in simple link tests
5023
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
5024

    
5025
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5026
_LT_AC_SYS_COMPILER
5027

    
5028
# save warnings/boilerplate of simple test code
5029
_LT_COMPILER_BOILERPLATE
5030
_LT_LINKER_BOILERPLATE
5031

    
5032
# Allow CC to be a program name with arguments.
5033
lt_save_CC="$CC"
5034
CC=${GCJ-"gcj"}
5035
compiler=$CC
5036
_LT_AC_TAGVAR(compiler, $1)=$CC
5037
_LT_CC_BASENAME([$compiler])
5038

    
5039
# GCJ did not exist at the time GCC didn't implicitly link libc in.
5040
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5041

    
5042
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5043

    
5044
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
5045
AC_LIBTOOL_PROG_COMPILER_PIC($1)
5046
AC_LIBTOOL_PROG_CC_C_O($1)
5047
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5048
AC_LIBTOOL_PROG_LD_SHLIBS($1)
5049
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5050
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5051

    
5052
AC_LIBTOOL_CONFIG($1)
5053

    
5054
AC_LANG_RESTORE
5055
CC="$lt_save_CC"
5056
])# AC_LIBTOOL_LANG_GCJ_CONFIG
5057

    
5058

    
5059
# AC_LIBTOOL_LANG_RC_CONFIG
5060
# -------------------------
5061
# Ensure that the configuration vars for the Windows resource compiler are
5062
# suitably defined.  Those variables are subsequently used by
5063
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5064
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
5065
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
5066
[AC_LANG_SAVE
5067

    
5068
# Source file extension for RC test sources.
5069
ac_ext=rc
5070

    
5071
# Object file extension for compiled RC test sources.
5072
objext=o
5073
_LT_AC_TAGVAR(objext, $1)=$objext
5074

    
5075
# Code to be used in simple compile tests
5076
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
5077

    
5078
# Code to be used in simple link tests
5079
lt_simple_link_test_code="$lt_simple_compile_test_code"
5080

    
5081
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5082
_LT_AC_SYS_COMPILER
5083

    
5084
# save warnings/boilerplate of simple test code
5085
_LT_COMPILER_BOILERPLATE
5086
_LT_LINKER_BOILERPLATE
5087

    
5088
# Allow CC to be a program name with arguments.
5089
lt_save_CC="$CC"
5090
CC=${RC-"windres"}
5091
compiler=$CC
5092
_LT_AC_TAGVAR(compiler, $1)=$CC
5093
_LT_CC_BASENAME([$compiler])
5094
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
5095

    
5096
AC_LIBTOOL_CONFIG($1)
5097

    
5098
AC_LANG_RESTORE
5099
CC="$lt_save_CC"
5100
])# AC_LIBTOOL_LANG_RC_CONFIG
5101

    
5102

    
5103
# AC_LIBTOOL_CONFIG([TAGNAME])
5104
# ----------------------------
5105
# If TAGNAME is not passed, then create an initial libtool script
5106
# with a default configuration from the untagged config vars.  Otherwise
5107
# add code to config.status for appending the configuration named by
5108
# TAGNAME from the matching tagged config vars.
5109
AC_DEFUN([AC_LIBTOOL_CONFIG],
5110
[# The else clause should only fire when bootstrapping the
5111
# libtool distribution, otherwise you forgot to ship ltmain.sh
5112
# with your package, and you will get complaints that there are
5113
# no rules to generate ltmain.sh.
5114
if test -f "$ltmain"; then
5115
  # See if we are running on zsh, and set the options which allow our commands through
5116
  # without removal of \ escapes.
5117
  if test -n "${ZSH_VERSION+set}" ; then
5118
    setopt NO_GLOB_SUBST
5119
  fi
5120
  # Now quote all the things that may contain metacharacters while being
5121
  # careful not to overquote the AC_SUBSTed values.  We take copies of the
5122
  # variables and quote the copies for generation of the libtool script.
5123
  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
5124
    SED SHELL STRIP \
5125
    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
5126
    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
5127
    deplibs_check_method reload_flag reload_cmds need_locks \
5128
    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
5129
    lt_cv_sys_global_symbol_to_c_name_address \
5130
    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
5131
    old_postinstall_cmds old_postuninstall_cmds \
5132
    _LT_AC_TAGVAR(compiler, $1) \
5133
    _LT_AC_TAGVAR(CC, $1) \
5134
    _LT_AC_TAGVAR(LD, $1) \
5135
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
5136
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
5137
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
5138
    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
5139
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
5140
    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
5141
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
5142
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
5143
    _LT_AC_TAGVAR(old_archive_cmds, $1) \
5144
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
5145
    _LT_AC_TAGVAR(predep_objects, $1) \
5146
    _LT_AC_TAGVAR(postdep_objects, $1) \
5147
    _LT_AC_TAGVAR(predeps, $1) \
5148
    _LT_AC_TAGVAR(postdeps, $1) \
5149
    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
5150
    _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \
5151
    _LT_AC_TAGVAR(archive_cmds, $1) \
5152
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
5153
    _LT_AC_TAGVAR(postinstall_cmds, $1) \
5154
    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
5155
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
5156
    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
5157
    _LT_AC_TAGVAR(no_undefined_flag, $1) \
5158
    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
5159
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
5160
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
5161
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
5162
    _LT_AC_TAGVAR(hardcode_automatic, $1) \
5163
    _LT_AC_TAGVAR(module_cmds, $1) \
5164
    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
5165
    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
5166
    _LT_AC_TAGVAR(fix_srcfile_path, $1) \
5167
    _LT_AC_TAGVAR(exclude_expsyms, $1) \
5168
    _LT_AC_TAGVAR(include_expsyms, $1); do
5169

    
5170
    case $var in
5171
    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
5172
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
5173
    _LT_AC_TAGVAR(archive_cmds, $1) | \
5174
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
5175
    _LT_AC_TAGVAR(module_cmds, $1) | \
5176
    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
5177
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
5178
    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
5179
    extract_expsyms_cmds | reload_cmds | finish_cmds | \
5180
    postinstall_cmds | postuninstall_cmds | \
5181
    old_postinstall_cmds | old_postuninstall_cmds | \
5182
    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
5183
      # Double-quote double-evaled strings.
5184
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
5185
      ;;
5186
    *)
5187
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
5188
      ;;
5189
    esac
5190
  done
5191

    
5192
  case $lt_echo in
5193
  *'\[$]0 --fallback-echo"')
5194
    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
5195
    ;;
5196
  esac
5197

    
5198
ifelse([$1], [],
5199
  [cfgfile="${ofile}T"
5200
  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
5201
  $rm -f "$cfgfile"
5202
  AC_MSG_NOTICE([creating $ofile])],
5203
  [cfgfile="$ofile"])
5204

    
5205
  cat <<__EOF__ >> "$cfgfile"
5206
ifelse([$1], [],
5207
[#! $SHELL
5208

    
5209
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
5210
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
5211
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
5212
#
5213
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
5214
# Free Software Foundation, Inc.
5215
#
5216
# This file is part of GNU Libtool:
5217
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5218
#
5219
# This program is free software; you can redistribute it and/or modify
5220
# it under the terms of the GNU General Public License as published by
5221
# the Free Software Foundation; either version 2 of the License, or
5222
# (at your option) any later version.
5223
#
5224
# This program is distributed in the hope that it will be useful, but
5225
# WITHOUT ANY WARRANTY; without even the implied warranty of
5226
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
5227
# General Public License for more details.
5228
#
5229
# You should have received a copy of the GNU General Public License
5230
# along with this program; if not, write to the Free Software
5231
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
5232
#
5233
# As a special exception to the GNU General Public License, if you
5234
# distribute this file as part of a program that contains a
5235
# configuration script generated by Autoconf, you may include it under
5236
# the same distribution terms that you use for the rest of that program.
5237

    
5238
# A sed program that does not truncate output.
5239
SED=$lt_SED
5240

    
5241
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
5242
Xsed="$SED -e 1s/^X//"
5243

    
5244
# The HP-UX ksh and POSIX shell print the target directory to stdout
5245
# if CDPATH is set.
5246
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5247

    
5248
# The names of the tagged configurations supported by this script.
5249
available_tags=
5250

    
5251
# ### BEGIN LIBTOOL CONFIG],
5252
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
5253

    
5254
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5255

    
5256
# Shell to use when invoking shell scripts.
5257
SHELL=$lt_SHELL
5258

    
5259
# Whether or not to build shared libraries.
5260
build_libtool_libs=$enable_shared
5261

    
5262
# Whether or not to build static libraries.
5263
build_old_libs=$enable_static
5264

    
5265
# Whether or not to add -lc for building shared libraries.
5266
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
5267

    
5268
# Whether or not to disallow shared libs when runtime libs are static
5269
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
5270

    
5271
# Whether or not to optimize for fast installation.
5272
fast_install=$enable_fast_install
5273

    
5274
# The host system.
5275
host_alias=$host_alias
5276
host=$host
5277
host_os=$host_os
5278

    
5279
# The build system.
5280
build_alias=$build_alias
5281
build=$build
5282
build_os=$build_os
5283

    
5284
# An echo program that does not interpret backslashes.
5285
echo=$lt_echo
5286

    
5287
# The archiver.
5288
AR=$lt_AR
5289
AR_FLAGS=$lt_AR_FLAGS
5290

    
5291
# A C compiler.
5292
LTCC=$lt_LTCC
5293

    
5294
# LTCC compiler flags.
5295
LTCFLAGS=$lt_LTCFLAGS
5296

    
5297
# A language-specific compiler.
5298
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
5299

    
5300
# Is the compiler the GNU C compiler?
5301
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
5302

    
5303
# An ERE matcher.
5304
EGREP=$lt_EGREP
5305

    
5306
# The linker used to build libraries.
5307
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
5308

    
5309
# Whether we need hard or soft links.
5310
LN_S=$lt_LN_S
5311

    
5312
# A BSD-compatible nm program.
5313
NM=$lt_NM
5314

    
5315
# A symbol stripping program
5316
STRIP=$lt_STRIP
5317

    
5318
# Used to examine libraries when file_magic_cmd begins "file"
5319
MAGIC_CMD=$MAGIC_CMD
5320

    
5321
# Used on cygwin: DLL creation program.
5322
DLLTOOL="$DLLTOOL"
5323

    
5324
# Used on cygwin: object dumper.
5325
OBJDUMP="$OBJDUMP"
5326

    
5327
# Used on cygwin: assembler.
5328
AS="$AS"
5329

    
5330
# The name of the directory that contains temporary libtool files.
5331
objdir=$objdir
5332

    
5333
# How to create reloadable object files.
5334
reload_flag=$lt_reload_flag
5335
reload_cmds=$lt_reload_cmds
5336

    
5337
# How to pass a linker flag through the compiler.
5338
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5339

    
5340
# Object file suffix (normally "o").
5341
objext="$ac_objext"
5342

    
5343
# Old archive suffix (normally "a").
5344
libext="$libext"
5345

    
5346
# Shared library suffix (normally ".so").
5347
shrext_cmds='$shrext_cmds'
5348

    
5349
# Executable file suffix (normally "").
5350
exeext="$exeext"
5351

    
5352
# Additional compiler flags for building library objects.
5353
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
5354
pic_mode=$pic_mode
5355

    
5356
# What is the maximum length of a command?
5357
max_cmd_len=$lt_cv_sys_max_cmd_len
5358

    
5359
# Does compiler simultaneously support -c and -o options?
5360
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
5361

    
5362
# Must we lock files when doing compilation?
5363
need_locks=$lt_need_locks
5364

    
5365
# Do we need the lib prefix for modules?
5366
need_lib_prefix=$need_lib_prefix
5367

    
5368
# Do we need a version for libraries?
5369
need_version=$need_version
5370

    
5371
# Whether dlopen is supported.
5372
dlopen_support=$enable_dlopen
5373

    
5374
# Whether dlopen of programs is supported.
5375
dlopen_self=$enable_dlopen_self
5376

    
5377
# Whether dlopen of statically linked programs is supported.
5378
dlopen_self_static=$enable_dlopen_self_static
5379

    
5380
# Compiler flag to prevent dynamic linking.
5381
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
5382

    
5383
# Compiler flag to turn off builtin functions.
5384
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
5385

    
5386
# Compiler flag to allow reflexive dlopens.
5387
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
5388

    
5389
# Compiler flag to generate shared objects directly from archives.
5390
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
5391

    
5392
# Compiler flag to generate thread-safe objects.
5393
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
5394

    
5395
# Library versioning type.
5396
version_type=$version_type
5397

    
5398
# Format of library name prefix.
5399
libname_spec=$lt_libname_spec
5400

    
5401
# List of archive names.  First name is the real one, the rest are links.
5402
# The last name is the one that the linker finds with -lNAME.
5403
library_names_spec=$lt_library_names_spec
5404

    
5405
# The coded name of the library, if different from the real name.
5406
soname_spec=$lt_soname_spec
5407

    
5408
# Commands used to build and install an old-style archive.
5409
RANLIB=$lt_RANLIB
5410
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
5411
old_postinstall_cmds=$lt_old_postinstall_cmds
5412
old_postuninstall_cmds=$lt_old_postuninstall_cmds
5413

    
5414
# Create an old-style archive from a shared archive.
5415
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
5416

    
5417
# Create a temporary old-style archive to link instead of a shared archive.
5418
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
5419

    
5420
# Commands used to build and install a shared archive.
5421
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
5422
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
5423
postinstall_cmds=$lt_postinstall_cmds
5424
postuninstall_cmds=$lt_postuninstall_cmds
5425

    
5426
# Commands used to build a loadable module (assumed same as above if empty)
5427
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
5428
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
5429

    
5430
# Commands to strip libraries.
5431
old_striplib=$lt_old_striplib
5432
striplib=$lt_striplib
5433

    
5434
# Dependencies to place before the objects being linked to create a
5435
# shared library.
5436
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
5437

    
5438
# Dependencies to place after the objects being linked to create a
5439
# shared library.
5440
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
5441

    
5442
# Dependencies to place before the objects being linked to create a
5443
# shared library.
5444
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
5445

    
5446
# Dependencies to place after the objects being linked to create a
5447
# shared library.
5448
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
5449

    
5450
# The directories searched by this compiler when creating a shared
5451
# library
5452
compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)
5453

    
5454
# The library search path used internally by the compiler when linking
5455
# a shared library.
5456
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
5457

    
5458
# Method to check whether dependent libraries are shared objects.
5459
deplibs_check_method=$lt_deplibs_check_method
5460

    
5461
# Command to use when deplibs_check_method == file_magic.
5462
file_magic_cmd=$lt_file_magic_cmd
5463

    
5464
# Flag that allows shared libraries with undefined symbols to be built.
5465
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
5466

    
5467
# Flag that forces no undefined symbols.
5468
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
5469

    
5470
# Commands used to finish a libtool library installation in a directory.
5471
finish_cmds=$lt_finish_cmds
5472

    
5473
# Same as above, but a single script fragment to be evaled but not shown.
5474
finish_eval=$lt_finish_eval
5475

    
5476
# Take the output of nm and produce a listing of raw symbols and C names.
5477
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
5478

    
5479
# Transform the output of nm in a proper C declaration
5480
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
5481

    
5482
# Transform the output of nm in a C name address pair
5483
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
5484

    
5485
# This is the shared library runtime path variable.
5486
runpath_var=$runpath_var
5487

    
5488
# This is the shared library path variable.
5489
shlibpath_var=$shlibpath_var
5490

    
5491
# Is shlibpath searched before the hard-coded library search path?
5492
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
5493

    
5494
# How to hardcode a shared library path into an executable.
5495
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
5496

    
5497
# Whether we should hardcode library paths into libraries.
5498
hardcode_into_libs=$hardcode_into_libs
5499

    
5500
# Flag to hardcode \$libdir into a binary during linking.
5501
# This must work even if \$libdir does not exist.
5502
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
5503

    
5504
# If ld is used when linking, flag to hardcode \$libdir into
5505
# a binary during linking. This must work even if \$libdir does
5506
# not exist.
5507
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
5508

    
5509
# Whether we need a single -rpath flag with a separated argument.
5510
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
5511

    
5512
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
5513
# resulting binary.
5514
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
5515

    
5516
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5517
# resulting binary.
5518
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
5519

    
5520
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5521
# the resulting binary.
5522
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
5523

    
5524
# Set to yes if building a shared library automatically hardcodes DIR into the library
5525
# and all subsequent libraries and executables linked against it.
5526
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
5527

    
5528
# Variables whose values should be saved in libtool wrapper scripts and
5529
# restored at relink time.
5530
variables_saved_for_relink="$variables_saved_for_relink"
5531

    
5532
# Whether libtool must link a program against all its dependency libraries.
5533
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
5534

    
5535
# Compile-time system search path for libraries
5536
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5537

    
5538
# Run-time system search path for libraries
5539
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
5540

    
5541
# Fix the shell variable \$srcfile for the compiler.
5542
fix_srcfile_path=$lt_fix_srcfile_path
5543

    
5544
# Set to yes if exported symbols are required.
5545
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
5546

    
5547
# The commands to list exported symbols.
5548
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
5549

    
5550
# The commands to extract the exported symbol list from a shared archive.
5551
extract_expsyms_cmds=$lt_extract_expsyms_cmds
5552

    
5553
# Symbols that should not be listed in the preloaded symbols.
5554
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
5555

    
5556
# Symbols that must always be exported.
5557
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
5558

    
5559
ifelse([$1],[],
5560
[# ### END LIBTOOL CONFIG],
5561
[# ### END LIBTOOL TAG CONFIG: $tagname])
5562

    
5563
__EOF__
5564

    
5565
ifelse([$1],[], [
5566
  case $host_os in
5567
  aix3*)
5568
    cat <<\EOF >> "$cfgfile"
5569

    
5570
# AIX sometimes has problems with the GCC collect2 program.  For some
5571
# reason, if we set the COLLECT_NAMES environment variable, the problems
5572
# vanish in a puff of smoke.