~ubuntu-branches/ubuntu/wily/openldap/wily-proposed

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