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