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