The data contained in this repository can be downloaded to your computer using one of several clients.
Please see the documentation of your version control software client for more information.

Please select the desired protocol below to get the URL.

This URL has Read-Only access.

Statistics
| Branch: | Revision:

main_repo / deps / libeio / aclocal.m4 @ c5183738

History | View | Annotate | Download (256 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
# Add --enable-maintainer-mode option to configure.
837
# From Jim Meyering
838

    
839
# Copyright 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
840

    
841
# This program is free software; you can redistribute it and/or modify
842
# it under the terms of the GNU General Public License as published by
843
# the Free Software Foundation; either version 2, or (at your option)
844
# any later version.
845

    
846
# This program is distributed in the hope that it will be useful,
847
# but WITHOUT ANY WARRANTY; without even the implied warranty of
848
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
849
# GNU General Public License for more details.
850

    
851
# You should have received a copy of the GNU General Public License
852
# along with this program; if not, write to the Free Software
853
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
854
# 02111-1307, USA.
855

    
856
# serial 2
857

    
858
AC_DEFUN([AM_MAINTAINER_MODE],
859
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
860
  dnl maintainer-mode is disabled by default
861
  AC_ARG_ENABLE(maintainer-mode,
862
[  --enable-maintainer-mode enable make rules and dependencies not useful
863
                          (and sometimes confusing) to the casual installer],
864
      USE_MAINTAINER_MODE=$enableval,
865
      USE_MAINTAINER_MODE=no)
866
  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
867
  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
868
  MAINT=$MAINTAINER_MODE_TRUE
869
  AC_SUBST(MAINT)dnl
870
]
871
)
872

    
873
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
874

    
875
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
876

    
877
# serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL
878

    
879

    
880
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
881
# -----------------------------------------------------------
882
# If this macro is not defined by Autoconf, define it here.
883
m4_ifdef([AC_PROVIDE_IFELSE],
884
         [],
885
         [m4_define([AC_PROVIDE_IFELSE],
886
	         [m4_ifdef([AC_PROVIDE_$1],
887
		           [$2], [$3])])])
888

    
889

    
890
# AC_PROG_LIBTOOL
891
# ---------------
892
AC_DEFUN([AC_PROG_LIBTOOL],
893
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
894
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
895
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
896
  AC_PROVIDE_IFELSE([AC_PROG_CXX],
897
    [AC_LIBTOOL_CXX],
898
    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
899
  ])])
900
dnl And a similar setup for Fortran 77 support
901
  AC_PROVIDE_IFELSE([AC_PROG_F77],
902
    [AC_LIBTOOL_F77],
903
    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
904
])])
905

    
906
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
907
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
908
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
909
  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
910
    [AC_LIBTOOL_GCJ],
911
    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
912
      [AC_LIBTOOL_GCJ],
913
      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
914
	[AC_LIBTOOL_GCJ],
915
      [ifdef([AC_PROG_GCJ],
916
	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
917
       ifdef([A][M_PROG_GCJ],
918
	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
919
       ifdef([LT_AC_PROG_GCJ],
920
	     [define([LT_AC_PROG_GCJ],
921
		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
922
])])# AC_PROG_LIBTOOL
923

    
924

    
925
# _AC_PROG_LIBTOOL
926
# ----------------
927
AC_DEFUN([_AC_PROG_LIBTOOL],
928
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
929
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
930
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
931
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
932

    
933
# This can be used to rebuild libtool when needed
934
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
935

    
936
# Always use our own libtool.
937
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
938
AC_SUBST(LIBTOOL)dnl
939

    
940
# Prevent multiple expansion
941
define([AC_PROG_LIBTOOL], [])
942
])# _AC_PROG_LIBTOOL
943

    
944

    
945
# AC_LIBTOOL_SETUP
946
# ----------------
947
AC_DEFUN([AC_LIBTOOL_SETUP],
948
[AC_PREREQ(2.50)dnl
949
AC_REQUIRE([AC_ENABLE_SHARED])dnl
950
AC_REQUIRE([AC_ENABLE_STATIC])dnl
951
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
952
AC_REQUIRE([AC_CANONICAL_HOST])dnl
953
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
954
AC_REQUIRE([AC_PROG_CC])dnl
955
AC_REQUIRE([AC_PROG_LD])dnl
956
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
957
AC_REQUIRE([AC_PROG_NM])dnl
958

    
959
AC_REQUIRE([AC_PROG_LN_S])dnl
960
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
961
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
962
AC_REQUIRE([AC_OBJEXT])dnl
963
AC_REQUIRE([AC_EXEEXT])dnl
964
dnl
965

    
966
AC_LIBTOOL_SYS_MAX_CMD_LEN
967
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
968
AC_LIBTOOL_OBJDIR
969

    
970
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
971
_LT_AC_PROG_ECHO_BACKSLASH
972

    
973
case $host_os in
974
aix3*)
975
  # AIX sometimes has problems with the GCC collect2 program.  For some
976
  # reason, if we set the COLLECT_NAMES environment variable, the problems
977
  # vanish in a puff of smoke.
978
  if test "X${COLLECT_NAMES+set}" != Xset; then
979
    COLLECT_NAMES=
980
    export COLLECT_NAMES
981
  fi
982
  ;;
983
esac
984

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

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

    
993
# Sed substitution to delay expansion of an escaped shell variable in a
994
# double_quote_subst'ed string.
995
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
996

    
997
# Sed substitution to avoid accidental globbing in evaled expressions
998
no_glob_subst='s/\*/\\\*/g'
999

    
1000
# Constants:
1001
rm="rm -f"
1002

    
1003
# Global variables:
1004
default_ofile=libtool
1005
can_build_shared=yes
1006

    
1007
# All known linkers require a `.a' archive for static linking (except MSVC,
1008
# which needs '.lib').
1009
libext=a
1010
ltmain="$ac_aux_dir/ltmain.sh"
1011
ofile="$default_ofile"
1012
with_gnu_ld="$lt_cv_prog_gnu_ld"
1013

    
1014
AC_CHECK_TOOL(AR, ar, false)
1015
AC_CHECK_TOOL(RANLIB, ranlib, :)
1016
AC_CHECK_TOOL(STRIP, strip, :)
1017

    
1018
old_CC="$CC"
1019
old_CFLAGS="$CFLAGS"
1020

    
1021
# Set sane defaults for various variables
1022
test -z "$AR" && AR=ar
1023
test -z "$AR_FLAGS" && AR_FLAGS=cru
1024
test -z "$AS" && AS=as
1025
test -z "$CC" && CC=cc
1026
test -z "$LTCC" && LTCC=$CC
1027
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1028
test -z "$DLLTOOL" && DLLTOOL=dlltool
1029
test -z "$LD" && LD=ld
1030
test -z "$LN_S" && LN_S="ln -s"
1031
test -z "$MAGIC_CMD" && MAGIC_CMD=file
1032
test -z "$NM" && NM=nm
1033
test -z "$SED" && SED=sed
1034
test -z "$OBJDUMP" && OBJDUMP=objdump
1035
test -z "$RANLIB" && RANLIB=:
1036
test -z "$STRIP" && STRIP=:
1037
test -z "$ac_objext" && ac_objext=o
1038

    
1039
# Determine commands to create old-style static archives.
1040
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1041
old_postinstall_cmds='chmod 644 $oldlib'
1042
old_postuninstall_cmds=
1043

    
1044
if test -n "$RANLIB"; then
1045
  case $host_os in
1046
  openbsd*)
1047
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1048
    ;;
1049
  *)
1050
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1051
    ;;
1052
  esac
1053
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1054
fi
1055

    
1056
_LT_CC_BASENAME([$compiler])
1057

    
1058
# Only perform the check for file, if the check method requires it
1059
case $deplibs_check_method in
1060
file_magic*)
1061
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1062
    AC_PATH_MAGIC
1063
  fi
1064
  ;;
1065
esac
1066

    
1067
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1068
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1069
enable_win32_dll=yes, enable_win32_dll=no)
1070

    
1071
AC_ARG_ENABLE([libtool-lock],
1072
    [AC_HELP_STRING([--disable-libtool-lock],
1073
	[avoid locking (might break parallel builds)])])
1074
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1075

    
1076
AC_ARG_WITH([pic],
1077
    [AC_HELP_STRING([--with-pic],
1078
	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1079
    [pic_mode="$withval"],
1080
    [pic_mode=default])
1081
test -z "$pic_mode" && pic_mode=default
1082

    
1083
# Use C for the default configuration in the libtool script
1084
tagname=
1085
AC_LIBTOOL_LANG_C_CONFIG
1086
_LT_AC_TAGCONFIG
1087
])# AC_LIBTOOL_SETUP
1088

    
1089

    
1090
# _LT_AC_SYS_COMPILER
1091
# -------------------
1092
AC_DEFUN([_LT_AC_SYS_COMPILER],
1093
[AC_REQUIRE([AC_PROG_CC])dnl
1094

    
1095
# If no C compiler was specified, use CC.
1096
LTCC=${LTCC-"$CC"}
1097

    
1098
# If no C compiler flags were specified, use CFLAGS.
1099
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1100

    
1101
# Allow CC to be a program name with arguments.
1102
compiler=$CC
1103
])# _LT_AC_SYS_COMPILER
1104

    
1105

    
1106
# _LT_CC_BASENAME(CC)
1107
# -------------------
1108
# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1109
AC_DEFUN([_LT_CC_BASENAME],
1110
[for cc_temp in $1""; do
1111
  case $cc_temp in
1112
    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1113
    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1114
    \-*) ;;
1115
    *) break;;
1116
  esac
1117
done
1118
cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1119
])
1120

    
1121

    
1122
# _LT_COMPILER_BOILERPLATE
1123
# ------------------------
1124
# Check for compiler boilerplate output or warnings with
1125
# the simple compiler test code.
1126
AC_DEFUN([_LT_COMPILER_BOILERPLATE],
1127
[ac_outfile=conftest.$ac_objext
1128
printf "$lt_simple_compile_test_code" >conftest.$ac_ext
1129
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1130
_lt_compiler_boilerplate=`cat conftest.err`
1131
$rm conftest*
1132
])# _LT_COMPILER_BOILERPLATE
1133

    
1134

    
1135
# _LT_LINKER_BOILERPLATE
1136
# ----------------------
1137
# Check for linker boilerplate output or warnings with
1138
# the simple link test code.
1139
AC_DEFUN([_LT_LINKER_BOILERPLATE],
1140
[ac_outfile=conftest.$ac_objext
1141
printf "$lt_simple_link_test_code" >conftest.$ac_ext
1142
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1143
_lt_linker_boilerplate=`cat conftest.err`
1144
$rm conftest*
1145
])# _LT_LINKER_BOILERPLATE
1146

    
1147

    
1148
# _LT_AC_SYS_LIBPATH_AIX
1149
# ----------------------
1150
# Links a minimal program and checks the executable
1151
# for the system default hardcoded library path. In most cases,
1152
# this is /usr/lib:/lib, but when the MPI compilers are used
1153
# the location of the communication and MPI libs are included too.
1154
# If we don't find anything, use the default library path according
1155
# to the aix ld manual.
1156
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1157
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1158
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
1159
}'`
1160
# Check for a 64-bit object if we didn't find anything.
1161
if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
1162
}'`; fi],[])
1163
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1164
])# _LT_AC_SYS_LIBPATH_AIX
1165

    
1166

    
1167
# _LT_AC_SHELL_INIT(ARG)
1168
# ----------------------
1169
AC_DEFUN([_LT_AC_SHELL_INIT],
1170
[ifdef([AC_DIVERSION_NOTICE],
1171
	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1172
	 [AC_DIVERT_PUSH(NOTICE)])
1173
$1
1174
AC_DIVERT_POP
1175
])# _LT_AC_SHELL_INIT
1176

    
1177

    
1178
# _LT_AC_PROG_ECHO_BACKSLASH
1179
# --------------------------
1180
# Add some code to the start of the generated configure script which
1181
# will find an echo command which doesn't interpret backslashes.
1182
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1183
[_LT_AC_SHELL_INIT([
1184
# Check that we are running under the correct shell.
1185
SHELL=${CONFIG_SHELL-/bin/sh}
1186

    
1187
case X$ECHO in
1188
X*--fallback-echo)
1189
  # Remove one level of quotation (which was required for Make).
1190
  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1191
  ;;
1192
esac
1193

    
1194
echo=${ECHO-echo}
1195
if test "X[$]1" = X--no-reexec; then
1196
  # Discard the --no-reexec flag, and continue.
1197
  shift
1198
elif test "X[$]1" = X--fallback-echo; then
1199
  # Avoid inline document here, it may be left over
1200
  :
1201
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1202
  # Yippee, $echo works!
1203
  :
1204
else
1205
  # Restart under the correct shell.
1206
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1207
fi
1208

    
1209
if test "X[$]1" = X--fallback-echo; then
1210
  # used as fallback echo
1211
  shift
1212
  cat <<EOF
1213
[$]*
1214
EOF
1215
  exit 0
1216
fi
1217

    
1218
# The HP-UX ksh and POSIX shell print the target directory to stdout
1219
# if CDPATH is set.
1220
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1221

    
1222
if test -z "$ECHO"; then
1223
if test "X${echo_test_string+set}" != Xset; then
1224
# find a string as large as possible, as long as the shell can cope with it
1225
  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1226
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1227
    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
1228
       echo_test_string=`eval $cmd` &&
1229
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1230
    then
1231
      break
1232
    fi
1233
  done
1234
fi
1235

    
1236
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1237
   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1238
   test "X$echo_testing_string" = "X$echo_test_string"; then
1239
  :
1240
else
1241
  # The Solaris, AIX, and Digital Unix default echo programs unquote
1242
  # backslashes.  This makes it impossible to quote backslashes using
1243
  #   echo "$something" | sed 's/\\/\\\\/g'
1244
  #
1245
  # So, first we look for a working echo in the user's PATH.
1246

    
1247
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1248
  for dir in $PATH /usr/ucb; do
1249
    IFS="$lt_save_ifs"
1250
    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1251
       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1252
       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1253
       test "X$echo_testing_string" = "X$echo_test_string"; then
1254
      echo="$dir/echo"
1255
      break
1256
    fi
1257
  done
1258
  IFS="$lt_save_ifs"
1259

    
1260
  if test "X$echo" = Xecho; then
1261
    # We didn't find a better echo, so look for alternatives.
1262
    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1263
       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1264
       test "X$echo_testing_string" = "X$echo_test_string"; then
1265
      # This shell has a builtin print -r that does the trick.
1266
      echo='print -r'
1267
    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1268
	 test "X$CONFIG_SHELL" != X/bin/ksh; then
1269
      # If we have ksh, try running configure again with it.
1270
      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1271
      export ORIGINAL_CONFIG_SHELL
1272
      CONFIG_SHELL=/bin/ksh
1273
      export CONFIG_SHELL
1274
      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1275
    else
1276
      # Try using printf.
1277
      echo='printf %s\n'
1278
      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1279
	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1280
	 test "X$echo_testing_string" = "X$echo_test_string"; then
1281
	# Cool, printf works
1282
	:
1283
      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1284
	   test "X$echo_testing_string" = 'X\t' &&
1285
	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1286
	   test "X$echo_testing_string" = "X$echo_test_string"; then
1287
	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1288
	export CONFIG_SHELL
1289
	SHELL="$CONFIG_SHELL"
1290
	export SHELL
1291
	echo="$CONFIG_SHELL [$]0 --fallback-echo"
1292
      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1293
	   test "X$echo_testing_string" = 'X\t' &&
1294
	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1295
	   test "X$echo_testing_string" = "X$echo_test_string"; then
1296
	echo="$CONFIG_SHELL [$]0 --fallback-echo"
1297
      else
1298
	# maybe with a smaller string...
1299
	prev=:
1300

    
1301
	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1302
	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1303
	  then
1304
	    break
1305
	  fi
1306
	  prev="$cmd"
1307
	done
1308

    
1309
	if test "$prev" != 'sed 50q "[$]0"'; then
1310
	  echo_test_string=`eval $prev`
1311
	  export echo_test_string
1312
	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1313
	else
1314
	  # Oops.  We lost completely, so just stick with echo.
1315
	  echo=echo
1316
	fi
1317
      fi
1318
    fi
1319
  fi
1320
fi
1321
fi
1322

    
1323
# Copy echo and quote the copy suitably for passing to libtool from
1324
# the Makefile, instead of quoting the original, which is used later.
1325
ECHO=$echo
1326
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1327
   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1328
fi
1329

    
1330
AC_SUBST(ECHO)
1331
])])# _LT_AC_PROG_ECHO_BACKSLASH
1332

    
1333

    
1334
# _LT_AC_LOCK
1335
# -----------
1336
AC_DEFUN([_LT_AC_LOCK],
1337
[AC_ARG_ENABLE([libtool-lock],
1338
    [AC_HELP_STRING([--disable-libtool-lock],
1339
	[avoid locking (might break parallel builds)])])
1340
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1341

    
1342
# Some flags need to be propagated to the compiler or linker for good
1343
# libtool support.
1344
case $host in
1345
ia64-*-hpux*)
1346
  # Find out which ABI we are using.
1347
  echo 'int i;' > conftest.$ac_ext
1348
  if AC_TRY_EVAL(ac_compile); then
1349
    case `/usr/bin/file conftest.$ac_objext` in
1350
    *ELF-32*)
1351
      HPUX_IA64_MODE="32"
1352
      ;;
1353
    *ELF-64*)
1354
      HPUX_IA64_MODE="64"
1355
      ;;
1356
    esac
1357
  fi
1358
  rm -rf conftest*
1359
  ;;
1360
*-*-irix6*)
1361
  # Find out which ABI we are using.
1362
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1363
  if AC_TRY_EVAL(ac_compile); then
1364
   if test "$lt_cv_prog_gnu_ld" = yes; then
1365
    case `/usr/bin/file conftest.$ac_objext` in
1366
    *32-bit*)
1367
      LD="${LD-ld} -melf32bsmip"
1368
      ;;
1369
    *N32*)
1370
      LD="${LD-ld} -melf32bmipn32"
1371
      ;;
1372
    *64-bit*)
1373
      LD="${LD-ld} -melf64bmip"
1374
      ;;
1375
    esac
1376
   else
1377
    case `/usr/bin/file conftest.$ac_objext` in
1378
    *32-bit*)
1379
      LD="${LD-ld} -32"
1380
      ;;
1381
    *N32*)
1382
      LD="${LD-ld} -n32"
1383
      ;;
1384
    *64-bit*)
1385
      LD="${LD-ld} -64"
1386
      ;;
1387
    esac
1388
   fi
1389
  fi
1390
  rm -rf conftest*
1391
  ;;
1392

    
1393
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
1394
  # Find out which ABI we are using.
1395
  echo 'int i;' > conftest.$ac_ext
1396
  if AC_TRY_EVAL(ac_compile); then
1397
    case `/usr/bin/file conftest.o` in
1398
    *32-bit*)
1399
      case $host in
1400
        x86_64-*linux*)
1401
          LD="${LD-ld} -m elf_i386"
1402
          ;;
1403
        ppc64-*linux*|powerpc64-*linux*)
1404
          LD="${LD-ld} -m elf32ppclinux"
1405
          ;;
1406
        s390x-*linux*)
1407
          LD="${LD-ld} -m elf_s390"
1408
          ;;
1409
        sparc64-*linux*)
1410
          LD="${LD-ld} -m elf32_sparc"
1411
          ;;
1412
      esac
1413
      ;;
1414
    *64-bit*)
1415
      case $host in
1416
        x86_64-*linux*)
1417
          LD="${LD-ld} -m elf_x86_64"
1418
          ;;
1419
        ppc*-*linux*|powerpc*-*linux*)
1420
          LD="${LD-ld} -m elf64ppc"
1421
          ;;
1422
        s390*-*linux*)
1423
          LD="${LD-ld} -m elf64_s390"
1424
          ;;
1425
        sparc*-*linux*)
1426
          LD="${LD-ld} -m elf64_sparc"
1427
          ;;
1428
      esac
1429
      ;;
1430
    esac
1431
  fi
1432
  rm -rf conftest*
1433
  ;;
1434

    
1435
*-*-sco3.2v5*)
1436
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1437
  SAVE_CFLAGS="$CFLAGS"
1438
  CFLAGS="$CFLAGS -belf"
1439
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1440
    [AC_LANG_PUSH(C)
1441
     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1442
     AC_LANG_POP])
1443
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1444
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1445
    CFLAGS="$SAVE_CFLAGS"
1446
  fi
1447
  ;;
1448
sparc*-*solaris*)
1449
  # Find out which ABI we are using.
1450
  echo 'int i;' > conftest.$ac_ext
1451
  if AC_TRY_EVAL(ac_compile); then
1452
    case `/usr/bin/file conftest.o` in
1453
    *64-bit*)
1454
      case $lt_cv_prog_gnu_ld in
1455
      yes*) LD="${LD-ld} -m elf64_sparc" ;;
1456
      *)    LD="${LD-ld} -64" ;;
1457
      esac
1458
      ;;
1459
    esac
1460
  fi
1461
  rm -rf conftest*
1462
  ;;
1463

    
1464
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1465
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1466
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1467
  AC_CHECK_TOOL(AS, as, false)
1468
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
1469
  ;;
1470
  ])
1471
esac
1472

    
1473
need_locks="$enable_libtool_lock"
1474

    
1475
])# _LT_AC_LOCK
1476

    
1477

    
1478
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1479
#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1480
# ----------------------------------------------------------------
1481
# Check whether the given compiler option works
1482
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1483
[AC_REQUIRE([LT_AC_PROG_SED])
1484
AC_CACHE_CHECK([$1], [$2],
1485
  [$2=no
1486
  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1487
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1488
   lt_compiler_flag="$3"
1489
   # Insert the option either (1) after the last *FLAGS variable, or
1490
   # (2) before a word containing "conftest.", or (3) at the end.
1491
   # Note that $ac_compile itself does not contain backslashes and begins
1492
   # with a dollar sign (not a hyphen), so the echo should work correctly.
1493
   # The option is referenced via a variable to avoid confusing sed.
1494
   lt_compile=`echo "$ac_compile" | $SED \
1495
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1496
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1497
   -e 's:$: $lt_compiler_flag:'`
1498
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1499
   (eval "$lt_compile" 2>conftest.err)
1500
   ac_status=$?
1501
   cat conftest.err >&AS_MESSAGE_LOG_FD
1502
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1503
   if (exit $ac_status) && test -s "$ac_outfile"; then
1504
     # The compiler can only warn and ignore the option if not recognized
1505
     # So say no if there are warnings other than the usual output.
1506
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1507
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1508
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1509
       $2=yes
1510
     fi
1511
   fi
1512
   $rm conftest*
1513
])
1514

    
1515
if test x"[$]$2" = xyes; then
1516
    ifelse([$5], , :, [$5])
1517
else
1518
    ifelse([$6], , :, [$6])
1519
fi
1520
])# AC_LIBTOOL_COMPILER_OPTION
1521

    
1522

    
1523
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1524
#                          [ACTION-SUCCESS], [ACTION-FAILURE])
1525
# ------------------------------------------------------------
1526
# Check whether the given compiler option works
1527
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1528
[AC_CACHE_CHECK([$1], [$2],
1529
  [$2=no
1530
   save_LDFLAGS="$LDFLAGS"
1531
   LDFLAGS="$LDFLAGS $3"
1532
   printf "$lt_simple_link_test_code" > conftest.$ac_ext
1533
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1534
     # The linker can only warn and ignore the option if not recognized
1535
     # So say no if there are warnings
1536
     if test -s conftest.err; then
1537
       # Append any errors to the config.log.
1538
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1539
       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1540
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1541
       if diff conftest.exp conftest.er2 >/dev/null; then
1542
         $2=yes
1543
       fi
1544
     else
1545
       $2=yes
1546
     fi
1547
   fi
1548
   $rm conftest*
1549
   LDFLAGS="$save_LDFLAGS"
1550
])
1551

    
1552
if test x"[$]$2" = xyes; then
1553
    ifelse([$4], , :, [$4])
1554
else
1555
    ifelse([$5], , :, [$5])
1556
fi
1557
])# AC_LIBTOOL_LINKER_OPTION
1558

    
1559

    
1560
# AC_LIBTOOL_SYS_MAX_CMD_LEN
1561
# --------------------------
1562
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1563
[# find the maximum length of command line arguments
1564
AC_MSG_CHECKING([the maximum length of command line arguments])
1565
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1566
  i=0
1567
  teststring="ABCD"
1568

    
1569
  case $build_os in
1570
  msdosdjgpp*)
1571
    # On DJGPP, this test can blow up pretty badly due to problems in libc
1572
    # (any single argument exceeding 2000 bytes causes a buffer overrun
1573
    # during glob expansion).  Even if it were fixed, the result of this
1574
    # check would be larger than it should be.
1575
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1576
    ;;
1577

    
1578
  gnu*)
1579
    # Under GNU Hurd, this test is not required because there is
1580
    # no limit to the length of command line arguments.
1581
    # Libtool will interpret -1 as no limit whatsoever
1582
    lt_cv_sys_max_cmd_len=-1;
1583
    ;;
1584

    
1585
  cygwin* | mingw*)
1586
    # On Win9x/ME, this test blows up -- it succeeds, but takes
1587
    # about 5 minutes as the teststring grows exponentially.
1588
    # Worse, since 9x/ME are not pre-emptively multitasking,
1589
    # you end up with a "frozen" computer, even though with patience
1590
    # the test eventually succeeds (with a max line length of 256k).
1591
    # Instead, let's just punt: use the minimum linelength reported by
1592
    # all of the supported platforms: 8192 (on NT/2K/XP).
1593
    lt_cv_sys_max_cmd_len=8192;
1594
    ;;
1595

    
1596
  amigaos*)
1597
    # On AmigaOS with pdksh, this test takes hours, literally.
1598
    # So we just punt and use a minimum line length of 8192.
1599
    lt_cv_sys_max_cmd_len=8192;
1600
    ;;
1601

    
1602
  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1603
    # This has been around since 386BSD, at least.  Likely further.
1604
    if test -x /sbin/sysctl; then
1605
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1606
    elif test -x /usr/sbin/sysctl; then
1607
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1608
    else
1609
      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
1610
    fi
1611
    # And add a safety zone
1612
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1613
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1614
    ;;
1615

    
1616
  interix*)
1617
    # We know the value 262144 and hardcode it with a safety zone (like BSD)
1618
    lt_cv_sys_max_cmd_len=196608
1619
    ;;
1620

    
1621
  osf*)
1622
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1623
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1624
    # nice to cause kernel panics so lets avoid the loop below.
1625
    # First set a reasonable default.
1626
    lt_cv_sys_max_cmd_len=16384
1627
    #
1628
    if test -x /sbin/sysconfig; then
1629
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1630
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
1631
      esac
1632
    fi
1633
    ;;
1634
  sco3.2v5*)
1635
    lt_cv_sys_max_cmd_len=102400
1636
    ;;
1637
  sysv5* | sco5v6* | sysv4.2uw2*)
1638
    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1639
    if test -n "$kargmax"; then
1640
      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
1641
    else
1642
      lt_cv_sys_max_cmd_len=32768
1643
    fi
1644
    ;;
1645
  *)
1646
    # If test is not a shell built-in, we'll probably end up computing a
1647
    # maximum length that is only half of the actual maximum length, but
1648
    # we can't tell.
1649
    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1650
    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
1651
	       = "XX$teststring") >/dev/null 2>&1 &&
1652
	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
1653
	    lt_cv_sys_max_cmd_len=$new_result &&
1654
	    test $i != 17 # 1/2 MB should be enough
1655
    do
1656
      i=`expr $i + 1`
1657
      teststring=$teststring$teststring
1658
    done
1659
    teststring=
1660
    # Add a significant safety factor because C++ compilers can tack on massive
1661
    # amounts of additional arguments before passing them to the linker.
1662
    # It appears as though 1/2 is a usable value.
1663
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1664
    ;;
1665
  esac
1666
])
1667
if test -n $lt_cv_sys_max_cmd_len ; then
1668
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1669
else
1670
  AC_MSG_RESULT(none)
1671
fi
1672
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1673

    
1674

    
1675
# _LT_AC_CHECK_DLFCN
1676
# ------------------
1677
AC_DEFUN([_LT_AC_CHECK_DLFCN],
1678
[AC_CHECK_HEADERS(dlfcn.h)dnl
1679
])# _LT_AC_CHECK_DLFCN
1680

    
1681

    
1682
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1683
#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1684
# ---------------------------------------------------------------------
1685
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1686
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1687
if test "$cross_compiling" = yes; then :
1688
  [$4]
1689
else
1690
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1691
  lt_status=$lt_dlunknown
1692
  cat > conftest.$ac_ext <<EOF
1693
[#line __oline__ "configure"
1694
#include "confdefs.h"
1695

    
1696
#if HAVE_DLFCN_H
1697
#include <dlfcn.h>
1698
#endif
1699

    
1700
#include <stdio.h>
1701

    
1702
#ifdef RTLD_GLOBAL
1703
#  define LT_DLGLOBAL		RTLD_GLOBAL
1704
#else
1705
#  ifdef DL_GLOBAL
1706
#    define LT_DLGLOBAL		DL_GLOBAL
1707
#  else
1708
#    define LT_DLGLOBAL		0
1709
#  endif
1710
#endif
1711

    
1712
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1713
   find out it does not work in some platform. */
1714
#ifndef LT_DLLAZY_OR_NOW
1715
#  ifdef RTLD_LAZY
1716
#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
1717
#  else
1718
#    ifdef DL_LAZY
1719
#      define LT_DLLAZY_OR_NOW		DL_LAZY
1720
#    else
1721
#      ifdef RTLD_NOW
1722
#        define LT_DLLAZY_OR_NOW	RTLD_NOW
1723
#      else
1724
#        ifdef DL_NOW
1725
#          define LT_DLLAZY_OR_NOW	DL_NOW
1726
#        else
1727
#          define LT_DLLAZY_OR_NOW	0
1728
#        endif
1729
#      endif
1730
#    endif
1731
#  endif
1732
#endif
1733

    
1734
#ifdef __cplusplus
1735
extern "C" void exit (int);
1736
#endif
1737

    
1738
void fnord() { int i=42;}
1739
int main ()
1740
{
1741
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1742
  int status = $lt_dlunknown;
1743

    
1744
  if (self)
1745
    {
1746
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1747
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1748
      /* dlclose (self); */
1749
    }
1750
  else
1751
    puts (dlerror ());
1752

    
1753
    exit (status);
1754
}]
1755
EOF
1756
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1757
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1758
    lt_status=$?
1759
    case x$lt_status in
1760
      x$lt_dlno_uscore) $1 ;;
1761
      x$lt_dlneed_uscore) $2 ;;
1762
      x$lt_dlunknown|x*) $3 ;;
1763
    esac
1764
  else :
1765
    # compilation failed
1766
    $3
1767
  fi
1768
fi
1769
rm -fr conftest*
1770
])# _LT_AC_TRY_DLOPEN_SELF
1771

    
1772

    
1773
# AC_LIBTOOL_DLOPEN_SELF
1774
# ----------------------
1775
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1776
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1777
if test "x$enable_dlopen" != xyes; then
1778
  enable_dlopen=unknown
1779
  enable_dlopen_self=unknown
1780
  enable_dlopen_self_static=unknown
1781
else
1782
  lt_cv_dlopen=no
1783
  lt_cv_dlopen_libs=
1784

    
1785
  case $host_os in
1786
  beos*)
1787
    lt_cv_dlopen="load_add_on"
1788
    lt_cv_dlopen_libs=
1789
    lt_cv_dlopen_self=yes
1790
    ;;
1791

    
1792
  mingw* | pw32*)
1793
    lt_cv_dlopen="LoadLibrary"
1794
    lt_cv_dlopen_libs=
1795
   ;;
1796

    
1797
  cygwin*)
1798
    lt_cv_dlopen="dlopen"
1799
    lt_cv_dlopen_libs=
1800
   ;;
1801

    
1802
  darwin*)
1803
  # if libdl is installed we need to link against it
1804
    AC_CHECK_LIB([dl], [dlopen],
1805
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1806
    lt_cv_dlopen="dyld"
1807
    lt_cv_dlopen_libs=
1808
    lt_cv_dlopen_self=yes
1809
    ])
1810
   ;;
1811

    
1812
  *)
1813
    AC_CHECK_FUNC([shl_load],
1814
	  [lt_cv_dlopen="shl_load"],
1815
      [AC_CHECK_LIB([dld], [shl_load],
1816
	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1817
	[AC_CHECK_FUNC([dlopen],
1818
	      [lt_cv_dlopen="dlopen"],
1819
	  [AC_CHECK_LIB([dl], [dlopen],
1820
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1821
	    [AC_CHECK_LIB([svld], [dlopen],
1822
		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1823
	      [AC_CHECK_LIB([dld], [dld_link],
1824
		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1825
	      ])
1826
	    ])
1827
	  ])
1828
	])
1829
      ])
1830
    ;;
1831
  esac
1832

    
1833
  if test "x$lt_cv_dlopen" != xno; then
1834
    enable_dlopen=yes
1835
  else
1836
    enable_dlopen=no
1837
  fi
1838

    
1839
  case $lt_cv_dlopen in
1840
  dlopen)
1841
    save_CPPFLAGS="$CPPFLAGS"
1842
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1843

    
1844
    save_LDFLAGS="$LDFLAGS"
1845
    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1846

    
1847
    save_LIBS="$LIBS"
1848
    LIBS="$lt_cv_dlopen_libs $LIBS"
1849

    
1850
    AC_CACHE_CHECK([whether a program can dlopen itself],
1851
	  lt_cv_dlopen_self, [dnl
1852
	  _LT_AC_TRY_DLOPEN_SELF(
1853
	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1854
	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1855
    ])
1856

    
1857
    if test "x$lt_cv_dlopen_self" = xyes; then
1858
      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1859
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1860
    	  lt_cv_dlopen_self_static, [dnl
1861
	  _LT_AC_TRY_DLOPEN_SELF(
1862
	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1863
	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1864
      ])
1865
    fi
1866

    
1867
    CPPFLAGS="$save_CPPFLAGS"
1868
    LDFLAGS="$save_LDFLAGS"
1869
    LIBS="$save_LIBS"
1870
    ;;
1871
  esac
1872

    
1873
  case $lt_cv_dlopen_self in
1874
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1875
  *) enable_dlopen_self=unknown ;;
1876
  esac
1877

    
1878
  case $lt_cv_dlopen_self_static in
1879
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1880
  *) enable_dlopen_self_static=unknown ;;
1881
  esac
1882
fi
1883
])# AC_LIBTOOL_DLOPEN_SELF
1884

    
1885

    
1886
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1887
# ---------------------------------
1888
# Check to see if options -c and -o are simultaneously supported by compiler
1889
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1890
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1891
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1892
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1893
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1894
   $rm -r conftest 2>/dev/null
1895
   mkdir conftest
1896
   cd conftest
1897
   mkdir out
1898
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1899

    
1900
   lt_compiler_flag="-o out/conftest2.$ac_objext"
1901
   # Insert the option either (1) after the last *FLAGS variable, or
1902
   # (2) before a word containing "conftest.", or (3) at the end.
1903
   # Note that $ac_compile itself does not contain backslashes and begins
1904
   # with a dollar sign (not a hyphen), so the echo should work correctly.
1905
   lt_compile=`echo "$ac_compile" | $SED \
1906
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1907
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1908
   -e 's:$: $lt_compiler_flag:'`
1909
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1910
   (eval "$lt_compile" 2>out/conftest.err)
1911
   ac_status=$?
1912
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
1913
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1914
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
1915
   then
1916
     # The compiler can only warn and ignore the option if not recognized
1917
     # So say no if there are warnings
1918
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1919
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1920
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1921
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1922
     fi
1923
   fi
1924
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
1925
   $rm conftest*
1926
   # SGI C++ compiler will create directory out/ii_files/ for
1927
   # template instantiation
1928
   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1929
   $rm out/* && rmdir out
1930
   cd ..
1931
   rmdir conftest
1932
   $rm conftest*
1933
])
1934
])# AC_LIBTOOL_PROG_CC_C_O
1935

    
1936

    
1937
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1938
# -----------------------------------------
1939
# Check to see if we can do hard links to lock some files if needed
1940
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1941
[AC_REQUIRE([_LT_AC_LOCK])dnl
1942

    
1943
hard_links="nottested"
1944
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1945
  # do not overwrite the value of need_locks provided by the user
1946
  AC_MSG_CHECKING([if we can lock with hard links])
1947
  hard_links=yes
1948
  $rm conftest*
1949
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1950
  touch conftest.a
1951
  ln conftest.a conftest.b 2>&5 || hard_links=no
1952
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1953
  AC_MSG_RESULT([$hard_links])
1954
  if test "$hard_links" = no; then
1955
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1956
    need_locks=warn
1957
  fi
1958
else
1959
  need_locks=no
1960
fi
1961
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1962

    
1963

    
1964
# AC_LIBTOOL_OBJDIR
1965
# -----------------
1966
AC_DEFUN([AC_LIBTOOL_OBJDIR],
1967
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1968
[rm -f .libs 2>/dev/null
1969
mkdir .libs 2>/dev/null
1970
if test -d .libs; then
1971
  lt_cv_objdir=.libs
1972
else
1973
  # MS-DOS does not allow filenames that begin with a dot.
1974
  lt_cv_objdir=_libs
1975
fi
1976
rmdir .libs 2>/dev/null])
1977
objdir=$lt_cv_objdir
1978
])# AC_LIBTOOL_OBJDIR
1979

    
1980

    
1981
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1982
# ----------------------------------------------
1983
# Check hardcoding attributes.
1984
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1985
[AC_MSG_CHECKING([how to hardcode library paths into programs])
1986
_LT_AC_TAGVAR(hardcode_action, $1)=
1987
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1988
   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1989
   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1990

    
1991
  # We can hardcode non-existant directories.
1992
  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1993
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
1994
     # have to relink, otherwise we might link with an installed library
1995
     # when we should be linking with a yet-to-be-installed one
1996
     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1997
     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1998
    # Linking always hardcodes the temporary library directory.
1999
    _LT_AC_TAGVAR(hardcode_action, $1)=relink
2000
  else
2001
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2002
    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
2003
  fi
2004
else
2005
  # We cannot hardcode anything, or else we can only hardcode existing
2006
  # directories.
2007
  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
2008
fi
2009
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
2010

    
2011
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
2012
  # Fast installation is not supported
2013
  enable_fast_install=no
2014
elif test "$shlibpath_overrides_runpath" = yes ||
2015
     test "$enable_shared" = no; then
2016
  # Fast installation is not necessary
2017
  enable_fast_install=needless
2018
fi
2019
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2020

    
2021

    
2022
# AC_LIBTOOL_SYS_LIB_STRIP
2023
# ------------------------
2024
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2025
[striplib=
2026
old_striplib=
2027
AC_MSG_CHECKING([whether stripping libraries is possible])
2028
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2029
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2030
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2031
  AC_MSG_RESULT([yes])
2032
else
2033
# FIXME - insert some real tests, host_os isn't really good enough
2034
  case $host_os in
2035
   darwin*)
2036
       if test -n "$STRIP" ; then
2037
         striplib="$STRIP -x"
2038
         AC_MSG_RESULT([yes])
2039
       else
2040
  AC_MSG_RESULT([no])
2041
fi
2042
       ;;
2043
   *)
2044
  AC_MSG_RESULT([no])
2045
    ;;
2046
  esac
2047
fi
2048
])# AC_LIBTOOL_SYS_LIB_STRIP
2049

    
2050

    
2051
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2052
# -----------------------------
2053
# PORTME Fill in your ld.so characteristics
2054
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2055
[AC_MSG_CHECKING([dynamic linker characteristics])
2056
library_names_spec=
2057
libname_spec='lib$name'
2058
soname_spec=
2059
shrext_cmds=".so"
2060
postinstall_cmds=
2061
postuninstall_cmds=
2062
finish_cmds=
2063
finish_eval=
2064
shlibpath_var=
2065
shlibpath_overrides_runpath=unknown
2066
version_type=none
2067
dynamic_linker="$host_os ld.so"
2068
sys_lib_dlsearch_path_spec="/lib /usr/lib"
2069
if test "$GCC" = yes; then
2070
  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2071
  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
2072
    # if the path contains ";" then we assume it to be the separator
2073
    # otherwise default to the standard path separator (i.e. ":") - it is
2074
    # assumed that no part of a normal pathname contains ";" but that should
2075
    # okay in the real world where ";" in dirpaths is itself problematic.
2076
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2077
  else
2078
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2079
  fi
2080
else
2081
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2082
fi
2083
need_lib_prefix=unknown
2084
hardcode_into_libs=no
2085

    
2086
# when you set need_version to no, make sure it does not cause -set_version
2087
# flags to be left without arguments
2088
need_version=unknown
2089

    
2090
case $host_os in
2091
aix3*)
2092
  version_type=linux
2093
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2094
  shlibpath_var=LIBPATH
2095

    
2096
  # AIX 3 has no versioning support, so we append a major version to the name.
2097
  soname_spec='${libname}${release}${shared_ext}$major'
2098
  ;;
2099

    
2100
aix4* | aix5*)
2101
  version_type=linux
2102
  need_lib_prefix=no
2103
  need_version=no
2104
  hardcode_into_libs=yes
2105
  if test "$host_cpu" = ia64; then
2106
    # AIX 5 supports IA64
2107
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2108
    shlibpath_var=LD_LIBRARY_PATH
2109
  else
2110
    # With GCC up to 2.95.x, collect2 would create an import file
2111
    # for dependence libraries.  The import file would start with
2112
    # the line `#! .'.  This would cause the generated library to
2113
    # depend on `.', always an invalid library.  This was fixed in
2114
    # development snapshots of GCC prior to 3.0.
2115
    case $host_os in
2116
      aix4 | aix4.[[01]] | aix4.[[01]].*)
2117
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2118
	   echo ' yes '
2119
	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2120
	:
2121
      else
2122
	can_build_shared=no
2123
      fi
2124
      ;;
2125
    esac
2126
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2127
    # soname into executable. Probably we can add versioning support to
2128
    # collect2, so additional links can be useful in future.
2129
    if test "$aix_use_runtimelinking" = yes; then
2130
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2131
      # instead of lib<name>.a to let people know that these are not
2132
      # typical AIX shared libraries.
2133
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2134
    else
2135
      # We preserve .a as extension for shared libraries through AIX4.2
2136
      # and later when we are not doing run time linking.
2137
      library_names_spec='${libname}${release}.a $libname.a'
2138
      soname_spec='${libname}${release}${shared_ext}$major'
2139
    fi
2140
    shlibpath_var=LIBPATH
2141
  fi
2142
  ;;
2143

    
2144
amigaos*)
2145
  library_names_spec='$libname.ixlibrary $libname.a'
2146
  # Create ${libname}_ixlibrary.a entries in /sys/libs.
2147
  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'
2148
  ;;
2149

    
2150
beos*)
2151
  library_names_spec='${libname}${shared_ext}'
2152
  dynamic_linker="$host_os ld.so"
2153
  shlibpath_var=LIBRARY_PATH
2154
  ;;
2155

    
2156
bsdi[[45]]*)
2157
  version_type=linux
2158
  need_version=no
2159
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2160
  soname_spec='${libname}${release}${shared_ext}$major'
2161
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2162
  shlibpath_var=LD_LIBRARY_PATH
2163
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2164
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2165
  # the default ld.so.conf also contains /usr/contrib/lib and
2166
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2167
  # libtool to hard-code these into programs
2168
  ;;
2169

    
2170
cygwin* | mingw* | pw32*)
2171
  version_type=windows
2172
  shrext_cmds=".dll"
2173
  need_version=no
2174
  need_lib_prefix=no
2175

    
2176
  case $GCC,$host_os in
2177
  yes,cygwin* | yes,mingw* | yes,pw32*)
2178
    library_names_spec='$libname.dll.a'
2179
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2180
    postinstall_cmds='base_file=`basename \${file}`~
2181
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2182
      dldir=$destdir/`dirname \$dlpath`~
2183
      test -d \$dldir || mkdir -p \$dldir~
2184
      $install_prog $dir/$dlname \$dldir/$dlname~
2185
      chmod a+x \$dldir/$dlname'
2186
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2187
      dlpath=$dir/\$dldll~
2188
       $rm \$dlpath'
2189
    shlibpath_overrides_runpath=yes
2190

    
2191
    case $host_os in
2192
    cygwin*)
2193
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2194
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2195
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2196
      ;;
2197
    mingw*)
2198
      # MinGW DLLs use traditional 'lib' prefix
2199
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2200
      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2201
      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2202
        # It is most probably a Windows format PATH printed by
2203
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
2204
        # path with ; separators, and with drive letters. We can handle the
2205
        # drive letters (cygwin fileutils understands them), so leave them,
2206
        # especially as we might pass files found there to a mingw objdump,
2207
        # which wouldn't understand a cygwinified path. Ahh.
2208
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2209
      else
2210
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2211
      fi
2212
      ;;
2213
    pw32*)
2214
      # pw32 DLLs use 'pw' prefix rather than 'lib'
2215
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2216
      ;;
2217
    esac
2218
    ;;
2219

    
2220
  *)
2221
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2222
    ;;
2223
  esac
2224
  dynamic_linker='Win32 ld.exe'
2225
  # FIXME: first we should search . and the directory the executable is in
2226
  shlibpath_var=PATH
2227
  ;;
2228

    
2229
darwin* | rhapsody*)
2230
  dynamic_linker="$host_os dyld"
2231
  version_type=darwin
2232
  need_lib_prefix=no
2233
  need_version=no
2234
  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2235
  soname_spec='${libname}${release}${major}$shared_ext'
2236
  shlibpath_overrides_runpath=yes
2237
  shlibpath_var=DYLD_LIBRARY_PATH
2238
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2239
  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
2240
  if test "$GCC" = yes; then
2241
    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
2242
  else
2243
    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
2244
  fi
2245
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2246
  ;;
2247

    
2248
dgux*)
2249
  version_type=linux
2250
  need_lib_prefix=no
2251
  need_version=no
2252
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2253
  soname_spec='${libname}${release}${shared_ext}$major'
2254
  shlibpath_var=LD_LIBRARY_PATH
2255
  ;;
2256

    
2257
freebsd1*)
2258
  dynamic_linker=no
2259
  ;;
2260

    
2261
freebsd* | dragonfly*)
2262
  # DragonFly does not have aout.  When/if they implement a new
2263
  # versioning mechanism, adjust this.
2264
  if test -x /usr/bin/objformat; then
2265
    objformat=`/usr/bin/objformat`
2266
  else
2267
    case $host_os in
2268
    freebsd[[123]]*) objformat=aout ;;
2269
    *) objformat=elf ;;
2270
    esac
2271
  fi
2272
  version_type=freebsd-$objformat
2273
  case $version_type in
2274
    freebsd-elf*)
2275
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2276
      need_version=no
2277
      need_lib_prefix=no
2278
      ;;
2279
    freebsd-*)
2280
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2281
      need_version=yes
2282
      ;;
2283
  esac
2284
  shlibpath_var=LD_LIBRARY_PATH
2285
  case $host_os in
2286
  freebsd2*)
2287
    shlibpath_overrides_runpath=yes
2288
    ;;
2289
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2290
    shlibpath_overrides_runpath=yes
2291
    hardcode_into_libs=yes
2292
    ;;
2293
  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2294
  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2295
    shlibpath_overrides_runpath=no
2296
    hardcode_into_libs=yes
2297
    ;;
2298
  freebsd*) # from 4.6 on
2299
    shlibpath_overrides_runpath=yes
2300
    hardcode_into_libs=yes
2301
    ;;
2302
  esac
2303
  ;;
2304

    
2305
gnu*)
2306
  version_type=linux
2307
  need_lib_prefix=no
2308
  need_version=no
2309
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2310
  soname_spec='${libname}${release}${shared_ext}$major'
2311
  shlibpath_var=LD_LIBRARY_PATH
2312
  hardcode_into_libs=yes
2313
  ;;
2314

    
2315
hpux9* | hpux10* | hpux11*)
2316
  # Give a soname corresponding to the major version so that dld.sl refuses to
2317
  # link against other versions.
2318
  version_type=sunos
2319
  need_lib_prefix=no
2320
  need_version=no
2321
  case $host_cpu in
2322
  ia64*)
2323
    shrext_cmds='.so'
2324
    hardcode_into_libs=yes
2325
    dynamic_linker="$host_os dld.so"
2326
    shlibpath_var=LD_LIBRARY_PATH
2327
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2328
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2329
    soname_spec='${libname}${release}${shared_ext}$major'
2330
    if test "X$HPUX_IA64_MODE" = X32; then
2331
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2332
    else
2333
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2334
    fi
2335
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2336
    ;;
2337
   hppa*64*)
2338
     shrext_cmds='.sl'
2339
     hardcode_into_libs=yes
2340
     dynamic_linker="$host_os dld.sl"
2341
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2342
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2343
     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2344
     soname_spec='${libname}${release}${shared_ext}$major'
2345
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2346
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2347
     ;;
2348
   *)
2349
    shrext_cmds='.sl'
2350
    dynamic_linker="$host_os dld.sl"
2351
    shlibpath_var=SHLIB_PATH
2352
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2353
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2354
    soname_spec='${libname}${release}${shared_ext}$major'
2355
    ;;
2356
  esac
2357
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
2358
  postinstall_cmds='chmod 555 $lib'
2359
  ;;
2360

    
2361
interix3*)
2362
  version_type=linux
2363
  need_lib_prefix=no
2364
  need_version=no
2365
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2366
  soname_spec='${libname}${release}${shared_ext}$major'
2367
  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2368
  shlibpath_var=LD_LIBRARY_PATH
2369
  shlibpath_overrides_runpath=no
2370
  hardcode_into_libs=yes
2371
  ;;
2372

    
2373
irix5* | irix6* | nonstopux*)
2374
  case $host_os in
2375
    nonstopux*) version_type=nonstopux ;;
2376
    *)
2377
	if test "$lt_cv_prog_gnu_ld" = yes; then
2378
		version_type=linux
2379
	else
2380
		version_type=irix
2381
	fi ;;
2382
  esac
2383
  need_lib_prefix=no
2384
  need_version=no
2385
  soname_spec='${libname}${release}${shared_ext}$major'
2386
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2387
  case $host_os in
2388
  irix5* | nonstopux*)
2389
    libsuff= shlibsuff=
2390
    ;;
2391
  *)
2392
    case $LD in # libtool.m4 will add one of these switches to LD
2393
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2394
      libsuff= shlibsuff= libmagic=32-bit;;
2395
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2396
      libsuff=32 shlibsuff=N32 libmagic=N32;;
2397
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2398
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
2399
    *) libsuff= shlibsuff= libmagic=never-match;;
2400
    esac
2401
    ;;
2402
  esac
2403
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2404
  shlibpath_overrides_runpath=no
2405
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2406
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2407
  hardcode_into_libs=yes
2408
  ;;
2409

    
2410
# No shared lib support for Linux oldld, aout, or coff.
2411
linux*oldld* | linux*aout* | linux*coff*)
2412
  dynamic_linker=no
2413
  ;;
2414

    
2415
# This must be Linux ELF.
2416
linux* | k*bsd*-gnu)
2417
  version_type=linux
2418
  need_lib_prefix=no
2419
  need_version=no
2420
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2421
  soname_spec='${libname}${release}${shared_ext}$major'
2422
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2423
  shlibpath_var=LD_LIBRARY_PATH
2424
  shlibpath_overrides_runpath=no
2425
  # This implies no fast_install, which is unacceptable.
2426
  # Some rework will be needed to allow for fast_install
2427
  # before this can be enabled.
2428
  hardcode_into_libs=yes
2429

    
2430
  # Append ld.so.conf contents to the search path
2431
  if test -f /etc/ld.so.conf; then
2432
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
2433
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2434
  fi
2435

    
2436
  # We used to test for /lib/ld.so.1 and disable shared libraries on
2437
  # powerpc, because MkLinux only supported shared libraries with the
2438
  # GNU dynamic linker.  Since this was broken with cross compilers,
2439
  # most powerpc-linux boxes support dynamic linking these days and
2440
  # people can always --disable-shared, the test was removed, and we
2441
  # assume the GNU/Linux dynamic linker is in use.
2442
  dynamic_linker='GNU/Linux ld.so'
2443
  ;;
2444

    
2445
netbsdelf*-gnu)
2446
  version_type=linux
2447
  need_lib_prefix=no
2448
  need_version=no
2449
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2450
  soname_spec='${libname}${release}${shared_ext}$major'
2451
  shlibpath_var=LD_LIBRARY_PATH
2452
  shlibpath_overrides_runpath=no
2453
  hardcode_into_libs=yes
2454
  dynamic_linker='NetBSD ld.elf_so'
2455
  ;;
2456

    
2457
netbsd*)
2458
  version_type=sunos
2459
  need_lib_prefix=no
2460
  need_version=no
2461
  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2462
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2463
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2464
    dynamic_linker='NetBSD (a.out) ld.so'
2465
  else
2466
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2467
    soname_spec='${libname}${release}${shared_ext}$major'
2468
    dynamic_linker='NetBSD ld.elf_so'
2469
  fi
2470
  shlibpath_var=LD_LIBRARY_PATH
2471
  shlibpath_overrides_runpath=yes
2472
  hardcode_into_libs=yes
2473
  ;;
2474

    
2475
newsos6)
2476
  version_type=linux
2477
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2478
  shlibpath_var=LD_LIBRARY_PATH
2479
  shlibpath_overrides_runpath=yes
2480
  ;;
2481

    
2482
nto-qnx*)
2483
  version_type=linux
2484
  need_lib_prefix=no
2485
  need_version=no
2486
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2487
  soname_spec='${libname}${release}${shared_ext}$major'
2488
  shlibpath_var=LD_LIBRARY_PATH
2489
  shlibpath_overrides_runpath=yes
2490
  ;;
2491

    
2492
openbsd*)
2493
  version_type=sunos
2494
  sys_lib_dlsearch_path_spec="/usr/lib"
2495
  need_lib_prefix=no
2496
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2497
  case $host_os in
2498
    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2499
    *)                         need_version=no  ;;
2500
  esac
2501
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2502
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2503
  shlibpath_var=LD_LIBRARY_PATH
2504
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2505
    case $host_os in
2506
      openbsd2.[[89]] | openbsd2.[[89]].*)
2507
	shlibpath_overrides_runpath=no
2508
	;;
2509
      *)
2510
	shlibpath_overrides_runpath=yes
2511
	;;
2512
      esac
2513
  else
2514
    shlibpath_overrides_runpath=yes
2515
  fi
2516
  ;;
2517

    
2518
os2*)
2519
  libname_spec='$name'
2520
  shrext_cmds=".dll"
2521
  need_lib_prefix=no
2522
  library_names_spec='$libname${shared_ext} $libname.a'
2523
  dynamic_linker='OS/2 ld.exe'
2524
  shlibpath_var=LIBPATH
2525
  ;;
2526

    
2527
osf3* | osf4* | osf5*)
2528
  version_type=osf
2529
  need_lib_prefix=no
2530
  need_version=no
2531
  soname_spec='${libname}${release}${shared_ext}$major'
2532
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2533
  shlibpath_var=LD_LIBRARY_PATH
2534
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2535
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2536
  ;;
2537

    
2538
solaris*)
2539
  version_type=linux
2540
  need_lib_prefix=no
2541
  need_version=no
2542
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2543
  soname_spec='${libname}${release}${shared_ext}$major'
2544
  shlibpath_var=LD_LIBRARY_PATH
2545
  shlibpath_overrides_runpath=yes
2546
  hardcode_into_libs=yes
2547
  # ldd complains unless libraries are executable
2548
  postinstall_cmds='chmod +x $lib'
2549
  ;;
2550

    
2551
sunos4*)
2552
  version_type=sunos
2553
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2554
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2555
  shlibpath_var=LD_LIBRARY_PATH
2556
  shlibpath_overrides_runpath=yes
2557
  if test "$with_gnu_ld" = yes; then
2558
    need_lib_prefix=no
2559
  fi
2560
  need_version=yes
2561
  ;;
2562

    
2563
sysv4 | sysv4.3*)
2564
  version_type=linux
2565
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2566
  soname_spec='${libname}${release}${shared_ext}$major'
2567
  shlibpath_var=LD_LIBRARY_PATH
2568
  case $host_vendor in
2569
    sni)
2570
      shlibpath_overrides_runpath=no
2571
      need_lib_prefix=no
2572
      export_dynamic_flag_spec='${wl}-Blargedynsym'
2573
      runpath_var=LD_RUN_PATH
2574
      ;;
2575
    siemens)
2576
      need_lib_prefix=no
2577
      ;;
2578
    motorola)
2579
      need_lib_prefix=no
2580
      need_version=no
2581
      shlibpath_overrides_runpath=no
2582
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2583
      ;;
2584
  esac
2585
  ;;
2586

    
2587
sysv4*MP*)
2588
  if test -d /usr/nec ;then
2589
    version_type=linux
2590
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2591
    soname_spec='$libname${shared_ext}.$major'
2592
    shlibpath_var=LD_LIBRARY_PATH
2593
  fi
2594
  ;;
2595

    
2596
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2597
  version_type=freebsd-elf
2598
  need_lib_prefix=no
2599
  need_version=no
2600
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2601
  soname_spec='${libname}${release}${shared_ext}$major'
2602
  shlibpath_var=LD_LIBRARY_PATH
2603
  hardcode_into_libs=yes
2604
  if test "$with_gnu_ld" = yes; then
2605
    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2606
    shlibpath_overrides_runpath=no
2607
  else
2608
    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2609
    shlibpath_overrides_runpath=yes
2610
    case $host_os in
2611
      sco3.2v5*)
2612
        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2613
	;;
2614
    esac
2615
  fi
2616
  sys_lib_dlsearch_path_spec='/usr/lib'
2617
  ;;
2618

    
2619
uts4*)
2620
  version_type=linux
2621
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2622
  soname_spec='${libname}${release}${shared_ext}$major'
2623
  shlibpath_var=LD_LIBRARY_PATH
2624
  ;;
2625

    
2626
*)
2627
  dynamic_linker=no
2628
  ;;
2629
esac
2630
AC_MSG_RESULT([$dynamic_linker])
2631
test "$dynamic_linker" = no && can_build_shared=no
2632

    
2633
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2634
if test "$GCC" = yes; then
2635
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2636
fi
2637
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2638

    
2639

    
2640
# _LT_AC_TAGCONFIG
2641
# ----------------
2642
AC_DEFUN([_LT_AC_TAGCONFIG],
2643
[AC_ARG_WITH([tags],
2644
    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2645
        [include additional configurations @<:@automatic@:>@])],
2646
    [tagnames="$withval"])
2647

    
2648
if test -f "$ltmain" && test -n "$tagnames"; then
2649
  if test ! -f "${ofile}"; then
2650
    AC_MSG_WARN([output file `$ofile' does not exist])
2651
  fi
2652

    
2653
  if test -z "$LTCC"; then
2654
    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2655
    if test -z "$LTCC"; then
2656
      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2657
    else
2658
      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2659
    fi
2660
  fi
2661
  if test -z "$LTCFLAGS"; then
2662
    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
2663
  fi
2664

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

    
2669
  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2670
  for tagname in $tagnames; do
2671
    IFS="$lt_save_ifs"
2672
    # Check whether tagname contains only valid characters
2673
    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2674
    "") ;;
2675
    *)  AC_MSG_ERROR([invalid tag name: $tagname])
2676
	;;
2677
    esac
2678

    
2679
    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2680
    then
2681
      AC_MSG_ERROR([tag name \"$tagname\" already exists])
2682
    fi
2683

    
2684
    # Update the list of available tags.
2685
    if test -n "$tagname"; then
2686
      echo appending configuration tag \"$tagname\" to $ofile
2687

    
2688
      case $tagname in
2689
      CXX)
2690
	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2691
	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2692
	    (test "X$CXX" != "Xg++"))) ; then
2693
	  AC_LIBTOOL_LANG_CXX_CONFIG
2694
	else
2695
	  tagname=""
2696
	fi
2697
	;;
2698

    
2699
      F77)
2700
	if test -n "$F77" && test "X$F77" != "Xno"; then
2701
	  AC_LIBTOOL_LANG_F77_CONFIG
2702
	else
2703
	  tagname=""
2704
	fi
2705
	;;
2706

    
2707
      GCJ)
2708
	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2709
	  AC_LIBTOOL_LANG_GCJ_CONFIG
2710
	else
2711
	  tagname=""
2712
	fi
2713
	;;
2714

    
2715
      RC)
2716
	AC_LIBTOOL_LANG_RC_CONFIG
2717
	;;
2718

    
2719
      *)
2720
	AC_MSG_ERROR([Unsupported tag name: $tagname])
2721
	;;
2722
      esac
2723

    
2724
      # Append the new tag name to the list of available tags.
2725
      if test -n "$tagname" ; then
2726
      available_tags="$available_tags $tagname"
2727
    fi
2728
    fi
2729
  done
2730
  IFS="$lt_save_ifs"
2731

    
2732
  # Now substitute the updated list of available tags.
2733
  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2734
    mv "${ofile}T" "$ofile"
2735
    chmod +x "$ofile"
2736
  else
2737
    rm -f "${ofile}T"
2738
    AC_MSG_ERROR([unable to update list of available tagged configurations.])
2739
  fi
2740
fi
2741
])# _LT_AC_TAGCONFIG
2742

    
2743

    
2744
# AC_LIBTOOL_DLOPEN
2745
# -----------------
2746
# enable checks for dlopen support
2747
AC_DEFUN([AC_LIBTOOL_DLOPEN],
2748
 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2749
])# AC_LIBTOOL_DLOPEN
2750

    
2751

    
2752
# AC_LIBTOOL_WIN32_DLL
2753
# --------------------
2754
# declare package support for building win32 DLLs
2755
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2756
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2757
])# AC_LIBTOOL_WIN32_DLL
2758

    
2759

    
2760
# AC_ENABLE_SHARED([DEFAULT])
2761
# ---------------------------
2762
# implement the --enable-shared flag
2763
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2764
AC_DEFUN([AC_ENABLE_SHARED],
2765
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2766
AC_ARG_ENABLE([shared],
2767
    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2768
	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2769
    [p=${PACKAGE-default}
2770
    case $enableval in
2771
    yes) enable_shared=yes ;;
2772
    no) enable_shared=no ;;
2773
    *)
2774
      enable_shared=no
2775
      # Look at the argument we got.  We use all the common list separators.
2776
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2777
      for pkg in $enableval; do
2778
	IFS="$lt_save_ifs"
2779
	if test "X$pkg" = "X$p"; then
2780
	  enable_shared=yes
2781
	fi
2782
      done
2783
      IFS="$lt_save_ifs"
2784
      ;;
2785
    esac],
2786
    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2787
])# AC_ENABLE_SHARED
2788

    
2789

    
2790
# AC_DISABLE_SHARED
2791
# -----------------
2792
# set the default shared flag to --disable-shared
2793
AC_DEFUN([AC_DISABLE_SHARED],
2794
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2795
AC_ENABLE_SHARED(no)
2796
])# AC_DISABLE_SHARED
2797

    
2798

    
2799
# AC_ENABLE_STATIC([DEFAULT])
2800
# ---------------------------
2801
# implement the --enable-static flag
2802
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2803
AC_DEFUN([AC_ENABLE_STATIC],
2804
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2805
AC_ARG_ENABLE([static],
2806
    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2807
	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2808
    [p=${PACKAGE-default}
2809
    case $enableval in
2810
    yes) enable_static=yes ;;
2811
    no) enable_static=no ;;
2812
    *)
2813
     enable_static=no
2814
      # Look at the argument we got.  We use all the common list separators.
2815
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2816
      for pkg in $enableval; do
2817
	IFS="$lt_save_ifs"
2818
	if test "X$pkg" = "X$p"; then
2819
	  enable_static=yes
2820
	fi
2821
      done
2822
      IFS="$lt_save_ifs"
2823
      ;;
2824
    esac],
2825
    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2826
])# AC_ENABLE_STATIC
2827

    
2828

    
2829
# AC_DISABLE_STATIC
2830
# -----------------
2831
# set the default static flag to --disable-static
2832
AC_DEFUN([AC_DISABLE_STATIC],
2833
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2834
AC_ENABLE_STATIC(no)
2835
])# AC_DISABLE_STATIC
2836

    
2837

    
2838
# AC_ENABLE_FAST_INSTALL([DEFAULT])
2839
# ---------------------------------
2840
# implement the --enable-fast-install flag
2841
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2842
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2843
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2844
AC_ARG_ENABLE([fast-install],
2845
    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2846
    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2847
    [p=${PACKAGE-default}
2848
    case $enableval in
2849
    yes) enable_fast_install=yes ;;
2850
    no) enable_fast_install=no ;;
2851
    *)
2852
      enable_fast_install=no
2853
      # Look at the argument we got.  We use all the common list separators.
2854
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2855
      for pkg in $enableval; do
2856
	IFS="$lt_save_ifs"
2857
	if test "X$pkg" = "X$p"; then
2858
	  enable_fast_install=yes
2859
	fi
2860
      done
2861
      IFS="$lt_save_ifs"
2862
      ;;
2863
    esac],
2864
    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2865
])# AC_ENABLE_FAST_INSTALL
2866

    
2867

    
2868
# AC_DISABLE_FAST_INSTALL
2869
# -----------------------
2870
# set the default to --disable-fast-install
2871
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2872
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2873
AC_ENABLE_FAST_INSTALL(no)
2874
])# AC_DISABLE_FAST_INSTALL
2875

    
2876

    
2877
# AC_LIBTOOL_PICMODE([MODE])
2878
# --------------------------
2879
# implement the --with-pic flag
2880
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
2881
AC_DEFUN([AC_LIBTOOL_PICMODE],
2882
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2883
pic_mode=ifelse($#,1,$1,default)
2884
])# AC_LIBTOOL_PICMODE
2885

    
2886

    
2887
# AC_PROG_EGREP
2888
# -------------
2889
# This is predefined starting with Autoconf 2.54, so this conditional
2890
# definition can be removed once we require Autoconf 2.54 or later.
2891
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2892
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2893
   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2894
    then ac_cv_prog_egrep='grep -E'
2895
    else ac_cv_prog_egrep='egrep'
2896
    fi])
2897
 EGREP=$ac_cv_prog_egrep
2898
 AC_SUBST([EGREP])
2899
])])
2900

    
2901

    
2902
# AC_PATH_TOOL_PREFIX
2903
# -------------------
2904
# find a file program which can recognise shared library
2905
AC_DEFUN([AC_PATH_TOOL_PREFIX],
2906
[AC_REQUIRE([AC_PROG_EGREP])dnl
2907
AC_MSG_CHECKING([for $1])
2908
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2909
[case $MAGIC_CMD in
2910
[[\\/*] |  ?:[\\/]*])
2911
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2912
  ;;
2913
*)
2914
  lt_save_MAGIC_CMD="$MAGIC_CMD"
2915
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2916
dnl $ac_dummy forces splitting on constant user-supplied paths.
2917
dnl POSIX.2 word splitting is done only on the output of word expansions,
2918
dnl not every word.  This closes a longstanding sh security hole.
2919
  ac_dummy="ifelse([$2], , $PATH, [$2])"
2920
  for ac_dir in $ac_dummy; do
2921
    IFS="$lt_save_ifs"
2922
    test -z "$ac_dir" && ac_dir=.
2923
    if test -f $ac_dir/$1; then
2924
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2925
      if test -n "$file_magic_test_file"; then
2926
	case $deplibs_check_method in
2927
	"file_magic "*)
2928
	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2929
	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2930
	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2931
	    $EGREP "$file_magic_regex" > /dev/null; then
2932
	    :
2933
	  else
2934
	    cat <<EOF 1>&2
2935

    
2936
*** Warning: the command libtool uses to detect shared libraries,
2937
*** $file_magic_cmd, produces output that libtool cannot recognize.
2938
*** The result is that libtool may fail to recognize shared libraries
2939
*** as such.  This will affect the creation of libtool libraries that
2940
*** depend on shared libraries, but programs linked with such libtool
2941
*** libraries will work regardless of this problem.  Nevertheless, you
2942
*** may want to report the problem to your system manager and/or to
2943
*** bug-libtool@gnu.org
2944

    
2945
EOF
2946
	  fi ;;
2947
	esac
2948
      fi
2949
      break
2950
    fi
2951
  done
2952
  IFS="$lt_save_ifs"
2953
  MAGIC_CMD="$lt_save_MAGIC_CMD"
2954
  ;;
2955
esac])
2956
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2957
if test -n "$MAGIC_CMD"; then
2958
  AC_MSG_RESULT($MAGIC_CMD)
2959
else
2960
  AC_MSG_RESULT(no)
2961
fi
2962
])# AC_PATH_TOOL_PREFIX
2963

    
2964

    
2965
# AC_PATH_MAGIC
2966
# -------------
2967
# find a file program which can recognise a shared library
2968
AC_DEFUN([AC_PATH_MAGIC],
2969
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2970
if test -z "$lt_cv_path_MAGIC_CMD"; then
2971
  if test -n "$ac_tool_prefix"; then
2972
    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2973
  else
2974
    MAGIC_CMD=:
2975
  fi
2976
fi
2977
])# AC_PATH_MAGIC
2978

    
2979

    
2980
# AC_PROG_LD
2981
# ----------
2982
# find the pathname to the GNU or non-GNU linker
2983
AC_DEFUN([AC_PROG_LD],
2984
[AC_ARG_WITH([gnu-ld],
2985
    [AC_HELP_STRING([--with-gnu-ld],
2986
	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
2987
    [test "$withval" = no || with_gnu_ld=yes],
2988
    [with_gnu_ld=no])
2989
AC_REQUIRE([LT_AC_PROG_SED])dnl
2990
AC_REQUIRE([AC_PROG_CC])dnl
2991
AC_REQUIRE([AC_CANONICAL_HOST])dnl
2992
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2993
ac_prog=ld
2994
if test "$GCC" = yes; then
2995
  # Check if gcc -print-prog-name=ld gives a path.
2996
  AC_MSG_CHECKING([for ld used by $CC])
2997
  case $host in
2998
  *-*-mingw*)
2999
    # gcc leaves a trailing carriage return which upsets mingw
3000
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3001
  *)
3002
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3003
  esac
3004
  case $ac_prog in
3005
    # Accept absolute paths.
3006
    [[\\/]]* | ?:[[\\/]]*)
3007
      re_direlt='/[[^/]][[^/]]*/\.\./'
3008
      # Canonicalize the pathname of ld
3009
      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
3010
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3011
	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
3012
      done
3013
      test -z "$LD" && LD="$ac_prog"
3014
      ;;
3015
  "")
3016
    # If it fails, then pretend we aren't using GCC.
3017
    ac_prog=ld
3018
    ;;
3019
  *)
3020
    # If it is relative, then search for the first ld in PATH.
3021
    with_gnu_ld=unknown
3022
    ;;
3023
  esac
3024
elif test "$with_gnu_ld" = yes; then
3025
  AC_MSG_CHECKING([for GNU ld])
3026
else
3027
  AC_MSG_CHECKING([for non-GNU ld])
3028
fi
3029
AC_CACHE_VAL(lt_cv_path_LD,
3030
[if test -z "$LD"; then
3031
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3032
  for ac_dir in $PATH; do
3033
    IFS="$lt_save_ifs"
3034
    test -z "$ac_dir" && ac_dir=.
3035
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3036
      lt_cv_path_LD="$ac_dir/$ac_prog"
3037
      # Check to see if the program is GNU ld.  I'd rather use --version,
3038
      # but apparently some variants of GNU ld only accept -v.
3039
      # Break only if it was the GNU/non-GNU ld that we prefer.
3040
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3041
      *GNU* | *'with BFD'*)
3042
	test "$with_gnu_ld" != no && break
3043
	;;
3044
      *)
3045
	test "$with_gnu_ld" != yes && break
3046
	;;
3047
      esac
3048
    fi
3049
  done
3050
  IFS="$lt_save_ifs"
3051
else
3052
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
3053
fi])
3054
LD="$lt_cv_path_LD"
3055
if test -n "$LD"; then
3056
  AC_MSG_RESULT($LD)
3057
else
3058
  AC_MSG_RESULT(no)
3059
fi
3060
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3061
AC_PROG_LD_GNU
3062
])# AC_PROG_LD
3063

    
3064

    
3065
# AC_PROG_LD_GNU
3066
# --------------
3067
AC_DEFUN([AC_PROG_LD_GNU],
3068
[AC_REQUIRE([AC_PROG_EGREP])dnl
3069
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3070
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3071
case `$LD -v 2>&1 </dev/null` in
3072
*GNU* | *'with BFD'*)
3073
  lt_cv_prog_gnu_ld=yes
3074
  ;;
3075
*)
3076
  lt_cv_prog_gnu_ld=no
3077
  ;;
3078
esac])
3079
with_gnu_ld=$lt_cv_prog_gnu_ld
3080
])# AC_PROG_LD_GNU
3081

    
3082

    
3083
# AC_PROG_LD_RELOAD_FLAG
3084
# ----------------------
3085
# find reload flag for linker
3086
#   -- PORTME Some linkers may need a different reload flag.
3087
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3088
[AC_CACHE_CHECK([for $LD option to reload object files],
3089
  lt_cv_ld_reload_flag,
3090
  [lt_cv_ld_reload_flag='-r'])
3091
reload_flag=$lt_cv_ld_reload_flag
3092
case $reload_flag in
3093
"" | " "*) ;;
3094
*) reload_flag=" $reload_flag" ;;
3095
esac
3096
reload_cmds='$LD$reload_flag -o $output$reload_objs'
3097
case $host_os in
3098
  darwin*)
3099
    if test "$GCC" = yes; then
3100
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3101
    else
3102
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
3103
    fi
3104
    ;;
3105
esac
3106
])# AC_PROG_LD_RELOAD_FLAG
3107

    
3108

    
3109
# AC_DEPLIBS_CHECK_METHOD
3110
# -----------------------
3111
# how to check for library dependencies
3112
#  -- PORTME fill in with the dynamic library characteristics
3113
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3114
[AC_CACHE_CHECK([how to recognise dependent libraries],
3115
lt_cv_deplibs_check_method,
3116
[lt_cv_file_magic_cmd='$MAGIC_CMD'
3117
lt_cv_file_magic_test_file=
3118
lt_cv_deplibs_check_method='unknown'
3119
# Need to set the preceding variable on all platforms that support
3120
# interlibrary dependencies.
3121
# 'none' -- dependencies not supported.
3122
# `unknown' -- same as none, but documents that we really don't know.
3123
# 'pass_all' -- all dependencies passed with no checks.
3124
# 'test_compile' -- check by making test program.
3125
# 'file_magic [[regex]]' -- check by looking for files in library path
3126
# which responds to the $file_magic_cmd with a given extended regex.
3127
# If you have `file' or equivalent on your system and you're not sure
3128
# whether `pass_all' will *always* work, you probably want this one.
3129

    
3130
case $host_os in
3131
aix4* | aix5*)
3132
  lt_cv_deplibs_check_method=pass_all
3133
  ;;
3134

    
3135
beos*)
3136
  lt_cv_deplibs_check_method=pass_all
3137
  ;;
3138

    
3139
bsdi[[45]]*)
3140
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3141
  lt_cv_file_magic_cmd='/usr/bin/file -L'
3142
  lt_cv_file_magic_test_file=/shlib/libc.so
3143
  ;;
3144

    
3145
cygwin*)
3146
  # func_win32_libid is a shell function defined in ltmain.sh
3147
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3148
  lt_cv_file_magic_cmd='func_win32_libid'
3149
  ;;
3150

    
3151
mingw* | pw32*)
3152
  # Base MSYS/MinGW do not provide the 'file' command needed by
3153
  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
3154
  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3155
  lt_cv_file_magic_cmd='$OBJDUMP -f'
3156
  ;;
3157

    
3158
darwin* | rhapsody*)
3159
  lt_cv_deplibs_check_method=pass_all
3160
  ;;
3161

    
3162
freebsd* | dragonfly*)
3163
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3164
    case $host_cpu in
3165
    i*86 )
3166
      # Not sure whether the presence of OpenBSD here was a mistake.
3167
      # Let's accept both of them until this is cleared up.
3168
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3169
      lt_cv_file_magic_cmd=/usr/bin/file
3170
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3171
      ;;
3172
    esac
3173
  else
3174
    lt_cv_deplibs_check_method=pass_all
3175
  fi
3176
  ;;
3177

    
3178
gnu*)
3179
  lt_cv_deplibs_check_method=pass_all
3180
  ;;
3181

    
3182
hpux10.20* | hpux11*)
3183
  lt_cv_file_magic_cmd=/usr/bin/file
3184
  case $host_cpu in
3185
  ia64*)
3186
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3187
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3188
    ;;
3189
  hppa*64*)
3190
    [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]']
3191
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3192
    ;;
3193
  *)
3194
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3195
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3196
    ;;
3197
  esac
3198
  ;;
3199

    
3200
interix3*)
3201
  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3202
  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3203
  ;;
3204

    
3205
irix5* | irix6* | nonstopux*)
3206
  case $LD in
3207
  *-32|*"-32 ") libmagic=32-bit;;
3208
  *-n32|*"-n32 ") libmagic=N32;;
3209
  *-64|*"-64 ") libmagic=64-bit;;
3210
  *) libmagic=never-match;;
3211
  esac
3212
  lt_cv_deplibs_check_method=pass_all
3213
  ;;
3214

    
3215
# This must be Linux ELF.
3216
linux* | k*bsd*-gnu)
3217
  lt_cv_deplibs_check_method=pass_all
3218
  ;;
3219

    
3220
netbsd* | netbsdelf*-gnu)
3221
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3222
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3223
  else
3224
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3225
  fi
3226
  ;;
3227

    
3228
newos6*)
3229
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3230
  lt_cv_file_magic_cmd=/usr/bin/file
3231
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3232
  ;;
3233

    
3234
nto-qnx*)
3235
  lt_cv_deplibs_check_method=unknown
3236
  ;;
3237

    
3238
openbsd*)
3239
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3240
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3241
  else
3242
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3243
  fi
3244
  ;;
3245

    
3246
osf3* | osf4* | osf5*)
3247
  lt_cv_deplibs_check_method=pass_all
3248
  ;;
3249

    
3250
solaris*)
3251
  lt_cv_deplibs_check_method=pass_all
3252
  ;;
3253

    
3254
sysv4 | sysv4.3*)
3255
  case $host_vendor in
3256
  motorola)
3257
    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]]'
3258
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3259
    ;;
3260
  ncr)
3261
    lt_cv_deplibs_check_method=pass_all
3262
    ;;
3263
  sequent)
3264
    lt_cv_file_magic_cmd='/bin/file'
3265
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3266
    ;;
3267
  sni)
3268
    lt_cv_file_magic_cmd='/bin/file'
3269
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3270
    lt_cv_file_magic_test_file=/lib/libc.so
3271
    ;;
3272
  siemens)
3273
    lt_cv_deplibs_check_method=pass_all
3274
    ;;
3275
  pc)
3276
    lt_cv_deplibs_check_method=pass_all
3277
    ;;
3278
  esac
3279
  ;;
3280

    
3281
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3282
  lt_cv_deplibs_check_method=pass_all
3283
  ;;
3284
esac
3285
])
3286
file_magic_cmd=$lt_cv_file_magic_cmd
3287
deplibs_check_method=$lt_cv_deplibs_check_method
3288
test -z "$deplibs_check_method" && deplibs_check_method=unknown
3289
])# AC_DEPLIBS_CHECK_METHOD
3290

    
3291

    
3292
# AC_PROG_NM
3293
# ----------
3294
# find the pathname to a BSD-compatible name lister
3295
AC_DEFUN([AC_PROG_NM],
3296
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3297
[if test -n "$NM"; then
3298
  # Let the user override the test.
3299
  lt_cv_path_NM="$NM"
3300
else
3301
  lt_nm_to_check="${ac_tool_prefix}nm"
3302
  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
3303
    lt_nm_to_check="$lt_nm_to_check nm"
3304
  fi
3305
  for lt_tmp_nm in $lt_nm_to_check; do
3306
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3307
    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3308
      IFS="$lt_save_ifs"
3309
      test -z "$ac_dir" && ac_dir=.
3310
      tmp_nm="$ac_dir/$lt_tmp_nm"
3311
      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3312
	# Check to see if the nm accepts a BSD-compat flag.
3313
	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3314
	#   nm: unknown option "B" ignored
3315
	# Tru64's nm complains that /dev/null is an invalid object file
3316
	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3317
	*/dev/null* | *'Invalid file or object type'*)
3318
	  lt_cv_path_NM="$tmp_nm -B"
3319
	  break
3320
	  ;;
3321
	*)
3322
	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3323
	  */dev/null*)
3324
	    lt_cv_path_NM="$tmp_nm -p"
3325
	    break
3326
	    ;;
3327
	  *)
3328
	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3329
	    continue # so that we can try to find one that supports BSD flags
3330
	    ;;
3331
	  esac
3332
	  ;;
3333
	esac
3334
      fi
3335
    done
3336
    IFS="$lt_save_ifs"
3337
  done
3338
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3339
fi])
3340
NM="$lt_cv_path_NM"
3341
])# AC_PROG_NM
3342

    
3343

    
3344
# AC_CHECK_LIBM
3345
# -------------
3346
# check for math library
3347
AC_DEFUN([AC_CHECK_LIBM],
3348
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3349
LIBM=
3350
case $host in
3351
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3352
  # These system don't have libm, or don't need it
3353
  ;;
3354
*-ncr-sysv4.3*)
3355
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3356
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3357
  ;;
3358
*)
3359
  AC_CHECK_LIB(m, cos, LIBM="-lm")
3360
  ;;
3361
esac
3362
])# AC_CHECK_LIBM
3363

    
3364

    
3365
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3366
# -----------------------------------
3367
# sets LIBLTDL to the link flags for the libltdl convenience library and
3368
# LTDLINCL to the include flags for the libltdl header and adds
3369
# --enable-ltdl-convenience to the configure arguments.  Note that
3370
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
3371
# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
3372
# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
3373
# (note the single quotes!).  If your package is not flat and you're not
3374
# using automake, define top_builddir and top_srcdir appropriately in
3375
# the Makefiles.
3376
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3377
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3378
  case $enable_ltdl_convenience in
3379
  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3380
  "") enable_ltdl_convenience=yes
3381
      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3382
  esac
3383
  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3384
  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3385
  # For backwards non-gettext consistent compatibility...
3386
  INCLTDL="$LTDLINCL"
3387
])# AC_LIBLTDL_CONVENIENCE
3388

    
3389

    
3390
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3391
# -----------------------------------
3392
# sets LIBLTDL to the link flags for the libltdl installable library and
3393
# LTDLINCL to the include flags for the libltdl header and adds
3394
# --enable-ltdl-install to the configure arguments.  Note that
3395
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
3396
# and an installed libltdl is not found, it is assumed to be `libltdl'.
3397
# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
3398
# '${top_srcdir}/' (note the single quotes!).  If your package is not
3399
# flat and you're not using automake, define top_builddir and top_srcdir
3400
# appropriately in the Makefiles.
3401
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3402
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3403
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3404
  AC_CHECK_LIB(ltdl, lt_dlinit,
3405
  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3406
  [if test x"$enable_ltdl_install" = xno; then
3407
     AC_MSG_WARN([libltdl not installed, but installation disabled])
3408
   else
3409
     enable_ltdl_install=yes
3410
   fi
3411
  ])
3412
  if test x"$enable_ltdl_install" = x"yes"; then
3413
    ac_configure_args="$ac_configure_args --enable-ltdl-install"
3414
    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3415
    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3416
  else
3417
    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3418
    LIBLTDL="-lltdl"
3419
    LTDLINCL=
3420
  fi
3421
  # For backwards non-gettext consistent compatibility...
3422
  INCLTDL="$LTDLINCL"
3423
])# AC_LIBLTDL_INSTALLABLE
3424

    
3425

    
3426
# AC_LIBTOOL_CXX
3427
# --------------
3428
# enable support for C++ libraries
3429
AC_DEFUN([AC_LIBTOOL_CXX],
3430
[AC_REQUIRE([_LT_AC_LANG_CXX])
3431
])# AC_LIBTOOL_CXX
3432

    
3433

    
3434
# _LT_AC_LANG_CXX
3435
# ---------------
3436
AC_DEFUN([_LT_AC_LANG_CXX],
3437
[AC_REQUIRE([AC_PROG_CXX])
3438
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3439
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3440
])# _LT_AC_LANG_CXX
3441

    
3442
# _LT_AC_PROG_CXXCPP
3443
# ------------------
3444
AC_DEFUN([_LT_AC_PROG_CXXCPP],
3445
[
3446
AC_REQUIRE([AC_PROG_CXX])
3447
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3448
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3449
    (test "X$CXX" != "Xg++"))) ; then
3450
  AC_PROG_CXXCPP
3451
fi
3452
])# _LT_AC_PROG_CXXCPP
3453

    
3454
# AC_LIBTOOL_F77
3455
# --------------
3456
# enable support for Fortran 77 libraries
3457
AC_DEFUN([AC_LIBTOOL_F77],
3458
[AC_REQUIRE([_LT_AC_LANG_F77])
3459
])# AC_LIBTOOL_F77
3460

    
3461

    
3462
# _LT_AC_LANG_F77
3463
# ---------------
3464
AC_DEFUN([_LT_AC_LANG_F77],
3465
[AC_REQUIRE([AC_PROG_F77])
3466
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3467
])# _LT_AC_LANG_F77
3468

    
3469

    
3470
# AC_LIBTOOL_GCJ
3471
# --------------
3472
# enable support for GCJ libraries
3473
AC_DEFUN([AC_LIBTOOL_GCJ],
3474
[AC_REQUIRE([_LT_AC_LANG_GCJ])
3475
])# AC_LIBTOOL_GCJ
3476

    
3477

    
3478
# _LT_AC_LANG_GCJ
3479
# ---------------
3480
AC_DEFUN([_LT_AC_LANG_GCJ],
3481
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3482
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3483
    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3484
      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3485
	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3486
	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3487
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3488
])# _LT_AC_LANG_GCJ
3489

    
3490

    
3491
# AC_LIBTOOL_RC
3492
# -------------
3493
# enable support for Windows resource files
3494
AC_DEFUN([AC_LIBTOOL_RC],
3495
[AC_REQUIRE([LT_AC_PROG_RC])
3496
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3497
])# AC_LIBTOOL_RC
3498

    
3499

    
3500
# AC_LIBTOOL_LANG_C_CONFIG
3501
# ------------------------
3502
# Ensure that the configuration vars for the C compiler are
3503
# suitably defined.  Those variables are subsequently used by
3504
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3505
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3506
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3507
[lt_save_CC="$CC"
3508
AC_LANG_PUSH(C)
3509

    
3510
# Source file extension for C test sources.
3511
ac_ext=c
3512

    
3513
# Object file extension for compiled C test sources.
3514
objext=o
3515
_LT_AC_TAGVAR(objext, $1)=$objext
3516

    
3517
# Code to be used in simple compile tests
3518
lt_simple_compile_test_code="int some_variable = 0;\n"
3519

    
3520
# Code to be used in simple link tests
3521
lt_simple_link_test_code='int main(){return(0);}\n'
3522

    
3523
_LT_AC_SYS_COMPILER
3524

    
3525
# save warnings/boilerplate of simple test code
3526
_LT_COMPILER_BOILERPLATE
3527
_LT_LINKER_BOILERPLATE
3528

    
3529
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3530
AC_LIBTOOL_PROG_COMPILER_PIC($1)
3531
AC_LIBTOOL_PROG_CC_C_O($1)
3532
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3533
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3534
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3535
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3536
AC_LIBTOOL_SYS_LIB_STRIP
3537
AC_LIBTOOL_DLOPEN_SELF
3538

    
3539
# Report which library types will actually be built
3540
AC_MSG_CHECKING([if libtool supports shared libraries])
3541
AC_MSG_RESULT([$can_build_shared])
3542

    
3543
AC_MSG_CHECKING([whether to build shared libraries])
3544
test "$can_build_shared" = "no" && enable_shared=no
3545

    
3546
# On AIX, shared libraries and static libraries use the same namespace, and
3547
# are all built from PIC.
3548
case $host_os in
3549
aix3*)
3550
  test "$enable_shared" = yes && enable_static=no
3551
  if test -n "$RANLIB"; then
3552
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
3553
    postinstall_cmds='$RANLIB $lib'
3554
  fi
3555
  ;;
3556

    
3557
aix4* | aix5*)
3558
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3559
    test "$enable_shared" = yes && enable_static=no
3560
  fi
3561
    ;;
3562
esac
3563
AC_MSG_RESULT([$enable_shared])
3564

    
3565
AC_MSG_CHECKING([whether to build static libraries])
3566
# Make sure either enable_shared or enable_static is yes.
3567
test "$enable_shared" = yes || enable_static=yes
3568
AC_MSG_RESULT([$enable_static])
3569

    
3570
AC_LIBTOOL_CONFIG($1)
3571

    
3572
AC_LANG_POP
3573
CC="$lt_save_CC"
3574
])# AC_LIBTOOL_LANG_C_CONFIG
3575

    
3576

    
3577
# AC_LIBTOOL_LANG_CXX_CONFIG
3578
# --------------------------
3579
# Ensure that the configuration vars for the C compiler are
3580
# suitably defined.  Those variables are subsequently used by
3581
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3582
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3583
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3584
[AC_LANG_PUSH(C++)
3585
AC_REQUIRE([AC_PROG_CXX])
3586
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3587

    
3588
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3589
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3590
_LT_AC_TAGVAR(always_export_symbols, $1)=no
3591
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3592
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3593
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3594
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3595
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3596
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3597
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3598
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3599
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
3600
_LT_AC_TAGVAR(module_cmds, $1)=
3601
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
3602
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3603
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3604
_LT_AC_TAGVAR(no_undefined_flag, $1)=
3605
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3606
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3607

    
3608
# Dependencies to place before and after the object being linked:
3609
_LT_AC_TAGVAR(predep_objects, $1)=
3610
_LT_AC_TAGVAR(postdep_objects, $1)=
3611
_LT_AC_TAGVAR(predeps, $1)=
3612
_LT_AC_TAGVAR(postdeps, $1)=
3613
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3614

    
3615
# Source file extension for C++ test sources.
3616
ac_ext=cpp
3617

    
3618
# Object file extension for compiled C++ test sources.
3619
objext=o
3620
_LT_AC_TAGVAR(objext, $1)=$objext
3621

    
3622
# Code to be used in simple compile tests
3623
lt_simple_compile_test_code="int some_variable = 0;\n"
3624

    
3625
# Code to be used in simple link tests
3626
lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
3627

    
3628
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3629
_LT_AC_SYS_COMPILER
3630

    
3631
# save warnings/boilerplate of simple test code
3632
_LT_COMPILER_BOILERPLATE
3633
_LT_LINKER_BOILERPLATE
3634

    
3635
# Allow CC to be a program name with arguments.
3636
lt_save_CC=$CC
3637
lt_save_LD=$LD
3638
lt_save_GCC=$GCC
3639
GCC=$GXX
3640
lt_save_with_gnu_ld=$with_gnu_ld
3641
lt_save_path_LD=$lt_cv_path_LD
3642
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3643
  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3644
else
3645
  $as_unset lt_cv_prog_gnu_ld
3646
fi
3647
if test -n "${lt_cv_path_LDCXX+set}"; then
3648
  lt_cv_path_LD=$lt_cv_path_LDCXX
3649
else
3650
  $as_unset lt_cv_path_LD
3651
fi
3652
test -z "${LDCXX+set}" || LD=$LDCXX
3653
CC=${CXX-"c++"}
3654
compiler=$CC
3655
_LT_AC_TAGVAR(compiler, $1)=$CC
3656
_LT_CC_BASENAME([$compiler])
3657

    
3658
# We don't want -fno-exception wen compiling C++ code, so set the
3659
# no_builtin_flag separately
3660
if test "$GXX" = yes; then
3661
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3662
else
3663
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3664
fi
3665

    
3666
if test "$GXX" = yes; then
3667
  # Set up default GNU C++ configuration
3668

    
3669
  AC_PROG_LD
3670

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

    
3677
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3678
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3679

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

    
3685
    # ancient GNU ld didn't support --whole-archive et. al.
3686
    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3687
	grep 'no-whole-archive' > /dev/null; then
3688
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3689
    else
3690
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3691
    fi
3692
  else
3693
    with_gnu_ld=no
3694
    wlarc=
3695

    
3696
    # A generic and very simple default shared library creation
3697
    # command for GNU C++ for the case where it uses the native
3698
    # linker, instead of GNU ld.  If possible, this setting should
3699
    # overridden to take advantage of the native linker features on
3700
    # the platform it is being used on.
3701
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3702
  fi
3703

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

    
3709
else
3710
  GXX=no
3711
  with_gnu_ld=no
3712
  wlarc=
3713
fi
3714

    
3715
# PORTME: fill in a description of your system's C++ link characteristics
3716
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3717
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
3718
case $host_os in
3719
  aix3*)
3720
    # FIXME: insert proper C++ library support
3721
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3722
    ;;
3723
  aix4* | aix5*)
3724
    if test "$host_cpu" = ia64; then
3725
      # On IA64, the linker does run time linking by default, so we don't
3726
      # have to do anything special.
3727
      aix_use_runtimelinking=no
3728
      exp_sym_flag='-Bexport'
3729
      no_entry_flag=""
3730
    else
3731
      aix_use_runtimelinking=no
3732

    
3733
      # Test if we are trying to use run time linking or normal
3734
      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3735
      # need to do runtime linking.
3736
      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3737
	for ld_flag in $LDFLAGS; do
3738
	  case $ld_flag in
3739
	  *-brtl*)
3740
	    aix_use_runtimelinking=yes
3741
	    break
3742
	    ;;
3743
	  esac
3744
	done
3745
	;;
3746
      esac
3747

    
3748
      exp_sym_flag='-bexport'
3749
      no_entry_flag='-bnoentry'
3750
    fi
3751

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

    
3758
    _LT_AC_TAGVAR(archive_cmds, $1)=''
3759
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3760
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3761
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3762

    
3763
    if test "$GXX" = yes; then
3764
      case $host_os in aix4.[[012]]|aix4.[[012]].*)
3765
      # We only want to do this on AIX 4.2 and lower, the check
3766
      # below for broken collect2 doesn't work under 4.3+
3767
	collect2name=`${CC} -print-prog-name=collect2`
3768
	if test -f "$collect2name" && \
3769
	   strings "$collect2name" | grep resolve_lib_name >/dev/null
3770
	then
3771
	  # We have reworked collect2
3772
	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3773
	else
3774
	  # We have old collect2
3775
	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3776
	  # It fails to find uninstalled libraries when the uninstalled
3777
	  # path is not listed in the libpath.  Setting hardcode_minus_L
3778
	  # to unsupported forces relinking
3779
	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3780
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3781
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3782
	fi
3783
	;;
3784
      esac
3785
      shared_flag='-shared'
3786
      if test "$aix_use_runtimelinking" = yes; then
3787
	shared_flag="$shared_flag "'${wl}-G'
3788
      fi
3789
    else
3790
      # not using gcc
3791
      if test "$host_cpu" = ia64; then
3792
	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3793
	# chokes on -Wl,-G. The following line is correct:
3794
	shared_flag='-G'
3795
      else
3796
	if test "$aix_use_runtimelinking" = yes; then
3797
	  shared_flag='${wl}-G'
3798
	else
3799
	  shared_flag='${wl}-bM:SRE'
3800
	fi
3801
      fi
3802
    fi
3803

    
3804
    # It seems that -bexpall does not export symbols beginning with
3805
    # underscore (_), so it is better to generate a list of symbols to export.
3806
    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3807
    if test "$aix_use_runtimelinking" = yes; then
3808
      # Warning - without using the other runtime loading flags (-brtl),
3809
      # -berok will link without error, but may produce a broken library.
3810
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3811
      # Determine the default libpath from the value encoded in an empty executable.
3812
      _LT_AC_SYS_LIBPATH_AIX
3813
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3814

    
3815
      _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"
3816
     else
3817
      if test "$host_cpu" = ia64; then
3818
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3819
	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3820
	_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"
3821
      else
3822
	# Determine the default libpath from the value encoded in an empty executable.
3823
	_LT_AC_SYS_LIBPATH_AIX
3824
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3825
	# Warning - without using the other run time loading flags,
3826
	# -berok will link without error, but may produce a broken library.
3827
	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3828
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3829
	# Exported symbols can be pulled into shared objects from archives
3830
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
3831
	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3832
	# This is similar to how AIX traditionally builds its shared libraries.
3833
	_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'
3834
      fi
3835
    fi
3836
    ;;
3837

    
3838
  beos*)
3839
    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3840
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3841
      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3842
      # support --undefined.  This deserves some investigation.  FIXME
3843
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3844
    else
3845
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3846
    fi
3847
    ;;
3848

    
3849
  chorus*)
3850
    case $cc_basename in
3851
      *)
3852
	# FIXME: insert proper C++ library support
3853
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3854
	;;
3855
    esac
3856
    ;;
3857

    
3858
  cygwin* | mingw* | pw32*)
3859
    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3860
    # as there is no search path for DLLs.
3861
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3862
    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3863
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
3864
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3865

    
3866
    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3867
      _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'
3868
      # If the export-symbols file already is a .def file (1st line
3869
      # is EXPORTS), use it as is; otherwise, prepend...
3870
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3871
	cp $export_symbols $output_objdir/$soname.def;
3872
      else
3873
	echo EXPORTS > $output_objdir/$soname.def;
3874
	cat $export_symbols >> $output_objdir/$soname.def;
3875
      fi~
3876
      $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'
3877
    else
3878
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3879
    fi
3880
  ;;
3881
      darwin* | rhapsody*)
3882
        case $host_os in
3883
        rhapsody* | darwin1.[[012]])
3884
         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3885
         ;;
3886
       *) # Darwin 1.3 on
3887
         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3888
           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3889
         else
3890
           case ${MACOSX_DEPLOYMENT_TARGET} in
3891
             10.[[012]])
3892
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3893
               ;;
3894
             10.*)
3895
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3896
               ;;
3897
           esac
3898
         fi
3899
         ;;
3900
        esac
3901
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3902
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3903
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3904
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3905
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3906
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3907

    
3908
    if test "$GXX" = yes ; then
3909
      lt_int_apple_cc_single_mod=no
3910
      output_verbose_link_cmd='echo'
3911
      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
3912
       lt_int_apple_cc_single_mod=yes
3913
      fi
3914
      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3915
       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3916
      else
3917
          _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'
3918
        fi
3919
        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3920
        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3921
          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3922
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3923
          else
3924
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3925
          fi
3926
            _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}'
3927
      else
3928
      case $cc_basename in
3929
        xlc*)
3930
         output_verbose_link_cmd='echo'
3931
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
3932
          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3933
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3934
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3935
          _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}'
3936
          ;;
3937
       *)
3938
         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3939
          ;;
3940
      esac
3941
      fi
3942
        ;;
3943

    
3944
  dgux*)
3945
    case $cc_basename in
3946
      ec++*)
3947
	# FIXME: insert proper C++ library support
3948
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3949
	;;
3950
      ghcx*)
3951
	# Green Hills C++ Compiler
3952
	# FIXME: insert proper C++ library support
3953
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3954
	;;
3955
      *)
3956
	# FIXME: insert proper C++ library support
3957
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3958
	;;
3959
    esac
3960
    ;;
3961
  freebsd[[12]]*)
3962
    # C++ shared libraries reported to be fairly broken before switch to ELF
3963
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3964
    ;;
3965
  freebsd-elf*)
3966
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3967
    ;;
3968
  freebsd* | dragonfly*)
3969
    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3970
    # conventions
3971
    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3972
    ;;
3973
  gnu*)
3974
    ;;
3975
  hpux9*)
3976
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3977
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3978
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3979
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3980
    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3981
				# but as the default
3982
				# location of the library.
3983

    
3984
    case $cc_basename in
3985
    CC*)
3986
      # FIXME: insert proper C++ library support
3987
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3988
      ;;
3989
    aCC*)
3990
      _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'
3991
      # Commands to make compiler produce verbose output that lists
3992
      # what "hidden" libraries, object files and flags are used when
3993
      # linking a shared library.
3994
      #
3995
      # There doesn't appear to be a way to prevent this compiler from
3996
      # explicitly linking system object files so we need to strip them
3997
      # from the output so that they don't get included in the library
3998
      # dependencies.
3999
      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'
4000
      ;;
4001
    *)
4002
      if test "$GXX" = yes; then
4003
        _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'
4004
      else
4005
        # FIXME: insert proper C++ library support
4006
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
4007
      fi
4008
      ;;
4009
    esac
4010
    ;;
4011
  hpux10*|hpux11*)
4012
    if test $with_gnu_ld = no; then
4013
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4014
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4015

    
4016
      case $host_cpu in
4017
      hppa*64*|ia64*)
4018
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
4019
        ;;
4020
      *)
4021
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4022
        ;;
4023
      esac
4024
    fi
4025
    case $host_cpu in
4026
    hppa*64*|ia64*)
4027
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
4028
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4029
      ;;
4030
    *)
4031
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4032
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4033
					      # but as the default
4034
					      # location of the library.
4035
      ;;
4036
    esac
4037

    
4038
    case $cc_basename in
4039
      CC*)
4040
	# FIXME: insert proper C++ library support
4041
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4042
	;;
4043
      aCC*)
4044
	case $host_cpu in
4045
	hppa*64*)
4046
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4047
	  ;;
4048
	ia64*)
4049
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4050
	  ;;
4051
	*)
4052
	  _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'
4053
	  ;;
4054
	esac
4055
	# Commands to make compiler produce verbose output that lists
4056
	# what "hidden" libraries, object files and flags are used when
4057
	# linking a shared library.
4058
	#
4059
	# There doesn't appear to be a way to prevent this compiler from
4060
	# explicitly linking system object files so we need to strip them
4061
	# from the output so that they don't get included in the library
4062
	# dependencies.
4063
	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'
4064
	;;
4065
      *)
4066
	if test "$GXX" = yes; then
4067
	  if test $with_gnu_ld = no; then
4068
	    case $host_cpu in
4069
	    hppa*64*)
4070
	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4071
	      ;;
4072
	    ia64*)
4073
	      _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'
4074
	      ;;
4075
	    *)
4076
	      _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'
4077
	      ;;
4078
	    esac
4079
	  fi
4080
	else
4081
	  # FIXME: insert proper C++ library support
4082
	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
4083
	fi
4084
	;;
4085
    esac
4086
    ;;
4087
  interix3*)
4088
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
4089
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4090
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4091
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4092
    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4093
    # Instead, shared libraries are loaded at an image base (0x10000000 by
4094
    # default) and relocated if they conflict, which is a slow very memory
4095
    # consuming and fragmenting process.  To avoid this, we pick a random,
4096
    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4097
    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
4098
    _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'
4099
    _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'
4100
    ;;
4101
  irix5* | irix6*)
4102
    case $cc_basename in
4103
      CC*)
4104
	# SGI C++
4105
	_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'
4106

    
4107
	# Archives containing C++ object files must be created using
4108
	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
4109
	# necessary to make sure instantiated templates are included
4110
	# in the archive.
4111
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4112
	;;
4113
      *)
4114
	if test "$GXX" = yes; then
4115
	  if test "$with_gnu_ld" = no; then
4116
	    _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'
4117
	  else
4118
	    _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'
4119
	  fi
4120
	fi
4121
	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4122
	;;
4123
    esac
4124
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4125
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4126
    ;;
4127
  linux* | k*bsd*-gnu)
4128
    case $cc_basename in
4129
      KCC*)
4130
	# Kuck and Associates, Inc. (KAI) C++ Compiler
4131

    
4132
	# KCC will only create a shared library if the output file
4133
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
4134
	# to its proper name (with version) after linking.
4135
	_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'
4136
	_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'
4137
	# Commands to make compiler produce verbose output that lists
4138
	# what "hidden" libraries, object files and flags are used when
4139
	# linking a shared library.
4140
	#
4141
	# There doesn't appear to be a way to prevent this compiler from
4142
	# explicitly linking system object files so we need to strip them
4143
	# from the output so that they don't get included in the library
4144
	# dependencies.
4145
	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'
4146

    
4147
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
4148
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4149

    
4150
	# Archives containing C++ object files must be created using
4151
	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
4152
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4153
	;;
4154
      icpc*)
4155
	# Intel C++
4156
	with_gnu_ld=yes
4157
	# version 8.0 and above of icpc choke on multiply defined symbols
4158
	# if we add $predep_objects and $postdep_objects, however 7.1 and
4159
	# earlier do not add the objects themselves.
4160
	case `$CC -V 2>&1` in
4161
	*"Version 7."*)
4162
  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4163
  	  _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'
4164
	  ;;
4165
	*)  # Version 8.0 or newer
4166
	  tmp_idyn=
4167
	  case $host_cpu in
4168
	    ia64*) tmp_idyn=' -i_dynamic';;
4169
	  esac
4170
  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4171
	  _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'
4172
	  ;;
4173
	esac
4174
	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4175
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4176
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4177
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
4178
	;;
4179
      pgCC*)
4180
        # Portland Group C++ compiler
4181
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
4182
  	_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'
4183

    
4184
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4185
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4186
	_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'
4187
        ;;
4188
      cxx*)
4189
	# Compaq C++
4190
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4191
	_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'
4192

    
4193
	runpath_var=LD_RUN_PATH
4194
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4195
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4196

    
4197
	# Commands to make compiler produce verbose output that lists
4198
	# what "hidden" libraries, object files and flags are used when
4199
	# linking a shared library.
4200
	#
4201
	# There doesn't appear to be a way to prevent this compiler from
4202
	# explicitly linking system object files so we need to strip them
4203
	# from the output so that they don't get included in the library
4204
	# dependencies.
4205
	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'
4206
	;;
4207
    esac
4208
    ;;
4209
  lynxos*)
4210
    # FIXME: insert proper C++ library support
4211
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4212
    ;;
4213
  m88k*)
4214
    # FIXME: insert proper C++ library support
4215
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4216
    ;;
4217
  mvs*)
4218
    case $cc_basename in
4219
      cxx*)
4220
	# FIXME: insert proper C++ library support
4221
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4222
	;;
4223
      *)
4224
	# FIXME: insert proper C++ library support
4225
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4226
	;;
4227
    esac
4228
    ;;
4229
  netbsd* | netbsdelf*-gnu)
4230
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
4231
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
4232
      wlarc=
4233
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4234
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4235
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4236
    fi
4237
    # Workaround some broken pre-1.5 toolchains
4238
    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
4239
    ;;
4240
  openbsd2*)
4241
    # C++ shared libraries are fairly broken
4242
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4243
    ;;
4244
  openbsd*)
4245
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4246
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4247
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4248
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4249
    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4250
      _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'
4251
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4252
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4253
    fi
4254
    output_verbose_link_cmd='echo'
4255
    ;;
4256
  osf3*)
4257
    case $cc_basename in
4258
      KCC*)
4259
	# Kuck and Associates, Inc. (KAI) C++ Compiler
4260

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

    
4266
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4267
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4268

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

    
4273
	;;
4274
      RCC*)
4275
	# Rational C++ 2.4.1
4276
	# FIXME: insert proper C++ library support
4277
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4278
	;;
4279
      cxx*)
4280
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4281
	_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'
4282

    
4283
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4284
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4285

    
4286
	# Commands to make compiler produce verbose output that lists
4287
	# what "hidden" libraries, object files and flags are used when
4288
	# linking a shared library.
4289
	#
4290
	# There doesn't appear to be a way to prevent this compiler from
4291
	# explicitly linking system object files so we need to strip them
4292
	# from the output so that they don't get included in the library
4293
	# dependencies.
4294
	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'
4295
	;;
4296
      *)
4297
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4298
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4299
	  _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'
4300

    
4301
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4302
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4303

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

    
4309
	else
4310
	  # FIXME: insert proper C++ library support
4311
	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
4312
	fi
4313
	;;
4314
    esac
4315
    ;;
4316
  osf4* | osf5*)
4317
    case $cc_basename in
4318
      KCC*)
4319
	# Kuck and Associates, Inc. (KAI) C++ Compiler
4320

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

    
4326
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4327
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4328

    
4329
	# Archives containing C++ object files must be created using
4330
	# the KAI C++ compiler.
4331
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4332
	;;
4333
      RCC*)
4334
	# Rational C++ 2.4.1
4335
	# FIXME: insert proper C++ library support
4336
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4337
	;;
4338
      cxx*)
4339
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4340
	_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'
4341
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4342
	  echo "-hidden">> $lib.exp~
4343
	  $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~
4344
	  $rm $lib.exp'
4345

    
4346
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4347
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4348

    
4349
	# Commands to make compiler produce verbose output that lists
4350
	# what "hidden" libraries, object files and flags are used when
4351
	# linking a shared library.
4352
	#
4353
	# There doesn't appear to be a way to prevent this compiler from
4354
	# explicitly linking system object files so we need to strip them
4355
	# from the output so that they don't get included in the library
4356
	# dependencies.
4357
	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'
4358
	;;
4359
      *)
4360
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4361
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4362
	 _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'
4363

    
4364
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4365
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4366

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

    
4372
	else
4373
	  # FIXME: insert proper C++ library support
4374
	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
4375
	fi
4376
	;;
4377
    esac
4378
    ;;
4379
  psos*)
4380
    # FIXME: insert proper C++ library support
4381
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4382
    ;;
4383
  sunos4*)
4384
    case $cc_basename in
4385
      CC*)
4386
	# Sun C++ 4.x
4387
	# FIXME: insert proper C++ library support
4388
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4389
	;;
4390
      lcc*)
4391
	# Lucid
4392
	# FIXME: insert proper C++ library support
4393
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4394
	;;
4395
      *)
4396
	# FIXME: insert proper C++ library support
4397
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4398
	;;
4399
    esac
4400
    ;;
4401
  solaris*)
4402
    case $cc_basename in
4403
      CC*)
4404
	# Sun C++ 4.2, 5.x and Centerline C++
4405
        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
4406
	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4407
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4408
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4409
	$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'
4410

    
4411
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4412
	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4413
	case $host_os in
4414
	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
4415
	  *)
4416
	    # The C++ compiler is used as linker so we must use $wl
4417
	    # flag to pass the commands to the underlying system
4418
	    # linker. We must also pass each convience library through
4419
	    # to the system linker between allextract/defaultextract.
4420
	    # The C++ compiler will combine linker options so we
4421
	    # cannot just pass the convience library names through
4422
	    # without $wl.
4423
	    # Supported since Solaris 2.6 (maybe 2.5.1?)
4424
	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
4425
	    ;;
4426
	esac
4427
	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4428

    
4429
	output_verbose_link_cmd='echo'
4430

    
4431
	# Archives containing C++ object files must be created using
4432
	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
4433
	# necessary to make sure instantiated templates are included
4434
	# in the archive.
4435
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4436
	;;
4437
      gcx*)
4438
	# Green Hills C++ Compiler
4439
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4440

    
4441
	# The C++ compiler must be used to create the archive.
4442
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4443
	;;
4444
      *)
4445
	# GNU C++ compiler with Solaris linker
4446
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4447
	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4448
	  if $CC --version | grep -v '^2\.7' > /dev/null; then
4449
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4450
	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4451
		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4452

    
4453
	    # Commands to make compiler produce verbose output that lists
4454
	    # what "hidden" libraries, object files and flags are used when
4455
	    # linking a shared library.
4456
	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4457
	  else
4458
	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
4459
	    # platform.
4460
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4461
	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4462
		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
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
	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4468
	  fi
4469

    
4470
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4471
	fi
4472
	;;
4473
    esac
4474
    ;;
4475
  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
4476
    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4477
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4478
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4479
    runpath_var='LD_RUN_PATH'
4480

    
4481
    case $cc_basename in
4482
      CC*)
4483
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4484
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4485
	;;
4486
      *)
4487
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4488
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
4489
	;;
4490
    esac
4491
    ;;
4492
  sysv5* | sco3.2v5* | sco5v6*)
4493
    # Note: We can NOT use -z defs as we might desire, because we do not
4494
    # link with -lc, and that would cause any symbols used from libc to
4495
    # always be unresolved, which means just about no library would
4496
    # ever link correctly.  If we're not using GNU ld we use -z text
4497
    # though, which does catch some bad symbols but isn't as heavy-handed
4498
    # as -z defs.
4499
    # For security reasons, it is highly recommended that you always
4500
    # use absolute paths for naming shared libraries, and exclude the
4501
    # DT_RUNPATH tag from executables and libraries.  But doing so
4502
    # requires that you compile everything twice, which is a pain.
4503
    # So that behaviour is only enabled if SCOABSPATH is set to a
4504
    # non-empty value in the environment.  Most likely only useful for
4505
    # creating official distributions of packages.
4506
    # This is a hack until libtool officially supports absolute path
4507
    # names for shared libraries.
4508
    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
4509
    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
4510
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4511
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4512
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
4513
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4514
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4515
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
4516
    runpath_var='LD_RUN_PATH'
4517

    
4518
    case $cc_basename in
4519
      CC*)
4520
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4521
	_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'
4522
	;;
4523
      *)
4524
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
4525
	_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'
4526
	;;
4527
    esac
4528
    ;;
4529
  tandem*)
4530
    case $cc_basename in
4531
      NCC*)
4532
	# NonStop-UX NCC 3.20
4533
	# FIXME: insert proper C++ library support
4534
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4535
	;;
4536
      *)
4537
	# FIXME: insert proper C++ library support
4538
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4539
	;;
4540
    esac
4541
    ;;
4542
  vxworks*)
4543
    # FIXME: insert proper C++ library support
4544
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4545
    ;;
4546
  *)
4547
    # FIXME: insert proper C++ library support
4548
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4549
    ;;
4550
esac
4551
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4552
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4553

    
4554
_LT_AC_TAGVAR(GCC, $1)="$GXX"
4555
_LT_AC_TAGVAR(LD, $1)="$LD"
4556

    
4557
AC_LIBTOOL_POSTDEP_PREDEP($1)
4558
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4559
AC_LIBTOOL_PROG_CC_C_O($1)
4560
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4561
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4562
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4563
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4564

    
4565
AC_LIBTOOL_CONFIG($1)
4566

    
4567
AC_LANG_POP
4568
CC=$lt_save_CC
4569
LDCXX=$LD
4570
LD=$lt_save_LD
4571
GCC=$lt_save_GCC
4572
with_gnu_ldcxx=$with_gnu_ld
4573
with_gnu_ld=$lt_save_with_gnu_ld
4574
lt_cv_path_LDCXX=$lt_cv_path_LD
4575
lt_cv_path_LD=$lt_save_path_LD
4576
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4577
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4578
])# AC_LIBTOOL_LANG_CXX_CONFIG
4579

    
4580
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4581
# ------------------------------------
4582
# Figure out "hidden" library dependencies from verbose
4583
# compiler output when linking a shared library.
4584
# Parse the compiler output and extract the necessary
4585
# objects, libraries and library flags.
4586
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
4587
dnl we can't use the lt_simple_compile_test_code here,
4588
dnl because it contains code intended for an executable,
4589
dnl not a library.  It's possible we should let each
4590
dnl tag define a new lt_????_link_test_code variable,
4591
dnl but it's only used here...
4592
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4593
int a;
4594
void foo (void) { a = 0; }
4595
EOF
4596
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4597
class Foo
4598
{
4599
public:
4600
  Foo (void) { a = 0; }
4601
private:
4602
  int a;
4603
};
4604
EOF
4605
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4606
      subroutine foo
4607
      implicit none
4608
      integer*4 a
4609
      a=0
4610
      return
4611
      end
4612
EOF
4613
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4614
public class foo {
4615
  private int a;
4616
  public void bar (void) {
4617
    a = 0;
4618
  }
4619
};
4620
EOF
4621
])
4622
dnl Parse the compiler output and extract the necessary
4623
dnl objects, libraries and library flags.
4624
if AC_TRY_EVAL(ac_compile); then
4625
  # Parse the compiler output and extract the necessary
4626
  # objects, libraries and library flags.
4627

    
4628
  # Sentinel used to keep track of whether or not we are before
4629
  # the conftest object file.
4630
  pre_test_object_deps_done=no
4631

    
4632
  # The `*' in the case matches for architectures that use `case' in
4633
  # $output_verbose_cmd can trigger glob expansion during the loop
4634
  # eval without this substitution.
4635
  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
4636

    
4637
  for p in `eval $output_verbose_link_cmd`; do
4638
    case $p in
4639

    
4640
    -L* | -R* | -l*)
4641
       # Some compilers place space between "-{L,R}" and the path.
4642
       # Remove the space.
4643
       if test $p = "-L" \
4644
	  || test $p = "-R"; then
4645
	 prev=$p
4646
	 continue
4647
       else
4648
	 prev=
4649
       fi
4650

    
4651
       if test "$pre_test_object_deps_done" = no; then
4652
	 case $p in
4653
	 -L* | -R*)
4654
	   # Internal compiler library paths should come after those
4655
	   # provided the user.  The postdeps already come after the
4656
	   # user supplied libs so there is no need to process them.
4657
	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4658
	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4659
	   else
4660
	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4661
	   fi
4662
	   ;;
4663
	 # The "-l" case would never come before the object being
4664
	 # linked, so don't bother handling this case.
4665
	 esac
4666
       else
4667
	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4668
	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4669
	 else
4670
	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4671
	 fi
4672
       fi
4673
       ;;
4674

    
4675
    *.$objext)
4676
       # This assumes that the test object file only shows up
4677
       # once in the compiler output.
4678
       if test "$p" = "conftest.$objext"; then
4679
	 pre_test_object_deps_done=yes
4680
	 continue
4681
       fi
4682

    
4683
       if test "$pre_test_object_deps_done" = no; then
4684
	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4685
	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
4686
	 else
4687
	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4688
	 fi
4689
       else
4690
	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4691
	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
4692
	 else
4693
	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4694
	 fi
4695
       fi
4696
       ;;
4697

    
4698
    *) ;; # Ignore the rest.
4699

    
4700
    esac
4701
  done
4702

    
4703
  # Clean up.
4704
  rm -f a.out a.exe
4705
else
4706
  echo "libtool.m4: error: problem compiling $1 test program"
4707
fi
4708

    
4709
$rm -f confest.$objext
4710

    
4711
# PORTME: override above test on systems where it is broken
4712
ifelse([$1],[CXX],
4713
[case $host_os in
4714
interix3*)
4715
  # Interix 3.5 installs completely hosed .la files for C++, so rather than
4716
  # hack all around it, let's just trust "g++" to DTRT.
4717
  _LT_AC_TAGVAR(predep_objects,$1)=
4718
  _LT_AC_TAGVAR(postdep_objects,$1)=
4719
  _LT_AC_TAGVAR(postdeps,$1)=
4720
  ;;
4721

    
4722
solaris*)
4723
  case $cc_basename in
4724
  CC*)
4725
    # Adding this requires a known-good setup of shared libraries for
4726
    # Sun compiler versions before 5.6, else PIC objects from an old
4727
    # archive will be linked into the output, leading to subtle bugs.
4728
    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
4729
    ;;
4730
  esac
4731
  ;;
4732
esac
4733
])
4734

    
4735
case " $_LT_AC_TAGVAR(postdeps, $1) " in
4736
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4737
esac
4738
])# AC_LIBTOOL_POSTDEP_PREDEP
4739

    
4740
# AC_LIBTOOL_LANG_F77_CONFIG
4741
# --------------------------
4742
# Ensure that the configuration vars for the C compiler are
4743
# suitably defined.  Those variables are subsequently used by
4744
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4745
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4746
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4747
[AC_REQUIRE([AC_PROG_F77])
4748
AC_LANG_PUSH(Fortran 77)
4749

    
4750
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4751
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4752
_LT_AC_TAGVAR(always_export_symbols, $1)=no
4753
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4754
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4755
_LT_AC_TAGVAR(hardcode_direct, $1)=no
4756
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4757
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4758
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4759
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4760
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
4761
_LT_AC_TAGVAR(module_cmds, $1)=
4762
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4763
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4764
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4765
_LT_AC_TAGVAR(no_undefined_flag, $1)=
4766
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4767
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4768

    
4769
# Source file extension for f77 test sources.
4770
ac_ext=f
4771

    
4772
# Object file extension for compiled f77 test sources.
4773
objext=o
4774
_LT_AC_TAGVAR(objext, $1)=$objext
4775

    
4776
# Code to be used in simple compile tests
4777
lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
4778

    
4779
# Code to be used in simple link tests
4780
lt_simple_link_test_code="      program t\n      end\n"
4781

    
4782
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4783
_LT_AC_SYS_COMPILER
4784

    
4785
# save warnings/boilerplate of simple test code
4786
_LT_COMPILER_BOILERPLATE
4787
_LT_LINKER_BOILERPLATE
4788

    
4789
# Allow CC to be a program name with arguments.
4790
lt_save_CC="$CC"
4791
CC=${F77-"f77"}
4792
compiler=$CC
4793
_LT_AC_TAGVAR(compiler, $1)=$CC
4794
_LT_CC_BASENAME([$compiler])
4795

    
4796
AC_MSG_CHECKING([if libtool supports shared libraries])
4797
AC_MSG_RESULT([$can_build_shared])
4798

    
4799
AC_MSG_CHECKING([whether to build shared libraries])
4800
test "$can_build_shared" = "no" && enable_shared=no
4801

    
4802
# On AIX, shared libraries and static libraries use the same namespace, and
4803
# are all built from PIC.
4804
case $host_os in
4805
aix3*)
4806
  test "$enable_shared" = yes && enable_static=no
4807
  if test -n "$RANLIB"; then
4808
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
4809
    postinstall_cmds='$RANLIB $lib'
4810
  fi
4811
  ;;
4812
aix4* | aix5*)
4813
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4814
    test "$enable_shared" = yes && enable_static=no
4815
  fi
4816
  ;;
4817
esac
4818
AC_MSG_RESULT([$enable_shared])
4819

    
4820
AC_MSG_CHECKING([whether to build static libraries])
4821
# Make sure either enable_shared or enable_static is yes.
4822
test "$enable_shared" = yes || enable_static=yes
4823
AC_MSG_RESULT([$enable_static])
4824

    
4825
_LT_AC_TAGVAR(GCC, $1)="$G77"
4826
_LT_AC_TAGVAR(LD, $1)="$LD"
4827

    
4828
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4829
AC_LIBTOOL_PROG_CC_C_O($1)
4830
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4831
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4832
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4833
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4834

    
4835
AC_LIBTOOL_CONFIG($1)
4836

    
4837
AC_LANG_POP
4838
CC="$lt_save_CC"
4839
])# AC_LIBTOOL_LANG_F77_CONFIG
4840

    
4841

    
4842
# AC_LIBTOOL_LANG_GCJ_CONFIG
4843
# --------------------------
4844
# Ensure that the configuration vars for the C compiler are
4845
# suitably defined.  Those variables are subsequently used by
4846
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4847
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4848
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4849
[AC_LANG_SAVE
4850

    
4851
# Source file extension for Java test sources.
4852
ac_ext=java
4853

    
4854
# Object file extension for compiled Java test sources.
4855
objext=o
4856
_LT_AC_TAGVAR(objext, $1)=$objext
4857

    
4858
# Code to be used in simple compile tests
4859
lt_simple_compile_test_code="class foo {}\n"
4860

    
4861
# Code to be used in simple link tests
4862
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
4863

    
4864
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4865
_LT_AC_SYS_COMPILER
4866

    
4867
# save warnings/boilerplate of simple test code
4868
_LT_COMPILER_BOILERPLATE
4869
_LT_LINKER_BOILERPLATE
4870

    
4871
# Allow CC to be a program name with arguments.
4872
lt_save_CC="$CC"
4873
CC=${GCJ-"gcj"}
4874
compiler=$CC
4875
_LT_AC_TAGVAR(compiler, $1)=$CC
4876
_LT_CC_BASENAME([$compiler])
4877

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

    
4881
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4882

    
4883
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4884
AC_LIBTOOL_PROG_COMPILER_PIC($1)
4885
AC_LIBTOOL_PROG_CC_C_O($1)
4886
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4887
AC_LIBTOOL_PROG_LD_SHLIBS($1)
4888
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4889
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4890

    
4891
AC_LIBTOOL_CONFIG($1)
4892

    
4893
AC_LANG_RESTORE
4894
CC="$lt_save_CC"
4895
])# AC_LIBTOOL_LANG_GCJ_CONFIG
4896

    
4897

    
4898
# AC_LIBTOOL_LANG_RC_CONFIG
4899
# -------------------------
4900
# Ensure that the configuration vars for the Windows resource compiler are
4901
# suitably defined.  Those variables are subsequently used by
4902
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4903
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4904
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4905
[AC_LANG_SAVE
4906

    
4907
# Source file extension for RC test sources.
4908
ac_ext=rc
4909

    
4910
# Object file extension for compiled RC test sources.
4911
objext=o
4912
_LT_AC_TAGVAR(objext, $1)=$objext
4913

    
4914
# Code to be used in simple compile tests
4915
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4916

    
4917
# Code to be used in simple link tests
4918
lt_simple_link_test_code="$lt_simple_compile_test_code"
4919

    
4920
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4921
_LT_AC_SYS_COMPILER
4922

    
4923
# save warnings/boilerplate of simple test code
4924
_LT_COMPILER_BOILERPLATE
4925
_LT_LINKER_BOILERPLATE
4926

    
4927
# Allow CC to be a program name with arguments.
4928
lt_save_CC="$CC"
4929
CC=${RC-"windres"}
4930
compiler=$CC
4931
_LT_AC_TAGVAR(compiler, $1)=$CC
4932
_LT_CC_BASENAME([$compiler])
4933
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4934

    
4935
AC_LIBTOOL_CONFIG($1)
4936

    
4937
AC_LANG_RESTORE
4938
CC="$lt_save_CC"
4939
])# AC_LIBTOOL_LANG_RC_CONFIG
4940

    
4941

    
4942
# AC_LIBTOOL_CONFIG([TAGNAME])
4943
# ----------------------------
4944
# If TAGNAME is not passed, then create an initial libtool script
4945
# with a default configuration from the untagged config vars.  Otherwise
4946
# add code to config.status for appending the configuration named by
4947
# TAGNAME from the matching tagged config vars.
4948
AC_DEFUN([AC_LIBTOOL_CONFIG],
4949
[# The else clause should only fire when bootstrapping the
4950
# libtool distribution, otherwise you forgot to ship ltmain.sh
4951
# with your package, and you will get complaints that there are
4952
# no rules to generate ltmain.sh.
4953
if test -f "$ltmain"; then
4954
  # See if we are running on zsh, and set the options which allow our commands through
4955
  # without removal of \ escapes.
4956
  if test -n "${ZSH_VERSION+set}" ; then
4957
    setopt NO_GLOB_SUBST
4958
  fi
4959
  # Now quote all the things that may contain metacharacters while being
4960
  # careful not to overquote the AC_SUBSTed values.  We take copies of the
4961
  # variables and quote the copies for generation of the libtool script.
4962
  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
4963
    SED SHELL STRIP \
4964
    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4965
    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4966
    deplibs_check_method reload_flag reload_cmds need_locks \
4967
    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4968
    lt_cv_sys_global_symbol_to_c_name_address \
4969
    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4970
    old_postinstall_cmds old_postuninstall_cmds \
4971
    _LT_AC_TAGVAR(compiler, $1) \
4972
    _LT_AC_TAGVAR(CC, $1) \
4973
    _LT_AC_TAGVAR(LD, $1) \
4974
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4975
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4976
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4977
    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4978
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4979
    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4980
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4981
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4982
    _LT_AC_TAGVAR(old_archive_cmds, $1) \
4983
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4984
    _LT_AC_TAGVAR(predep_objects, $1) \
4985
    _LT_AC_TAGVAR(postdep_objects, $1) \
4986
    _LT_AC_TAGVAR(predeps, $1) \
4987
    _LT_AC_TAGVAR(postdeps, $1) \
4988
    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4989
    _LT_AC_TAGVAR(archive_cmds, $1) \
4990
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4991
    _LT_AC_TAGVAR(postinstall_cmds, $1) \
4992
    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4993
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4994
    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4995
    _LT_AC_TAGVAR(no_undefined_flag, $1) \
4996
    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4997
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4998
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4999
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
5000
    _LT_AC_TAGVAR(hardcode_automatic, $1) \
5001
    _LT_AC_TAGVAR(module_cmds, $1) \
5002
    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
5003
    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
5004
    _LT_AC_TAGVAR(exclude_expsyms, $1) \
5005
    _LT_AC_TAGVAR(include_expsyms, $1); do
5006

    
5007
    case $var in
5008
    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
5009
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
5010
    _LT_AC_TAGVAR(archive_cmds, $1) | \
5011
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
5012
    _LT_AC_TAGVAR(module_cmds, $1) | \
5013
    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
5014
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
5015
    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
5016
    extract_expsyms_cmds | reload_cmds | finish_cmds | \
5017
    postinstall_cmds | postuninstall_cmds | \
5018
    old_postinstall_cmds | old_postuninstall_cmds | \
5019
    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
5020
      # Double-quote double-evaled strings.
5021
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
5022
      ;;
5023
    *)
5024
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
5025
      ;;
5026
    esac
5027
  done
5028

    
5029
  case $lt_echo in
5030
  *'\[$]0 --fallback-echo"')
5031
    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
5032
    ;;
5033
  esac
5034

    
5035
ifelse([$1], [],
5036
  [cfgfile="${ofile}T"
5037
  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
5038
  $rm -f "$cfgfile"
5039
  AC_MSG_NOTICE([creating $ofile])],
5040
  [cfgfile="$ofile"])
5041

    
5042
  cat <<__EOF__ >> "$cfgfile"
5043
ifelse([$1], [],
5044
[#! $SHELL
5045

    
5046
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
5047
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
5048
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
5049
#
5050
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
5051
# Free Software Foundation, Inc.
5052
#
5053
# This file is part of GNU Libtool:
5054
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5055
#
5056
# This program is free software; you can redistribute it and/or modify
5057
# it under the terms of the GNU General Public License as published by
5058
# the Free Software Foundation; either version 2 of the License, or
5059
# (at your option) any later version.
5060
#
5061
# This program is distributed in the hope that it will be useful, but
5062
# WITHOUT ANY WARRANTY; without even the implied warranty of
5063
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
5064
# General Public License for more details.
5065
#
5066
# You should have received a copy of the GNU General Public License
5067
# along with this program; if not, write to the Free Software
5068
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
5069
#
5070
# As a special exception to the GNU General Public License, if you
5071
# distribute this file as part of a program that contains a
5072
# configuration script generated by Autoconf, you may include it under
5073
# the same distribution terms that you use for the rest of that program.
5074

    
5075
# A sed program that does not truncate output.
5076
SED=$lt_SED
5077

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

    
5081
# The HP-UX ksh and POSIX shell print the target directory to stdout
5082
# if CDPATH is set.
5083
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5084

    
5085
# The names of the tagged configurations supported by this script.
5086
available_tags=
5087

    
5088
# ### BEGIN LIBTOOL CONFIG],
5089
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
5090

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

    
5093
# Shell to use when invoking shell scripts.
5094
SHELL=$lt_SHELL
5095

    
5096
# Whether or not to build shared libraries.
5097
build_libtool_libs=$enable_shared
5098

    
5099
# Whether or not to build static libraries.
5100
build_old_libs=$enable_static
5101

    
5102
# Whether or not to add -lc for building shared libraries.
5103
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
5104

    
5105
# Whether or not to disallow shared libs when runtime libs are static
5106
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
5107

    
5108
# Whether or not to optimize for fast installation.
5109
fast_install=$enable_fast_install
5110

    
5111
# The host system.
5112
host_alias=$host_alias
5113
host=$host
5114
host_os=$host_os
5115

    
5116
# The build system.
5117
build_alias=$build_alias
5118
build=$build
5119
build_os=$build_os
5120

    
5121
# An echo program that does not interpret backslashes.
5122
echo=$lt_echo
5123

    
5124
# The archiver.
5125
AR=$lt_AR
5126
AR_FLAGS=$lt_AR_FLAGS
5127

    
5128
# A C compiler.
5129
LTCC=$lt_LTCC
5130

    
5131
# LTCC compiler flags.
5132
LTCFLAGS=$lt_LTCFLAGS
5133

    
5134
# A language-specific compiler.
5135
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
5136

    
5137
# Is the compiler the GNU C compiler?
5138
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
5139

    
5140
# An ERE matcher.
5141
EGREP=$lt_EGREP
5142

    
5143
# The linker used to build libraries.
5144
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
5145

    
5146
# Whether we need hard or soft links.
5147
LN_S=$lt_LN_S
5148

    
5149
# A BSD-compatible nm program.
5150
NM=$lt_NM
5151

    
5152
# A symbol stripping program
5153
STRIP=$lt_STRIP
5154

    
5155
# Used to examine libraries when file_magic_cmd begins "file"
5156
MAGIC_CMD=$MAGIC_CMD
5157

    
5158
# Used on cygwin: DLL creation program.
5159
DLLTOOL="$DLLTOOL"
5160

    
5161
# Used on cygwin: object dumper.
5162
OBJDUMP="$OBJDUMP"
5163

    
5164
# Used on cygwin: assembler.
5165
AS="$AS"
5166

    
5167
# The name of the directory that contains temporary libtool files.
5168
objdir=$objdir
5169

    
5170
# How to create reloadable object files.
5171
reload_flag=$lt_reload_flag
5172
reload_cmds=$lt_reload_cmds
5173

    
5174
# How to pass a linker flag through the compiler.
5175
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5176

    
5177
# Object file suffix (normally "o").
5178
objext="$ac_objext"
5179

    
5180
# Old archive suffix (normally "a").
5181
libext="$libext"
5182

    
5183
# Shared library suffix (normally ".so").
5184
shrext_cmds='$shrext_cmds'
5185

    
5186
# Executable file suffix (normally "").
5187
exeext="$exeext"
5188

    
5189
# Additional compiler flags for building library objects.
5190
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
5191
pic_mode=$pic_mode
5192

    
5193
# What is the maximum length of a command?
5194
max_cmd_len=$lt_cv_sys_max_cmd_len
5195

    
5196
# Does compiler simultaneously support -c and -o options?
5197
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
5198

    
5199
# Must we lock files when doing compilation?
5200
need_locks=$lt_need_locks
5201

    
5202
# Do we need the lib prefix for modules?
5203
need_lib_prefix=$need_lib_prefix
5204

    
5205
# Do we need a version for libraries?
5206
need_version=$need_version
5207

    
5208
# Whether dlopen is supported.
5209
dlopen_support=$enable_dlopen
5210

    
5211
# Whether dlopen of programs is supported.
5212
dlopen_self=$enable_dlopen_self
5213

    
5214
# Whether dlopen of statically linked programs is supported.
5215
dlopen_self_static=$enable_dlopen_self_static
5216

    
5217
# Compiler flag to prevent dynamic linking.
5218
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
5219

    
5220
# Compiler flag to turn off builtin functions.
5221
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
5222

    
5223
# Compiler flag to allow reflexive dlopens.
5224
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
5225

    
5226
# Compiler flag to generate shared objects directly from archives.
5227
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
5228

    
5229
# Compiler flag to generate thread-safe objects.
5230
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
5231

    
5232
# Library versioning type.
5233
version_type=$version_type
5234

    
5235
# Format of library name prefix.
5236
libname_spec=$lt_libname_spec
5237

    
5238
# List of archive names.  First name is the real one, the rest are links.
5239
# The last name is the one that the linker finds with -lNAME.
5240
library_names_spec=$lt_library_names_spec
5241

    
5242
# The coded name of the library, if different from the real name.
5243
soname_spec=$lt_soname_spec
5244

    
5245
# Commands used to build and install an old-style archive.
5246
RANLIB=$lt_RANLIB
5247
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
5248
old_postinstall_cmds=$lt_old_postinstall_cmds
5249
old_postuninstall_cmds=$lt_old_postuninstall_cmds
5250

    
5251
# Create an old-style archive from a shared archive.
5252
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
5253

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

    
5257
# Commands used to build and install a shared archive.
5258
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
5259
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
5260
postinstall_cmds=$lt_postinstall_cmds
5261
postuninstall_cmds=$lt_postuninstall_cmds
5262

    
5263
# Commands used to build a loadable module (assumed same as above if empty)
5264
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
5265
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
5266

    
5267
# Commands to strip libraries.
5268
old_striplib=$lt_old_striplib
5269
striplib=$lt_striplib
5270

    
5271
# Dependencies to place before the objects being linked to create a
5272
# shared library.
5273
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
5274

    
5275
# Dependencies to place after the objects being linked to create a
5276
# shared library.
5277
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
5278

    
5279
# Dependencies to place before the objects being linked to create a
5280
# shared library.
5281
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
5282

    
5283
# Dependencies to place after the objects being linked to create a
5284
# shared library.
5285
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
5286

    
5287
# The library search path used internally by the compiler when linking
5288
# a shared library.
5289
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
5290

    
5291
# Method to check whether dependent libraries are shared objects.
5292
deplibs_check_method=$lt_deplibs_check_method
5293

    
5294
# Command to use when deplibs_check_method == file_magic.
5295
file_magic_cmd=$lt_file_magic_cmd
5296

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

    
5300
# Flag that forces no undefined symbols.
5301
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
5302

    
5303
# Commands used to finish a libtool library installation in a directory.
5304
finish_cmds=$lt_finish_cmds
5305

    
5306
# Same as above, but a single script fragment to be evaled but not shown.
5307
finish_eval=$lt_finish_eval
5308

    
5309
# Take the output of nm and produce a listing of raw symbols and C names.
5310
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
5311

    
5312
# Transform the output of nm in a proper C declaration
5313
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
5314

    
5315
# Transform the output of nm in a C name address pair
5316
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
5317

    
5318
# This is the shared library runtime path variable.
5319
runpath_var=$runpath_var
5320

    
5321
# This is the shared library path variable.
5322
shlibpath_var=$shlibpath_var
5323

    
5324
# Is shlibpath searched before the hard-coded library search path?
5325
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
5326

    
5327
# How to hardcode a shared library path into an executable.
5328
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
5329

    
5330
# Whether we should hardcode library paths into libraries.
5331
hardcode_into_libs=$hardcode_into_libs
5332

    
5333
# Flag to hardcode \$libdir into a binary during linking.
5334
# This must work even if \$libdir does not exist.
5335
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
5336

    
5337
# If ld is used when linking, flag to hardcode \$libdir into
5338
# a binary during linking. This must work even if \$libdir does
5339
# not exist.
5340
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
5341

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

    
5345
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
5346
# resulting binary.
5347
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
5348

    
5349
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5350
# resulting binary.
5351
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
5352

    
5353
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5354
# the resulting binary.
5355
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
5356

    
5357
# Set to yes if building a shared library automatically hardcodes DIR into the library
5358
# and all subsequent libraries and executables linked against it.
5359
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
5360

    
5361
# Variables whose values should be saved in libtool wrapper scripts and
5362
# restored at relink time.
5363
variables_saved_for_relink="$variables_saved_for_relink"
5364

    
5365
# Whether libtool must link a program against all its dependency libraries.
5366
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
5367

    
5368
# Compile-time system search path for libraries
5369
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5370

    
5371
# Run-time system search path for libraries
5372
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
5373

    
5374
# Fix the shell variable \$srcfile for the compiler.
5375
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
5376

    
5377
# Set to yes if exported symbols are required.
5378
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
5379

    
5380
# The commands to list exported symbols.
5381
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
5382

    
5383
# The commands to extract the exported symbol list from a shared archive.
5384
extract_expsyms_cmds=$lt_extract_expsyms_cmds
5385

    
5386
# Symbols that should not be listed in the preloaded symbols.
5387
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
5388

    
5389
# Symbols that must always be exported.
5390
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
5391

    
5392
ifelse([$1],[],
5393
[# ### END LIBTOOL CONFIG],
5394
[# ### END LIBTOOL TAG CONFIG: $tagname])
5395

    
5396
__EOF__
5397

    
5398
ifelse([$1],[], [
5399
  case $host_os in
5400
  aix3*)
5401
    cat <<\EOF >> "$cfgfile"
5402

    
5403
# AIX sometimes has problems with the GCC collect2 program.  For some
5404
# reason, if we set the COLLECT_NAMES environment variable, the problems
5405
# vanish in a puff of smoke.
5406
if test "X${COLLECT_NAMES+set}" != Xset; then
5407
  COLLECT_NAMES=
5408
  export COLLECT_NAMES
5409
fi
5410
EOF
5411
    ;;
5412
  esac
5413

    
5414
  # We use sed instead of cat because bash on DJGPP gets confused if
5415
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
5416
  # text mode, it properly converts lines to CR/LF.  This bash problem
5417
  # is reportedly fixed, but why not run on old versions too?
5418
  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
5419

    
5420
  mv -f "$cfgfile" "$ofile" || \
5421
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
5422
  chmod +x "$ofile"
5423
])
5424
else
5425
  # If there is no Makefile yet, we rely on a make rule to execute
5426
  # `config.status --recheck' to rerun these tests and create the
5427
  # libtool script then.
5428
  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
5429
  if test -f "$ltmain_in"; then
5430
    test -f Makefile && make "$ltmain"
5431
  fi
5432
fi
5433
])# AC_LIBTOOL_CONFIG
5434

    
5435

    
5436
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
5437
# -------------------------------------------
5438
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
5439
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5440

    
5441
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5442

    
5443
if test "$GCC" = yes; then
5444
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5445

    
5446
  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5447
    lt_cv_prog_compiler_rtti_exceptions,
5448
    [-fno-rtti -fno-exceptions], [],
5449
    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5450
fi
5451
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
5452

    
5453

    
5454
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5455
# ---------------------------------
5456
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
5457
[AC_REQUIRE([AC_CANONICAL_HOST])
5458
AC_REQUIRE([AC_PROG_NM])
5459
AC_REQUIRE([AC_OBJEXT])
5460
# Check for command to grab the raw symbol name followed by C symbol from nm.
5461
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5462
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5463
[
5464
# These are sane defaults that work on at least a few old systems.
5465
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
5466

    
5467
# Character class describing NM global symbol codes.
5468
symcode='[[BCDEGRST]]'
5469

    
5470
# Regexp to match symbols that can be accessed directly from C.
5471
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5472

    
5473
# Transform an extracted symbol line into a proper C declaration
5474
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5475

    
5476
# Transform an extracted symbol line into symbol name and symbol address
5477
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
5478

    
5479
# Define system-specific variables.
5480
case $host_os in
5481
aix*)
5482
  symcode='[[BCDT]]'
5483
  ;;
5484
cygwin* | mingw* | pw32*)
5485
  symcode='[[ABCDGISTW]]'
5486
  ;;
5487
hpux*) # Its linker distinguishes data from code symbols
5488
  if test "$host_cpu" = ia64; then
5489
    symcode='[[ABCDEGRST]]'
5490
  fi
5491
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5492
  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
5493
  ;;
5494
linux* | k*bsd*-gnu)
5495
  if test "$host_cpu" = ia64; then
5496
    symcode='[[ABCDGIRSTW]]'
5497
    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5498
    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
5499
  fi
5500
  ;;
5501
irix* | nonstopux*)
5502
  symcode='[[BCDEGRST]]'
5503
  ;;
5504
osf*)
5505
  symcode='[[BCDEGQRST]]'
5506
  ;;
5507
solaris*)
5508
  symcode='[[BDRT]]'
5509
  ;;
5510
sco3.2v5*)
5511
  symcode='[[DT]]'
5512
  ;;
5513
sysv4.2uw2*)
5514
  symcode='[[DT]]'
5515
  ;;
5516
sysv5* | sco5v6* | unixware* | OpenUNIX*)
5517
  symcode='[[ABDT]]'
5518
  ;;
5519
sysv4)
5520
  symcode='[[DFNSTU]]'
5521
  ;;
5522
esac
5523

    
5524
# Handle CRLF in mingw tool chain
5525
opt_cr=
5526
case $build_os in
5527
mingw*)
5528
  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5529
  ;;
5530
esac
5531

    
5532
# If we're using GNU nm, then use its standard symbol codes.
5533
case `$NM -V 2>&1` in
5534
*GNU* | *'with BFD'*)
5535
  symcode='[[ABCDGIRSTW]]' ;;
5536
esac
5537

    
5538
# Try without a prefix undercore, then with it.
5539
for ac_symprfx in "" "_"; do
5540

    
5541
  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5542
  symxfrm="\\1 $ac_symprfx\\2 \\2"
5543

    
5544
  # Write the raw and C identifiers.
5545
  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5546

    
5547
  # Check to see that the pipe works correctly.
5548
  pipe_works=no
5549

    
5550
  rm -f conftest*
5551
  cat > conftest.$ac_ext <<EOF
5552
#ifdef __cplusplus
5553
extern "C" {
5554
#endif
5555
char nm_test_var;
5556
void nm_test_func(){}
5557
#ifdef __cplusplus
5558
}
5559
#endif
5560
int main(){nm_test_var='a';nm_test_func();return(0);}
5561
EOF
5562

    
5563
  if AC_TRY_EVAL(ac_compile); then
5564
    # Now try to grab the symbols.
5565
    nlist=conftest.nm
5566
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5567
      # Try sorting and uniquifying the output.
5568
      if sort "$nlist" | uniq > "$nlist"T; then
5569
	mv -f "$nlist"T "$nlist"
5570
      else
5571
	rm -f "$nlist"T
5572
      fi
5573

    
5574
      # Make sure that we snagged all the symbols we need.
5575
      if grep ' nm_test_var$' "$nlist" >/dev/null; then
5576
	if grep ' nm_test_func$' "$nlist" >/dev/null; then
5577
	  cat <<EOF > conftest.$ac_ext
5578
#ifdef __cplusplus
5579
extern "C" {
5580
#endif
5581

    
5582
EOF
5583
	  # Now generate the symbol file.
5584
	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5585

    
5586
	  cat <<EOF >> conftest.$ac_ext
5587
#if defined (__STDC__) && __STDC__
5588
# define lt_ptr_t void *
5589
#else
5590
# define lt_ptr_t char *
5591
# define const
5592
#endif
5593

    
5594
/* The mapping between symbol names and symbols. */
5595
const struct {
5596
  const char *name;
5597
  lt_ptr_t address;
5598
}
5599
lt_preloaded_symbols[[]] =
5600
{
5601
EOF
5602
	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5603
	  cat <<\EOF >> conftest.$ac_ext
5604
  {0, (lt_ptr_t) 0}
5605
};
5606

    
5607
#ifdef __cplusplus
5608
}
5609
#endif
5610
EOF
5611
	  # Now try linking the two files.
5612
	  mv conftest.$ac_objext conftstm.$ac_objext
5613
	  lt_save_LIBS="$LIBS"
5614
	  lt_save_CFLAGS="$CFLAGS"
5615
	  LIBS="conftstm.$ac_objext"
5616
	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5617
	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5618
	    pipe_works=yes
5619
	  fi
5620
	  LIBS="$lt_save_LIBS"
5621
	  CFLAGS="$lt_save_CFLAGS"
5622
	else
5623
	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5624
	fi
5625
      else
5626
	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5627
      fi
5628
    else
5629
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5630
    fi
5631
  else
5632
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5633
    cat conftest.$ac_ext >&5
5634
  fi
5635
  rm -f conftest* conftst*
5636

    
5637
  # Do not use the global_symbol_pipe unless it works.
5638
  if test "$pipe_works" = yes; then
5639
    break
5640
  else
5641
    lt_cv_sys_global_symbol_pipe=
5642
  fi
5643
done
5644
])
5645
if test -z "$lt_cv_sys_global_symbol_pipe"; then
5646
  lt_cv_sys_global_symbol_to_cdecl=
5647
fi
5648
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5649
  AC_MSG_RESULT(failed)
5650
else
5651
  AC_MSG_RESULT(ok)
5652
fi
5653
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5654

    
5655

    
5656
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5657
# ---------------------------------------
5658
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5659
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5660
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5661
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5662

    
5663
AC_MSG_CHECKING([for $compiler option to produce PIC])
5664
 ifelse([$1],[CXX],[
5665
  # C++ specific cases for pic, static, wl, etc.
5666
  if test "$GXX" = yes; then
5667
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5668
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5669

    
5670
    case $host_os in
5671
    aix*)
5672
      # All AIX code is PIC.
5673
      if test "$host_cpu" = ia64; then
5674
	# AIX 5 now supports IA64 processor
5675
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5676
      fi
5677
      ;;
5678
    amigaos*)
5679
      # FIXME: we need at least 68020 code to build shared libraries, but
5680
      # adding the `-m68020' flag to GCC prevents building anything better,
5681
      # like `-m68040'.
5682
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5683
      ;;
5684
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5685
      # PIC is the default for these OSes.
5686
      ;;
5687
    mingw* | os2* | pw32*)
5688
      # This hack is so that the source file can tell whether it is being
5689
      # built for inclusion in a dll (and should export symbols for example).
5690
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5691
      ;;
5692
    darwin* | rhapsody*)
5693
      # PIC is the default on this platform
5694
      # Common symbols not allowed in MH_DYLIB files
5695
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5696
      ;;
5697
    *djgpp*)
5698
      # DJGPP does not support shared libraries at all
5699
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5700
      ;;
5701
    interix3*)
5702
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5703
      # Instead, we relocate shared libraries at runtime.
5704
      ;;
5705
    sysv4*MP*)
5706
      if test -d /usr/nec; then
5707
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5708
      fi
5709
      ;;
5710
    hpux*)
5711
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5712
      # not for PA HP-UX.
5713
      case $host_cpu in
5714
      hppa*64*|ia64*)
5715
	;;
5716
      *)
5717
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5718
	;;
5719
      esac
5720
      ;;
5721
    *)
5722
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5723
      ;;
5724
    esac
5725
  else
5726
    case $host_os in
5727
      aix4* | aix5*)
5728
	# All AIX code is PIC.
5729
	if test "$host_cpu" = ia64; then
5730
	  # AIX 5 now supports IA64 processor
5731
	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5732
	else
5733
	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5734
	fi
5735
	;;
5736
      chorus*)
5737
	case $cc_basename in
5738
	cxch68*)
5739
	  # Green Hills C++ Compiler
5740
	  # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
5741
	  ;;
5742
	esac
5743
	;;
5744
       darwin*)
5745
         # PIC is the default on this platform
5746
         # Common symbols not allowed in MH_DYLIB files
5747
         case $cc_basename in
5748
           xlc*)
5749
           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5750
           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5751
           ;;
5752
         esac
5753
       ;;
5754
      dgux*)
5755
	case $cc_basename in
5756
	  ec++*)
5757
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5758
	    ;;
5759
	  ghcx*)
5760
	    # Green Hills C++ Compiler
5761
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5762
	    ;;
5763
	  *)
5764
	    ;;
5765
	esac
5766
	;;
5767
      freebsd* | dragonfly*)
5768
	# FreeBSD uses GNU C++
5769
	;;
5770
      hpux9* | hpux10* | hpux11*)
5771
	case $cc_basename in
5772
	  CC*)
5773
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5774
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5775
	    if test "$host_cpu" != ia64; then
5776
	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5777
	    fi
5778
	    ;;
5779
	  aCC*)
5780
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5781
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5782
	    case $host_cpu in
5783
	    hppa*64*|ia64*)
5784
	      # +Z the default
5785
	      ;;
5786
	    *)
5787
	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5788
	      ;;
5789
	    esac
5790
	    ;;
5791
	  *)
5792
	    ;;
5793
	esac
5794
	;;
5795
      interix*)
5796
	# This is c89, which is MS Visual C++ (no shared libs)
5797
	# Anyone wants to do a port?
5798
	;;
5799
      irix5* | irix6* | nonstopux*)
5800
	case $cc_basename in
5801
	  CC*)
5802
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5803
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5804
	    # CC pic flag -KPIC is the default.
5805
	    ;;
5806
	  *)
5807
	    ;;
5808
	esac
5809
	;;
5810
      linux* | k*bsd*-gnu)
5811
	case $cc_basename in
5812
	  KCC*)
5813
	    # KAI C++ Compiler
5814
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5815
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5816
	    ;;
5817
	  icpc* | ecpc*)
5818
	    # Intel C++
5819
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5820
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5821
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5822
	    ;;
5823
	  pgCC*)
5824
	    # Portland Group C++ compiler.
5825
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5826
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5827
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5828
	    ;;
5829
	  cxx*)
5830
	    # Compaq C++
5831
	    # Make sure the PIC flag is empty.  It appears that all Alpha
5832
	    # Linux and Compaq Tru64 Unix objects are PIC.
5833
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5834
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5835
	    ;;
5836
	  *)
5837
	    ;;
5838
	esac
5839
	;;
5840
      lynxos*)
5841
	;;
5842
      m88k*)
5843
	;;
5844
      mvs*)
5845
	case $cc_basename in
5846
	  cxx*)
5847
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5848
	    ;;
5849
	  *)
5850
	    ;;
5851
	esac
5852
	;;
5853
      netbsd* | netbsdelf*-gnu)
5854
	;;
5855
      osf3* | osf4* | osf5*)
5856
	case $cc_basename in
5857
	  KCC*)
5858
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5859
	    ;;
5860
	  RCC*)
5861
	    # Rational C++ 2.4.1
5862
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5863
	    ;;
5864
	  cxx*)
5865
	    # Digital/Compaq C++
5866
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5867
	    # Make sure the PIC flag is empty.  It appears that all Alpha
5868
	    # Linux and Compaq Tru64 Unix objects are PIC.
5869
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5870
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5871
	    ;;
5872
	  *)
5873
	    ;;
5874
	esac
5875
	;;
5876
      psos*)
5877
	;;
5878
      solaris*)
5879
	case $cc_basename in
5880
	  CC*)
5881
	    # Sun C++ 4.2, 5.x and Centerline C++
5882
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5883
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5884
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5885
	    ;;
5886
	  gcx*)
5887
	    # Green Hills C++ Compiler
5888
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5889
	    ;;
5890
	  *)
5891
	    ;;
5892
	esac
5893
	;;
5894
      sunos4*)
5895
	case $cc_basename in
5896
	  CC*)
5897
	    # Sun C++ 4.x
5898
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5899
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5900
	    ;;
5901
	  lcc*)
5902
	    # Lucid
5903
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5904
	    ;;
5905
	  *)
5906
	    ;;
5907
	esac
5908
	;;
5909
      tandem*)
5910
	case $cc_basename in
5911
	  NCC*)
5912
	    # NonStop-UX NCC 3.20
5913
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5914
	    ;;
5915
	  *)
5916
	    ;;
5917
	esac
5918
	;;
5919
      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5920
	case $cc_basename in
5921
	  CC*)
5922
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5923
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5924
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5925
	    ;;
5926
	esac
5927
	;;
5928
      vxworks*)
5929
	;;
5930
      *)
5931
	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5932
	;;
5933
    esac
5934
  fi
5935
],
5936
[
5937
  if test "$GCC" = yes; then
5938
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5939
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5940

    
5941
    case $host_os in
5942
      aix*)
5943
      # All AIX code is PIC.
5944
      if test "$host_cpu" = ia64; then
5945
	# AIX 5 now supports IA64 processor
5946
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5947
      fi
5948
      ;;
5949

    
5950
    amigaos*)
5951
      # FIXME: we need at least 68020 code to build shared libraries, but
5952
      # adding the `-m68020' flag to GCC prevents building anything better,
5953
      # like `-m68040'.
5954
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5955
      ;;
5956

    
5957
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5958
      # PIC is the default for these OSes.
5959
      ;;
5960

    
5961
    mingw* | pw32* | os2*)
5962
      # This hack is so that the source file can tell whether it is being
5963
      # built for inclusion in a dll (and should export symbols for example).
5964
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5965
      ;;
5966

    
5967
    darwin* | rhapsody*)
5968
      # PIC is the default on this platform
5969
      # Common symbols not allowed in MH_DYLIB files
5970
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5971
      ;;
5972

    
5973
    interix3*)
5974
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5975
      # Instead, we relocate shared libraries at runtime.
5976
      ;;
5977

    
5978
    msdosdjgpp*)
5979
      # Just because we use GCC doesn't mean we suddenly get shared libraries
5980
      # on systems that don't support them.
5981
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5982
      enable_shared=no
5983
      ;;
5984

    
5985
    sysv4*MP*)
5986
      if test -d /usr/nec; then
5987
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5988
      fi
5989
      ;;
5990

    
5991
    hpux*)
5992
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5993
      # not for PA HP-UX.
5994
      case $host_cpu in
5995
      hppa*64*|ia64*)
5996
	# +Z the default
5997
	;;
5998
      *)
5999
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6000
	;;
6001
      esac
6002
      ;;
6003

    
6004
    *)
6005
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6006
      ;;
6007
    esac
6008
  else
6009
    # PORTME Check for flag to pass linker flags through the system compiler.
6010
    case $host_os in
6011
    aix*)
6012
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6013
      if test "$host_cpu" = ia64; then
6014
	# AIX 5 now supports IA64 processor
6015
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6016
      else
6017
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6018
      fi
6019
      ;;
6020
      darwin*)
6021
        # PIC is the default on this platform
6022
        # Common symbols not allowed in MH_DYLIB files
6023
       case $cc_basename in
6024
         xlc*)
6025
         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
6026
         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6027
         ;;
6028
       esac
6029
       ;;
6030

    
6031
    mingw* | pw32* | os2*)
6032
      # This hack is so that the source file can tell whether it is being
6033
      # built for inclusion in a dll (and should export symbols for example).
6034
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
6035
      ;;
6036

    
6037
    hpux9* | hpux10* | hpux11*)
6038
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6039
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6040
      # not for PA HP-UX.
6041
      case $host_cpu in
6042
      hppa*64*|ia64*)
6043
	# +Z the default
6044
	;;
6045
      *)
6046
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6047
	;;
6048
      esac
6049
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
6050
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6051
      ;;
6052

    
6053
    irix5* | irix6* | nonstopux*)
6054
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6055
      # PIC (with -KPIC) is the default.
6056
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6057
      ;;
6058

    
6059
    newsos6)
6060
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6061
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6062
      ;;
6063

    
6064
    linux* | k*bsd*-gnu)
6065
      case $cc_basename in
6066
      icc* | ecc*)
6067
	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6068
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6069
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6070
        ;;
6071
      pgcc* | pgf77* | pgf90* | pgf95*)
6072
        # Portland Group compilers (*not* the Pentium gcc compiler,
6073
	# which looks to be a dead project)
6074
	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6075
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6076
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6077
        ;;
6078
      ccc*)
6079
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6080
        # All Alpha code is PIC.
6081
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6082
        ;;
6083
      esac
6084
      ;;
6085

    
6086
    osf3* | osf4* | osf5*)
6087
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6088
      # All OSF/1 code is PIC.
6089
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6090
      ;;
6091

    
6092
    solaris*)
6093
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6094
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6095
      case $cc_basename in
6096
      f77* | f90* | f95*)
6097
	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6098
      *)
6099
	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6100
      esac
6101
      ;;
6102

    
6103
    sunos4*)
6104
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6105
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6106
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6107
      ;;
6108

    
6109
    sysv4 | sysv4.2uw2* | sysv4.3*)
6110
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6111
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6112
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6113
      ;;
6114

    
6115
    sysv4*MP*)
6116
      if test -d /usr/nec ;then
6117
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6118
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6119
      fi
6120
      ;;
6121

    
6122
    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6123
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6124
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6125
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6126
      ;;
6127

    
6128
    unicos*)
6129
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6130
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6131
      ;;
6132

    
6133
    uts4*)
6134
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6135
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6136
      ;;
6137

    
6138
    *)
6139
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6140
      ;;
6141
    esac
6142
  fi
6143
])
6144
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
6145

    
6146
#
6147
# Check to make sure the PIC flag actually works.
6148
#
6149
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
6150
  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
6151
    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
6152
    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
6153
    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
6154
     "" | " "*) ;;
6155
     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6156
     esac],
6157
    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6158
     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6159
fi
6160
case $host_os in
6161
  # For platforms which do not support PIC, -DPIC is meaningless:
6162
  *djgpp*)
6163
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6164
    ;;
6165
  *)
6166
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
6167
    ;;
6168
esac
6169

    
6170
#
6171
# Check to make sure the static flag actually works.
6172
#
6173
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
6174
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
6175
  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
6176
  $lt_tmp_static_flag,
6177
  [],
6178
  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
6179
])
6180

    
6181

    
6182
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
6183
# ------------------------------------
6184
# See if the linker supports building shared libraries.
6185
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
6186
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6187
ifelse([$1],[CXX],[
6188
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6189
  case $host_os in
6190
  aix4* | aix5*)
6191
    # If we're using GNU nm, then we don't want the "-C" option.
6192
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
6193
    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6194
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6195
    else
6196
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6197
    fi
6198
    ;;
6199
  pw32*)
6200
    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6201
  ;;
6202
  cygwin* | mingw*)
6203
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
6204
  ;;
6205
  linux* | k*bsd*-gnu)
6206
    _LT_AC_TAGVAR(link_all_deplibs, $1)=no
6207
  ;;
6208
  *)
6209
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6210
  ;;
6211
  esac
6212
],[
6213
  runpath_var=
6214
  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6215
  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6216
  _LT_AC_TAGVAR(archive_cmds, $1)=
6217
  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
6218
  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
6219
  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6220
  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6221
  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6222
  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
6223
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6224
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6225
  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6226
  _LT_AC_TAGVAR(hardcode_direct, $1)=no
6227
  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6228
  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6229
  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
6230
  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
6231
  _LT_AC_TAGVAR(module_cmds, $1)=
6232
  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
6233
  _LT_AC_TAGVAR(always_export_symbols, $1)=no
6234
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6235
  # include_expsyms should be a list of space-separated symbols to be *always*
6236
  # included in the symbol list
6237
  _LT_AC_TAGVAR(include_expsyms, $1)=
6238
  # exclude_expsyms can be an extended regexp of symbols to exclude
6239
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
6240
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6241
  # as well as any symbol that contains `d'.
6242
  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
6243
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6244
  # platforms (ab)use it in PIC code, but their linkers get confused if
6245
  # the symbol is explicitly referenced.  Since portable code cannot
6246
  # rely on this symbol name, it's probably fine to never include it in
6247
  # preloaded symbol tables.
6248
  extract_expsyms_cmds=
6249
  # Just being paranoid about ensuring that cc_basename is set.
6250
  _LT_CC_BASENAME([$compiler])
6251
  case $host_os in
6252
  cygwin* | mingw* | pw32*)
6253
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
6254
    # When not using gcc, we currently assume that we are using
6255
    # Microsoft Visual C++.
6256
    if test "$GCC" != yes; then
6257
      with_gnu_ld=no
6258
    fi
6259
    ;;
6260
  interix*)
6261
    # we just hope/assume this is gcc and not c89 (= MSVC++)
6262
    with_gnu_ld=yes
6263
    ;;
6264
  openbsd*)
6265
    with_gnu_ld=no
6266
    ;;
6267
  esac
6268

    
6269
  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6270
  if test "$with_gnu_ld" = yes; then
6271
    # If archive_cmds runs LD, not CC, wlarc should be empty
6272
    wlarc='${wl}'
6273

    
6274
    # Set some defaults for GNU ld with shared library support. These
6275
    # are reset later if shared libraries are not supported. Putting them
6276
    # here allows them to be overridden if necessary.
6277
    runpath_var=LD_RUN_PATH
6278
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
6279
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6280
    # ancient GNU ld didn't support --whole-archive et. al.
6281
    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
6282
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6283
      else
6284
  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6285
    fi
6286
    supports_anon_versioning=no
6287
    case `$LD -v 2>/dev/null` in
6288
      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6289
      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6290
      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6291
      *\ 2.11.*) ;; # other 2.11 versions
6292
      *) supports_anon_versioning=yes ;;
6293
    esac
6294

    
6295
    # See if GNU ld supports shared libraries.
6296
    case $host_os in
6297
    aix3* | aix4* | aix5*)
6298
      # On AIX/PPC, the GNU linker is very broken
6299
      if test "$host_cpu" != ia64; then
6300
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6301
	cat <<EOF 1>&2
6302

    
6303
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
6304
*** to be unable to reliably create shared libraries on AIX.
6305
*** Therefore, libtool is disabling shared libraries support.  If you
6306
*** really care for shared libraries, you may want to modify your PATH
6307
*** so that a non-GNU linker is found, and then restart.
6308

    
6309
EOF
6310
      fi
6311
      ;;
6312

    
6313
    amigaos*)
6314
      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6315
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6316
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6317

    
6318
      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
6319
      # that the semantics of dynamic libraries on AmigaOS, at least up
6320
      # to version 4, is to share data among multiple programs linked
6321
      # with the same dynamic library.  Since this doesn't match the
6322
      # behavior of shared libraries on other platforms, we can't use
6323
      # them.
6324
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6325
      ;;
6326

    
6327
    beos*)
6328
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6329
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6330
	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6331
	# support --undefined.  This deserves some investigation.  FIXME
6332
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6333
      else
6334
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6335
      fi
6336
      ;;
6337

    
6338
    cygwin* | mingw* | pw32*)
6339
      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6340
      # as there is no search path for DLLs.
6341
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6342
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6343
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
6344
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6345
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
6346

    
6347
      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
6348
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6349
	# If the export-symbols file already is a .def file (1st line
6350
	# is EXPORTS), use it as is; otherwise, prepend...
6351
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6352
	  cp $export_symbols $output_objdir/$soname.def;
6353
	else
6354
	  echo EXPORTS > $output_objdir/$soname.def;
6355
	  cat $export_symbols >> $output_objdir/$soname.def;
6356
	fi~
6357
	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6358
      else
6359
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6360
      fi
6361
      ;;
6362

    
6363
    interix3*)
6364
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
6365
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6366
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6367
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6368
      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6369
      # Instead, shared libraries are loaded at an image base (0x10000000 by
6370
      # default) and relocated if they conflict, which is a slow very memory
6371
      # consuming and fragmenting process.  To avoid this, we pick a random,
6372
      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6373
      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6374
      _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'
6375
      _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'
6376
      ;;
6377

    
6378
    linux* | k*bsd*-gnu)
6379
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6380
	tmp_addflag=
6381
	case $cc_basename,$host_cpu in
6382
	pgcc*)				# Portland Group C compiler
6383
	  _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'
6384
	  tmp_addflag=' $pic_flag'
6385
	  ;;
6386
	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
6387
	  _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'
6388
	  tmp_addflag=' $pic_flag -Mnomain' ;;
6389
	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
6390
	  tmp_addflag=' -i_dynamic' ;;
6391
	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
6392
	  tmp_addflag=' -i_dynamic -nofor_main' ;;
6393
	ifc* | ifort*)			# Intel Fortran compiler
6394
	  tmp_addflag=' -nofor_main' ;;
6395
	esac
6396
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6397

    
6398
	if test $supports_anon_versioning = yes; then
6399
	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
6400
  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6401
  $echo "local: *; };" >> $output_objdir/$libname.ver~
6402
	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6403
	fi
6404
	_LT_AC_TAGVAR(link_all_deplibs, $1)=no
6405
      else
6406
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6407
      fi
6408
      ;;
6409

    
6410
    netbsd* | netbsdelf*-gnu)
6411
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6412
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6413
	wlarc=
6414
      else
6415
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6416
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6417
      fi
6418
      ;;
6419

    
6420
    solaris*)
6421
      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
6422
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6423
	cat <<EOF 1>&2
6424

    
6425
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
6426
*** create shared libraries on Solaris systems.  Therefore, libtool
6427
*** is disabling shared libraries support.  We urge you to upgrade GNU
6428
*** binutils to release 2.9.1 or newer.  Another option is to modify
6429
*** your PATH or compiler configuration so that the native linker is
6430
*** used, and then restart.
6431

    
6432
EOF
6433
      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6434
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6435
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6436
      else
6437
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6438
      fi
6439
      ;;
6440

    
6441
    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6442
      case `$LD -v 2>&1` in
6443
        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
6444
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6445
	cat <<_LT_EOF 1>&2
6446

    
6447
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6448
*** reliably create shared libraries on SCO systems.  Therefore, libtool
6449
*** is disabling shared libraries support.  We urge you to upgrade GNU
6450
*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
6451
*** your PATH or compiler configuration so that the native linker is
6452
*** used, and then restart.
6453

    
6454
_LT_EOF
6455
	;;
6456
	*)
6457
	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6458
	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
6459
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
6460
	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
6461
	  else
6462
	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
6463
	  fi
6464
	;;
6465
      esac
6466
      ;;
6467

    
6468
    sunos4*)
6469
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6470
      wlarc=
6471
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6472
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6473
      ;;
6474

    
6475
    *)
6476
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
6477
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6478
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6479
      else
6480
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6481
      fi
6482
      ;;
6483
    esac
6484

    
6485
    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
6486
      runpath_var=
6487
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6488
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
6489
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
6490
    fi
6491
  else
6492
    # PORTME fill in a description of your system's linker (not GNU ld)
6493
    case $host_os in
6494
    aix3*)
6495
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6496
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6497
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
6498
      # Note: this linker hardcodes the directories in LIBPATH if there
6499
      # are no directories specified by -L.
6500
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6501
      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6502
	# Neither direct hardcoding nor static linking is supported with a
6503
	# broken collect2.
6504
	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6505
      fi
6506
      ;;
6507

    
6508
    aix4* | aix5*)
6509
      if test "$host_cpu" = ia64; then
6510
	# On IA64, the linker does run time linking by default, so we don't
6511
	# have to do anything special.
6512
	aix_use_runtimelinking=no
6513
	exp_sym_flag='-Bexport'
6514
	no_entry_flag=""
6515
      else
6516
	# If we're using GNU nm, then we don't want the "-C" option.
6517
	# -C means demangle to AIX nm, but means don't demangle with GNU nm
6518
	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
6519
	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6520
	else
6521
	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
6522
	fi
6523
	aix_use_runtimelinking=no
6524

    
6525
	# Test if we are trying to use run time linking or normal
6526
	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
6527
	# need to do runtime linking.
6528
	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
6529
	  for ld_flag in $LDFLAGS; do
6530
  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6531
  	    aix_use_runtimelinking=yes
6532
  	    break
6533
  	  fi
6534
	  done
6535
	  ;;
6536
	esac
6537

    
6538
	exp_sym_flag='-bexport'
6539
	no_entry_flag='-bnoentry'
6540
      fi
6541

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

    
6548
      _LT_AC_TAGVAR(archive_cmds, $1)=''
6549
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6550
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6551
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6552

    
6553
      if test "$GCC" = yes; then
6554
	case $host_os in aix4.[[012]]|aix4.[[012]].*)
6555
	# We only want to do this on AIX 4.2 and lower, the check
6556
	# below for broken collect2 doesn't work under 4.3+
6557
	  collect2name=`${CC} -print-prog-name=collect2`
6558
	  if test -f "$collect2name" && \
6559
  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
6560
	  then
6561
  	  # We have reworked collect2
6562
  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6563
	  else
6564
  	  # We have old collect2
6565
  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6566
  	  # It fails to find uninstalled libraries when the uninstalled
6567
  	  # path is not listed in the libpath.  Setting hardcode_minus_L
6568
  	  # to unsupported forces relinking
6569
  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6570
  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6571
  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6572
	  fi
6573
	  ;;
6574
	esac
6575
	shared_flag='-shared'
6576
	if test "$aix_use_runtimelinking" = yes; then
6577
	  shared_flag="$shared_flag "'${wl}-G'
6578
	fi
6579
      else
6580
	# not using gcc
6581
	if test "$host_cpu" = ia64; then
6582
  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6583
  	# chokes on -Wl,-G. The following line is correct:
6584
	  shared_flag='-G'
6585
	else
6586
	  if test "$aix_use_runtimelinking" = yes; then
6587
	    shared_flag='${wl}-G'
6588
	  else
6589
	    shared_flag='${wl}-bM:SRE'
6590
	  fi
6591
	fi
6592
      fi
6593

    
6594
      # It seems that -bexpall does not export symbols beginning with
6595
      # underscore (_), so it is better to generate a list of symbols to export.
6596
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6597
      if test "$aix_use_runtimelinking" = yes; then
6598
	# Warning - without using the other runtime loading flags (-brtl),
6599
	# -berok will link without error, but may produce a broken library.
6600
	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6601
       # Determine the default libpath from the value encoded in an empty executable.
6602
       _LT_AC_SYS_LIBPATH_AIX
6603
       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6604
	_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"
6605
       else
6606
	if test "$host_cpu" = ia64; then
6607
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6608
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6609
	  _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"
6610
	else
6611
	 # Determine the default libpath from the value encoded in an empty executable.
6612
	 _LT_AC_SYS_LIBPATH_AIX
6613
	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6614
	  # Warning - without using the other run time loading flags,
6615
	  # -berok will link without error, but may produce a broken library.
6616
	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6617
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6618
	  # Exported symbols can be pulled into shared objects from archives
6619
	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6620
	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6621
	  # This is similar to how AIX traditionally builds its shared libraries.
6622
	  _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'
6623
	fi
6624
      fi
6625
      ;;
6626

    
6627
    amigaos*)
6628
      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6629
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6630
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6631
      # see comment about different semantics on the GNU ld section
6632
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6633
      ;;
6634

    
6635
    bsdi[[45]]*)
6636
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6637
      ;;
6638

    
6639
    cygwin* | mingw* | pw32*)
6640
      # When not using gcc, we currently assume that we are using
6641
      # Microsoft Visual C++.
6642
      # hardcode_libdir_flag_spec is actually meaningless, as there is
6643
      # no search path for DLLs.
6644
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6645
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6646
      # Tell ltmain to make .lib files, not .a files.
6647
      libext=lib
6648
      # Tell ltmain to make .dll files, not .so files.
6649
      shrext_cmds=".dll"
6650
      # FIXME: Setting linknames here is a bad hack.
6651
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6652
      # The linker will automatically build a .lib file if we build a DLL.
6653
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6654
      # FIXME: Should let the user specify the lib program.
6655
      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
6656
      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
6657
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6658
      ;;
6659

    
6660
    darwin* | rhapsody*)
6661
      case $host_os in
6662
        rhapsody* | darwin1.[[012]])
6663
         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
6664
         ;;
6665
       *) # Darwin 1.3 on
6666
         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
6667
           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6668
         else
6669
           case ${MACOSX_DEPLOYMENT_TARGET} in
6670
             10.[[012]])
6671
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
6672
               ;;
6673
             10.*)
6674
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
6675
               ;;
6676
           esac
6677
         fi
6678
         ;;
6679
      esac
6680
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6681
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
6682
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6683
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6684
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
6685
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6686
    if test "$GCC" = yes ; then
6687
    	output_verbose_link_cmd='echo'
6688
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6689
      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6690
      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6691
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6692
      _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}'
6693
    else
6694
      case $cc_basename in
6695
        xlc*)
6696
         output_verbose_link_cmd='echo'
6697
         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
6698
         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6699
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6700
         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6701
          _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}'
6702
          ;;
6703
       *)
6704
         _LT_AC_TAGVAR(ld_shlibs, $1)=no
6705
          ;;
6706
      esac
6707
    fi
6708
      ;;
6709

    
6710
    dgux*)
6711
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6712
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6713
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6714
      ;;
6715

    
6716
    freebsd1*)
6717
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6718
      ;;
6719

    
6720
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6721
    # support.  Future versions do this automatically, but an explicit c++rt0.o
6722
    # does not break anything, and helps significantly (at the cost of a little
6723
    # extra space).
6724
    freebsd2.2*)
6725
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6726
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6727
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6728
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6729
      ;;
6730

    
6731
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6732
    freebsd2*)
6733
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6734
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6735
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6736
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6737
      ;;
6738

    
6739
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6740
    freebsd* | dragonfly*)
6741
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6742
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6743
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6744
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6745
      ;;
6746

    
6747
    hpux9*)
6748
      if test "$GCC" = yes; then
6749
	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6750
      else
6751
	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6752
      fi
6753
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6754
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6755
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6756

    
6757
      # hardcode_minus_L: Not really in the search PATH,
6758
      # but as the default location of the library.
6759
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6760
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6761
      ;;
6762

    
6763
    hpux10*)
6764
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6765
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6766
      else
6767
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6768
      fi
6769
      if test "$with_gnu_ld" = no; then
6770
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6771
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6772

    
6773
	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6774
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6775

    
6776
	# hardcode_minus_L: Not really in the search PATH,
6777
	# but as the default location of the library.
6778
	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6779
      fi
6780
      ;;
6781

    
6782
    hpux11*)
6783
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6784
	case $host_cpu in
6785
	hppa*64*)
6786
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6787
	  ;;
6788
	ia64*)
6789
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6790
	  ;;
6791
	*)
6792
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6793
	  ;;
6794
	esac
6795
      else
6796
	case $host_cpu in
6797
	hppa*64*)
6798
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6799
	  ;;
6800
	ia64*)
6801
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6802
	  ;;
6803
	*)
6804
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6805
	  ;;
6806
	esac
6807
      fi
6808
      if test "$with_gnu_ld" = no; then
6809
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6810
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6811

    
6812
	case $host_cpu in
6813
	hppa*64*|ia64*)
6814
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6815
	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
6816
	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6817
	  ;;
6818
	*)
6819
	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6820
	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6821

    
6822
	  # hardcode_minus_L: Not really in the search PATH,
6823
	  # but as the default location of the library.
6824
	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6825
	  ;;
6826
	esac
6827
      fi
6828
      ;;
6829

    
6830
    irix5* | irix6* | nonstopux*)
6831
      if test "$GCC" = yes; then
6832
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6833
      else
6834
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6835
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6836
      fi
6837
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6838
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6839
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6840
      ;;
6841

    
6842
    netbsd* | netbsdelf*-gnu)
6843
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6844
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6845
      else
6846
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6847
      fi
6848
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6849
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6850
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6851
      ;;
6852

    
6853
    newsos6)
6854
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6855
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6856
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6857
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6858
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6859
      ;;
6860

    
6861
    openbsd*)
6862
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6863
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6864
      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6865
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6866
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6867
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6868
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6869
      else
6870
       case $host_os in
6871
	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6872
	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6873
	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6874
	   ;;
6875
	 *)
6876
	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6877
	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6878
	   ;;
6879
       esac
6880
      fi
6881
      ;;
6882

    
6883
    os2*)
6884
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6885
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6886
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6887
      _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
6888
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6889
      ;;
6890

    
6891
    osf3*)
6892
      if test "$GCC" = yes; then
6893
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6894
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6895
      else
6896
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6897
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6898
      fi
6899
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6900
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6901
      ;;
6902

    
6903
    osf4* | osf5*)	# as osf3* with the addition of -msym flag
6904
      if test "$GCC" = yes; then
6905
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6906
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6907
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6908
      else
6909
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6910
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6911
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6912
	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
6913

    
6914
	# Both c and cxx compiler support -rpath directly
6915
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6916
      fi
6917
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6918
      ;;
6919

    
6920
    solaris*)
6921
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6922
      if test "$GCC" = yes; then
6923
	wlarc='${wl}'
6924
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6925
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6926
	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6927
      else
6928
	wlarc=''
6929
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6930
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6931
  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6932
      fi
6933
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6934
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6935
      case $host_os in
6936
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6937
      *)
6938
 	# The compiler driver will combine linker options so we
6939
 	# cannot just pass the convience library names through
6940
 	# without $wl, iff we do not link with $LD.
6941
 	# Luckily, gcc supports the same syntax we need for Sun Studio.
6942
 	# Supported since Solaris 2.6 (maybe 2.5.1?)
6943
 	case $wlarc in
6944
 	'')
6945
 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6946
 	*)
6947
 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
6948
 	esac ;;
6949
      esac
6950
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6951
      ;;
6952

    
6953
    sunos4*)
6954
      if test "x$host_vendor" = xsequent; then
6955
	# Use $CC to link under sequent, because it throws in some extra .o
6956
	# files that make .init and .fini sections work.
6957
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6958
      else
6959
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6960
      fi
6961
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6962
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6963
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6964
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6965
      ;;
6966

    
6967
    sysv4)
6968
      case $host_vendor in
6969
	sni)
6970
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6971
	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6972
	;;
6973
	siemens)
6974
	  ## LD is ld it makes a PLAMLIB
6975
	  ## CC just makes a GrossModule.
6976
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6977
	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6978
	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
6979
        ;;
6980
	motorola)
6981
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6982
	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6983
	;;
6984
      esac
6985
      runpath_var='LD_RUN_PATH'
6986
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6987
      ;;
6988

    
6989
    sysv4.3*)
6990
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6991
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6992
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6993
      ;;
6994

    
6995
    sysv4*MP*)
6996
      if test -d /usr/nec; then
6997
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6998
	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6999
	runpath_var=LD_RUN_PATH
7000
	hardcode_runpath_var=yes
7001
	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
7002
      fi
7003
      ;;
7004

    
7005
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
7006
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7007
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7008
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7009
      runpath_var='LD_RUN_PATH'
7010

    
7011
      if test "$GCC" = yes; then
7012
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7013
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7014
      else
7015
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7016
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7017
      fi
7018
      ;;
7019

    
7020
    sysv5* | sco3.2v5* | sco5v6*)
7021
      # Note: We can NOT use -z defs as we might desire, because we do not
7022
      # link with -lc, and that would cause any symbols used from libc to
7023
      # always be unresolved, which means just about no library would
7024
      # ever link correctly.  If we're not using GNU ld we use -z text
7025
      # though, which does catch some bad symbols but isn't as heavy-handed
7026
      # as -z defs.
7027
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7028
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7029
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7030
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7031
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
7032
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
7033
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7034
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7035
      runpath_var='LD_RUN_PATH'
7036

    
7037
      if test "$GCC" = yes; then
7038
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7039
	_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'
7040
      else
7041
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
7042
	_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'
7043
      fi
7044
      ;;
7045

    
7046
    uts4*)
7047
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7048
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7049
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7050
      ;;
7051

    
7052
    *)
7053
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
7054
      ;;
7055
    esac
7056
  fi
7057
])
7058
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
7059
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7060

    
7061
#
7062
# Do we need to explicitly link libc?
7063
#
7064
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
7065
x|xyes)
7066
  # Assume -lc should be added
7067
  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7068

    
7069
  if test "$enable_shared" = yes && test "$GCC" = yes; then
7070
    case $_LT_AC_TAGVAR(archive_cmds, $1) in
7071
    *'~'*)
7072
      # FIXME: we may have to deal with multi-command sequences.
7073
      ;;
7074
    '$CC '*)
7075
      # Test whether the compiler implicitly links with -lc since on some
7076
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
7077
      # to ld, don't add -lc before -lgcc.
7078
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
7079
      $rm conftest*
7080
      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
7081

    
7082
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7083
        soname=conftest
7084
        lib=conftest
7085
        libobjs=conftest.$ac_objext
7086
        deplibs=
7087
        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
7088
	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
7089
        compiler_flags=-v
7090
        linker_flags=-v
7091
        verstring=
7092
        output_objdir=.
7093
        libname=conftest
7094
        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
7095
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
7096
        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
7097
        then
7098
	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7099
        else
7100
	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7101
        fi
7102
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7103
      else
7104
        cat conftest.err 1>&5
7105
      fi
7106
      $rm conftest*
7107
      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
7108
      ;;
7109
    esac
7110
  fi
7111
  ;;
7112
esac
7113
])# AC_LIBTOOL_PROG_LD_SHLIBS
7114

    
7115

    
7116
# _LT_AC_FILE_LTDLL_C
7117
# -------------------
7118
# Be careful that the start marker always follows a newline.
7119
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
7120
# /* ltdll.c starts here */
7121
# #define WIN32_LEAN_AND_MEAN
7122
# #include <windows.h>
7123
# #undef WIN32_LEAN_AND_MEAN
7124
# #include <stdio.h>
7125
#
7126
# #ifndef __CYGWIN__
7127
# #  ifdef __CYGWIN32__
7128
# #    define __CYGWIN__ __CYGWIN32__
7129
# #  endif
7130
# #endif
7131
#
7132
# #ifdef __cplusplus
7133
# extern "C" {
7134
# #endif
7135
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7136
# #ifdef __cplusplus
7137
# }
7138
# #endif
7139
#
7140
# #ifdef __CYGWIN__
7141
# #include <cygwin/cygwin_dll.h>
7142
# DECLARE_CYGWIN_DLL( DllMain );
7143
# #endif
7144
# HINSTANCE __hDllInstance_base;
7145
#
7146
# BOOL APIENTRY
7147
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7148
# {
7149
#   __hDllInstance_base = hInst;
7150
#   return TRUE;
7151
# }
7152
# /* ltdll.c ends here */
7153
])# _LT_AC_FILE_LTDLL_C
7154

    
7155

    
7156
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
7157
# ---------------------------------
7158
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
7159

    
7160

    
7161
# old names
7162
AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
7163
AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
7164
AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
7165
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
7166
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
7167
AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
7168
AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
7169

    
7170
# This is just to silence aclocal about the macro not being used
7171
ifelse([AC_DISABLE_FAST_INSTALL])
7172

    
7173
AC_DEFUN([LT_AC_PROG_GCJ],
7174
[AC_CHECK_TOOL(GCJ, gcj, no)
7175
  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
7176
  AC_SUBST(GCJFLAGS)
7177
])
7178

    
7179
AC_DEFUN([LT_AC_PROG_RC],
7180
[AC_CHECK_TOOL(RC, windres, no)
7181
])
7182

    
7183
# NOTE: This macro has been submitted for inclusion into   #
7184
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
7185
#  a released version of Autoconf we should remove this    #
7186
#  macro and use it instead.                               #
7187
# LT_AC_PROG_SED
7188
# --------------
7189
# Check for a fully-functional sed program, that truncates
7190
# as few characters as possible.  Prefer GNU sed if found.
7191
AC_DEFUN([LT_AC_PROG_SED],
7192
[AC_MSG_CHECKING([for a sed that does not truncate output])
7193
AC_CACHE_VAL(lt_cv_path_SED,
7194
[# Loop through the user's path and test for sed and gsed.
7195
# Then use that list of sed's as ones to test for truncation.
7196
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7197
for as_dir in $PATH
7198
do
7199
  IFS=$as_save_IFS
7200
  test -z "$as_dir" && as_dir=.
7201
  for lt_ac_prog in sed gsed; do
7202
    for ac_exec_ext in '' $ac_executable_extensions; do
7203
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
7204
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
7205
      fi
7206
    done
7207
  done
7208
done
7209
lt_ac_max=0
7210
lt_ac_count=0
7211
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
7212
# along with /bin/sed that truncates output.
7213
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
7214
  test ! -f $lt_ac_sed && continue
7215
  cat /dev/null > conftest.in
7216
  lt_ac_count=0
7217
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
7218
  # Check for GNU sed and select it if it is found.
7219
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
7220
    lt_cv_path_SED=$lt_ac_sed
7221
    break
7222
  fi
7223
  while true; do
7224
    cat conftest.in conftest.in >conftest.tmp
7225
    mv conftest.tmp conftest.in
7226
    cp conftest.in conftest.nl
7227
    echo >>conftest.nl
7228
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
7229
    cmp -s conftest.out conftest.nl || break
7230
    # 10000 chars as input seems more than enough
7231
    test $lt_ac_count -gt 10 && break
7232
    lt_ac_count=`expr $lt_ac_count + 1`
7233
    if test $lt_ac_count -gt $lt_ac_max; then
7234
      lt_ac_max=$lt_ac_count
7235
      lt_cv_path_SED=$lt_ac_sed
7236
    fi
7237
  done
7238
done
7239
])
7240
SED=$lt_cv_path_SED
7241
AC_MSG_RESULT([$SED])
7242
])
7243