Statistics
| Branch: | Tag: | Revision:

root / aclocal.m4 @ master

History | View | Annotate | Download (321 KB)

1 4012ec30 Hiroyuki Yamamoto
# generated automatically by aclocal 1.7.9 -*- Autoconf -*-
2
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
4
# Free Software Foundation, Inc.
5
# This file is free software; the Free Software Foundation
6
# gives unlimited permission to copy and/or distribute it,
7
# with or without modifications, as long as this notice is preserved.
8
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12
# PARTICULAR PURPOSE.
13
14
# Do all the work for Automake.                            -*- Autoconf -*-
15
16
# This macro actually does too much some checks are only needed if
17
# your package does certain things.  But this isn't really a big deal.
18
19
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
20
# Free Software Foundation, Inc.
21
22
# This program is free software; you can redistribute it and/or modify
23
# it under the terms of the GNU General Public License as published by
24
# the Free Software Foundation; either version 2, or (at your option)
25
# any later version.
26
27
# This program is distributed in the hope that it will be useful,
28
# but WITHOUT ANY WARRANTY; without even the implied warranty of
29
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
30
# GNU General Public License for more details.
31
32
# You should have received a copy of the GNU General Public License
33
# along with this program; if not, write to the Free Software
34
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
35
# 02111-1307, USA.
36
37
# serial 10
38
39
AC_PREREQ([2.54])
40
41
# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
42
# the ones we care about.
43
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
44
45
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
46
# AM_INIT_AUTOMAKE([OPTIONS])
47
# -----------------------------------------------
48
# The call with PACKAGE and VERSION arguments is the old style
49
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
50
# and VERSION should now be passed to AC_INIT and removed from
51
# the call to AM_INIT_AUTOMAKE.
52
# We support both call styles for the transition.  After
53
# the next Automake release, Autoconf can make the AC_INIT
54
# arguments mandatory, and then we can depend on a new Autoconf
55
# release and drop the old call support.
56
AC_DEFUN([AM_INIT_AUTOMAKE],
57
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
58
 AC_REQUIRE([AC_PROG_INSTALL])dnl
59
# test to see if srcdir already configured
60
if test "`cd $srcdir && pwd`" != "`pwd`" &&
61
   test -f $srcdir/config.status; then
62
  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
63
fi
64
65
# test whether we have cygpath
66
if test -z "$CYGPATH_W"; then
67
  if (cygpath --version) >/dev/null 2>/dev/null; then
68
    CYGPATH_W='cygpath -w'
69
  else
70
    CYGPATH_W=echo
71
  fi
72
fi
73
AC_SUBST([CYGPATH_W])
74
75
# Define the identity of the package.
76
dnl Distinguish between old-style and new-style calls.
77
m4_ifval([$2],
78
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
79
 AC_SUBST([PACKAGE], [$1])dnl
80
 AC_SUBST([VERSION], [$2])],
81
[_AM_SET_OPTIONS([$1])dnl
82
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
83
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
84
85
_AM_IF_OPTION([no-define],,
86
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
87
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
88
89
# Some tools Automake needs.
90
AC_REQUIRE([AM_SANITY_CHECK])dnl
91
AC_REQUIRE([AC_ARG_PROGRAM])dnl
92
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
93
AM_MISSING_PROG(AUTOCONF, autoconf)
94
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
95
AM_MISSING_PROG(AUTOHEADER, autoheader)
96
AM_MISSING_PROG(MAKEINFO, makeinfo)
97
AM_MISSING_PROG(AMTAR, tar)
98
AM_PROG_INSTALL_SH
99
AM_PROG_INSTALL_STRIP
100
# We need awk for the "check" target.  The system "awk" is bad on
101
# some platforms.
102
AC_REQUIRE([AC_PROG_AWK])dnl
103
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
104
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
105
106
_AM_IF_OPTION([no-dependencies],,
107
[AC_PROVIDE_IFELSE([AC_PROG_CC],
108
                  [_AM_DEPENDENCIES(CC)],
109
                  [define([AC_PROG_CC],
110
                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
111
AC_PROVIDE_IFELSE([AC_PROG_CXX],
112
                  [_AM_DEPENDENCIES(CXX)],
113
                  [define([AC_PROG_CXX],
114
                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
115
])
116
])
117
118
119
# When config.status generates a header, we must update the stamp-h file.
120
# This file resides in the same directory as the config header
121
# that is generated.  The stamp files are numbered to have different names.
122
123
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
124
# loop where config.status creates the headers, so we can generate
125
# our stamp files there.
126
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
127
[# Compute $1's index in $config_headers.
128
_am_stamp_count=1
129
for _am_header in $config_headers :; do
130
  case $_am_header in
131
    $1 | $1:* )
132
      break ;;
133
    * )
134
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
135
  esac
136
done
137
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
138
139
# Copyright 2002  Free Software Foundation, Inc.
140
141
# This program is free software; you can redistribute it and/or modify
142
# it under the terms of the GNU General Public License as published by
143
# the Free Software Foundation; either version 2, or (at your option)
144
# any later version.
145
146
# This program is distributed in the hope that it will be useful,
147
# but WITHOUT ANY WARRANTY; without even the implied warranty of
148
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
149
# GNU General Public License for more details.
150
151
# You should have received a copy of the GNU General Public License
152
# along with this program; if not, write to the Free Software
153
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
154
155
# AM_AUTOMAKE_VERSION(VERSION)
156
# ----------------------------
157
# Automake X.Y traces this macro to ensure aclocal.m4 has been
158
# generated from the m4 files accompanying Automake X.Y.
159
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
160
161
# AM_SET_CURRENT_AUTOMAKE_VERSION
162
# -------------------------------
163
# Call AM_AUTOMAKE_VERSION so it can be traced.
164
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
165
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
166
	 [AM_AUTOMAKE_VERSION([1.7.9])])
167
168
# Helper functions for option handling.                    -*- Autoconf -*-
169
170
# Copyright 2001, 2002  Free Software Foundation, Inc.
171
172
# This program is free software; you can redistribute it and/or modify
173
# it under the terms of the GNU General Public License as published by
174
# the Free Software Foundation; either version 2, or (at your option)
175
# any later version.
176
177
# This program is distributed in the hope that it will be useful,
178
# but WITHOUT ANY WARRANTY; without even the implied warranty of
179
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
180
# GNU General Public License for more details.
181
182
# You should have received a copy of the GNU General Public License
183
# along with this program; if not, write to the Free Software
184
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
185
# 02111-1307, USA.
186
187
# serial 2
188
189
# _AM_MANGLE_OPTION(NAME)
190
# -----------------------
191
AC_DEFUN([_AM_MANGLE_OPTION],
192
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
193
194
# _AM_SET_OPTION(NAME)
195
# ------------------------------
196
# Set option NAME.  Presently that only means defining a flag for this option.
197
AC_DEFUN([_AM_SET_OPTION],
198
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
199
200
# _AM_SET_OPTIONS(OPTIONS)
201
# ----------------------------------
202
# OPTIONS is a space-separated list of Automake options.
203
AC_DEFUN([_AM_SET_OPTIONS],
204
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
205
206
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
207
# -------------------------------------------
208
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
209
AC_DEFUN([_AM_IF_OPTION],
210
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
211
212
#
213
# Check to make sure that the build environment is sane.
214
#
215
216
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
217
218
# This program is free software; you can redistribute it and/or modify
219
# it under the terms of the GNU General Public License as published by
220
# the Free Software Foundation; either version 2, or (at your option)
221
# any later version.
222
223
# This program is distributed in the hope that it will be useful,
224
# but WITHOUT ANY WARRANTY; without even the implied warranty of
225
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
226
# GNU General Public License for more details.
227
228
# You should have received a copy of the GNU General Public License
229
# along with this program; if not, write to the Free Software
230
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
231
# 02111-1307, USA.
232
233
# serial 3
234
235
# AM_SANITY_CHECK
236
# ---------------
237
AC_DEFUN([AM_SANITY_CHECK],
238
[AC_MSG_CHECKING([whether build environment is sane])
239
# Just in case
240
sleep 1
241
echo timestamp > conftest.file
242
# Do `set' in a subshell so we don't clobber the current shell's
243
# arguments.  Must try -L first in case configure is actually a
244
# symlink; some systems play weird games with the mod time of symlinks
245
# (eg FreeBSD returns the mod time of the symlink's containing
246
# directory).
247
if (
248
   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
249
   if test "$[*]" = "X"; then
250
      # -L didn't work.
251
      set X `ls -t $srcdir/configure conftest.file`
252
   fi
253
   rm -f conftest.file
254
   if test "$[*]" != "X $srcdir/configure conftest.file" \
255
      && test "$[*]" != "X conftest.file $srcdir/configure"; then
256
257
      # If neither matched, then we have a broken ls.  This can happen
258
      # if, for instance, CONFIG_SHELL is bash and it inherits a
259
      # broken ls alias from the environment.  This has actually
260
      # happened.  Such a system could not be considered "sane".
261
      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
262
alias in your environment])
263
   fi
264
265
   test "$[2]" = conftest.file
266
   )
267
then
268
   # Ok.
269
   :
270
else
271
   AC_MSG_ERROR([newly created file is older than distributed files!
272
Check your system clock])
273
fi
274
AC_MSG_RESULT(yes)])
275
276
#  -*- Autoconf -*-
277
278
279
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
280
281
# This program is free software; you can redistribute it and/or modify
282
# it under the terms of the GNU General Public License as published by
283
# the Free Software Foundation; either version 2, or (at your option)
284
# any later version.
285
286
# This program is distributed in the hope that it will be useful,
287
# but WITHOUT ANY WARRANTY; without even the implied warranty of
288
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
289
# GNU General Public License for more details.
290
291
# You should have received a copy of the GNU General Public License
292
# along with this program; if not, write to the Free Software
293
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
294
# 02111-1307, USA.
295
296
# serial 3
297
298
# AM_MISSING_PROG(NAME, PROGRAM)
299
# ------------------------------
300
AC_DEFUN([AM_MISSING_PROG],
301
[AC_REQUIRE([AM_MISSING_HAS_RUN])
302
$1=${$1-"${am_missing_run}$2"}
303
AC_SUBST($1)])
304
305
306
# AM_MISSING_HAS_RUN
307
# ------------------
308
# Define MISSING if not defined so far and test if it supports --run.
309
# If it does, set am_missing_run to use it, otherwise, to nothing.
310
AC_DEFUN([AM_MISSING_HAS_RUN],
311
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
312
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
313
# Use eval to expand $SHELL
314
if eval "$MISSING --run true"; then
315
  am_missing_run="$MISSING --run "
316
else
317
  am_missing_run=
318
  AC_MSG_WARN([`missing' script is too old or missing])
319
fi
320
])
321
322
# AM_AUX_DIR_EXPAND
323
324
# Copyright 2001 Free Software Foundation, Inc.
325
326
# This program is free software; you can redistribute it and/or modify
327
# it under the terms of the GNU General Public License as published by
328
# the Free Software Foundation; either version 2, or (at your option)
329
# any later version.
330
331
# This program is distributed in the hope that it will be useful,
332
# but WITHOUT ANY WARRANTY; without even the implied warranty of
333
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
334
# GNU General Public License for more details.
335
336
# You should have received a copy of the GNU General Public License
337
# along with this program; if not, write to the Free Software
338
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
339
# 02111-1307, USA.
340
341
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
342
# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
343
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
344
#
345
# Of course, Automake must honor this variable whenever it calls a
346
# tool from the auxiliary directory.  The problem is that $srcdir (and
347
# therefore $ac_aux_dir as well) can be either absolute or relative,
348
# depending on how configure is run.  This is pretty annoying, since
349
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
350
# source directory, any form will work fine, but in subdirectories a
351
# relative path needs to be adjusted first.
352
#
353
# $ac_aux_dir/missing
354
#    fails when called from a subdirectory if $ac_aux_dir is relative
355
# $top_srcdir/$ac_aux_dir/missing
356
#    fails if $ac_aux_dir is absolute,
357
#    fails when called from a subdirectory in a VPATH build with
358
#          a relative $ac_aux_dir
359
#
360
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
361
# are both prefixed by $srcdir.  In an in-source build this is usually
362
# harmless because $srcdir is `.', but things will broke when you
363
# start a VPATH build or use an absolute $srcdir.
364
#
365
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
366
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
367
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
368
# and then we would define $MISSING as
369
#   MISSING="\${SHELL} $am_aux_dir/missing"
370
# This will work as long as MISSING is not called from configure, because
371
# unfortunately $(top_srcdir) has no meaning in configure.
372
# However there are other variables, like CC, which are often used in
373
# configure, and could therefore not use this "fixed" $ac_aux_dir.
374
#
375
# Another solution, used here, is to always expand $ac_aux_dir to an
376
# absolute PATH.  The drawback is that using absolute paths prevent a
377
# configured tree to be moved without reconfiguration.
378
379
# Rely on autoconf to set up CDPATH properly.
380
AC_PREREQ([2.50])
381
382
AC_DEFUN([AM_AUX_DIR_EXPAND], [
383
# expand $ac_aux_dir to an absolute path
384
am_aux_dir=`cd $ac_aux_dir && pwd`
385
])
386
387
# AM_PROG_INSTALL_SH
388
# ------------------
389
# Define $install_sh.
390
391
# Copyright 2001 Free Software Foundation, Inc.
392
393
# This program is free software; you can redistribute it and/or modify
394
# it under the terms of the GNU General Public License as published by
395
# the Free Software Foundation; either version 2, or (at your option)
396
# any later version.
397
398
# This program is distributed in the hope that it will be useful,
399
# but WITHOUT ANY WARRANTY; without even the implied warranty of
400
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
401
# GNU General Public License for more details.
402
403
# You should have received a copy of the GNU General Public License
404
# along with this program; if not, write to the Free Software
405
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
406
# 02111-1307, USA.
407
408
AC_DEFUN([AM_PROG_INSTALL_SH],
409
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
410
install_sh=${install_sh-"$am_aux_dir/install-sh"}
411
AC_SUBST(install_sh)])
412
413
# AM_PROG_INSTALL_STRIP
414
415
# Copyright 2001 Free Software Foundation, Inc.
416
417
# This program is free software; you can redistribute it and/or modify
418
# it under the terms of the GNU General Public License as published by
419
# the Free Software Foundation; either version 2, or (at your option)
420
# any later version.
421
422
# This program is distributed in the hope that it will be useful,
423
# but WITHOUT ANY WARRANTY; without even the implied warranty of
424
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
425
# GNU General Public License for more details.
426
427
# You should have received a copy of the GNU General Public License
428
# along with this program; if not, write to the Free Software
429
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
430
# 02111-1307, USA.
431
432
# One issue with vendor `install' (even GNU) is that you can't
433
# specify the program used to strip binaries.  This is especially
434
# annoying in cross-compiling environments, where the build's strip
435
# is unlikely to handle the host's binaries.
436
# Fortunately install-sh will honor a STRIPPROG variable, so we
437
# always use install-sh in `make install-strip', and initialize
438
# STRIPPROG with the value of the STRIP variable (set by the user).
439
AC_DEFUN([AM_PROG_INSTALL_STRIP],
440
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
441
# Installed binaries are usually stripped using `strip' when the user
442
# run `make install-strip'.  However `strip' might not be the right
443
# tool to use in cross-compilation environments, therefore Automake
444
# will honor the `STRIP' environment variable to overrule this program.
445
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
446
if test "$cross_compiling" != no; then
447
  AC_CHECK_TOOL([STRIP], [strip], :)
448
fi
449
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
450
AC_SUBST([INSTALL_STRIP_PROGRAM])])
451
452
#                                                          -*- Autoconf -*-
453
# Copyright (C) 2003  Free Software Foundation, Inc.
454
455
# This program is free software; you can redistribute it and/or modify
456
# it under the terms of the GNU General Public License as published by
457
# the Free Software Foundation; either version 2, or (at your option)
458
# any later version.
459
460
# This program is distributed in the hope that it will be useful,
461
# but WITHOUT ANY WARRANTY; without even the implied warranty of
462
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
463
# GNU General Public License for more details.
464
465
# You should have received a copy of the GNU General Public License
466
# along with this program; if not, write to the Free Software
467
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
468
# 02111-1307, USA.
469
470
# serial 1
471
472
# Check whether the underlying file-system supports filenames
473
# with a leading dot.  For instance MS-DOS doesn't.
474
AC_DEFUN([AM_SET_LEADING_DOT],
475
[rm -rf .tst 2>/dev/null
476
mkdir .tst 2>/dev/null
477
if test -d .tst; then
478
  am__leading_dot=.
479
else
480
  am__leading_dot=_
481
fi
482
rmdir .tst 2>/dev/null
483
AC_SUBST([am__leading_dot])])
484
485
# serial 5						-*- Autoconf -*-
486
487
# Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
488
489
# This program is free software; you can redistribute it and/or modify
490
# it under the terms of the GNU General Public License as published by
491
# the Free Software Foundation; either version 2, or (at your option)
492
# any later version.
493
494
# This program is distributed in the hope that it will be useful,
495
# but WITHOUT ANY WARRANTY; without even the implied warranty of
496
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
497
# GNU General Public License for more details.
498
499
# You should have received a copy of the GNU General Public License
500
# along with this program; if not, write to the Free Software
501
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
502
# 02111-1307, USA.
503
504
505
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
506
# written in clear, in which case automake, when reading aclocal.m4,
507
# will think it sees a *use*, and therefore will trigger all it's
508
# C support machinery.  Also note that it means that autoscan, seeing
509
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
510
511
512
513
# _AM_DEPENDENCIES(NAME)
514
# ----------------------
515
# See how the compiler implements dependency checking.
516
# NAME is "CC", "CXX", "GCJ", or "OBJC".
517
# We try a few techniques and use that to set a single cache variable.
518
#
519
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
520
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
521
# dependency, and given that the user is not expected to run this macro,
522
# just rely on AC_PROG_CC.
523
AC_DEFUN([_AM_DEPENDENCIES],
524
[AC_REQUIRE([AM_SET_DEPDIR])dnl
525
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
526
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
527
AC_REQUIRE([AM_DEP_TRACK])dnl
528
529
ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
530
       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
531
       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
532
       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
533
                   [depcc="$$1"   am_compiler_list=])
534
535
AC_CACHE_CHECK([dependency style of $depcc],
536
               [am_cv_$1_dependencies_compiler_type],
537
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
538
  # We make a subdir and do the tests there.  Otherwise we can end up
539
  # making bogus files that we don't know about and never remove.  For
540
  # instance it was reported that on HP-UX the gcc test will end up
541
  # making a dummy file named `D' -- because `-MD' means `put the output
542
  # in D'.
543
  mkdir conftest.dir
544
  # Copy depcomp to subdir because otherwise we won't find it if we're
545
  # using a relative directory.
546
  cp "$am_depcomp" conftest.dir
547
  cd conftest.dir
548
  # We will build objects and dependencies in a subdirectory because
549
  # it helps to detect inapplicable dependency modes.  For instance
550
  # both Tru64's cc and ICC support -MD to output dependencies as a
551
  # side effect of compilation, but ICC will put the dependencies in
552
  # the current directory while Tru64 will put them in the object
553
  # directory.
554
  mkdir sub
555
556
  am_cv_$1_dependencies_compiler_type=none
557
  if test "$am_compiler_list" = ""; then
558
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
559
  fi
560
  for depmode in $am_compiler_list; do
561
    # Setup a source with many dependencies, because some compilers
562
    # like to wrap large dependency lists on column 80 (with \), and
563
    # we should not choose a depcomp mode which is confused by this.
564
    #
565
    # We need to recreate these files for each test, as the compiler may
566
    # overwrite some of them when testing with obscure command lines.
567
    # This happens at least with the AIX C compiler.
568
    : > sub/conftest.c
569
    for i in 1 2 3 4 5 6; do
570
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
571
      : > sub/conftst$i.h
572
    done
573
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
574
575
    case $depmode in
576
    nosideeffect)
577
      # after this tag, mechanisms are not by side-effect, so they'll
578
      # only be used when explicitly requested
579
      if test "x$enable_dependency_tracking" = xyes; then
580
	continue
581
      else
582
	break
583
      fi
584
      ;;
585
    none) break ;;
586
    esac
587
    # We check with `-c' and `-o' for the sake of the "dashmstdout"
588
    # mode.  It turns out that the SunPro C++ compiler does not properly
589
    # handle `-M -o', and we need to detect this.
590
    if depmode=$depmode \
591
       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
592
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
593
       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
594
         >/dev/null 2>conftest.err &&
595
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
596
       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
597
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
598
      # icc doesn't choke on unknown options, it will just issue warnings
599
      # (even with -Werror).  So we grep stderr for any message
600
      # that says an option was ignored.
601
      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
602
        am_cv_$1_dependencies_compiler_type=$depmode
603
        break
604
      fi
605
    fi
606
  done
607
608
  cd ..
609
  rm -rf conftest.dir
610
else
611
  am_cv_$1_dependencies_compiler_type=none
612
fi
613
])
614
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
615
AM_CONDITIONAL([am__fastdep$1], [
616
  test "x$enable_dependency_tracking" != xno \
617
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
618
])
619
620
621
# AM_SET_DEPDIR
622
# -------------
623
# Choose a directory name for dependency files.
624
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
625
AC_DEFUN([AM_SET_DEPDIR],
626
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
627
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
628
])
629
630
631
# AM_DEP_TRACK
632
# ------------
633
AC_DEFUN([AM_DEP_TRACK],
634
[AC_ARG_ENABLE(dependency-tracking,
635
[  --disable-dependency-tracking Speeds up one-time builds
636
  --enable-dependency-tracking  Do not reject slow dependency extractors])
637
if test "x$enable_dependency_tracking" != xno; then
638
  am_depcomp="$ac_aux_dir/depcomp"
639
  AMDEPBACKSLASH='\'
640
fi
641
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
642
AC_SUBST([AMDEPBACKSLASH])
643
])
644
645
# Generate code to set up dependency tracking.   -*- Autoconf -*-
646
647
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
648
649
# This program is free software; you can redistribute it and/or modify
650
# it under the terms of the GNU General Public License as published by
651
# the Free Software Foundation; either version 2, or (at your option)
652
# any later version.
653
654
# This program is distributed in the hope that it will be useful,
655
# but WITHOUT ANY WARRANTY; without even the implied warranty of
656
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
657
# GNU General Public License for more details.
658
659
# You should have received a copy of the GNU General Public License
660
# along with this program; if not, write to the Free Software
661
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
662
# 02111-1307, USA.
663
664
#serial 2
665
666
# _AM_OUTPUT_DEPENDENCY_COMMANDS
667
# ------------------------------
668
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
669
[for mf in $CONFIG_FILES; do
670
  # Strip MF so we end up with the name of the file.
671
  mf=`echo "$mf" | sed -e 's/:.*$//'`
672
  # Check whether this is an Automake generated Makefile or not.
673
  # We used to match only the files named `Makefile.in', but
674
  # some people rename them; so instead we look at the file content.
675
  # Grep'ing the first line is not enough: some people post-process
676
  # each Makefile.in and add a new line on top of each file to say so.
677
  # So let's grep whole file.
678
  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
679
    dirpart=`AS_DIRNAME("$mf")`
680
  else
681
    continue
682
  fi
683
  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
684
  # Extract the definition of DEP_FILES from the Makefile without
685
  # running `make'.
686
  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
687
  test -z "$DEPDIR" && continue
688
  # When using ansi2knr, U may be empty or an underscore; expand it
689
  U=`sed -n -e '/^U = / s///p' < "$mf"`
690
  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
691
  # We invoke sed twice because it is the simplest approach to
692
  # changing $(DEPDIR) to its actual value in the expansion.
693
  for file in `sed -n -e '
694
    /^DEP_FILES = .*\\\\$/ {
695
      s/^DEP_FILES = //
696
      :loop
697
	s/\\\\$//
698
	p
699
	n
700
	/\\\\$/ b loop
701
      p
702
    }
703
    /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
704
       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
705
    # Make sure the directory exists.
706
    test -f "$dirpart/$file" && continue
707
    fdir=`AS_DIRNAME(["$file"])`
708
    AS_MKDIR_P([$dirpart/$fdir])
709
    # echo "creating $dirpart/$file"
710
    echo '# dummy' > "$dirpart/$file"
711
  done
712
done
713
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
714
715
716
# AM_OUTPUT_DEPENDENCY_COMMANDS
717
# -----------------------------
718
# This macro should only be invoked once -- use via AC_REQUIRE.
719
#
720
# This code is only required when automatic dependency tracking
721
# is enabled.  FIXME.  This creates each `.P' file that we will
722
# need in order to bootstrap the dependency handling code.
723
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
724
[AC_CONFIG_COMMANDS([depfiles],
725
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
726
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
727
])
728
729
# Check to see how 'make' treats includes.	-*- Autoconf -*-
730
731
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
732
733
# This program is free software; you can redistribute it and/or modify
734
# it under the terms of the GNU General Public License as published by
735
# the Free Software Foundation; either version 2, or (at your option)
736
# any later version.
737
738
# This program is distributed in the hope that it will be useful,
739
# but WITHOUT ANY WARRANTY; without even the implied warranty of
740
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
741
# GNU General Public License for more details.
742
743
# You should have received a copy of the GNU General Public License
744
# along with this program; if not, write to the Free Software
745
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
746
# 02111-1307, USA.
747
748
# serial 2
749
750
# AM_MAKE_INCLUDE()
751
# -----------------
752
# Check to see how make treats includes.
753
AC_DEFUN([AM_MAKE_INCLUDE],
754
[am_make=${MAKE-make}
755
cat > confinc << 'END'
756
am__doit:
757
	@echo done
758
.PHONY: am__doit
759
END
760
# If we don't find an include directive, just comment out the code.
761
AC_MSG_CHECKING([for style of include used by $am_make])
762
am__include="#"
763
am__quote=
764
_am_result=none
765
# First try GNU make style include.
766
echo "include confinc" > confmf
767
# We grep out `Entering directory' and `Leaving directory'
768
# messages which can occur if `w' ends up in MAKEFLAGS.
769
# In particular we don't look at `^make:' because GNU make might
770
# be invoked under some other name (usually "gmake"), in which
771
# case it prints its new name instead of `make'.
772
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
773
   am__include=include
774
   am__quote=
775
   _am_result=GNU
776
fi
777
# Now try BSD make style include.
778
if test "$am__include" = "#"; then
779
   echo '.include "confinc"' > confmf
780
   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
781
      am__include=.include
782
      am__quote="\""
783
      _am_result=BSD
784
   fi
785
fi
786
AC_SUBST([am__include])
787
AC_SUBST([am__quote])
788
AC_MSG_RESULT([$_am_result])
789
rm -f confinc confmf
790
])
791
792
# AM_CONDITIONAL                                              -*- Autoconf -*-
793
794
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
795
796
# This program is free software; you can redistribute it and/or modify
797
# it under the terms of the GNU General Public License as published by
798
# the Free Software Foundation; either version 2, or (at your option)
799
# any later version.
800
801
# This program is distributed in the hope that it will be useful,
802
# but WITHOUT ANY WARRANTY; without even the implied warranty of
803
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
804
# GNU General Public License for more details.
805
806
# You should have received a copy of the GNU General Public License
807
# along with this program; if not, write to the Free Software
808
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
809
# 02111-1307, USA.
810
811
# serial 5
812
813
AC_PREREQ(2.52)
814
815
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
816
# -------------------------------------
817
# Define a conditional.
818
AC_DEFUN([AM_CONDITIONAL],
819
[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
820
        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
821
AC_SUBST([$1_TRUE])
822
AC_SUBST([$1_FALSE])
823
if $2; then
824
  $1_TRUE=
825
  $1_FALSE='#'
826
else
827
  $1_TRUE='#'
828
  $1_FALSE=
829
fi
830
AC_CONFIG_COMMANDS_PRE(
831
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
832
  AC_MSG_ERROR([conditional "$1" was never defined.
833
Usually this means the macro was only invoked conditionally.])
834
fi])])
835
836
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
837
838
# serial 52 Debian 1.5.26-1ubuntu1 AC_PROG_LIBTOOL
839
840
841
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
842
# -----------------------------------------------------------
843
# If this macro is not defined by Autoconf, define it here.
844
m4_ifdef([AC_PROVIDE_IFELSE],
845
         [],
846
         [m4_define([AC_PROVIDE_IFELSE],
847
	         [m4_ifdef([AC_PROVIDE_$1],
848
		           [$2], [$3])])])
849
850
851
# AC_PROG_LIBTOOL
852
# ---------------
853
AC_DEFUN([AC_PROG_LIBTOOL],
854
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
855
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
856
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
857
  AC_PROVIDE_IFELSE([AC_PROG_CXX],
858
    [AC_LIBTOOL_CXX],
859
    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
860
  ])])
861
dnl And a similar setup for Fortran 77 support
862
  AC_PROVIDE_IFELSE([AC_PROG_F77],
863
    [AC_LIBTOOL_F77],
864
    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
865
])])
866
867
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
868
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
869
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
870
  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
871
    [AC_LIBTOOL_GCJ],
872
    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
873
      [AC_LIBTOOL_GCJ],
874
      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
875
	[AC_LIBTOOL_GCJ],
876
      [ifdef([AC_PROG_GCJ],
877
	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
878
       ifdef([A][M_PROG_GCJ],
879
	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
880
       ifdef([LT_AC_PROG_GCJ],
881
	     [define([LT_AC_PROG_GCJ],
882
		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
883
])])# AC_PROG_LIBTOOL
884
885
886
# _AC_PROG_LIBTOOL
887
# ----------------
888
AC_DEFUN([_AC_PROG_LIBTOOL],
889
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
890
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
891
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
892
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
893
894
# This can be used to rebuild libtool when needed
895
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
896
897
# Always use our own libtool.
898
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
899
AC_SUBST(LIBTOOL)dnl
900
901
# Prevent multiple expansion
902
define([AC_PROG_LIBTOOL], [])
903
])# _AC_PROG_LIBTOOL
904
905
906
# AC_LIBTOOL_SETUP
907
# ----------------
908
AC_DEFUN([AC_LIBTOOL_SETUP],
909
[AC_PREREQ(2.50)dnl
910
AC_REQUIRE([AC_ENABLE_SHARED])dnl
911
AC_REQUIRE([AC_ENABLE_STATIC])dnl
912
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
913
AC_REQUIRE([AC_CANONICAL_HOST])dnl
914
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
915
AC_REQUIRE([AC_PROG_CC])dnl
916
AC_REQUIRE([AC_PROG_LD])dnl
917
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
918
AC_REQUIRE([AC_PROG_NM])dnl
919
920
AC_REQUIRE([AC_PROG_LN_S])dnl
921
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
922
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
923
AC_REQUIRE([AC_OBJEXT])dnl
924
AC_REQUIRE([AC_EXEEXT])dnl
925
dnl
926
AC_LIBTOOL_SYS_MAX_CMD_LEN
927
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
928
AC_LIBTOOL_OBJDIR
929
930
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
931
_LT_AC_PROG_ECHO_BACKSLASH
932
933
case $host_os in
934
aix3*)
935
  # AIX sometimes has problems with the GCC collect2 program.  For some
936
  # reason, if we set the COLLECT_NAMES environment variable, the problems
937
  # vanish in a puff of smoke.
938
  if test "X${COLLECT_NAMES+set}" != Xset; then
939
    COLLECT_NAMES=
940
    export COLLECT_NAMES
941
  fi
942
  ;;
943
esac
944
945
# Sed substitution that helps us do robust quoting.  It backslashifies
946
# metacharacters that are still active within double-quoted strings.
947
Xsed='sed -e 1s/^X//'
948
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
949
950
# Same as above, but do not quote variable references.
951
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
952
953
# Sed substitution to delay expansion of an escaped shell variable in a
954
# double_quote_subst'ed string.
955
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
956
957
# Sed substitution to avoid accidental globbing in evaled expressions
958
no_glob_subst='s/\*/\\\*/g'
959
960
# Constants:
961
rm="rm -f"
962
963
# Global variables:
964
default_ofile=libtool
965
can_build_shared=yes
966
967
# All known linkers require a `.a' archive for static linking (except MSVC,
968
# which needs '.lib').
969
libext=a
970
ltmain="$ac_aux_dir/ltmain.sh"
971
ofile="$default_ofile"
972
with_gnu_ld="$lt_cv_prog_gnu_ld"
973
974
AC_CHECK_TOOL(AR, ar, false)
975
AC_CHECK_TOOL(RANLIB, ranlib, :)
976
AC_CHECK_TOOL(STRIP, strip, :)
977
978
old_CC="$CC"
979
old_CFLAGS="$CFLAGS"
980
981
# Set sane defaults for various variables
982
test -z "$AR" && AR=ar
983
test -z "$AR_FLAGS" && AR_FLAGS=cru
984
test -z "$AS" && AS=as
985
test -z "$CC" && CC=cc
986
test -z "$LTCC" && LTCC=$CC
987
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
988
test -z "$DLLTOOL" && DLLTOOL=dlltool
989
test -z "$LD" && LD=ld
990
test -z "$LN_S" && LN_S="ln -s"
991
test -z "$MAGIC_CMD" && MAGIC_CMD=file
992
test -z "$NM" && NM=nm
993
test -z "$SED" && SED=sed
994
test -z "$OBJDUMP" && OBJDUMP=objdump
995
test -z "$RANLIB" && RANLIB=:
996
test -z "$STRIP" && STRIP=:
997
test -z "$ac_objext" && ac_objext=o
998
999
# Determine commands to create old-style static archives.
1000
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1001
old_postinstall_cmds='chmod 644 $oldlib'
1002
old_postuninstall_cmds=
1003
1004
if test -n "$RANLIB"; then
1005
  case $host_os in
1006
  openbsd*)
1007
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1008
    ;;
1009
  *)
1010
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1011
    ;;
1012
  esac
1013
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1014
fi
1015
1016
_LT_CC_BASENAME([$compiler])
1017
1018
# Only perform the check for file, if the check method requires it
1019
case $deplibs_check_method in
1020
file_magic*)
1021
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1022
    AC_PATH_MAGIC
1023
  fi
1024
  ;;
1025
esac
1026
1027
_LT_REQUIRED_DARWIN_CHECKS
1028
1029
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1030
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1031
enable_win32_dll=yes, enable_win32_dll=no)
1032
1033
AC_ARG_ENABLE([libtool-lock],
1034
    [AC_HELP_STRING([--disable-libtool-lock],
1035
	[avoid locking (might break parallel builds)])])
1036
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1037
1038
AC_ARG_WITH([pic],
1039
    [AC_HELP_STRING([--with-pic],
1040
	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1041
    [pic_mode="$withval"],
1042
    [pic_mode=default])
1043
test -z "$pic_mode" && pic_mode=default
1044
1045
# Use C for the default configuration in the libtool script
1046
tagname=
1047
AC_LIBTOOL_LANG_C_CONFIG
1048
_LT_AC_TAGCONFIG
1049
])# AC_LIBTOOL_SETUP
1050
1051
1052
# _LT_AC_SYS_COMPILER
1053
# -------------------
1054
AC_DEFUN([_LT_AC_SYS_COMPILER],
1055
[AC_REQUIRE([AC_PROG_CC])dnl
1056
1057
# If no C compiler was specified, use CC.
1058
LTCC=${LTCC-"$CC"}
1059
1060
# If no C compiler flags were specified, use CFLAGS.
1061
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1062
1063
# Allow CC to be a program name with arguments.
1064
compiler=$CC
1065
])# _LT_AC_SYS_COMPILER
1066
1067
1068
# _LT_CC_BASENAME(CC)
1069
# -------------------
1070
# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1071
AC_DEFUN([_LT_CC_BASENAME],
1072
[for cc_temp in $1""; do
1073
  case $cc_temp in
1074
    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1075
    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1076
    \-*) ;;
1077
    *) break;;
1078
  esac
1079
done
1080
cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1081
])
1082
1083
1084
# _LT_COMPILER_BOILERPLATE
1085
# ------------------------
1086
# Check for compiler boilerplate output or warnings with
1087
# the simple compiler test code.
1088
AC_DEFUN([_LT_COMPILER_BOILERPLATE],
1089
[AC_REQUIRE([LT_AC_PROG_SED])dnl
1090
ac_outfile=conftest.$ac_objext
1091
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1092
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1093
_lt_compiler_boilerplate=`cat conftest.err`
1094
$rm conftest*
1095
])# _LT_COMPILER_BOILERPLATE
1096
1097
1098
# _LT_LINKER_BOILERPLATE
1099
# ----------------------
1100
# Check for linker boilerplate output or warnings with
1101
# the simple link test code.
1102
AC_DEFUN([_LT_LINKER_BOILERPLATE],
1103
[AC_REQUIRE([LT_AC_PROG_SED])dnl
1104
ac_outfile=conftest.$ac_objext
1105
echo "$lt_simple_link_test_code" >conftest.$ac_ext
1106
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1107
_lt_linker_boilerplate=`cat conftest.err`
1108
$rm -r conftest*
1109
])# _LT_LINKER_BOILERPLATE
1110
1111
# _LT_REQUIRED_DARWIN_CHECKS
1112
# --------------------------
1113
# Check for some things on darwin
1114
AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
1115
  case $host_os in
1116
    rhapsody* | darwin*)
1117
    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1118
    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1119
1120
    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1121
      [lt_cv_apple_cc_single_mod=no
1122
      if test -z "${LT_MULTI_MODULE}"; then
1123
   # By default we will add the -single_module flag. You can override
1124
   # by either setting the environment variable LT_MULTI_MODULE
1125
   # non-empty at configure time, or by adding -multi_module to the
1126
   # link flags.
1127
   echo "int foo(void){return 1;}" > conftest.c
1128
   $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1129
     -dynamiclib ${wl}-single_module conftest.c
1130
   if test -f libconftest.dylib; then
1131
     lt_cv_apple_cc_single_mod=yes
1132
     rm -rf libconftest.dylib*
1133
   fi
1134
   rm conftest.c
1135
      fi])
1136
    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1137
      [lt_cv_ld_exported_symbols_list],
1138
      [lt_cv_ld_exported_symbols_list=no
1139
      save_LDFLAGS=$LDFLAGS
1140
      echo "_main" > conftest.sym
1141
      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1142
      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1143
   [lt_cv_ld_exported_symbols_list=yes],
1144
   [lt_cv_ld_exported_symbols_list=no])
1145
   LDFLAGS="$save_LDFLAGS"
1146
    ])
1147
    case $host_os in
1148
    rhapsody* | darwin1.[[0123]])
1149
      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1150
    darwin1.*)
1151
     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1152
    darwin*)
1153
      # if running on 10.5 or later, the deployment target defaults
1154
      # to the OS version, if on x86, and 10.4, the deployment
1155
      # target defaults to 10.4. Don't you love it?
1156
      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1157
   10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1158
     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1159
   10.[[012]]*)
1160
     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1161
   10.*)
1162
     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1163
      esac
1164
    ;;
1165
  esac
1166
    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1167
      _lt_dar_single_mod='$single_module'
1168
    fi
1169
    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1170
      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1171
    else
1172
      _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
1173
    fi
1174
    if test "$DSYMUTIL" != ":"; then
1175
      _lt_dsymutil="~$DSYMUTIL \$lib || :"
1176
    else
1177
      _lt_dsymutil=
1178
    fi
1179
    ;;
1180
  esac
1181
])
1182
1183
# _LT_AC_SYS_LIBPATH_AIX
1184
# ----------------------
1185
# Links a minimal program and checks the executable
1186
# for the system default hardcoded library path. In most cases,
1187
# this is /usr/lib:/lib, but when the MPI compilers are used
1188
# the location of the communication and MPI libs are included too.
1189
# If we don't find anything, use the default library path according
1190
# to the aix ld manual.
1191
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1192
[AC_REQUIRE([LT_AC_PROG_SED])dnl
1193
AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1194
lt_aix_libpath_sed='
1195
    /Import File Strings/,/^$/ {
1196
	/^0/ {
1197
	    s/^0  *\(.*\)$/\1/
1198
	    p
1199
	}
1200
    }'
1201
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1202
# Check for a 64-bit object if we didn't find anything.
1203
if test -z "$aix_libpath"; then
1204
  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
1205
fi],[])
1206
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1207
])# _LT_AC_SYS_LIBPATH_AIX
1208
1209
1210
# _LT_AC_SHELL_INIT(ARG)
1211
# ----------------------
1212
AC_DEFUN([_LT_AC_SHELL_INIT],
1213
[ifdef([AC_DIVERSION_NOTICE],
1214
	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1215
	 [AC_DIVERT_PUSH(NOTICE)])
1216
$1
1217
AC_DIVERT_POP
1218
])# _LT_AC_SHELL_INIT
1219
1220
1221
# _LT_AC_PROG_ECHO_BACKSLASH
1222
# --------------------------
1223
# Add some code to the start of the generated configure script which
1224
# will find an echo command which doesn't interpret backslashes.
1225
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1226
[_LT_AC_SHELL_INIT([
1227
# Check that we are running under the correct shell.
1228
SHELL=${CONFIG_SHELL-/bin/sh}
1229
1230
case X$ECHO in
1231
X*--fallback-echo)
1232
  # Remove one level of quotation (which was required for Make).
1233
  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1234
  ;;
1235
esac
1236
1237
echo=${ECHO-echo}
1238
if test "X[$]1" = X--no-reexec; then
1239
  # Discard the --no-reexec flag, and continue.
1240
  shift
1241
elif test "X[$]1" = X--fallback-echo; then
1242
  # Avoid inline document here, it may be left over
1243
  :
1244
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1245
  # Yippee, $echo works!
1246
  :
1247
else
1248
  # Restart under the correct shell.
1249
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1250
fi
1251
1252
if test "X[$]1" = X--fallback-echo; then
1253
  # used as fallback echo
1254
  shift
1255
  cat <<EOF
1256
[$]*
1257
EOF
1258
  exit 0
1259
fi
1260
1261
# The HP-UX ksh and POSIX shell print the target directory to stdout
1262
# if CDPATH is set.
1263
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1264
1265
if test -z "$ECHO"; then
1266
if test "X${echo_test_string+set}" != Xset; then
1267
# find a string as large as possible, as long as the shell can cope with it
1268
  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1269
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1270
    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
1271
       echo_test_string=`eval $cmd` &&
1272
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1273
    then
1274
      break
1275
    fi
1276
  done
1277
fi
1278
1279
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1280
   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1281
   test "X$echo_testing_string" = "X$echo_test_string"; then
1282
  :
1283
else
1284
  # The Solaris, AIX, and Digital Unix default echo programs unquote
1285
  # backslashes.  This makes it impossible to quote backslashes using
1286
  #   echo "$something" | sed 's/\\/\\\\/g'
1287
  #
1288
  # So, first we look for a working echo in the user's PATH.
1289
1290
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1291
  for dir in $PATH /usr/ucb; do
1292
    IFS="$lt_save_ifs"
1293
    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1294
       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1295
       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1296
       test "X$echo_testing_string" = "X$echo_test_string"; then
1297
      echo="$dir/echo"
1298
      break
1299
    fi
1300
  done
1301
  IFS="$lt_save_ifs"
1302
1303
  if test "X$echo" = Xecho; then
1304
    # We didn't find a better echo, so look for alternatives.
1305
    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1306
       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1307
       test "X$echo_testing_string" = "X$echo_test_string"; then
1308
      # This shell has a builtin print -r that does the trick.
1309
      echo='print -r'
1310
    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1311
	 test "X$CONFIG_SHELL" != X/bin/ksh; then
1312
      # If we have ksh, try running configure again with it.
1313
      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1314
      export ORIGINAL_CONFIG_SHELL
1315
      CONFIG_SHELL=/bin/ksh
1316
      export CONFIG_SHELL
1317
      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1318
    else
1319
      # Try using printf.
1320
      echo='printf %s\n'
1321
      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1322
	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1323
	 test "X$echo_testing_string" = "X$echo_test_string"; then
1324
	# Cool, printf works
1325
	:
1326
      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1327
	   test "X$echo_testing_string" = 'X\t' &&
1328
	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1329
	   test "X$echo_testing_string" = "X$echo_test_string"; then
1330
	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1331
	export CONFIG_SHELL
1332
	SHELL="$CONFIG_SHELL"
1333
	export SHELL
1334
	echo="$CONFIG_SHELL [$]0 --fallback-echo"
1335
      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1336
	   test "X$echo_testing_string" = 'X\t' &&
1337
	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1338
	   test "X$echo_testing_string" = "X$echo_test_string"; then
1339
	echo="$CONFIG_SHELL [$]0 --fallback-echo"
1340
      else
1341
	# maybe with a smaller string...
1342
	prev=:
1343
1344
	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1345
	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1346
	  then
1347
	    break
1348
	  fi
1349
	  prev="$cmd"
1350
	done
1351
1352
	if test "$prev" != 'sed 50q "[$]0"'; then
1353
	  echo_test_string=`eval $prev`
1354
	  export echo_test_string
1355
	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1356
	else
1357
	  # Oops.  We lost completely, so just stick with echo.
1358
	  echo=echo
1359
	fi
1360
      fi
1361
    fi
1362
  fi
1363
fi
1364
fi
1365
1366
# Copy echo and quote the copy suitably for passing to libtool from
1367
# the Makefile, instead of quoting the original, which is used later.
1368
ECHO=$echo
1369
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1370
   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1371
fi
1372
1373
AC_SUBST(ECHO)
1374
])])# _LT_AC_PROG_ECHO_BACKSLASH
1375
1376
1377
# _LT_AC_LOCK
1378
# -----------
1379
AC_DEFUN([_LT_AC_LOCK],
1380
[AC_ARG_ENABLE([libtool-lock],
1381
    [AC_HELP_STRING([--disable-libtool-lock],
1382
	[avoid locking (might break parallel builds)])])
1383
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1384
1385
# Some flags need to be propagated to the compiler or linker for good
1386
# libtool support.
1387
case $host in
1388
ia64-*-hpux*)
1389
  # Find out which ABI we are using.
1390
  echo 'int i;' > conftest.$ac_ext
1391
  if AC_TRY_EVAL(ac_compile); then
1392
    case `/usr/bin/file conftest.$ac_objext` in
1393
    *ELF-32*)
1394
      HPUX_IA64_MODE="32"
1395
      ;;
1396
    *ELF-64*)
1397
      HPUX_IA64_MODE="64"
1398
      ;;
1399
    esac
1400
  fi
1401
  rm -rf conftest*
1402
  ;;
1403
*-*-irix6*)
1404
  # Find out which ABI we are using.
1405
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1406
  if AC_TRY_EVAL(ac_compile); then
1407
   if test "$lt_cv_prog_gnu_ld" = yes; then
1408
    case `/usr/bin/file conftest.$ac_objext` in
1409
    *32-bit*)
1410
      LD="${LD-ld} -melf32bsmip"
1411
      ;;
1412
    *N32*)
1413
      LD="${LD-ld} -melf32bmipn32"
1414
      ;;
1415
    *64-bit*)
1416
      LD="${LD-ld} -melf64bmip"
1417
      ;;
1418
    esac
1419
   else
1420
    case `/usr/bin/file conftest.$ac_objext` in
1421
    *32-bit*)
1422
      LD="${LD-ld} -32"
1423
      ;;
1424
    *N32*)
1425
      LD="${LD-ld} -n32"
1426
      ;;
1427
    *64-bit*)
1428
      LD="${LD-ld} -64"
1429
      ;;
1430
    esac
1431
   fi
1432
  fi
1433
  rm -rf conftest*
1434
  ;;
1435
1436
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
1437
s390*-*linux*|sparc*-*linux*)
1438
  # Find out which ABI we are using.
1439
  echo 'int i;' > conftest.$ac_ext
1440
  if AC_TRY_EVAL(ac_compile); then
1441
    case `/usr/bin/file conftest.o` in
1442
    *32-bit*)
1443
      case $host in
1444
        x86_64-*kfreebsd*-gnu)
1445
          LD="${LD-ld} -m elf_i386_fbsd"
1446
          ;;
1447
        x86_64-*linux*)
1448
          LD="${LD-ld} -m elf_i386"
1449
          ;;
1450
        ppc64-*linux*|powerpc64-*linux*)
1451
          LD="${LD-ld} -m elf32ppclinux"
1452
          ;;
1453
        s390x-*linux*)
1454
          LD="${LD-ld} -m elf_s390"
1455
          ;;
1456
        sparc64-*linux*)
1457
          LD="${LD-ld} -m elf32_sparc"
1458
          ;;
1459
      esac
1460
      ;;
1461
    *64-bit*)
1462
      case $host in
1463
        x86_64-*kfreebsd*-gnu)
1464
          LD="${LD-ld} -m elf_x86_64_fbsd"
1465
          ;;
1466
        x86_64-*linux*)
1467
          LD="${LD-ld} -m elf_x86_64"
1468
          ;;
1469
        ppc*-*linux*|powerpc*-*linux*)
1470
          LD="${LD-ld} -m elf64ppc"
1471
          ;;
1472
        s390*-*linux*)
1473
          LD="${LD-ld} -m elf64_s390"
1474
          ;;
1475
        sparc*-*linux*)
1476
          LD="${LD-ld} -m elf64_sparc"
1477
          ;;
1478
      esac
1479
      ;;
1480
    esac
1481
  fi
1482
  rm -rf conftest*
1483
  ;;
1484
1485
*-*-sco3.2v5*)
1486
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1487
  SAVE_CFLAGS="$CFLAGS"
1488
  CFLAGS="$CFLAGS -belf"
1489
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1490
    [AC_LANG_PUSH(C)
1491
     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1492
     AC_LANG_POP])
1493
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1494
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1495
    CFLAGS="$SAVE_CFLAGS"
1496
  fi
1497
  ;;
1498
sparc*-*solaris*)
1499
  # Find out which ABI we are using.
1500
  echo 'int i;' > conftest.$ac_ext
1501
  if AC_TRY_EVAL(ac_compile); then
1502
    case `/usr/bin/file conftest.o` in
1503
    *64-bit*)
1504
      case $lt_cv_prog_gnu_ld in
1505
      yes*) LD="${LD-ld} -m elf64_sparc" ;;
1506
      *)
1507
        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
1508
	  LD="${LD-ld} -64"
1509
	fi
1510
	;;
1511
      esac
1512
      ;;
1513
    esac
1514
  fi
1515
  rm -rf conftest*
1516
  ;;
1517
1518
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1519
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1520
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1521
  AC_CHECK_TOOL(AS, as, false)
1522
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
1523
  ;;
1524
  ])
1525
esac
1526
1527
need_locks="$enable_libtool_lock"
1528
1529
])# _LT_AC_LOCK
1530
1531
1532
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1533
#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1534
# ----------------------------------------------------------------
1535
# Check whether the given compiler option works
1536
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1537
[AC_REQUIRE([LT_AC_PROG_SED])
1538
AC_CACHE_CHECK([$1], [$2],
1539
  [$2=no
1540
  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1541
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1542
   lt_compiler_flag="$3"
1543
   # Insert the option either (1) after the last *FLAGS variable, or
1544
   # (2) before a word containing "conftest.", or (3) at the end.
1545
   # Note that $ac_compile itself does not contain backslashes and begins
1546
   # with a dollar sign (not a hyphen), so the echo should work correctly.
1547
   # The option is referenced via a variable to avoid confusing sed.
1548
   lt_compile=`echo "$ac_compile" | $SED \
1549
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1550
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1551
   -e 's:$: $lt_compiler_flag:'`
1552
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1553
   (eval "$lt_compile" 2>conftest.err)
1554
   ac_status=$?
1555
   cat conftest.err >&AS_MESSAGE_LOG_FD
1556
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1557
   if (exit $ac_status) && test -s "$ac_outfile"; then
1558
     # The compiler can only warn and ignore the option if not recognized
1559
     # So say no if there are warnings other than the usual output.
1560
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
1561
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1562
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
1563
       $2=yes
1564
     fi
1565
   fi
1566
   $rm conftest*
1567
])
1568
1569
if test x"[$]$2" = xyes; then
1570
    ifelse([$5], , :, [$5])
1571
else
1572
    ifelse([$6], , :, [$6])
1573
fi
1574
])# AC_LIBTOOL_COMPILER_OPTION
1575
1576
1577
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1578
#                          [ACTION-SUCCESS], [ACTION-FAILURE])
1579
# ------------------------------------------------------------
1580
# Check whether the given compiler option works
1581
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1582
[AC_REQUIRE([LT_AC_PROG_SED])dnl
1583
AC_CACHE_CHECK([$1], [$2],
1584
  [$2=no
1585
   save_LDFLAGS="$LDFLAGS"
1586
   LDFLAGS="$LDFLAGS $3"
1587
   echo "$lt_simple_link_test_code" > conftest.$ac_ext
1588
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1589
     # The linker can only warn and ignore the option if not recognized
1590
     # So say no if there are warnings
1591
     if test -s conftest.err; then
1592
       # Append any errors to the config.log.
1593
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
1594
       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
1595
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
1596
       if diff conftest.exp conftest.er2 >/dev/null; then
1597
         $2=yes
1598
       fi
1599
     else
1600
       $2=yes
1601
     fi
1602
   fi
1603
   $rm -r conftest*
1604
   LDFLAGS="$save_LDFLAGS"
1605
])
1606
1607
if test x"[$]$2" = xyes; then
1608
    ifelse([$4], , :, [$4])
1609
else
1610
    ifelse([$5], , :, [$5])
1611
fi
1612
])# AC_LIBTOOL_LINKER_OPTION
1613
1614
1615
# AC_LIBTOOL_SYS_MAX_CMD_LEN
1616
# --------------------------
1617
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1618
[# find the maximum length of command line arguments
1619
AC_MSG_CHECKING([the maximum length of command line arguments])
1620
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1621
  i=0
1622
  teststring="ABCD"
1623
1624
  case $build_os in
1625
  msdosdjgpp*)
1626
    # On DJGPP, this test can blow up pretty badly due to problems in libc
1627
    # (any single argument exceeding 2000 bytes causes a buffer overrun
1628
    # during glob expansion).  Even if it were fixed, the result of this
1629
    # check would be larger than it should be.
1630
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1631
    ;;
1632
1633
  gnu*)
1634
    # Under GNU Hurd, this test is not required because there is
1635
    # no limit to the length of command line arguments.
1636
    # Libtool will interpret -1 as no limit whatsoever
1637
    lt_cv_sys_max_cmd_len=-1;
1638
    ;;
1639
1640
  cygwin* | mingw*)
1641
    # On Win9x/ME, this test blows up -- it succeeds, but takes
1642
    # about 5 minutes as the teststring grows exponentially.
1643
    # Worse, since 9x/ME are not pre-emptively multitasking,
1644
    # you end up with a "frozen" computer, even though with patience
1645
    # the test eventually succeeds (with a max line length of 256k).
1646
    # Instead, let's just punt: use the minimum linelength reported by
1647
    # all of the supported platforms: 8192 (on NT/2K/XP).
1648
    lt_cv_sys_max_cmd_len=8192;
1649
    ;;
1650
1651
  amigaos*)
1652
    # On AmigaOS with pdksh, this test takes hours, literally.
1653
    # So we just punt and use a minimum line length of 8192.
1654
    lt_cv_sys_max_cmd_len=8192;
1655
    ;;
1656
1657
  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
1658
    # This has been around since 386BSD, at least.  Likely further.
1659
    if test -x /sbin/sysctl; then
1660
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
1661
    elif test -x /usr/sbin/sysctl; then
1662
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
1663
    else
1664
      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
1665
    fi
1666
    # And add a safety zone
1667
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1668
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1669
    ;;
1670
1671
  interix*)
1672
    # We know the value 262144 and hardcode it with a safety zone (like BSD)
1673
    lt_cv_sys_max_cmd_len=196608
1674
    ;;
1675
1676
  osf*)
1677
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
1678
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
1679
    # nice to cause kernel panics so lets avoid the loop below.
1680
    # First set a reasonable default.
1681
    lt_cv_sys_max_cmd_len=16384
1682
    #
1683
    if test -x /sbin/sysconfig; then
1684
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
1685
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
1686
      esac
1687
    fi
1688
    ;;
1689
  sco3.2v5*)
1690
    lt_cv_sys_max_cmd_len=102400
1691
    ;;
1692
  sysv5* | sco5v6* | sysv4.2uw2*)
1693
    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
1694
    if test -n "$kargmax"; then
1695
      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
1696
    else
1697
      lt_cv_sys_max_cmd_len=32768
1698
    fi
1699
    ;;
1700
  *)
1701
    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
1702
    if test -n "$lt_cv_sys_max_cmd_len"; then
1703
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
1704
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
1705
    else
1706
      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
1707
      while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
1708
	       = "XX$teststring") >/dev/null 2>&1 &&
1709
	      new_result=`expr "X$teststring" : ".*" 2>&1` &&
1710
	      lt_cv_sys_max_cmd_len=$new_result &&
1711
	      test $i != 17 # 1/2 MB should be enough
1712
      do
1713
        i=`expr $i + 1`
1714
        teststring=$teststring$teststring
1715
      done
1716
      teststring=
1717
      # Add a significant safety factor because C++ compilers can tack on massive
1718
      # amounts of additional arguments before passing them to the linker.
1719
      # It appears as though 1/2 is a usable value.
1720
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1721
    fi
1722
    ;;
1723
  esac
1724
])
1725
if test -n $lt_cv_sys_max_cmd_len ; then
1726
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1727
else
1728
  AC_MSG_RESULT(none)
1729
fi
1730
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1731
1732
1733
# _LT_AC_CHECK_DLFCN
1734
# ------------------
1735
AC_DEFUN([_LT_AC_CHECK_DLFCN],
1736
[AC_CHECK_HEADERS(dlfcn.h)dnl
1737
])# _LT_AC_CHECK_DLFCN
1738
1739
1740
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1741
#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1742
# ---------------------------------------------------------------------
1743
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1744
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1745
if test "$cross_compiling" = yes; then :
1746
  [$4]
1747
else
1748
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1749
  lt_status=$lt_dlunknown
1750
  cat > conftest.$ac_ext <<EOF
1751
[#line __oline__ "configure"
1752
#include "confdefs.h"
1753
1754
#if HAVE_DLFCN_H
1755
#include <dlfcn.h>
1756
#endif
1757
1758
#include <stdio.h>
1759
1760
#ifdef RTLD_GLOBAL
1761
#  define LT_DLGLOBAL		RTLD_GLOBAL
1762
#else
1763
#  ifdef DL_GLOBAL
1764
#    define LT_DLGLOBAL		DL_GLOBAL
1765
#  else
1766
#    define LT_DLGLOBAL		0
1767
#  endif
1768
#endif
1769
1770
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1771
   find out it does not work in some platform. */
1772
#ifndef LT_DLLAZY_OR_NOW
1773
#  ifdef RTLD_LAZY
1774
#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
1775
#  else
1776
#    ifdef DL_LAZY
1777
#      define LT_DLLAZY_OR_NOW		DL_LAZY
1778
#    else
1779
#      ifdef RTLD_NOW
1780
#        define LT_DLLAZY_OR_NOW	RTLD_NOW
1781
#      else
1782
#        ifdef DL_NOW
1783
#          define LT_DLLAZY_OR_NOW	DL_NOW
1784
#        else
1785
#          define LT_DLLAZY_OR_NOW	0
1786
#        endif
1787
#      endif
1788
#    endif
1789
#  endif
1790
#endif
1791
1792
#ifdef __cplusplus
1793
extern "C" void exit (int);
1794
#endif
1795
1796
void fnord() { int i=42;}
1797
int main ()
1798
{
1799
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1800
  int status = $lt_dlunknown;
1801
1802
  if (self)
1803
    {
1804
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1805
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1806
      /* dlclose (self); */
1807
    }
1808
  else
1809
    puts (dlerror ());
1810
1811
    exit (status);
1812
}]
1813
EOF
1814
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1815
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
1816
    lt_status=$?
1817
    case x$lt_status in
1818
      x$lt_dlno_uscore) $1 ;;
1819
      x$lt_dlneed_uscore) $2 ;;
1820
      x$lt_dlunknown|x*) $3 ;;
1821
    esac
1822
  else :
1823
    # compilation failed
1824
    $3
1825
  fi
1826
fi
1827
rm -fr conftest*
1828
])# _LT_AC_TRY_DLOPEN_SELF
1829
1830
1831
# AC_LIBTOOL_DLOPEN_SELF
1832
# ----------------------
1833
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1834
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1835
if test "x$enable_dlopen" != xyes; then
1836
  enable_dlopen=unknown
1837
  enable_dlopen_self=unknown
1838
  enable_dlopen_self_static=unknown
1839
else
1840
  lt_cv_dlopen=no
1841
  lt_cv_dlopen_libs=
1842
1843
  case $host_os in
1844
  beos*)
1845
    lt_cv_dlopen="load_add_on"
1846
    lt_cv_dlopen_libs=
1847
    lt_cv_dlopen_self=yes
1848
    ;;
1849
1850
  mingw* | pw32*)
1851
    lt_cv_dlopen="LoadLibrary"
1852
    lt_cv_dlopen_libs=
1853
   ;;
1854
1855
  cygwin*)
1856
    lt_cv_dlopen="dlopen"
1857
    lt_cv_dlopen_libs=
1858
   ;;
1859
1860
  darwin*)
1861
  # if libdl is installed we need to link against it
1862
    AC_CHECK_LIB([dl], [dlopen],
1863
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1864
    lt_cv_dlopen="dyld"
1865
    lt_cv_dlopen_libs=
1866
    lt_cv_dlopen_self=yes
1867
    ])
1868
   ;;
1869
1870
  *)
1871
    AC_CHECK_FUNC([shl_load],
1872
	  [lt_cv_dlopen="shl_load"],
1873
      [AC_CHECK_LIB([dld], [shl_load],
1874
	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1875
	[AC_CHECK_FUNC([dlopen],
1876
	      [lt_cv_dlopen="dlopen"],
1877
	  [AC_CHECK_LIB([dl], [dlopen],
1878
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1879
	    [AC_CHECK_LIB([svld], [dlopen],
1880
		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1881
	      [AC_CHECK_LIB([dld], [dld_link],
1882
		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1883
	      ])
1884
	    ])
1885
	  ])
1886
	])
1887
      ])
1888
    ;;
1889
  esac
1890
1891
  if test "x$lt_cv_dlopen" != xno; then
1892
    enable_dlopen=yes
1893
  else
1894
    enable_dlopen=no
1895
  fi
1896
1897
  case $lt_cv_dlopen in
1898
  dlopen)
1899
    save_CPPFLAGS="$CPPFLAGS"
1900
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1901
1902
    save_LDFLAGS="$LDFLAGS"
1903
    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1904
1905
    save_LIBS="$LIBS"
1906
    LIBS="$lt_cv_dlopen_libs $LIBS"
1907
1908
    AC_CACHE_CHECK([whether a program can dlopen itself],
1909
	  lt_cv_dlopen_self, [dnl
1910
	  _LT_AC_TRY_DLOPEN_SELF(
1911
	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1912
	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1913
    ])
1914
1915
    if test "x$lt_cv_dlopen_self" = xyes; then
1916
      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1917
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1918
    	  lt_cv_dlopen_self_static, [dnl
1919
	  _LT_AC_TRY_DLOPEN_SELF(
1920
	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1921
	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1922
      ])
1923
    fi
1924
1925
    CPPFLAGS="$save_CPPFLAGS"
1926
    LDFLAGS="$save_LDFLAGS"
1927
    LIBS="$save_LIBS"
1928
    ;;
1929
  esac
1930
1931
  case $lt_cv_dlopen_self in
1932
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1933
  *) enable_dlopen_self=unknown ;;
1934
  esac
1935
1936
  case $lt_cv_dlopen_self_static in
1937
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1938
  *) enable_dlopen_self_static=unknown ;;
1939
  esac
1940
fi
1941
])# AC_LIBTOOL_DLOPEN_SELF
1942
1943
1944
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1945
# ---------------------------------
1946
# Check to see if options -c and -o are simultaneously supported by compiler
1947
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1948
[AC_REQUIRE([LT_AC_PROG_SED])dnl
1949
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1950
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1951
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1952
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1953
   $rm -r conftest 2>/dev/null
1954
   mkdir conftest
1955
   cd conftest
1956
   mkdir out
1957
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1958
1959
   lt_compiler_flag="-o out/conftest2.$ac_objext"
1960
   # Insert the option either (1) after the last *FLAGS variable, or
1961
   # (2) before a word containing "conftest.", or (3) at the end.
1962
   # Note that $ac_compile itself does not contain backslashes and begins
1963
   # with a dollar sign (not a hyphen), so the echo should work correctly.
1964
   lt_compile=`echo "$ac_compile" | $SED \
1965
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1966
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1967
   -e 's:$: $lt_compiler_flag:'`
1968
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1969
   (eval "$lt_compile" 2>out/conftest.err)
1970
   ac_status=$?
1971
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
1972
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1973
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
1974
   then
1975
     # The compiler can only warn and ignore the option if not recognized
1976
     # So say no if there are warnings
1977
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1978
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1979
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1980
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1981
     fi
1982
   fi
1983
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
1984
   $rm conftest*
1985
   # SGI C++ compiler will create directory out/ii_files/ for
1986
   # template instantiation
1987
   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1988
   $rm out/* && rmdir out
1989
   cd ..
1990
   rmdir conftest
1991
   $rm conftest*
1992
])
1993
])# AC_LIBTOOL_PROG_CC_C_O
1994
1995
1996
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1997
# -----------------------------------------
1998
# Check to see if we can do hard links to lock some files if needed
1999
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
2000
[AC_REQUIRE([_LT_AC_LOCK])dnl
2001
2002
hard_links="nottested"
2003
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2004
  # do not overwrite the value of need_locks provided by the user
2005
  AC_MSG_CHECKING([if we can lock with hard links])
2006
  hard_links=yes
2007
  $rm conftest*
2008
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2009
  touch conftest.a
2010
  ln conftest.a conftest.b 2>&5 || hard_links=no
2011
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2012
  AC_MSG_RESULT([$hard_links])
2013
  if test "$hard_links" = no; then
2014
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2015
    need_locks=warn
2016
  fi
2017
else
2018
  need_locks=no
2019
fi
2020
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
2021
2022
2023
# AC_LIBTOOL_OBJDIR
2024
# -----------------
2025
AC_DEFUN([AC_LIBTOOL_OBJDIR],
2026
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2027
[rm -f .libs 2>/dev/null
2028
mkdir .libs 2>/dev/null
2029
if test -d .libs; then
2030
  lt_cv_objdir=.libs
2031
else
2032
  # MS-DOS does not allow filenames that begin with a dot.
2033
  lt_cv_objdir=_libs
2034
fi
2035
rmdir .libs 2>/dev/null])
2036
objdir=$lt_cv_objdir
2037
])# AC_LIBTOOL_OBJDIR
2038
2039
2040
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
2041
# ----------------------------------------------
2042
# Check hardcoding attributes.
2043
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
2044
[AC_MSG_CHECKING([how to hardcode library paths into programs])
2045
_LT_AC_TAGVAR(hardcode_action, $1)=
2046
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
2047
   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
2048
   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2049
2050
  # We can hardcode non-existant directories.
2051
  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2052
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2053
     # have to relink, otherwise we might link with an installed library
2054
     # when we should be linking with a yet-to-be-installed one
2055
     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2056
     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2057
    # Linking always hardcodes the temporary library directory.
2058
    _LT_AC_TAGVAR(hardcode_action, $1)=relink
2059
  else
2060
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2061
    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
2062
  fi
2063
else
2064
  # We cannot hardcode anything, or else we can only hardcode existing
2065
  # directories.
2066
  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
2067
fi
2068
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
2069
2070
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
2071
  # Fast installation is not supported
2072
  enable_fast_install=no
2073
elif test "$shlibpath_overrides_runpath" = yes ||
2074
     test "$enable_shared" = no; then
2075
  # Fast installation is not necessary
2076
  enable_fast_install=needless
2077
fi
2078
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2079
2080
2081
# AC_LIBTOOL_SYS_LIB_STRIP
2082
# ------------------------
2083
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2084
[striplib=
2085
old_striplib=
2086
AC_MSG_CHECKING([whether stripping libraries is possible])
2087
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2088
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2089
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2090
  AC_MSG_RESULT([yes])
2091
else
2092
# FIXME - insert some real tests, host_os isn't really good enough
2093
  case $host_os in
2094
   darwin*)
2095
       if test -n "$STRIP" ; then
2096
         striplib="$STRIP -x"
2097
         old_striplib="$STRIP -S"
2098
         AC_MSG_RESULT([yes])
2099
       else
2100
  AC_MSG_RESULT([no])
2101
fi
2102
       ;;
2103
   *)
2104
  AC_MSG_RESULT([no])
2105
    ;;
2106
  esac
2107
fi
2108
])# AC_LIBTOOL_SYS_LIB_STRIP
2109
2110
2111
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2112
# -----------------------------
2113
# PORTME Fill in your ld.so characteristics
2114
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2115
[AC_REQUIRE([LT_AC_PROG_SED])dnl
2116
AC_MSG_CHECKING([dynamic linker characteristics])
2117
library_names_spec=
2118
libname_spec='lib$name'
2119
soname_spec=
2120
shrext_cmds=".so"
2121
postinstall_cmds=
2122
postuninstall_cmds=
2123
finish_cmds=
2124
finish_eval=
2125
shlibpath_var=
2126
shlibpath_overrides_runpath=unknown
2127
version_type=none
2128
dynamic_linker="$host_os ld.so"
2129
sys_lib_dlsearch_path_spec="/lib /usr/lib"
2130
m4_if($1,[],[
2131
if test "$GCC" = yes; then
2132
  case $host_os in
2133
    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2134
    *) lt_awk_arg="/^libraries:/" ;;
2135
  esac
2136
  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2137
  if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
2138
    # if the path contains ";" then we assume it to be the separator
2139
    # otherwise default to the standard path separator (i.e. ":") - it is
2140
    # assumed that no part of a normal pathname contains ";" but that should
2141
    # okay in the real world where ";" in dirpaths is itself problematic.
2142
    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2143
  else
2144
    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2145
  fi
2146
  # Ok, now we have the path, separated by spaces, we can step through it
2147
  # and add multilib dir if necessary.
2148
  lt_tmp_lt_search_path_spec=
2149
  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2150
  for lt_sys_path in $lt_search_path_spec; do
2151
    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2152
      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2153
    else
2154
      test -d "$lt_sys_path" && \
2155
	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2156
    fi
2157
  done
2158
  lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
2159
BEGIN {RS=" "; FS="/|\n";} {
2160
  lt_foo="";
2161
  lt_count=0;
2162
  for (lt_i = NF; lt_i > 0; lt_i--) {
2163
    if ($lt_i != "" && $lt_i != ".") {
2164
      if ($lt_i == "..") {
2165
        lt_count++;
2166
      } else {
2167
        if (lt_count == 0) {
2168
          lt_foo="/" $lt_i lt_foo;
2169
        } else {
2170
          lt_count--;
2171
        }
2172
      }
2173
    }
2174
  }
2175
  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2176
  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2177
}'`
2178
  sys_lib_search_path_spec=`echo $lt_search_path_spec`
2179
else
2180
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2181
fi])
2182
need_lib_prefix=unknown
2183
hardcode_into_libs=no
2184
2185
# when you set need_version to no, make sure it does not cause -set_version
2186
# flags to be left without arguments
2187
need_version=unknown
2188
2189
case $host_os in
2190
aix3*)
2191
  version_type=linux
2192
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
2193
  shlibpath_var=LIBPATH
2194
2195
  # AIX 3 has no versioning support, so we append a major version to the name.
2196
  soname_spec='${libname}${release}${shared_ext}$major'
2197
  ;;
2198
2199
aix[[4-9]]*)
2200
  version_type=linux
2201
  need_lib_prefix=no
2202
  need_version=no
2203
  hardcode_into_libs=yes
2204
  if test "$host_cpu" = ia64; then
2205
    # AIX 5 supports IA64
2206
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
2207
    shlibpath_var=LD_LIBRARY_PATH
2208
  else
2209
    # With GCC up to 2.95.x, collect2 would create an import file
2210
    # for dependence libraries.  The import file would start with
2211
    # the line `#! .'.  This would cause the generated library to
2212
    # depend on `.', always an invalid library.  This was fixed in
2213
    # development snapshots of GCC prior to 3.0.
2214
    case $host_os in
2215
      aix4 | aix4.[[01]] | aix4.[[01]].*)
2216
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2217
	   echo ' yes '
2218
	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2219
	:
2220
      else
2221
	can_build_shared=no
2222
      fi
2223
      ;;
2224
    esac
2225
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
2226
    # soname into executable. Probably we can add versioning support to
2227
    # collect2, so additional links can be useful in future.
2228
    if test "$aix_use_runtimelinking" = yes; then
2229
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2230
      # instead of lib<name>.a to let people know that these are not
2231
      # typical AIX shared libraries.
2232
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2233
    else
2234
      # We preserve .a as extension for shared libraries through AIX4.2
2235
      # and later when we are not doing run time linking.
2236
      library_names_spec='${libname}${release}.a $libname.a'
2237
      soname_spec='${libname}${release}${shared_ext}$major'
2238
    fi
2239
    shlibpath_var=LIBPATH
2240
  fi
2241
  ;;
2242
2243
amigaos*)
2244
  library_names_spec='$libname.ixlibrary $libname.a'
2245
  # Create ${libname}_ixlibrary.a entries in /sys/libs.
2246
  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
2247
  ;;
2248
2249
beos*)
2250
  library_names_spec='${libname}${shared_ext}'
2251
  dynamic_linker="$host_os ld.so"
2252
  shlibpath_var=LIBRARY_PATH
2253
  ;;
2254
2255
bsdi[[45]]*)
2256
  version_type=linux
2257
  need_version=no
2258
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2259
  soname_spec='${libname}${release}${shared_ext}$major'
2260
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2261
  shlibpath_var=LD_LIBRARY_PATH
2262
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2263
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2264
  # the default ld.so.conf also contains /usr/contrib/lib and
2265
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2266
  # libtool to hard-code these into programs
2267
  ;;
2268
2269
cygwin* | mingw* | pw32*)
2270
  version_type=windows
2271
  shrext_cmds=".dll"
2272
  need_version=no
2273
  need_lib_prefix=no
2274
2275
  case $GCC,$host_os in
2276
  yes,cygwin* | yes,mingw* | yes,pw32*)
2277
    library_names_spec='$libname.dll.a'
2278
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
2279
    postinstall_cmds='base_file=`basename \${file}`~
2280
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2281
      dldir=$destdir/`dirname \$dlpath`~
2282
      test -d \$dldir || mkdir -p \$dldir~
2283
      $install_prog $dir/$dlname \$dldir/$dlname~
2284
      chmod a+x \$dldir/$dlname'
2285
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2286
      dlpath=$dir/\$dldll~
2287
       $rm \$dlpath'
2288
    shlibpath_overrides_runpath=yes
2289
2290
    case $host_os in
2291
    cygwin*)
2292
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2293
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2294
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
2295
      ;;
2296
    mingw*)
2297
      # MinGW DLLs use traditional 'lib' prefix
2298
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2299
      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2300
      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2301
        # It is most probably a Windows format PATH printed by
2302
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
2303
        # path with ; separators, and with drive letters. We can handle the
2304
        # drive letters (cygwin fileutils understands them), so leave them,
2305
        # especially as we might pass files found there to a mingw objdump,
2306
        # which wouldn't understand a cygwinified path. Ahh.
2307
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2308
      else
2309
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2310
      fi
2311
      ;;
2312
    pw32*)
2313
      # pw32 DLLs use 'pw' prefix rather than 'lib'
2314
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2315
      ;;
2316
    esac
2317
    ;;
2318
2319
  *)
2320
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2321
    ;;
2322
  esac
2323
  dynamic_linker='Win32 ld.exe'
2324
  # FIXME: first we should search . and the directory the executable is in
2325
  shlibpath_var=PATH
2326
  ;;
2327
2328
darwin* | rhapsody*)
2329
  dynamic_linker="$host_os dyld"
2330
  version_type=darwin
2331
  need_lib_prefix=no
2332
  need_version=no
2333
  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2334
  soname_spec='${libname}${release}${major}$shared_ext'
2335
  shlibpath_overrides_runpath=yes
2336
  shlibpath_var=DYLD_LIBRARY_PATH
2337
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
2338
  m4_if([$1], [],[
2339
  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 
2340
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2341
  ;;
2342
2343
dgux*)
2344
  version_type=linux
2345
  need_lib_prefix=no
2346
  need_version=no
2347
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2348
  soname_spec='${libname}${release}${shared_ext}$major'
2349
  shlibpath_var=LD_LIBRARY_PATH
2350
  ;;
2351
2352
freebsd1*)
2353
  dynamic_linker=no
2354
  ;;
2355
2356
freebsd* | dragonfly*)
2357
  # DragonFly does not have aout.  When/if they implement a new
2358
  # versioning mechanism, adjust this.
2359
  if test -x /usr/bin/objformat; then
2360
    objformat=`/usr/bin/objformat`
2361
  else
2362
    case $host_os in
2363
    freebsd[[123]]*) objformat=aout ;;
2364
    *) objformat=elf ;;
2365
    esac
2366
  fi
2367
  version_type=freebsd-$objformat
2368
  case $version_type in
2369
    freebsd-elf*)
2370
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2371
      need_version=no
2372
      need_lib_prefix=no
2373
      ;;
2374
    freebsd-*)
2375
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2376
      need_version=yes
2377
      ;;
2378
  esac
2379
  shlibpath_var=LD_LIBRARY_PATH
2380
  case $host_os in
2381
  freebsd2*)
2382
    shlibpath_overrides_runpath=yes
2383
    ;;
2384
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
2385
    shlibpath_overrides_runpath=yes
2386
    hardcode_into_libs=yes
2387
    ;;
2388
  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
2389
  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
2390
    shlibpath_overrides_runpath=no
2391
    hardcode_into_libs=yes
2392
    ;;
2393
  *) # from 4.6 on, and DragonFly
2394
    shlibpath_overrides_runpath=yes
2395
    hardcode_into_libs=yes
2396
    ;;
2397
  esac
2398
  ;;
2399
2400
gnu*)
2401
  version_type=linux
2402
  need_lib_prefix=no
2403
  need_version=no
2404
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2405
  soname_spec='${libname}${release}${shared_ext}$major'
2406
  shlibpath_var=LD_LIBRARY_PATH
2407
  hardcode_into_libs=yes
2408
  ;;
2409
2410
hpux9* | hpux10* | hpux11*)
2411
  # Give a soname corresponding to the major version so that dld.sl refuses to
2412
  # link against other versions.
2413
  version_type=sunos
2414
  need_lib_prefix=no
2415
  need_version=no
2416
  case $host_cpu in
2417
  ia64*)
2418
    shrext_cmds='.so'
2419
    hardcode_into_libs=yes
2420
    dynamic_linker="$host_os dld.so"
2421
    shlibpath_var=LD_LIBRARY_PATH
2422
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2423
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2424
    soname_spec='${libname}${release}${shared_ext}$major'
2425
    if test "X$HPUX_IA64_MODE" = X32; then
2426
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2427
    else
2428
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2429
    fi
2430
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2431
    ;;
2432
   hppa*64*)
2433
     shrext_cmds='.sl'
2434
     hardcode_into_libs=yes
2435
     dynamic_linker="$host_os dld.sl"
2436
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2437
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2438
     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2439
     soname_spec='${libname}${release}${shared_ext}$major'
2440
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2441
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2442
     ;;
2443
   *)
2444
    shrext_cmds='.sl'
2445
    dynamic_linker="$host_os dld.sl"
2446
    shlibpath_var=SHLIB_PATH
2447
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2448
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2449
    soname_spec='${libname}${release}${shared_ext}$major'
2450
    ;;
2451
  esac
2452
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
2453
  postinstall_cmds='chmod 555 $lib'
2454
  ;;
2455
2456
interix[[3-9]]*)
2457
  version_type=linux
2458
  need_lib_prefix=no
2459
  need_version=no
2460
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2461
  soname_spec='${libname}${release}${shared_ext}$major'
2462
  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
2463
  shlibpath_var=LD_LIBRARY_PATH
2464
  shlibpath_overrides_runpath=no
2465
  hardcode_into_libs=yes
2466
  ;;
2467
2468
irix5* | irix6* | nonstopux*)
2469
  case $host_os in
2470
    nonstopux*) version_type=nonstopux ;;
2471
    *)
2472
	if test "$lt_cv_prog_gnu_ld" = yes; then
2473
		version_type=linux
2474
	else
2475
		version_type=irix
2476
	fi ;;
2477
  esac
2478
  need_lib_prefix=no
2479
  need_version=no
2480
  soname_spec='${libname}${release}${shared_ext}$major'
2481
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2482
  case $host_os in
2483
  irix5* | nonstopux*)
2484
    libsuff= shlibsuff=
2485
    ;;
2486
  *)
2487
    case $LD in # libtool.m4 will add one of these switches to LD
2488
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2489
      libsuff= shlibsuff= libmagic=32-bit;;
2490
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2491
      libsuff=32 shlibsuff=N32 libmagic=N32;;
2492
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2493
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
2494
    *) libsuff= shlibsuff= libmagic=never-match;;
2495
    esac
2496
    ;;
2497
  esac
2498
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2499
  shlibpath_overrides_runpath=no
2500
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2501
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2502
  hardcode_into_libs=yes
2503
  ;;
2504
2505
# No shared lib support for Linux oldld, aout, or coff.
2506
linux*oldld* | linux*aout* | linux*coff*)
2507
  dynamic_linker=no
2508
  ;;
2509
2510
# This must be Linux ELF.
2511
linux* | k*bsd*-gnu)
2512
  version_type=linux
2513
  need_lib_prefix=no
2514
  need_version=no
2515
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2516
  soname_spec='${libname}${release}${shared_ext}$major'
2517
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2518
  shlibpath_var=LD_LIBRARY_PATH
2519
  shlibpath_overrides_runpath=no
2520
  # This implies no fast_install, which is unacceptable.
2521
  # Some rework will be needed to allow for fast_install
2522
  # before this can be enabled.
2523
  hardcode_into_libs=yes
2524
2525
  # Append ld.so.conf contents to the search path
2526
  if test -f /etc/ld.so.conf; then
2527
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ 	]*hwcap[ 	]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
2528
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2529
  fi
2530
2531
  # We used to test for /lib/ld.so.1 and disable shared libraries on
2532
  # powerpc, because MkLinux only supported shared libraries with the
2533
  # GNU dynamic linker.  Since this was broken with cross compilers,
2534
  # most powerpc-linux boxes support dynamic linking these days and
2535
  # people can always --disable-shared, the test was removed, and we
2536
  # assume the GNU/Linux dynamic linker is in use.
2537
  dynamic_linker='GNU/Linux ld.so'
2538
  ;;
2539
2540
netbsdelf*-gnu)
2541
  version_type=linux
2542
  need_lib_prefix=no
2543
  need_version=no
2544
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2545
  soname_spec='${libname}${release}${shared_ext}$major'
2546
  shlibpath_var=LD_LIBRARY_PATH
2547
  shlibpath_overrides_runpath=no
2548
  hardcode_into_libs=yes
2549
  dynamic_linker='NetBSD ld.elf_so'
2550
  ;;
2551
2552
netbsd*)
2553
  version_type=sunos
2554
  need_lib_prefix=no
2555
  need_version=no
2556
  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2557
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2558
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2559
    dynamic_linker='NetBSD (a.out) ld.so'
2560
  else
2561
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
2562
    soname_spec='${libname}${release}${shared_ext}$major'
2563
    dynamic_linker='NetBSD ld.elf_so'
2564
  fi
2565
  shlibpath_var=LD_LIBRARY_PATH
2566
  shlibpath_overrides_runpath=yes
2567
  hardcode_into_libs=yes
2568
  ;;
2569
2570
newsos6)
2571
  version_type=linux
2572
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2573
  shlibpath_var=LD_LIBRARY_PATH
2574
  shlibpath_overrides_runpath=yes
2575
  ;;
2576
2577
nto-qnx*)
2578
  version_type=linux
2579
  need_lib_prefix=no
2580
  need_version=no
2581
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2582
  soname_spec='${libname}${release}${shared_ext}$major'
2583
  shlibpath_var=LD_LIBRARY_PATH
2584
  shlibpath_overrides_runpath=yes
2585
  ;;
2586
2587
openbsd*)
2588
  version_type=sunos
2589
  sys_lib_dlsearch_path_spec="/usr/lib"
2590
  need_lib_prefix=no
2591
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
2592
  case $host_os in
2593
    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
2594
    *)                         need_version=no  ;;
2595
  esac
2596
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2597
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2598
  shlibpath_var=LD_LIBRARY_PATH
2599
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2600
    case $host_os in
2601
      openbsd2.[[89]] | openbsd2.[[89]].*)
2602
	shlibpath_overrides_runpath=no
2603
	;;
2604
      *)
2605
	shlibpath_overrides_runpath=yes
2606
	;;
2607
      esac
2608
  else
2609
    shlibpath_overrides_runpath=yes
2610
  fi
2611
  ;;
2612
2613
os2*)
2614
  libname_spec='$name'
2615
  shrext_cmds=".dll"
2616
  need_lib_prefix=no
2617
  library_names_spec='$libname${shared_ext} $libname.a'
2618
  dynamic_linker='OS/2 ld.exe'
2619
  shlibpath_var=LIBPATH
2620
  ;;
2621
2622
osf3* | osf4* | osf5*)
2623
  version_type=osf
2624
  need_lib_prefix=no
2625
  need_version=no
2626
  soname_spec='${libname}${release}${shared_ext}$major'
2627
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2628
  shlibpath_var=LD_LIBRARY_PATH
2629
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2630
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2631
  ;;
2632
2633
rdos*)
2634
  dynamic_linker=no
2635
  ;;
2636
2637
solaris*)
2638
  version_type=linux
2639
  need_lib_prefix=no
2640
  need_version=no
2641
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2642
  soname_spec='${libname}${release}${shared_ext}$major'
2643
  shlibpath_var=LD_LIBRARY_PATH
2644
  shlibpath_overrides_runpath=yes
2645
  hardcode_into_libs=yes
2646
  # ldd complains unless libraries are executable
2647
  postinstall_cmds='chmod +x $lib'
2648
  ;;
2649
2650
sunos4*)
2651
  version_type=sunos
2652
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2653
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2654
  shlibpath_var=LD_LIBRARY_PATH
2655
  shlibpath_overrides_runpath=yes
2656
  if test "$with_gnu_ld" = yes; then
2657
    need_lib_prefix=no
2658
  fi
2659
  need_version=yes
2660
  ;;
2661
2662
sysv4 | sysv4.3*)
2663
  version_type=linux
2664
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2665
  soname_spec='${libname}${release}${shared_ext}$major'
2666
  shlibpath_var=LD_LIBRARY_PATH
2667
  case $host_vendor in
2668
    sni)
2669
      shlibpath_overrides_runpath=no
2670
      need_lib_prefix=no
2671
      export_dynamic_flag_spec='${wl}-Blargedynsym'
2672
      runpath_var=LD_RUN_PATH
2673
      ;;
2674
    siemens)
2675
      need_lib_prefix=no
2676
      ;;
2677
    motorola)
2678
      need_lib_prefix=no
2679
      need_version=no
2680
      shlibpath_overrides_runpath=no
2681
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2682
      ;;
2683
  esac
2684
  ;;
2685
2686
sysv4*MP*)
2687
  if test -d /usr/nec ;then
2688
    version_type=linux
2689
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2690
    soname_spec='$libname${shared_ext}.$major'
2691
    shlibpath_var=LD_LIBRARY_PATH
2692
  fi
2693
  ;;
2694
2695
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2696
  version_type=freebsd-elf
2697
  need_lib_prefix=no
2698
  need_version=no
2699
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2700
  soname_spec='${libname}${release}${shared_ext}$major'
2701
  shlibpath_var=LD_LIBRARY_PATH
2702
  hardcode_into_libs=yes
2703
  if test "$with_gnu_ld" = yes; then
2704
    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
2705
    shlibpath_overrides_runpath=no
2706
  else
2707
    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
2708
    shlibpath_overrides_runpath=yes
2709
    case $host_os in
2710
      sco3.2v5*)
2711
        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
2712
	;;
2713
    esac
2714
  fi
2715
  sys_lib_dlsearch_path_spec='/usr/lib'
2716
  ;;
2717
2718
uts4*)
2719
  version_type=linux
2720
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2721
  soname_spec='${libname}${release}${shared_ext}$major'
2722
  shlibpath_var=LD_LIBRARY_PATH
2723
  ;;
2724
2725
*)
2726
  dynamic_linker=no
2727
  ;;
2728
esac
2729
AC_MSG_RESULT([$dynamic_linker])
2730
test "$dynamic_linker" = no && can_build_shared=no
2731
2732
AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
2733
[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
2734
sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
2735
AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
2736
[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
2737
sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
2738
2739
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2740
if test "$GCC" = yes; then
2741
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2742
fi
2743
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2744
2745
2746
# _LT_AC_TAGCONFIG
2747
# ----------------
2748
AC_DEFUN([_LT_AC_TAGCONFIG],
2749
[AC_REQUIRE([LT_AC_PROG_SED])dnl
2750
AC_ARG_WITH([tags],
2751
    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2752
        [include additional configurations @<:@automatic@:>@])],
2753
    [tagnames="$withval"])
2754
2755
if test -f "$ltmain" && test -n "$tagnames"; then
2756
  if test ! -f "${ofile}"; then
2757
    AC_MSG_WARN([output file `$ofile' does not exist])
2758
  fi
2759
2760
  if test -z "$LTCC"; then
2761
    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2762
    if test -z "$LTCC"; then
2763
      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2764
    else
2765
      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2766
    fi
2767
  fi
2768
  if test -z "$LTCFLAGS"; then
2769
    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
2770
  fi
2771
2772
  # Extract list of available tagged configurations in $ofile.
2773
  # Note that this assumes the entire list is on one line.
2774
  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2775
2776
  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2777
  for tagname in $tagnames; do
2778
    IFS="$lt_save_ifs"
2779
    # Check whether tagname contains only valid characters
2780
    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2781
    "") ;;
2782
    *)  AC_MSG_ERROR([invalid tag name: $tagname])
2783
	;;
2784
    esac
2785
2786
    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2787
    then
2788
      AC_MSG_ERROR([tag name \"$tagname\" already exists])
2789
    fi
2790
2791
    # Update the list of available tags.
2792
    if test -n "$tagname"; then
2793
      echo appending configuration tag \"$tagname\" to $ofile
2794
2795
      case $tagname in
2796
      CXX)
2797
	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2798
	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2799
	    (test "X$CXX" != "Xg++"))) ; then
2800
	  AC_LIBTOOL_LANG_CXX_CONFIG
2801
	else
2802
	  tagname=""
2803
	fi
2804
	;;
2805
2806
      F77)
2807
	if test -n "$F77" && test "X$F77" != "Xno"; then
2808
	  AC_LIBTOOL_LANG_F77_CONFIG
2809
	else
2810
	  tagname=""
2811
	fi
2812
	;;
2813
2814
      GCJ)
2815
	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2816
	  AC_LIBTOOL_LANG_GCJ_CONFIG
2817
	else
2818
	  tagname=""
2819
	fi
2820
	;;
2821
2822
      RC)
2823
	AC_LIBTOOL_LANG_RC_CONFIG
2824
	;;
2825
2826
      *)
2827
	AC_MSG_ERROR([Unsupported tag name: $tagname])
2828
	;;
2829
      esac
2830
2831
      # Append the new tag name to the list of available tags.
2832
      if test -n "$tagname" ; then
2833
      available_tags="$available_tags $tagname"
2834
    fi
2835
    fi
2836
  done
2837
  IFS="$lt_save_ifs"
2838
2839
  # Now substitute the updated list of available tags.
2840
  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2841
    mv "${ofile}T" "$ofile"
2842
    chmod +x "$ofile"
2843
  else
2844
    rm -f "${ofile}T"
2845
    AC_MSG_ERROR([unable to update list of available tagged configurations.])
2846
  fi
2847
fi
2848
])# _LT_AC_TAGCONFIG
2849
2850
2851
# AC_LIBTOOL_DLOPEN
2852
# -----------------
2853
# enable checks for dlopen support
2854
AC_DEFUN([AC_LIBTOOL_DLOPEN],
2855
 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2856
])# AC_LIBTOOL_DLOPEN
2857
2858
2859
# AC_LIBTOOL_WIN32_DLL
2860
# --------------------
2861
# declare package support for building win32 DLLs
2862
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2863
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2864
])# AC_LIBTOOL_WIN32_DLL
2865
2866
2867
# AC_ENABLE_SHARED([DEFAULT])
2868
# ---------------------------
2869
# implement the --enable-shared flag
2870
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2871
AC_DEFUN([AC_ENABLE_SHARED],
2872
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2873
AC_ARG_ENABLE([shared],
2874
    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2875
	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2876
    [p=${PACKAGE-default}
2877
    case $enableval in
2878
    yes) enable_shared=yes ;;
2879
    no) enable_shared=no ;;
2880
    *)
2881
      enable_shared=no
2882
      # Look at the argument we got.  We use all the common list separators.
2883
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2884
      for pkg in $enableval; do
2885
	IFS="$lt_save_ifs"
2886
	if test "X$pkg" = "X$p"; then
2887
	  enable_shared=yes
2888
	fi
2889
      done
2890
      IFS="$lt_save_ifs"
2891
      ;;
2892
    esac],
2893
    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2894
])# AC_ENABLE_SHARED
2895
2896
2897
# AC_DISABLE_SHARED
2898
# -----------------
2899
# set the default shared flag to --disable-shared
2900
AC_DEFUN([AC_DISABLE_SHARED],
2901
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2902
AC_ENABLE_SHARED(no)
2903
])# AC_DISABLE_SHARED
2904
2905
2906
# AC_ENABLE_STATIC([DEFAULT])
2907
# ---------------------------
2908
# implement the --enable-static flag
2909
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2910
AC_DEFUN([AC_ENABLE_STATIC],
2911
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2912
AC_ARG_ENABLE([static],
2913
    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2914
	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2915
    [p=${PACKAGE-default}
2916
    case $enableval in
2917
    yes) enable_static=yes ;;
2918
    no) enable_static=no ;;
2919
    *)
2920
     enable_static=no
2921
      # Look at the argument we got.  We use all the common list separators.
2922
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2923
      for pkg in $enableval; do
2924
	IFS="$lt_save_ifs"
2925
	if test "X$pkg" = "X$p"; then
2926
	  enable_static=yes
2927
	fi
2928
      done
2929
      IFS="$lt_save_ifs"
2930
      ;;
2931
    esac],
2932
    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2933
])# AC_ENABLE_STATIC
2934
2935
2936
# AC_DISABLE_STATIC
2937
# -----------------
2938
# set the default static flag to --disable-static
2939
AC_DEFUN([AC_DISABLE_STATIC],
2940
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2941
AC_ENABLE_STATIC(no)
2942
])# AC_DISABLE_STATIC
2943
2944
2945
# AC_ENABLE_FAST_INSTALL([DEFAULT])
2946
# ---------------------------------
2947
# implement the --enable-fast-install flag
2948
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2949
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2950
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2951
AC_ARG_ENABLE([fast-install],
2952
    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2953
    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2954
    [p=${PACKAGE-default}
2955
    case $enableval in
2956
    yes) enable_fast_install=yes ;;
2957
    no) enable_fast_install=no ;;
2958
    *)
2959
      enable_fast_install=no
2960
      # Look at the argument we got.  We use all the common list separators.
2961
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2962
      for pkg in $enableval; do
2963
	IFS="$lt_save_ifs"
2964
	if test "X$pkg" = "X$p"; then
2965
	  enable_fast_install=yes
2966
	fi
2967
      done
2968
      IFS="$lt_save_ifs"
2969
      ;;
2970
    esac],
2971
    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2972
])# AC_ENABLE_FAST_INSTALL
2973
2974
2975
# AC_DISABLE_FAST_INSTALL
2976
# -----------------------
2977
# set the default to --disable-fast-install
2978
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2979
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2980
AC_ENABLE_FAST_INSTALL(no)
2981
])# AC_DISABLE_FAST_INSTALL
2982
2983
2984
# AC_LIBTOOL_PICMODE([MODE])
2985
# --------------------------
2986
# implement the --with-pic flag
2987
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
2988
AC_DEFUN([AC_LIBTOOL_PICMODE],
2989
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2990
pic_mode=ifelse($#,1,$1,default)
2991
])# AC_LIBTOOL_PICMODE
2992
2993
2994
# AC_PROG_EGREP
2995
# -------------
2996
# This is predefined starting with Autoconf 2.54, so this conditional
2997
# definition can be removed once we require Autoconf 2.54 or later.
2998
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2999
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
3000
   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3001
    then ac_cv_prog_egrep='grep -E'
3002
    else ac_cv_prog_egrep='egrep'
3003
    fi])
3004
 EGREP=$ac_cv_prog_egrep
3005
 AC_SUBST([EGREP])
3006
])])
3007
3008
3009
# AC_PATH_TOOL_PREFIX
3010
# -------------------
3011
# find a file program which can recognize shared library
3012
AC_DEFUN([AC_PATH_TOOL_PREFIX],
3013
[AC_REQUIRE([AC_PROG_EGREP])dnl
3014
AC_MSG_CHECKING([for $1])
3015
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3016
[case $MAGIC_CMD in
3017
[[\\/*] |  ?:[\\/]*])
3018
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3019
  ;;
3020
*)
3021
  lt_save_MAGIC_CMD="$MAGIC_CMD"
3022
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3023
dnl $ac_dummy forces splitting on constant user-supplied paths.
3024
dnl POSIX.2 word splitting is done only on the output of word expansions,
3025
dnl not every word.  This closes a longstanding sh security hole.
3026
  ac_dummy="ifelse([$2], , $PATH, [$2])"
3027
  for ac_dir in $ac_dummy; do
3028
    IFS="$lt_save_ifs"
3029
    test -z "$ac_dir" && ac_dir=.
3030
    if test -f $ac_dir/$1; then
3031
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3032
      if test -n "$file_magic_test_file"; then
3033
	case $deplibs_check_method in
3034
	"file_magic "*)
3035
	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3036
	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3037
	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3038
	    $EGREP "$file_magic_regex" > /dev/null; then
3039
	    :
3040
	  else
3041
	    cat <<EOF 1>&2
3042
3043
*** Warning: the command libtool uses to detect shared libraries,
3044
*** $file_magic_cmd, produces output that libtool cannot recognize.
3045
*** The result is that libtool may fail to recognize shared libraries
3046
*** as such.  This will affect the creation of libtool libraries that
3047
*** depend on shared libraries, but programs linked with such libtool
3048
*** libraries will work regardless of this problem.  Nevertheless, you
3049
*** may want to report the problem to your system manager and/or to
3050
*** bug-libtool@gnu.org
3051
3052
EOF
3053
	  fi ;;
3054
	esac
3055
      fi
3056
      break
3057
    fi
3058
  done
3059
  IFS="$lt_save_ifs"
3060
  MAGIC_CMD="$lt_save_MAGIC_CMD"
3061
  ;;
3062
esac])
3063
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3064
if test -n "$MAGIC_CMD"; then
3065
  AC_MSG_RESULT($MAGIC_CMD)
3066
else
3067
  AC_MSG_RESULT(no)
3068
fi
3069
])# AC_PATH_TOOL_PREFIX
3070
3071
3072
# AC_PATH_MAGIC
3073
# -------------
3074
# find a file program which can recognize a shared library
3075
AC_DEFUN([AC_PATH_MAGIC],
3076
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3077
if test -z "$lt_cv_path_MAGIC_CMD"; then
3078
  if test -n "$ac_tool_prefix"; then
3079
    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3080
  else
3081
    MAGIC_CMD=:
3082
  fi
3083
fi
3084
])# AC_PATH_MAGIC
3085
3086
3087
# AC_PROG_LD
3088
# ----------
3089
# find the pathname to the GNU or non-GNU linker
3090
AC_DEFUN([AC_PROG_LD],
3091
[AC_ARG_WITH([gnu-ld],
3092
    [AC_HELP_STRING([--with-gnu-ld],
3093
	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3094
    [test "$withval" = no || with_gnu_ld=yes],
3095
    [with_gnu_ld=no])
3096
AC_REQUIRE([LT_AC_PROG_SED])dnl
3097
AC_REQUIRE([AC_PROG_CC])dnl
3098
AC_REQUIRE([AC_CANONICAL_HOST])dnl
3099
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3100
ac_prog=ld
3101
if test "$GCC" = yes; then
3102
  # Check if gcc -print-prog-name=ld gives a path.
3103
  AC_MSG_CHECKING([for ld used by $CC])
3104
  case $host in
3105
  *-*-mingw*)
3106
    # gcc leaves a trailing carriage return which upsets mingw
3107
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3108
  *)
3109
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3110
  esac
3111
  case $ac_prog in
3112
    # Accept absolute paths.
3113
    [[\\/]]* | ?:[[\\/]]*)
3114
      re_direlt='/[[^/]][[^/]]*/\.\./'
3115
      # Canonicalize the pathname of ld
3116
      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
3117
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3118
	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
3119
      done
3120
      test -z "$LD" && LD="$ac_prog"
3121
      ;;
3122
  "")
3123
    # If it fails, then pretend we aren't using GCC.
3124
    ac_prog=ld
3125
    ;;
3126
  *)
3127
    # If it is relative, then search for the first ld in PATH.
3128
    with_gnu_ld=unknown
3129
    ;;
3130
  esac
3131
elif test "$with_gnu_ld" = yes; then
3132
  AC_MSG_CHECKING([for GNU ld])
3133
else
3134
  AC_MSG_CHECKING([for non-GNU ld])
3135
fi
3136
AC_CACHE_VAL(lt_cv_path_LD,
3137
[if test -z "$LD"; then
3138
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3139
  for ac_dir in $PATH; do
3140
    IFS="$lt_save_ifs"
3141
    test -z "$ac_dir" && ac_dir=.
3142
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3143
      lt_cv_path_LD="$ac_dir/$ac_prog"
3144
      # Check to see if the program is GNU ld.  I'd rather use --version,
3145
      # but apparently some variants of GNU ld only accept -v.
3146
      # Break only if it was the GNU/non-GNU ld that we prefer.
3147
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3148
      *GNU* | *'with BFD'*)
3149
	test "$with_gnu_ld" != no && break
3150
	;;
3151
      *)
3152
	test "$with_gnu_ld" != yes && break
3153
	;;
3154
      esac
3155
    fi
3156
  done
3157
  IFS="$lt_save_ifs"
3158
else
3159
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
3160
fi])
3161
LD="$lt_cv_path_LD"
3162
if test -n "$LD"; then
3163
  AC_MSG_RESULT($LD)
3164
else
3165
  AC_MSG_RESULT(no)
3166
fi
3167
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3168
AC_PROG_LD_GNU
3169
])# AC_PROG_LD
3170
3171
3172
# AC_PROG_LD_GNU
3173
# --------------
3174
AC_DEFUN([AC_PROG_LD_GNU],
3175
[AC_REQUIRE([AC_PROG_EGREP])dnl
3176
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3177
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3178
case `$LD -v 2>&1 </dev/null` in
3179
*GNU* | *'with BFD'*)
3180
  lt_cv_prog_gnu_ld=yes
3181
  ;;
3182
*)
3183
  lt_cv_prog_gnu_ld=no
3184
  ;;
3185
esac])
3186
with_gnu_ld=$lt_cv_prog_gnu_ld
3187
])# AC_PROG_LD_GNU
3188
3189
3190
# AC_PROG_LD_RELOAD_FLAG
3191
# ----------------------
3192
# find reload flag for linker
3193
#   -- PORTME Some linkers may need a different reload flag.
3194
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3195
[AC_CACHE_CHECK([for $LD option to reload object files],
3196
  lt_cv_ld_reload_flag,
3197
  [lt_cv_ld_reload_flag='-r'])
3198
reload_flag=$lt_cv_ld_reload_flag
3199
case $reload_flag in
3200
"" | " "*) ;;
3201
*) reload_flag=" $reload_flag" ;;
3202
esac
3203
reload_cmds='$LD$reload_flag -o $output$reload_objs'
3204
case $host_os in
3205
  darwin*)
3206
    if test "$GCC" = yes; then
3207
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
3208
    else
3209
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
3210
    fi
3211
    ;;
3212
esac
3213
])# AC_PROG_LD_RELOAD_FLAG
3214
3215
3216
# AC_DEPLIBS_CHECK_METHOD
3217
# -----------------------
3218
# how to check for library dependencies
3219
#  -- PORTME fill in with the dynamic library characteristics
3220
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3221
[AC_CACHE_CHECK([how to recognize dependent libraries],
3222
lt_cv_deplibs_check_method,
3223
[lt_cv_file_magic_cmd='$MAGIC_CMD'
3224
lt_cv_file_magic_test_file=
3225
lt_cv_deplibs_check_method='unknown'
3226
# Need to set the preceding variable on all platforms that support
3227
# interlibrary dependencies.
3228
# 'none' -- dependencies not supported.
3229
# `unknown' -- same as none, but documents that we really don't know.
3230
# 'pass_all' -- all dependencies passed with no checks.
3231
# 'test_compile' -- check by making test program.
3232
# 'file_magic [[regex]]' -- check by looking for files in library path
3233
# which responds to the $file_magic_cmd with a given extended regex.
3234
# If you have `file' or equivalent on your system and you're not sure
3235
# whether `pass_all' will *always* work, you probably want this one.
3236
3237
case $host_os in
3238
aix[[4-9]]*)
3239
  lt_cv_deplibs_check_method=pass_all
3240
  ;;
3241
3242
beos*)
3243
  lt_cv_deplibs_check_method=pass_all
3244
  ;;
3245
3246
bsdi[[45]]*)
3247
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3248
  lt_cv_file_magic_cmd='/usr/bin/file -L'
3249
  lt_cv_file_magic_test_file=/shlib/libc.so
3250
  ;;
3251
3252
cygwin*)
3253
  # func_win32_libid is a shell function defined in ltmain.sh
3254
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3255
  lt_cv_file_magic_cmd='func_win32_libid'
3256
  ;;
3257
3258
mingw* | pw32*)
3259
  # Base MSYS/MinGW do not provide the 'file' command needed by
3260
  # func_win32_libid shell function, so use a weaker test based on 'objdump',
3261
  # unless we find 'file', for example because we are cross-compiling.
3262
  if ( file / ) >/dev/null 2>&1; then
3263
    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
3264
    lt_cv_file_magic_cmd='func_win32_libid'
3265
  else
3266
    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3267
    lt_cv_file_magic_cmd='$OBJDUMP -f'
3268
  fi
3269
  ;;
3270
3271
darwin* | rhapsody*)
3272
  lt_cv_deplibs_check_method=pass_all
3273
  ;;
3274
3275
freebsd* | dragonfly*)
3276
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3277
    case $host_cpu in
3278
    i*86 )
3279
      # Not sure whether the presence of OpenBSD here was a mistake.
3280
      # Let's accept both of them until this is cleared up.
3281
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
3282
      lt_cv_file_magic_cmd=/usr/bin/file
3283
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3284
      ;;
3285
    esac
3286
  else
3287
    lt_cv_deplibs_check_method=pass_all
3288
  fi
3289
  ;;
3290
3291
gnu*)
3292
  lt_cv_deplibs_check_method=pass_all
3293
  ;;
3294
3295
hpux10.20* | hpux11*)
3296
  lt_cv_file_magic_cmd=/usr/bin/file
3297
  case $host_cpu in
3298
  ia64*)
3299
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
3300
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
3301
    ;;
3302
  hppa*64*)
3303
    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
3304
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
3305
    ;;
3306
  *)
3307
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3308
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
3309
    ;;
3310
  esac
3311
  ;;
3312
3313
interix[[3-9]]*)
3314
  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
3315
  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
3316
  ;;
3317
3318
irix5* | irix6* | nonstopux*)
3319
  case $LD in
3320
  *-32|*"-32 ") libmagic=32-bit;;
3321
  *-n32|*"-n32 ") libmagic=N32;;
3322
  *-64|*"-64 ") libmagic=64-bit;;
3323
  *) libmagic=never-match;;
3324
  esac
3325
  lt_cv_deplibs_check_method=pass_all
3326
  ;;
3327
3328
# This must be Linux ELF.
3329
linux* | k*bsd*-gnu)
3330
  lt_cv_deplibs_check_method=pass_all
3331
  ;;
3332
3333
netbsd* | netbsdelf*-gnu)
3334
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3335
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3336
  else
3337
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3338
  fi
3339
  ;;
3340
3341
newos6*)
3342
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3343
  lt_cv_file_magic_cmd=/usr/bin/file
3344
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
3345
  ;;
3346
3347
nto-qnx*)
3348
  lt_cv_deplibs_check_method=unknown
3349
  ;;
3350
3351
openbsd*)
3352
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3353
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
3354
  else
3355
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3356
  fi
3357
  ;;
3358
3359
osf3* | osf4* | osf5*)
3360
  lt_cv_deplibs_check_method=pass_all
3361
  ;;
3362
3363
rdos*)
3364
  lt_cv_deplibs_check_method=pass_all
3365
  ;;
3366
3367
solaris*)
3368
  lt_cv_deplibs_check_method=pass_all
3369
  ;;
3370
3371
sysv4 | sysv4.3*)
3372
  case $host_vendor in
3373
  motorola)
3374
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
3375
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3376
    ;;
3377
  ncr)
3378
    lt_cv_deplibs_check_method=pass_all
3379
    ;;
3380
  sequent)
3381
    lt_cv_file_magic_cmd='/bin/file'
3382
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3383
    ;;
3384
  sni)
3385
    lt_cv_file_magic_cmd='/bin/file'
3386
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3387
    lt_cv_file_magic_test_file=/lib/libc.so
3388
    ;;
3389
  siemens)
3390
    lt_cv_deplibs_check_method=pass_all
3391
    ;;
3392
  pc)
3393
    lt_cv_deplibs_check_method=pass_all
3394
    ;;
3395
  esac
3396
  ;;
3397
3398
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3399
  lt_cv_deplibs_check_method=pass_all
3400
  ;;
3401
esac
3402
])
3403
file_magic_cmd=$lt_cv_file_magic_cmd
3404
deplibs_check_method=$lt_cv_deplibs_check_method
3405
test -z "$deplibs_check_method" && deplibs_check_method=unknown
3406
])# AC_DEPLIBS_CHECK_METHOD
3407
3408
3409
# AC_PROG_NM
3410
# ----------
3411
# find the pathname to a BSD-compatible name lister
3412
AC_DEFUN([AC_PROG_NM],
3413
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3414
[if test -n "$NM"; then
3415
  # Let the user override the test.
3416
  lt_cv_path_NM="$NM"
3417
else
3418
  lt_nm_to_check="${ac_tool_prefix}nm"
3419
  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
3420
    lt_nm_to_check="$lt_nm_to_check nm"
3421
  fi
3422
  for lt_tmp_nm in $lt_nm_to_check; do
3423
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3424
    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
3425
      IFS="$lt_save_ifs"
3426
      test -z "$ac_dir" && ac_dir=.
3427
      tmp_nm="$ac_dir/$lt_tmp_nm"
3428
      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3429
	# Check to see if the nm accepts a BSD-compat flag.
3430
	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
3431
	#   nm: unknown option "B" ignored
3432
	# Tru64's nm complains that /dev/null is an invalid object file
3433
	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3434
	*/dev/null* | *'Invalid file or object type'*)
3435
	  lt_cv_path_NM="$tmp_nm -B"
3436
	  break
3437
	  ;;
3438
	*)
3439
	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3440
	  */dev/null*)
3441
	    lt_cv_path_NM="$tmp_nm -p"
3442
	    break
3443
	    ;;
3444
	  *)
3445
	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3446
	    continue # so that we can try to find one that supports BSD flags
3447
	    ;;
3448
	  esac
3449
	  ;;
3450
	esac
3451
      fi
3452
    done
3453
    IFS="$lt_save_ifs"
3454
  done
3455
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3456
fi])
3457
NM="$lt_cv_path_NM"
3458
])# AC_PROG_NM
3459
3460
3461
# AC_CHECK_LIBM
3462
# -------------
3463
# check for math library
3464
AC_DEFUN([AC_CHECK_LIBM],
3465
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3466
LIBM=
3467
case $host in
3468
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3469
  # These system don't have libm, or don't need it
3470
  ;;
3471
*-ncr-sysv4.3*)
3472
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3473
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3474
  ;;
3475
*)
3476
  AC_CHECK_LIB(m, cos, LIBM="-lm")
3477
  ;;
3478
esac
3479
])# AC_CHECK_LIBM
3480
3481
3482
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3483
# -----------------------------------
3484
# sets LIBLTDL to the link flags for the libltdl convenience library and
3485
# LTDLINCL to the include flags for the libltdl header and adds
3486
# --enable-ltdl-convenience to the configure arguments.  Note that
3487
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
3488
# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
3489
# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
3490
# (note the single quotes!).  If your package is not flat and you're not
3491
# using automake, define top_builddir and top_srcdir appropriately in
3492
# the Makefiles.
3493
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3494
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3495
  case $enable_ltdl_convenience in
3496
  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3497
  "") enable_ltdl_convenience=yes
3498
      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3499
  esac
3500
  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3501
  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3502
  # For backwards non-gettext consistent compatibility...
3503
  INCLTDL="$LTDLINCL"
3504
])# AC_LIBLTDL_CONVENIENCE
3505
3506
3507
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3508
# -----------------------------------
3509
# sets LIBLTDL to the link flags for the libltdl installable library and
3510
# LTDLINCL to the include flags for the libltdl header and adds
3511
# --enable-ltdl-install to the configure arguments.  Note that
3512
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
3513
# and an installed libltdl is not found, it is assumed to be `libltdl'.
3514
# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
3515
# '${top_srcdir}/' (note the single quotes!).  If your package is not
3516
# flat and you're not using automake, define top_builddir and top_srcdir
3517
# appropriately in the Makefiles.
3518
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3519
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3520
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3521
  AC_CHECK_LIB(ltdl, lt_dlinit,
3522
  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3523
  [if test x"$enable_ltdl_install" = xno; then
3524
     AC_MSG_WARN([libltdl not installed, but installation disabled])
3525
   else
3526
     enable_ltdl_install=yes
3527
   fi
3528
  ])
3529
  if test x"$enable_ltdl_install" = x"yes"; then
3530
    ac_configure_args="$ac_configure_args --enable-ltdl-install"
3531
    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3532
    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3533
  else
3534
    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3535
    LIBLTDL="-lltdl"
3536
    LTDLINCL=
3537
  fi
3538
  # For backwards non-gettext consistent compatibility...
3539
  INCLTDL="$LTDLINCL"
3540
])# AC_LIBLTDL_INSTALLABLE
3541
3542
3543
# AC_LIBTOOL_CXX
3544
# --------------
3545
# enable support for C++ libraries
3546
AC_DEFUN([AC_LIBTOOL_CXX],
3547
[AC_REQUIRE([_LT_AC_LANG_CXX])
3548
])# AC_LIBTOOL_CXX
3549
3550
3551
# _LT_AC_LANG_CXX
3552
# ---------------
3553
AC_DEFUN([_LT_AC_LANG_CXX],
3554
[AC_REQUIRE([AC_PROG_CXX])
3555
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3556
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
3557
])# _LT_AC_LANG_CXX
3558
3559
# _LT_AC_PROG_CXXCPP
3560
# ------------------
3561
AC_DEFUN([_LT_AC_PROG_CXXCPP],
3562
[
3563
AC_REQUIRE([AC_PROG_CXX])
3564
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3565
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3566
    (test "X$CXX" != "Xg++"))) ; then
3567
  AC_PROG_CXXCPP
3568
fi
3569
])# _LT_AC_PROG_CXXCPP
3570
3571
# AC_LIBTOOL_F77
3572
# --------------
3573
# enable support for Fortran 77 libraries
3574
AC_DEFUN([AC_LIBTOOL_F77],
3575
[AC_REQUIRE([_LT_AC_LANG_F77])
3576
])# AC_LIBTOOL_F77
3577
3578
3579
# _LT_AC_LANG_F77
3580
# ---------------
3581
AC_DEFUN([_LT_AC_LANG_F77],
3582
[AC_REQUIRE([AC_PROG_F77])
3583
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
3584
])# _LT_AC_LANG_F77
3585
3586
3587
# AC_LIBTOOL_GCJ
3588
# --------------
3589
# enable support for GCJ libraries
3590
AC_DEFUN([AC_LIBTOOL_GCJ],
3591
[AC_REQUIRE([_LT_AC_LANG_GCJ])
3592
])# AC_LIBTOOL_GCJ
3593
3594
3595
# _LT_AC_LANG_GCJ
3596
# ---------------
3597
AC_DEFUN([_LT_AC_LANG_GCJ],
3598
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3599
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3600
    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3601
      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3602
	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3603
	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3604
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
3605
])# _LT_AC_LANG_GCJ
3606
3607
3608
# AC_LIBTOOL_RC
3609
# -------------
3610
# enable support for Windows resource files
3611
AC_DEFUN([AC_LIBTOOL_RC],
3612
[AC_REQUIRE([LT_AC_PROG_RC])
3613
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
3614
])# AC_LIBTOOL_RC
3615
3616
3617
# AC_LIBTOOL_LANG_C_CONFIG
3618
# ------------------------
3619
# Ensure that the configuration vars for the C compiler are
3620
# suitably defined.  Those variables are subsequently used by
3621
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3622
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3623
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3624
[lt_save_CC="$CC"
3625
AC_LANG_PUSH(C)
3626
3627
# Source file extension for C test sources.
3628
ac_ext=c
3629
3630
# Object file extension for compiled C test sources.
3631
objext=o
3632
_LT_AC_TAGVAR(objext, $1)=$objext
3633
3634
# Code to be used in simple compile tests
3635
lt_simple_compile_test_code="int some_variable = 0;"
3636
3637
# Code to be used in simple link tests
3638
lt_simple_link_test_code='int main(){return(0);}'
3639
3640
_LT_AC_SYS_COMPILER
3641
3642
# save warnings/boilerplate of simple test code
3643
_LT_COMPILER_BOILERPLATE
3644
_LT_LINKER_BOILERPLATE
3645
3646
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3647
AC_LIBTOOL_PROG_COMPILER_PIC($1)
3648
AC_LIBTOOL_PROG_CC_C_O($1)
3649
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3650
AC_LIBTOOL_PROG_LD_SHLIBS($1)
3651
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3652
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3653
AC_LIBTOOL_SYS_LIB_STRIP
3654
AC_LIBTOOL_DLOPEN_SELF
3655
3656
# Report which library types will actually be built
3657
AC_MSG_CHECKING([if libtool supports shared libraries])
3658
AC_MSG_RESULT([$can_build_shared])
3659
3660
AC_MSG_CHECKING([whether to build shared libraries])
3661
test "$can_build_shared" = "no" && enable_shared=no
3662
3663
# On AIX, shared libraries and static libraries use the same namespace, and
3664
# are all built from PIC.
3665
case $host_os in
3666
aix3*)
3667
  test "$enable_shared" = yes && enable_static=no
3668
  if test -n "$RANLIB"; then
3669
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
3670
    postinstall_cmds='$RANLIB $lib'
3671
  fi
3672
  ;;
3673
3674
aix[[4-9]]*)
3675
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3676
    test "$enable_shared" = yes && enable_static=no
3677
  fi
3678
    ;;
3679
esac
3680
AC_MSG_RESULT([$enable_shared])
3681
3682
AC_MSG_CHECKING([whether to build static libraries])
3683
# Make sure either enable_shared or enable_static is yes.
3684
test "$enable_shared" = yes || enable_static=yes
3685
AC_MSG_RESULT([$enable_static])
3686
3687
AC_LIBTOOL_CONFIG($1)
3688
3689
AC_LANG_POP
3690
CC="$lt_save_CC"
3691
])# AC_LIBTOOL_LANG_C_CONFIG
3692
3693
3694
# AC_LIBTOOL_LANG_CXX_CONFIG
3695
# --------------------------
3696
# Ensure that the configuration vars for the C compiler are
3697
# suitably defined.  Those variables are subsequently used by
3698
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3699
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3700
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3701
[AC_LANG_PUSH(C++)
3702
AC_REQUIRE([AC_PROG_CXX])
3703
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
3704
3705
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3706
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3707
_LT_AC_TAGVAR(always_export_symbols, $1)=no
3708
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3709
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3710
_LT_AC_TAGVAR(hardcode_direct, $1)=no
3711
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3712
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3713
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3714
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3715
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3716
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
3717
_LT_AC_TAGVAR(module_cmds, $1)=
3718
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
3719
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3720
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3721
_LT_AC_TAGVAR(no_undefined_flag, $1)=
3722
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3723
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3724
3725
# Dependencies to place before and after the object being linked:
3726
_LT_AC_TAGVAR(predep_objects, $1)=
3727
_LT_AC_TAGVAR(postdep_objects, $1)=
3728
_LT_AC_TAGVAR(predeps, $1)=
3729
_LT_AC_TAGVAR(postdeps, $1)=
3730
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3731
_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
3732
3733
# Source file extension for C++ test sources.
3734
ac_ext=cpp
3735
3736
# Object file extension for compiled C++ test sources.
3737
objext=o
3738
_LT_AC_TAGVAR(objext, $1)=$objext
3739
3740
# Code to be used in simple compile tests
3741
lt_simple_compile_test_code="int some_variable = 0;"
3742
3743
# Code to be used in simple link tests
3744
lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
3745
3746
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3747
_LT_AC_SYS_COMPILER
3748
3749
# save warnings/boilerplate of simple test code
3750
_LT_COMPILER_BOILERPLATE
3751
_LT_LINKER_BOILERPLATE
3752
3753
# Allow CC to be a program name with arguments.
3754
lt_save_CC=$CC
3755
lt_save_LD=$LD
3756
lt_save_GCC=$GCC
3757
GCC=$GXX
3758
lt_save_with_gnu_ld=$with_gnu_ld
3759
lt_save_path_LD=$lt_cv_path_LD
3760
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; the