Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5362 serge 1
# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
2
 
3
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
4
 
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
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15
m4_ifndef([AC_AUTOCONF_VERSION],
16
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
17
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
18
[m4_warning([this file was generated for autoconf 2.69.
19
You have another version of autoconf.  It may work, but is not guaranteed to.
20
If you have problems, you may need to regenerate the build system entirely.
21
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
22
 
23
# Copyright (C) 2002-2013 Free Software Foundation, Inc.
24
#
25
# This file is free software; the Free Software Foundation
26
# gives unlimited permission to copy and/or distribute it,
27
# with or without modifications, as long as this notice is preserved.
28
 
29
# AM_AUTOMAKE_VERSION(VERSION)
30
# ----------------------------
31
# Automake X.Y traces this macro to ensure aclocal.m4 has been
32
# generated from the m4 files accompanying Automake X.Y.
33
# (This private macro should not be called outside this file.)
34
AC_DEFUN([AM_AUTOMAKE_VERSION],
35
[am__api_version='1.14'
36
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
37
dnl require some minimum version.  Point them to the right macro.
38
m4_if([$1], [1.14.1], [],
39
      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
40
])
41
 
42
# _AM_AUTOCONF_VERSION(VERSION)
43
# -----------------------------
44
# aclocal traces this macro to find the Autoconf version.
45
# This is a private macro too.  Using m4_define simplifies
46
# the logic in aclocal, which can simply ignore this definition.
47
m4_define([_AM_AUTOCONF_VERSION], [])
48
 
49
# AM_SET_CURRENT_AUTOMAKE_VERSION
50
# -------------------------------
51
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
52
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
53
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
54
[AM_AUTOMAKE_VERSION([1.14.1])dnl
55
m4_ifndef([AC_AUTOCONF_VERSION],
56
  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
57
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
58
 
59
# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
60
 
61
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
62
#
63
# This file is free software; the Free Software Foundation
64
# gives unlimited permission to copy and/or distribute it,
65
# with or without modifications, as long as this notice is preserved.
66
 
67
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
68
# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
69
# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
70
#
71
# Of course, Automake must honor this variable whenever it calls a
72
# tool from the auxiliary directory.  The problem is that $srcdir (and
73
# therefore $ac_aux_dir as well) can be either absolute or relative,
74
# depending on how configure is run.  This is pretty annoying, since
75
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
76
# source directory, any form will work fine, but in subdirectories a
77
# relative path needs to be adjusted first.
78
#
79
# $ac_aux_dir/missing
80
#    fails when called from a subdirectory if $ac_aux_dir is relative
81
# $top_srcdir/$ac_aux_dir/missing
82
#    fails if $ac_aux_dir is absolute,
83
#    fails when called from a subdirectory in a VPATH build with
84
#          a relative $ac_aux_dir
85
#
86
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
87
# are both prefixed by $srcdir.  In an in-source build this is usually
88
# harmless because $srcdir is '.', but things will broke when you
89
# start a VPATH build or use an absolute $srcdir.
90
#
91
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
92
# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
93
#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
94
# and then we would define $MISSING as
95
#   MISSING="\${SHELL} $am_aux_dir/missing"
96
# This will work as long as MISSING is not called from configure, because
97
# unfortunately $(top_srcdir) has no meaning in configure.
98
# However there are other variables, like CC, which are often used in
99
# configure, and could therefore not use this "fixed" $ac_aux_dir.
100
#
101
# Another solution, used here, is to always expand $ac_aux_dir to an
102
# absolute PATH.  The drawback is that using absolute paths prevent a
103
# configured tree to be moved without reconfiguration.
104
 
105
AC_DEFUN([AM_AUX_DIR_EXPAND],
106
[dnl Rely on autoconf to set up CDPATH properly.
107
AC_PREREQ([2.50])dnl
108
# expand $ac_aux_dir to an absolute path
109
am_aux_dir=`cd $ac_aux_dir && pwd`
110
])
111
 
112
# AM_CONDITIONAL                                            -*- Autoconf -*-
113
 
114
# Copyright (C) 1997-2013 Free Software Foundation, Inc.
115
#
116
# This file is free software; the Free Software Foundation
117
# gives unlimited permission to copy and/or distribute it,
118
# with or without modifications, as long as this notice is preserved.
119
 
120
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
121
# -------------------------------------
122
# Define a conditional.
123
AC_DEFUN([AM_CONDITIONAL],
124
[AC_PREREQ([2.52])dnl
125
 m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
126
       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
127
AC_SUBST([$1_TRUE])dnl
128
AC_SUBST([$1_FALSE])dnl
129
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
130
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
131
m4_define([_AM_COND_VALUE_$1], [$2])dnl
132
if $2; then
133
  $1_TRUE=
134
  $1_FALSE='#'
135
else
136
  $1_TRUE='#'
137
  $1_FALSE=
138
fi
139
AC_CONFIG_COMMANDS_PRE(
140
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
141
  AC_MSG_ERROR([[conditional "$1" was never defined.
142
Usually this means the macro was only invoked conditionally.]])
143
fi])])
144
 
145
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
146
#
147
# This file is free software; the Free Software Foundation
148
# gives unlimited permission to copy and/or distribute it,
149
# with or without modifications, as long as this notice is preserved.
150
 
151
 
152
# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
153
# written in clear, in which case automake, when reading aclocal.m4,
154
# will think it sees a *use*, and therefore will trigger all it's
155
# C support machinery.  Also note that it means that autoscan, seeing
156
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
157
 
158
 
159
# _AM_DEPENDENCIES(NAME)
160
# ----------------------
161
# See how the compiler implements dependency checking.
162
# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
163
# We try a few techniques and use that to set a single cache variable.
164
#
165
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
166
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
167
# dependency, and given that the user is not expected to run this macro,
168
# just rely on AC_PROG_CC.
169
AC_DEFUN([_AM_DEPENDENCIES],
170
[AC_REQUIRE([AM_SET_DEPDIR])dnl
171
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
172
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
173
AC_REQUIRE([AM_DEP_TRACK])dnl
174
 
175
m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
176
      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
177
      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
178
      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
179
      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
180
      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
181
                    [depcc="$$1"   am_compiler_list=])
182
 
183
AC_CACHE_CHECK([dependency style of $depcc],
184
               [am_cv_$1_dependencies_compiler_type],
185
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
186
  # We make a subdir and do the tests there.  Otherwise we can end up
187
  # making bogus files that we don't know about and never remove.  For
188
  # instance it was reported that on HP-UX the gcc test will end up
189
  # making a dummy file named 'D' -- because '-MD' means "put the output
190
  # in D".
191
  rm -rf conftest.dir
192
  mkdir conftest.dir
193
  # Copy depcomp to subdir because otherwise we won't find it if we're
194
  # using a relative directory.
195
  cp "$am_depcomp" conftest.dir
196
  cd conftest.dir
197
  # We will build objects and dependencies in a subdirectory because
198
  # it helps to detect inapplicable dependency modes.  For instance
199
  # both Tru64's cc and ICC support -MD to output dependencies as a
200
  # side effect of compilation, but ICC will put the dependencies in
201
  # the current directory while Tru64 will put them in the object
202
  # directory.
203
  mkdir sub
204
 
205
  am_cv_$1_dependencies_compiler_type=none
206
  if test "$am_compiler_list" = ""; then
207
     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
208
  fi
209
  am__universal=false
210
  m4_case([$1], [CC],
211
    [case " $depcc " in #(
212
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
213
     esac],
214
    [CXX],
215
    [case " $depcc " in #(
216
     *\ -arch\ *\ -arch\ *) am__universal=true ;;
217
     esac])
218
 
219
  for depmode in $am_compiler_list; do
220
    # Setup a source with many dependencies, because some compilers
221
    # like to wrap large dependency lists on column 80 (with \), and
222
    # we should not choose a depcomp mode which is confused by this.
223
    #
224
    # We need to recreate these files for each test, as the compiler may
225
    # overwrite some of them when testing with obscure command lines.
226
    # This happens at least with the AIX C compiler.
227
    : > sub/conftest.c
228
    for i in 1 2 3 4 5 6; do
229
      echo '#include "conftst'$i'.h"' >> sub/conftest.c
230
      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
231
      # Solaris 10 /bin/sh.
232
      echo '/* dummy */' > sub/conftst$i.h
233
    done
234
    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
235
 
236
    # We check with '-c' and '-o' for the sake of the "dashmstdout"
237
    # mode.  It turns out that the SunPro C++ compiler does not properly
238
    # handle '-M -o', and we need to detect this.  Also, some Intel
239
    # versions had trouble with output in subdirs.
240
    am__obj=sub/conftest.${OBJEXT-o}
241
    am__minus_obj="-o $am__obj"
242
    case $depmode in
243
    gcc)
244
      # This depmode causes a compiler race in universal mode.
245
      test "$am__universal" = false || continue
246
      ;;
247
    nosideeffect)
248
      # After this tag, mechanisms are not by side-effect, so they'll
249
      # only be used when explicitly requested.
250
      if test "x$enable_dependency_tracking" = xyes; then
251
	continue
252
      else
253
	break
254
      fi
255
      ;;
256
    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
257
      # This compiler won't grok '-c -o', but also, the minuso test has
258
      # not run yet.  These depmodes are late enough in the game, and
259
      # so weak that their functioning should not be impacted.
260
      am__obj=conftest.${OBJEXT-o}
261
      am__minus_obj=
262
      ;;
263
    none) break ;;
264
    esac
265
    if depmode=$depmode \
266
       source=sub/conftest.c object=$am__obj \
267
       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
268
       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
269
         >/dev/null 2>conftest.err &&
270
       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
271
       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
272
       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
273
       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
274
      # icc doesn't choke on unknown options, it will just issue warnings
275
      # or remarks (even with -Werror).  So we grep stderr for any message
276
      # that says an option was ignored or not supported.
277
      # When given -MP, icc 7.0 and 7.1 complain thusly:
278
      #   icc: Command line warning: ignoring option '-M'; no argument required
279
      # The diagnosis changed in icc 8.0:
280
      #   icc: Command line remark: option '-MP' not supported
281
      if (grep 'ignoring option' conftest.err ||
282
          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
283
        am_cv_$1_dependencies_compiler_type=$depmode
284
        break
285
      fi
286
    fi
287
  done
288
 
289
  cd ..
290
  rm -rf conftest.dir
291
else
292
  am_cv_$1_dependencies_compiler_type=none
293
fi
294
])
295
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
296
AM_CONDITIONAL([am__fastdep$1], [
297
  test "x$enable_dependency_tracking" != xno \
298
  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
299
])
300
 
301
 
302
# AM_SET_DEPDIR
303
# -------------
304
# Choose a directory name for dependency files.
305
# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
306
AC_DEFUN([AM_SET_DEPDIR],
307
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
308
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
309
])
310
 
311
 
312
# AM_DEP_TRACK
313
# ------------
314
AC_DEFUN([AM_DEP_TRACK],
315
[AC_ARG_ENABLE([dependency-tracking], [dnl
316
AS_HELP_STRING(
317
  [--enable-dependency-tracking],
318
  [do not reject slow dependency extractors])
319
AS_HELP_STRING(
320
  [--disable-dependency-tracking],
321
  [speeds up one-time build])])
322
if test "x$enable_dependency_tracking" != xno; then
323
  am_depcomp="$ac_aux_dir/depcomp"
324
  AMDEPBACKSLASH='\'
325
  am__nodep='_no'
326
fi
327
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
328
AC_SUBST([AMDEPBACKSLASH])dnl
329
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
330
AC_SUBST([am__nodep])dnl
331
_AM_SUBST_NOTMAKE([am__nodep])dnl
332
])
333
 
334
# Generate code to set up dependency tracking.              -*- Autoconf -*-
335
 
336
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
337
#
338
# This file is free software; the Free Software Foundation
339
# gives unlimited permission to copy and/or distribute it,
340
# with or without modifications, as long as this notice is preserved.
341
 
342
 
343
# _AM_OUTPUT_DEPENDENCY_COMMANDS
344
# ------------------------------
345
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
346
[{
347
  # Older Autoconf quotes --file arguments for eval, but not when files
348
  # are listed without --file.  Let's play safe and only enable the eval
349
  # if we detect the quoting.
350
  case $CONFIG_FILES in
351
  *\'*) eval set x "$CONFIG_FILES" ;;
352
  *)   set x $CONFIG_FILES ;;
353
  esac
354
  shift
355
  for mf
356
  do
357
    # Strip MF so we end up with the name of the file.
358
    mf=`echo "$mf" | sed -e 's/:.*$//'`
359
    # Check whether this is an Automake generated Makefile or not.
360
    # We used to match only the files named 'Makefile.in', but
361
    # some people rename them; so instead we look at the file content.
362
    # Grep'ing the first line is not enough: some people post-process
363
    # each Makefile.in and add a new line on top of each file to say so.
364
    # Grep'ing the whole file is not good either: AIX grep has a line
365
    # limit of 2048, but all sed's we know have understand at least 4000.
366
    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
367
      dirpart=`AS_DIRNAME("$mf")`
368
    else
369
      continue
370
    fi
371
    # Extract the definition of DEPDIR, am__include, and am__quote
372
    # from the Makefile without running 'make'.
373
    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
374
    test -z "$DEPDIR" && continue
375
    am__include=`sed -n 's/^am__include = //p' < "$mf"`
376
    test -z "$am__include" && continue
377
    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
378
    # Find all dependency output files, they are included files with
379
    # $(DEPDIR) in their names.  We invoke sed twice because it is the
380
    # simplest approach to changing $(DEPDIR) to its actual value in the
381
    # expansion.
382
    for file in `sed -n "
383
      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
384
	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
385
      # Make sure the directory exists.
386
      test -f "$dirpart/$file" && continue
387
      fdir=`AS_DIRNAME(["$file"])`
388
      AS_MKDIR_P([$dirpart/$fdir])
389
      # echo "creating $dirpart/$file"
390
      echo '# dummy' > "$dirpart/$file"
391
    done
392
  done
393
}
394
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
395
 
396
 
397
# AM_OUTPUT_DEPENDENCY_COMMANDS
398
# -----------------------------
399
# This macro should only be invoked once -- use via AC_REQUIRE.
400
#
401
# This code is only required when automatic dependency tracking
402
# is enabled.  FIXME.  This creates each '.P' file that we will
403
# need in order to bootstrap the dependency handling code.
404
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
405
[AC_CONFIG_COMMANDS([depfiles],
406
     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
407
     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
408
])
409
 
410
# Do all the work for Automake.                             -*- Autoconf -*-
411
 
412
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
413
#
414
# This file is free software; the Free Software Foundation
415
# gives unlimited permission to copy and/or distribute it,
416
# with or without modifications, as long as this notice is preserved.
417
 
418
# This macro actually does too much.  Some checks are only needed if
419
# your package does certain things.  But this isn't really a big deal.
420
 
421
dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
422
m4_define([AC_PROG_CC],
423
m4_defn([AC_PROG_CC])
424
[_AM_PROG_CC_C_O
425
])
426
 
427
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
428
# AM_INIT_AUTOMAKE([OPTIONS])
429
# -----------------------------------------------
430
# The call with PACKAGE and VERSION arguments is the old style
431
# call (pre autoconf-2.50), which is being phased out.  PACKAGE
432
# and VERSION should now be passed to AC_INIT and removed from
433
# the call to AM_INIT_AUTOMAKE.
434
# We support both call styles for the transition.  After
435
# the next Automake release, Autoconf can make the AC_INIT
436
# arguments mandatory, and then we can depend on a new Autoconf
437
# release and drop the old call support.
438
AC_DEFUN([AM_INIT_AUTOMAKE],
439
[AC_PREREQ([2.65])dnl
440
dnl Autoconf wants to disallow AM_ names.  We explicitly allow
441
dnl the ones we care about.
442
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
443
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
444
AC_REQUIRE([AC_PROG_INSTALL])dnl
445
if test "`cd $srcdir && pwd`" != "`pwd`"; then
446
  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
447
  # is not polluted with repeated "-I."
448
  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
449
  # test to see if srcdir already configured
450
  if test -f $srcdir/config.status; then
451
    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
452
  fi
453
fi
454
 
455
# test whether we have cygpath
456
if test -z "$CYGPATH_W"; then
457
  if (cygpath --version) >/dev/null 2>/dev/null; then
458
    CYGPATH_W='cygpath -w'
459
  else
460
    CYGPATH_W=echo
461
  fi
462
fi
463
AC_SUBST([CYGPATH_W])
464
 
465
# Define the identity of the package.
466
dnl Distinguish between old-style and new-style calls.
467
m4_ifval([$2],
468
[AC_DIAGNOSE([obsolete],
469
             [$0: two- and three-arguments forms are deprecated.])
470
m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
471
 AC_SUBST([PACKAGE], [$1])dnl
472
 AC_SUBST([VERSION], [$2])],
473
[_AM_SET_OPTIONS([$1])dnl
474
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
475
m4_if(
476
  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
477
  [ok:ok],,
478
  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
479
 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
480
 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
481
 
482
_AM_IF_OPTION([no-define],,
483
[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
484
 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
485
 
486
# Some tools Automake needs.
487
AC_REQUIRE([AM_SANITY_CHECK])dnl
488
AC_REQUIRE([AC_ARG_PROGRAM])dnl
489
AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
490
AM_MISSING_PROG([AUTOCONF], [autoconf])
491
AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
492
AM_MISSING_PROG([AUTOHEADER], [autoheader])
493
AM_MISSING_PROG([MAKEINFO], [makeinfo])
494
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
495
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
496
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
497
# For better backward compatibility.  To be removed once Automake 1.9.x
498
# dies out for good.  For more background, see:
499
# 
500
# 
501
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
502
# We need awk for the "check" target.  The system "awk" is bad on
503
# some platforms.
504
AC_REQUIRE([AC_PROG_AWK])dnl
505
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
506
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
507
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
508
	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
509
			     [_AM_PROG_TAR([v7])])])
510
_AM_IF_OPTION([no-dependencies],,
511
[AC_PROVIDE_IFELSE([AC_PROG_CC],
512
		  [_AM_DEPENDENCIES([CC])],
513
		  [m4_define([AC_PROG_CC],
514
			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
515
AC_PROVIDE_IFELSE([AC_PROG_CXX],
516
		  [_AM_DEPENDENCIES([CXX])],
517
		  [m4_define([AC_PROG_CXX],
518
			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
519
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
520
		  [_AM_DEPENDENCIES([OBJC])],
521
		  [m4_define([AC_PROG_OBJC],
522
			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
523
AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
524
		  [_AM_DEPENDENCIES([OBJCXX])],
525
		  [m4_define([AC_PROG_OBJCXX],
526
			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
527
])
528
AC_REQUIRE([AM_SILENT_RULES])dnl
529
dnl The testsuite driver may need to know about EXEEXT, so add the
530
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
531
dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
532
AC_CONFIG_COMMANDS_PRE(dnl
533
[m4_provide_if([_AM_COMPILER_EXEEXT],
534
  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
535
 
536
# POSIX will say in a future version that running "rm -f" with no argument
537
# is OK; and we want to be able to make that assumption in our Makefile
538
# recipes.  So use an aggressive probe to check that the usage we want is
539
# actually supported "in the wild" to an acceptable degree.
540
# See automake bug#10828.
541
# To make any issue more visible, cause the running configure to be aborted
542
# by default if the 'rm' program in use doesn't match our expectations; the
543
# user can still override this though.
544
if rm -f && rm -fr && rm -rf; then : OK; else
545
  cat >&2 <<'END'
546
Oops!
547
 
548
Your 'rm' program seems unable to run without file operands specified
549
on the command line, even when the '-f' option is present.  This is contrary
550
to the behaviour of most rm programs out there, and not conforming with
551
the upcoming POSIX standard: 
552
 
553
Please tell bug-automake@gnu.org about your system, including the value
554
of your $PATH and any error possibly output before this message.  This
555
can help us improve future automake versions.
556
 
557
END
558
  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
559
    echo 'Configuration will proceed anyway, since you have set the' >&2
560
    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
561
    echo >&2
562
  else
563
    cat >&2 <<'END'
564
Aborting the configuration process, to ensure you take notice of the issue.
565
 
566
You can download and install GNU coreutils to get an 'rm' implementation
567
that behaves properly: .
568
 
569
If you want to complete the configuration process using your problematic
570
'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
571
to "yes", and re-run configure.
572
 
573
END
574
    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
575
  fi
576
fi])
577
 
578
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
579
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
580
dnl mangled by Autoconf and run in a shell conditional statement.
581
m4_define([_AC_COMPILER_EXEEXT],
582
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
583
 
584
# When config.status generates a header, we must update the stamp-h file.
585
# This file resides in the same directory as the config header
586
# that is generated.  The stamp files are numbered to have different names.
587
 
588
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
589
# loop where config.status creates the headers, so we can generate
590
# our stamp files there.
591
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
592
[# Compute $1's index in $config_headers.
593
_am_arg=$1
594
_am_stamp_count=1
595
for _am_header in $config_headers :; do
596
  case $_am_header in
597
    $_am_arg | $_am_arg:* )
598
      break ;;
599
    * )
600
      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
601
  esac
602
done
603
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
604
 
605
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
606
#
607
# This file is free software; the Free Software Foundation
608
# gives unlimited permission to copy and/or distribute it,
609
# with or without modifications, as long as this notice is preserved.
610
 
611
# AM_PROG_INSTALL_SH
612
# ------------------
613
# Define $install_sh.
614
AC_DEFUN([AM_PROG_INSTALL_SH],
615
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
616
if test x"${install_sh}" != xset; then
617
  case $am_aux_dir in
618
  *\ * | *\	*)
619
    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
620
  *)
621
    install_sh="\${SHELL} $am_aux_dir/install-sh"
622
  esac
623
fi
624
AC_SUBST([install_sh])])
625
 
626
# Copyright (C) 2003-2013 Free Software Foundation, Inc.
627
#
628
# This file is free software; the Free Software Foundation
629
# gives unlimited permission to copy and/or distribute it,
630
# with or without modifications, as long as this notice is preserved.
631
 
632
# Check whether the underlying file-system supports filenames
633
# with a leading dot.  For instance MS-DOS doesn't.
634
AC_DEFUN([AM_SET_LEADING_DOT],
635
[rm -rf .tst 2>/dev/null
636
mkdir .tst 2>/dev/null
637
if test -d .tst; then
638
  am__leading_dot=.
639
else
640
  am__leading_dot=_
641
fi
642
rmdir .tst 2>/dev/null
643
AC_SUBST([am__leading_dot])])
644
 
645
# Check to see how 'make' treats includes.	            -*- Autoconf -*-
646
 
647
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
648
#
649
# This file is free software; the Free Software Foundation
650
# gives unlimited permission to copy and/or distribute it,
651
# with or without modifications, as long as this notice is preserved.
652
 
653
# AM_MAKE_INCLUDE()
654
# -----------------
655
# Check to see how make treats includes.
656
AC_DEFUN([AM_MAKE_INCLUDE],
657
[am_make=${MAKE-make}
658
cat > confinc << 'END'
659
am__doit:
660
	@echo this is the am__doit target
661
.PHONY: am__doit
662
END
663
# If we don't find an include directive, just comment out the code.
664
AC_MSG_CHECKING([for style of include used by $am_make])
665
am__include="#"
666
am__quote=
667
_am_result=none
668
# First try GNU make style include.
669
echo "include confinc" > confmf
670
# Ignore all kinds of additional output from 'make'.
671
case `$am_make -s -f confmf 2> /dev/null` in #(
672
*the\ am__doit\ target*)
673
  am__include=include
674
  am__quote=
675
  _am_result=GNU
676
  ;;
677
esac
678
# Now try BSD make style include.
679
if test "$am__include" = "#"; then
680
   echo '.include "confinc"' > confmf
681
   case `$am_make -s -f confmf 2> /dev/null` in #(
682
   *the\ am__doit\ target*)
683
     am__include=.include
684
     am__quote="\""
685
     _am_result=BSD
686
     ;;
687
   esac
688
fi
689
AC_SUBST([am__include])
690
AC_SUBST([am__quote])
691
AC_MSG_RESULT([$_am_result])
692
rm -f confinc confmf
693
])
694
 
695
# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
696
 
697
# Copyright (C) 1997-2013 Free Software Foundation, Inc.
698
#
699
# This file is free software; the Free Software Foundation
700
# gives unlimited permission to copy and/or distribute it,
701
# with or without modifications, as long as this notice is preserved.
702
 
703
# AM_MISSING_PROG(NAME, PROGRAM)
704
# ------------------------------
705
AC_DEFUN([AM_MISSING_PROG],
706
[AC_REQUIRE([AM_MISSING_HAS_RUN])
707
$1=${$1-"${am_missing_run}$2"}
708
AC_SUBST($1)])
709
 
710
# AM_MISSING_HAS_RUN
711
# ------------------
712
# Define MISSING if not defined so far and test if it is modern enough.
713
# If it is, set am_missing_run to use it, otherwise, to nothing.
714
AC_DEFUN([AM_MISSING_HAS_RUN],
715
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
716
AC_REQUIRE_AUX_FILE([missing])dnl
717
if test x"${MISSING+set}" != xset; then
718
  case $am_aux_dir in
719
  *\ * | *\	*)
720
    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
721
  *)
722
    MISSING="\${SHELL} $am_aux_dir/missing" ;;
723
  esac
724
fi
725
# Use eval to expand $SHELL
726
if eval "$MISSING --is-lightweight"; then
727
  am_missing_run="$MISSING "
728
else
729
  am_missing_run=
730
  AC_MSG_WARN(['missing' script is too old or missing])
731
fi
732
])
733
 
734
# Helper functions for option handling.                     -*- Autoconf -*-
735
 
736
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
737
#
738
# This file is free software; the Free Software Foundation
739
# gives unlimited permission to copy and/or distribute it,
740
# with or without modifications, as long as this notice is preserved.
741
 
742
# _AM_MANGLE_OPTION(NAME)
743
# -----------------------
744
AC_DEFUN([_AM_MANGLE_OPTION],
745
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
746
 
747
# _AM_SET_OPTION(NAME)
748
# --------------------
749
# Set option NAME.  Presently that only means defining a flag for this option.
750
AC_DEFUN([_AM_SET_OPTION],
751
[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
752
 
753
# _AM_SET_OPTIONS(OPTIONS)
754
# ------------------------
755
# OPTIONS is a space-separated list of Automake options.
756
AC_DEFUN([_AM_SET_OPTIONS],
757
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
758
 
759
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
760
# -------------------------------------------
761
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
762
AC_DEFUN([_AM_IF_OPTION],
763
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
764
 
765
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
766
#
767
# This file is free software; the Free Software Foundation
768
# gives unlimited permission to copy and/or distribute it,
769
# with or without modifications, as long as this notice is preserved.
770
 
771
# _AM_PROG_CC_C_O
772
# ---------------
773
# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
774
# to automatically call this.
775
AC_DEFUN([_AM_PROG_CC_C_O],
776
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
777
AC_REQUIRE_AUX_FILE([compile])dnl
778
AC_LANG_PUSH([C])dnl
779
AC_CACHE_CHECK(
780
  [whether $CC understands -c and -o together],
781
  [am_cv_prog_cc_c_o],
782
  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
783
  # Make sure it works both with $CC and with simple cc.
784
  # Following AC_PROG_CC_C_O, we do the test twice because some
785
  # compilers refuse to overwrite an existing .o file with -o,
786
  # though they will create one.
787
  am_cv_prog_cc_c_o=yes
788
  for am_i in 1 2; do
789
    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
790
         && test -f conftest2.$ac_objext; then
791
      : OK
792
    else
793
      am_cv_prog_cc_c_o=no
794
      break
795
    fi
796
  done
797
  rm -f core conftest*
798
  unset am_i])
799
if test "$am_cv_prog_cc_c_o" != yes; then
800
   # Losing compiler, so override with the script.
801
   # FIXME: It is wrong to rewrite CC.
802
   # But if we don't then we get into trouble of one sort or another.
803
   # A longer-term fix would be to have automake use am__CC in this case,
804
   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
805
   CC="$am_aux_dir/compile $CC"
806
fi
807
AC_LANG_POP([C])])
808
 
809
# For backward compatibility.
810
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
811
 
812
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
813
#
814
# This file is free software; the Free Software Foundation
815
# gives unlimited permission to copy and/or distribute it,
816
# with or without modifications, as long as this notice is preserved.
817
 
818
# AM_RUN_LOG(COMMAND)
819
# -------------------
820
# Run COMMAND, save the exit status in ac_status, and log it.
821
# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
822
AC_DEFUN([AM_RUN_LOG],
823
[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
824
   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
825
   ac_status=$?
826
   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
827
   (exit $ac_status); }])
828
 
829
# Check to make sure that the build environment is sane.    -*- Autoconf -*-
830
 
831
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
832
#
833
# This file is free software; the Free Software Foundation
834
# gives unlimited permission to copy and/or distribute it,
835
# with or without modifications, as long as this notice is preserved.
836
 
837
# AM_SANITY_CHECK
838
# ---------------
839
AC_DEFUN([AM_SANITY_CHECK],
840
[AC_MSG_CHECKING([whether build environment is sane])
841
# Reject unsafe characters in $srcdir or the absolute working directory
842
# name.  Accept space and tab only in the latter.
843
am_lf='
844
'
845
case `pwd` in
846
  *[[\\\"\#\$\&\'\`$am_lf]]*)
847
    AC_MSG_ERROR([unsafe absolute working directory name]);;
848
esac
849
case $srcdir in
850
  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
851
    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
852
esac
853
 
854
# Do 'set' in a subshell so we don't clobber the current shell's
855
# arguments.  Must try -L first in case configure is actually a
856
# symlink; some systems play weird games with the mod time of symlinks
857
# (eg FreeBSD returns the mod time of the symlink's containing
858
# directory).
859
if (
860
   am_has_slept=no
861
   for am_try in 1 2; do
862
     echo "timestamp, slept: $am_has_slept" > conftest.file
863
     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
864
     if test "$[*]" = "X"; then
865
	# -L didn't work.
866
	set X `ls -t "$srcdir/configure" conftest.file`
867
     fi
868
     if test "$[*]" != "X $srcdir/configure conftest.file" \
869
	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
870
 
871
	# If neither matched, then we have a broken ls.  This can happen
872
	# if, for instance, CONFIG_SHELL is bash and it inherits a
873
	# broken ls alias from the environment.  This has actually
874
	# happened.  Such a system could not be considered "sane".
875
	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
876
  alias in your environment])
877
     fi
878
     if test "$[2]" = conftest.file || test $am_try -eq 2; then
879
       break
880
     fi
881
     # Just in case.
882
     sleep 1
883
     am_has_slept=yes
884
   done
885
   test "$[2]" = conftest.file
886
   )
887
then
888
   # Ok.
889
   :
890
else
891
   AC_MSG_ERROR([newly created file is older than distributed files!
892
Check your system clock])
893
fi
894
AC_MSG_RESULT([yes])
895
# If we didn't sleep, we still need to ensure time stamps of config.status and
896
# generated files are strictly newer.
897
am_sleep_pid=
898
if grep 'slept: no' conftest.file >/dev/null 2>&1; then
899
  ( sleep 1 ) &
900
  am_sleep_pid=$!
901
fi
902
AC_CONFIG_COMMANDS_PRE(
903
  [AC_MSG_CHECKING([that generated files are newer than configure])
904
   if test -n "$am_sleep_pid"; then
905
     # Hide warnings about reused PIDs.
906
     wait $am_sleep_pid 2>/dev/null
907
   fi
908
   AC_MSG_RESULT([done])])
909
rm -f conftest.file
910
])
911
 
912
# Copyright (C) 2009-2013 Free Software Foundation, Inc.
913
#
914
# This file is free software; the Free Software Foundation
915
# gives unlimited permission to copy and/or distribute it,
916
# with or without modifications, as long as this notice is preserved.
917
 
918
# AM_SILENT_RULES([DEFAULT])
919
# --------------------------
920
# Enable less verbose build rules; with the default set to DEFAULT
921
# ("yes" being less verbose, "no" or empty being verbose).
922
AC_DEFUN([AM_SILENT_RULES],
923
[AC_ARG_ENABLE([silent-rules], [dnl
924
AS_HELP_STRING(
925
  [--enable-silent-rules],
926
  [less verbose build output (undo: "make V=1")])
927
AS_HELP_STRING(
928
  [--disable-silent-rules],
929
  [verbose build output (undo: "make V=0")])dnl
930
])
931
case $enable_silent_rules in @%:@ (((
932
  yes) AM_DEFAULT_VERBOSITY=0;;
933
   no) AM_DEFAULT_VERBOSITY=1;;
934
    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
935
esac
936
dnl
937
dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
938
dnl do not support nested variable expansions.
939
dnl See automake bug#9928 and bug#10237.
940
am_make=${MAKE-make}
941
AC_CACHE_CHECK([whether $am_make supports nested variables],
942
   [am_cv_make_support_nested_variables],
943
   [if AS_ECHO([['TRUE=$(BAR$(V))
944
BAR0=false
945
BAR1=true
946
V=1
947
am__doit:
948
	@$(TRUE)
949
.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
950
  am_cv_make_support_nested_variables=yes
951
else
952
  am_cv_make_support_nested_variables=no
953
fi])
954
if test $am_cv_make_support_nested_variables = yes; then
955
  dnl Using '$V' instead of '$(V)' breaks IRIX make.
956
  AM_V='$(V)'
957
  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
958
else
959
  AM_V=$AM_DEFAULT_VERBOSITY
960
  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
961
fi
962
AC_SUBST([AM_V])dnl
963
AM_SUBST_NOTMAKE([AM_V])dnl
964
AC_SUBST([AM_DEFAULT_V])dnl
965
AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
966
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
967
AM_BACKSLASH='\'
968
AC_SUBST([AM_BACKSLASH])dnl
969
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
970
])
971
 
972
# Copyright (C) 2001-2013 Free Software Foundation, Inc.
973
#
974
# This file is free software; the Free Software Foundation
975
# gives unlimited permission to copy and/or distribute it,
976
# with or without modifications, as long as this notice is preserved.
977
 
978
# AM_PROG_INSTALL_STRIP
979
# ---------------------
980
# One issue with vendor 'install' (even GNU) is that you can't
981
# specify the program used to strip binaries.  This is especially
982
# annoying in cross-compiling environments, where the build's strip
983
# is unlikely to handle the host's binaries.
984
# Fortunately install-sh will honor a STRIPPROG variable, so we
985
# always use install-sh in "make install-strip", and initialize
986
# STRIPPROG with the value of the STRIP variable (set by the user).
987
AC_DEFUN([AM_PROG_INSTALL_STRIP],
988
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
989
# Installed binaries are usually stripped using 'strip' when the user
990
# run "make install-strip".  However 'strip' might not be the right
991
# tool to use in cross-compilation environments, therefore Automake
992
# will honor the 'STRIP' environment variable to overrule this program.
993
dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
994
if test "$cross_compiling" != no; then
995
  AC_CHECK_TOOL([STRIP], [strip], :)
996
fi
997
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
998
AC_SUBST([INSTALL_STRIP_PROGRAM])])
999
 
1000
# Copyright (C) 2006-2013 Free Software Foundation, Inc.
1001
#
1002
# This file is free software; the Free Software Foundation
1003
# gives unlimited permission to copy and/or distribute it,
1004
# with or without modifications, as long as this notice is preserved.
1005
 
1006
# _AM_SUBST_NOTMAKE(VARIABLE)
1007
# ---------------------------
1008
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
1009
# This macro is traced by Automake.
1010
AC_DEFUN([_AM_SUBST_NOTMAKE])
1011
 
1012
# AM_SUBST_NOTMAKE(VARIABLE)
1013
# --------------------------
1014
# Public sister of _AM_SUBST_NOTMAKE.
1015
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1016
 
1017
# Check how to create a tarball.                            -*- Autoconf -*-
1018
 
1019
# Copyright (C) 2004-2013 Free Software Foundation, Inc.
1020
#
1021
# This file is free software; the Free Software Foundation
1022
# gives unlimited permission to copy and/or distribute it,
1023
# with or without modifications, as long as this notice is preserved.
1024
 
1025
# _AM_PROG_TAR(FORMAT)
1026
# --------------------
1027
# Check how to create a tarball in format FORMAT.
1028
# FORMAT should be one of 'v7', 'ustar', or 'pax'.
1029
#
1030
# Substitute a variable $(am__tar) that is a command
1031
# writing to stdout a FORMAT-tarball containing the directory
1032
# $tardir.
1033
#     tardir=directory && $(am__tar) > result.tar
1034
#
1035
# Substitute a variable $(am__untar) that extract such
1036
# a tarball read from stdin.
1037
#     $(am__untar) < result.tar
1038
#
1039
AC_DEFUN([_AM_PROG_TAR],
1040
[# Always define AMTAR for backward compatibility.  Yes, it's still used
1041
# in the wild :-(  We should find a proper way to deprecate it ...
1042
AC_SUBST([AMTAR], ['$${TAR-tar}'])
1043
 
1044
# We'll loop over all known methods to create a tar archive until one works.
1045
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1046
 
1047
m4_if([$1], [v7],
1048
  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1049
 
1050
  [m4_case([$1],
1051
    [ustar],
1052
     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1053
      # There is notably a 21 bits limit for the UID and the GID.  In fact,
1054
      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1055
      # and bug#13588).
1056
      am_max_uid=2097151 # 2^21 - 1
1057
      am_max_gid=$am_max_uid
1058
      # The $UID and $GID variables are not portable, so we need to resort
1059
      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
1060
      # below are definitely unexpected, so allow the users to see them
1061
      # (that is, avoid stderr redirection).
1062
      am_uid=`id -u || echo unknown`
1063
      am_gid=`id -g || echo unknown`
1064
      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1065
      if test $am_uid -le $am_max_uid; then
1066
         AC_MSG_RESULT([yes])
1067
      else
1068
         AC_MSG_RESULT([no])
1069
         _am_tools=none
1070
      fi
1071
      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1072
      if test $am_gid -le $am_max_gid; then
1073
         AC_MSG_RESULT([yes])
1074
      else
1075
        AC_MSG_RESULT([no])
1076
        _am_tools=none
1077
      fi],
1078
 
1079
  [pax],
1080
    [],
1081
 
1082
  [m4_fatal([Unknown tar format])])
1083
 
1084
  AC_MSG_CHECKING([how to create a $1 tar archive])
1085
 
1086
  # Go ahead even if we have the value already cached.  We do so because we
1087
  # need to set the values for the 'am__tar' and 'am__untar' variables.
1088
  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1089
 
1090
  for _am_tool in $_am_tools; do
1091
    case $_am_tool in
1092
    gnutar)
1093
      for _am_tar in tar gnutar gtar; do
1094
        AM_RUN_LOG([$_am_tar --version]) && break
1095
      done
1096
      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1097
      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1098
      am__untar="$_am_tar -xf -"
1099
      ;;
1100
    plaintar)
1101
      # Must skip GNU tar: if it does not support --format= it doesn't create
1102
      # ustar tarball either.
1103
      (tar --version) >/dev/null 2>&1 && continue
1104
      am__tar='tar chf - "$$tardir"'
1105
      am__tar_='tar chf - "$tardir"'
1106
      am__untar='tar xf -'
1107
      ;;
1108
    pax)
1109
      am__tar='pax -L -x $1 -w "$$tardir"'
1110
      am__tar_='pax -L -x $1 -w "$tardir"'
1111
      am__untar='pax -r'
1112
      ;;
1113
    cpio)
1114
      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1115
      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1116
      am__untar='cpio -i -H $1 -d'
1117
      ;;
1118
    none)
1119
      am__tar=false
1120
      am__tar_=false
1121
      am__untar=false
1122
      ;;
1123
    esac
1124
 
1125
    # If the value was cached, stop now.  We just wanted to have am__tar
1126
    # and am__untar set.
1127
    test -n "${am_cv_prog_tar_$1}" && break
1128
 
1129
    # tar/untar a dummy directory, and stop if the command works.
1130
    rm -rf conftest.dir
1131
    mkdir conftest.dir
1132
    echo GrepMe > conftest.dir/file
1133
    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1134
    rm -rf conftest.dir
1135
    if test -s conftest.tar; then
1136
      AM_RUN_LOG([$am__untar 
1137
      AM_RUN_LOG([cat conftest.dir/file])
1138
      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1139
    fi
1140
  done
1141
  rm -rf conftest.dir
1142
 
1143
  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1144
  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1145
 
1146
AC_SUBST([am__tar])
1147
AC_SUBST([am__untar])
1148
]) # _AM_PROG_TAR
1149
 
1150
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1151
#
1152
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1153
#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
1154
#                 Foundation, Inc.
1155
#   Written by Gordon Matzigkeit, 1996
1156
#
1157
# This file is free software; the Free Software Foundation gives
1158
# unlimited permission to copy and/or distribute it, with or without
1159
# modifications, as long as this notice is preserved.
1160
 
1161
m4_define([_LT_COPYING], [dnl
1162
#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1163
#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
1164
#                 Foundation, Inc.
1165
#   Written by Gordon Matzigkeit, 1996
1166
#
1167
#   This file is part of GNU Libtool.
1168
#
1169
# GNU Libtool is free software; you can redistribute it and/or
1170
# modify it under the terms of the GNU General Public License as
1171
# published by the Free Software Foundation; either version 2 of
1172
# the License, or (at your option) any later version.
1173
#
1174
# As a special exception to the GNU General Public License,
1175
# if you distribute this file as part of a program or library that
1176
# is built using GNU Libtool, you may include this file under the
1177
# same distribution terms that you use for the rest of that program.
1178
#
1179
# GNU Libtool is distributed in the hope that it will be useful,
1180
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1181
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1182
# GNU General Public License for more details.
1183
#
1184
# You should have received a copy of the GNU General Public License
1185
# along with GNU Libtool; see the file COPYING.  If not, a copy
1186
# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1187
# obtained by writing to the Free Software Foundation, Inc.,
1188
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1189
])
1190
 
1191
# serial 57 LT_INIT
1192
 
1193
 
1194
# LT_PREREQ(VERSION)
1195
# ------------------
1196
# Complain and exit if this libtool version is less that VERSION.
1197
m4_defun([LT_PREREQ],
1198
[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1199
       [m4_default([$3],
1200
		   [m4_fatal([Libtool version $1 or higher is required],
1201
		             63)])],
1202
       [$2])])
1203
 
1204
 
1205
# _LT_CHECK_BUILDDIR
1206
# ------------------
1207
# Complain if the absolute build directory name contains unusual characters
1208
m4_defun([_LT_CHECK_BUILDDIR],
1209
[case `pwd` in
1210
  *\ * | *\	*)
1211
    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1212
esac
1213
])
1214
 
1215
 
1216
# LT_INIT([OPTIONS])
1217
# ------------------
1218
AC_DEFUN([LT_INIT],
1219
[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
1220
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1221
AC_BEFORE([$0], [LT_LANG])dnl
1222
AC_BEFORE([$0], [LT_OUTPUT])dnl
1223
AC_BEFORE([$0], [LTDL_INIT])dnl
1224
m4_require([_LT_CHECK_BUILDDIR])dnl
1225
 
1226
dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1227
m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1228
m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1229
dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1230
dnl unless we require an AC_DEFUNed macro:
1231
AC_REQUIRE([LTOPTIONS_VERSION])dnl
1232
AC_REQUIRE([LTSUGAR_VERSION])dnl
1233
AC_REQUIRE([LTVERSION_VERSION])dnl
1234
AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1235
m4_require([_LT_PROG_LTMAIN])dnl
1236
 
1237
_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
1238
 
1239
dnl Parse OPTIONS
1240
_LT_SET_OPTIONS([$0], [$1])
1241
 
1242
# This can be used to rebuild libtool when needed
1243
LIBTOOL_DEPS="$ltmain"
1244
 
1245
# Always use our own libtool.
1246
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1247
AC_SUBST(LIBTOOL)dnl
1248
 
1249
_LT_SETUP
1250
 
1251
# Only expand once:
1252
m4_define([LT_INIT])
1253
])# LT_INIT
1254
 
1255
# Old names:
1256
AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1257
AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1258
dnl aclocal-1.4 backwards compatibility:
1259
dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1260
dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1261
 
1262
 
1263
# _LT_CC_BASENAME(CC)
1264
# -------------------
1265
# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1266
m4_defun([_LT_CC_BASENAME],
1267
[for cc_temp in $1""; do
1268
  case $cc_temp in
1269
    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1270
    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1271
    \-*) ;;
1272
    *) break;;
1273
  esac
1274
done
1275
cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
1276
])
1277
 
1278
 
1279
# _LT_FILEUTILS_DEFAULTS
1280
# ----------------------
1281
# It is okay to use these file commands and assume they have been set
1282
# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1283
m4_defun([_LT_FILEUTILS_DEFAULTS],
1284
[: ${CP="cp -f"}
1285
: ${MV="mv -f"}
1286
: ${RM="rm -f"}
1287
])# _LT_FILEUTILS_DEFAULTS
1288
 
1289
 
1290
# _LT_SETUP
1291
# ---------
1292
m4_defun([_LT_SETUP],
1293
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1294
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1295
AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1296
AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1297
 
1298
_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
1299
dnl
1300
_LT_DECL([], [host_alias], [0], [The host system])dnl
1301
_LT_DECL([], [host], [0])dnl
1302
_LT_DECL([], [host_os], [0])dnl
1303
dnl
1304
_LT_DECL([], [build_alias], [0], [The build system])dnl
1305
_LT_DECL([], [build], [0])dnl
1306
_LT_DECL([], [build_os], [0])dnl
1307
dnl
1308
AC_REQUIRE([AC_PROG_CC])dnl
1309
AC_REQUIRE([LT_PATH_LD])dnl
1310
AC_REQUIRE([LT_PATH_NM])dnl
1311
dnl
1312
AC_REQUIRE([AC_PROG_LN_S])dnl
1313
test -z "$LN_S" && LN_S="ln -s"
1314
_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1315
dnl
1316
AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1317
_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1318
_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1319
dnl
1320
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1321
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1322
m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
1323
m4_require([_LT_CMD_RELOAD])dnl
1324
m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1325
m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
1326
m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1327
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1328
m4_require([_LT_WITH_SYSROOT])dnl
1329
 
1330
_LT_CONFIG_LIBTOOL_INIT([
1331
# See if we are running on zsh, and set the options which allow our
1332
# commands through without removal of \ escapes INIT.
1333
if test -n "\${ZSH_VERSION+set}" ; then
1334
   setopt NO_GLOB_SUBST
1335
fi
1336
])
1337
if test -n "${ZSH_VERSION+set}" ; then
1338
   setopt NO_GLOB_SUBST
1339
fi
1340
 
1341
_LT_CHECK_OBJDIR
1342
 
1343
m4_require([_LT_TAG_COMPILER])dnl
1344
 
1345
case $host_os in
1346
aix3*)
1347
  # AIX sometimes has problems with the GCC collect2 program.  For some
1348
  # reason, if we set the COLLECT_NAMES environment variable, the problems
1349
  # vanish in a puff of smoke.
1350
  if test "X${COLLECT_NAMES+set}" != Xset; then
1351
    COLLECT_NAMES=
1352
    export COLLECT_NAMES
1353
  fi
1354
  ;;
1355
esac
1356
 
1357
# Global variables:
1358
ofile=libtool
1359
can_build_shared=yes
1360
 
1361
# All known linkers require a `.a' archive for static linking (except MSVC,
1362
# which needs '.lib').
1363
libext=a
1364
 
1365
with_gnu_ld="$lt_cv_prog_gnu_ld"
1366
 
1367
old_CC="$CC"
1368
old_CFLAGS="$CFLAGS"
1369
 
1370
# Set sane defaults for various variables
1371
test -z "$CC" && CC=cc
1372
test -z "$LTCC" && LTCC=$CC
1373
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1374
test -z "$LD" && LD=ld
1375
test -z "$ac_objext" && ac_objext=o
1376
 
1377
_LT_CC_BASENAME([$compiler])
1378
 
1379
# Only perform the check for file, if the check method requires it
1380
test -z "$MAGIC_CMD" && MAGIC_CMD=file
1381
case $deplibs_check_method in
1382
file_magic*)
1383
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1384
    _LT_PATH_MAGIC
1385
  fi
1386
  ;;
1387
esac
1388
 
1389
# Use C for the default configuration in the libtool script
1390
LT_SUPPORTED_TAG([CC])
1391
_LT_LANG_C_CONFIG
1392
_LT_LANG_DEFAULT_CONFIG
1393
_LT_CONFIG_COMMANDS
1394
])# _LT_SETUP
1395
 
1396
 
1397
# _LT_PREPARE_SED_QUOTE_VARS
1398
# --------------------------
1399
# Define a few sed substitution that help us do robust quoting.
1400
m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
1401
[# Backslashify metacharacters that are still active within
1402
# double-quoted strings.
1403
sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1404
 
1405
# Same as above, but do not quote variable references.
1406
double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1407
 
1408
# Sed substitution to delay expansion of an escaped shell variable in a
1409
# double_quote_subst'ed string.
1410
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1411
 
1412
# Sed substitution to delay expansion of an escaped single quote.
1413
delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1414
 
1415
# Sed substitution to avoid accidental globbing in evaled expressions
1416
no_glob_subst='s/\*/\\\*/g'
1417
])
1418
 
1419
# _LT_PROG_LTMAIN
1420
# ---------------
1421
# Note that this code is called both from `configure', and `config.status'
1422
# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
1423
# `config.status' has no value for ac_aux_dir unless we are using Automake,
1424
# so we pass a copy along to make sure it has a sensible value anyway.
1425
m4_defun([_LT_PROG_LTMAIN],
1426
[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1427
_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1428
ltmain="$ac_aux_dir/ltmain.sh"
1429
])# _LT_PROG_LTMAIN
1430
 
1431
 
1432
 
1433
# So that we can recreate a full libtool script including additional
1434
# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1435
# in macros and then make a single call at the end using the `libtool'
1436
# label.
1437
 
1438
 
1439
# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1440
# ----------------------------------------
1441
# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1442
m4_define([_LT_CONFIG_LIBTOOL_INIT],
1443
[m4_ifval([$1],
1444
          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1445
                     [$1
1446
])])])
1447
 
1448
# Initialize.
1449
m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1450
 
1451
 
1452
# _LT_CONFIG_LIBTOOL([COMMANDS])
1453
# ------------------------------
1454
# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1455
m4_define([_LT_CONFIG_LIBTOOL],
1456
[m4_ifval([$1],
1457
          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1458
                     [$1
1459
])])])
1460
 
1461
# Initialize.
1462
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1463
 
1464
 
1465
# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1466
# -----------------------------------------------------
1467
m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1468
[_LT_CONFIG_LIBTOOL([$1])
1469
_LT_CONFIG_LIBTOOL_INIT([$2])
1470
])
1471
 
1472
 
1473
# _LT_FORMAT_COMMENT([COMMENT])
1474
# -----------------------------
1475
# Add leading comment marks to the start of each line, and a trailing
1476
# full-stop to the whole comment if one is not present already.
1477
m4_define([_LT_FORMAT_COMMENT],
1478
[m4_ifval([$1], [
1479
m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1480
              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1481
)])
1482
 
1483
 
1484
 
1485
 
1486
 
1487
# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1488
# -------------------------------------------------------------------
1489
# CONFIGNAME is the name given to the value in the libtool script.
1490
# VARNAME is the (base) name used in the configure script.
1491
# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1492
# VARNAME.  Any other value will be used directly.
1493
m4_define([_LT_DECL],
1494
[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1495
    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1496
	[m4_ifval([$1], [$1], [$2])])
1497
    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1498
    m4_ifval([$4],
1499
	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1500
    lt_dict_add_subkey([lt_decl_dict], [$2],
1501
	[tagged?], [m4_ifval([$5], [yes], [no])])])
1502
])
1503
 
1504
 
1505
# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1506
# --------------------------------------------------------
1507
m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1508
 
1509
 
1510
# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1511
# ------------------------------------------------
1512
m4_define([lt_decl_tag_varnames],
1513
[_lt_decl_filter([tagged?], [yes], $@)])
1514
 
1515
 
1516
# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1517
# ---------------------------------------------------------
1518
m4_define([_lt_decl_filter],
1519
[m4_case([$#],
1520
  [0], [m4_fatal([$0: too few arguments: $#])],
1521
  [1], [m4_fatal([$0: too few arguments: $#: $1])],
1522
  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1523
  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1524
  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1525
])
1526
 
1527
 
1528
# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1529
# --------------------------------------------------
1530
m4_define([lt_decl_quote_varnames],
1531
[_lt_decl_filter([value], [1], $@)])
1532
 
1533
 
1534
# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1535
# ---------------------------------------------------
1536
m4_define([lt_decl_dquote_varnames],
1537
[_lt_decl_filter([value], [2], $@)])
1538
 
1539
 
1540
# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1541
# ---------------------------------------------------
1542
m4_define([lt_decl_varnames_tagged],
1543
[m4_assert([$# <= 2])dnl
1544
_$0(m4_quote(m4_default([$1], [[, ]])),
1545
    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1546
    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1547
m4_define([_lt_decl_varnames_tagged],
1548
[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1549
 
1550
 
1551
# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1552
# ------------------------------------------------
1553
m4_define([lt_decl_all_varnames],
1554
[_$0(m4_quote(m4_default([$1], [[, ]])),
1555
     m4_if([$2], [],
1556
	   m4_quote(lt_decl_varnames),
1557
	m4_quote(m4_shift($@))))[]dnl
1558
])
1559
m4_define([_lt_decl_all_varnames],
1560
[lt_join($@, lt_decl_varnames_tagged([$1],
1561
			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1562
])
1563
 
1564
 
1565
# _LT_CONFIG_STATUS_DECLARE([VARNAME])
1566
# ------------------------------------
1567
# Quote a variable value, and forward it to `config.status' so that its
1568
# declaration there will have the same value as in `configure'.  VARNAME
1569
# must have a single quote delimited value for this to work.
1570
m4_define([_LT_CONFIG_STATUS_DECLARE],
1571
[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
1572
 
1573
 
1574
# _LT_CONFIG_STATUS_DECLARATIONS
1575
# ------------------------------
1576
# We delimit libtool config variables with single quotes, so when
1577
# we write them to config.status, we have to be sure to quote all
1578
# embedded single quotes properly.  In configure, this macro expands
1579
# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1580
#
1581
#    ='`$ECHO "$" | $SED "$delay_single_quote_subst"`'
1582
m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1583
[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1584
    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1585
 
1586
 
1587
# _LT_LIBTOOL_TAGS
1588
# ----------------
1589
# Output comment and list of tags supported by the script
1590
m4_defun([_LT_LIBTOOL_TAGS],
1591
[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1592
available_tags="_LT_TAGS"dnl
1593
])
1594
 
1595
 
1596
# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1597
# -----------------------------------
1598
# Extract the dictionary values for VARNAME (optionally with TAG) and
1599
# expand to a commented shell variable setting:
1600
#
1601
#    # Some comment about what VAR is for.
1602
#    visible_name=$lt_internal_name
1603
m4_define([_LT_LIBTOOL_DECLARE],
1604
[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1605
					   [description])))[]dnl
1606
m4_pushdef([_libtool_name],
1607
    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1608
m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1609
    [0], [_libtool_name=[$]$1],
1610
    [1], [_libtool_name=$lt_[]$1],
1611
    [2], [_libtool_name=$lt_[]$1],
1612
    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1613
m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1614
])
1615
 
1616
 
1617
# _LT_LIBTOOL_CONFIG_VARS
1618
# -----------------------
1619
# Produce commented declarations of non-tagged libtool config variables
1620
# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1621
# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
1622
# section) are produced by _LT_LIBTOOL_TAG_VARS.
1623
m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1624
[m4_foreach([_lt_var],
1625
    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1626
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1627
 
1628
 
1629
# _LT_LIBTOOL_TAG_VARS(TAG)
1630
# -------------------------
1631
m4_define([_LT_LIBTOOL_TAG_VARS],
1632
[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1633
    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1634
 
1635
 
1636
# _LT_TAGVAR(VARNAME, [TAGNAME])
1637
# ------------------------------
1638
m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1639
 
1640
 
1641
# _LT_CONFIG_COMMANDS
1642
# -------------------
1643
# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
1644
# variables for single and double quote escaping we saved from calls
1645
# to _LT_DECL, we can put quote escaped variables declarations
1646
# into `config.status', and then the shell code to quote escape them in
1647
# for loops in `config.status'.  Finally, any additional code accumulated
1648
# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1649
m4_defun([_LT_CONFIG_COMMANDS],
1650
[AC_PROVIDE_IFELSE([LT_OUTPUT],
1651
	dnl If the libtool generation code has been placed in $CONFIG_LT,
1652
	dnl instead of duplicating it all over again into config.status,
1653
	dnl then we will have config.status run $CONFIG_LT later, so it
1654
	dnl needs to know what name is stored there:
1655
        [AC_CONFIG_COMMANDS([libtool],
1656
            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1657
    dnl If the libtool generation code is destined for config.status,
1658
    dnl expand the accumulated commands and init code now:
1659
    [AC_CONFIG_COMMANDS([libtool],
1660
        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1661
])#_LT_CONFIG_COMMANDS
1662
 
1663
 
1664
# Initialize.
1665
m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1666
[
1667
 
1668
# The HP-UX ksh and POSIX shell print the target directory to stdout
1669
# if CDPATH is set.
1670
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1671
 
1672
sed_quote_subst='$sed_quote_subst'
1673
double_quote_subst='$double_quote_subst'
1674
delay_variable_subst='$delay_variable_subst'
1675
_LT_CONFIG_STATUS_DECLARATIONS
1676
LTCC='$LTCC'
1677
LTCFLAGS='$LTCFLAGS'
1678
compiler='$compiler_DEFAULT'
1679
 
1680
# A function that is used when there is no print builtin or printf.
1681
func_fallback_echo ()
1682
{
1683
  eval 'cat <<_LTECHO_EOF
1684
\$[]1
1685
_LTECHO_EOF'
1686
}
1687
 
1688
# Quote evaled strings.
1689
for var in lt_decl_all_varnames([[ \
1690
]], lt_decl_quote_varnames); do
1691
    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1692
    *[[\\\\\\\`\\"\\\$]]*)
1693
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1694
      ;;
1695
    *)
1696
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1697
      ;;
1698
    esac
1699
done
1700
 
1701
# Double-quote double-evaled strings.
1702
for var in lt_decl_all_varnames([[ \
1703
]], lt_decl_dquote_varnames); do
1704
    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1705
    *[[\\\\\\\`\\"\\\$]]*)
1706
      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1707
      ;;
1708
    *)
1709
      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1710
      ;;
1711
    esac
1712
done
1713
 
1714
_LT_OUTPUT_LIBTOOL_INIT
1715
])
1716
 
1717
# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
1718
# ------------------------------------
1719
# Generate a child script FILE with all initialization necessary to
1720
# reuse the environment learned by the parent script, and make the
1721
# file executable.  If COMMENT is supplied, it is inserted after the
1722
# `#!' sequence but before initialization text begins.  After this
1723
# macro, additional text can be appended to FILE to form the body of
1724
# the child script.  The macro ends with non-zero status if the
1725
# file could not be fully written (such as if the disk is full).
1726
m4_ifdef([AS_INIT_GENERATED],
1727
[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
1728
[m4_defun([_LT_GENERATED_FILE_INIT],
1729
[m4_require([AS_PREPARE])]dnl
1730
[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
1731
[lt_write_fail=0
1732
cat >$1 <<_ASEOF || lt_write_fail=1
1733
#! $SHELL
1734
# Generated by $as_me.
1735
$2
1736
SHELL=\${CONFIG_SHELL-$SHELL}
1737
export SHELL
1738
_ASEOF
1739
cat >>$1 <<\_ASEOF || lt_write_fail=1
1740
AS_SHELL_SANITIZE
1741
_AS_PREPARE
1742
exec AS_MESSAGE_FD>&1
1743
_ASEOF
1744
test $lt_write_fail = 0 && chmod +x $1[]dnl
1745
m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
1746
 
1747
# LT_OUTPUT
1748
# ---------
1749
# This macro allows early generation of the libtool script (before
1750
# AC_OUTPUT is called), incase it is used in configure for compilation
1751
# tests.
1752
AC_DEFUN([LT_OUTPUT],
1753
[: ${CONFIG_LT=./config.lt}
1754
AC_MSG_NOTICE([creating $CONFIG_LT])
1755
_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
1756
[# Run this file to recreate a libtool stub with the current configuration.])
1757
 
1758
cat >>"$CONFIG_LT" <<\_LTEOF
1759
lt_cl_silent=false
1760
exec AS_MESSAGE_LOG_FD>>config.log
1761
{
1762
  echo
1763
  AS_BOX([Running $as_me.])
1764
} >&AS_MESSAGE_LOG_FD
1765
 
1766
lt_cl_help="\
1767
\`$as_me' creates a local libtool stub from the current configuration,
1768
for use in further configure time tests before the real libtool is
1769
generated.
1770
 
1771
Usage: $[0] [[OPTIONS]]
1772
 
1773
  -h, --help      print this help, then exit
1774
  -V, --version   print version number, then exit
1775
  -q, --quiet     do not print progress messages
1776
  -d, --debug     don't remove temporary files
1777
 
1778
Report bugs to ."
1779
 
1780
lt_cl_version="\
1781
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1782
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1783
configured by $[0], generated by m4_PACKAGE_STRING.
1784
 
1785
Copyright (C) 2011 Free Software Foundation, Inc.
1786
This config.lt script is free software; the Free Software Foundation
1787
gives unlimited permision to copy, distribute and modify it."
1788
 
1789
while test $[#] != 0
1790
do
1791
  case $[1] in
1792
    --version | --v* | -V )
1793
      echo "$lt_cl_version"; exit 0 ;;
1794
    --help | --h* | -h )
1795
      echo "$lt_cl_help"; exit 0 ;;
1796
    --debug | --d* | -d )
1797
      debug=: ;;
1798
    --quiet | --q* | --silent | --s* | -q )
1799
      lt_cl_silent=: ;;
1800
 
1801
    -*) AC_MSG_ERROR([unrecognized option: $[1]
1802
Try \`$[0] --help' for more information.]) ;;
1803
 
1804
    *) AC_MSG_ERROR([unrecognized argument: $[1]
1805
Try \`$[0] --help' for more information.]) ;;
1806
  esac
1807
  shift
1808
done
1809
 
1810
if $lt_cl_silent; then
1811
  exec AS_MESSAGE_FD>/dev/null
1812
fi
1813
_LTEOF
1814
 
1815
cat >>"$CONFIG_LT" <<_LTEOF
1816
_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1817
_LTEOF
1818
 
1819
cat >>"$CONFIG_LT" <<\_LTEOF
1820
AC_MSG_NOTICE([creating $ofile])
1821
_LT_OUTPUT_LIBTOOL_COMMANDS
1822
AS_EXIT(0)
1823
_LTEOF
1824
chmod +x "$CONFIG_LT"
1825
 
1826
# configure is writing to config.log, but config.lt does its own redirection,
1827
# appending to config.log, which fails on DOS, as config.log is still kept
1828
# open by configure.  Here we exec the FD to /dev/null, effectively closing
1829
# config.log, so it can be properly (re)opened and appended to by config.lt.
1830
lt_cl_success=:
1831
test "$silent" = yes &&
1832
  lt_config_lt_args="$lt_config_lt_args --quiet"
1833
exec AS_MESSAGE_LOG_FD>/dev/null
1834
$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1835
exec AS_MESSAGE_LOG_FD>>config.log
1836
$lt_cl_success || AS_EXIT(1)
1837
])# LT_OUTPUT
1838
 
1839
 
1840
# _LT_CONFIG(TAG)
1841
# ---------------
1842
# If TAG is the built-in tag, create an initial libtool script with a
1843
# default configuration from the untagged config vars.  Otherwise add code
1844
# to config.status for appending the configuration named by TAG from the
1845
# matching tagged config vars.
1846
m4_defun([_LT_CONFIG],
1847
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1848
_LT_CONFIG_SAVE_COMMANDS([
1849
  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1850
  m4_if(_LT_TAG, [C], [
1851
    # See if we are running on zsh, and set the options which allow our
1852
    # commands through without removal of \ escapes.
1853
    if test -n "${ZSH_VERSION+set}" ; then
1854
      setopt NO_GLOB_SUBST
1855
    fi
1856
 
1857
    cfgfile="${ofile}T"
1858
    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1859
    $RM "$cfgfile"
1860
 
1861
    cat <<_LT_EOF >> "$cfgfile"
1862
#! $SHELL
1863
 
1864
# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1865
# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1866
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1867
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
1868
#
1869
_LT_COPYING
1870
_LT_LIBTOOL_TAGS
1871
 
1872
# ### BEGIN LIBTOOL CONFIG
1873
_LT_LIBTOOL_CONFIG_VARS
1874
_LT_LIBTOOL_TAG_VARS
1875
# ### END LIBTOOL CONFIG
1876
 
1877
_LT_EOF
1878
 
1879
  case $host_os in
1880
  aix3*)
1881
    cat <<\_LT_EOF >> "$cfgfile"
1882
# AIX sometimes has problems with the GCC collect2 program.  For some
1883
# reason, if we set the COLLECT_NAMES environment variable, the problems
1884
# vanish in a puff of smoke.
1885
if test "X${COLLECT_NAMES+set}" != Xset; then
1886
  COLLECT_NAMES=
1887
  export COLLECT_NAMES
1888
fi
1889
_LT_EOF
1890
    ;;
1891
  esac
1892
 
1893
  _LT_PROG_LTMAIN
1894
 
1895
  # We use sed instead of cat because bash on DJGPP gets confused if
1896
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
1897
  # text mode, it properly converts lines to CR/LF.  This bash problem
1898
  # is reportedly fixed, but why not run on old versions too?
1899
  sed '$q' "$ltmain" >> "$cfgfile" \
1900
     || (rm -f "$cfgfile"; exit 1)
1901
 
1902
  _LT_PROG_REPLACE_SHELLFNS
1903
 
1904
   mv -f "$cfgfile" "$ofile" ||
1905
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1906
  chmod +x "$ofile"
1907
],
1908
[cat <<_LT_EOF >> "$ofile"
1909
 
1910
dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1911
dnl in a comment (ie after a #).
1912
# ### BEGIN LIBTOOL TAG CONFIG: $1
1913
_LT_LIBTOOL_TAG_VARS(_LT_TAG)
1914
# ### END LIBTOOL TAG CONFIG: $1
1915
_LT_EOF
1916
])dnl /m4_if
1917
],
1918
[m4_if([$1], [], [
1919
    PACKAGE='$PACKAGE'
1920
    VERSION='$VERSION'
1921
    TIMESTAMP='$TIMESTAMP'
1922
    RM='$RM'
1923
    ofile='$ofile'], [])
1924
])dnl /_LT_CONFIG_SAVE_COMMANDS
1925
])# _LT_CONFIG
1926
 
1927
 
1928
# LT_SUPPORTED_TAG(TAG)
1929
# ---------------------
1930
# Trace this macro to discover what tags are supported by the libtool
1931
# --tag option, using:
1932
#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
1933
AC_DEFUN([LT_SUPPORTED_TAG], [])
1934
 
1935
 
1936
# C support is built-in for now
1937
m4_define([_LT_LANG_C_enabled], [])
1938
m4_define([_LT_TAGS], [])
1939
 
1940
 
1941
# LT_LANG(LANG)
1942
# -------------
1943
# Enable libtool support for the given language if not already enabled.
1944
AC_DEFUN([LT_LANG],
1945
[AC_BEFORE([$0], [LT_OUTPUT])dnl
1946
m4_case([$1],
1947
  [C],			[_LT_LANG(C)],
1948
  [C++],		[_LT_LANG(CXX)],
1949
  [Go],			[_LT_LANG(GO)],
1950
  [Java],		[_LT_LANG(GCJ)],
1951
  [Fortran 77],		[_LT_LANG(F77)],
1952
  [Fortran],		[_LT_LANG(FC)],
1953
  [Windows Resource],	[_LT_LANG(RC)],
1954
  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
1955
    [_LT_LANG($1)],
1956
    [m4_fatal([$0: unsupported language: "$1"])])])dnl
1957
])# LT_LANG
1958
 
1959
 
1960
# _LT_LANG(LANGNAME)
1961
# ------------------
1962
m4_defun([_LT_LANG],
1963
[m4_ifdef([_LT_LANG_]$1[_enabled], [],
1964
  [LT_SUPPORTED_TAG([$1])dnl
1965
  m4_append([_LT_TAGS], [$1 ])dnl
1966
  m4_define([_LT_LANG_]$1[_enabled], [])dnl
1967
  _LT_LANG_$1_CONFIG($1)])dnl
1968
])# _LT_LANG
1969
 
1970
 
1971
m4_ifndef([AC_PROG_GO], [
1972
# NOTE: This macro has been submitted for inclusion into   #
1973
#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
1974
#  a released version of Autoconf we should remove this    #
1975
#  macro and use it instead.                               #
1976
m4_defun([AC_PROG_GO],
1977
[AC_LANG_PUSH(Go)dnl
1978
AC_ARG_VAR([GOC],     [Go compiler command])dnl
1979
AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
1980
_AC_ARG_VAR_LDFLAGS()dnl
1981
AC_CHECK_TOOL(GOC, gccgo)
1982
if test -z "$GOC"; then
1983
  if test -n "$ac_tool_prefix"; then
1984
    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
1985
  fi
1986
fi
1987
if test -z "$GOC"; then
1988
  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
1989
fi
1990
])#m4_defun
1991
])#m4_ifndef
1992
 
1993
 
1994
# _LT_LANG_DEFAULT_CONFIG
1995
# -----------------------
1996
m4_defun([_LT_LANG_DEFAULT_CONFIG],
1997
[AC_PROVIDE_IFELSE([AC_PROG_CXX],
1998
  [LT_LANG(CXX)],
1999
  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
2000
 
2001
AC_PROVIDE_IFELSE([AC_PROG_F77],
2002
  [LT_LANG(F77)],
2003
  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
2004
 
2005
AC_PROVIDE_IFELSE([AC_PROG_FC],
2006
  [LT_LANG(FC)],
2007
  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
2008
 
2009
dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
2010
dnl pulling things in needlessly.
2011
AC_PROVIDE_IFELSE([AC_PROG_GCJ],
2012
  [LT_LANG(GCJ)],
2013
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
2014
    [LT_LANG(GCJ)],
2015
    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
2016
      [LT_LANG(GCJ)],
2017
      [m4_ifdef([AC_PROG_GCJ],
2018
	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
2019
       m4_ifdef([A][M_PROG_GCJ],
2020
	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
2021
       m4_ifdef([LT_PROG_GCJ],
2022
	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
2023
 
2024
AC_PROVIDE_IFELSE([AC_PROG_GO],
2025
  [LT_LANG(GO)],
2026
  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
2027
 
2028
AC_PROVIDE_IFELSE([LT_PROG_RC],
2029
  [LT_LANG(RC)],
2030
  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
2031
])# _LT_LANG_DEFAULT_CONFIG
2032
 
2033
# Obsolete macros:
2034
AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
2035
AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
2036
AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
2037
AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
2038
AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
2039
dnl aclocal-1.4 backwards compatibility:
2040
dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
2041
dnl AC_DEFUN([AC_LIBTOOL_F77], [])
2042
dnl AC_DEFUN([AC_LIBTOOL_FC], [])
2043
dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
2044
dnl AC_DEFUN([AC_LIBTOOL_RC], [])
2045
 
2046
 
2047
# _LT_TAG_COMPILER
2048
# ----------------
2049
m4_defun([_LT_TAG_COMPILER],
2050
[AC_REQUIRE([AC_PROG_CC])dnl
2051
 
2052
_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
2053
_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
2054
_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
2055
_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
2056
 
2057
# If no C compiler was specified, use CC.
2058
LTCC=${LTCC-"$CC"}
2059
 
2060
# If no C compiler flags were specified, use CFLAGS.
2061
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
2062
 
2063
# Allow CC to be a program name with arguments.
2064
compiler=$CC
2065
])# _LT_TAG_COMPILER
2066
 
2067
 
2068
# _LT_COMPILER_BOILERPLATE
2069
# ------------------------
2070
# Check for compiler boilerplate output or warnings with
2071
# the simple compiler test code.
2072
m4_defun([_LT_COMPILER_BOILERPLATE],
2073
[m4_require([_LT_DECL_SED])dnl
2074
ac_outfile=conftest.$ac_objext
2075
echo "$lt_simple_compile_test_code" >conftest.$ac_ext
2076
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2077
_lt_compiler_boilerplate=`cat conftest.err`
2078
$RM conftest*
2079
])# _LT_COMPILER_BOILERPLATE
2080
 
2081
 
2082
# _LT_LINKER_BOILERPLATE
2083
# ----------------------
2084
# Check for linker boilerplate output or warnings with
2085
# the simple link test code.
2086
m4_defun([_LT_LINKER_BOILERPLATE],
2087
[m4_require([_LT_DECL_SED])dnl
2088
ac_outfile=conftest.$ac_objext
2089
echo "$lt_simple_link_test_code" >conftest.$ac_ext
2090
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2091
_lt_linker_boilerplate=`cat conftest.err`
2092
$RM -r conftest*
2093
])# _LT_LINKER_BOILERPLATE
2094
 
2095
# _LT_REQUIRED_DARWIN_CHECKS
2096
# -------------------------
2097
m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
2098
  case $host_os in
2099
    rhapsody* | darwin*)
2100
    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
2101
    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
2102
    AC_CHECK_TOOL([LIPO], [lipo], [:])
2103
    AC_CHECK_TOOL([OTOOL], [otool], [:])
2104
    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
2105
    _LT_DECL([], [DSYMUTIL], [1],
2106
      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
2107
    _LT_DECL([], [NMEDIT], [1],
2108
      [Tool to change global to local symbols on Mac OS X])
2109
    _LT_DECL([], [LIPO], [1],
2110
      [Tool to manipulate fat objects and archives on Mac OS X])
2111
    _LT_DECL([], [OTOOL], [1],
2112
      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
2113
    _LT_DECL([], [OTOOL64], [1],
2114
      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
2115
 
2116
    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
2117
      [lt_cv_apple_cc_single_mod=no
2118
      if test -z "${LT_MULTI_MODULE}"; then
2119
	# By default we will add the -single_module flag. You can override
2120
	# by either setting the environment variable LT_MULTI_MODULE
2121
	# non-empty at configure time, or by adding -multi_module to the
2122
	# link flags.
2123
	rm -rf libconftest.dylib*
2124
	echo "int foo(void){return 1;}" > conftest.c
2125
	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2126
-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
2127
	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2128
	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
2129
        _lt_result=$?
2130
	# If there is a non-empty error log, and "single_module"
2131
	# appears in it, assume the flag caused a linker warning
2132
        if test -s conftest.err && $GREP single_module conftest.err; then
2133
	  cat conftest.err >&AS_MESSAGE_LOG_FD
2134
	# Otherwise, if the output was created with a 0 exit code from
2135
	# the compiler, it worked.
2136
	elif test -f libconftest.dylib && test $_lt_result -eq 0; then
2137
	  lt_cv_apple_cc_single_mod=yes
2138
	else
2139
	  cat conftest.err >&AS_MESSAGE_LOG_FD
2140
	fi
2141
	rm -rf libconftest.dylib*
2142
	rm -f conftest.*
2143
      fi])
2144
 
2145
    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
2146
      [lt_cv_ld_exported_symbols_list],
2147
      [lt_cv_ld_exported_symbols_list=no
2148
      save_LDFLAGS=$LDFLAGS
2149
      echo "_main" > conftest.sym
2150
      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
2151
      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2152
	[lt_cv_ld_exported_symbols_list=yes],
2153
	[lt_cv_ld_exported_symbols_list=no])
2154
	LDFLAGS="$save_LDFLAGS"
2155
    ])
2156
 
2157
    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
2158
      [lt_cv_ld_force_load=no
2159
      cat > conftest.c << _LT_EOF
2160
int forced_loaded() { return 2;}
2161
_LT_EOF
2162
      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
2163
      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
2164
      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
2165
      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
2166
      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
2167
      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
2168
      cat > conftest.c << _LT_EOF
2169
int main() { return 0;}
2170
_LT_EOF
2171
      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
2172
      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
2173
      _lt_result=$?
2174
      if test -s conftest.err && $GREP force_load conftest.err; then
2175
	cat conftest.err >&AS_MESSAGE_LOG_FD
2176
      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
2177
	lt_cv_ld_force_load=yes
2178
      else
2179
	cat conftest.err >&AS_MESSAGE_LOG_FD
2180
      fi
2181
        rm -f conftest.err libconftest.a conftest conftest.c
2182
        rm -rf conftest.dSYM
2183
    ])
2184
    case $host_os in
2185
    rhapsody* | darwin1.[[012]])
2186
      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2187
    darwin1.*)
2188
      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2189
    darwin*) # darwin 5.x on
2190
      # if running on 10.5 or later, the deployment target defaults
2191
      # to the OS version, if on x86, and 10.4, the deployment
2192
      # target defaults to 10.4. Don't you love it?
2193
      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2194
	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2195
	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2196
	10.[[012]]*)
2197
	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2198
	10.*)
2199
	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2200
      esac
2201
    ;;
2202
  esac
2203
    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2204
      _lt_dar_single_mod='$single_module'
2205
    fi
2206
    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2207
      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2208
    else
2209
      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2210
    fi
2211
    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
2212
      _lt_dsymutil='~$DSYMUTIL $lib || :'
2213
    else
2214
      _lt_dsymutil=
2215
    fi
2216
    ;;
2217
  esac
2218
])
2219
 
2220
 
2221
# _LT_DARWIN_LINKER_FEATURES([TAG])
2222
# ---------------------------------
2223
# Checks for linker and compiler features on darwin
2224
m4_defun([_LT_DARWIN_LINKER_FEATURES],
2225
[
2226
  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2227
  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2228
  _LT_TAGVAR(hardcode_direct, $1)=no
2229
  _LT_TAGVAR(hardcode_automatic, $1)=yes
2230
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2231
  if test "$lt_cv_ld_force_load" = "yes"; then
2232
    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
2233
    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
2234
                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
2235
  else
2236
    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2237
  fi
2238
  _LT_TAGVAR(link_all_deplibs, $1)=yes
2239
  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
2240
  case $cc_basename in
2241
     ifort*) _lt_dar_can_shared=yes ;;
2242
     *) _lt_dar_can_shared=$GCC ;;
2243
  esac
2244
  if test "$_lt_dar_can_shared" = "yes"; then
2245
    output_verbose_link_cmd=func_echo_all
2246
    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
2247
    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2248
    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
2249
    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
2250
    m4_if([$1], [CXX],
2251
[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2252
      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
2253
      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
2254
    fi
2255
],[])
2256
  else
2257
  _LT_TAGVAR(ld_shlibs, $1)=no
2258
  fi
2259
])
2260
 
2261
# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
2262
# ----------------------------------
2263
# Links a minimal program and checks the executable
2264
# for the system default hardcoded library path. In most cases,
2265
# this is /usr/lib:/lib, but when the MPI compilers are used
2266
# the location of the communication and MPI libs are included too.
2267
# If we don't find anything, use the default library path according
2268
# to the aix ld manual.
2269
# Store the results from the different compilers for each TAGNAME.
2270
# Allow to override them for all tags through lt_cv_aix_libpath.
2271
m4_defun([_LT_SYS_MODULE_PATH_AIX],
2272
[m4_require([_LT_DECL_SED])dnl
2273
if test "${lt_cv_aix_libpath+set}" = set; then
2274
  aix_libpath=$lt_cv_aix_libpath
2275
else
2276
  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
2277
  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
2278
  lt_aix_libpath_sed='[
2279
      /Import File Strings/,/^$/ {
2280
	  /^0/ {
2281
	      s/^0  *\([^ ]*\) *$/\1/
2282
	      p
2283
	  }
2284
      }]'
2285
  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2286
  # Check for a 64-bit object if we didn't find anything.
2287
  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2288
    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2289
  fi],[])
2290
  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2291
    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
2292
  fi
2293
  ])
2294
  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
2295
fi
2296
])# _LT_SYS_MODULE_PATH_AIX
2297
 
2298
 
2299
# _LT_SHELL_INIT(ARG)
2300
# -------------------
2301
m4_define([_LT_SHELL_INIT],
2302
[m4_divert_text([M4SH-INIT], [$1
2303
])])# _LT_SHELL_INIT
2304
 
2305
 
2306
 
2307
# _LT_PROG_ECHO_BACKSLASH
2308
# -----------------------
2309
# Find how we can fake an echo command that does not interpret backslash.
2310
# In particular, with Autoconf 2.60 or later we add some code to the start
2311
# of the generated configure script which will find a shell with a builtin
2312
# printf (which we can use as an echo command).
2313
m4_defun([_LT_PROG_ECHO_BACKSLASH],
2314
[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2315
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2316
ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2317
 
2318
AC_MSG_CHECKING([how to print strings])
2319
# Test print first, because it will be a builtin if present.
2320
if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
2321
   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
2322
  ECHO='print -r --'
2323
elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
2324
  ECHO='printf %s\n'
2325
else
2326
  # Use this function as a fallback that always works.
2327
  func_fallback_echo ()
2328
  {
2329
    eval 'cat <<_LTECHO_EOF
2330
$[]1
2331
_LTECHO_EOF'
2332
  }
2333
  ECHO='func_fallback_echo'
2334
fi
2335
 
2336
# func_echo_all arg...
2337
# Invoke $ECHO with all args, space-separated.
2338
func_echo_all ()
2339
{
2340
    $ECHO "$*"
2341
}
2342
 
2343
case "$ECHO" in
2344
  printf*) AC_MSG_RESULT([printf]) ;;
2345
  print*) AC_MSG_RESULT([print -r]) ;;
2346
  *) AC_MSG_RESULT([cat]) ;;
2347
esac
2348
 
2349
m4_ifdef([_AS_DETECT_SUGGESTED],
2350
[_AS_DETECT_SUGGESTED([
2351
  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
2352
    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2353
    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2354
    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2355
    PATH=/empty FPATH=/empty; export PATH FPATH
2356
    test "X`printf %s $ECHO`" = "X$ECHO" \
2357
      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
2358
 
2359
_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2360
_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
2361
])# _LT_PROG_ECHO_BACKSLASH
2362
 
2363
 
2364
# _LT_WITH_SYSROOT
2365
# ----------------
2366
AC_DEFUN([_LT_WITH_SYSROOT],
2367
[AC_MSG_CHECKING([for sysroot])
2368
AC_ARG_WITH([sysroot],
2369
[  --with-sysroot[=DIR] Search for dependent libraries within DIR
2370
                        (or the compiler's sysroot if not specified).],
2371
[], [with_sysroot=no])
2372
 
2373
dnl lt_sysroot will always be passed unquoted.  We quote it here
2374
dnl in case the user passed a directory name.
2375
lt_sysroot=
2376
case ${with_sysroot} in #(
2377
 yes)
2378
   if test "$GCC" = yes; then
2379
     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
2380
   fi
2381
   ;; #(
2382
 /*)
2383
   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
2384
   ;; #(
2385
 no|'')
2386
   ;; #(
2387
 *)
2388
   AC_MSG_RESULT([${with_sysroot}])
2389
   AC_MSG_ERROR([The sysroot must be an absolute path.])
2390
   ;;
2391
esac
2392
 
2393
 AC_MSG_RESULT([${lt_sysroot:-no}])
2394
_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
2395
[dependent libraries, and in which our libraries should be installed.])])
2396
 
2397
# _LT_ENABLE_LOCK
2398
# ---------------
2399
m4_defun([_LT_ENABLE_LOCK],
2400
[AC_ARG_ENABLE([libtool-lock],
2401
  [AS_HELP_STRING([--disable-libtool-lock],
2402
    [avoid locking (might break parallel builds)])])
2403
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2404
 
2405
# Some flags need to be propagated to the compiler or linker for good
2406
# libtool support.
2407
case $host in
2408
ia64-*-hpux*)
2409
  # Find out which ABI we are using.
2410
  echo 'int i;' > conftest.$ac_ext
2411
  if AC_TRY_EVAL(ac_compile); then
2412
    case `/usr/bin/file conftest.$ac_objext` in
2413
      *ELF-32*)
2414
	HPUX_IA64_MODE="32"
2415
	;;
2416
      *ELF-64*)
2417
	HPUX_IA64_MODE="64"
2418
	;;
2419
    esac
2420
  fi
2421
  rm -rf conftest*
2422
  ;;
2423
*-*-irix6*)
2424
  # Find out which ABI we are using.
2425
  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
2426
  if AC_TRY_EVAL(ac_compile); then
2427
    if test "$lt_cv_prog_gnu_ld" = yes; then
2428
      case `/usr/bin/file conftest.$ac_objext` in
2429
	*32-bit*)
2430
	  LD="${LD-ld} -melf32bsmip"
2431
	  ;;
2432
	*N32*)
2433
	  LD="${LD-ld} -melf32bmipn32"
2434
	  ;;
2435
	*64-bit*)
2436
	  LD="${LD-ld} -melf64bmip"
2437
	;;
2438
      esac
2439
    else
2440
      case `/usr/bin/file conftest.$ac_objext` in
2441
	*32-bit*)
2442
	  LD="${LD-ld} -32"
2443
	  ;;
2444
	*N32*)
2445
	  LD="${LD-ld} -n32"
2446
	  ;;
2447
	*64-bit*)
2448
	  LD="${LD-ld} -64"
2449
	  ;;
2450
      esac
2451
    fi
2452
  fi
2453
  rm -rf conftest*
2454
  ;;
2455
 
2456
x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
2457
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2458
  # Find out which ABI we are using.
2459
  echo 'int i;' > conftest.$ac_ext
2460
  if AC_TRY_EVAL(ac_compile); then
2461
    case `/usr/bin/file conftest.o` in
2462
      *32-bit*)
2463
	case $host in
2464
	  x86_64-*kfreebsd*-gnu)
2465
	    LD="${LD-ld} -m elf_i386_fbsd"
2466
	    ;;
2467
	  x86_64-*linux*)
2468
	    case `/usr/bin/file conftest.o` in
2469
	      *x86-64*)
2470
		LD="${LD-ld} -m elf32_x86_64"
2471
		;;
2472
	      *)
2473
		LD="${LD-ld} -m elf_i386"
2474
		;;
2475
	    esac
2476
	    ;;
2477
	  powerpc64le-*)
2478
	    LD="${LD-ld} -m elf32lppclinux"
2479
	    ;;
2480
	  powerpc64-*)
2481
	    LD="${LD-ld} -m elf32ppclinux"
2482
	    ;;
2483
	  s390x-*linux*)
2484
	    LD="${LD-ld} -m elf_s390"
2485
	    ;;
2486
	  sparc64-*linux*)
2487
	    LD="${LD-ld} -m elf32_sparc"
2488
	    ;;
2489
	esac
2490
	;;
2491
      *64-bit*)
2492
	case $host in
2493
	  x86_64-*kfreebsd*-gnu)
2494
	    LD="${LD-ld} -m elf_x86_64_fbsd"
2495
	    ;;
2496
	  x86_64-*linux*)
2497
	    LD="${LD-ld} -m elf_x86_64"
2498
	    ;;
2499
	  powerpcle-*)
2500
	    LD="${LD-ld} -m elf64lppc"
2501
	    ;;
2502
	  powerpc-*)
2503
	    LD="${LD-ld} -m elf64ppc"
2504
	    ;;
2505
	  s390*-*linux*|s390*-*tpf*)
2506
	    LD="${LD-ld} -m elf64_s390"
2507
	    ;;
2508
	  sparc*-*linux*)
2509
	    LD="${LD-ld} -m elf64_sparc"
2510
	    ;;
2511
	esac
2512
	;;
2513
    esac
2514
  fi
2515
  rm -rf conftest*
2516
  ;;
2517
 
2518
*-*-sco3.2v5*)
2519
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2520
  SAVE_CFLAGS="$CFLAGS"
2521
  CFLAGS="$CFLAGS -belf"
2522
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2523
    [AC_LANG_PUSH(C)
2524
     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2525
     AC_LANG_POP])
2526
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2527
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2528
    CFLAGS="$SAVE_CFLAGS"
2529
  fi
2530
  ;;
2531
*-*solaris*)
2532
  # Find out which ABI we are using.
2533
  echo 'int i;' > conftest.$ac_ext
2534
  if AC_TRY_EVAL(ac_compile); then
2535
    case `/usr/bin/file conftest.o` in
2536
    *64-bit*)
2537
      case $lt_cv_prog_gnu_ld in
2538
      yes*)
2539
        case $host in
2540
        i?86-*-solaris*)
2541
          LD="${LD-ld} -m elf_x86_64"
2542
          ;;
2543
        sparc*-*-solaris*)
2544
          LD="${LD-ld} -m elf64_sparc"
2545
          ;;
2546
        esac
2547
        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
2548
        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
2549
          LD="${LD-ld}_sol2"
2550
        fi
2551
        ;;
2552
      *)
2553
	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2554
	  LD="${LD-ld} -64"
2555
	fi
2556
	;;
2557
      esac
2558
      ;;
2559
    esac
2560
  fi
2561
  rm -rf conftest*
2562
  ;;
2563
esac
2564
 
2565
need_locks="$enable_libtool_lock"
2566
])# _LT_ENABLE_LOCK
2567
 
2568
 
2569
# _LT_PROG_AR
2570
# -----------
2571
m4_defun([_LT_PROG_AR],
2572
[AC_CHECK_TOOLS(AR, [ar], false)
2573
: ${AR=ar}
2574
: ${AR_FLAGS=cru}
2575
_LT_DECL([], [AR], [1], [The archiver])
2576
_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
2577
 
2578
AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
2579
  [lt_cv_ar_at_file=no
2580
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
2581
     [echo conftest.$ac_objext > conftest.lst
2582
      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
2583
      AC_TRY_EVAL([lt_ar_try])
2584
      if test "$ac_status" -eq 0; then
2585
	# Ensure the archiver fails upon bogus file names.
2586
	rm -f conftest.$ac_objext libconftest.a
2587
	AC_TRY_EVAL([lt_ar_try])
2588
	if test "$ac_status" -ne 0; then
2589
          lt_cv_ar_at_file=@
2590
        fi
2591
      fi
2592
      rm -f conftest.* libconftest.a
2593
     ])
2594
  ])
2595
 
2596
if test "x$lt_cv_ar_at_file" = xno; then
2597
  archiver_list_spec=
2598
else
2599
  archiver_list_spec=$lt_cv_ar_at_file
2600
fi
2601
_LT_DECL([], [archiver_list_spec], [1],
2602
  [How to feed a file listing to the archiver])
2603
])# _LT_PROG_AR
2604
 
2605
 
2606
# _LT_CMD_OLD_ARCHIVE
2607
# -------------------
2608
m4_defun([_LT_CMD_OLD_ARCHIVE],
2609
[_LT_PROG_AR
2610
 
2611
AC_CHECK_TOOL(STRIP, strip, :)
2612
test -z "$STRIP" && STRIP=:
2613
_LT_DECL([], [STRIP], [1], [A symbol stripping program])
2614
 
2615
AC_CHECK_TOOL(RANLIB, ranlib, :)
2616
test -z "$RANLIB" && RANLIB=:
2617
_LT_DECL([], [RANLIB], [1],
2618
    [Commands used to install an old-style archive])
2619
 
2620
# Determine commands to create old-style static archives.
2621
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2622
old_postinstall_cmds='chmod 644 $oldlib'
2623
old_postuninstall_cmds=
2624
 
2625
if test -n "$RANLIB"; then
2626
  case $host_os in
2627
  openbsd*)
2628
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
2629
    ;;
2630
  *)
2631
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
2632
    ;;
2633
  esac
2634
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
2635
fi
2636
 
2637
case $host_os in
2638
  darwin*)
2639
    lock_old_archive_extraction=yes ;;
2640
  *)
2641
    lock_old_archive_extraction=no ;;
2642
esac
2643
_LT_DECL([], [old_postinstall_cmds], [2])
2644
_LT_DECL([], [old_postuninstall_cmds], [2])
2645
_LT_TAGDECL([], [old_archive_cmds], [2],
2646
    [Commands used to build an old-style archive])
2647
_LT_DECL([], [lock_old_archive_extraction], [0],
2648
    [Whether to use a lock for old archive extraction])
2649
])# _LT_CMD_OLD_ARCHIVE
2650
 
2651
 
2652
# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2653
#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2654
# ----------------------------------------------------------------
2655
# Check whether the given compiler option works
2656
AC_DEFUN([_LT_COMPILER_OPTION],
2657
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2658
m4_require([_LT_DECL_SED])dnl
2659
AC_CACHE_CHECK([$1], [$2],
2660
  [$2=no
2661
   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2662
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2663
   lt_compiler_flag="$3"
2664
   # Insert the option either (1) after the last *FLAGS variable, or
2665
   # (2) before a word containing "conftest.", or (3) at the end.
2666
   # Note that $ac_compile itself does not contain backslashes and begins
2667
   # with a dollar sign (not a hyphen), so the echo should work correctly.
2668
   # The option is referenced via a variable to avoid confusing sed.
2669
   lt_compile=`echo "$ac_compile" | $SED \
2670
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2671
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2672
   -e 's:$: $lt_compiler_flag:'`
2673
   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2674
   (eval "$lt_compile" 2>conftest.err)
2675
   ac_status=$?
2676
   cat conftest.err >&AS_MESSAGE_LOG_FD
2677
   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2678
   if (exit $ac_status) && test -s "$ac_outfile"; then
2679
     # The compiler can only warn and ignore the option if not recognized
2680
     # So say no if there are warnings other than the usual output.
2681
     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
2682
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2683
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2684
       $2=yes
2685
     fi
2686
   fi
2687
   $RM conftest*
2688
])
2689
 
2690
if test x"[$]$2" = xyes; then
2691
    m4_if([$5], , :, [$5])
2692
else
2693
    m4_if([$6], , :, [$6])
2694
fi
2695
])# _LT_COMPILER_OPTION
2696
 
2697
# Old name:
2698
AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2699
dnl aclocal-1.4 backwards compatibility:
2700
dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2701
 
2702
 
2703
# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2704
#                  [ACTION-SUCCESS], [ACTION-FAILURE])
2705
# ----------------------------------------------------
2706
# Check whether the given linker option works
2707
AC_DEFUN([_LT_LINKER_OPTION],
2708
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2709
m4_require([_LT_DECL_SED])dnl
2710
AC_CACHE_CHECK([$1], [$2],
2711
  [$2=no
2712
   save_LDFLAGS="$LDFLAGS"
2713
   LDFLAGS="$LDFLAGS $3"
2714
   echo "$lt_simple_link_test_code" > conftest.$ac_ext
2715
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2716
     # The linker can only warn and ignore the option if not recognized
2717
     # So say no if there are warnings
2718
     if test -s conftest.err; then
2719
       # Append any errors to the config.log.
2720
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
2721
       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
2722
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2723
       if diff conftest.exp conftest.er2 >/dev/null; then
2724
         $2=yes
2725
       fi
2726
     else
2727
       $2=yes
2728
     fi
2729
   fi
2730
   $RM -r conftest*
2731
   LDFLAGS="$save_LDFLAGS"
2732
])
2733
 
2734
if test x"[$]$2" = xyes; then
2735
    m4_if([$4], , :, [$4])
2736
else
2737
    m4_if([$5], , :, [$5])
2738
fi
2739
])# _LT_LINKER_OPTION
2740
 
2741
# Old name:
2742
AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2743
dnl aclocal-1.4 backwards compatibility:
2744
dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2745
 
2746
 
2747
# LT_CMD_MAX_LEN
2748
#---------------
2749
AC_DEFUN([LT_CMD_MAX_LEN],
2750
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2751
# find the maximum length of command line arguments
2752
AC_MSG_CHECKING([the maximum length of command line arguments])
2753
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2754
  i=0
2755
  teststring="ABCD"
2756
 
2757
  case $build_os in
2758
  msdosdjgpp*)
2759
    # On DJGPP, this test can blow up pretty badly due to problems in libc
2760
    # (any single argument exceeding 2000 bytes causes a buffer overrun
2761
    # during glob expansion).  Even if it were fixed, the result of this
2762
    # check would be larger than it should be.
2763
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2764
    ;;
2765
 
2766
  gnu*)
2767
    # Under GNU Hurd, this test is not required because there is
2768
    # no limit to the length of command line arguments.
2769
    # Libtool will interpret -1 as no limit whatsoever
2770
    lt_cv_sys_max_cmd_len=-1;
2771
    ;;
2772
 
2773
  cygwin* | mingw* | cegcc*)
2774
    # On Win9x/ME, this test blows up -- it succeeds, but takes
2775
    # about 5 minutes as the teststring grows exponentially.
2776
    # Worse, since 9x/ME are not pre-emptively multitasking,
2777
    # you end up with a "frozen" computer, even though with patience
2778
    # the test eventually succeeds (with a max line length of 256k).
2779
    # Instead, let's just punt: use the minimum linelength reported by
2780
    # all of the supported platforms: 8192 (on NT/2K/XP).
2781
    lt_cv_sys_max_cmd_len=8192;
2782
    ;;
2783
 
2784
  mint*)
2785
    # On MiNT this can take a long time and run out of memory.
2786
    lt_cv_sys_max_cmd_len=8192;
2787
    ;;
2788
 
2789
  amigaos*)
2790
    # On AmigaOS with pdksh, this test takes hours, literally.
2791
    # So we just punt and use a minimum line length of 8192.
2792
    lt_cv_sys_max_cmd_len=8192;
2793
    ;;
2794
 
2795
  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2796
    # This has been around since 386BSD, at least.  Likely further.
2797
    if test -x /sbin/sysctl; then
2798
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2799
    elif test -x /usr/sbin/sysctl; then
2800
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2801
    else
2802
      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
2803
    fi
2804
    # And add a safety zone
2805
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2806
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2807
    ;;
2808
 
2809
  interix*)
2810
    # We know the value 262144 and hardcode it with a safety zone (like BSD)
2811
    lt_cv_sys_max_cmd_len=196608
2812
    ;;
2813
 
2814
  os2*)
2815
    # The test takes a long time on OS/2.
2816
    lt_cv_sys_max_cmd_len=8192
2817
    ;;
2818
 
2819
  osf*)
2820
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2821
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2822
    # nice to cause kernel panics so lets avoid the loop below.
2823
    # First set a reasonable default.
2824
    lt_cv_sys_max_cmd_len=16384
2825
    #
2826
    if test -x /sbin/sysconfig; then
2827
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2828
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
2829
      esac
2830
    fi
2831
    ;;
2832
  sco3.2v5*)
2833
    lt_cv_sys_max_cmd_len=102400
2834
    ;;
2835
  sysv5* | sco5v6* | sysv4.2uw2*)
2836
    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2837
    if test -n "$kargmax"; then
2838
      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
2839
    else
2840
      lt_cv_sys_max_cmd_len=32768
2841
    fi
2842
    ;;
2843
  *)
2844
    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2845
    if test -n "$lt_cv_sys_max_cmd_len" && \
2846
	test undefined != "$lt_cv_sys_max_cmd_len"; then
2847
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2848
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2849
    else
2850
      # Make teststring a little bigger before we do anything with it.
2851
      # a 1K string should be a reasonable start.
2852
      for i in 1 2 3 4 5 6 7 8 ; do
2853
        teststring=$teststring$teststring
2854
      done
2855
      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2856
      # If test is not a shell built-in, we'll probably end up computing a
2857
      # maximum length that is only half of the actual maximum length, but
2858
      # we can't tell.
2859
      while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
2860
	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
2861
	      test $i != 17 # 1/2 MB should be enough
2862
      do
2863
        i=`expr $i + 1`
2864
        teststring=$teststring$teststring
2865
      done
2866
      # Only check the string length outside the loop.
2867
      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2868
      teststring=
2869
      # Add a significant safety factor because C++ compilers can tack on
2870
      # massive amounts of additional arguments before passing them to the
2871
      # linker.  It appears as though 1/2 is a usable value.
2872
      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2873
    fi
2874
    ;;
2875
  esac
2876
])
2877
if test -n $lt_cv_sys_max_cmd_len ; then
2878
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2879
else
2880
  AC_MSG_RESULT(none)
2881
fi
2882
max_cmd_len=$lt_cv_sys_max_cmd_len
2883
_LT_DECL([], [max_cmd_len], [0],
2884
    [What is the maximum length of a command?])
2885
])# LT_CMD_MAX_LEN
2886
 
2887
# Old name:
2888
AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2889
dnl aclocal-1.4 backwards compatibility:
2890
dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2891
 
2892
 
2893
# _LT_HEADER_DLFCN
2894
# ----------------
2895
m4_defun([_LT_HEADER_DLFCN],
2896
[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2897
])# _LT_HEADER_DLFCN
2898
 
2899
 
2900
# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2901
#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2902
# ----------------------------------------------------------------
2903
m4_defun([_LT_TRY_DLOPEN_SELF],
2904
[m4_require([_LT_HEADER_DLFCN])dnl
2905
if test "$cross_compiling" = yes; then :
2906
  [$4]
2907
else
2908
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2909
  lt_status=$lt_dlunknown
2910
  cat > conftest.$ac_ext <<_LT_EOF
2911
[#line $LINENO "configure"
2912
#include "confdefs.h"
2913
 
2914
#if HAVE_DLFCN_H
2915
#include 
2916
#endif
2917
 
2918
#include 
2919
 
2920
#ifdef RTLD_GLOBAL
2921
#  define LT_DLGLOBAL		RTLD_GLOBAL
2922
#else
2923
#  ifdef DL_GLOBAL
2924
#    define LT_DLGLOBAL		DL_GLOBAL
2925
#  else
2926
#    define LT_DLGLOBAL		0
2927
#  endif
2928
#endif
2929
 
2930
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2931
   find out it does not work in some platform. */
2932
#ifndef LT_DLLAZY_OR_NOW
2933
#  ifdef RTLD_LAZY
2934
#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
2935
#  else
2936
#    ifdef DL_LAZY
2937
#      define LT_DLLAZY_OR_NOW		DL_LAZY
2938
#    else
2939
#      ifdef RTLD_NOW
2940
#        define LT_DLLAZY_OR_NOW	RTLD_NOW
2941
#      else
2942
#        ifdef DL_NOW
2943
#          define LT_DLLAZY_OR_NOW	DL_NOW
2944
#        else
2945
#          define LT_DLLAZY_OR_NOW	0
2946
#        endif
2947
#      endif
2948
#    endif
2949
#  endif
2950
#endif
2951
 
2952
/* When -fvisbility=hidden is used, assume the code has been annotated
2953
   correspondingly for the symbols needed.  */
2954
#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
2955
int fnord () __attribute__((visibility("default")));
2956
#endif
2957
 
2958
int fnord () { return 42; }
2959
int main ()
2960
{
2961
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2962
  int status = $lt_dlunknown;
2963
 
2964
  if (self)
2965
    {
2966
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2967
      else
2968
        {
2969
	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
2970
          else puts (dlerror ());
2971
	}
2972
      /* dlclose (self); */
2973
    }
2974
  else
2975
    puts (dlerror ());
2976
 
2977
  return status;
2978
}]
2979
_LT_EOF
2980
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2981
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2982
    lt_status=$?
2983
    case x$lt_status in
2984
      x$lt_dlno_uscore) $1 ;;
2985
      x$lt_dlneed_uscore) $2 ;;
2986
      x$lt_dlunknown|x*) $3 ;;
2987
    esac
2988
  else :
2989
    # compilation failed
2990
    $3
2991
  fi
2992
fi
2993
rm -fr conftest*
2994
])# _LT_TRY_DLOPEN_SELF
2995
 
2996
 
2997
# LT_SYS_DLOPEN_SELF
2998
# ------------------
2999
AC_DEFUN([LT_SYS_DLOPEN_SELF],
3000
[m4_require([_LT_HEADER_DLFCN])dnl
3001
if test "x$enable_dlopen" != xyes; then
3002
  enable_dlopen=unknown
3003
  enable_dlopen_self=unknown
3004
  enable_dlopen_self_static=unknown
3005
else
3006
  lt_cv_dlopen=no
3007
  lt_cv_dlopen_libs=
3008
 
3009
  case $host_os in
3010
  beos*)
3011
    lt_cv_dlopen="load_add_on"
3012
    lt_cv_dlopen_libs=
3013
    lt_cv_dlopen_self=yes
3014
    ;;
3015
 
3016
  mingw* | pw32* | cegcc*)
3017
    lt_cv_dlopen="LoadLibrary"
3018
    lt_cv_dlopen_libs=
3019
    ;;
3020
 
3021
  cygwin*)
3022
    lt_cv_dlopen="dlopen"
3023
    lt_cv_dlopen_libs=
3024
    ;;
3025
 
3026
  darwin*)
3027
  # if libdl is installed we need to link against it
3028
    AC_CHECK_LIB([dl], [dlopen],
3029
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
3030
    lt_cv_dlopen="dyld"
3031
    lt_cv_dlopen_libs=
3032
    lt_cv_dlopen_self=yes
3033
    ])
3034
    ;;
3035
 
3036
  *)
3037
    AC_CHECK_FUNC([shl_load],
3038
	  [lt_cv_dlopen="shl_load"],
3039
      [AC_CHECK_LIB([dld], [shl_load],
3040
	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
3041
	[AC_CHECK_FUNC([dlopen],
3042
	      [lt_cv_dlopen="dlopen"],
3043
	  [AC_CHECK_LIB([dl], [dlopen],
3044
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
3045
	    [AC_CHECK_LIB([svld], [dlopen],
3046
		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
3047
	      [AC_CHECK_LIB([dld], [dld_link],
3048
		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
3049
	      ])
3050
	    ])
3051
	  ])
3052
	])
3053
      ])
3054
    ;;
3055
  esac
3056
 
3057
  if test "x$lt_cv_dlopen" != xno; then
3058
    enable_dlopen=yes
3059
  else
3060
    enable_dlopen=no
3061
  fi
3062
 
3063
  case $lt_cv_dlopen in
3064
  dlopen)
3065
    save_CPPFLAGS="$CPPFLAGS"
3066
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
3067
 
3068
    save_LDFLAGS="$LDFLAGS"
3069
    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
3070
 
3071
    save_LIBS="$LIBS"
3072
    LIBS="$lt_cv_dlopen_libs $LIBS"
3073
 
3074
    AC_CACHE_CHECK([whether a program can dlopen itself],
3075
	  lt_cv_dlopen_self, [dnl
3076
	  _LT_TRY_DLOPEN_SELF(
3077
	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
3078
	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
3079
    ])
3080
 
3081
    if test "x$lt_cv_dlopen_self" = xyes; then
3082
      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
3083
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
3084
	  lt_cv_dlopen_self_static, [dnl
3085
	  _LT_TRY_DLOPEN_SELF(
3086
	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
3087
	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
3088
      ])
3089
    fi
3090
 
3091
    CPPFLAGS="$save_CPPFLAGS"
3092
    LDFLAGS="$save_LDFLAGS"
3093
    LIBS="$save_LIBS"
3094
    ;;
3095
  esac
3096
 
3097
  case $lt_cv_dlopen_self in
3098
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
3099
  *) enable_dlopen_self=unknown ;;
3100
  esac
3101
 
3102
  case $lt_cv_dlopen_self_static in
3103
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
3104
  *) enable_dlopen_self_static=unknown ;;
3105
  esac
3106
fi
3107
_LT_DECL([dlopen_support], [enable_dlopen], [0],
3108
	 [Whether dlopen is supported])
3109
_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
3110
	 [Whether dlopen of programs is supported])
3111
_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
3112
	 [Whether dlopen of statically linked programs is supported])
3113
])# LT_SYS_DLOPEN_SELF
3114
 
3115
# Old name:
3116
AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
3117
dnl aclocal-1.4 backwards compatibility:
3118
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
3119
 
3120
 
3121
# _LT_COMPILER_C_O([TAGNAME])
3122
# ---------------------------
3123
# Check to see if options -c and -o are simultaneously supported by compiler.
3124
# This macro does not hard code the compiler like AC_PROG_CC_C_O.
3125
m4_defun([_LT_COMPILER_C_O],
3126
[m4_require([_LT_DECL_SED])dnl
3127
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3128
m4_require([_LT_TAG_COMPILER])dnl
3129
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
3130
  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
3131
  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
3132
   $RM -r conftest 2>/dev/null
3133
   mkdir conftest
3134
   cd conftest
3135
   mkdir out
3136
   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3137
 
3138
   lt_compiler_flag="-o out/conftest2.$ac_objext"
3139
   # Insert the option either (1) after the last *FLAGS variable, or
3140
   # (2) before a word containing "conftest.", or (3) at the end.
3141
   # Note that $ac_compile itself does not contain backslashes and begins
3142
   # with a dollar sign (not a hyphen), so the echo should work correctly.
3143
   lt_compile=`echo "$ac_compile" | $SED \
3144
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3145
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3146
   -e 's:$: $lt_compiler_flag:'`
3147
   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3148
   (eval "$lt_compile" 2>out/conftest.err)
3149
   ac_status=$?
3150
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
3151
   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3152
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
3153
   then
3154
     # The compiler can only warn and ignore the option if not recognized
3155
     # So say no if there are warnings
3156
     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
3157
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
3158
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
3159
       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3160
     fi
3161
   fi
3162
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
3163
   $RM conftest*
3164
   # SGI C++ compiler will create directory out/ii_files/ for
3165
   # template instantiation
3166
   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
3167
   $RM out/* && rmdir out
3168
   cd ..
3169
   $RM -r conftest
3170
   $RM conftest*
3171
])
3172
_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
3173
	[Does compiler simultaneously support -c and -o options?])
3174
])# _LT_COMPILER_C_O
3175
 
3176
 
3177
# _LT_COMPILER_FILE_LOCKS([TAGNAME])
3178
# ----------------------------------
3179
# Check to see if we can do hard links to lock some files if needed
3180
m4_defun([_LT_COMPILER_FILE_LOCKS],
3181
[m4_require([_LT_ENABLE_LOCK])dnl
3182
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3183
_LT_COMPILER_C_O([$1])
3184
 
3185
hard_links="nottested"
3186
if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
3187
  # do not overwrite the value of need_locks provided by the user
3188
  AC_MSG_CHECKING([if we can lock with hard links])
3189
  hard_links=yes
3190
  $RM conftest*
3191
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
3192
  touch conftest.a
3193
  ln conftest.a conftest.b 2>&5 || hard_links=no
3194
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
3195
  AC_MSG_RESULT([$hard_links])
3196
  if test "$hard_links" = no; then
3197
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
3198
    need_locks=warn
3199
  fi
3200
else
3201
  need_locks=no
3202
fi
3203
_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3204
])# _LT_COMPILER_FILE_LOCKS
3205
 
3206
 
3207
# _LT_CHECK_OBJDIR
3208
# ----------------
3209
m4_defun([_LT_CHECK_OBJDIR],
3210
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3211
[rm -f .libs 2>/dev/null
3212
mkdir .libs 2>/dev/null
3213
if test -d .libs; then
3214
  lt_cv_objdir=.libs
3215
else
3216
  # MS-DOS does not allow filenames that begin with a dot.
3217
  lt_cv_objdir=_libs
3218
fi
3219
rmdir .libs 2>/dev/null])
3220
objdir=$lt_cv_objdir
3221
_LT_DECL([], [objdir], [0],
3222
         [The name of the directory that contains temporary libtool files])dnl
3223
m4_pattern_allow([LT_OBJDIR])dnl
3224
AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
3225
  [Define to the sub-directory in which libtool stores uninstalled libraries.])
3226
])# _LT_CHECK_OBJDIR
3227
 
3228
 
3229
# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3230
# --------------------------------------
3231
# Check hardcoding attributes.
3232
m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3233
[AC_MSG_CHECKING([how to hardcode library paths into programs])
3234
_LT_TAGVAR(hardcode_action, $1)=
3235
if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3236
   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3237
   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
3238
 
3239
  # We can hardcode non-existent directories.
3240
  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
3241
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
3242
     # have to relink, otherwise we might link with an installed library
3243
     # when we should be linking with a yet-to-be-installed one
3244
     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3245
     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
3246
    # Linking always hardcodes the temporary library directory.
3247
    _LT_TAGVAR(hardcode_action, $1)=relink
3248
  else
3249
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
3250
    _LT_TAGVAR(hardcode_action, $1)=immediate
3251
  fi
3252
else
3253
  # We cannot hardcode anything, or else we can only hardcode existing
3254
  # directories.
3255
  _LT_TAGVAR(hardcode_action, $1)=unsupported
3256
fi
3257
AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3258
 
3259
if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
3260
   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
3261
  # Fast installation is not supported
3262
  enable_fast_install=no
3263
elif test "$shlibpath_overrides_runpath" = yes ||
3264
     test "$enable_shared" = no; then
3265
  # Fast installation is not necessary
3266
  enable_fast_install=needless
3267
fi
3268
_LT_TAGDECL([], [hardcode_action], [0],
3269
    [How to hardcode a shared library path into an executable])
3270
])# _LT_LINKER_HARDCODE_LIBPATH
3271
 
3272
 
3273
# _LT_CMD_STRIPLIB
3274
# ----------------
3275
m4_defun([_LT_CMD_STRIPLIB],
3276
[m4_require([_LT_DECL_EGREP])
3277
striplib=
3278
old_striplib=
3279
AC_MSG_CHECKING([whether stripping libraries is possible])
3280
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3281
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3282
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3283
  AC_MSG_RESULT([yes])
3284
else
3285
# FIXME - insert some real tests, host_os isn't really good enough
3286
  case $host_os in
3287
  darwin*)
3288
    if test -n "$STRIP" ; then
3289
      striplib="$STRIP -x"
3290
      old_striplib="$STRIP -S"
3291
      AC_MSG_RESULT([yes])
3292
    else
3293
      AC_MSG_RESULT([no])
3294
    fi
3295
    ;;
3296
  *)
3297
    AC_MSG_RESULT([no])
3298
    ;;
3299
  esac
3300
fi
3301
_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3302
_LT_DECL([], [striplib], [1])
3303
])# _LT_CMD_STRIPLIB
3304
 
3305
 
3306
# _LT_SYS_DYNAMIC_LINKER([TAG])
3307
# -----------------------------
3308
# PORTME Fill in your ld.so characteristics
3309
m4_defun([_LT_SYS_DYNAMIC_LINKER],
3310
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3311
m4_require([_LT_DECL_EGREP])dnl
3312
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3313
m4_require([_LT_DECL_OBJDUMP])dnl
3314
m4_require([_LT_DECL_SED])dnl
3315
m4_require([_LT_CHECK_SHELL_FEATURES])dnl
3316
AC_MSG_CHECKING([dynamic linker characteristics])
3317
m4_if([$1],
3318
	[], [
3319
if test "$GCC" = yes; then
3320
  case $host_os in
3321
    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3322
    *) lt_awk_arg="/^libraries:/" ;;
3323
  esac
3324
  case $host_os in
3325
    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
3326
    *) lt_sed_strip_eq="s,=/,/,g" ;;
3327
  esac
3328
  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
3329
  case $lt_search_path_spec in
3330
  *\;*)
3331
    # if the path contains ";" then we assume it to be the separator
3332
    # otherwise default to the standard path separator (i.e. ":") - it is
3333
    # assumed that no part of a normal pathname contains ";" but that should
3334
    # okay in the real world where ";" in dirpaths is itself problematic.
3335
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
3336
    ;;
3337
  *)
3338
    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
3339
    ;;
3340
  esac
3341
  # Ok, now we have the path, separated by spaces, we can step through it
3342
  # and add multilib dir if necessary.
3343
  lt_tmp_lt_search_path_spec=
3344
  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3345
  for lt_sys_path in $lt_search_path_spec; do
3346
    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
3347
      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3348
    else
3349
      test -d "$lt_sys_path" && \
3350
	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3351
    fi
3352
  done
3353
  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
3354
BEGIN {RS=" "; FS="/|\n";} {
3355
  lt_foo="";
3356
  lt_count=0;
3357
  for (lt_i = NF; lt_i > 0; lt_i--) {
3358
    if ($lt_i != "" && $lt_i != ".") {
3359
      if ($lt_i == "..") {
3360
        lt_count++;
3361
      } else {
3362
        if (lt_count == 0) {
3363
          lt_foo="/" $lt_i lt_foo;
3364
        } else {
3365
          lt_count--;
3366
        }
3367
      }
3368
    }
3369
  }
3370
  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3371
  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3372
}'`
3373
  # AWK program above erroneously prepends '/' to C:/dos/paths
3374
  # for these hosts.
3375
  case $host_os in
3376
    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
3377
      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
3378
  esac
3379
  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
3380
else
3381
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3382
fi])
3383
library_names_spec=
3384
libname_spec='lib$name'
3385
soname_spec=
3386
shrext_cmds=".so"
3387
postinstall_cmds=
3388
postuninstall_cmds=
3389
finish_cmds=
3390
finish_eval=
3391
shlibpath_var=
3392
shlibpath_overrides_runpath=unknown
3393
version_type=none
3394
dynamic_linker="$host_os ld.so"
3395
sys_lib_dlsearch_path_spec="/lib /usr/lib"
3396
need_lib_prefix=unknown
3397
hardcode_into_libs=no
3398
 
3399
# when you set need_version to no, make sure it does not cause -set_version
3400
# flags to be left without arguments
3401
need_version=unknown
3402
 
3403
case $host_os in
3404
aix3*)
3405
  version_type=linux # correct to gnu/linux during the next big refactor
3406
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3407
  shlibpath_var=LIBPATH
3408
 
3409
  # AIX 3 has no versioning support, so we append a major version to the name.
3410
  soname_spec='${libname}${release}${shared_ext}$major'
3411
  ;;
3412
 
3413
aix[[4-9]]*)
3414
  version_type=linux # correct to gnu/linux during the next big refactor
3415
  need_lib_prefix=no
3416
  need_version=no
3417
  hardcode_into_libs=yes
3418
  if test "$host_cpu" = ia64; then
3419
    # AIX 5 supports IA64
3420
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3421
    shlibpath_var=LD_LIBRARY_PATH
3422
  else
3423
    # With GCC up to 2.95.x, collect2 would create an import file
3424
    # for dependence libraries.  The import file would start with
3425
    # the line `#! .'.  This would cause the generated library to
3426
    # depend on `.', always an invalid library.  This was fixed in
3427
    # development snapshots of GCC prior to 3.0.
3428
    case $host_os in
3429
      aix4 | aix4.[[01]] | aix4.[[01]].*)
3430
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3431
	   echo ' yes '
3432
	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3433
	:
3434
      else
3435
	can_build_shared=no
3436
      fi
3437
      ;;
3438
    esac
3439
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3440
    # soname into executable. Probably we can add versioning support to
3441
    # collect2, so additional links can be useful in future.
3442
    if test "$aix_use_runtimelinking" = yes; then
3443
      # If using run time linking (on AIX 4.2 or later) use lib.so
3444
      # instead of lib.a to let people know that these are not
3445
      # typical AIX shared libraries.
3446
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3447
    else
3448
      # We preserve .a as extension for shared libraries through AIX4.2
3449
      # and later when we are not doing run time linking.
3450
      library_names_spec='${libname}${release}.a $libname.a'
3451
      soname_spec='${libname}${release}${shared_ext}$major'
3452
    fi
3453
    shlibpath_var=LIBPATH
3454
  fi
3455
  ;;
3456
 
3457
amigaos*)
3458
  case $host_cpu in
3459
  powerpc)
3460
    # Since July 2007 AmigaOS4 officially supports .so libraries.
3461
    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3462
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3463
    ;;
3464
  m68k)
3465
    library_names_spec='$libname.ixlibrary $libname.a'
3466
    # Create ${libname}_ixlibrary.a entries in /sys/libs.
3467
    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''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'
3468
    ;;
3469
  esac
3470
  ;;
3471
 
3472
beos*)
3473
  library_names_spec='${libname}${shared_ext}'
3474
  dynamic_linker="$host_os ld.so"
3475
  shlibpath_var=LIBRARY_PATH
3476
  ;;
3477
 
3478
bsdi[[45]]*)
3479
  version_type=linux # correct to gnu/linux during the next big refactor
3480
  need_version=no
3481
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3482
  soname_spec='${libname}${release}${shared_ext}$major'
3483
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3484
  shlibpath_var=LD_LIBRARY_PATH
3485
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3486
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3487
  # the default ld.so.conf also contains /usr/contrib/lib and
3488
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3489
  # libtool to hard-code these into programs
3490
  ;;
3491
 
3492
cygwin* | mingw* | pw32* | cegcc*)
3493
  version_type=windows
3494
  shrext_cmds=".dll"
3495
  need_version=no
3496
  need_lib_prefix=no
3497
 
3498
  case $GCC,$cc_basename in
3499
  yes,*)
3500
    # gcc
3501
    library_names_spec='$libname.dll.a'
3502
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
3503
    postinstall_cmds='base_file=`basename \${file}`~
3504
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3505
      dldir=$destdir/`dirname \$dlpath`~
3506
      test -d \$dldir || mkdir -p \$dldir~
3507
      $install_prog $dir/$dlname \$dldir/$dlname~
3508
      chmod a+x \$dldir/$dlname~
3509
      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3510
        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3511
      fi'
3512
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3513
      dlpath=$dir/\$dldll~
3514
       $RM \$dlpath'
3515
    shlibpath_overrides_runpath=yes
3516
 
3517
    case $host_os in
3518
    cygwin*)
3519
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3520
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3521
m4_if([$1], [],[
3522
      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
3523
      ;;
3524
    mingw* | cegcc*)
3525
      # MinGW DLLs use traditional 'lib' prefix
3526
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3527
      ;;
3528
    pw32*)
3529
      # pw32 DLLs use 'pw' prefix rather than 'lib'
3530
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3531
      ;;
3532
    esac
3533
    dynamic_linker='Win32 ld.exe'
3534
    ;;
3535
 
3536
  *,cl*)
3537
    # Native MSVC
3538
    libname_spec='$name'
3539
    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3540
    library_names_spec='${libname}.dll.lib'
3541
 
3542
    case $build_os in
3543
    mingw*)
3544
      sys_lib_search_path_spec=
3545
      lt_save_ifs=$IFS
3546
      IFS=';'
3547
      for lt_path in $LIB
3548
      do
3549
        IFS=$lt_save_ifs
3550
        # Let DOS variable expansion print the short 8.3 style file name.
3551
        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
3552
        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
3553
      done
3554
      IFS=$lt_save_ifs
3555
      # Convert to MSYS style.
3556
      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
3557
      ;;
3558
    cygwin*)
3559
      # Convert to unix form, then to dos form, then back to unix form
3560
      # but this time dos style (no spaces!) so that the unix form looks
3561
      # like /cygdrive/c/PROGRA~1:/cygdr...
3562
      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
3563
      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
3564
      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3565
      ;;
3566
    *)
3567
      sys_lib_search_path_spec="$LIB"
3568
      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3569
        # It is most probably a Windows format PATH.
3570
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3571
      else
3572
        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3573
      fi
3574
      # FIXME: find the short name or the path components, as spaces are
3575
      # common. (e.g. "Program Files" -> "PROGRA~1")
3576
      ;;
3577
    esac
3578
 
3579
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
3580
    postinstall_cmds='base_file=`basename \${file}`~
3581
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3582
      dldir=$destdir/`dirname \$dlpath`~
3583
      test -d \$dldir || mkdir -p \$dldir~
3584
      $install_prog $dir/$dlname \$dldir/$dlname'
3585
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3586
      dlpath=$dir/\$dldll~
3587
       $RM \$dlpath'
3588
    shlibpath_overrides_runpath=yes
3589
    dynamic_linker='Win32 link.exe'
3590
    ;;
3591
 
3592
  *)
3593
    # Assume MSVC wrapper
3594
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3595
    dynamic_linker='Win32 ld.exe'
3596
    ;;
3597
  esac
3598
  # FIXME: first we should search . and the directory the executable is in
3599
  shlibpath_var=PATH
3600
  ;;
3601
 
3602
darwin* | rhapsody*)
3603
  dynamic_linker="$host_os dyld"
3604
  version_type=darwin
3605
  need_lib_prefix=no
3606
  need_version=no
3607
  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3608
  soname_spec='${libname}${release}${major}$shared_ext'
3609
  shlibpath_overrides_runpath=yes
3610
  shlibpath_var=DYLD_LIBRARY_PATH
3611
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3612
m4_if([$1], [],[
3613
  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3614
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3615
  ;;
3616
 
3617
dgux*)
3618
  version_type=linux # correct to gnu/linux during the next big refactor
3619
  need_lib_prefix=no
3620
  need_version=no
3621
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3622
  soname_spec='${libname}${release}${shared_ext}$major'
3623
  shlibpath_var=LD_LIBRARY_PATH
3624
  ;;
3625
 
3626
freebsd* | dragonfly*)
3627
  # DragonFly does not have aout.  When/if they implement a new
3628
  # versioning mechanism, adjust this.
3629
  if test -x /usr/bin/objformat; then
3630
    objformat=`/usr/bin/objformat`
3631
  else
3632
    case $host_os in
3633
    freebsd[[23]].*) objformat=aout ;;
3634
    *) objformat=elf ;;
3635
    esac
3636
  fi
3637
  version_type=freebsd-$objformat
3638
  case $version_type in
3639
    freebsd-elf*)
3640
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3641
      need_version=no
3642
      need_lib_prefix=no
3643
      ;;
3644
    freebsd-*)
3645
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3646
      need_version=yes
3647
      ;;
3648
  esac
3649
  shlibpath_var=LD_LIBRARY_PATH
3650
  case $host_os in
3651
  freebsd2.*)
3652
    shlibpath_overrides_runpath=yes
3653
    ;;
3654
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3655
    shlibpath_overrides_runpath=yes
3656
    hardcode_into_libs=yes
3657
    ;;
3658
  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3659
  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3660
    shlibpath_overrides_runpath=no
3661
    hardcode_into_libs=yes
3662
    ;;
3663
  *) # from 4.6 on, and DragonFly
3664
    shlibpath_overrides_runpath=yes
3665
    hardcode_into_libs=yes
3666
    ;;
3667
  esac
3668
  ;;
3669
 
3670
haiku*)
3671
  version_type=linux # correct to gnu/linux during the next big refactor
3672
  need_lib_prefix=no
3673
  need_version=no
3674
  dynamic_linker="$host_os runtime_loader"
3675
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3676
  soname_spec='${libname}${release}${shared_ext}$major'
3677
  shlibpath_var=LIBRARY_PATH
3678
  shlibpath_overrides_runpath=yes
3679
  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
3680
  hardcode_into_libs=yes
3681
  ;;
3682
 
3683
hpux9* | hpux10* | hpux11*)
3684
  # Give a soname corresponding to the major version so that dld.sl refuses to
3685
  # link against other versions.
3686
  version_type=sunos
3687
  need_lib_prefix=no
3688
  need_version=no
3689
  case $host_cpu in
3690
  ia64*)
3691
    shrext_cmds='.so'
3692
    hardcode_into_libs=yes
3693
    dynamic_linker="$host_os dld.so"
3694
    shlibpath_var=LD_LIBRARY_PATH
3695
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3696
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3697
    soname_spec='${libname}${release}${shared_ext}$major'
3698
    if test "X$HPUX_IA64_MODE" = X32; then
3699
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3700
    else
3701
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3702
    fi
3703
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3704
    ;;
3705
  hppa*64*)
3706
    shrext_cmds='.sl'
3707
    hardcode_into_libs=yes
3708
    dynamic_linker="$host_os dld.sl"
3709
    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3710
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3711
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3712
    soname_spec='${libname}${release}${shared_ext}$major'
3713
    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3714
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3715
    ;;
3716
  *)
3717
    shrext_cmds='.sl'
3718
    dynamic_linker="$host_os dld.sl"
3719
    shlibpath_var=SHLIB_PATH
3720
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3721
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3722
    soname_spec='${libname}${release}${shared_ext}$major'
3723
    ;;
3724
  esac
3725
  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
3726
  postinstall_cmds='chmod 555 $lib'
3727
  # or fails outright, so override atomically:
3728
  install_override_mode=555
3729
  ;;
3730
 
3731
interix[[3-9]]*)
3732
  version_type=linux # correct to gnu/linux during the next big refactor
3733
  need_lib_prefix=no
3734
  need_version=no
3735
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3736
  soname_spec='${libname}${release}${shared_ext}$major'
3737
  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3738
  shlibpath_var=LD_LIBRARY_PATH
3739
  shlibpath_overrides_runpath=no
3740
  hardcode_into_libs=yes
3741
  ;;
3742
 
3743
irix5* | irix6* | nonstopux*)
3744
  case $host_os in
3745
    nonstopux*) version_type=nonstopux ;;
3746
    *)
3747
	if test "$lt_cv_prog_gnu_ld" = yes; then
3748
		version_type=linux # correct to gnu/linux during the next big refactor
3749
	else
3750
		version_type=irix
3751
	fi ;;
3752
  esac
3753
  need_lib_prefix=no
3754
  need_version=no
3755
  soname_spec='${libname}${release}${shared_ext}$major'
3756
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3757
  case $host_os in
3758
  irix5* | nonstopux*)
3759
    libsuff= shlibsuff=
3760
    ;;
3761
  *)
3762
    case $LD in # libtool.m4 will add one of these switches to LD
3763
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3764
      libsuff= shlibsuff= libmagic=32-bit;;
3765
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3766
      libsuff=32 shlibsuff=N32 libmagic=N32;;
3767
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3768
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
3769
    *) libsuff= shlibsuff= libmagic=never-match;;
3770
    esac
3771
    ;;
3772
  esac
3773
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3774
  shlibpath_overrides_runpath=no
3775
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3776
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3777
  hardcode_into_libs=yes
3778
  ;;
3779
 
3780
# No shared lib support for Linux oldld, aout, or coff.
3781
linux*oldld* | linux*aout* | linux*coff*)
3782
  dynamic_linker=no
3783
  ;;
3784
 
3785
# This must be glibc/ELF.
3786
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
3787
  version_type=linux # correct to gnu/linux during the next big refactor
3788
  need_lib_prefix=no
3789
  need_version=no
3790
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3791
  soname_spec='${libname}${release}${shared_ext}$major'
3792
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3793
  shlibpath_var=LD_LIBRARY_PATH
3794
  shlibpath_overrides_runpath=no
3795
 
3796
  # Some binutils ld are patched to set DT_RUNPATH
3797
  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
3798
    [lt_cv_shlibpath_overrides_runpath=no
3799
    save_LDFLAGS=$LDFLAGS
3800
    save_libdir=$libdir
3801
    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3802
	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3803
    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3804
      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3805
	 [lt_cv_shlibpath_overrides_runpath=yes])])
3806
    LDFLAGS=$save_LDFLAGS
3807
    libdir=$save_libdir
3808
    ])
3809
  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
3810
 
3811
  # This implies no fast_install, which is unacceptable.
3812
  # Some rework will be needed to allow for fast_install
3813
  # before this can be enabled.
3814
  hardcode_into_libs=yes
3815
 
3816
  # Append ld.so.conf contents to the search path
3817
  if test -f /etc/ld.so.conf; then
3818
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
3819
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3820
  fi
3821
 
3822
  # We used to test for /lib/ld.so.1 and disable shared libraries on
3823
  # powerpc, because MkLinux only supported shared libraries with the
3824
  # GNU dynamic linker.  Since this was broken with cross compilers,
3825
  # most powerpc-linux boxes support dynamic linking these days and
3826
  # people can always --disable-shared, the test was removed, and we
3827
  # assume the GNU/Linux dynamic linker is in use.
3828
  dynamic_linker='GNU/Linux ld.so'
3829
  ;;
3830
 
3831
netbsdelf*-gnu)
3832
  version_type=linux
3833
  need_lib_prefix=no
3834
  need_version=no
3835
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3836
  soname_spec='${libname}${release}${shared_ext}$major'
3837
  shlibpath_var=LD_LIBRARY_PATH
3838
  shlibpath_overrides_runpath=no
3839
  hardcode_into_libs=yes
3840
  dynamic_linker='NetBSD ld.elf_so'
3841
  ;;
3842
 
3843
netbsd*)
3844
  version_type=sunos
3845
  need_lib_prefix=no
3846
  need_version=no
3847
  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3848
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3849
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3850
    dynamic_linker='NetBSD (a.out) ld.so'
3851
  else
3852
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3853
    soname_spec='${libname}${release}${shared_ext}$major'
3854
    dynamic_linker='NetBSD ld.elf_so'
3855
  fi
3856
  shlibpath_var=LD_LIBRARY_PATH
3857
  shlibpath_overrides_runpath=yes
3858
  hardcode_into_libs=yes
3859
  ;;
3860
 
3861
newsos6)
3862
  version_type=linux # correct to gnu/linux during the next big refactor
3863
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3864
  shlibpath_var=LD_LIBRARY_PATH
3865
  shlibpath_overrides_runpath=yes
3866
  ;;
3867
 
3868
*nto* | *qnx*)
3869
  version_type=qnx
3870
  need_lib_prefix=no
3871
  need_version=no
3872
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3873
  soname_spec='${libname}${release}${shared_ext}$major'
3874
  shlibpath_var=LD_LIBRARY_PATH
3875
  shlibpath_overrides_runpath=no
3876
  hardcode_into_libs=yes
3877
  dynamic_linker='ldqnx.so'
3878
  ;;
3879
 
3880
openbsd*)
3881
  version_type=sunos
3882
  sys_lib_dlsearch_path_spec="/usr/lib"
3883
  need_lib_prefix=no
3884
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3885
  case $host_os in
3886
    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
3887
    *)				need_version=no  ;;
3888
  esac
3889
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3890
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3891
  shlibpath_var=LD_LIBRARY_PATH
3892
  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3893
    case $host_os in
3894
      openbsd2.[[89]] | openbsd2.[[89]].*)
3895
	shlibpath_overrides_runpath=no
3896
	;;
3897
      *)
3898
	shlibpath_overrides_runpath=yes
3899
	;;
3900
      esac
3901
  else
3902
    shlibpath_overrides_runpath=yes
3903
  fi
3904
  ;;
3905
 
3906
os2*)
3907
  libname_spec='$name'
3908
  shrext_cmds=".dll"
3909
  need_lib_prefix=no
3910
  library_names_spec='$libname${shared_ext} $libname.a'
3911
  dynamic_linker='OS/2 ld.exe'
3912
  shlibpath_var=LIBPATH
3913
  ;;
3914
 
3915
osf3* | osf4* | osf5*)
3916
  version_type=osf
3917
  need_lib_prefix=no
3918
  need_version=no
3919
  soname_spec='${libname}${release}${shared_ext}$major'
3920
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3921
  shlibpath_var=LD_LIBRARY_PATH
3922
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3923
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3924
  ;;
3925
 
3926
rdos*)
3927
  dynamic_linker=no
3928
  ;;
3929
 
3930
solaris*)
3931
  version_type=linux # correct to gnu/linux during the next big refactor
3932
  need_lib_prefix=no
3933
  need_version=no
3934
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3935
  soname_spec='${libname}${release}${shared_ext}$major'
3936
  shlibpath_var=LD_LIBRARY_PATH
3937
  shlibpath_overrides_runpath=yes
3938
  hardcode_into_libs=yes
3939
  # ldd complains unless libraries are executable
3940
  postinstall_cmds='chmod +x $lib'
3941
  ;;
3942
 
3943
sunos4*)
3944
  version_type=sunos
3945
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3946
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3947
  shlibpath_var=LD_LIBRARY_PATH
3948
  shlibpath_overrides_runpath=yes
3949
  if test "$with_gnu_ld" = yes; then
3950
    need_lib_prefix=no
3951
  fi
3952
  need_version=yes
3953
  ;;
3954
 
3955
sysv4 | sysv4.3*)
3956
  version_type=linux # correct to gnu/linux during the next big refactor
3957
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3958
  soname_spec='${libname}${release}${shared_ext}$major'
3959
  shlibpath_var=LD_LIBRARY_PATH
3960
  case $host_vendor in
3961
    sni)
3962
      shlibpath_overrides_runpath=no
3963
      need_lib_prefix=no
3964
      runpath_var=LD_RUN_PATH
3965
      ;;
3966
    siemens)
3967
      need_lib_prefix=no
3968
      ;;
3969
    motorola)
3970
      need_lib_prefix=no
3971
      need_version=no
3972
      shlibpath_overrides_runpath=no
3973
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3974
      ;;
3975
  esac
3976
  ;;
3977
 
3978
sysv4*MP*)
3979
  if test -d /usr/nec ;then
3980
    version_type=linux # correct to gnu/linux during the next big refactor
3981
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3982
    soname_spec='$libname${shared_ext}.$major'
3983
    shlibpath_var=LD_LIBRARY_PATH
3984
  fi
3985
  ;;
3986
 
3987
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3988
  version_type=freebsd-elf
3989
  need_lib_prefix=no
3990
  need_version=no
3991
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3992
  soname_spec='${libname}${release}${shared_ext}$major'
3993
  shlibpath_var=LD_LIBRARY_PATH
3994
  shlibpath_overrides_runpath=yes
3995
  hardcode_into_libs=yes
3996
  if test "$with_gnu_ld" = yes; then
3997
    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3998
  else
3999
    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
4000
    case $host_os in
4001
      sco3.2v5*)
4002
        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
4003
	;;
4004
    esac
4005
  fi
4006
  sys_lib_dlsearch_path_spec='/usr/lib'
4007
  ;;
4008
 
4009
tpf*)
4010
  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
4011
  version_type=linux # correct to gnu/linux during the next big refactor
4012
  need_lib_prefix=no
4013
  need_version=no
4014
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4015
  shlibpath_var=LD_LIBRARY_PATH
4016
  shlibpath_overrides_runpath=no
4017
  hardcode_into_libs=yes
4018
  ;;
4019
 
4020
uts4*)
4021
  version_type=linux # correct to gnu/linux during the next big refactor
4022
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4023
  soname_spec='${libname}${release}${shared_ext}$major'
4024
  shlibpath_var=LD_LIBRARY_PATH
4025
  ;;
4026
 
4027
*)
4028
  dynamic_linker=no
4029
  ;;
4030
esac
4031
AC_MSG_RESULT([$dynamic_linker])
4032
test "$dynamic_linker" = no && can_build_shared=no
4033
 
4034
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4035
if test "$GCC" = yes; then
4036
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
4037
fi
4038
 
4039
if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
4040
  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
4041
fi
4042
if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
4043
  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
4044
fi
4045
 
4046
_LT_DECL([], [variables_saved_for_relink], [1],
4047
    [Variables whose values should be saved in libtool wrapper scripts and
4048
    restored at link time])
4049
_LT_DECL([], [need_lib_prefix], [0],
4050
    [Do we need the "lib" prefix for modules?])
4051
_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
4052
_LT_DECL([], [version_type], [0], [Library versioning type])
4053
_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
4054
_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
4055
_LT_DECL([], [shlibpath_overrides_runpath], [0],
4056
    [Is shlibpath searched before the hard-coded library search path?])
4057
_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
4058
_LT_DECL([], [library_names_spec], [1],
4059
    [[List of archive names.  First name is the real one, the rest are links.
4060
    The last name is the one that the linker finds with -lNAME]])
4061
_LT_DECL([], [soname_spec], [1],
4062
    [[The coded name of the library, if different from the real name]])
4063
_LT_DECL([], [install_override_mode], [1],
4064
    [Permission mode override for installation of shared libraries])
4065
_LT_DECL([], [postinstall_cmds], [2],
4066
    [Command to use after installation of a shared archive])
4067
_LT_DECL([], [postuninstall_cmds], [2],
4068
    [Command to use after uninstallation of a shared archive])
4069
_LT_DECL([], [finish_cmds], [2],
4070
    [Commands used to finish a libtool library installation in a directory])
4071
_LT_DECL([], [finish_eval], [1],
4072
    [[As "finish_cmds", except a single script fragment to be evaled but
4073
    not shown]])
4074
_LT_DECL([], [hardcode_into_libs], [0],
4075
    [Whether we should hardcode library paths into libraries])
4076
_LT_DECL([], [sys_lib_search_path_spec], [2],
4077
    [Compile-time system search path for libraries])
4078
_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
4079
    [Run-time system search path for libraries])
4080
])# _LT_SYS_DYNAMIC_LINKER
4081
 
4082
 
4083
# _LT_PATH_TOOL_PREFIX(TOOL)
4084
# --------------------------
4085
# find a file program which can recognize shared library
4086
AC_DEFUN([_LT_PATH_TOOL_PREFIX],
4087
[m4_require([_LT_DECL_EGREP])dnl
4088
AC_MSG_CHECKING([for $1])
4089
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4090
[case $MAGIC_CMD in
4091
[[\\/*] |  ?:[\\/]*])
4092
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4093
  ;;
4094
*)
4095
  lt_save_MAGIC_CMD="$MAGIC_CMD"
4096
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4097
dnl $ac_dummy forces splitting on constant user-supplied paths.
4098
dnl POSIX.2 word splitting is done only on the output of word expansions,
4099
dnl not every word.  This closes a longstanding sh security hole.
4100
  ac_dummy="m4_if([$2], , $PATH, [$2])"
4101
  for ac_dir in $ac_dummy; do
4102
    IFS="$lt_save_ifs"
4103
    test -z "$ac_dir" && ac_dir=.
4104
    if test -f $ac_dir/$1; then
4105
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4106
      if test -n "$file_magic_test_file"; then
4107
	case $deplibs_check_method in
4108
	"file_magic "*)
4109
	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
4110
	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4111
	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4112
	    $EGREP "$file_magic_regex" > /dev/null; then
4113
	    :
4114
	  else
4115
	    cat <<_LT_EOF 1>&2
4116
 
4117
*** Warning: the command libtool uses to detect shared libraries,
4118
*** $file_magic_cmd, produces output that libtool cannot recognize.
4119
*** The result is that libtool may fail to recognize shared libraries
4120
*** as such.  This will affect the creation of libtool libraries that
4121
*** depend on shared libraries, but programs linked with such libtool
4122
*** libraries will work regardless of this problem.  Nevertheless, you
4123
*** may want to report the problem to your system manager and/or to
4124
*** bug-libtool@gnu.org
4125
 
4126
_LT_EOF
4127
	  fi ;;
4128
	esac
4129
      fi
4130
      break
4131
    fi
4132
  done
4133
  IFS="$lt_save_ifs"
4134
  MAGIC_CMD="$lt_save_MAGIC_CMD"
4135
  ;;
4136
esac])
4137
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4138
if test -n "$MAGIC_CMD"; then
4139
  AC_MSG_RESULT($MAGIC_CMD)
4140
else
4141
  AC_MSG_RESULT(no)
4142
fi
4143
_LT_DECL([], [MAGIC_CMD], [0],
4144
	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
4145
])# _LT_PATH_TOOL_PREFIX
4146
 
4147
# Old name:
4148
AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
4149
dnl aclocal-1.4 backwards compatibility:
4150
dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
4151
 
4152
 
4153
# _LT_PATH_MAGIC
4154
# --------------
4155
# find a file program which can recognize a shared library
4156
m4_defun([_LT_PATH_MAGIC],
4157
[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
4158
if test -z "$lt_cv_path_MAGIC_CMD"; then
4159
  if test -n "$ac_tool_prefix"; then
4160
    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
4161
  else
4162
    MAGIC_CMD=:
4163
  fi
4164
fi
4165
])# _LT_PATH_MAGIC
4166
 
4167
 
4168
# LT_PATH_LD
4169
# ----------
4170
# find the pathname to the GNU or non-GNU linker
4171
AC_DEFUN([LT_PATH_LD],
4172
[AC_REQUIRE([AC_PROG_CC])dnl
4173
AC_REQUIRE([AC_CANONICAL_HOST])dnl
4174
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4175
m4_require([_LT_DECL_SED])dnl
4176
m4_require([_LT_DECL_EGREP])dnl
4177
m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
4178
 
4179
AC_ARG_WITH([gnu-ld],
4180
    [AS_HELP_STRING([--with-gnu-ld],
4181
	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
4182
    [test "$withval" = no || with_gnu_ld=yes],
4183
    [with_gnu_ld=no])dnl
4184
 
4185
ac_prog=ld
4186
if test "$GCC" = yes; then
4187
  # Check if gcc -print-prog-name=ld gives a path.
4188
  AC_MSG_CHECKING([for ld used by $CC])
4189
  case $host in
4190
  *-*-mingw*)
4191
    # gcc leaves a trailing carriage return which upsets mingw
4192
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4193
  *)
4194
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4195
  esac
4196
  case $ac_prog in
4197
    # Accept absolute paths.
4198
    [[\\/]]* | ?:[[\\/]]*)
4199
      re_direlt='/[[^/]][[^/]]*/\.\./'
4200
      # Canonicalize the pathname of ld
4201
      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4202
      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4203
	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4204
      done
4205
      test -z "$LD" && LD="$ac_prog"
4206
      ;;
4207
  "")
4208
    # If it fails, then pretend we aren't using GCC.
4209
    ac_prog=ld
4210
    ;;
4211
  *)
4212
    # If it is relative, then search for the first ld in PATH.
4213
    with_gnu_ld=unknown
4214
    ;;
4215
  esac
4216
elif test "$with_gnu_ld" = yes; then
4217
  AC_MSG_CHECKING([for GNU ld])
4218
else
4219
  AC_MSG_CHECKING([for non-GNU ld])
4220
fi
4221
AC_CACHE_VAL(lt_cv_path_LD,
4222
[if test -z "$LD"; then
4223
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4224
  for ac_dir in $PATH; do
4225
    IFS="$lt_save_ifs"
4226
    test -z "$ac_dir" && ac_dir=.
4227
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4228
      lt_cv_path_LD="$ac_dir/$ac_prog"
4229
      # Check to see if the program is GNU ld.  I'd rather use --version,
4230
      # but apparently some variants of GNU ld only accept -v.
4231
      # Break only if it was the GNU/non-GNU ld that we prefer.
4232
      case `"$lt_cv_path_LD" -v 2>&1 
4233
      *GNU* | *'with BFD'*)
4234
	test "$with_gnu_ld" != no && break
4235
	;;
4236
      *)
4237
	test "$with_gnu_ld" != yes && break
4238
	;;
4239
      esac
4240
    fi
4241
  done
4242
  IFS="$lt_save_ifs"
4243
else
4244
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
4245
fi])
4246
LD="$lt_cv_path_LD"
4247
if test -n "$LD"; then
4248
  AC_MSG_RESULT($LD)
4249
else
4250
  AC_MSG_RESULT(no)
4251
fi
4252
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4253
_LT_PATH_LD_GNU
4254
AC_SUBST([LD])
4255
 
4256
_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4257
])# LT_PATH_LD
4258
 
4259
# Old names:
4260
AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4261
AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4262
dnl aclocal-1.4 backwards compatibility:
4263
dnl AC_DEFUN([AM_PROG_LD], [])
4264
dnl AC_DEFUN([AC_PROG_LD], [])
4265
 
4266
 
4267
# _LT_PATH_LD_GNU
4268
#- --------------
4269
m4_defun([_LT_PATH_LD_GNU],
4270
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4271
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
4272
case `$LD -v 2>&1 
4273
*GNU* | *'with BFD'*)
4274
  lt_cv_prog_gnu_ld=yes
4275
  ;;
4276
*)
4277
  lt_cv_prog_gnu_ld=no
4278
  ;;
4279
esac])
4280
with_gnu_ld=$lt_cv_prog_gnu_ld
4281
])# _LT_PATH_LD_GNU
4282
 
4283
 
4284
# _LT_CMD_RELOAD
4285
# --------------
4286
# find reload flag for linker
4287
#   -- PORTME Some linkers may need a different reload flag.
4288
m4_defun([_LT_CMD_RELOAD],
4289
[AC_CACHE_CHECK([for $LD option to reload object files],
4290
  lt_cv_ld_reload_flag,
4291
  [lt_cv_ld_reload_flag='-r'])
4292
reload_flag=$lt_cv_ld_reload_flag
4293
case $reload_flag in
4294
"" | " "*) ;;
4295
*) reload_flag=" $reload_flag" ;;
4296
esac
4297
reload_cmds='$LD$reload_flag -o $output$reload_objs'
4298
case $host_os in
4299
  cygwin* | mingw* | pw32* | cegcc*)
4300
    if test "$GCC" != yes; then
4301
      reload_cmds=false
4302
    fi
4303
    ;;
4304
  darwin*)
4305
    if test "$GCC" = yes; then
4306
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4307
    else
4308
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
4309
    fi
4310
    ;;
4311
esac
4312
_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4313
_LT_TAGDECL([], [reload_cmds], [2])dnl
4314
])# _LT_CMD_RELOAD
4315
 
4316
 
4317
# _LT_CHECK_MAGIC_METHOD
4318
# ----------------------
4319
# how to check for library dependencies
4320
#  -- PORTME fill in with the dynamic library characteristics
4321
m4_defun([_LT_CHECK_MAGIC_METHOD],
4322
[m4_require([_LT_DECL_EGREP])
4323
m4_require([_LT_DECL_OBJDUMP])
4324
AC_CACHE_CHECK([how to recognize dependent libraries],
4325
lt_cv_deplibs_check_method,
4326
[lt_cv_file_magic_cmd='$MAGIC_CMD'
4327
lt_cv_file_magic_test_file=
4328
lt_cv_deplibs_check_method='unknown'
4329
# Need to set the preceding variable on all platforms that support
4330
# interlibrary dependencies.
4331
# 'none' -- dependencies not supported.
4332
# `unknown' -- same as none, but documents that we really don't know.
4333
# 'pass_all' -- all dependencies passed with no checks.
4334
# 'test_compile' -- check by making test program.
4335
# 'file_magic [[regex]]' -- check by looking for files in library path
4336
# which responds to the $file_magic_cmd with a given extended regex.
4337
# If you have `file' or equivalent on your system and you're not sure
4338
# whether `pass_all' will *always* work, you probably want this one.
4339
 
4340
case $host_os in
4341
aix[[4-9]]*)
4342
  lt_cv_deplibs_check_method=pass_all
4343
  ;;
4344
 
4345
beos*)
4346
  lt_cv_deplibs_check_method=pass_all
4347
  ;;
4348
 
4349
bsdi[[45]]*)
4350
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4351
  lt_cv_file_magic_cmd='/usr/bin/file -L'
4352
  lt_cv_file_magic_test_file=/shlib/libc.so
4353
  ;;
4354
 
4355
cygwin*)
4356
  # func_win32_libid is a shell function defined in ltmain.sh
4357
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4358
  lt_cv_file_magic_cmd='func_win32_libid'
4359
  ;;
4360
 
4361
mingw* | pw32*)
4362
  # Base MSYS/MinGW do not provide the 'file' command needed by
4363
  # func_win32_libid shell function, so use a weaker test based on 'objdump',
4364
  # unless we find 'file', for example because we are cross-compiling.
4365
  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
4366
  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
4367
    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4368
    lt_cv_file_magic_cmd='func_win32_libid'
4369
  else
4370
    # Keep this pattern in sync with the one in func_win32_libid.
4371
    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
4372
    lt_cv_file_magic_cmd='$OBJDUMP -f'
4373
  fi
4374
  ;;
4375
 
4376
cegcc*)
4377
  # use the weaker test based on 'objdump'. See mingw*.
4378
  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4379
  lt_cv_file_magic_cmd='$OBJDUMP -f'
4380
  ;;
4381
 
4382
darwin* | rhapsody*)
4383
  lt_cv_deplibs_check_method=pass_all
4384
  ;;
4385
 
4386
freebsd* | dragonfly*)
4387
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4388
    case $host_cpu in
4389
    i*86 )
4390
      # Not sure whether the presence of OpenBSD here was a mistake.
4391
      # Let's accept both of them until this is cleared up.
4392
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4393
      lt_cv_file_magic_cmd=/usr/bin/file
4394
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4395
      ;;
4396
    esac
4397
  else
4398
    lt_cv_deplibs_check_method=pass_all
4399
  fi
4400
  ;;
4401
 
4402
haiku*)
4403
  lt_cv_deplibs_check_method=pass_all
4404
  ;;
4405
 
4406
hpux10.20* | hpux11*)
4407
  lt_cv_file_magic_cmd=/usr/bin/file
4408
  case $host_cpu in
4409
  ia64*)
4410
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4411
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4412
    ;;
4413
  hppa*64*)
4414
    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
4415
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4416
    ;;
4417
  *)
4418
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
4419
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
4420
    ;;
4421
  esac
4422
  ;;
4423
 
4424
interix[[3-9]]*)
4425
  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4426
  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4427
  ;;
4428
 
4429
irix5* | irix6* | nonstopux*)
4430
  case $LD in
4431
  *-32|*"-32 ") libmagic=32-bit;;
4432
  *-n32|*"-n32 ") libmagic=N32;;
4433
  *-64|*"-64 ") libmagic=64-bit;;
4434
  *) libmagic=never-match;;
4435
  esac
4436
  lt_cv_deplibs_check_method=pass_all
4437
  ;;
4438
 
4439
# This must be glibc/ELF.
4440
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
4441
  lt_cv_deplibs_check_method=pass_all
4442
  ;;
4443
 
4444
netbsd* | netbsdelf*-gnu)
4445
  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4446
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4447
  else
4448
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4449
  fi
4450
  ;;
4451
 
4452
newos6*)
4453
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4454
  lt_cv_file_magic_cmd=/usr/bin/file
4455
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
4456
  ;;
4457
 
4458
*nto* | *qnx*)
4459
  lt_cv_deplibs_check_method=pass_all
4460
  ;;
4461
 
4462
openbsd*)
4463
  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4464
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4465
  else
4466
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4467
  fi
4468
  ;;
4469
 
4470
osf3* | osf4* | osf5*)
4471
  lt_cv_deplibs_check_method=pass_all
4472
  ;;
4473
 
4474
rdos*)
4475
  lt_cv_deplibs_check_method=pass_all
4476
  ;;
4477
 
4478
solaris*)
4479
  lt_cv_deplibs_check_method=pass_all
4480
  ;;
4481
 
4482
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4483
  lt_cv_deplibs_check_method=pass_all
4484
  ;;
4485
 
4486
sysv4 | sysv4.3*)
4487
  case $host_vendor in
4488
  motorola)
4489
    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]]'
4490
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4491
    ;;
4492
  ncr)
4493
    lt_cv_deplibs_check_method=pass_all
4494
    ;;
4495
  sequent)
4496
    lt_cv_file_magic_cmd='/bin/file'
4497
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4498
    ;;
4499
  sni)
4500
    lt_cv_file_magic_cmd='/bin/file'
4501
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4502
    lt_cv_file_magic_test_file=/lib/libc.so
4503
    ;;
4504
  siemens)
4505
    lt_cv_deplibs_check_method=pass_all
4506
    ;;
4507
  pc)
4508
    lt_cv_deplibs_check_method=pass_all
4509
    ;;
4510
  esac
4511
  ;;
4512
 
4513
tpf*)
4514
  lt_cv_deplibs_check_method=pass_all
4515
  ;;
4516
esac
4517
])
4518
 
4519
file_magic_glob=
4520
want_nocaseglob=no
4521
if test "$build" = "$host"; then
4522
  case $host_os in
4523
  mingw* | pw32*)
4524
    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
4525
      want_nocaseglob=yes
4526
    else
4527
      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
4528
    fi
4529
    ;;
4530
  esac
4531
fi
4532
 
4533
file_magic_cmd=$lt_cv_file_magic_cmd
4534
deplibs_check_method=$lt_cv_deplibs_check_method
4535
test -z "$deplibs_check_method" && deplibs_check_method=unknown
4536
 
4537
_LT_DECL([], [deplibs_check_method], [1],
4538
    [Method to check whether dependent libraries are shared objects])
4539
_LT_DECL([], [file_magic_cmd], [1],
4540
    [Command to use when deplibs_check_method = "file_magic"])
4541
_LT_DECL([], [file_magic_glob], [1],
4542
    [How to find potential files when deplibs_check_method = "file_magic"])
4543
_LT_DECL([], [want_nocaseglob], [1],
4544
    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
4545
])# _LT_CHECK_MAGIC_METHOD
4546
 
4547
 
4548
# LT_PATH_NM
4549
# ----------
4550
# find the pathname to a BSD- or MS-compatible name lister
4551
AC_DEFUN([LT_PATH_NM],
4552
[AC_REQUIRE([AC_PROG_CC])dnl
4553
AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4554
[if test -n "$NM"; then
4555
  # Let the user override the test.
4556
  lt_cv_path_NM="$NM"
4557
else
4558
  lt_nm_to_check="${ac_tool_prefix}nm"
4559
  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4560
    lt_nm_to_check="$lt_nm_to_check nm"
4561
  fi
4562
  for lt_tmp_nm in $lt_nm_to_check; do
4563
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4564
    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4565
      IFS="$lt_save_ifs"
4566
      test -z "$ac_dir" && ac_dir=.
4567
      tmp_nm="$ac_dir/$lt_tmp_nm"
4568
      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4569
	# Check to see if the nm accepts a BSD-compat flag.
4570
	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
4571
	#   nm: unknown option "B" ignored
4572
	# Tru64's nm complains that /dev/null is an invalid object file
4573
	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4574
	*/dev/null* | *'Invalid file or object type'*)
4575
	  lt_cv_path_NM="$tmp_nm -B"
4576
	  break
4577
	  ;;
4578
	*)
4579
	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4580
	  */dev/null*)
4581
	    lt_cv_path_NM="$tmp_nm -p"
4582
	    break
4583
	    ;;
4584
	  *)
4585
	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4586
	    continue # so that we can try to find one that supports BSD flags
4587
	    ;;
4588
	  esac
4589
	  ;;
4590
	esac
4591
      fi
4592
    done
4593
    IFS="$lt_save_ifs"
4594
  done
4595
  : ${lt_cv_path_NM=no}
4596
fi])
4597
if test "$lt_cv_path_NM" != "no"; then
4598
  NM="$lt_cv_path_NM"
4599
else
4600
  # Didn't find any BSD compatible name lister, look for dumpbin.
4601
  if test -n "$DUMPBIN"; then :
4602
    # Let the user override the test.
4603
  else
4604
    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
4605
    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
4606
    *COFF*)
4607
      DUMPBIN="$DUMPBIN -symbols"
4608
      ;;
4609
    *)
4610
      DUMPBIN=:
4611
      ;;
4612
    esac
4613
  fi
4614
  AC_SUBST([DUMPBIN])
4615
  if test "$DUMPBIN" != ":"; then
4616
    NM="$DUMPBIN"
4617
  fi
4618
fi
4619
test -z "$NM" && NM=nm
4620
AC_SUBST([NM])
4621
_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4622
 
4623
AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4624
  [lt_cv_nm_interface="BSD nm"
4625
  echo "int some_variable = 0;" > conftest.$ac_ext
4626
  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4627
  (eval "$ac_compile" 2>conftest.err)
4628
  cat conftest.err >&AS_MESSAGE_LOG_FD
4629
  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4630
  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4631
  cat conftest.err >&AS_MESSAGE_LOG_FD
4632
  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
4633
  cat conftest.out >&AS_MESSAGE_LOG_FD
4634
  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4635
    lt_cv_nm_interface="MS dumpbin"
4636
  fi
4637
  rm -f conftest*])
4638
])# LT_PATH_NM
4639
 
4640
# Old names:
4641
AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4642
AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4643
dnl aclocal-1.4 backwards compatibility:
4644
dnl AC_DEFUN([AM_PROG_NM], [])
4645
dnl AC_DEFUN([AC_PROG_NM], [])
4646
 
4647
# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4648
# --------------------------------
4649
# how to determine the name of the shared library
4650
# associated with a specific link library.
4651
#  -- PORTME fill in with the dynamic library characteristics
4652
m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
4653
[m4_require([_LT_DECL_EGREP])
4654
m4_require([_LT_DECL_OBJDUMP])
4655
m4_require([_LT_DECL_DLLTOOL])
4656
AC_CACHE_CHECK([how to associate runtime and link libraries],
4657
lt_cv_sharedlib_from_linklib_cmd,
4658
[lt_cv_sharedlib_from_linklib_cmd='unknown'
4659
 
4660
case $host_os in
4661
cygwin* | mingw* | pw32* | cegcc*)
4662
  # two different shell functions defined in ltmain.sh
4663
  # decide which to use based on capabilities of $DLLTOOL
4664
  case `$DLLTOOL --help 2>&1` in
4665
  *--identify-strict*)
4666
    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
4667
    ;;
4668
  *)
4669
    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
4670
    ;;
4671
  esac
4672
  ;;
4673
*)
4674
  # fallback: assume linklib IS sharedlib
4675
  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
4676
  ;;
4677
esac
4678
])
4679
sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
4680
test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
4681
 
4682
_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
4683
    [Command to associate shared and link libraries])
4684
])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4685
 
4686
 
4687
# _LT_PATH_MANIFEST_TOOL
4688
# ----------------------
4689
# locate the manifest tool
4690
m4_defun([_LT_PATH_MANIFEST_TOOL],
4691
[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
4692
test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
4693
AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
4694
  [lt_cv_path_mainfest_tool=no
4695
  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
4696
  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
4697
  cat conftest.err >&AS_MESSAGE_LOG_FD
4698
  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
4699
    lt_cv_path_mainfest_tool=yes
4700
  fi
4701
  rm -f conftest*])
4702
if test "x$lt_cv_path_mainfest_tool" != xyes; then
4703
  MANIFEST_TOOL=:
4704
fi
4705
_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
4706
])# _LT_PATH_MANIFEST_TOOL
4707
 
4708
 
4709
# LT_LIB_M
4710
# --------
4711
# check for math library
4712
AC_DEFUN([LT_LIB_M],
4713
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4714
LIBM=
4715
case $host in
4716
*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
4717
  # These system don't have libm, or don't need it
4718
  ;;
4719
*-ncr-sysv4.3*)
4720
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4721
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4722
  ;;
4723
*)
4724
  AC_CHECK_LIB(m, cos, LIBM="-lm")
4725
  ;;
4726
esac
4727
AC_SUBST([LIBM])
4728
])# LT_LIB_M
4729
 
4730
# Old name:
4731
AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4732
dnl aclocal-1.4 backwards compatibility:
4733
dnl AC_DEFUN([AC_CHECK_LIBM], [])
4734
 
4735
 
4736
# _LT_COMPILER_NO_RTTI([TAGNAME])
4737
# -------------------------------
4738
m4_defun([_LT_COMPILER_NO_RTTI],
4739
[m4_require([_LT_TAG_COMPILER])dnl
4740
 
4741
_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4742
 
4743
if test "$GCC" = yes; then
4744
  case $cc_basename in
4745
  nvcc*)
4746
    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
4747
  *)
4748
    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
4749
  esac
4750
 
4751
  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4752
    lt_cv_prog_compiler_rtti_exceptions,
4753
    [-fno-rtti -fno-exceptions], [],
4754
    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4755
fi
4756
_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4757
	[Compiler flag to turn off builtin functions])
4758
])# _LT_COMPILER_NO_RTTI
4759
 
4760
 
4761
# _LT_CMD_GLOBAL_SYMBOLS
4762
# ----------------------
4763
m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4764
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4765
AC_REQUIRE([AC_PROG_CC])dnl
4766
AC_REQUIRE([AC_PROG_AWK])dnl
4767
AC_REQUIRE([LT_PATH_NM])dnl
4768
AC_REQUIRE([LT_PATH_LD])dnl
4769
m4_require([_LT_DECL_SED])dnl
4770
m4_require([_LT_DECL_EGREP])dnl
4771
m4_require([_LT_TAG_COMPILER])dnl
4772
 
4773
# Check for command to grab the raw symbol name followed by C symbol from nm.
4774
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4775
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4776
[
4777
# These are sane defaults that work on at least a few old systems.
4778
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4779
 
4780
# Character class describing NM global symbol codes.
4781
symcode='[[BCDEGRST]]'
4782
 
4783
# Regexp to match symbols that can be accessed directly from C.
4784
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4785
 
4786
# Define system-specific variables.
4787
case $host_os in
4788
aix*)
4789
  symcode='[[BCDT]]'
4790
  ;;
4791
cygwin* | mingw* | pw32* | cegcc*)
4792
  symcode='[[ABCDGISTW]]'
4793
  ;;
4794
hpux*)
4795
  if test "$host_cpu" = ia64; then
4796
    symcode='[[ABCDEGRST]]'
4797
  fi
4798
  ;;
4799
irix* | nonstopux*)
4800
  symcode='[[BCDEGRST]]'
4801
  ;;
4802
osf*)
4803
  symcode='[[BCDEGQRST]]'
4804
  ;;
4805
solaris*)
4806
  symcode='[[BDRT]]'
4807
  ;;
4808
sco3.2v5*)
4809
  symcode='[[DT]]'
4810
  ;;
4811
sysv4.2uw2*)
4812
  symcode='[[DT]]'
4813
  ;;
4814
sysv5* | sco5v6* | unixware* | OpenUNIX*)
4815
  symcode='[[ABDT]]'
4816
  ;;
4817
sysv4)
4818
  symcode='[[DFNSTU]]'
4819
  ;;
4820
esac
4821
 
4822
# If we're using GNU nm, then use its standard symbol codes.
4823
case `$NM -V 2>&1` in
4824
*GNU* | *'with BFD'*)
4825
  symcode='[[ABCDGIRSTW]]' ;;
4826
esac
4827
 
4828
# Transform an extracted symbol line into a proper C declaration.
4829
# Some systems (esp. on ia64) link data and code symbols differently,
4830
# so use this general approach.
4831
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4832
 
4833
# Transform an extracted symbol line into symbol name and symbol address
4834
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
4835
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
4836
 
4837
# Handle CRLF in mingw tool chain
4838
opt_cr=
4839
case $build_os in
4840
mingw*)
4841
  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4842
  ;;
4843
esac
4844
 
4845
# Try without a prefix underscore, then with it.
4846
for ac_symprfx in "" "_"; do
4847
 
4848
  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4849
  symxfrm="\\1 $ac_symprfx\\2 \\2"
4850
 
4851
  # Write the raw and C identifiers.
4852
  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4853
    # Fake it for dumpbin and say T for any non-static function
4854
    # and D for any global variable.
4855
    # Also find C++ and __fastcall symbols from MSVC++,
4856
    # which start with @ or ?.
4857
    lt_cv_sys_global_symbol_pipe="$AWK ['"\
4858
"     {last_section=section; section=\$ 3};"\
4859
"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
4860
"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4861
"     \$ 0!~/External *\|/{next};"\
4862
"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4863
"     {if(hide[section]) next};"\
4864
"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4865
"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4866
"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
4867
"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4868
"     ' prfx=^$ac_symprfx]"
4869
  else
4870
    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4871
  fi
4872
  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
4873
 
4874
  # Check to see that the pipe works correctly.
4875
  pipe_works=no
4876
 
4877
  rm -f conftest*
4878
  cat > conftest.$ac_ext <<_LT_EOF
4879
#ifdef __cplusplus
4880
extern "C" {
4881
#endif
4882
char nm_test_var;
4883
void nm_test_func(void);
4884
void nm_test_func(void){}
4885
#ifdef __cplusplus
4886
}
4887
#endif
4888
int main(){nm_test_var='a';nm_test_func();return(0);}
4889
_LT_EOF
4890
 
4891
  if AC_TRY_EVAL(ac_compile); then
4892
    # Now try to grab the symbols.
4893
    nlist=conftest.nm
4894
    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4895
      # Try sorting and uniquifying the output.
4896
      if sort "$nlist" | uniq > "$nlist"T; then
4897
	mv -f "$nlist"T "$nlist"
4898
      else
4899
	rm -f "$nlist"T
4900
      fi
4901
 
4902
      # Make sure that we snagged all the symbols we need.
4903
      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4904
	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4905
	  cat <<_LT_EOF > conftest.$ac_ext
4906
/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
4907
#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
4908
/* DATA imports from DLLs on WIN32 con't be const, because runtime
4909
   relocations are performed -- see ld's documentation on pseudo-relocs.  */
4910
# define LT@&t@_DLSYM_CONST
4911
#elif defined(__osf__)
4912
/* This system does not cope well with relocations in const data.  */
4913
# define LT@&t@_DLSYM_CONST
4914
#else
4915
# define LT@&t@_DLSYM_CONST const
4916
#endif
4917
 
4918
#ifdef __cplusplus
4919
extern "C" {
4920
#endif
4921
 
4922
_LT_EOF
4923
	  # Now generate the symbol file.
4924
	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4925
 
4926
	  cat <<_LT_EOF >> conftest.$ac_ext
4927
 
4928
/* The mapping between symbol names and symbols.  */
4929
LT@&t@_DLSYM_CONST struct {
4930
  const char *name;
4931
  void       *address;
4932
}
4933
lt__PROGRAM__LTX_preloaded_symbols[[]] =
4934
{
4935
  { "@PROGRAM@", (void *) 0 },
4936
_LT_EOF
4937
	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4938
	  cat <<\_LT_EOF >> conftest.$ac_ext
4939
  {0, (void *) 0}
4940
};
4941
 
4942
/* This works around a problem in FreeBSD linker */
4943
#ifdef FREEBSD_WORKAROUND
4944
static const void *lt_preloaded_setup() {
4945
  return lt__PROGRAM__LTX_preloaded_symbols;
4946
}
4947
#endif
4948
 
4949
#ifdef __cplusplus
4950
}
4951
#endif
4952
_LT_EOF
4953
	  # Now try linking the two files.
4954
	  mv conftest.$ac_objext conftstm.$ac_objext
4955
	  lt_globsym_save_LIBS=$LIBS
4956
	  lt_globsym_save_CFLAGS=$CFLAGS
4957
	  LIBS="conftstm.$ac_objext"
4958
	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4959
	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4960
	    pipe_works=yes
4961
	  fi
4962
	  LIBS=$lt_globsym_save_LIBS
4963
	  CFLAGS=$lt_globsym_save_CFLAGS
4964
	else
4965
	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4966
	fi
4967
      else
4968
	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4969
      fi
4970
    else
4971
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4972
    fi
4973
  else
4974
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4975
    cat conftest.$ac_ext >&5
4976
  fi
4977
  rm -rf conftest* conftst*
4978
 
4979
  # Do not use the global_symbol_pipe unless it works.
4980
  if test "$pipe_works" = yes; then
4981
    break
4982
  else
4983
    lt_cv_sys_global_symbol_pipe=
4984
  fi
4985
done
4986
])
4987
if test -z "$lt_cv_sys_global_symbol_pipe"; then
4988
  lt_cv_sys_global_symbol_to_cdecl=
4989
fi
4990
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4991
  AC_MSG_RESULT(failed)
4992
else
4993
  AC_MSG_RESULT(ok)
4994
fi
4995
 
4996
# Response file support.
4997
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4998
  nm_file_list_spec='@'
4999
elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
5000
  nm_file_list_spec='@'
5001
fi
5002
 
5003
_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
5004
    [Take the output of nm and produce a listing of raw symbols and C names])
5005
_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
5006
    [Transform the output of nm in a proper C declaration])
5007
_LT_DECL([global_symbol_to_c_name_address],
5008
    [lt_cv_sys_global_symbol_to_c_name_address], [1],
5009
    [Transform the output of nm in a C name address pair])
5010
_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
5011
    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
5012
    [Transform the output of nm in a C name address pair when lib prefix is needed])
5013
_LT_DECL([], [nm_file_list_spec], [1],
5014
    [Specify filename containing input files for $NM])
5015
]) # _LT_CMD_GLOBAL_SYMBOLS
5016
 
5017
 
5018
# _LT_COMPILER_PIC([TAGNAME])
5019
# ---------------------------
5020
m4_defun([_LT_COMPILER_PIC],
5021
[m4_require([_LT_TAG_COMPILER])dnl
5022
_LT_TAGVAR(lt_prog_compiler_wl, $1)=
5023
_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5024
_LT_TAGVAR(lt_prog_compiler_static, $1)=
5025
 
5026
m4_if([$1], [CXX], [
5027
  # C++ specific cases for pic, static, wl, etc.
5028
  if test "$GXX" = yes; then
5029
    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5030
    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5031
 
5032
    case $host_os in
5033
    aix*)
5034
      # All AIX code is PIC.
5035
      if test "$host_cpu" = ia64; then
5036
	# AIX 5 now supports IA64 processor
5037
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5038
      fi
5039
      ;;
5040
 
5041
    amigaos*)
5042
      case $host_cpu in
5043
      powerpc)
5044
            # see comment about AmigaOS4 .so support
5045
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5046
        ;;
5047
      m68k)
5048
            # FIXME: we need at least 68020 code to build shared libraries, but
5049
            # adding the `-m68020' flag to GCC prevents building anything better,
5050
            # like `-m68040'.
5051
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5052
        ;;
5053
      esac
5054
      ;;
5055
 
5056
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5057
      # PIC is the default for these OSes.
5058
      ;;
5059
    mingw* | cygwin* | os2* | pw32* | cegcc*)
5060
      # This hack is so that the source file can tell whether it is being
5061
      # built for inclusion in a dll (and should export symbols for example).
5062
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5063
      # (--disable-auto-import) libraries
5064
      m4_if([$1], [GCJ], [],
5065
	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5066
      ;;
5067
    darwin* | rhapsody*)
5068
      # PIC is the default on this platform
5069
      # Common symbols not allowed in MH_DYLIB files
5070
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5071
      ;;
5072
    *djgpp*)
5073
      # DJGPP does not support shared libraries at all
5074
      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5075
      ;;
5076
    haiku*)
5077
      # PIC is the default for Haiku.
5078
      # The "-static" flag exists, but is broken.
5079
      _LT_TAGVAR(lt_prog_compiler_static, $1)=
5080
      ;;
5081
    interix[[3-9]]*)
5082
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5083
      # Instead, we relocate shared libraries at runtime.
5084
      ;;
5085
    sysv4*MP*)
5086
      if test -d /usr/nec; then
5087
	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5088
      fi
5089
      ;;
5090
    hpux*)
5091
      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5092
      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5093
      # sets the default TLS model and affects inlining.
5094
      case $host_cpu in
5095
      hppa*64*)
5096
	;;
5097
      *)
5098
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5099
	;;
5100
      esac
5101
      ;;
5102
    *qnx* | *nto*)
5103
      # QNX uses GNU C++, but need to define -shared option too, otherwise
5104
      # it will coredump.
5105
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5106
      ;;
5107
    *)
5108
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5109
      ;;
5110
    esac
5111
  else
5112
    case $host_os in
5113
      aix[[4-9]]*)
5114
	# All AIX code is PIC.
5115
	if test "$host_cpu" = ia64; then
5116
	  # AIX 5 now supports IA64 processor
5117
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5118
	else
5119
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5120
	fi
5121
	;;
5122
      chorus*)
5123
	case $cc_basename in
5124
	cxch68*)
5125
	  # Green Hills C++ Compiler
5126
	  # _LT_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"
5127
	  ;;
5128
	esac
5129
	;;
5130
      mingw* | cygwin* | os2* | pw32* | cegcc*)
5131
	# This hack is so that the source file can tell whether it is being
5132
	# built for inclusion in a dll (and should export symbols for example).
5133
	m4_if([$1], [GCJ], [],
5134
	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5135
	;;
5136
      dgux*)
5137
	case $cc_basename in
5138
	  ec++*)
5139
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5140
	    ;;
5141
	  ghcx*)
5142
	    # Green Hills C++ Compiler
5143
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5144
	    ;;
5145
	  *)
5146
	    ;;
5147
	esac
5148
	;;
5149
      freebsd* | dragonfly*)
5150
	# FreeBSD uses GNU C++
5151
	;;
5152
      hpux9* | hpux10* | hpux11*)
5153
	case $cc_basename in
5154
	  CC*)
5155
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5156
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5157
	    if test "$host_cpu" != ia64; then
5158
	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5159
	    fi
5160
	    ;;
5161
	  aCC*)
5162
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5163
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5164
	    case $host_cpu in
5165
	    hppa*64*|ia64*)
5166
	      # +Z the default
5167
	      ;;
5168
	    *)
5169
	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5170
	      ;;
5171
	    esac
5172
	    ;;
5173
	  *)
5174
	    ;;
5175
	esac
5176
	;;
5177
      interix*)
5178
	# This is c89, which is MS Visual C++ (no shared libs)
5179
	# Anyone wants to do a port?
5180
	;;
5181
      irix5* | irix6* | nonstopux*)
5182
	case $cc_basename in
5183
	  CC*)
5184
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5185
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5186
	    # CC pic flag -KPIC is the default.
5187
	    ;;
5188
	  *)
5189
	    ;;
5190
	esac
5191
	;;
5192
      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
5193
	case $cc_basename in
5194
	  KCC*)
5195
	    # KAI C++ Compiler
5196
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5197
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5198
	    ;;
5199
	  ecpc* )
5200
	    # old Intel C++ for x86_64 which still supported -KPIC.
5201
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5202
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5203
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5204
	    ;;
5205
	  icpc* )
5206
	    # Intel C++, used to be incompatible with GCC.
5207
	    # ICC 10 doesn't accept -KPIC any more.
5208
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5209
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5210
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5211
	    ;;
5212
	  pgCC* | pgcpp*)
5213
	    # Portland Group C++ compiler
5214
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5215
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5216
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5217
	    ;;
5218
	  cxx*)
5219
	    # Compaq C++
5220
	    # Make sure the PIC flag is empty.  It appears that all Alpha
5221
	    # Linux and Compaq Tru64 Unix objects are PIC.
5222
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5223
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5224
	    ;;
5225
	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
5226
	    # IBM XL 8.0, 9.0 on PPC and BlueGene
5227
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5228
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5229
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5230
	    ;;
5231
	  *)
5232
	    case `$CC -V 2>&1 | sed 5q` in
5233
	    *Sun\ C*)
5234
	      # Sun C++ 5.9
5235
	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5236
	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5237
	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5238
	      ;;
5239
	    esac
5240
	    ;;
5241
	esac
5242
	;;
5243
      lynxos*)
5244
	;;
5245
      m88k*)
5246
	;;
5247
      mvs*)
5248
	case $cc_basename in
5249
	  cxx*)
5250
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5251
	    ;;
5252
	  *)
5253
	    ;;
5254
	esac
5255
	;;
5256
      netbsd* | netbsdelf*-gnu)
5257
	;;
5258
      *qnx* | *nto*)
5259
        # QNX uses GNU C++, but need to define -shared option too, otherwise
5260
        # it will coredump.
5261
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5262
        ;;
5263
      osf3* | osf4* | osf5*)
5264
	case $cc_basename in
5265
	  KCC*)
5266
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5267
	    ;;
5268
	  RCC*)
5269
	    # Rational C++ 2.4.1
5270
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5271
	    ;;
5272
	  cxx*)
5273
	    # Digital/Compaq C++
5274
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5275
	    # Make sure the PIC flag is empty.  It appears that all Alpha
5276
	    # Linux and Compaq Tru64 Unix objects are PIC.
5277
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5278
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5279
	    ;;
5280
	  *)
5281
	    ;;
5282
	esac
5283
	;;
5284
      psos*)
5285
	;;
5286
      solaris*)
5287
	case $cc_basename in
5288
	  CC* | sunCC*)
5289
	    # Sun C++ 4.2, 5.x and Centerline C++
5290
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5291
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5292
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5293
	    ;;
5294
	  gcx*)
5295
	    # Green Hills C++ Compiler
5296
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5297
	    ;;
5298
	  *)
5299
	    ;;
5300
	esac
5301
	;;
5302
      sunos4*)
5303
	case $cc_basename in
5304
	  CC*)
5305
	    # Sun C++ 4.x
5306
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5307
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5308
	    ;;
5309
	  lcc*)
5310
	    # Lucid
5311
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5312
	    ;;
5313
	  *)
5314
	    ;;
5315
	esac
5316
	;;
5317
      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5318
	case $cc_basename in
5319
	  CC*)
5320
	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5321
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5322
	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5323
	    ;;
5324
	esac
5325
	;;
5326
      tandem*)
5327
	case $cc_basename in
5328
	  NCC*)
5329
	    # NonStop-UX NCC 3.20
5330
	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5331
	    ;;
5332
	  *)
5333
	    ;;
5334
	esac
5335
	;;
5336
      vxworks*)
5337
	;;
5338
      *)
5339
	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5340
	;;
5341
    esac
5342
  fi
5343
],
5344
[
5345
  if test "$GCC" = yes; then
5346
    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5347
    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5348
 
5349
    case $host_os in
5350
      aix*)
5351
      # All AIX code is PIC.
5352
      if test "$host_cpu" = ia64; then
5353
	# AIX 5 now supports IA64 processor
5354
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5355
      fi
5356
      ;;
5357
 
5358
    amigaos*)
5359
      case $host_cpu in
5360
      powerpc)
5361
            # see comment about AmigaOS4 .so support
5362
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5363
        ;;
5364
      m68k)
5365
            # FIXME: we need at least 68020 code to build shared libraries, but
5366
            # adding the `-m68020' flag to GCC prevents building anything better,
5367
            # like `-m68040'.
5368
            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5369
        ;;
5370
      esac
5371
      ;;
5372
 
5373
    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5374
      # PIC is the default for these OSes.
5375
      ;;
5376
 
5377
    mingw* | cygwin* | pw32* | os2* | cegcc*)
5378
      # This hack is so that the source file can tell whether it is being
5379
      # built for inclusion in a dll (and should export symbols for example).
5380
      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5381
      # (--disable-auto-import) libraries
5382
      m4_if([$1], [GCJ], [],
5383
	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5384
      ;;
5385
 
5386
    darwin* | rhapsody*)
5387
      # PIC is the default on this platform
5388
      # Common symbols not allowed in MH_DYLIB files
5389
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5390
      ;;
5391
 
5392
    haiku*)
5393
      # PIC is the default for Haiku.
5394
      # The "-static" flag exists, but is broken.
5395
      _LT_TAGVAR(lt_prog_compiler_static, $1)=
5396
      ;;
5397
 
5398
    hpux*)
5399
      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5400
      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5401
      # sets the default TLS model and affects inlining.
5402
      case $host_cpu in
5403
      hppa*64*)
5404
	# +Z the default
5405
	;;
5406
      *)
5407
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5408
	;;
5409
      esac
5410
      ;;
5411
 
5412
    interix[[3-9]]*)
5413
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5414
      # Instead, we relocate shared libraries at runtime.
5415
      ;;
5416
 
5417
    msdosdjgpp*)
5418
      # Just because we use GCC doesn't mean we suddenly get shared libraries
5419
      # on systems that don't support them.
5420
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5421
      enable_shared=no
5422
      ;;
5423
 
5424
    *nto* | *qnx*)
5425
      # QNX uses GNU C++, but need to define -shared option too, otherwise
5426
      # it will coredump.
5427
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5428
      ;;
5429
 
5430
    sysv4*MP*)
5431
      if test -d /usr/nec; then
5432
	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5433
      fi
5434
      ;;
5435
 
5436
    *)
5437
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5438
      ;;
5439
    esac
5440
 
5441
    case $cc_basename in
5442
    nvcc*) # Cuda Compiler Driver 2.2
5443
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
5444
      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5445
        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
5446
      fi
5447
      ;;
5448
    esac
5449
  else
5450
    # PORTME Check for flag to pass linker flags through the system compiler.
5451
    case $host_os in
5452
    aix*)
5453
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5454
      if test "$host_cpu" = ia64; then
5455
	# AIX 5 now supports IA64 processor
5456
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5457
      else
5458
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5459
      fi
5460
      ;;
5461
 
5462
    mingw* | cygwin* | pw32* | os2* | cegcc*)
5463
      # This hack is so that the source file can tell whether it is being
5464
      # built for inclusion in a dll (and should export symbols for example).
5465
      m4_if([$1], [GCJ], [],
5466
	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5467
      ;;
5468
 
5469
    hpux9* | hpux10* | hpux11*)
5470
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5471
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5472
      # not for PA HP-UX.
5473
      case $host_cpu in
5474
      hppa*64*|ia64*)
5475
	# +Z the default
5476
	;;
5477
      *)
5478
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5479
	;;
5480
      esac
5481
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
5482
      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5483
      ;;
5484
 
5485
    irix5* | irix6* | nonstopux*)
5486
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5487
      # PIC (with -KPIC) is the default.
5488
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5489
      ;;
5490
 
5491
    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
5492
      case $cc_basename in
5493
      # old Intel for x86_64 which still supported -KPIC.
5494
      ecc*)
5495
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5496
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5497
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5498
        ;;
5499
      # icc used to be incompatible with GCC.
5500
      # ICC 10 doesn't accept -KPIC any more.
5501
      icc* | ifort*)
5502
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5503
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5504
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5505
        ;;
5506
      # Lahey Fortran 8.1.
5507
      lf95*)
5508
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5509
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5510
	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5511
	;;
5512
      nagfor*)
5513
	# NAG Fortran compiler
5514
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
5515
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5516
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5517
	;;
5518
      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
5519
        # Portland Group compilers (*not* the Pentium gcc compiler,
5520
	# which looks to be a dead project)
5521
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5522
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5523
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5524
        ;;
5525
      ccc*)
5526
        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5527
        # All Alpha code is PIC.
5528
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5529
        ;;
5530
      xl* | bgxl* | bgf* | mpixl*)
5531
	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
5532
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5533
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5534
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5535
	;;
5536
      *)
5537
	case `$CC -V 2>&1 | sed 5q` in
5538
	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
5539
	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
5540
	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5541
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5542
	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5543
	  ;;
5544
	*Sun\ F* | *Sun*Fortran*)
5545
	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5546
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5547
	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5548
	  ;;
5549
	*Sun\ C*)
5550
	  # Sun C 5.9
5551
	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5552
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5553
	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5554
	  ;;
5555
        *Intel*\ [[CF]]*Compiler*)
5556
	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5557
	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5558
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5559
	  ;;
5560
	*Portland\ Group*)
5561
	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5562
	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5563
	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5564
	  ;;
5565
	esac
5566
	;;
5567
      esac
5568
      ;;
5569
 
5570
    newsos6)
5571
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5572
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5573
      ;;
5574
 
5575
    *nto* | *qnx*)
5576
      # QNX uses GNU C++, but need to define -shared option too, otherwise
5577
      # it will coredump.
5578
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5579
      ;;
5580
 
5581
    osf3* | osf4* | osf5*)
5582
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5583
      # All OSF/1 code is PIC.
5584
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5585
      ;;
5586
 
5587
    rdos*)
5588
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5589
      ;;
5590
 
5591
    solaris*)
5592
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5593
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5594
      case $cc_basename in
5595
      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
5596
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5597
      *)
5598
	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5599
      esac
5600
      ;;
5601
 
5602
    sunos4*)
5603
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5604
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5605
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5606
      ;;
5607
 
5608
    sysv4 | sysv4.2uw2* | sysv4.3*)
5609
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5610
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5611
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5612
      ;;
5613
 
5614
    sysv4*MP*)
5615
      if test -d /usr/nec ;then
5616
	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5617
	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5618
      fi
5619
      ;;
5620
 
5621
    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5622
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5623
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5624
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5625
      ;;
5626
 
5627
    unicos*)
5628
      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5629
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5630
      ;;
5631
 
5632
    uts4*)
5633
      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5634
      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5635
      ;;
5636
 
5637
    *)
5638
      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5639
      ;;
5640
    esac
5641
  fi
5642
])
5643
case $host_os in
5644
  # For platforms which do not support PIC, -DPIC is meaningless:
5645
  *djgpp*)
5646
    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5647
    ;;
5648
  *)
5649
    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5650
    ;;
5651
esac
5652
 
5653
AC_CACHE_CHECK([for $compiler option to produce PIC],
5654
  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
5655
  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5656
_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
5657
 
5658
#
5659
# Check to make sure the PIC flag actually works.
5660
#
5661
if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5662
  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5663
    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5664
    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5665
    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5666
     "" | " "*) ;;
5667
     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5668
     esac],
5669
    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5670
     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5671
fi
5672
_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5673
	[Additional compiler flags for building library objects])
5674
 
5675
_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5676
	[How to pass a linker flag through the compiler])
5677
#
5678
# Check to make sure the static flag actually works.
5679
#
5680
wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5681
_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5682
  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5683
  $lt_tmp_static_flag,
5684
  [],
5685
  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5686
_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5687
	[Compiler flag to prevent dynamic linking])
5688
])# _LT_COMPILER_PIC
5689
 
5690
 
5691
# _LT_LINKER_SHLIBS([TAGNAME])
5692
# ----------------------------
5693
# See if the linker supports building shared libraries.
5694
m4_defun([_LT_LINKER_SHLIBS],
5695
[AC_REQUIRE([LT_PATH_LD])dnl
5696
AC_REQUIRE([LT_PATH_NM])dnl
5697
m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5698
m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5699
m4_require([_LT_DECL_EGREP])dnl
5700
m4_require([_LT_DECL_SED])dnl
5701
m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5702
m4_require([_LT_TAG_COMPILER])dnl
5703
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5704
m4_if([$1], [CXX], [
5705
  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5706
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5707
  case $host_os in
5708
  aix[[4-9]]*)
5709
    # If we're using GNU nm, then we don't want the "-C" option.
5710
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
5711
    # Also, AIX nm treats weak defined symbols like other global defined
5712
    # symbols, whereas GNU nm marks them as "W".
5713
    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5714
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5715
    else
5716
      _LT_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'
5717
    fi
5718
    ;;
5719
  pw32*)
5720
    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5721
    ;;
5722
  cygwin* | mingw* | cegcc*)
5723
    case $cc_basename in
5724
    cl*)
5725
      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
5726
      ;;
5727
    *)
5728
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5729
      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5730
      ;;
5731
    esac
5732
    ;;
5733
  linux* | k*bsd*-gnu | gnu*)
5734
    _LT_TAGVAR(link_all_deplibs, $1)=no
5735
    ;;
5736
  *)
5737
    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5738
    ;;
5739
  esac
5740
], [
5741
  runpath_var=
5742
  _LT_TAGVAR(allow_undefined_flag, $1)=
5743
  _LT_TAGVAR(always_export_symbols, $1)=no
5744
  _LT_TAGVAR(archive_cmds, $1)=
5745
  _LT_TAGVAR(archive_expsym_cmds, $1)=
5746
  _LT_TAGVAR(compiler_needs_object, $1)=no
5747
  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5748
  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5749
  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5750
  _LT_TAGVAR(hardcode_automatic, $1)=no
5751
  _LT_TAGVAR(hardcode_direct, $1)=no
5752
  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5753
  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5754
  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5755
  _LT_TAGVAR(hardcode_minus_L, $1)=no
5756
  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5757
  _LT_TAGVAR(inherit_rpath, $1)=no
5758
  _LT_TAGVAR(link_all_deplibs, $1)=unknown
5759
  _LT_TAGVAR(module_cmds, $1)=
5760
  _LT_TAGVAR(module_expsym_cmds, $1)=
5761
  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5762
  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5763
  _LT_TAGVAR(thread_safe_flag_spec, $1)=
5764
  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5765
  # include_expsyms should be a list of space-separated symbols to be *always*
5766
  # included in the symbol list
5767
  _LT_TAGVAR(include_expsyms, $1)=
5768
  # exclude_expsyms can be an extended regexp of symbols to exclude
5769
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
5770
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5771
  # as well as any symbol that contains `d'.
5772
  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5773
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5774
  # platforms (ab)use it in PIC code, but their linkers get confused if
5775
  # the symbol is explicitly referenced.  Since portable code cannot
5776
  # rely on this symbol name, it's probably fine to never include it in
5777
  # preloaded symbol tables.
5778
  # Exclude shared library initialization/finalization symbols.
5779
dnl Note also adjust exclude_expsyms for C++ above.
5780
  extract_expsyms_cmds=
5781
 
5782
  case $host_os in
5783
  cygwin* | mingw* | pw32* | cegcc*)
5784
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
5785
    # When not using gcc, we currently assume that we are using
5786
    # Microsoft Visual C++.
5787
    if test "$GCC" != yes; then
5788
      with_gnu_ld=no
5789
    fi
5790
    ;;
5791
  interix*)
5792
    # we just hope/assume this is gcc and not c89 (= MSVC++)
5793
    with_gnu_ld=yes
5794
    ;;
5795
  openbsd*)
5796
    with_gnu_ld=no
5797
    ;;
5798
  linux* | k*bsd*-gnu | gnu*)
5799
    _LT_TAGVAR(link_all_deplibs, $1)=no
5800
    ;;
5801
  esac
5802
 
5803
  _LT_TAGVAR(ld_shlibs, $1)=yes
5804
 
5805
  # On some targets, GNU ld is compatible enough with the native linker
5806
  # that we're better off using the native interface for both.
5807
  lt_use_gnu_ld_interface=no
5808
  if test "$with_gnu_ld" = yes; then
5809
    case $host_os in
5810
      aix*)
5811
	# The AIX port of GNU ld has always aspired to compatibility
5812
	# with the native linker.  However, as the warning in the GNU ld
5813
	# block says, versions before 2.19.5* couldn't really create working
5814
	# shared libraries, regardless of the interface used.
5815
	case `$LD -v 2>&1` in
5816
	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5817
	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5818
	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5819
	  *)
5820
	    lt_use_gnu_ld_interface=yes
5821
	    ;;
5822
	esac
5823
	;;
5824
      *)
5825
	lt_use_gnu_ld_interface=yes
5826
	;;
5827
    esac
5828
  fi
5829
 
5830
  if test "$lt_use_gnu_ld_interface" = yes; then
5831
    # If archive_cmds runs LD, not CC, wlarc should be empty
5832
    wlarc='${wl}'
5833
 
5834
    # Set some defaults for GNU ld with shared library support. These
5835
    # are reset later if shared libraries are not supported. Putting them
5836
    # here allows them to be overridden if necessary.
5837
    runpath_var=LD_RUN_PATH
5838
    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5839
    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5840
    # ancient GNU ld didn't support --whole-archive et. al.
5841
    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5842
      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5843
    else
5844
      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5845
    fi
5846
    supports_anon_versioning=no
5847
    case `$LD -v 2>&1` in
5848
      *GNU\ gold*) supports_anon_versioning=yes ;;
5849
      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5850
      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5851
      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5852
      *\ 2.11.*) ;; # other 2.11 versions
5853
      *) supports_anon_versioning=yes ;;
5854
    esac
5855
 
5856
    # See if GNU ld supports shared libraries.
5857
    case $host_os in
5858
    aix[[3-9]]*)
5859
      # On AIX/PPC, the GNU linker is very broken
5860
      if test "$host_cpu" != ia64; then
5861
	_LT_TAGVAR(ld_shlibs, $1)=no
5862
	cat <<_LT_EOF 1>&2
5863
 
5864
*** Warning: the GNU linker, at least up to release 2.19, is reported
5865
*** to be unable to reliably create shared libraries on AIX.
5866
*** Therefore, libtool is disabling shared libraries support.  If you
5867
*** really care for shared libraries, you may want to install binutils
5868
*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5869
*** You will then need to restart the configuration process.
5870
 
5871
_LT_EOF
5872
      fi
5873
      ;;
5874
 
5875
    amigaos*)
5876
      case $host_cpu in
5877
      powerpc)
5878
            # see comment about AmigaOS4 .so support
5879
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5880
            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5881
        ;;
5882
      m68k)
5883
            _LT_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)'
5884
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5885
            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5886
        ;;
5887
      esac
5888
      ;;
5889
 
5890
    beos*)
5891
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5892
	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5893
	# Joseph Beckenbach  says some releases of gcc
5894
	# support --undefined.  This deserves some investigation.  FIXME
5895
	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5896
      else
5897
	_LT_TAGVAR(ld_shlibs, $1)=no
5898
      fi
5899
      ;;
5900
 
5901
    cygwin* | mingw* | pw32* | cegcc*)
5902
      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5903
      # as there is no search path for DLLs.
5904
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5905
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
5906
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5907
      _LT_TAGVAR(always_export_symbols, $1)=no
5908
      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5909
      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5910
      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5911
 
5912
      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5913
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5914
	# If the export-symbols file already is a .def file (1st line
5915
	# is EXPORTS), use it as is; otherwise, prepend...
5916
	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5917
	  cp $export_symbols $output_objdir/$soname.def;
5918
	else
5919
	  echo EXPORTS > $output_objdir/$soname.def;
5920
	  cat $export_symbols >> $output_objdir/$soname.def;
5921
	fi~
5922
	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5923
      else
5924
	_LT_TAGVAR(ld_shlibs, $1)=no
5925
      fi
5926
      ;;
5927
 
5928
    haiku*)
5929
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5930
      _LT_TAGVAR(link_all_deplibs, $1)=yes
5931
      ;;
5932
 
5933
    interix[[3-9]]*)
5934
      _LT_TAGVAR(hardcode_direct, $1)=no
5935
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5936
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5937
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5938
      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5939
      # Instead, shared libraries are loaded at an image base (0x10000000 by
5940
      # default) and relocated if they conflict, which is a slow very memory
5941
      # consuming and fragmenting process.  To avoid this, we pick a random,
5942
      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5943
      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5944
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5945
      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5946
      ;;
5947
 
5948
    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5949
      tmp_diet=no
5950
      if test "$host_os" = linux-dietlibc; then
5951
	case $cc_basename in
5952
	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
5953
	esac
5954
      fi
5955
      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5956
	 && test "$tmp_diet" = no
5957
      then
5958
	tmp_addflag=' $pic_flag'
5959
	tmp_sharedflag='-shared'
5960
	case $cc_basename,$host_cpu in
5961
        pgcc*)				# Portland Group C compiler
5962
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5963
	  tmp_addflag=' $pic_flag'
5964
	  ;;
5965
	pgf77* | pgf90* | pgf95* | pgfortran*)
5966
					# Portland Group f77 and f90 compilers
5967
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5968
	  tmp_addflag=' $pic_flag -Mnomain' ;;
5969
	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
5970
	  tmp_addflag=' -i_dynamic' ;;
5971
	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5972
	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5973
	ifc* | ifort*)			# Intel Fortran compiler
5974
	  tmp_addflag=' -nofor_main' ;;
5975
	lf95*)				# Lahey Fortran 8.1
5976
	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5977
	  tmp_sharedflag='--shared' ;;
5978
	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5979
	  tmp_sharedflag='-qmkshrobj'
5980
	  tmp_addflag= ;;
5981
	nvcc*)	# Cuda Compiler Driver 2.2
5982
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5983
	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5984
	  ;;
5985
	esac
5986
	case `$CC -V 2>&1 | sed 5q` in
5987
	*Sun\ C*)			# Sun C 5.9
5988
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5989
	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5990
	  tmp_sharedflag='-G' ;;
5991
	*Sun\ F*)			# Sun Fortran 8.3
5992
	  tmp_sharedflag='-G' ;;
5993
	esac
5994
	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5995
 
5996
        if test "x$supports_anon_versioning" = xyes; then
5997
          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5998
	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5999
	    echo "local: *; };" >> $output_objdir/$libname.ver~
6000
	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6001
        fi
6002
 
6003
	case $cc_basename in
6004
	xlf* | bgf* | bgxlf* | mpixlf*)
6005
	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
6006
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
6007
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6008
	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
6009
	  if test "x$supports_anon_versioning" = xyes; then
6010
	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6011
	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6012
	      echo "local: *; };" >> $output_objdir/$libname.ver~
6013
	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
6014
	  fi
6015
	  ;;
6016
	esac
6017
      else
6018
        _LT_TAGVAR(ld_shlibs, $1)=no
6019
      fi
6020
      ;;
6021
 
6022
    netbsd* | netbsdelf*-gnu)
6023
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6024
	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6025
	wlarc=
6026
      else
6027
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6028
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6029
      fi
6030
      ;;
6031
 
6032
    solaris*)
6033
      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
6034
	_LT_TAGVAR(ld_shlibs, $1)=no
6035
	cat <<_LT_EOF 1>&2
6036
 
6037
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
6038
*** create shared libraries on Solaris systems.  Therefore, libtool
6039
*** is disabling shared libraries support.  We urge you to upgrade GNU
6040
*** binutils to release 2.9.1 or newer.  Another option is to modify
6041
*** your PATH or compiler configuration so that the native linker is
6042
*** used, and then restart.
6043
 
6044
_LT_EOF
6045
      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6046
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6047
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6048
      else
6049
	_LT_TAGVAR(ld_shlibs, $1)=no
6050
      fi
6051
      ;;
6052
 
6053
    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6054
      case `$LD -v 2>&1` in
6055
        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6056
	_LT_TAGVAR(ld_shlibs, $1)=no
6057
	cat <<_LT_EOF 1>&2
6058
 
6059
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6060
*** reliably create shared libraries on SCO systems.  Therefore, libtool
6061
*** is disabling shared libraries support.  We urge you to upgrade GNU
6062
*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
6063
*** your PATH or compiler configuration so that the native linker is
6064
*** used, and then restart.
6065
 
6066
_LT_EOF
6067
	;;
6068
	*)
6069
	  # For security reasons, it is highly recommended that you always
6070
	  # use absolute paths for naming shared libraries, and exclude the
6071
	  # DT_RUNPATH tag from executables and libraries.  But doing so
6072
	  # requires that you compile everything twice, which is a pain.
6073
	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6074
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6075
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6076
	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6077
	  else
6078
	    _LT_TAGVAR(ld_shlibs, $1)=no
6079
	  fi
6080
	;;
6081
      esac
6082
      ;;
6083
 
6084
    sunos4*)
6085
      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6086
      wlarc=
6087
      _LT_TAGVAR(hardcode_direct, $1)=yes
6088
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6089
      ;;
6090
 
6091
    *)
6092
      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6093
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6094
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6095
      else
6096
	_LT_TAGVAR(ld_shlibs, $1)=no
6097
      fi
6098
      ;;
6099
    esac
6100
 
6101
    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
6102
      runpath_var=
6103
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6104
      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6105
      _LT_TAGVAR(whole_archive_flag_spec, $1)=
6106
    fi
6107
  else
6108
    # PORTME fill in a description of your system's linker (not GNU ld)
6109
    case $host_os in
6110
    aix3*)
6111
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6112
      _LT_TAGVAR(always_export_symbols, $1)=yes
6113
      _LT_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'
6114
      # Note: this linker hardcodes the directories in LIBPATH if there
6115
      # are no directories specified by -L.
6116
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6117
      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6118
	# Neither direct hardcoding nor static linking is supported with a
6119
	# broken collect2.
6120
	_LT_TAGVAR(hardcode_direct, $1)=unsupported
6121
      fi
6122
      ;;
6123
 
6124
    aix[[4-9]]*)
6125
      if test "$host_cpu" = ia64; then
6126
	# On IA64, the linker does run time linking by default, so we don't
6127
	# have to do anything special.
6128
	aix_use_runtimelinking=no
6129
	exp_sym_flag='-Bexport'
6130
	no_entry_flag=""
6131
      else
6132
	# If we're using GNU nm, then we don't want the "-C" option.
6133
	# -C means demangle to AIX nm, but means don't demangle with GNU nm
6134
	# Also, AIX nm treats weak defined symbols like other global
6135
	# defined symbols, whereas GNU nm marks them as "W".
6136
	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6137
	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
6138
	else
6139
	  _LT_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'
6140
	fi
6141
	aix_use_runtimelinking=no
6142
 
6143
	# Test if we are trying to use run time linking or normal
6144
	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
6145
	# need to do runtime linking.
6146
	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6147
	  for ld_flag in $LDFLAGS; do
6148
	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6149
	    aix_use_runtimelinking=yes
6150
	    break
6151
	  fi
6152
	  done
6153
	  ;;
6154
	esac
6155
 
6156
	exp_sym_flag='-bexport'
6157
	no_entry_flag='-bnoentry'
6158
      fi
6159
 
6160
      # When large executables or shared objects are built, AIX ld can
6161
      # have problems creating the table of contents.  If linking a library
6162
      # or program results in "error TOC overflow" add -mminimal-toc to
6163
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6164
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6165
 
6166
      _LT_TAGVAR(archive_cmds, $1)=''
6167
      _LT_TAGVAR(hardcode_direct, $1)=yes
6168
      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6169
      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6170
      _LT_TAGVAR(link_all_deplibs, $1)=yes
6171
      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6172
 
6173
      if test "$GCC" = yes; then
6174
	case $host_os in aix4.[[012]]|aix4.[[012]].*)
6175
	# We only want to do this on AIX 4.2 and lower, the check
6176
	# below for broken collect2 doesn't work under 4.3+
6177
	  collect2name=`${CC} -print-prog-name=collect2`
6178
	  if test -f "$collect2name" &&
6179
	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6180
	  then
6181
	  # We have reworked collect2
6182
	  :
6183
	  else
6184
	  # We have old collect2
6185
	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
6186
	  # It fails to find uninstalled libraries when the uninstalled
6187
	  # path is not listed in the libpath.  Setting hardcode_minus_L
6188
	  # to unsupported forces relinking
6189
	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
6190
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6191
	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
6192
	  fi
6193
	  ;;
6194
	esac
6195
	shared_flag='-shared'
6196
	if test "$aix_use_runtimelinking" = yes; then
6197
	  shared_flag="$shared_flag "'${wl}-G'
6198
	fi
6199
	_LT_TAGVAR(link_all_deplibs, $1)=no
6200
      else
6201
	# not using gcc
6202
	if test "$host_cpu" = ia64; then
6203
	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6204
	# chokes on -Wl,-G. The following line is correct:
6205
	  shared_flag='-G'
6206
	else
6207
	  if test "$aix_use_runtimelinking" = yes; then
6208
	    shared_flag='${wl}-G'
6209
	  else
6210
	    shared_flag='${wl}-bM:SRE'
6211
	  fi
6212
	fi
6213
      fi
6214
 
6215
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6216
      # It seems that -bexpall does not export symbols beginning with
6217
      # underscore (_), so it is better to generate a list of symbols to export.
6218
      _LT_TAGVAR(always_export_symbols, $1)=yes
6219
      if test "$aix_use_runtimelinking" = yes; then
6220
	# Warning - without using the other runtime loading flags (-brtl),
6221
	# -berok will link without error, but may produce a broken library.
6222
	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6223
        # Determine the default libpath from the value encoded in an
6224
        # empty executable.
6225
        _LT_SYS_MODULE_PATH_AIX([$1])
6226
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6227
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6228
      else
6229
	if test "$host_cpu" = ia64; then
6230
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6231
	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6232
	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6233
	else
6234
	 # Determine the default libpath from the value encoded in an
6235
	 # empty executable.
6236
	 _LT_SYS_MODULE_PATH_AIX([$1])
6237
	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6238
	  # Warning - without using the other run time loading flags,
6239
	  # -berok will link without error, but may produce a broken library.
6240
	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6241
	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6242
	  if test "$with_gnu_ld" = yes; then
6243
	    # We only use this code for GNU lds that support --whole-archive.
6244
	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6245
	  else
6246
	    # Exported symbols can be pulled into shared objects from archives
6247
	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6248
	  fi
6249
	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6250
	  # This is similar to how AIX traditionally builds its shared libraries.
6251
	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6252
	fi
6253
      fi
6254
      ;;
6255
 
6256
    amigaos*)
6257
      case $host_cpu in
6258
      powerpc)
6259
            # see comment about AmigaOS4 .so support
6260
            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6261
            _LT_TAGVAR(archive_expsym_cmds, $1)=''
6262
        ;;
6263
      m68k)
6264
            _LT_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)'
6265
            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6266
            _LT_TAGVAR(hardcode_minus_L, $1)=yes
6267
        ;;
6268
      esac
6269
      ;;
6270
 
6271
    bsdi[[45]]*)
6272
      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6273
      ;;
6274
 
6275
    cygwin* | mingw* | pw32* | cegcc*)
6276
      # When not using gcc, we currently assume that we are using
6277
      # Microsoft Visual C++.
6278
      # hardcode_libdir_flag_spec is actually meaningless, as there is
6279
      # no search path for DLLs.
6280
      case $cc_basename in
6281
      cl*)
6282
	# Native MSVC
6283
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6284
	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6285
	_LT_TAGVAR(always_export_symbols, $1)=yes
6286
	_LT_TAGVAR(file_list_spec, $1)='@'
6287
	# Tell ltmain to make .lib files, not .a files.
6288
	libext=lib
6289
	# Tell ltmain to make .dll files, not .so files.
6290
	shrext_cmds=".dll"
6291
	# FIXME: Setting linknames here is a bad hack.
6292
	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6293
	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6294
	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6295
	  else
6296
	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6297
	  fi~
6298
	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6299
	  linknames='
6300
	# The linker will not automatically build a static lib if we build a DLL.
6301
	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6302
	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6303
	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
6304
	_LT_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'
6305
	# Don't use ranlib
6306
	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6307
	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6308
	  lt_tool_outputfile="@TOOL_OUTPUT@"~
6309
	  case $lt_outputfile in
6310
	    *.exe|*.EXE) ;;
6311
	    *)
6312
	      lt_outputfile="$lt_outputfile.exe"
6313
	      lt_tool_outputfile="$lt_tool_outputfile.exe"
6314
	      ;;
6315
	  esac~
6316
	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6317
	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6318
	    $RM "$lt_outputfile.manifest";
6319
	  fi'
6320
	;;
6321
      *)
6322
	# Assume MSVC wrapper
6323
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6324
	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6325
	# Tell ltmain to make .lib files, not .a files.
6326
	libext=lib
6327
	# Tell ltmain to make .dll files, not .so files.
6328
	shrext_cmds=".dll"
6329
	# FIXME: Setting linknames here is a bad hack.
6330
	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
6331
	# The linker will automatically build a .lib file if we build a DLL.
6332
	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6333
	# FIXME: Should let the user specify the lib program.
6334
	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6335
	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6336
	;;
6337
      esac
6338
      ;;
6339
 
6340
    darwin* | rhapsody*)
6341
      _LT_DARWIN_LINKER_FEATURES($1)
6342
      ;;
6343
 
6344
    dgux*)
6345
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6346
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6347
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6348
      ;;
6349
 
6350
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6351
    # support.  Future versions do this automatically, but an explicit c++rt0.o
6352
    # does not break anything, and helps significantly (at the cost of a little
6353
    # extra space).
6354
    freebsd2.2*)
6355
      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6356
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6357
      _LT_TAGVAR(hardcode_direct, $1)=yes
6358
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6359
      ;;
6360
 
6361
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6362
    freebsd2.*)
6363
      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6364
      _LT_TAGVAR(hardcode_direct, $1)=yes
6365
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6366
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6367
      ;;
6368
 
6369
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6370
    freebsd* | dragonfly*)
6371
      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6372
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6373
      _LT_TAGVAR(hardcode_direct, $1)=yes
6374
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6375
      ;;
6376
 
6377
    hpux9*)
6378
      if test "$GCC" = yes; then
6379
	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6380
      else
6381
	_LT_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'
6382
      fi
6383
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6384
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6385
      _LT_TAGVAR(hardcode_direct, $1)=yes
6386
 
6387
      # hardcode_minus_L: Not really in the search PATH,
6388
      # but as the default location of the library.
6389
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6390
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6391
      ;;
6392
 
6393
    hpux10*)
6394
      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6395
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6396
      else
6397
	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6398
      fi
6399
      if test "$with_gnu_ld" = no; then
6400
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6401
	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6402
	_LT_TAGVAR(hardcode_direct, $1)=yes
6403
	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6404
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6405
	# hardcode_minus_L: Not really in the search PATH,
6406
	# but as the default location of the library.
6407
	_LT_TAGVAR(hardcode_minus_L, $1)=yes
6408
      fi
6409
      ;;
6410
 
6411
    hpux11*)
6412
      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6413
	case $host_cpu in
6414
	hppa*64*)
6415
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6416
	  ;;
6417
	ia64*)
6418
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6419
	  ;;
6420
	*)
6421
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6422
	  ;;
6423
	esac
6424
      else
6425
	case $host_cpu in
6426
	hppa*64*)
6427
	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6428
	  ;;
6429
	ia64*)
6430
	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6431
	  ;;
6432
	*)
6433
	m4_if($1, [], [
6434
	  # Older versions of the 11.00 compiler do not understand -b yet
6435
	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
6436
	  _LT_LINKER_OPTION([if $CC understands -b],
6437
	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
6438
	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
6439
	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
6440
	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
6441
	  ;;
6442
	esac
6443
      fi
6444
      if test "$with_gnu_ld" = no; then
6445
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6446
	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6447
 
6448
	case $host_cpu in
6449
	hppa*64*|ia64*)
6450
	  _LT_TAGVAR(hardcode_direct, $1)=no
6451
	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6452
	  ;;
6453
	*)
6454
	  _LT_TAGVAR(hardcode_direct, $1)=yes
6455
	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6456
	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6457
 
6458
	  # hardcode_minus_L: Not really in the search PATH,
6459
	  # but as the default location of the library.
6460
	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
6461
	  ;;
6462
	esac
6463
      fi
6464
      ;;
6465
 
6466
    irix5* | irix6* | nonstopux*)
6467
      if test "$GCC" = yes; then
6468
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6469
	# Try to use the -exported_symbol ld option, if it does not
6470
	# work, assume that -exports_file does not work either and
6471
	# implicitly export all symbols.
6472
	# This should be the same for all languages, so no per-tag cache variable.
6473
	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
6474
	  [lt_cv_irix_exported_symbol],
6475
	  [save_LDFLAGS="$LDFLAGS"
6476
	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6477
	   AC_LINK_IFELSE(
6478
	     [AC_LANG_SOURCE(
6479
	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
6480
			      [C++], [[int foo (void) { return 0; }]],
6481
			      [Fortran 77], [[
6482
      subroutine foo
6483
      end]],
6484
			      [Fortran], [[
6485
      subroutine foo
6486
      end]])])],
6487
	      [lt_cv_irix_exported_symbol=yes],
6488
	      [lt_cv_irix_exported_symbol=no])
6489
           LDFLAGS="$save_LDFLAGS"])
6490
	if test "$lt_cv_irix_exported_symbol" = yes; then
6491
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
6492
	fi
6493
      else
6494
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6495
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
6496
      fi
6497
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6498
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6499
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6500
      _LT_TAGVAR(inherit_rpath, $1)=yes
6501
      _LT_TAGVAR(link_all_deplibs, $1)=yes
6502
      ;;
6503
 
6504
    netbsd* | netbsdelf*-gnu)
6505
      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6506
	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6507
      else
6508
	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6509
      fi
6510
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6511
      _LT_TAGVAR(hardcode_direct, $1)=yes
6512
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6513
      ;;
6514
 
6515
    newsos6)
6516
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6517
      _LT_TAGVAR(hardcode_direct, $1)=yes
6518
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6519
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6520
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6521
      ;;
6522
 
6523
    *nto* | *qnx*)
6524
      ;;
6525
 
6526
    openbsd*)
6527
      if test -f /usr/libexec/ld.so; then
6528
	_LT_TAGVAR(hardcode_direct, $1)=yes
6529
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6530
	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6531
	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6532
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6533
	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6534
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6535
	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6536
	else
6537
	  case $host_os in
6538
	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6539
	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6540
	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6541
	     ;;
6542
	   *)
6543
	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6544
	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6545
	     ;;
6546
	  esac
6547
	fi
6548
      else
6549
	_LT_TAGVAR(ld_shlibs, $1)=no
6550
      fi
6551
      ;;
6552
 
6553
    os2*)
6554
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6555
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6556
      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6557
      _LT_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'
6558
      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6559
      ;;
6560
 
6561
    osf3*)
6562
      if test "$GCC" = yes; then
6563
	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6564
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6565
      else
6566
	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6567
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6568
      fi
6569
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6570
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6571
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6572
      ;;
6573
 
6574
    osf4* | osf5*)	# as osf3* with the addition of -msym flag
6575
      if test "$GCC" = yes; then
6576
	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6577
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6578
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6579
      else
6580
	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6581
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6582
	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
6583
	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
6584
 
6585
	# Both c and cxx compiler support -rpath directly
6586
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6587
      fi
6588
      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6589
      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6590
      ;;
6591
 
6592
    solaris*)
6593
      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6594
      if test "$GCC" = yes; then
6595
	wlarc='${wl}'
6596
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6597
	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6598
	  $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6599
      else
6600
	case `$CC -V 2>&1` in
6601
	*"Compilers 5.0"*)
6602
	  wlarc=''
6603
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6604
	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6605
	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6606
	  ;;
6607
	*)
6608
	  wlarc='${wl}'
6609
	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6610
	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6611
	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6612
	  ;;
6613
	esac
6614
      fi
6615
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6616
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6617
      case $host_os in
6618
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6619
      *)
6620
	# The compiler driver will combine and reorder linker options,
6621
	# but understands `-z linker_flag'.  GCC discards it without `$wl',
6622
	# but is careful enough not to reorder.
6623
	# Supported since Solaris 2.6 (maybe 2.5.1?)
6624
	if test "$GCC" = yes; then
6625
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6626
	else
6627
	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6628
	fi
6629
	;;
6630
      esac
6631
      _LT_TAGVAR(link_all_deplibs, $1)=yes
6632
      ;;
6633
 
6634
    sunos4*)
6635
      if test "x$host_vendor" = xsequent; then
6636
	# Use $CC to link under sequent, because it throws in some extra .o
6637
	# files that make .init and .fini sections work.
6638
	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6639
      else
6640
	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6641
      fi
6642
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6643
      _LT_TAGVAR(hardcode_direct, $1)=yes
6644
      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6645
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6646
      ;;
6647
 
6648
    sysv4)
6649
      case $host_vendor in
6650
	sni)
6651
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6652
	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6653
	;;
6654
	siemens)
6655
	  ## LD is ld it makes a PLAMLIB
6656
	  ## CC just makes a GrossModule.
6657
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6658
	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6659
	  _LT_TAGVAR(hardcode_direct, $1)=no
6660
        ;;
6661
	motorola)
6662
	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6663
	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6664
	;;
6665
      esac
6666
      runpath_var='LD_RUN_PATH'
6667
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6668
      ;;
6669
 
6670
    sysv4.3*)
6671
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6672
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6673
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6674
      ;;
6675
 
6676
    sysv4*MP*)
6677
      if test -d /usr/nec; then
6678
	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6679
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6680
	runpath_var=LD_RUN_PATH
6681
	hardcode_runpath_var=yes
6682
	_LT_TAGVAR(ld_shlibs, $1)=yes
6683
      fi
6684
      ;;
6685
 
6686
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6687
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6688
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6689
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6690
      runpath_var='LD_RUN_PATH'
6691
 
6692
      if test "$GCC" = yes; then
6693
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6694
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6695
      else
6696
	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6697
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6698
      fi
6699
      ;;
6700
 
6701
    sysv5* | sco3.2v5* | sco5v6*)
6702
      # Note: We can NOT use -z defs as we might desire, because we do not
6703
      # link with -lc, and that would cause any symbols used from libc to
6704
      # always be unresolved, which means just about no library would
6705
      # ever link correctly.  If we're not using GNU ld we use -z text
6706
      # though, which does catch some bad symbols but isn't as heavy-handed
6707
      # as -z defs.
6708
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6709
      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6710
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6711
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6712
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6713
      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6714
      _LT_TAGVAR(link_all_deplibs, $1)=yes
6715
      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6716
      runpath_var='LD_RUN_PATH'
6717
 
6718
      if test "$GCC" = yes; then
6719
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6720
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6721
      else
6722
	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6723
	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6724
      fi
6725
      ;;
6726
 
6727
    uts4*)
6728
      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6729
      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6730
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6731
      ;;
6732
 
6733
    *)
6734
      _LT_TAGVAR(ld_shlibs, $1)=no
6735
      ;;
6736
    esac
6737
 
6738
    if test x$host_vendor = xsni; then
6739
      case $host in
6740
      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6741
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6742
	;;
6743
      esac
6744
    fi
6745
  fi
6746
])
6747
AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6748
test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6749
 
6750
_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6751
 
6752
_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6753
_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6754
_LT_DECL([], [extract_expsyms_cmds], [2],
6755
    [The commands to extract the exported symbol list from a shared archive])
6756
 
6757
#
6758
# Do we need to explicitly link libc?
6759
#
6760
case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6761
x|xyes)
6762
  # Assume -lc should be added
6763
  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6764
 
6765
  if test "$enable_shared" = yes && test "$GCC" = yes; then
6766
    case $_LT_TAGVAR(archive_cmds, $1) in
6767
    *'~'*)
6768
      # FIXME: we may have to deal with multi-command sequences.
6769
      ;;
6770
    '$CC '*)
6771
      # Test whether the compiler implicitly links with -lc since on some
6772
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6773
      # to ld, don't add -lc before -lgcc.
6774
      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6775
	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6776
	[$RM conftest*
6777
	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6778
 
6779
	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6780
	  soname=conftest
6781
	  lib=conftest
6782
	  libobjs=conftest.$ac_objext
6783
	  deplibs=
6784
	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6785
	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6786
	  compiler_flags=-v
6787
	  linker_flags=-v
6788
	  verstring=
6789
	  output_objdir=.
6790
	  libname=conftest
6791
	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6792
	  _LT_TAGVAR(allow_undefined_flag, $1)=
6793
	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6794
	  then
6795
	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6796
	  else
6797
	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6798
	  fi
6799
	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6800
	else
6801
	  cat conftest.err 1>&5
6802
	fi
6803
	$RM conftest*
6804
	])
6805
      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6806
      ;;
6807
    esac
6808
  fi
6809
  ;;
6810
esac
6811
 
6812
_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6813
    [Whether or not to add -lc for building shared libraries])
6814
_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6815
    [enable_shared_with_static_runtimes], [0],
6816
    [Whether or not to disallow shared libs when runtime libs are static])
6817
_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6818
    [Compiler flag to allow reflexive dlopens])
6819
_LT_TAGDECL([], [whole_archive_flag_spec], [1],
6820
    [Compiler flag to generate shared objects directly from archives])
6821
_LT_TAGDECL([], [compiler_needs_object], [1],
6822
    [Whether the compiler copes with passing no objects directly])
6823
_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6824
    [Create an old-style archive from a shared archive])
6825
_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6826
    [Create a temporary old-style archive to link instead of a shared archive])
6827
_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6828
_LT_TAGDECL([], [archive_expsym_cmds], [2])
6829
_LT_TAGDECL([], [module_cmds], [2],
6830
    [Commands used to build a loadable module if different from building
6831
    a shared archive.])
6832
_LT_TAGDECL([], [module_expsym_cmds], [2])
6833
_LT_TAGDECL([], [with_gnu_ld], [1],
6834
    [Whether we are building with GNU ld or not])
6835
_LT_TAGDECL([], [allow_undefined_flag], [1],
6836
    [Flag that allows shared libraries with undefined symbols to be built])
6837
_LT_TAGDECL([], [no_undefined_flag], [1],
6838
    [Flag that enforces no undefined symbols])
6839
_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6840
    [Flag to hardcode $libdir into a binary during linking.
6841
    This must work even if $libdir does not exist])
6842
_LT_TAGDECL([], [hardcode_libdir_separator], [1],
6843
    [Whether we need a single "-rpath" flag with a separated argument])
6844
_LT_TAGDECL([], [hardcode_direct], [0],
6845
    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6846
    DIR into the resulting binary])
6847
_LT_TAGDECL([], [hardcode_direct_absolute], [0],
6848
    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6849
    DIR into the resulting binary and the resulting library dependency is
6850
    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6851
    library is relocated])
6852
_LT_TAGDECL([], [hardcode_minus_L], [0],
6853
    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6854
    into the resulting binary])
6855
_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6856
    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6857
    into the resulting binary])
6858
_LT_TAGDECL([], [hardcode_automatic], [0],
6859
    [Set to "yes" if building a shared library automatically hardcodes DIR
6860
    into the library and all subsequent libraries and executables linked
6861
    against it])
6862
_LT_TAGDECL([], [inherit_rpath], [0],
6863
    [Set to yes if linker adds runtime paths of dependent libraries
6864
    to runtime path list])
6865
_LT_TAGDECL([], [link_all_deplibs], [0],
6866
    [Whether libtool must link a program against all its dependency libraries])
6867
_LT_TAGDECL([], [always_export_symbols], [0],
6868
    [Set to "yes" if exported symbols are required])
6869
_LT_TAGDECL([], [export_symbols_cmds], [2],
6870
    [The commands to list exported symbols])
6871
_LT_TAGDECL([], [exclude_expsyms], [1],
6872
    [Symbols that should not be listed in the preloaded symbols])
6873
_LT_TAGDECL([], [include_expsyms], [1],
6874
    [Symbols that must always be exported])
6875
_LT_TAGDECL([], [prelink_cmds], [2],
6876
    [Commands necessary for linking programs (against libraries) with templates])
6877
_LT_TAGDECL([], [postlink_cmds], [2],
6878
    [Commands necessary for finishing linking programs])
6879
_LT_TAGDECL([], [file_list_spec], [1],
6880
    [Specify filename containing input files])
6881
dnl FIXME: Not yet implemented
6882
dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6883
dnl    [Compiler flag to generate thread safe objects])
6884
])# _LT_LINKER_SHLIBS
6885
 
6886
 
6887
# _LT_LANG_C_CONFIG([TAG])
6888
# ------------------------
6889
# Ensure that the configuration variables for a C compiler are suitably
6890
# defined.  These variables are subsequently used by _LT_CONFIG to write
6891
# the compiler configuration to `libtool'.
6892
m4_defun([_LT_LANG_C_CONFIG],
6893
[m4_require([_LT_DECL_EGREP])dnl
6894
lt_save_CC="$CC"
6895
AC_LANG_PUSH(C)
6896
 
6897
# Source file extension for C test sources.
6898
ac_ext=c
6899
 
6900
# Object file extension for compiled C test sources.
6901
objext=o
6902
_LT_TAGVAR(objext, $1)=$objext
6903
 
6904
# Code to be used in simple compile tests
6905
lt_simple_compile_test_code="int some_variable = 0;"
6906
 
6907
# Code to be used in simple link tests
6908
lt_simple_link_test_code='int main(){return(0);}'
6909
 
6910
_LT_TAG_COMPILER
6911
# Save the default compiler, since it gets overwritten when the other
6912
# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6913
compiler_DEFAULT=$CC
6914
 
6915
# save warnings/boilerplate of simple test code
6916
_LT_COMPILER_BOILERPLATE
6917
_LT_LINKER_BOILERPLATE
6918
 
6919
if test -n "$compiler"; then
6920
  _LT_COMPILER_NO_RTTI($1)
6921
  _LT_COMPILER_PIC($1)
6922
  _LT_COMPILER_C_O($1)
6923
  _LT_COMPILER_FILE_LOCKS($1)
6924
  _LT_LINKER_SHLIBS($1)
6925
  _LT_SYS_DYNAMIC_LINKER($1)
6926
  _LT_LINKER_HARDCODE_LIBPATH($1)
6927
  LT_SYS_DLOPEN_SELF
6928
  _LT_CMD_STRIPLIB
6929
 
6930
  # Report which library types will actually be built
6931
  AC_MSG_CHECKING([if libtool supports shared libraries])
6932
  AC_MSG_RESULT([$can_build_shared])
6933
 
6934
  AC_MSG_CHECKING([whether to build shared libraries])
6935
  test "$can_build_shared" = "no" && enable_shared=no
6936
 
6937
  # On AIX, shared libraries and static libraries use the same namespace, and
6938
  # are all built from PIC.
6939
  case $host_os in
6940
  aix3*)
6941
    test "$enable_shared" = yes && enable_static=no
6942
    if test -n "$RANLIB"; then
6943
      archive_cmds="$archive_cmds~\$RANLIB \$lib"
6944
      postinstall_cmds='$RANLIB $lib'
6945
    fi
6946
    ;;
6947
 
6948
  aix[[4-9]]*)
6949
    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6950
      test "$enable_shared" = yes && enable_static=no
6951
    fi
6952
    ;;
6953
  esac
6954
  AC_MSG_RESULT([$enable_shared])
6955
 
6956
  AC_MSG_CHECKING([whether to build static libraries])
6957
  # Make sure either enable_shared or enable_static is yes.
6958
  test "$enable_shared" = yes || enable_static=yes
6959
  AC_MSG_RESULT([$enable_static])
6960
 
6961
  _LT_CONFIG($1)
6962
fi
6963
AC_LANG_POP
6964
CC="$lt_save_CC"
6965
])# _LT_LANG_C_CONFIG
6966
 
6967
 
6968
# _LT_LANG_CXX_CONFIG([TAG])
6969
# --------------------------
6970
# Ensure that the configuration variables for a C++ compiler are suitably
6971
# defined.  These variables are subsequently used by _LT_CONFIG to write
6972
# the compiler configuration to `libtool'.
6973
m4_defun([_LT_LANG_CXX_CONFIG],
6974
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6975
m4_require([_LT_DECL_EGREP])dnl
6976
m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6977
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6978
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6979
    (test "X$CXX" != "Xg++"))) ; then
6980
  AC_PROG_CXXCPP
6981
else
6982
  _lt_caught_CXX_error=yes
6983
fi
6984
 
6985
AC_LANG_PUSH(C++)
6986
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6987
_LT_TAGVAR(allow_undefined_flag, $1)=
6988
_LT_TAGVAR(always_export_symbols, $1)=no
6989
_LT_TAGVAR(archive_expsym_cmds, $1)=
6990
_LT_TAGVAR(compiler_needs_object, $1)=no
6991
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6992
_LT_TAGVAR(hardcode_direct, $1)=no
6993
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6994
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6995
_LT_TAGVAR(hardcode_libdir_separator, $1)=
6996
_LT_TAGVAR(hardcode_minus_L, $1)=no
6997
_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6998
_LT_TAGVAR(hardcode_automatic, $1)=no
6999
_LT_TAGVAR(inherit_rpath, $1)=no
7000
_LT_TAGVAR(module_cmds, $1)=
7001
_LT_TAGVAR(module_expsym_cmds, $1)=
7002
_LT_TAGVAR(link_all_deplibs, $1)=unknown
7003
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7004
_LT_TAGVAR(reload_flag, $1)=$reload_flag
7005
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7006
_LT_TAGVAR(no_undefined_flag, $1)=
7007
_LT_TAGVAR(whole_archive_flag_spec, $1)=
7008
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7009
 
7010
# Source file extension for C++ test sources.
7011
ac_ext=cpp
7012
 
7013
# Object file extension for compiled C++ test sources.
7014
objext=o
7015
_LT_TAGVAR(objext, $1)=$objext
7016
 
7017
# No sense in running all these tests if we already determined that
7018
# the CXX compiler isn't working.  Some variables (like enable_shared)
7019
# are currently assumed to apply to all compilers on this platform,
7020
# and will be corrupted by setting them based on a non-working compiler.
7021
if test "$_lt_caught_CXX_error" != yes; then
7022
  # Code to be used in simple compile tests
7023
  lt_simple_compile_test_code="int some_variable = 0;"
7024
 
7025
  # Code to be used in simple link tests
7026
  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
7027
 
7028
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7029
  _LT_TAG_COMPILER
7030
 
7031
  # save warnings/boilerplate of simple test code
7032
  _LT_COMPILER_BOILERPLATE
7033
  _LT_LINKER_BOILERPLATE
7034
 
7035
  # Allow CC to be a program name with arguments.
7036
  lt_save_CC=$CC
7037
  lt_save_CFLAGS=$CFLAGS
7038
  lt_save_LD=$LD
7039
  lt_save_GCC=$GCC
7040
  GCC=$GXX
7041
  lt_save_with_gnu_ld=$with_gnu_ld
7042
  lt_save_path_LD=$lt_cv_path_LD
7043
  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
7044
    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
7045
  else
7046
    $as_unset lt_cv_prog_gnu_ld
7047
  fi
7048
  if test -n "${lt_cv_path_LDCXX+set}"; then
7049
    lt_cv_path_LD=$lt_cv_path_LDCXX
7050
  else
7051
    $as_unset lt_cv_path_LD
7052
  fi
7053
  test -z "${LDCXX+set}" || LD=$LDCXX
7054
  CC=${CXX-"c++"}
7055
  CFLAGS=$CXXFLAGS
7056
  compiler=$CC
7057
  _LT_TAGVAR(compiler, $1)=$CC
7058
  _LT_CC_BASENAME([$compiler])
7059
 
7060
  if test -n "$compiler"; then
7061
    # We don't want -fno-exception when compiling C++ code, so set the
7062
    # no_builtin_flag separately
7063
    if test "$GXX" = yes; then
7064
      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7065
    else
7066
      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7067
    fi
7068
 
7069
    if test "$GXX" = yes; then
7070
      # Set up default GNU C++ configuration
7071
 
7072
      LT_PATH_LD
7073
 
7074
      # Check if GNU C++ uses GNU ld as the underlying linker, since the
7075
      # archiving commands below assume that GNU ld is being used.
7076
      if test "$with_gnu_ld" = yes; then
7077
        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7078
        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7079
 
7080
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7081
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7082
 
7083
        # If archive_cmds runs LD, not CC, wlarc should be empty
7084
        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7085
        #     investigate it a little bit more. (MM)
7086
        wlarc='${wl}'
7087
 
7088
        # ancient GNU ld didn't support --whole-archive et. al.
7089
        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
7090
	  $GREP 'no-whole-archive' > /dev/null; then
7091
          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7092
        else
7093
          _LT_TAGVAR(whole_archive_flag_spec, $1)=
7094
        fi
7095
      else
7096
        with_gnu_ld=no
7097
        wlarc=
7098
 
7099
        # A generic and very simple default shared library creation
7100
        # command for GNU C++ for the case where it uses the native
7101
        # linker, instead of GNU ld.  If possible, this setting should
7102
        # overridden to take advantage of the native linker features on
7103
        # the platform it is being used on.
7104
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7105
      fi
7106
 
7107
      # Commands to make compiler produce verbose output that lists
7108
      # what "hidden" libraries, object files and flags are used when
7109
      # linking a shared library.
7110
      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7111
 
7112
    else
7113
      GXX=no
7114
      with_gnu_ld=no
7115
      wlarc=
7116
    fi
7117
 
7118
    # PORTME: fill in a description of your system's C++ link characteristics
7119
    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7120
    _LT_TAGVAR(ld_shlibs, $1)=yes
7121
    case $host_os in
7122
      aix3*)
7123
        # FIXME: insert proper C++ library support
7124
        _LT_TAGVAR(ld_shlibs, $1)=no
7125
        ;;
7126
      aix[[4-9]]*)
7127
        if test "$host_cpu" = ia64; then
7128
          # On IA64, the linker does run time linking by default, so we don't
7129
          # have to do anything special.
7130
          aix_use_runtimelinking=no
7131
          exp_sym_flag='-Bexport'
7132
          no_entry_flag=""
7133
        else
7134
          aix_use_runtimelinking=no
7135
 
7136
          # Test if we are trying to use run time linking or normal
7137
          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7138
          # need to do runtime linking.
7139
          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7140
	    for ld_flag in $LDFLAGS; do
7141
	      case $ld_flag in
7142
	      *-brtl*)
7143
	        aix_use_runtimelinking=yes
7144
	        break
7145
	        ;;
7146
	      esac
7147
	    done
7148
	    ;;
7149
          esac
7150
 
7151
          exp_sym_flag='-bexport'
7152
          no_entry_flag='-bnoentry'
7153
        fi
7154
 
7155
        # When large executables or shared objects are built, AIX ld can
7156
        # have problems creating the table of contents.  If linking a library
7157
        # or program results in "error TOC overflow" add -mminimal-toc to
7158
        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7159
        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7160
 
7161
        _LT_TAGVAR(archive_cmds, $1)=''
7162
        _LT_TAGVAR(hardcode_direct, $1)=yes
7163
        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7164
        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7165
        _LT_TAGVAR(link_all_deplibs, $1)=yes
7166
        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7167
 
7168
        if test "$GXX" = yes; then
7169
          case $host_os in aix4.[[012]]|aix4.[[012]].*)
7170
          # We only want to do this on AIX 4.2 and lower, the check
7171
          # below for broken collect2 doesn't work under 4.3+
7172
	  collect2name=`${CC} -print-prog-name=collect2`
7173
	  if test -f "$collect2name" &&
7174
	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7175
	  then
7176
	    # We have reworked collect2
7177
	    :
7178
	  else
7179
	    # We have old collect2
7180
	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
7181
	    # It fails to find uninstalled libraries when the uninstalled
7182
	    # path is not listed in the libpath.  Setting hardcode_minus_L
7183
	    # to unsupported forces relinking
7184
	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
7185
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7186
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
7187
	  fi
7188
          esac
7189
          shared_flag='-shared'
7190
	  if test "$aix_use_runtimelinking" = yes; then
7191
	    shared_flag="$shared_flag "'${wl}-G'
7192
	  fi
7193
        else
7194
          # not using gcc
7195
          if test "$host_cpu" = ia64; then
7196
	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7197
	  # chokes on -Wl,-G. The following line is correct:
7198
	  shared_flag='-G'
7199
          else
7200
	    if test "$aix_use_runtimelinking" = yes; then
7201
	      shared_flag='${wl}-G'
7202
	    else
7203
	      shared_flag='${wl}-bM:SRE'
7204
	    fi
7205
          fi
7206
        fi
7207
 
7208
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7209
        # It seems that -bexpall does not export symbols beginning with
7210
        # underscore (_), so it is better to generate a list of symbols to
7211
	# export.
7212
        _LT_TAGVAR(always_export_symbols, $1)=yes
7213
        if test "$aix_use_runtimelinking" = yes; then
7214
          # Warning - without using the other runtime loading flags (-brtl),
7215
          # -berok will link without error, but may produce a broken library.
7216
          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7217
          # Determine the default libpath from the value encoded in an empty
7218
          # executable.
7219
          _LT_SYS_MODULE_PATH_AIX([$1])
7220
          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7221
 
7222
          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
7223
        else
7224
          if test "$host_cpu" = ia64; then
7225
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7226
	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7227
	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
7228
          else
7229
	    # Determine the default libpath from the value encoded in an
7230
	    # empty executable.
7231
	    _LT_SYS_MODULE_PATH_AIX([$1])
7232
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7233
	    # Warning - without using the other run time loading flags,
7234
	    # -berok will link without error, but may produce a broken library.
7235
	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7236
	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7237
	    if test "$with_gnu_ld" = yes; then
7238
	      # We only use this code for GNU lds that support --whole-archive.
7239
	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7240
	    else
7241
	      # Exported symbols can be pulled into shared objects from archives
7242
	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7243
	    fi
7244
	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7245
	    # This is similar to how AIX traditionally builds its shared
7246
	    # libraries.
7247
	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
7248
          fi
7249
        fi
7250
        ;;
7251
 
7252
      beos*)
7253
	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7254
	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7255
	  # Joseph Beckenbach  says some releases of gcc
7256
	  # support --undefined.  This deserves some investigation.  FIXME
7257
	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7258
	else
7259
	  _LT_TAGVAR(ld_shlibs, $1)=no
7260
	fi
7261
	;;
7262
 
7263
      chorus*)
7264
        case $cc_basename in
7265
          *)
7266
	  # FIXME: insert proper C++ library support
7267
	  _LT_TAGVAR(ld_shlibs, $1)=no
7268
	  ;;
7269
        esac
7270
        ;;
7271
 
7272
      cygwin* | mingw* | pw32* | cegcc*)
7273
	case $GXX,$cc_basename in
7274
	,cl* | no,cl*)
7275
	  # Native MSVC
7276
	  # hardcode_libdir_flag_spec is actually meaningless, as there is
7277
	  # no search path for DLLs.
7278
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7279
	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7280
	  _LT_TAGVAR(always_export_symbols, $1)=yes
7281
	  _LT_TAGVAR(file_list_spec, $1)='@'
7282
	  # Tell ltmain to make .lib files, not .a files.
7283
	  libext=lib
7284
	  # Tell ltmain to make .dll files, not .so files.
7285
	  shrext_cmds=".dll"
7286
	  # FIXME: Setting linknames here is a bad hack.
7287
	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
7288
	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7289
	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
7290
	    else
7291
	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
7292
	    fi~
7293
	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7294
	    linknames='
7295
	  # The linker will not automatically build a static lib if we build a DLL.
7296
	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7297
	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7298
	  # Don't use ranlib
7299
	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7300
	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7301
	    lt_tool_outputfile="@TOOL_OUTPUT@"~
7302
	    case $lt_outputfile in
7303
	      *.exe|*.EXE) ;;
7304
	      *)
7305
		lt_outputfile="$lt_outputfile.exe"
7306
		lt_tool_outputfile="$lt_tool_outputfile.exe"
7307
		;;
7308
	    esac~
7309
	    func_to_tool_file "$lt_outputfile"~
7310
	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
7311
	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7312
	      $RM "$lt_outputfile.manifest";
7313
	    fi'
7314
	  ;;
7315
	*)
7316
	  # g++
7317
	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7318
	  # as there is no search path for DLLs.
7319
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7320
	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
7321
	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7322
	  _LT_TAGVAR(always_export_symbols, $1)=no
7323
	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7324
 
7325
	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7326
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7327
	    # If the export-symbols file already is a .def file (1st line
7328
	    # is EXPORTS), use it as is; otherwise, prepend...
7329
	    _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7330
	      cp $export_symbols $output_objdir/$soname.def;
7331
	    else
7332
	      echo EXPORTS > $output_objdir/$soname.def;
7333
	      cat $export_symbols >> $output_objdir/$soname.def;
7334
	    fi~
7335
	    $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7336
	  else
7337
	    _LT_TAGVAR(ld_shlibs, $1)=no
7338
	  fi
7339
	  ;;
7340
	esac
7341
	;;
7342
      darwin* | rhapsody*)
7343
        _LT_DARWIN_LINKER_FEATURES($1)
7344
	;;
7345
 
7346
      dgux*)
7347
        case $cc_basename in
7348
          ec++*)
7349
	    # FIXME: insert proper C++ library support
7350
	    _LT_TAGVAR(ld_shlibs, $1)=no
7351
	    ;;
7352
          ghcx*)
7353
	    # Green Hills C++ Compiler
7354
	    # FIXME: insert proper C++ library support
7355
	    _LT_TAGVAR(ld_shlibs, $1)=no
7356
	    ;;
7357
          *)
7358
	    # FIXME: insert proper C++ library support
7359
	    _LT_TAGVAR(ld_shlibs, $1)=no
7360
	    ;;
7361
        esac
7362
        ;;
7363
 
7364
      freebsd2.*)
7365
        # C++ shared libraries reported to be fairly broken before
7366
	# switch to ELF
7367
        _LT_TAGVAR(ld_shlibs, $1)=no
7368
        ;;
7369
 
7370
      freebsd-elf*)
7371
        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7372
        ;;
7373
 
7374
      freebsd* | dragonfly*)
7375
        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7376
        # conventions
7377
        _LT_TAGVAR(ld_shlibs, $1)=yes
7378
        ;;
7379
 
7380
      haiku*)
7381
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7382
        _LT_TAGVAR(link_all_deplibs, $1)=yes
7383
        ;;
7384
 
7385
      hpux9*)
7386
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7387
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7388
        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7389
        _LT_TAGVAR(hardcode_direct, $1)=yes
7390
        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7391
				             # but as the default
7392
				             # location of the library.
7393
 
7394
        case $cc_basename in
7395
          CC*)
7396
            # FIXME: insert proper C++ library support
7397
            _LT_TAGVAR(ld_shlibs, $1)=no
7398
            ;;
7399
          aCC*)
7400
            _LT_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'
7401
            # Commands to make compiler produce verbose output that lists
7402
            # what "hidden" libraries, object files and flags are used when
7403
            # linking a shared library.
7404
            #
7405
            # There doesn't appear to be a way to prevent this compiler from
7406
            # explicitly linking system object files so we need to strip them
7407
            # from the output so that they don't get included in the library
7408
            # dependencies.
7409
            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
7410
            ;;
7411
          *)
7412
            if test "$GXX" = yes; then
7413
              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${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'
7414
            else
7415
              # FIXME: insert proper C++ library support
7416
              _LT_TAGVAR(ld_shlibs, $1)=no
7417
            fi
7418
            ;;
7419
        esac
7420
        ;;
7421
 
7422
      hpux10*|hpux11*)
7423
        if test $with_gnu_ld = no; then
7424
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7425
	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7426
 
7427
          case $host_cpu in
7428
            hppa*64*|ia64*)
7429
              ;;
7430
            *)
7431
	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7432
              ;;
7433
          esac
7434
        fi
7435
        case $host_cpu in
7436
          hppa*64*|ia64*)
7437
            _LT_TAGVAR(hardcode_direct, $1)=no
7438
            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7439
            ;;
7440
          *)
7441
            _LT_TAGVAR(hardcode_direct, $1)=yes
7442
            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7443
            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7444
					         # but as the default
7445
					         # location of the library.
7446
            ;;
7447
        esac
7448
 
7449
        case $cc_basename in
7450
          CC*)
7451
	    # FIXME: insert proper C++ library support
7452
	    _LT_TAGVAR(ld_shlibs, $1)=no
7453
	    ;;
7454
          aCC*)
7455
	    case $host_cpu in
7456
	      hppa*64*)
7457
	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7458
	        ;;
7459
	      ia64*)
7460
	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7461
	        ;;
7462
	      *)
7463
	        _LT_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'
7464
	        ;;
7465
	    esac
7466
	    # Commands to make compiler produce verbose output that lists
7467
	    # what "hidden" libraries, object files and flags are used when
7468
	    # linking a shared library.
7469
	    #
7470
	    # There doesn't appear to be a way to prevent this compiler from
7471
	    # explicitly linking system object files so we need to strip them
7472
	    # from the output so that they don't get included in the library
7473
	    # dependencies.
7474
	    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; func_echo_all "$list"'
7475
	    ;;
7476
          *)
7477
	    if test "$GXX" = yes; then
7478
	      if test $with_gnu_ld = no; then
7479
	        case $host_cpu in
7480
	          hppa*64*)
7481
	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7482
	            ;;
7483
	          ia64*)
7484
	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7485
	            ;;
7486
	          *)
7487
	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7488
	            ;;
7489
	        esac
7490
	      fi
7491
	    else
7492
	      # FIXME: insert proper C++ library support
7493
	      _LT_TAGVAR(ld_shlibs, $1)=no
7494
	    fi
7495
	    ;;
7496
        esac
7497
        ;;
7498
 
7499
      interix[[3-9]]*)
7500
	_LT_TAGVAR(hardcode_direct, $1)=no
7501
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7502
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7503
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7504
	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7505
	# Instead, shared libraries are loaded at an image base (0x10000000 by
7506
	# default) and relocated if they conflict, which is a slow very memory
7507
	# consuming and fragmenting process.  To avoid this, we pick a random,
7508
	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7509
	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7510
	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
7511
	_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
7512
	;;
7513
      irix5* | irix6*)
7514
        case $cc_basename in
7515
          CC*)
7516
	    # SGI C++
7517
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7518
 
7519
	    # Archives containing C++ object files must be created using
7520
	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
7521
	    # necessary to make sure instantiated templates are included
7522
	    # in the archive.
7523
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7524
	    ;;
7525
          *)
7526
	    if test "$GXX" = yes; then
7527
	      if test "$with_gnu_ld" = no; then
7528
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7529
	      else
7530
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
7531
	      fi
7532
	    fi
7533
	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7534
	    ;;
7535
        esac
7536
        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7537
        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7538
        _LT_TAGVAR(inherit_rpath, $1)=yes
7539
        ;;
7540
 
7541
      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
7542
        case $cc_basename in
7543
          KCC*)
7544
	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7545
 
7546
	    # KCC will only create a shared library if the output file
7547
	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7548
	    # to its proper name (with version) after linking.
7549
	    _LT_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'
7550
	    _LT_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'
7551
	    # Commands to make compiler produce verbose output that lists
7552
	    # what "hidden" libraries, object files and flags are used when
7553
	    # linking a shared library.
7554
	    #
7555
	    # There doesn't appear to be a way to prevent this compiler from
7556
	    # explicitly linking system object files so we need to strip them
7557
	    # from the output so that they don't get included in the library
7558
	    # dependencies.
7559
	    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; func_echo_all "$list"'
7560
 
7561
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7562
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7563
 
7564
	    # Archives containing C++ object files must be created using
7565
	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7566
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7567
	    ;;
7568
	  icpc* | ecpc* )
7569
	    # Intel C++
7570
	    with_gnu_ld=yes
7571
	    # version 8.0 and above of icpc choke on multiply defined symbols
7572
	    # if we add $predep_objects and $postdep_objects, however 7.1 and
7573
	    # earlier do not add the objects themselves.
7574
	    case `$CC -V 2>&1` in
7575
	      *"Version 7."*)
7576
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7577
		_LT_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'
7578
		;;
7579
	      *)  # Version 8.0 or newer
7580
	        tmp_idyn=
7581
	        case $host_cpu in
7582
		  ia64*) tmp_idyn=' -i_dynamic';;
7583
		esac
7584
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7585
		_LT_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'
7586
		;;
7587
	    esac
7588
	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7589
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7590
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7591
	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7592
	    ;;
7593
          pgCC* | pgcpp*)
7594
            # Portland Group C++ compiler
7595
	    case `$CC -V` in
7596
	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7597
	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7598
		rm -rf $tpldir~
7599
		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7600
		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7601
	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7602
		rm -rf $tpldir~
7603
		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7604
		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7605
		$RANLIB $oldlib'
7606
	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7607
		rm -rf $tpldir~
7608
		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7609
		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7610
	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7611
		rm -rf $tpldir~
7612
		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7613
		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
7614
	      ;;
7615
	    *) # Version 6 and above use weak symbols
7616
	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7617
	      _LT_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'
7618
	      ;;
7619
	    esac
7620
 
7621
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7622
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7623
	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7624
            ;;
7625
	  cxx*)
7626
	    # Compaq C++
7627
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7628
	    _LT_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'
7629
 
7630
	    runpath_var=LD_RUN_PATH
7631
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7632
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7633
 
7634
	    # Commands to make compiler produce verbose output that lists
7635
	    # what "hidden" libraries, object files and flags are used when
7636
	    # linking a shared library.
7637
	    #
7638
	    # There doesn't appear to be a way to prevent this compiler from
7639
	    # explicitly linking system object files so we need to strip them
7640
	    # from the output so that they don't get included in the library
7641
	    # dependencies.
7642
	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$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; func_echo_all "X$list" | $Xsed'
7643
	    ;;
7644
	  xl* | mpixl* | bgxl*)
7645
	    # IBM XL 8.0 on PPC, with GNU ld
7646
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7647
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7648
	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7649
	    if test "x$supports_anon_versioning" = xyes; then
7650
	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7651
		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7652
		echo "local: *; };" >> $output_objdir/$libname.ver~
7653
		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7654
	    fi
7655
	    ;;
7656
	  *)
7657
	    case `$CC -V 2>&1 | sed 5q` in
7658
	    *Sun\ C*)
7659
	      # Sun C++ 5.9
7660
	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7661
	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7662
	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
7663
	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7664
	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7665
	      _LT_TAGVAR(compiler_needs_object, $1)=yes
7666
 
7667
	      # Not sure whether something based on
7668
	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7669
	      # would be better.
7670
	      output_verbose_link_cmd='func_echo_all'
7671
 
7672
	      # Archives containing C++ object files must be created using
7673
	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7674
	      # necessary to make sure instantiated templates are included
7675
	      # in the archive.
7676
	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7677
	      ;;
7678
	    esac
7679
	    ;;
7680
	esac
7681
	;;
7682
 
7683
      lynxos*)
7684
        # FIXME: insert proper C++ library support
7685
	_LT_TAGVAR(ld_shlibs, $1)=no
7686
	;;
7687
 
7688
      m88k*)
7689
        # FIXME: insert proper C++ library support
7690
        _LT_TAGVAR(ld_shlibs, $1)=no
7691
	;;
7692
 
7693
      mvs*)
7694
        case $cc_basename in
7695
          cxx*)
7696
	    # FIXME: insert proper C++ library support
7697
	    _LT_TAGVAR(ld_shlibs, $1)=no
7698
	    ;;
7699
	  *)
7700
	    # FIXME: insert proper C++ library support
7701
	    _LT_TAGVAR(ld_shlibs, $1)=no
7702
	    ;;
7703
	esac
7704
	;;
7705
 
7706
      netbsd*)
7707
        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7708
	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7709
	  wlarc=
7710
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7711
	  _LT_TAGVAR(hardcode_direct, $1)=yes
7712
	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7713
	fi
7714
	# Workaround some broken pre-1.5 toolchains
7715
	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7716
	;;
7717
 
7718
      *nto* | *qnx*)
7719
        _LT_TAGVAR(ld_shlibs, $1)=yes
7720
	;;
7721
 
7722
      openbsd2*)
7723
        # C++ shared libraries are fairly broken
7724
	_LT_TAGVAR(ld_shlibs, $1)=no
7725
	;;
7726
 
7727
      openbsd*)
7728
	if test -f /usr/libexec/ld.so; then
7729
	  _LT_TAGVAR(hardcode_direct, $1)=yes
7730
	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7731
	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7732
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7733
	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7734
	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7735
	    _LT_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'
7736
	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7737
	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7738
	  fi
7739
	  output_verbose_link_cmd=func_echo_all
7740
	else
7741
	  _LT_TAGVAR(ld_shlibs, $1)=no
7742
	fi
7743
	;;
7744
 
7745
      osf3* | osf4* | osf5*)
7746
        case $cc_basename in
7747
          KCC*)
7748
	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7749
 
7750
	    # KCC will only create a shared library if the output file
7751
	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7752
	    # to its proper name (with version) after linking.
7753
	    _LT_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'
7754
 
7755
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7756
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7757
 
7758
	    # Archives containing C++ object files must be created using
7759
	    # the KAI C++ compiler.
7760
	    case $host in
7761
	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7762
	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7763
	    esac
7764
	    ;;
7765
          RCC*)
7766
	    # Rational C++ 2.4.1
7767
	    # FIXME: insert proper C++ library support
7768
	    _LT_TAGVAR(ld_shlibs, $1)=no
7769
	    ;;
7770
          cxx*)
7771
	    case $host in
7772
	      osf3*)
7773
	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7774
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7775
	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7776
		;;
7777
	      *)
7778
	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7779
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7780
	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7781
	          echo "-hidden">> $lib.exp~
7782
	          $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~
7783
	          $RM $lib.exp'
7784
	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7785
		;;
7786
	    esac
7787
 
7788
	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7789
 
7790
	    # Commands to make compiler produce verbose output that lists
7791
	    # what "hidden" libraries, object files and flags are used when
7792
	    # linking a shared library.
7793
	    #
7794
	    # There doesn't appear to be a way to prevent this compiler from
7795
	    # explicitly linking system object files so we need to strip them
7796
	    # from the output so that they don't get included in the library
7797
	    # dependencies.
7798
	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$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; func_echo_all "$list"'
7799
	    ;;
7800
	  *)
7801
	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7802
	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7803
	      case $host in
7804
	        osf3*)
7805
	          _LT_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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7806
		  ;;
7807
	        *)
7808
	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7809
		  ;;
7810
	      esac
7811
 
7812
	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7813
	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7814
 
7815
	      # Commands to make compiler produce verbose output that lists
7816
	      # what "hidden" libraries, object files and flags are used when
7817
	      # linking a shared library.
7818
	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7819
 
7820
	    else
7821
	      # FIXME: insert proper C++ library support
7822
	      _LT_TAGVAR(ld_shlibs, $1)=no
7823
	    fi
7824
	    ;;
7825
        esac
7826
        ;;
7827
 
7828
      psos*)
7829
        # FIXME: insert proper C++ library support
7830
        _LT_TAGVAR(ld_shlibs, $1)=no
7831
        ;;
7832
 
7833
      sunos4*)
7834
        case $cc_basename in
7835
          CC*)
7836
	    # Sun C++ 4.x
7837
	    # FIXME: insert proper C++ library support
7838
	    _LT_TAGVAR(ld_shlibs, $1)=no
7839
	    ;;
7840
          lcc*)
7841
	    # Lucid
7842
	    # FIXME: insert proper C++ library support
7843
	    _LT_TAGVAR(ld_shlibs, $1)=no
7844
	    ;;
7845
          *)
7846
	    # FIXME: insert proper C++ library support
7847
	    _LT_TAGVAR(ld_shlibs, $1)=no
7848
	    ;;
7849
        esac
7850
        ;;
7851
 
7852
      solaris*)
7853
        case $cc_basename in
7854
          CC* | sunCC*)
7855
	    # Sun C++ 4.2, 5.x and Centerline C++
7856
            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7857
	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7858
	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7859
	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7860
	      $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'
7861
 
7862
	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7863
	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7864
	    case $host_os in
7865
	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7866
	      *)
7867
		# The compiler driver will combine and reorder linker options,
7868
		# but understands `-z linker_flag'.
7869
	        # Supported since Solaris 2.6 (maybe 2.5.1?)
7870
		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7871
	        ;;
7872
	    esac
7873
	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7874
 
7875
	    output_verbose_link_cmd='func_echo_all'
7876
 
7877
	    # Archives containing C++ object files must be created using
7878
	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7879
	    # necessary to make sure instantiated templates are included
7880
	    # in the archive.
7881
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7882
	    ;;
7883
          gcx*)
7884
	    # Green Hills C++ Compiler
7885
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7886
 
7887
	    # The C++ compiler must be used to create the archive.
7888
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7889
	    ;;
7890
          *)
7891
	    # GNU C++ compiler with Solaris linker
7892
	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7893
	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7894
	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7895
	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7896
	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7897
		  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7898
 
7899
	        # Commands to make compiler produce verbose output that lists
7900
	        # what "hidden" libraries, object files and flags are used when
7901
	        # linking a shared library.
7902
	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7903
	      else
7904
	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
7905
	        # platform.
7906
	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7907
	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7908
		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7909
 
7910
	        # Commands to make compiler produce verbose output that lists
7911
	        # what "hidden" libraries, object files and flags are used when
7912
	        # linking a shared library.
7913
	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7914
	      fi
7915
 
7916
	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7917
	      case $host_os in
7918
		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7919
		*)
7920
		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7921
		  ;;
7922
	      esac
7923
	    fi
7924
	    ;;
7925
        esac
7926
        ;;
7927
 
7928
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7929
      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7930
      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7931
      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7932
      runpath_var='LD_RUN_PATH'
7933
 
7934
      case $cc_basename in
7935
        CC*)
7936
	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7937
	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7938
	  ;;
7939
	*)
7940
	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7941
	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7942
	  ;;
7943
      esac
7944
      ;;
7945
 
7946
      sysv5* | sco3.2v5* | sco5v6*)
7947
	# Note: We can NOT use -z defs as we might desire, because we do not
7948
	# link with -lc, and that would cause any symbols used from libc to
7949
	# always be unresolved, which means just about no library would
7950
	# ever link correctly.  If we're not using GNU ld we use -z text
7951
	# though, which does catch some bad symbols but isn't as heavy-handed
7952
	# as -z defs.
7953
	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7954
	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7955
	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7956
	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7957
	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7958
	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7959
	_LT_TAGVAR(link_all_deplibs, $1)=yes
7960
	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7961
	runpath_var='LD_RUN_PATH'
7962
 
7963
	case $cc_basename in
7964
          CC*)
7965
	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7966
	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7967
	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7968
	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
7969
	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7970
	      '"$_LT_TAGVAR(reload_cmds, $1)"
7971
	    ;;
7972
	  *)
7973
	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7974
	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7975
	    ;;
7976
	esac
7977
      ;;
7978
 
7979
      tandem*)
7980
        case $cc_basename in
7981
          NCC*)
7982
	    # NonStop-UX NCC 3.20
7983
	    # FIXME: insert proper C++ library support
7984
	    _LT_TAGVAR(ld_shlibs, $1)=no
7985
	    ;;
7986
          *)
7987
	    # FIXME: insert proper C++ library support
7988
	    _LT_TAGVAR(ld_shlibs, $1)=no
7989
	    ;;
7990
        esac
7991
        ;;
7992
 
7993
      vxworks*)
7994
        # FIXME: insert proper C++ library support
7995
        _LT_TAGVAR(ld_shlibs, $1)=no
7996
        ;;
7997
 
7998
      *)
7999
        # FIXME: insert proper C++ library support
8000
        _LT_TAGVAR(ld_shlibs, $1)=no
8001
        ;;
8002
    esac
8003
 
8004
    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
8005
    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8006
 
8007
    _LT_TAGVAR(GCC, $1)="$GXX"
8008
    _LT_TAGVAR(LD, $1)="$LD"
8009
 
8010
    ## CAVEAT EMPTOR:
8011
    ## There is no encapsulation within the following macros, do not change
8012
    ## the running order or otherwise move them around unless you know exactly
8013
    ## what you are doing...
8014
    _LT_SYS_HIDDEN_LIBDEPS($1)
8015
    _LT_COMPILER_PIC($1)
8016
    _LT_COMPILER_C_O($1)
8017
    _LT_COMPILER_FILE_LOCKS($1)
8018
    _LT_LINKER_SHLIBS($1)
8019
    _LT_SYS_DYNAMIC_LINKER($1)
8020
    _LT_LINKER_HARDCODE_LIBPATH($1)
8021
 
8022
    _LT_CONFIG($1)
8023
  fi # test -n "$compiler"
8024
 
8025
  CC=$lt_save_CC
8026
  CFLAGS=$lt_save_CFLAGS
8027
  LDCXX=$LD
8028
  LD=$lt_save_LD
8029
  GCC=$lt_save_GCC
8030
  with_gnu_ld=$lt_save_with_gnu_ld
8031
  lt_cv_path_LDCXX=$lt_cv_path_LD
8032
  lt_cv_path_LD=$lt_save_path_LD
8033
  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
8034
  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
8035
fi # test "$_lt_caught_CXX_error" != yes
8036
 
8037
AC_LANG_POP
8038
])# _LT_LANG_CXX_CONFIG
8039
 
8040
 
8041
# _LT_FUNC_STRIPNAME_CNF
8042
# ----------------------
8043
# func_stripname_cnf prefix suffix name
8044
# strip PREFIX and SUFFIX off of NAME.
8045
# PREFIX and SUFFIX must not contain globbing or regex special
8046
# characters, hashes, percent signs, but SUFFIX may contain a leading
8047
# dot (in which case that matches only a dot).
8048
#
8049
# This function is identical to the (non-XSI) version of func_stripname,
8050
# except this one can be used by m4 code that may be executed by configure,
8051
# rather than the libtool script.
8052
m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
8053
AC_REQUIRE([_LT_DECL_SED])
8054
AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
8055
func_stripname_cnf ()
8056
{
8057
  case ${2} in
8058
  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
8059
  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
8060
  esac
8061
} # func_stripname_cnf
8062
])# _LT_FUNC_STRIPNAME_CNF
8063
 
8064
# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
8065
# ---------------------------------
8066
# Figure out "hidden" library dependencies from verbose
8067
# compiler output when linking a shared library.
8068
# Parse the compiler output and extract the necessary
8069
# objects, libraries and library flags.
8070
m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
8071
[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8072
AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
8073
# Dependencies to place before and after the object being linked:
8074
_LT_TAGVAR(predep_objects, $1)=
8075
_LT_TAGVAR(postdep_objects, $1)=
8076
_LT_TAGVAR(predeps, $1)=
8077
_LT_TAGVAR(postdeps, $1)=
8078
_LT_TAGVAR(compiler_lib_search_path, $1)=
8079
 
8080
dnl we can't use the lt_simple_compile_test_code here,
8081
dnl because it contains code intended for an executable,
8082
dnl not a library.  It's possible we should let each
8083
dnl tag define a new lt_????_link_test_code variable,
8084
dnl but it's only used here...
8085
m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
8086
int a;
8087
void foo (void) { a = 0; }
8088
_LT_EOF
8089
], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
8090
class Foo
8091
{
8092
public:
8093
  Foo (void) { a = 0; }
8094
private:
8095
  int a;
8096
};
8097
_LT_EOF
8098
], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
8099
      subroutine foo
8100
      implicit none
8101
      integer*4 a
8102
      a=0
8103
      return
8104
      end
8105
_LT_EOF
8106
], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
8107
      subroutine foo
8108
      implicit none
8109
      integer a
8110
      a=0
8111
      return
8112
      end
8113
_LT_EOF
8114
], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
8115
public class foo {
8116
  private int a;
8117
  public void bar (void) {
8118
    a = 0;
8119
  }
8120
};
8121
_LT_EOF
8122
], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
8123
package foo
8124
func foo() {
8125
}
8126
_LT_EOF
8127
])
8128
 
8129
_lt_libdeps_save_CFLAGS=$CFLAGS
8130
case "$CC $CFLAGS " in #(
8131
*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
8132
*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
8133
*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
8134
esac
8135
 
8136
dnl Parse the compiler output and extract the necessary
8137
dnl objects, libraries and library flags.
8138
if AC_TRY_EVAL(ac_compile); then
8139
  # Parse the compiler output and extract the necessary
8140
  # objects, libraries and library flags.
8141
 
8142
  # Sentinel used to keep track of whether or not we are before
8143
  # the conftest object file.
8144
  pre_test_object_deps_done=no
8145
 
8146
  for p in `eval "$output_verbose_link_cmd"`; do
8147
    case ${prev}${p} in
8148
 
8149
    -L* | -R* | -l*)
8150
       # Some compilers place space between "-{L,R}" and the path.
8151
       # Remove the space.
8152
       if test $p = "-L" ||
8153
          test $p = "-R"; then
8154
	 prev=$p
8155
	 continue
8156
       fi
8157
 
8158
       # Expand the sysroot to ease extracting the directories later.
8159
       if test -z "$prev"; then
8160
         case $p in
8161
         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
8162
         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
8163
         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
8164
         esac
8165
       fi
8166
       case $p in
8167
       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
8168
       esac
8169
       if test "$pre_test_object_deps_done" = no; then
8170
	 case ${prev} in
8171
	 -L | -R)
8172
	   # Internal compiler library paths should come after those
8173
	   # provided the user.  The postdeps already come after the
8174
	   # user supplied libs so there is no need to process them.
8175
	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8176
	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8177
	   else
8178
	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8179
	   fi
8180
	   ;;
8181
	 # The "-l" case would never come before the object being
8182
	 # linked, so don't bother handling this case.
8183
	 esac
8184
       else
8185
	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8186
	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
8187
	 else
8188
	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8189
	 fi
8190
       fi
8191
       prev=
8192
       ;;
8193
 
8194
    *.lto.$objext) ;; # Ignore GCC LTO objects
8195
    *.$objext)
8196
       # This assumes that the test object file only shows up
8197
       # once in the compiler output.
8198
       if test "$p" = "conftest.$objext"; then
8199
	 pre_test_object_deps_done=yes
8200
	 continue
8201
       fi
8202
 
8203
       if test "$pre_test_object_deps_done" = no; then
8204
	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8205
	   _LT_TAGVAR(predep_objects, $1)="$p"
8206
	 else
8207
	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8208
	 fi
8209
       else
8210
	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8211
	   _LT_TAGVAR(postdep_objects, $1)="$p"
8212
	 else
8213
	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8214
	 fi
8215
       fi
8216
       ;;
8217
 
8218
    *) ;; # Ignore the rest.
8219
 
8220
    esac
8221
  done
8222
 
8223
  # Clean up.
8224
  rm -f a.out a.exe
8225
else
8226
  echo "libtool.m4: error: problem compiling $1 test program"
8227
fi
8228
 
8229
$RM -f confest.$objext
8230
CFLAGS=$_lt_libdeps_save_CFLAGS
8231
 
8232
# PORTME: override above test on systems where it is broken
8233
m4_if([$1], [CXX],
8234
[case $host_os in
8235
interix[[3-9]]*)
8236
  # Interix 3.5 installs completely hosed .la files for C++, so rather than
8237
  # hack all around it, let's just trust "g++" to DTRT.
8238
  _LT_TAGVAR(predep_objects,$1)=
8239
  _LT_TAGVAR(postdep_objects,$1)=
8240
  _LT_TAGVAR(postdeps,$1)=
8241
  ;;
8242
 
8243
linux*)
8244
  case `$CC -V 2>&1 | sed 5q` in
8245
  *Sun\ C*)
8246
    # Sun C++ 5.9
8247
 
8248
    # The more standards-conforming stlport4 library is
8249
    # incompatible with the Cstd library. Avoid specifying
8250
    # it if it's in CXXFLAGS. Ignore libCrun as
8251
    # -library=stlport4 depends on it.
8252
    case " $CXX $CXXFLAGS " in
8253
    *" -library=stlport4 "*)
8254
      solaris_use_stlport4=yes
8255
      ;;
8256
    esac
8257
 
8258
    if test "$solaris_use_stlport4" != yes; then
8259
      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8260
    fi
8261
    ;;
8262
  esac
8263
  ;;
8264
 
8265
solaris*)
8266
  case $cc_basename in
8267
  CC* | sunCC*)
8268
    # The more standards-conforming stlport4 library is
8269
    # incompatible with the Cstd library. Avoid specifying
8270
    # it if it's in CXXFLAGS. Ignore libCrun as
8271
    # -library=stlport4 depends on it.
8272
    case " $CXX $CXXFLAGS " in
8273
    *" -library=stlport4 "*)
8274
      solaris_use_stlport4=yes
8275
      ;;
8276
    esac
8277
 
8278
    # Adding this requires a known-good setup of shared libraries for
8279
    # Sun compiler versions before 5.6, else PIC objects from an old
8280
    # archive will be linked into the output, leading to subtle bugs.
8281
    if test "$solaris_use_stlport4" != yes; then
8282
      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8283
    fi
8284
    ;;
8285
  esac
8286
  ;;
8287
esac
8288
])
8289
 
8290
case " $_LT_TAGVAR(postdeps, $1) " in
8291
*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8292
esac
8293
 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8294
if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8295
 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
8296
fi
8297
_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8298
    [The directories searched by this compiler when creating a shared library])
8299
_LT_TAGDECL([], [predep_objects], [1],
8300
    [Dependencies to place before and after the objects being linked to
8301
    create a shared library])
8302
_LT_TAGDECL([], [postdep_objects], [1])
8303
_LT_TAGDECL([], [predeps], [1])
8304
_LT_TAGDECL([], [postdeps], [1])
8305
_LT_TAGDECL([], [compiler_lib_search_path], [1],
8306
    [The library search path used internally by the compiler when linking
8307
    a shared library])
8308
])# _LT_SYS_HIDDEN_LIBDEPS
8309
 
8310
 
8311
# _LT_LANG_F77_CONFIG([TAG])
8312
# --------------------------
8313
# Ensure that the configuration variables for a Fortran 77 compiler are
8314
# suitably defined.  These variables are subsequently used by _LT_CONFIG
8315
# to write the compiler configuration to `libtool'.
8316
m4_defun([_LT_LANG_F77_CONFIG],
8317
[AC_LANG_PUSH(Fortran 77)
8318
if test -z "$F77" || test "X$F77" = "Xno"; then
8319
  _lt_disable_F77=yes
8320
fi
8321
 
8322
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8323
_LT_TAGVAR(allow_undefined_flag, $1)=
8324
_LT_TAGVAR(always_export_symbols, $1)=no
8325
_LT_TAGVAR(archive_expsym_cmds, $1)=
8326
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8327
_LT_TAGVAR(hardcode_direct, $1)=no
8328
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8329
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8330
_LT_TAGVAR(hardcode_libdir_separator, $1)=
8331
_LT_TAGVAR(hardcode_minus_L, $1)=no
8332
_LT_TAGVAR(hardcode_automatic, $1)=no
8333
_LT_TAGVAR(inherit_rpath, $1)=no
8334
_LT_TAGVAR(module_cmds, $1)=
8335
_LT_TAGVAR(module_expsym_cmds, $1)=
8336
_LT_TAGVAR(link_all_deplibs, $1)=unknown
8337
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8338
_LT_TAGVAR(reload_flag, $1)=$reload_flag
8339
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8340
_LT_TAGVAR(no_undefined_flag, $1)=
8341
_LT_TAGVAR(whole_archive_flag_spec, $1)=
8342
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8343
 
8344
# Source file extension for f77 test sources.
8345
ac_ext=f
8346
 
8347
# Object file extension for compiled f77 test sources.
8348
objext=o
8349
_LT_TAGVAR(objext, $1)=$objext
8350
 
8351
# No sense in running all these tests if we already determined that
8352
# the F77 compiler isn't working.  Some variables (like enable_shared)
8353
# are currently assumed to apply to all compilers on this platform,
8354
# and will be corrupted by setting them based on a non-working compiler.
8355
if test "$_lt_disable_F77" != yes; then
8356
  # Code to be used in simple compile tests
8357
  lt_simple_compile_test_code="\
8358
      subroutine t
8359
      return
8360
      end
8361
"
8362
 
8363
  # Code to be used in simple link tests
8364
  lt_simple_link_test_code="\
8365
      program t
8366
      end
8367
"
8368
 
8369
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8370
  _LT_TAG_COMPILER
8371
 
8372
  # save warnings/boilerplate of simple test code
8373
  _LT_COMPILER_BOILERPLATE
8374
  _LT_LINKER_BOILERPLATE
8375
 
8376
  # Allow CC to be a program name with arguments.
8377
  lt_save_CC="$CC"
8378
  lt_save_GCC=$GCC
8379
  lt_save_CFLAGS=$CFLAGS
8380
  CC=${F77-"f77"}
8381
  CFLAGS=$FFLAGS
8382
  compiler=$CC
8383
  _LT_TAGVAR(compiler, $1)=$CC
8384
  _LT_CC_BASENAME([$compiler])
8385
  GCC=$G77
8386
  if test -n "$compiler"; then
8387
    AC_MSG_CHECKING([if libtool supports shared libraries])
8388
    AC_MSG_RESULT([$can_build_shared])
8389
 
8390
    AC_MSG_CHECKING([whether to build shared libraries])
8391
    test "$can_build_shared" = "no" && enable_shared=no
8392
 
8393
    # On AIX, shared libraries and static libraries use the same namespace, and
8394
    # are all built from PIC.
8395
    case $host_os in
8396
      aix3*)
8397
        test "$enable_shared" = yes && enable_static=no
8398
        if test -n "$RANLIB"; then
8399
          archive_cmds="$archive_cmds~\$RANLIB \$lib"
8400
          postinstall_cmds='$RANLIB $lib'
8401
        fi
8402
        ;;
8403
      aix[[4-9]]*)
8404
	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8405
	  test "$enable_shared" = yes && enable_static=no
8406
	fi
8407
        ;;
8408
    esac
8409
    AC_MSG_RESULT([$enable_shared])
8410
 
8411
    AC_MSG_CHECKING([whether to build static libraries])
8412
    # Make sure either enable_shared or enable_static is yes.
8413
    test "$enable_shared" = yes || enable_static=yes
8414
    AC_MSG_RESULT([$enable_static])
8415
 
8416
    _LT_TAGVAR(GCC, $1)="$G77"
8417
    _LT_TAGVAR(LD, $1)="$LD"
8418
 
8419
    ## CAVEAT EMPTOR:
8420
    ## There is no encapsulation within the following macros, do not change
8421
    ## the running order or otherwise move them around unless you know exactly
8422
    ## what you are doing...
8423
    _LT_COMPILER_PIC($1)
8424
    _LT_COMPILER_C_O($1)
8425
    _LT_COMPILER_FILE_LOCKS($1)
8426
    _LT_LINKER_SHLIBS($1)
8427
    _LT_SYS_DYNAMIC_LINKER($1)
8428
    _LT_LINKER_HARDCODE_LIBPATH($1)
8429
 
8430
    _LT_CONFIG($1)
8431
  fi # test -n "$compiler"
8432
 
8433
  GCC=$lt_save_GCC
8434
  CC="$lt_save_CC"
8435
  CFLAGS="$lt_save_CFLAGS"
8436
fi # test "$_lt_disable_F77" != yes
8437
 
8438
AC_LANG_POP
8439
])# _LT_LANG_F77_CONFIG
8440
 
8441
 
8442
# _LT_LANG_FC_CONFIG([TAG])
8443
# -------------------------
8444
# Ensure that the configuration variables for a Fortran compiler are
8445
# suitably defined.  These variables are subsequently used by _LT_CONFIG
8446
# to write the compiler configuration to `libtool'.
8447
m4_defun([_LT_LANG_FC_CONFIG],
8448
[AC_LANG_PUSH(Fortran)
8449
 
8450
if test -z "$FC" || test "X$FC" = "Xno"; then
8451
  _lt_disable_FC=yes
8452
fi
8453
 
8454
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8455
_LT_TAGVAR(allow_undefined_flag, $1)=
8456
_LT_TAGVAR(always_export_symbols, $1)=no
8457
_LT_TAGVAR(archive_expsym_cmds, $1)=
8458
_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8459
_LT_TAGVAR(hardcode_direct, $1)=no
8460
_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8461
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8462
_LT_TAGVAR(hardcode_libdir_separator, $1)=
8463
_LT_TAGVAR(hardcode_minus_L, $1)=no
8464
_LT_TAGVAR(hardcode_automatic, $1)=no
8465
_LT_TAGVAR(inherit_rpath, $1)=no
8466
_LT_TAGVAR(module_cmds, $1)=
8467
_LT_TAGVAR(module_expsym_cmds, $1)=
8468
_LT_TAGVAR(link_all_deplibs, $1)=unknown
8469
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8470
_LT_TAGVAR(reload_flag, $1)=$reload_flag
8471
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8472
_LT_TAGVAR(no_undefined_flag, $1)=
8473
_LT_TAGVAR(whole_archive_flag_spec, $1)=
8474
_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8475
 
8476
# Source file extension for fc test sources.
8477
ac_ext=${ac_fc_srcext-f}
8478
 
8479
# Object file extension for compiled fc test sources.
8480
objext=o
8481
_LT_TAGVAR(objext, $1)=$objext
8482
 
8483
# No sense in running all these tests if we already determined that
8484
# the FC compiler isn't working.  Some variables (like enable_shared)
8485
# are currently assumed to apply to all compilers on this platform,
8486
# and will be corrupted by setting them based on a non-working compiler.
8487
if test "$_lt_disable_FC" != yes; then
8488
  # Code to be used in simple compile tests
8489
  lt_simple_compile_test_code="\
8490
      subroutine t
8491
      return
8492
      end
8493
"
8494
 
8495
  # Code to be used in simple link tests
8496
  lt_simple_link_test_code="\
8497
      program t
8498
      end
8499
"
8500
 
8501
  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8502
  _LT_TAG_COMPILER
8503
 
8504
  # save warnings/boilerplate of simple test code
8505
  _LT_COMPILER_BOILERPLATE
8506
  _LT_LINKER_BOILERPLATE
8507
 
8508
  # Allow CC to be a program name with arguments.
8509
  lt_save_CC="$CC"
8510
  lt_save_GCC=$GCC
8511
  lt_save_CFLAGS=$CFLAGS
8512
  CC=${FC-"f95"}
8513
  CFLAGS=$FCFLAGS
8514
  compiler=$CC
8515
  GCC=$ac_cv_fc_compiler_gnu
8516
 
8517
  _LT_TAGVAR(compiler, $1)=$CC
8518
  _LT_CC_BASENAME([$compiler])
8519
 
8520
  if test -n "$compiler"; then
8521
    AC_MSG_CHECKING([if libtool supports shared libraries])
8522
    AC_MSG_RESULT([$can_build_shared])
8523
 
8524
    AC_MSG_CHECKING([whether to build shared libraries])
8525
    test "$can_build_shared" = "no" && enable_shared=no
8526
 
8527
    # On AIX, shared libraries and static libraries use the same namespace, and
8528
    # are all built from PIC.
8529
    case $host_os in
8530
      aix3*)
8531
        test "$enable_shared" = yes && enable_static=no
8532
        if test -n "$RANLIB"; then
8533
          archive_cmds="$archive_cmds~\$RANLIB \$lib"
8534
          postinstall_cmds='$RANLIB $lib'
8535
        fi
8536
        ;;
8537
      aix[[4-9]]*)
8538
	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8539
	  test "$enable_shared" = yes && enable_static=no
8540
	fi
8541
        ;;
8542
    esac
8543
    AC_MSG_RESULT([$enable_shared])
8544
 
8545
    AC_MSG_CHECKING([whether to build static libraries])
8546
    # Make sure either enable_shared or enable_static is yes.
8547
    test "$enable_shared" = yes || enable_static=yes
8548
    AC_MSG_RESULT([$enable_static])
8549
 
8550
    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8551
    _LT_TAGVAR(LD, $1)="$LD"
8552
 
8553
    ## CAVEAT EMPTOR:
8554
    ## There is no encapsulation within the following macros, do not change
8555
    ## the running order or otherwise move them around unless you know exactly
8556
    ## what you are doing...
8557
    _LT_SYS_HIDDEN_LIBDEPS($1)
8558
    _LT_COMPILER_PIC($1)
8559
    _LT_COMPILER_C_O($1)
8560
    _LT_COMPILER_FILE_LOCKS($1)
8561
    _LT_LINKER_SHLIBS($1)
8562
    _LT_SYS_DYNAMIC_LINKER($1)
8563
    _LT_LINKER_HARDCODE_LIBPATH($1)
8564
 
8565
    _LT_CONFIG($1)
8566
  fi # test -n "$compiler"
8567
 
8568
  GCC=$lt_save_GCC
8569
  CC=$lt_save_CC
8570
  CFLAGS=$lt_save_CFLAGS
8571
fi # test "$_lt_disable_FC" != yes
8572
 
8573
AC_LANG_POP
8574
])# _LT_LANG_FC_CONFIG
8575
 
8576
 
8577
# _LT_LANG_GCJ_CONFIG([TAG])
8578
# --------------------------
8579
# Ensure that the configuration variables for the GNU Java Compiler compiler
8580
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8581
# to write the compiler configuration to `libtool'.
8582
m4_defun([_LT_LANG_GCJ_CONFIG],
8583
[AC_REQUIRE([LT_PROG_GCJ])dnl
8584
AC_LANG_SAVE
8585
 
8586
# Source file extension for Java test sources.
8587
ac_ext=java
8588
 
8589
# Object file extension for compiled Java test sources.
8590
objext=o
8591
_LT_TAGVAR(objext, $1)=$objext
8592
 
8593
# Code to be used in simple compile tests
8594
lt_simple_compile_test_code="class foo {}"
8595
 
8596
# Code to be used in simple link tests
8597
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8598
 
8599
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8600
_LT_TAG_COMPILER
8601
 
8602
# save warnings/boilerplate of simple test code
8603
_LT_COMPILER_BOILERPLATE
8604
_LT_LINKER_BOILERPLATE
8605
 
8606
# Allow CC to be a program name with arguments.
8607
lt_save_CC=$CC
8608
lt_save_CFLAGS=$CFLAGS
8609
lt_save_GCC=$GCC
8610
GCC=yes
8611
CC=${GCJ-"gcj"}
8612
CFLAGS=$GCJFLAGS
8613
compiler=$CC
8614
_LT_TAGVAR(compiler, $1)=$CC
8615
_LT_TAGVAR(LD, $1)="$LD"
8616
_LT_CC_BASENAME([$compiler])
8617
 
8618
# GCJ did not exist at the time GCC didn't implicitly link libc in.
8619
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8620
 
8621
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8622
_LT_TAGVAR(reload_flag, $1)=$reload_flag
8623
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8624
 
8625
if test -n "$compiler"; then
8626
  _LT_COMPILER_NO_RTTI($1)
8627
  _LT_COMPILER_PIC($1)
8628
  _LT_COMPILER_C_O($1)
8629
  _LT_COMPILER_FILE_LOCKS($1)
8630
  _LT_LINKER_SHLIBS($1)
8631
  _LT_LINKER_HARDCODE_LIBPATH($1)
8632
 
8633
  _LT_CONFIG($1)
8634
fi
8635
 
8636
AC_LANG_RESTORE
8637
 
8638
GCC=$lt_save_GCC
8639
CC=$lt_save_CC
8640
CFLAGS=$lt_save_CFLAGS
8641
])# _LT_LANG_GCJ_CONFIG
8642
 
8643
 
8644
# _LT_LANG_GO_CONFIG([TAG])
8645
# --------------------------
8646
# Ensure that the configuration variables for the GNU Go compiler
8647
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8648
# to write the compiler configuration to `libtool'.
8649
m4_defun([_LT_LANG_GO_CONFIG],
8650
[AC_REQUIRE([LT_PROG_GO])dnl
8651
AC_LANG_SAVE
8652
 
8653
# Source file extension for Go test sources.
8654
ac_ext=go
8655
 
8656
# Object file extension for compiled Go test sources.
8657
objext=o
8658
_LT_TAGVAR(objext, $1)=$objext
8659
 
8660
# Code to be used in simple compile tests
8661
lt_simple_compile_test_code="package main; func main() { }"
8662
 
8663
# Code to be used in simple link tests
8664
lt_simple_link_test_code='package main; func main() { }'
8665
 
8666
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8667
_LT_TAG_COMPILER
8668
 
8669
# save warnings/boilerplate of simple test code
8670
_LT_COMPILER_BOILERPLATE
8671
_LT_LINKER_BOILERPLATE
8672
 
8673
# Allow CC to be a program name with arguments.
8674
lt_save_CC=$CC
8675
lt_save_CFLAGS=$CFLAGS
8676
lt_save_GCC=$GCC
8677
GCC=yes
8678
CC=${GOC-"gccgo"}
8679
CFLAGS=$GOFLAGS
8680
compiler=$CC
8681
_LT_TAGVAR(compiler, $1)=$CC
8682
_LT_TAGVAR(LD, $1)="$LD"
8683
_LT_CC_BASENAME([$compiler])
8684
 
8685
# Go did not exist at the time GCC didn't implicitly link libc in.
8686
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8687
 
8688
_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8689
_LT_TAGVAR(reload_flag, $1)=$reload_flag
8690
_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8691
 
8692
if test -n "$compiler"; then
8693
  _LT_COMPILER_NO_RTTI($1)
8694
  _LT_COMPILER_PIC($1)
8695
  _LT_COMPILER_C_O($1)
8696
  _LT_COMPILER_FILE_LOCKS($1)
8697
  _LT_LINKER_SHLIBS($1)
8698
  _LT_LINKER_HARDCODE_LIBPATH($1)
8699
 
8700
  _LT_CONFIG($1)
8701
fi
8702
 
8703
AC_LANG_RESTORE
8704
 
8705
GCC=$lt_save_GCC
8706
CC=$lt_save_CC
8707
CFLAGS=$lt_save_CFLAGS
8708
])# _LT_LANG_GO_CONFIG
8709
 
8710
 
8711
# _LT_LANG_RC_CONFIG([TAG])
8712
# -------------------------
8713
# Ensure that the configuration variables for the Windows resource compiler
8714
# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8715
# to write the compiler configuration to `libtool'.
8716
m4_defun([_LT_LANG_RC_CONFIG],
8717
[AC_REQUIRE([LT_PROG_RC])dnl
8718
AC_LANG_SAVE
8719
 
8720
# Source file extension for RC test sources.
8721
ac_ext=rc
8722
 
8723
# Object file extension for compiled RC test sources.
8724
objext=o
8725
_LT_TAGVAR(objext, $1)=$objext
8726
 
8727
# Code to be used in simple compile tests
8728
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8729
 
8730
# Code to be used in simple link tests
8731
lt_simple_link_test_code="$lt_simple_compile_test_code"
8732
 
8733
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8734
_LT_TAG_COMPILER
8735
 
8736
# save warnings/boilerplate of simple test code
8737
_LT_COMPILER_BOILERPLATE
8738
_LT_LINKER_BOILERPLATE
8739
 
8740
# Allow CC to be a program name with arguments.
8741
lt_save_CC="$CC"
8742
lt_save_CFLAGS=$CFLAGS
8743
lt_save_GCC=$GCC
8744
GCC=
8745
CC=${RC-"windres"}
8746
CFLAGS=
8747
compiler=$CC
8748
_LT_TAGVAR(compiler, $1)=$CC
8749
_LT_CC_BASENAME([$compiler])
8750
_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8751
 
8752
if test -n "$compiler"; then
8753
  :
8754
  _LT_CONFIG($1)
8755
fi
8756
 
8757
GCC=$lt_save_GCC
8758
AC_LANG_RESTORE
8759
CC=$lt_save_CC
8760
CFLAGS=$lt_save_CFLAGS
8761
])# _LT_LANG_RC_CONFIG
8762
 
8763
 
8764
# LT_PROG_GCJ
8765
# -----------
8766
AC_DEFUN([LT_PROG_GCJ],
8767
[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8768
  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8769
    [AC_CHECK_TOOL(GCJ, gcj,)
8770
      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8771
      AC_SUBST(GCJFLAGS)])])[]dnl
8772
])
8773
 
8774
# Old name:
8775
AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8776
dnl aclocal-1.4 backwards compatibility:
8777
dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8778
 
8779
 
8780
# LT_PROG_GO
8781
# ----------
8782
AC_DEFUN([LT_PROG_GO],
8783
[AC_CHECK_TOOL(GOC, gccgo,)
8784
])
8785
 
8786
 
8787
# LT_PROG_RC
8788
# ----------
8789
AC_DEFUN([LT_PROG_RC],
8790
[AC_CHECK_TOOL(RC, windres,)
8791
])
8792
 
8793
# Old name:
8794
AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8795
dnl aclocal-1.4 backwards compatibility:
8796
dnl AC_DEFUN([LT_AC_PROG_RC], [])
8797
 
8798
 
8799
# _LT_DECL_EGREP
8800
# --------------
8801
# If we don't have a new enough Autoconf to choose the best grep
8802
# available, choose the one first in the user's PATH.
8803
m4_defun([_LT_DECL_EGREP],
8804
[AC_REQUIRE([AC_PROG_EGREP])dnl
8805
AC_REQUIRE([AC_PROG_FGREP])dnl
8806
test -z "$GREP" && GREP=grep
8807
_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8808
_LT_DECL([], [EGREP], [1], [An ERE matcher])
8809
_LT_DECL([], [FGREP], [1], [A literal string matcher])
8810
dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8811
AC_SUBST([GREP])
8812
])
8813
 
8814
 
8815
# _LT_DECL_OBJDUMP
8816
# --------------
8817
# If we don't have a new enough Autoconf to choose the best objdump
8818
# available, choose the one first in the user's PATH.
8819
m4_defun([_LT_DECL_OBJDUMP],
8820
[AC_CHECK_TOOL(OBJDUMP, objdump, false)
8821
test -z "$OBJDUMP" && OBJDUMP=objdump
8822
_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8823
AC_SUBST([OBJDUMP])
8824
])
8825
 
8826
# _LT_DECL_DLLTOOL
8827
# ----------------
8828
# Ensure DLLTOOL variable is set.
8829
m4_defun([_LT_DECL_DLLTOOL],
8830
[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8831
test -z "$DLLTOOL" && DLLTOOL=dlltool
8832
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8833
AC_SUBST([DLLTOOL])
8834
])
8835
 
8836
# _LT_DECL_SED
8837
# ------------
8838
# Check for a fully-functional sed program, that truncates
8839
# as few characters as possible.  Prefer GNU sed if found.
8840
m4_defun([_LT_DECL_SED],
8841
[AC_PROG_SED
8842
test -z "$SED" && SED=sed
8843
Xsed="$SED -e 1s/^X//"
8844
_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8845
_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8846
    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8847
])# _LT_DECL_SED
8848
 
8849
m4_ifndef([AC_PROG_SED], [
8850
# NOTE: This macro has been submitted for inclusion into   #
8851
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8852
#  a released version of Autoconf we should remove this    #
8853
#  macro and use it instead.                               #
8854
 
8855
m4_defun([AC_PROG_SED],
8856
[AC_MSG_CHECKING([for a sed that does not truncate output])
8857
AC_CACHE_VAL(lt_cv_path_SED,
8858
[# Loop through the user's path and test for sed and gsed.
8859
# Then use that list of sed's as ones to test for truncation.
8860
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8861
for as_dir in $PATH
8862
do
8863
  IFS=$as_save_IFS
8864
  test -z "$as_dir" && as_dir=.
8865
  for lt_ac_prog in sed gsed; do
8866
    for ac_exec_ext in '' $ac_executable_extensions; do
8867
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8868
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8869
      fi
8870
    done
8871
  done
8872
done
8873
IFS=$as_save_IFS
8874
lt_ac_max=0
8875
lt_ac_count=0
8876
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
8877
# along with /bin/sed that truncates output.
8878
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8879
  test ! -f $lt_ac_sed && continue
8880
  cat /dev/null > conftest.in
8881
  lt_ac_count=0
8882
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8883
  # Check for GNU sed and select it if it is found.
8884
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8885
    lt_cv_path_SED=$lt_ac_sed
8886
    break
8887
  fi
8888
  while true; do
8889
    cat conftest.in conftest.in >conftest.tmp
8890
    mv conftest.tmp conftest.in
8891
    cp conftest.in conftest.nl
8892
    echo >>conftest.nl
8893
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8894
    cmp -s conftest.out conftest.nl || break
8895
    # 10000 chars as input seems more than enough
8896
    test $lt_ac_count -gt 10 && break
8897
    lt_ac_count=`expr $lt_ac_count + 1`
8898
    if test $lt_ac_count -gt $lt_ac_max; then
8899
      lt_ac_max=$lt_ac_count
8900
      lt_cv_path_SED=$lt_ac_sed
8901
    fi
8902
  done
8903
done
8904
])
8905
SED=$lt_cv_path_SED
8906
AC_SUBST([SED])
8907
AC_MSG_RESULT([$SED])
8908
])#AC_PROG_SED
8909
])#m4_ifndef
8910
 
8911
# Old name:
8912
AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8913
dnl aclocal-1.4 backwards compatibility:
8914
dnl AC_DEFUN([LT_AC_PROG_SED], [])
8915
 
8916
 
8917
# _LT_CHECK_SHELL_FEATURES
8918
# ------------------------
8919
# Find out whether the shell is Bourne or XSI compatible,
8920
# or has some other useful features.
8921
m4_defun([_LT_CHECK_SHELL_FEATURES],
8922
[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
8923
# Try some XSI features
8924
xsi_shell=no
8925
( _lt_dummy="a/b/c"
8926
  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
8927
      = c,a/b,b/c, \
8928
    && eval 'test $(( 1 + 1 )) -eq 2 \
8929
    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
8930
  && xsi_shell=yes
8931
AC_MSG_RESULT([$xsi_shell])
8932
_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
8933
 
8934
AC_MSG_CHECKING([whether the shell understands "+="])
8935
lt_shell_append=no
8936
( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
8937
    >/dev/null 2>&1 \
8938
  && lt_shell_append=yes
8939
AC_MSG_RESULT([$lt_shell_append])
8940
_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8941
 
8942
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8943
  lt_unset=unset
8944
else
8945
  lt_unset=false
8946
fi
8947
_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8948
 
8949
# test EBCDIC or ASCII
8950
case `echo X|tr X '\101'` in
8951
 A) # ASCII based system
8952
    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8953
  lt_SP2NL='tr \040 \012'
8954
  lt_NL2SP='tr \015\012 \040\040'
8955
  ;;
8956
 *) # EBCDIC based system
8957
  lt_SP2NL='tr \100 \n'
8958
  lt_NL2SP='tr \r\n \100\100'
8959
  ;;
8960
esac
8961
_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8962
_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8963
])# _LT_CHECK_SHELL_FEATURES
8964
 
8965
 
8966
# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
8967
# ------------------------------------------------------
8968
# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
8969
# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
8970
m4_defun([_LT_PROG_FUNCTION_REPLACE],
8971
[dnl {
8972
sed -e '/^$1 ()$/,/^} # $1 /c\
8973
$1 ()\
8974
{\
8975
m4_bpatsubsts([$2], [$], [\\], [^\([	 ]\)], [\\\1])
8976
} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
8977
  && mv -f "$cfgfile.tmp" "$cfgfile" \
8978
    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8979
test 0 -eq $? || _lt_function_replace_fail=:
8980
])
8981
 
8982
 
8983
# _LT_PROG_REPLACE_SHELLFNS
8984
# -------------------------
8985
# Replace existing portable implementations of several shell functions with
8986
# equivalent extended shell implementations where those features are available..
8987
m4_defun([_LT_PROG_REPLACE_SHELLFNS],
8988
[if test x"$xsi_shell" = xyes; then
8989
  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
8990
    case ${1} in
8991
      */*) func_dirname_result="${1%/*}${2}" ;;
8992
      *  ) func_dirname_result="${3}" ;;
8993
    esac])
8994
 
8995
  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
8996
    func_basename_result="${1##*/}"])
8997
 
8998
  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
8999
    case ${1} in
9000
      */*) func_dirname_result="${1%/*}${2}" ;;
9001
      *  ) func_dirname_result="${3}" ;;
9002
    esac
9003
    func_basename_result="${1##*/}"])
9004
 
9005
  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
9006
    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
9007
    # positional parameters, so assign one to ordinary parameter first.
9008
    func_stripname_result=${3}
9009
    func_stripname_result=${func_stripname_result#"${1}"}
9010
    func_stripname_result=${func_stripname_result%"${2}"}])
9011
 
9012
  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
9013
    func_split_long_opt_name=${1%%=*}
9014
    func_split_long_opt_arg=${1#*=}])
9015
 
9016
  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
9017
    func_split_short_opt_arg=${1#??}
9018
    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
9019
 
9020
  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
9021
    case ${1} in
9022
      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
9023
      *)    func_lo2o_result=${1} ;;
9024
    esac])
9025
 
9026
  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
9027
 
9028
  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
9029
 
9030
  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
9031
fi
9032
 
9033
if test x"$lt_shell_append" = xyes; then
9034
  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
9035
 
9036
  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
9037
    func_quote_for_eval "${2}"
9038
dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
9039
    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
9040
 
9041
  # Save a `func_append' function call where possible by direct use of '+='
9042
  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
9043
    && mv -f "$cfgfile.tmp" "$cfgfile" \
9044
      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
9045
  test 0 -eq $? || _lt_function_replace_fail=:
9046
else
9047
  # Save a `func_append' function call even when '+=' is not available
9048
  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
9049
    && mv -f "$cfgfile.tmp" "$cfgfile" \
9050
      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
9051
  test 0 -eq $? || _lt_function_replace_fail=:
9052
fi
9053
 
9054
if test x"$_lt_function_replace_fail" = x":"; then
9055
  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
9056
fi
9057
])
9058
 
9059
# _LT_PATH_CONVERSION_FUNCTIONS
9060
# -----------------------------
9061
# Determine which file name conversion functions should be used by
9062
# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
9063
# for certain cross-compile configurations and native mingw.
9064
m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
9065
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
9066
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
9067
AC_MSG_CHECKING([how to convert $build file names to $host format])
9068
AC_CACHE_VAL(lt_cv_to_host_file_cmd,
9069
[case $host in
9070
  *-*-mingw* )
9071
    case $build in
9072
      *-*-mingw* ) # actually msys
9073
        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
9074
        ;;
9075
      *-*-cygwin* )
9076
        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
9077
        ;;
9078
      * ) # otherwise, assume *nix
9079
        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
9080
        ;;
9081
    esac
9082
    ;;
9083
  *-*-cygwin* )
9084
    case $build in
9085
      *-*-mingw* ) # actually msys
9086
        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
9087
        ;;
9088
      *-*-cygwin* )
9089
        lt_cv_to_host_file_cmd=func_convert_file_noop
9090
        ;;
9091
      * ) # otherwise, assume *nix
9092
        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
9093
        ;;
9094
    esac
9095
    ;;
9096
  * ) # unhandled hosts (and "normal" native builds)
9097
    lt_cv_to_host_file_cmd=func_convert_file_noop
9098
    ;;
9099
esac
9100
])
9101
to_host_file_cmd=$lt_cv_to_host_file_cmd
9102
AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
9103
_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
9104
         [0], [convert $build file names to $host format])dnl
9105
 
9106
AC_MSG_CHECKING([how to convert $build file names to toolchain format])
9107
AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
9108
[#assume ordinary cross tools, or native build.
9109
lt_cv_to_tool_file_cmd=func_convert_file_noop
9110
case $host in
9111
  *-*-mingw* )
9112
    case $build in
9113
      *-*-mingw* ) # actually msys
9114
        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
9115
        ;;
9116
    esac
9117
    ;;
9118
esac
9119
])
9120
to_tool_file_cmd=$lt_cv_to_tool_file_cmd
9121
AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
9122
_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
9123
         [0], [convert $build files to toolchain format])dnl
9124
])# _LT_PATH_CONVERSION_FUNCTIONS
9125
 
9126
# Helper functions for option handling.                    -*- Autoconf -*-
9127
#
9128
#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
9129
#   Inc.
9130
#   Written by Gary V. Vaughan, 2004
9131
#
9132
# This file is free software; the Free Software Foundation gives
9133
# unlimited permission to copy and/or distribute it, with or without
9134
# modifications, as long as this notice is preserved.
9135
 
9136
# serial 7 ltoptions.m4
9137
 
9138
# This is to help aclocal find these macros, as it can't see m4_define.
9139
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9140
 
9141
 
9142
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9143
# ------------------------------------------
9144
m4_define([_LT_MANGLE_OPTION],
9145
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9146
 
9147
 
9148
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9149
# ---------------------------------------
9150
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9151
# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
9152
# saved as a flag.
9153
m4_define([_LT_SET_OPTION],
9154
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9155
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9156
        _LT_MANGLE_DEFUN([$1], [$2]),
9157
    [m4_warning([Unknown $1 option `$2'])])[]dnl
9158
])
9159
 
9160
 
9161
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9162
# ------------------------------------------------------------
9163
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9164
m4_define([_LT_IF_OPTION],
9165
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9166
 
9167
 
9168
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9169
# -------------------------------------------------------
9170
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9171
# are set.
9172
m4_define([_LT_UNLESS_OPTIONS],
9173
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9174
	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9175
		      [m4_define([$0_found])])])[]dnl
9176
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9177
])[]dnl
9178
])
9179
 
9180
 
9181
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9182
# ----------------------------------------
9183
# OPTION-LIST is a space-separated list of Libtool options associated
9184
# with MACRO-NAME.  If any OPTION has a matching handler declared with
9185
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9186
# the unknown option and exit.
9187
m4_defun([_LT_SET_OPTIONS],
9188
[# Set options
9189
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9190
    [_LT_SET_OPTION([$1], _LT_Option)])
9191
 
9192
m4_if([$1],[LT_INIT],[
9193
  dnl
9194
  dnl Simply set some default values (i.e off) if boolean options were not
9195
  dnl specified:
9196
  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9197
  ])
9198
  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9199
  ])
9200
  dnl
9201
  dnl If no reference was made to various pairs of opposing options, then
9202
  dnl we run the default mode handler for the pair.  For example, if neither
9203
  dnl `shared' nor `disable-shared' was passed, we enable building of shared
9204
  dnl archives by default:
9205
  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9206
  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9207
  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9208
  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9209
  		   [_LT_ENABLE_FAST_INSTALL])
9210
  ])
9211
])# _LT_SET_OPTIONS
9212
 
9213
 
9214
 
9215
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9216
# -----------------------------------------
9217
m4_define([_LT_MANGLE_DEFUN],
9218
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9219
 
9220
 
9221
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9222
# -----------------------------------------------
9223
m4_define([LT_OPTION_DEFINE],
9224
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9225
])# LT_OPTION_DEFINE
9226
 
9227
 
9228
# dlopen
9229
# ------
9230
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9231
])
9232
 
9233
AU_DEFUN([AC_LIBTOOL_DLOPEN],
9234
[_LT_SET_OPTION([LT_INIT], [dlopen])
9235
AC_DIAGNOSE([obsolete],
9236
[$0: Remove this warning and the call to _LT_SET_OPTION when you
9237
put the `dlopen' option into LT_INIT's first parameter.])
9238
])
9239
 
9240
dnl aclocal-1.4 backwards compatibility:
9241
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9242
 
9243
 
9244
# win32-dll
9245
# ---------
9246
# Declare package support for building win32 dll's.
9247
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9248
[enable_win32_dll=yes
9249
 
9250
case $host in
9251
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
9252
  AC_CHECK_TOOL(AS, as, false)
9253
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9254
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
9255
  ;;
9256
esac
9257
 
9258
test -z "$AS" && AS=as
9259
_LT_DECL([], [AS],      [1], [Assembler program])dnl
9260
 
9261
test -z "$DLLTOOL" && DLLTOOL=dlltool
9262
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
9263
 
9264
test -z "$OBJDUMP" && OBJDUMP=objdump
9265
_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
9266
])# win32-dll
9267
 
9268
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9269
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
9270
_LT_SET_OPTION([LT_INIT], [win32-dll])
9271
AC_DIAGNOSE([obsolete],
9272
[$0: Remove this warning and the call to _LT_SET_OPTION when you
9273
put the `win32-dll' option into LT_INIT's first parameter.])
9274
])
9275
 
9276
dnl aclocal-1.4 backwards compatibility:
9277
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9278
 
9279
 
9280
# _LT_ENABLE_SHARED([DEFAULT])
9281
# ----------------------------
9282
# implement the --enable-shared flag, and supports the `shared' and
9283
# `disable-shared' LT_INIT options.
9284
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9285
m4_define([_LT_ENABLE_SHARED],
9286
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9287
AC_ARG_ENABLE([shared],
9288
    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9289
	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9290
    [p=${PACKAGE-default}
9291
    case $enableval in
9292
    yes) enable_shared=yes ;;
9293
    no) enable_shared=no ;;
9294
    *)
9295
      enable_shared=no
9296
      # Look at the argument we got.  We use all the common list separators.
9297
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9298
      for pkg in $enableval; do
9299
	IFS="$lt_save_ifs"
9300
	if test "X$pkg" = "X$p"; then
9301
	  enable_shared=yes
9302
	fi
9303
      done
9304
      IFS="$lt_save_ifs"
9305
      ;;
9306
    esac],
9307
    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9308
 
9309
    _LT_DECL([build_libtool_libs], [enable_shared], [0],
9310
	[Whether or not to build shared libraries])
9311
])# _LT_ENABLE_SHARED
9312
 
9313
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9314
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9315
 
9316
# Old names:
9317
AC_DEFUN([AC_ENABLE_SHARED],
9318
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9319
])
9320
 
9321
AC_DEFUN([AC_DISABLE_SHARED],
9322
[_LT_SET_OPTION([LT_INIT], [disable-shared])
9323
])
9324
 
9325
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9326
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9327
 
9328
dnl aclocal-1.4 backwards compatibility:
9329
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9330
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9331
 
9332
 
9333
 
9334
# _LT_ENABLE_STATIC([DEFAULT])
9335
# ----------------------------
9336
# implement the --enable-static flag, and support the `static' and
9337
# `disable-static' LT_INIT options.
9338
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9339
m4_define([_LT_ENABLE_STATIC],
9340
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9341
AC_ARG_ENABLE([static],
9342
    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9343
	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9344
    [p=${PACKAGE-default}
9345
    case $enableval in
9346
    yes) enable_static=yes ;;
9347
    no) enable_static=no ;;
9348
    *)
9349
     enable_static=no
9350
      # Look at the argument we got.  We use all the common list separators.
9351
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9352
      for pkg in $enableval; do
9353
	IFS="$lt_save_ifs"
9354
	if test "X$pkg" = "X$p"; then
9355
	  enable_static=yes
9356
	fi
9357
      done
9358
      IFS="$lt_save_ifs"
9359
      ;;
9360
    esac],
9361
    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9362
 
9363
    _LT_DECL([build_old_libs], [enable_static], [0],
9364
	[Whether or not to build static libraries])
9365
])# _LT_ENABLE_STATIC
9366
 
9367
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9368
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9369
 
9370
# Old names:
9371
AC_DEFUN([AC_ENABLE_STATIC],
9372
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9373
])
9374
 
9375
AC_DEFUN([AC_DISABLE_STATIC],
9376
[_LT_SET_OPTION([LT_INIT], [disable-static])
9377
])
9378
 
9379
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9380
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9381
 
9382
dnl aclocal-1.4 backwards compatibility:
9383
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9384
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9385
 
9386
 
9387
 
9388
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
9389
# ----------------------------------
9390
# implement the --enable-fast-install flag, and support the `fast-install'
9391
# and `disable-fast-install' LT_INIT options.
9392
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9393
m4_define([_LT_ENABLE_FAST_INSTALL],
9394
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9395
AC_ARG_ENABLE([fast-install],
9396
    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9397
    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9398
    [p=${PACKAGE-default}
9399
    case $enableval in
9400
    yes) enable_fast_install=yes ;;
9401
    no) enable_fast_install=no ;;
9402
    *)
9403
      enable_fast_install=no
9404
      # Look at the argument we got.  We use all the common list separators.
9405
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9406
      for pkg in $enableval; do
9407
	IFS="$lt_save_ifs"
9408
	if test "X$pkg" = "X$p"; then
9409
	  enable_fast_install=yes
9410
	fi
9411
      done
9412
      IFS="$lt_save_ifs"
9413
      ;;
9414
    esac],
9415
    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9416
 
9417
_LT_DECL([fast_install], [enable_fast_install], [0],
9418
	 [Whether or not to optimize for fast installation])dnl
9419
])# _LT_ENABLE_FAST_INSTALL
9420
 
9421
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9422
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9423
 
9424
# Old names:
9425
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9426
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9427
AC_DIAGNOSE([obsolete],
9428
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9429
the `fast-install' option into LT_INIT's first parameter.])
9430
])
9431
 
9432
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9433
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9434
AC_DIAGNOSE([obsolete],
9435
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9436
the `disable-fast-install' option into LT_INIT's first parameter.])
9437
])
9438
 
9439
dnl aclocal-1.4 backwards compatibility:
9440
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9441
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9442
 
9443
 
9444
# _LT_WITH_PIC([MODE])
9445
# --------------------
9446
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
9447
# LT_INIT options.
9448
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
9449
m4_define([_LT_WITH_PIC],
9450
[AC_ARG_WITH([pic],
9451
    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
9452
	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9453
    [lt_p=${PACKAGE-default}
9454
    case $withval in
9455
    yes|no) pic_mode=$withval ;;
9456
    *)
9457
      pic_mode=default
9458
      # Look at the argument we got.  We use all the common list separators.
9459
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9460
      for lt_pkg in $withval; do
9461
	IFS="$lt_save_ifs"
9462
	if test "X$lt_pkg" = "X$lt_p"; then
9463
	  pic_mode=yes
9464
	fi
9465
      done
9466
      IFS="$lt_save_ifs"
9467
      ;;
9468
    esac],
9469
    [pic_mode=default])
9470
 
9471
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9472
 
9473
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9474
])# _LT_WITH_PIC
9475
 
9476
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9477
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9478
 
9479
# Old name:
9480
AU_DEFUN([AC_LIBTOOL_PICMODE],
9481
[_LT_SET_OPTION([LT_INIT], [pic-only])
9482
AC_DIAGNOSE([obsolete],
9483
[$0: Remove this warning and the call to _LT_SET_OPTION when you
9484
put the `pic-only' option into LT_INIT's first parameter.])
9485
])
9486
 
9487
dnl aclocal-1.4 backwards compatibility:
9488
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9489
 
9490
 
9491
m4_define([_LTDL_MODE], [])
9492
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9493
		 [m4_define([_LTDL_MODE], [nonrecursive])])
9494
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9495
		 [m4_define([_LTDL_MODE], [recursive])])
9496
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9497
		 [m4_define([_LTDL_MODE], [subproject])])
9498
 
9499
m4_define([_LTDL_TYPE], [])
9500
LT_OPTION_DEFINE([LTDL_INIT], [installable],
9501
		 [m4_define([_LTDL_TYPE], [installable])])
9502
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9503
		 [m4_define([_LTDL_TYPE], [convenience])])
9504
 
9505
# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
9506
#
9507
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9508
# Written by Gary V. Vaughan, 2004
9509
#
9510
# This file is free software; the Free Software Foundation gives
9511
# unlimited permission to copy and/or distribute it, with or without
9512
# modifications, as long as this notice is preserved.
9513
 
9514
# serial 6 ltsugar.m4
9515
 
9516
# This is to help aclocal find these macros, as it can't see m4_define.
9517
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9518
 
9519
 
9520
# lt_join(SEP, ARG1, [ARG2...])
9521
# -----------------------------
9522
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9523
# associated separator.
9524
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9525
# versions in m4sugar had bugs.
9526
m4_define([lt_join],
9527
[m4_if([$#], [1], [],
9528
       [$#], [2], [[$2]],
9529
       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9530
m4_define([_lt_join],
9531
[m4_if([$#$2], [2], [],
9532
       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9533
 
9534
 
9535
# lt_car(LIST)
9536
# lt_cdr(LIST)
9537
# ------------
9538
# Manipulate m4 lists.
9539
# These macros are necessary as long as will still need to support
9540
# Autoconf-2.59 which quotes differently.
9541
m4_define([lt_car], [[$1]])
9542
m4_define([lt_cdr],
9543
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9544
       [$#], 1, [],
9545
       [m4_dquote(m4_shift($@))])])
9546
m4_define([lt_unquote], $1)
9547
 
9548
 
9549
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
9550
# ------------------------------------------
9551
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9552
# Note that neither SEPARATOR nor STRING are expanded; they are appended
9553
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9554
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
9555
# than defined and empty).
9556
#
9557
# This macro is needed until we can rely on Autoconf 2.62, since earlier
9558
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9559
m4_define([lt_append],
9560
[m4_define([$1],
9561
	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9562
 
9563
 
9564
 
9565
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9566
# ----------------------------------------------------------
9567
# Produce a SEP delimited list of all paired combinations of elements of
9568
# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
9569
# has the form PREFIXmINFIXSUFFIXn.
9570
# Needed until we can rely on m4_combine added in Autoconf 2.62.
9571
m4_define([lt_combine],
9572
[m4_if(m4_eval([$# > 3]), [1],
9573
       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9574
[[m4_foreach([_Lt_prefix], [$2],
9575
	     [m4_foreach([_Lt_suffix],
9576
		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9577
	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9578
 
9579
 
9580
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9581
# -----------------------------------------------------------------------
9582
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9583
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9584
m4_define([lt_if_append_uniq],
9585
[m4_ifdef([$1],
9586
	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9587
		 [lt_append([$1], [$2], [$3])$4],
9588
		 [$5])],
9589
	  [lt_append([$1], [$2], [$3])$4])])
9590
 
9591
 
9592
# lt_dict_add(DICT, KEY, VALUE)
9593
# -----------------------------
9594
m4_define([lt_dict_add],
9595
[m4_define([$1($2)], [$3])])
9596
 
9597
 
9598
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9599
# --------------------------------------------
9600
m4_define([lt_dict_add_subkey],
9601
[m4_define([$1($2:$3)], [$4])])
9602
 
9603
 
9604
# lt_dict_fetch(DICT, KEY, [SUBKEY])
9605
# ----------------------------------
9606
m4_define([lt_dict_fetch],
9607
[m4_ifval([$3],
9608
	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9609
    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9610
 
9611
 
9612
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9613
# -----------------------------------------------------------------
9614
m4_define([lt_if_dict_fetch],
9615
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9616
	[$5],
9617
    [$6])])
9618
 
9619
 
9620
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9621
# --------------------------------------------------------------
9622
m4_define([lt_dict_filter],
9623
[m4_if([$5], [], [],
9624
  [lt_join(m4_quote(m4_default([$4], [[, ]])),
9625
           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9626
		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9627
])
9628
 
9629
# ltversion.m4 -- version numbers			-*- Autoconf -*-
9630
#
9631
#   Copyright (C) 2004 Free Software Foundation, Inc.
9632
#   Written by Scott James Remnant, 2004
9633
#
9634
# This file is free software; the Free Software Foundation gives
9635
# unlimited permission to copy and/or distribute it, with or without
9636
# modifications, as long as this notice is preserved.
9637
 
9638
# @configure_input@
9639
 
9640
# serial 3337 ltversion.m4
9641
# This file is part of GNU Libtool
9642
 
9643
m4_define([LT_PACKAGE_VERSION], [2.4.2])
9644
m4_define([LT_PACKAGE_REVISION], [1.3337])
9645
 
9646
AC_DEFUN([LTVERSION_VERSION],
9647
[macro_version='2.4.2'
9648
macro_revision='1.3337'
9649
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9650
_LT_DECL(, macro_revision, 0)
9651
])
9652
 
9653
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
9654
#
9655
#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
9656
#   Written by Scott James Remnant, 2004.
9657
#
9658
# This file is free software; the Free Software Foundation gives
9659
# unlimited permission to copy and/or distribute it, with or without
9660
# modifications, as long as this notice is preserved.
9661
 
9662
# serial 5 lt~obsolete.m4
9663
 
9664
# These exist entirely to fool aclocal when bootstrapping libtool.
9665
#
9666
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9667
# which have later been changed to m4_define as they aren't part of the
9668
# exported API, or moved to Autoconf or Automake where they belong.
9669
#
9670
# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
9671
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9672
# using a macro with the same name in our local m4/libtool.m4 it'll
9673
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9674
# and doesn't know about Autoconf macros at all.)
9675
#
9676
# So we provide this file, which has a silly filename so it's always
9677
# included after everything else.  This provides aclocal with the
9678
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9679
# because those macros already exist, or will be overwritten later.
9680
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
9681
#
9682
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9683
# Yes, that means every name once taken will need to remain here until
9684
# we give up compatibility with versions before 1.7, at which point
9685
# we need to keep only those names which we still refer to.
9686
 
9687
# This is to help aclocal find these macros, as it can't see m4_define.
9688
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9689
 
9690
m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9691
m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
9692
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9693
m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
9694
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9695
m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
9696
m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
9697
m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9698
m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
9699
m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
9700
m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
9701
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9702
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9703
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9704
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9705
m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9706
m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
9707
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9708
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9709
m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
9710
m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
9711
m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9712
m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9713
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9714
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9715
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9716
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9717
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9718
m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
9719
m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
9720
m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
9721
m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9722
m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9723
m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
9724
m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
9725
m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9726
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9727
m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
9728
m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9729
m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
9730
m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
9731
m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
9732
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9733
m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9734
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9735
m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9736
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9737
m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9738
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9739
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9740
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9741
m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9742
m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
9743
m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9744
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9745
m4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9746
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9747
m4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9748
m4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
9749
m4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
9750
m4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
9751
 
9752
# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
9753
# serial 1 (pkg-config-0.24)
9754
#
9755
# Copyright © 2004 Scott James Remnant .
9756
#
9757
# This program is free software; you can redistribute it and/or modify
9758
# it under the terms of the GNU General Public License as published by
9759
# the Free Software Foundation; either version 2 of the License, or
9760
# (at your option) any later version.
9761
#
9762
# This program is distributed in the hope that it will be useful, but
9763
# WITHOUT ANY WARRANTY; without even the implied warranty of
9764
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9765
# General Public License for more details.
9766
#
9767
# You should have received a copy of the GNU General Public License
9768
# along with this program; if not, write to the Free Software
9769
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9770
#
9771
# As a special exception to the GNU General Public License, if you
9772
# distribute this file as part of a program that contains a
9773
# configuration script generated by Autoconf, you may include it under
9774
# the same distribution terms that you use for the rest of that program.
9775
 
9776
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
9777
# ----------------------------------
9778
AC_DEFUN([PKG_PROG_PKG_CONFIG],
9779
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9780
m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
9781
m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
9782
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
9783
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
9784
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
9785
 
9786
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9787
	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9788
fi
9789
if test -n "$PKG_CONFIG"; then
9790
	_pkg_min_version=m4_default([$1], [0.9.0])
9791
	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9792
	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9793
		AC_MSG_RESULT([yes])
9794
	else
9795
		AC_MSG_RESULT([no])
9796
		PKG_CONFIG=""
9797
	fi
9798
fi[]dnl
9799
])# PKG_PROG_PKG_CONFIG
9800
 
9801
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9802
#
9803
# Check to see whether a particular set of modules exists.  Similar
9804
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
9805
#
9806
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9807
# only at the first occurence in configure.ac, so if the first place
9808
# it's called might be skipped (such as if it is within an "if", you
9809
# have to call PKG_CHECK_EXISTS manually
9810
# --------------------------------------------------------------
9811
AC_DEFUN([PKG_CHECK_EXISTS],
9812
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9813
if test -n "$PKG_CONFIG" && \
9814
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9815
  m4_default([$2], [:])
9816
m4_ifvaln([$3], [else
9817
  $3])dnl
9818
fi])
9819
 
9820
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9821
# ---------------------------------------------
9822
m4_define([_PKG_CONFIG],
9823
[if test -n "$$1"; then
9824
    pkg_cv_[]$1="$$1"
9825
 elif test -n "$PKG_CONFIG"; then
9826
    PKG_CHECK_EXISTS([$3],
9827
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
9828
		      test "x$?" != "x0" && pkg_failed=yes ],
9829
		     [pkg_failed=yes])
9830
 else
9831
    pkg_failed=untried
9832
fi[]dnl
9833
])# _PKG_CONFIG
9834
 
9835
# _PKG_SHORT_ERRORS_SUPPORTED
9836
# -----------------------------
9837
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9838
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9839
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9840
        _pkg_short_errors_supported=yes
9841
else
9842
        _pkg_short_errors_supported=no
9843
fi[]dnl
9844
])# _PKG_SHORT_ERRORS_SUPPORTED
9845
 
9846
 
9847
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9848
# [ACTION-IF-NOT-FOUND])
9849
#
9850
#
9851
# Note that if there is a possibility the first call to
9852
# PKG_CHECK_MODULES might not happen, you should be sure to include an
9853
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9854
#
9855
#
9856
# --------------------------------------------------------------
9857
AC_DEFUN([PKG_CHECK_MODULES],
9858
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9859
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9860
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9861
 
9862
pkg_failed=no
9863
AC_MSG_CHECKING([for $1])
9864
 
9865
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9866
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
9867
 
9868
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9869
and $1[]_LIBS to avoid the need to call pkg-config.
9870
See the pkg-config man page for more details.])
9871
 
9872
if test $pkg_failed = yes; then
9873
   	AC_MSG_RESULT([no])
9874
        _PKG_SHORT_ERRORS_SUPPORTED
9875
        if test $_pkg_short_errors_supported = yes; then
9876
	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
9877
        else
9878
	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
9879
        fi
9880
	# Put the nasty error message in config.log where it belongs
9881
	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9882
 
9883
	m4_default([$4], [AC_MSG_ERROR(
9884
[Package requirements ($2) were not met:
9885
 
9886
$$1_PKG_ERRORS
9887
 
9888
Consider adjusting the PKG_CONFIG_PATH environment variable if you
9889
installed software in a non-standard prefix.
9890
 
9891
_PKG_TEXT])[]dnl
9892
        ])
9893
elif test $pkg_failed = untried; then
9894
     	AC_MSG_RESULT([no])
9895
	m4_default([$4], [AC_MSG_FAILURE(
9896
[The pkg-config script could not be found or is too old.  Make sure it
9897
is in your PATH or set the PKG_CONFIG environment variable to the full
9898
path to pkg-config.
9899
 
9900
_PKG_TEXT
9901
 
9902
To get pkg-config, see .])[]dnl
9903
        ])
9904
else
9905
	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9906
	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9907
        AC_MSG_RESULT([yes])
9908
	$3
9909
fi[]dnl
9910
])# PKG_CHECK_MODULES
9911
 
9912
AC_DEFUN([WAYLAND_SCANNER_RULES], [
9913
    PKG_PROG_PKG_CONFIG
9914
 
9915
    PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner])
9916
 
9917
    wayland_scanner=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
9918
    AC_SUBST([wayland_scanner])
9919
 
9920
    wayland_scanner_rules=`$PKG_CONFIG --variable=pkgdatadir wayland-scanner`/wayland-scanner.mk
9921
    AC_SUBST_FILE([wayland_scanner_rules])
9922
 
9923
    AC_SUBST([wayland_protocoldir], [$1])
9924
])
9925