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