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