aclocal.m4 revision e4f6584c
1# generated automatically by aclocal 1.11.1 -*- 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.65],,
17[m4_warning([this file was generated for autoconf 2.65.
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.1], [],
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.1])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 "Software"),
1037dnl to deal in the Software without restriction, including without limitation
1038dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
1039dnl and/or sell copies of the Software, and to permit persons to whom the
1040dnl Software is furnished to do so, subject to the following conditions:
1041dnl
1042dnl The above copyright notice and this permission notice (including the next
1043dnl paragraph) shall be included in all copies or substantial portions of the
1044dnl Software.
1045dnl
1046dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1047dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1048dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
1049dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1050dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1051dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1052dnl DEALINGS IN THE SOFTWARE.
1053
1054# XORG_MACROS_VERSION(required-version)
1055# -------------------------------------
1056# Minimum version: 1.1.0
1057#
1058# If you're using a macro added in Version 1.1 or newer, include this in
1059# your configure.ac with the minimum required version, such as:
1060# XORG_MACROS_VERSION(1.1)
1061#
1062# To ensure that this macro is defined, also add:
1063# m4_ifndef([XORG_MACROS_VERSION],
1064#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
1065#
1066#
1067# See the "minimum version" comment for each macro you use to see what 
1068# version you require.
1069m4_defun([XORG_MACROS_VERSION],[
1070m4_define([vers_have], [1.7.0])
1071m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
1072m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
1073m4_if(m4_cmp(maj_have, maj_needed), 0,,
1074    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
1075m4_if(m4_version_compare(vers_have, [$1]), -1,
1076    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
1077m4_undefine([vers_have])
1078m4_undefine([maj_have])
1079m4_undefine([maj_needed])
1080]) # XORG_MACROS_VERSION
1081
1082# XORG_PROG_RAWCPP()
1083# ------------------
1084# Minimum version: 1.0.0
1085#
1086# Find cpp program and necessary flags for use in pre-processing text files
1087# such as man pages and config files
1088AC_DEFUN([XORG_PROG_RAWCPP],[
1089AC_REQUIRE([AC_PROG_CPP])
1090AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
1091   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
1092
1093# Check for flag to avoid builtin definitions - assumes unix is predefined,
1094# which is not the best choice for supporting other OS'es, but covers most
1095# of the ones we need for now.
1096AC_MSG_CHECKING([if $RAWCPP requires -undef])
1097AC_LANG_CONFTEST([Does cpp redefine unix ?])
1098if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1099	AC_MSG_RESULT([no])
1100else
1101	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1102		RAWCPPFLAGS=-undef
1103		AC_MSG_RESULT([yes])
1104	# under Cygwin unix is still defined even with -undef
1105	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1106		RAWCPPFLAGS="-undef -ansi"
1107		AC_MSG_RESULT([yes, with -ansi])
1108	else
1109		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
1110	fi
1111fi
1112rm -f conftest.$ac_ext
1113
1114AC_MSG_CHECKING([if $RAWCPP requires -traditional])
1115AC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
1116if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
1117	AC_MSG_RESULT([no])
1118else
1119	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
1120		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
1121		AC_MSG_RESULT([yes])
1122	else
1123		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
1124	fi
1125fi
1126rm -f conftest.$ac_ext
1127AC_SUBST(RAWCPPFLAGS)
1128]) # XORG_PROG_RAWCPP
1129
1130# XORG_MANPAGE_SECTIONS()
1131# -----------------------
1132# Minimum version: 1.0.0
1133#
1134# Determine which sections man pages go in for the different man page types
1135# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
1136# Not sure if there's any better way than just hardcoding by OS name.
1137# Override default settings by setting environment variables
1138
1139AC_DEFUN([XORG_MANPAGE_SECTIONS],[
1140AC_REQUIRE([AC_CANONICAL_HOST])
1141
1142if test x$APP_MAN_SUFFIX = x    ; then
1143    APP_MAN_SUFFIX=1
1144fi
1145if test x$APP_MAN_DIR = x    ; then
1146    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
1147fi
1148
1149if test x$LIB_MAN_SUFFIX = x    ; then
1150    LIB_MAN_SUFFIX=3
1151fi
1152if test x$LIB_MAN_DIR = x    ; then
1153    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
1154fi
1155
1156if test x$FILE_MAN_SUFFIX = x    ; then
1157    case $host_os in
1158	solaris*)	FILE_MAN_SUFFIX=4  ;;
1159	*)		FILE_MAN_SUFFIX=5  ;;
1160    esac
1161fi
1162if test x$FILE_MAN_DIR = x    ; then
1163    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
1164fi
1165
1166if test x$MISC_MAN_SUFFIX = x    ; then
1167    case $host_os in
1168	solaris*)	MISC_MAN_SUFFIX=5  ;;
1169	*)		MISC_MAN_SUFFIX=7  ;;
1170    esac
1171fi
1172if test x$MISC_MAN_DIR = x    ; then
1173    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
1174fi
1175
1176if test x$DRIVER_MAN_SUFFIX = x    ; then
1177    case $host_os in
1178	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
1179	*)		DRIVER_MAN_SUFFIX=4  ;;
1180    esac
1181fi
1182if test x$DRIVER_MAN_DIR = x    ; then
1183    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
1184fi
1185
1186if test x$ADMIN_MAN_SUFFIX = x    ; then
1187    case $host_os in
1188	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
1189	*)		ADMIN_MAN_SUFFIX=8  ;;
1190    esac
1191fi
1192if test x$ADMIN_MAN_DIR = x    ; then
1193    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
1194fi
1195
1196
1197AC_SUBST([APP_MAN_SUFFIX])
1198AC_SUBST([LIB_MAN_SUFFIX])
1199AC_SUBST([FILE_MAN_SUFFIX])
1200AC_SUBST([MISC_MAN_SUFFIX])
1201AC_SUBST([DRIVER_MAN_SUFFIX])
1202AC_SUBST([ADMIN_MAN_SUFFIX])
1203AC_SUBST([APP_MAN_DIR])
1204AC_SUBST([LIB_MAN_DIR])
1205AC_SUBST([FILE_MAN_DIR])
1206AC_SUBST([MISC_MAN_DIR])
1207AC_SUBST([DRIVER_MAN_DIR])
1208AC_SUBST([ADMIN_MAN_DIR])
1209]) # XORG_MANPAGE_SECTIONS
1210
1211# XORG_CHECK_SGML_DOCTOOLS
1212# ------------------------
1213# Minimum version: 1.7.0
1214#
1215# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
1216# provided by xorg-sgml-doctools, if installed.
1217AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
1218AC_MSG_CHECKING([for X.Org SGML entities])
1219XORG_SGML_PATH=
1220PKG_CHECK_EXISTS([xorg-sgml-doctools],
1221    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
1222    [if test x"$cross_compiling" != x"yes" ; then
1223        AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
1224                      [XORG_SGML_PATH=$prefix/share/sgml])
1225     fi])
1226
1227if test "x$XORG_SGML_PATH" != "x" ; then
1228   AC_MSG_RESULT([$XORG_SGML_PATH])
1229else
1230   AC_MSG_RESULT([no])
1231fi
1232
1233AC_SUBST(XORG_SGML_PATH)
1234]) # XORG_CHECK_SGML_DOCTOOLS
1235
1236# XORG_CHECK_LINUXDOC
1237# -------------------
1238# Minimum version: 1.0.0
1239#
1240# Defines the variable MAKE_TEXT if the necessary tools and
1241# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
1242# Whether or not the necessary tools and files are found can be checked
1243# with the AM_CONDITIONAL "BUILD_LINUXDOC"
1244AC_DEFUN([XORG_CHECK_LINUXDOC],[
1245AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
1246
1247AC_PATH_PROG(LINUXDOC, linuxdoc)
1248AC_PATH_PROG(PS2PDF, ps2pdf)
1249
1250AC_MSG_CHECKING([whether to build documentation])
1251
1252if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
1253   BUILDDOC=yes
1254else
1255   BUILDDOC=no
1256fi
1257
1258AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
1259
1260AC_MSG_RESULT([$BUILDDOC])
1261
1262AC_MSG_CHECKING([whether to build pdf documentation])
1263
1264if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
1265   BUILDPDFDOC=yes
1266else
1267   BUILDPDFDOC=no
1268fi
1269
1270AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1271
1272AC_MSG_RESULT([$BUILDPDFDOC])
1273
1274MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
1275MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
1276MAKE_PDF="$PS2PDF"
1277MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
1278
1279AC_SUBST(MAKE_TEXT)
1280AC_SUBST(MAKE_PS)
1281AC_SUBST(MAKE_PDF)
1282AC_SUBST(MAKE_HTML)
1283]) # XORG_CHECK_LINUXDOC
1284
1285# XORG_CHECK_DOCBOOK
1286# -------------------
1287# Minimum version: 1.0.0
1288#
1289# Checks for the ability to build output formats from SGML DocBook source.
1290# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
1291# indicates whether the necessary tools and files are found and, if set,
1292# $(MAKE_XXX) blah.sgml will produce blah.xxx.
1293AC_DEFUN([XORG_CHECK_DOCBOOK],[
1294AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
1295
1296BUILDTXTDOC=no
1297BUILDPDFDOC=no
1298BUILDPSDOC=no
1299BUILDHTMLDOC=no
1300
1301AC_PATH_PROG(DOCBOOKPS, docbook2ps)
1302AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
1303AC_PATH_PROG(DOCBOOKHTML, docbook2html)
1304AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
1305
1306AC_MSG_CHECKING([whether to build text documentation])
1307if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
1308   test x$BUILD_TXTDOC != xno; then
1309	BUILDTXTDOC=yes
1310fi
1311AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
1312AC_MSG_RESULT([$BUILDTXTDOC])
1313
1314AC_MSG_CHECKING([whether to build PDF documentation])
1315if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
1316   test x$BUILD_PDFDOC != xno; then
1317	BUILDPDFDOC=yes
1318fi
1319AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1320AC_MSG_RESULT([$BUILDPDFDOC])
1321
1322AC_MSG_CHECKING([whether to build PostScript documentation])
1323if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
1324   test x$BUILD_PSDOC != xno; then
1325	BUILDPSDOC=yes
1326fi
1327AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
1328AC_MSG_RESULT([$BUILDPSDOC])
1329
1330AC_MSG_CHECKING([whether to build HTML documentation])
1331if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
1332   test x$BUILD_HTMLDOC != xno; then
1333	BUILDHTMLDOC=yes
1334fi
1335AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
1336AC_MSG_RESULT([$BUILDHTMLDOC])
1337
1338MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
1339MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
1340MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
1341MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
1342
1343AC_SUBST(MAKE_TEXT)
1344AC_SUBST(MAKE_PS)
1345AC_SUBST(MAKE_PDF)
1346AC_SUBST(MAKE_HTML)
1347]) # XORG_CHECK_DOCBOOK
1348
1349# XORG_WITH_XMLTO([MIN-VERSION])
1350# ----------------
1351# Minimum version: 1.5.0
1352#
1353# Documentation tools are not always available on all platforms and sometimes
1354# not at the appropriate level. This macro enables a module to test for the
1355# presence of the tool and obtain it's path in separate variables. Coupled with
1356# the --with-xmlto option, it allows maximum flexibilty in making decisions
1357# as whether or not to use the xmlto package.
1358#
1359# Interface to module:
1360# HAVE_XMLTO: 	used in makefiles to conditionally generate documentation
1361# XMLTO:	returns the path of the xmlto program found
1362#		returns the path set by the user in the environment
1363# --with-xmlto:	'yes' user instructs the module to use xmlto
1364#		'no' user instructs the module not to use xmlto
1365#
1366# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
1367#
1368AC_DEFUN([XORG_WITH_XMLTO],[
1369AC_ARG_VAR([XMLTO], [Path to xmlto command])
1370AC_ARG_WITH(xmlto,
1371	AS_HELP_STRING([--with-xmlto],
1372	   [Use xmlto to regenerate documentation (default: yes, if installed)]),
1373	   [use_xmlto=$withval], [use_xmlto=auto])
1374
1375if test "x$use_xmlto" = x"auto"; then
1376   AC_PATH_PROG([XMLTO], [xmlto])
1377   if test "x$XMLTO" = "x"; then
1378        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
1379	have_xmlto=no
1380   else
1381        have_xmlto=yes
1382   fi
1383elif test "x$use_xmlto" = x"yes" ; then
1384   AC_PATH_PROG([XMLTO], [xmlto])
1385   if test "x$XMLTO" = "x"; then
1386        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
1387   fi
1388   have_xmlto=yes
1389elif test "x$use_xmlto" = x"no" ; then
1390   if test "x$XMLTO" != "x"; then
1391      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
1392   fi
1393   have_xmlto=no
1394else
1395   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
1396fi
1397m4_ifval([$1],
1398[if test "$have_xmlto" = yes; then
1399    # scrape the xmlto version
1400    AC_MSG_CHECKING([the xmlto version])
1401    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
1402    AC_MSG_RESULT([$xmlto_version])
1403    AS_VERSION_COMPARE([$xmlto_version], [$1],
1404        [if test "x$use_xmlto" = xauto; then
1405            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
1406            have_xmlto=no
1407        else
1408            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
1409        fi])
1410fi])
1411AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
1412]) # XORG_WITH_XMLTO
1413
1414# XORG_WITH_ASCIIDOC([MIN-VERSION])
1415# ----------------
1416# Minimum version: 1.5.0
1417#
1418# Documentation tools are not always available on all platforms and sometimes
1419# not at the appropriate level. This macro enables a module to test for the
1420# presence of the tool and obtain it's path in separate variables. Coupled with
1421# the --with-asciidoc option, it allows maximum flexibilty in making decisions
1422# as whether or not to use the asciidoc package.
1423#
1424# Interface to module:
1425# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
1426# ASCIIDOC:	 returns the path of the asciidoc program found
1427#		 returns the path set by the user in the environment
1428# --with-asciidoc: 'yes' user instructs the module to use asciidoc
1429#		  'no' user instructs the module not to use asciidoc
1430#
1431# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
1432#
1433AC_DEFUN([XORG_WITH_ASCIIDOC],[
1434AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
1435AC_ARG_WITH(asciidoc,
1436	AS_HELP_STRING([--with-asciidoc],
1437	   [Use asciidoc to regenerate documentation (default: yes, if installed)]),
1438	   [use_asciidoc=$withval], [use_asciidoc=auto])
1439
1440if test "x$use_asciidoc" = x"auto"; then
1441   AC_PATH_PROG([ASCIIDOC], [asciidoc])
1442   if test "x$ASCIIDOC" = "x"; then
1443        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
1444	have_asciidoc=no
1445   else
1446        have_asciidoc=yes
1447   fi
1448elif test "x$use_asciidoc" = x"yes" ; then
1449   AC_PATH_PROG([ASCIIDOC], [asciidoc])
1450   if test "x$ASCIIDOC" = "x"; then
1451        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
1452   fi
1453   have_asciidoc=yes
1454elif test "x$use_asciidoc" = x"no" ; then
1455   if test "x$ASCIIDOC" != "x"; then
1456      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
1457   fi
1458   have_asciidoc=no
1459else
1460   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
1461fi
1462m4_ifval([$1],
1463[if test "$have_asciidoc" = yes; then
1464    # scrape the asciidoc version
1465    AC_MSG_CHECKING([the asciidoc version])
1466    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
1467    AC_MSG_RESULT([$asciidoc_version])
1468    AS_VERSION_COMPARE([$asciidoc_version], [$1],
1469        [if test "x$use_asciidoc" = xauto; then
1470            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
1471            have_asciidoc=no
1472        else
1473            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
1474        fi])
1475fi])
1476AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
1477]) # XORG_WITH_ASCIIDOC
1478
1479# XORG_WITH_DOXYGEN([MIN-VERSION])
1480# --------------------------------
1481# Minimum version: 1.5.0
1482#
1483# Documentation tools are not always available on all platforms and sometimes
1484# not at the appropriate level. This macro enables a module to test for the
1485# presence of the tool and obtain it's path in separate variables. Coupled with
1486# the --with-doxygen option, it allows maximum flexibilty in making decisions
1487# as whether or not to use the doxygen package.
1488#
1489# Interface to module:
1490# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
1491# DOXYGEN:	 returns the path of the doxygen program found
1492#		 returns the path set by the user in the environment
1493# --with-doxygen: 'yes' user instructs the module to use doxygen
1494#		  'no' user instructs the module not to use doxygen
1495#
1496# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
1497#
1498AC_DEFUN([XORG_WITH_DOXYGEN],[
1499AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
1500AC_ARG_WITH(doxygen,
1501	AS_HELP_STRING([--with-doxygen],
1502	   [Use doxygen to regenerate documentation (default: yes, if installed)]),
1503	   [use_doxygen=$withval], [use_doxygen=auto])
1504
1505if test "x$use_doxygen" = x"auto"; then
1506   AC_PATH_PROG([DOXYGEN], [doxygen])
1507   if test "x$DOXYGEN" = "x"; then
1508        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
1509	have_doxygen=no
1510   else
1511        have_doxygen=yes
1512   fi
1513elif test "x$use_doxygen" = x"yes" ; then
1514   AC_PATH_PROG([DOXYGEN], [doxygen])
1515   if test "x$DOXYGEN" = "x"; then
1516        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
1517   fi
1518   have_doxygen=yes
1519elif test "x$use_doxygen" = x"no" ; then
1520   if test "x$DOXYGEN" != "x"; then
1521      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
1522   fi
1523   have_doxygen=no
1524else
1525   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
1526fi
1527m4_ifval([$1],
1528[if test "$have_doxygen" = yes; then
1529    # scrape the doxygen version
1530    AC_MSG_CHECKING([the doxygen version])
1531    doxygen_version=`$DOXYGEN --version 2>/dev/null`
1532    AC_MSG_RESULT([$doxygen_version])
1533    AS_VERSION_COMPARE([$doxygen_version], [$1],
1534        [if test "x$use_doxygen" = xauto; then
1535            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
1536            have_doxygen=no
1537        else
1538            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
1539        fi])
1540fi])
1541AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
1542]) # XORG_WITH_DOXYGEN
1543
1544# XORG_WITH_GROFF
1545# ----------------
1546# Minimum version: 1.6.0
1547#
1548# Documentation tools are not always available on all platforms and sometimes
1549# not at the appropriate level. This macro enables a module to test for the
1550# presence of the tool and obtain it's path in separate variables. Coupled with
1551# the --with-groff option, it allows maximum flexibilty in making decisions
1552# as whether or not to use the groff package.
1553#
1554# Interface to module:
1555# HAVE_GROFF:	 used in makefiles to conditionally generate documentation
1556# HAVE_GROFF_MM: the memorandum macros (-mm) package
1557# HAVE_GROFF_MS: the -ms macros package
1558# GROFF:	 returns the path of the groff program found
1559#		 returns the path set by the user in the environment
1560# --with-groff:	 'yes' user instructs the module to use groff
1561#		 'no' user instructs the module not to use groff
1562#
1563# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
1564#
1565# OS and distros often splits groff in a basic and full package, the former
1566# having the groff program and the later having devices, fonts and macros
1567# Checking for the groff executable is not enough.
1568#
1569# If macros are missing, we cannot assume that groff is useless, so we don't
1570# unset HAVE_GROFF or GROFF env variables.
1571# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
1572#
1573AC_DEFUN([XORG_WITH_GROFF],[
1574AC_ARG_VAR([GROFF], [Path to groff command])
1575AC_ARG_WITH(groff,
1576	AS_HELP_STRING([--with-groff],
1577	   [Use groff to regenerate documentation (default: yes, if installed)]),
1578	   [use_groff=$withval], [use_groff=auto])
1579
1580if test "x$use_groff" = x"auto"; then
1581   AC_PATH_PROG([GROFF], [groff])
1582   if test "x$GROFF" = "x"; then
1583        AC_MSG_WARN([groff not found - documentation targets will be skipped])
1584	have_groff=no
1585   else
1586        have_groff=yes
1587   fi
1588elif test "x$use_groff" = x"yes" ; then
1589   AC_PATH_PROG([GROFF], [groff])
1590   if test "x$GROFF" = "x"; then
1591        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
1592   fi
1593   have_groff=yes
1594elif test "x$use_groff" = x"no" ; then
1595   if test "x$GROFF" != "x"; then
1596      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
1597   fi
1598   have_groff=no
1599else
1600   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
1601fi
1602# We have groff, test for the presence of the macro packages
1603if test "x$have_groff" = x"yes"; then
1604    AC_MSG_CHECKING([for ${GROFF} -ms macros])
1605    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
1606        groff_ms_works=yes
1607    else
1608        groff_ms_works=no
1609    fi
1610    AC_MSG_RESULT([$groff_ms_works])
1611    AC_MSG_CHECKING([for ${GROFF} -mm macros])
1612    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
1613        groff_mm_works=yes
1614    else
1615        groff_mm_works=no
1616    fi
1617    AC_MSG_RESULT([$groff_mm_works])
1618fi
1619AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
1620AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
1621AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
1622]) # XORG_WITH_GROFF
1623
1624# XORG_WITH_FOP
1625# ----------------
1626# Minimum version: 1.6.0
1627#
1628# Documentation tools are not always available on all platforms and sometimes
1629# not at the appropriate level. This macro enables a module to test for the
1630# presence of the tool and obtain it's path in separate variables. Coupled with
1631# the --with-fop option, it allows maximum flexibilty in making decisions
1632# as whether or not to use the fop package.
1633#
1634# Interface to module:
1635# HAVE_FOP: 	used in makefiles to conditionally generate documentation
1636# FOP:	 	returns the path of the fop program found
1637#		returns the path set by the user in the environment
1638# --with-fop: 	'yes' user instructs the module to use fop
1639#		'no' user instructs the module not to use fop
1640#
1641# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
1642#
1643AC_DEFUN([XORG_WITH_FOP],[
1644AC_ARG_VAR([FOP], [Path to fop command])
1645AC_ARG_WITH(fop,
1646	AS_HELP_STRING([--with-fop],
1647	   [Use fop to regenerate documentation (default: yes, if installed)]),
1648	   [use_fop=$withval], [use_fop=auto])
1649
1650if test "x$use_fop" = x"auto"; then
1651   AC_PATH_PROG([FOP], [fop])
1652   if test "x$FOP" = "x"; then
1653        AC_MSG_WARN([fop not found - documentation targets will be skipped])
1654	have_fop=no
1655   else
1656        have_fop=yes
1657   fi
1658elif test "x$use_fop" = x"yes" ; then
1659   AC_PATH_PROG([FOP], [fop])
1660   if test "x$FOP" = "x"; then
1661        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
1662   fi
1663   have_fop=yes
1664elif test "x$use_fop" = x"no" ; then
1665   if test "x$FOP" != "x"; then
1666      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
1667   fi
1668   have_fop=no
1669else
1670   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
1671fi
1672AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
1673]) # XORG_WITH_FOP
1674
1675# XORG_WITH_PS2PDF
1676# ----------------
1677# Minimum version: 1.6.0
1678#
1679# Documentation tools are not always available on all platforms and sometimes
1680# not at the appropriate level. This macro enables a module to test for the
1681# presence of the tool and obtain it's path in separate variables. Coupled with
1682# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
1683# as whether or not to use the ps2pdf package.
1684#
1685# Interface to module:
1686# HAVE_PS2PDF: 	used in makefiles to conditionally generate documentation
1687# PS2PDF:	returns the path of the ps2pdf program found
1688#		returns the path set by the user in the environment
1689# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
1690#		 'no' user instructs the module not to use ps2pdf
1691#
1692# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
1693#
1694AC_DEFUN([XORG_WITH_PS2PDF],[
1695AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
1696AC_ARG_WITH(ps2pdf,
1697	AS_HELP_STRING([--with-ps2pdf],
1698	   [Use ps2pdf to regenerate documentation (default: yes, if installed)]),
1699	   [use_ps2pdf=$withval], [use_ps2pdf=auto])
1700
1701if test "x$use_ps2pdf" = x"auto"; then
1702   AC_PATH_PROG([PS2PDF], [ps2pdf])
1703   if test "x$PS2PDF" = "x"; then
1704        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
1705	have_ps2pdf=no
1706   else
1707        have_ps2pdf=yes
1708   fi
1709elif test "x$use_ps2pdf" = x"yes" ; then
1710   AC_PATH_PROG([PS2PDF], [ps2pdf])
1711   if test "x$PS2PDF" = "x"; then
1712        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
1713   fi
1714   have_ps2pdf=yes
1715elif test "x$use_ps2pdf" = x"no" ; then
1716   if test "x$PS2PDF" != "x"; then
1717      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
1718   fi
1719   have_ps2pdf=no
1720else
1721   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
1722fi
1723AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
1724]) # XORG_WITH_PS2PDF
1725
1726# XORG_ENABLE_DOCS (enable_docs=yes)
1727# ----------------
1728# Minimum version: 1.6.0
1729#
1730# Documentation tools are not always available on all platforms and sometimes
1731# not at the appropriate level. This macro enables a builder to skip all
1732# documentation targets except traditional man pages.
1733# Combined with the specific tool checking macros XORG_WITH_*, it provides
1734# maximum flexibilty in controlling documentation building.
1735# Refer to:
1736# XORG_WITH_XMLTO         --with-xmlto
1737# XORG_WITH_ASCIIDOC      --with-asciidoc
1738# XORG_WITH_DOXYGEN       --with-doxygen
1739# XORG_WITH_FOP           --with-fop
1740# XORG_WITH_GROFF         --with-groff
1741# XORG_WITH_PS2PDF        --with-ps2pdf
1742#
1743# Interface to module:
1744# ENABLE_DOCS: 	  used in makefiles to conditionally generate documentation
1745# --enable-docs: 'yes' user instructs the module to generate docs
1746#		 'no' user instructs the module not to generate docs
1747# parm1:	specify the default value, yes or no.
1748#
1749AC_DEFUN([XORG_ENABLE_DOCS],[
1750default=$1
1751if test "x$default" = x ; then
1752  default="yes"
1753fi
1754AC_ARG_ENABLE(docs,
1755	AS_HELP_STRING([--enable-docs],
1756	   [Enable building the documentation (default: yes)]),
1757	   [build_docs=$enableval], [build_docs=$default])
1758AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
1759AC_MSG_CHECKING([whether to build documentation])
1760AC_MSG_RESULT([$build_docs])
1761]) # XORG_ENABLE_DOCS
1762
1763# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
1764# ----------------
1765# Minimum version: 1.6.0
1766#
1767# This macro enables a builder to skip all developer documentation.
1768# Combined with the specific tool checking macros XORG_WITH_*, it provides
1769# maximum flexibilty in controlling documentation building.
1770# Refer to:
1771# XORG_WITH_XMLTO         --with-xmlto
1772# XORG_WITH_ASCIIDOC      --with-asciidoc
1773# XORG_WITH_DOXYGEN       --with-doxygen
1774# XORG_WITH_FOP           --with-fop
1775# XORG_WITH_GROFF         --with-groff
1776# XORG_WITH_PS2PDF        --with-ps2pdf
1777#
1778# Interface to module:
1779# ENABLE_DEVEL_DOCS:	used in makefiles to conditionally generate developer docs
1780# --enable-devel-docs:	'yes' user instructs the module to generate developer docs
1781#			'no' user instructs the module not to generate developer docs
1782# parm1:		specify the default value, yes or no.
1783#
1784AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
1785devel_default=$1
1786if test "x$devel_default" = x ; then
1787  devel_default="yes"
1788fi
1789AC_ARG_ENABLE(devel-docs,
1790	AS_HELP_STRING([--enable-devel-docs],
1791	   [Enable building the developer documentation (default: yes)]),
1792	   [build_devel_docs=$enableval], [build_devel_docs=$devel_default])
1793AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
1794AC_MSG_CHECKING([whether to build developer documentation])
1795AC_MSG_RESULT([$build_devel_docs])
1796]) # XORG_ENABLE_DEVEL_DOCS
1797
1798# XORG_ENABLE_SPECS (enable_specs=yes)
1799# ----------------
1800# Minimum version: 1.6.0
1801#
1802# This macro enables a builder to skip all functional specification targets.
1803# Combined with the specific tool checking macros XORG_WITH_*, it provides
1804# maximum flexibilty in controlling documentation building.
1805# Refer to:
1806# XORG_WITH_XMLTO         --with-xmlto
1807# XORG_WITH_ASCIIDOC      --with-asciidoc
1808# XORG_WITH_DOXYGEN       --with-doxygen
1809# XORG_WITH_FOP           --with-fop
1810# XORG_WITH_GROFF         --with-groff
1811# XORG_WITH_PS2PDF        --with-ps2pdf
1812#
1813# Interface to module:
1814# ENABLE_SPECS:		used in makefiles to conditionally generate specs
1815# --enable-specs:	'yes' user instructs the module to generate specs
1816#			'no' user instructs the module not to generate specs
1817# parm1:		specify the default value, yes or no.
1818#
1819AC_DEFUN([XORG_ENABLE_SPECS],[
1820spec_default=$1
1821if test "x$spec_default" = x ; then
1822  spec_default="yes"
1823fi
1824AC_ARG_ENABLE(specs,
1825	AS_HELP_STRING([--enable-specs],
1826	   [Enable building the specs (default: yes)]),
1827	   [build_specs=$enableval], [build_specs=$spec_default])
1828AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
1829AC_MSG_CHECKING([whether to build functional specifications])
1830AC_MSG_RESULT([$build_specs])
1831]) # XORG_ENABLE_SPECS
1832
1833# XORG_CHECK_MALLOC_ZERO
1834# ----------------------
1835# Minimum version: 1.0.0
1836#
1837# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
1838# malloc(0) returns NULL.  Packages should add one of these cflags to
1839# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
1840AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
1841AC_ARG_ENABLE(malloc0returnsnull,
1842	AS_HELP_STRING([--enable-malloc0returnsnull],
1843		       [malloc(0) returns NULL (default: auto)]),
1844	[MALLOC_ZERO_RETURNS_NULL=$enableval],
1845	[MALLOC_ZERO_RETURNS_NULL=auto])
1846
1847AC_MSG_CHECKING([whether malloc(0) returns NULL])
1848if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
1849	AC_RUN_IFELSE([
1850char *malloc();
1851char *realloc();
1852char *calloc();
1853main() {
1854    char *m0, *r0, *c0, *p;
1855    m0 = malloc(0);
1856    p = malloc(10);
1857    r0 = realloc(p,0);
1858    c0 = calloc(0);
1859    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
1860}],
1861		[MALLOC_ZERO_RETURNS_NULL=yes],
1862		[MALLOC_ZERO_RETURNS_NULL=no],
1863		[MALLOC_ZERO_RETURNS_NULL=yes])
1864fi
1865AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
1866
1867if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
1868	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
1869	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
1870	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
1871else
1872	MALLOC_ZERO_CFLAGS=""
1873	XMALLOC_ZERO_CFLAGS=""
1874	XTMALLOC_ZERO_CFLAGS=""
1875fi
1876
1877AC_SUBST([MALLOC_ZERO_CFLAGS])
1878AC_SUBST([XMALLOC_ZERO_CFLAGS])
1879AC_SUBST([XTMALLOC_ZERO_CFLAGS])
1880]) # XORG_CHECK_MALLOC_ZERO
1881
1882# XORG_WITH_LINT()
1883# ----------------
1884# Minimum version: 1.1.0
1885#
1886# Sets up flags for source checkers such as lint and sparse if --with-lint
1887# is specified.   (Use --with-lint=sparse for sparse.)
1888# Sets $LINT to name of source checker passed with --with-lint (default: lint)
1889# Sets $LINT_FLAGS to flags to pass to source checker
1890# Sets LINT automake conditional if enabled (default: disabled)
1891#
1892AC_DEFUN([XORG_WITH_LINT],[
1893
1894# Allow checking code with lint, sparse, etc.
1895AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
1896		[Use a lint-style source code checker (default: disabled)])],
1897		[use_lint=$withval], [use_lint=no])
1898if test "x$use_lint" = "xyes" ; then
1899	LINT="lint"
1900else
1901	LINT="$use_lint"
1902fi
1903if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
1904    case $LINT in
1905	lint|*/lint)
1906	    case $host_os in
1907		solaris*)
1908			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
1909			;;
1910	    esac
1911	    ;;
1912    esac
1913fi
1914
1915AC_SUBST(LINT)
1916AC_SUBST(LINT_FLAGS)
1917AM_CONDITIONAL(LINT, [test x$LINT != xno])
1918
1919]) # XORG_WITH_LINT
1920
1921# XORG_LINT_LIBRARY(LIBNAME)
1922# --------------------------
1923# Minimum version: 1.1.0
1924#
1925# Sets up flags for building lint libraries for checking programs that call
1926# functions in the library.
1927# Disabled by default, enable with --enable-lint-library
1928# Sets: 
1929#	@LINTLIB@		- name of lint library file to make
1930#	MAKE_LINT_LIB		- automake conditional
1931#
1932
1933AC_DEFUN([XORG_LINT_LIBRARY],[
1934AC_REQUIRE([XORG_WITH_LINT])
1935# Build lint "library" for more indepth checks of programs calling this library
1936AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
1937	[Create lint library (default: disabled)])],
1938	[make_lint_lib=$enableval], [make_lint_lib=no])
1939if test "x$make_lint_lib" != "xno" ; then
1940	if test "x$LINT" = "xno" ; then
1941		AC_MSG_ERROR([Cannot make lint library without --with-lint])
1942	fi
1943	if test "x$make_lint_lib" = "xyes" ; then
1944		LINTLIB=llib-l$1.ln
1945	else
1946		LINTLIB=$make_lint_lib
1947	fi
1948fi
1949AC_SUBST(LINTLIB)
1950AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
1951
1952]) # XORG_LINT_LIBRARY
1953
1954# XORG_CWARNFLAGS
1955# ---------------
1956# Minimum version: 1.2.0
1957#
1958# Defines CWARNFLAGS to enable C compiler warnings.
1959#
1960AC_DEFUN([XORG_CWARNFLAGS], [
1961AC_REQUIRE([AC_PROG_CC])
1962if  test "x$GCC" = xyes ; then
1963    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
1964-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
1965-Wbad-function-cast -Wformat=2"
1966    case `$CC -dumpversion` in
1967    3.4.* | 4.*)
1968	CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
1969	;;
1970    esac
1971else
1972    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
1973    if test "x$SUNCC" = "xyes"; then
1974	CWARNFLAGS="-v"
1975    fi
1976fi
1977AC_SUBST(CWARNFLAGS)
1978]) # XORG_CWARNFLAGS
1979
1980# XORG_STRICT_OPTION
1981# -----------------------
1982# Minimum version: 1.3.0
1983#
1984# Add configure option to enable strict compilation
1985AC_DEFUN([XORG_STRICT_OPTION], [
1986AC_REQUIRE([AC_PROG_CC])
1987AC_REQUIRE([AC_PROG_CC_C99])
1988AC_REQUIRE([XORG_CWARNFLAGS])
1989
1990AC_ARG_ENABLE(strict-compilation,
1991			  AS_HELP_STRING([--enable-strict-compilation],
1992			  [Enable all warnings from compiler and make them errors (default: disabled)]),
1993			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
1994if test "x$STRICT_COMPILE" = "xyes"; then
1995	AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
1996	AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
1997	if test "x$GCC" = xyes ; then
1998		STRICT_CFLAGS="-pedantic -Werror"
1999	elif test "x$SUNCC" = "xyes"; then
2000		STRICT_CFLAGS="-errwarn"
2001    elif test "x$INTELCC" = "xyes"; then
2002		STRICT_CFLAGS="-Werror"
2003	fi
2004fi
2005CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
2006AC_SUBST([CWARNFLAGS])
2007]) # XORG_STRICT_OPTION
2008
2009# XORG_DEFAULT_OPTIONS
2010# --------------------
2011# Minimum version: 1.3.0
2012#
2013# Defines default options for X.Org modules.
2014#
2015AC_DEFUN([XORG_DEFAULT_OPTIONS], [
2016XORG_CWARNFLAGS
2017XORG_STRICT_OPTION
2018XORG_RELEASE_VERSION
2019XORG_CHANGELOG
2020XORG_INSTALL
2021XORG_MANPAGE_SECTIONS
2022m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
2023    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
2024]) # XORG_DEFAULT_OPTIONS
2025
2026# XORG_INSTALL()
2027# ----------------
2028# Minimum version: 1.4.0
2029#
2030# Defines the variable INSTALL_CMD as the command to copy
2031# INSTALL from $prefix/share/util-macros.
2032#
2033AC_DEFUN([XORG_INSTALL], [
2034AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2035macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
2036INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
2037mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
2038|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
2039echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
2040AC_SUBST([INSTALL_CMD])
2041]) # XORG_INSTALL
2042dnl Copyright 2005 Red Hat, Inc
2043dnl
2044dnl Permission to use, copy, modify, distribute, and sell this software and its
2045dnl documentation for any purpose is hereby granted without fee, provided that
2046dnl the above copyright notice appear in all copies and that both that
2047dnl copyright notice and this permission notice appear in supporting
2048dnl documentation.
2049dnl
2050dnl The above copyright notice and this permission notice shall be included
2051dnl in all copies or substantial portions of the Software.
2052dnl
2053dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
2054dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2055dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
2056dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
2057dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
2058dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2059dnl OTHER DEALINGS IN THE SOFTWARE.
2060dnl
2061dnl Except as contained in this notice, the name of the copyright holders shall
2062dnl not be used in advertising or otherwise to promote the sale, use or
2063dnl other dealings in this Software without prior written authorization
2064dnl from the copyright holders.
2065dnl
2066
2067# XORG_RELEASE_VERSION
2068# --------------------
2069# Adds --with/without-release-string and changes the PACKAGE and
2070# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
2071# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
2072# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
2073 
2074AC_DEFUN([XORG_RELEASE_VERSION],[
2075	AC_ARG_WITH(release-version,
2076			AS_HELP_STRING([--with-release-version=STRING],
2077				[Use release version string in package name]),
2078			[RELEASE_VERSION="$withval"],
2079			[RELEASE_VERSION=""])
2080	if test "x$RELEASE_VERSION" != "x"; then
2081		PACKAGE="$PACKAGE-$RELEASE_VERSION"
2082		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
2083		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
2084	fi
2085	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
2086		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
2087		[Major version of this package])
2088	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
2089	if test "x$PVM" = "x"; then
2090		PVM="0"
2091	fi
2092	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
2093		[$PVM],
2094		[Minor version of this package])
2095	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
2096	if test "x$PVP" = "x"; then
2097		PVP="0"
2098	fi
2099	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
2100		[$PVP],
2101		[Patch version of this package])
2102])
2103
2104# XORG_CHANGELOG()
2105# ----------------
2106# Minimum version: 1.2.0
2107#
2108# Defines the variable CHANGELOG_CMD as the command to generate
2109# ChangeLog from git.
2110#
2111#
2112AC_DEFUN([XORG_CHANGELOG], [
2113CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
2114mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
2115|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
2116echo 'git directory not found: installing possibly empty changelog.' >&2)"
2117AC_SUBST([CHANGELOG_CMD])
2118]) # XORG_CHANGELOG
2119
2120dnl Copyright 2005 Red Hat, Inc
2121dnl 
2122dnl Permission to use, copy, modify, distribute, and sell this software and its
2123dnl documentation for any purpose is hereby granted without fee, provided that
2124dnl the above copyright notice appear in all copies and that both that
2125dnl copyright notice and this permission notice appear in supporting
2126dnl documentation.
2127dnl 
2128dnl The above copyright notice and this permission notice shall be included
2129dnl in all copies or substantial portions of the Software.
2130dnl 
2131dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
2132dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2133dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
2134dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
2135dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
2136dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2137dnl OTHER DEALINGS IN THE SOFTWARE.
2138dnl 
2139dnl Except as contained in this notice, the name of the copyright holders shall
2140dnl not be used in advertising or otherwise to promote the sale, use or
2141dnl other dealings in this Software without prior written authorization
2142dnl from the copyright holders.
2143dnl 
2144
2145# XORG_DRIVER_CHECK_EXT()
2146# --------------------------
2147# Checks for the $1 define in xorg-server.h (from the sdk).  If it
2148# is defined, then add $1 to $REQUIRED_MODULES.
2149
2150AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
2151	AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2152	SAVE_CFLAGS="$CFLAGS"
2153	CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`"
2154	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2155#include "xorg-server.h"
2156#if !defined $1
2157#error $1 not defined
2158#endif
2159		]])],
2160		[_EXT_CHECK=yes],
2161		[_EXT_CHECK=no])
2162	CFLAGS="$SAVE_CFLAGS"
2163	AC_MSG_CHECKING([if $1 is defined])
2164	AC_MSG_RESULT([$_EXT_CHECK])
2165	if test "$_EXT_CHECK" != no; then
2166		REQUIRED_MODULES="$REQUIRED_MODULES $2"
2167	fi
2168])
2169
2170# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2171# 
2172# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
2173#
2174# This program is free software; you can redistribute it and/or modify
2175# it under the terms of the GNU General Public License as published by
2176# the Free Software Foundation; either version 2 of the License, or
2177# (at your option) any later version.
2178#
2179# This program is distributed in the hope that it will be useful, but
2180# WITHOUT ANY WARRANTY; without even the implied warranty of
2181# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2182# General Public License for more details.
2183#
2184# You should have received a copy of the GNU General Public License
2185# along with this program; if not, write to the Free Software
2186# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2187#
2188# As a special exception to the GNU General Public License, if you
2189# distribute this file as part of a program that contains a
2190# configuration script generated by Autoconf, you may include it under
2191# the same distribution terms that you use for the rest of that program.
2192
2193# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2194# ----------------------------------
2195AC_DEFUN([PKG_PROG_PKG_CONFIG],
2196[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
2197m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
2198AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
2199if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
2200	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
2201fi
2202if test -n "$PKG_CONFIG"; then
2203	_pkg_min_version=m4_default([$1], [0.9.0])
2204	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
2205	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
2206		AC_MSG_RESULT([yes])
2207	else
2208		AC_MSG_RESULT([no])
2209		PKG_CONFIG=""
2210	fi
2211		
2212fi[]dnl
2213])# PKG_PROG_PKG_CONFIG
2214
2215# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2216#
2217# Check to see whether a particular set of modules exists.  Similar
2218# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2219#
2220#
2221# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2222# this or PKG_CHECK_MODULES is called, or make sure to call
2223# PKG_CHECK_EXISTS manually
2224# --------------------------------------------------------------
2225AC_DEFUN([PKG_CHECK_EXISTS],
2226[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2227if test -n "$PKG_CONFIG" && \
2228    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
2229  m4_ifval([$2], [$2], [:])
2230m4_ifvaln([$3], [else
2231  $3])dnl
2232fi])
2233
2234
2235# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2236# ---------------------------------------------
2237m4_define([_PKG_CONFIG],
2238[if test -n "$$1"; then
2239    pkg_cv_[]$1="$$1"
2240 elif test -n "$PKG_CONFIG"; then
2241    PKG_CHECK_EXISTS([$3],
2242                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
2243		     [pkg_failed=yes])
2244 else
2245    pkg_failed=untried
2246fi[]dnl
2247])# _PKG_CONFIG
2248
2249# _PKG_SHORT_ERRORS_SUPPORTED
2250# -----------------------------
2251AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
2252[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2253if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
2254        _pkg_short_errors_supported=yes
2255else
2256        _pkg_short_errors_supported=no
2257fi[]dnl
2258])# _PKG_SHORT_ERRORS_SUPPORTED
2259
2260
2261# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2262# [ACTION-IF-NOT-FOUND])
2263#
2264#
2265# Note that if there is a possibility the first call to
2266# PKG_CHECK_MODULES might not happen, you should be sure to include an
2267# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2268#
2269#
2270# --------------------------------------------------------------
2271AC_DEFUN([PKG_CHECK_MODULES],
2272[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2273AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
2274AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
2275
2276pkg_failed=no
2277AC_MSG_CHECKING([for $1])
2278
2279_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
2280_PKG_CONFIG([$1][_LIBS], [libs], [$2])
2281
2282m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
2283and $1[]_LIBS to avoid the need to call pkg-config.
2284See the pkg-config man page for more details.])
2285
2286if test $pkg_failed = yes; then
2287        _PKG_SHORT_ERRORS_SUPPORTED
2288        if test $_pkg_short_errors_supported = yes; then
2289	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
2290        else 
2291	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
2292        fi
2293	# Put the nasty error message in config.log where it belongs
2294	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
2295
2296	ifelse([$4], , [AC_MSG_ERROR(dnl
2297[Package requirements ($2) were not met:
2298
2299$$1_PKG_ERRORS
2300
2301Consider adjusting the PKG_CONFIG_PATH environment variable if you
2302installed software in a non-standard prefix.
2303
2304_PKG_TEXT
2305])],
2306		[AC_MSG_RESULT([no])
2307                $4])
2308elif test $pkg_failed = untried; then
2309	ifelse([$4], , [AC_MSG_FAILURE(dnl
2310[The pkg-config script could not be found or is too old.  Make sure it
2311is in your PATH or set the PKG_CONFIG environment variable to the full
2312path to pkg-config.
2313
2314_PKG_TEXT
2315
2316To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
2317		[$4])
2318else
2319	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
2320	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
2321        AC_MSG_RESULT([yes])
2322	ifelse([$3], , :, [$3])
2323fi[]dnl
2324])# PKG_CHECK_MODULES
2325
2326# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2327#
2328#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
2329#                 2006, 2007, 2008 Free Software Foundation, Inc.
2330#   Written by Gordon Matzigkeit, 1996
2331#
2332# This file is free software; the Free Software Foundation gives
2333# unlimited permission to copy and/or distribute it, with or without
2334# modifications, as long as this notice is preserved.
2335
2336m4_define([_LT_COPYING], [dnl
2337#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
2338#                 2006, 2007, 2008 Free Software Foundation, Inc.
2339#   Written by Gordon Matzigkeit, 1996
2340#
2341#   This file is part of GNU Libtool.
2342#
2343# GNU Libtool is free software; you can redistribute it and/or
2344# modify it under the terms of the GNU General Public License as
2345# published by the Free Software Foundation; either version 2 of
2346# the License, or (at your option) any later version.
2347#
2348# As a special exception to the GNU General Public License,
2349# if you distribute this file as part of a program or library that
2350# is built using GNU Libtool, you may include this file under the
2351# same distribution terms that you use for the rest of that program.
2352#
2353# GNU Libtool is distributed in the hope that it will be useful,
2354# but WITHOUT ANY WARRANTY; without even the implied warranty of
2355# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2356# GNU General Public License for more details.
2357#
2358# You should have received a copy of the GNU General Public License
2359# along with GNU Libtool; see the file COPYING.  If not, a copy
2360# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
2361# obtained by writing to the Free Software Foundation, Inc.,
2362# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2363])
2364
2365# serial 56 LT_INIT
2366
2367
2368# LT_PREREQ(VERSION)
2369# ------------------
2370# Complain and exit if this libtool version is less that VERSION.
2371m4_defun([LT_PREREQ],
2372[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
2373       [m4_default([$3],
2374		   [m4_fatal([Libtool version $1 or higher is required],
2375		             63)])],
2376       [$2])])
2377
2378
2379# _LT_CHECK_BUILDDIR
2380# ------------------
2381# Complain if the absolute build directory name contains unusual characters
2382m4_defun([_LT_CHECK_BUILDDIR],
2383[case `pwd` in
2384  *\ * | *\	*)
2385    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
2386esac
2387])
2388
2389
2390# LT_INIT([OPTIONS])
2391# ------------------
2392AC_DEFUN([LT_INIT],
2393[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
2394AC_BEFORE([$0], [LT_LANG])dnl
2395AC_BEFORE([$0], [LT_OUTPUT])dnl
2396AC_BEFORE([$0], [LTDL_INIT])dnl
2397m4_require([_LT_CHECK_BUILDDIR])dnl
2398
2399dnl Autoconf doesn't catch unexpanded LT_ macros by default:
2400m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
2401m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
2402dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
2403dnl unless we require an AC_DEFUNed macro:
2404AC_REQUIRE([LTOPTIONS_VERSION])dnl
2405AC_REQUIRE([LTSUGAR_VERSION])dnl
2406AC_REQUIRE([LTVERSION_VERSION])dnl
2407AC_REQUIRE([LTOBSOLETE_VERSION])dnl
2408m4_require([_LT_PROG_LTMAIN])dnl
2409
2410dnl Parse OPTIONS
2411_LT_SET_OPTIONS([$0], [$1])
2412
2413# This can be used to rebuild libtool when needed
2414LIBTOOL_DEPS="$ltmain"
2415
2416# Always use our own libtool.
2417LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2418AC_SUBST(LIBTOOL)dnl
2419
2420_LT_SETUP
2421
2422# Only expand once:
2423m4_define([LT_INIT])
2424])# LT_INIT
2425
2426# Old names:
2427AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
2428AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
2429dnl aclocal-1.4 backwards compatibility:
2430dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
2431dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
2432
2433
2434# _LT_CC_BASENAME(CC)
2435# -------------------
2436# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
2437m4_defun([_LT_CC_BASENAME],
2438[for cc_temp in $1""; do
2439  case $cc_temp in
2440    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
2441    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
2442    \-*) ;;
2443    *) break;;
2444  esac
2445done
2446cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
2447])
2448
2449
2450# _LT_FILEUTILS_DEFAULTS
2451# ----------------------
2452# It is okay to use these file commands and assume they have been set
2453# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
2454m4_defun([_LT_FILEUTILS_DEFAULTS],
2455[: ${CP="cp -f"}
2456: ${MV="mv -f"}
2457: ${RM="rm -f"}
2458])# _LT_FILEUTILS_DEFAULTS
2459
2460
2461# _LT_SETUP
2462# ---------
2463m4_defun([_LT_SETUP],
2464[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2465AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2466_LT_DECL([], [host_alias], [0], [The host system])dnl
2467_LT_DECL([], [host], [0])dnl
2468_LT_DECL([], [host_os], [0])dnl
2469dnl
2470_LT_DECL([], [build_alias], [0], [The build system])dnl
2471_LT_DECL([], [build], [0])dnl
2472_LT_DECL([], [build_os], [0])dnl
2473dnl
2474AC_REQUIRE([AC_PROG_CC])dnl
2475AC_REQUIRE([LT_PATH_LD])dnl
2476AC_REQUIRE([LT_PATH_NM])dnl
2477dnl
2478AC_REQUIRE([AC_PROG_LN_S])dnl
2479test -z "$LN_S" && LN_S="ln -s"
2480_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
2481dnl
2482AC_REQUIRE([LT_CMD_MAX_LEN])dnl
2483_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
2484_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
2485dnl
2486m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2487m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2488m4_require([_LT_CMD_RELOAD])dnl
2489m4_require([_LT_CHECK_MAGIC_METHOD])dnl
2490m4_require([_LT_CMD_OLD_ARCHIVE])dnl
2491m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
2492
2493_LT_CONFIG_LIBTOOL_INIT([
2494# See if we are running on zsh, and set the options which allow our
2495# commands through without removal of \ escapes INIT.
2496if test -n "\${ZSH_VERSION+set}" ; then
2497   setopt NO_GLOB_SUBST
2498fi
2499])
2500if test -n "${ZSH_VERSION+set}" ; then
2501   setopt NO_GLOB_SUBST
2502fi
2503
2504_LT_CHECK_OBJDIR
2505
2506m4_require([_LT_TAG_COMPILER])dnl
2507_LT_PROG_ECHO_BACKSLASH
2508
2509case $host_os in
2510aix3*)
2511  # AIX sometimes has problems with the GCC collect2 program.  For some
2512  # reason, if we set the COLLECT_NAMES environment variable, the problems
2513  # vanish in a puff of smoke.
2514  if test "X${COLLECT_NAMES+set}" != Xset; then
2515    COLLECT_NAMES=
2516    export COLLECT_NAMES
2517  fi
2518  ;;
2519esac
2520
2521# Sed substitution that helps us do robust quoting.  It backslashifies
2522# metacharacters that are still active within double-quoted strings.
2523sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
2524
2525# Same as above, but do not quote variable references.
2526double_quote_subst='s/\([["`\\]]\)/\\\1/g'
2527
2528# Sed substitution to delay expansion of an escaped shell variable in a
2529# double_quote_subst'ed string.
2530delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2531
2532# Sed substitution to delay expansion of an escaped single quote.
2533delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
2534
2535# Sed substitution to avoid accidental globbing in evaled expressions
2536no_glob_subst='s/\*/\\\*/g'
2537
2538# Global variables:
2539ofile=libtool
2540can_build_shared=yes
2541
2542# All known linkers require a `.a' archive for static linking (except MSVC,
2543# which needs '.lib').
2544libext=a
2545
2546with_gnu_ld="$lt_cv_prog_gnu_ld"
2547
2548old_CC="$CC"
2549old_CFLAGS="$CFLAGS"
2550
2551# Set sane defaults for various variables
2552test -z "$CC" && CC=cc
2553test -z "$LTCC" && LTCC=$CC
2554test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
2555test -z "$LD" && LD=ld
2556test -z "$ac_objext" && ac_objext=o
2557
2558_LT_CC_BASENAME([$compiler])
2559
2560# Only perform the check for file, if the check method requires it
2561test -z "$MAGIC_CMD" && MAGIC_CMD=file
2562case $deplibs_check_method in
2563file_magic*)
2564  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2565    _LT_PATH_MAGIC
2566  fi
2567  ;;
2568esac
2569
2570# Use C for the default configuration in the libtool script
2571LT_SUPPORTED_TAG([CC])
2572_LT_LANG_C_CONFIG
2573_LT_LANG_DEFAULT_CONFIG
2574_LT_CONFIG_COMMANDS
2575])# _LT_SETUP
2576
2577
2578# _LT_PROG_LTMAIN
2579# ---------------
2580# Note that this code is called both from `configure', and `config.status'
2581# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
2582# `config.status' has no value for ac_aux_dir unless we are using Automake,
2583# so we pass a copy along to make sure it has a sensible value anyway.
2584m4_defun([_LT_PROG_LTMAIN],
2585[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
2586_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
2587ltmain="$ac_aux_dir/ltmain.sh"
2588])# _LT_PROG_LTMAIN
2589
2590
2591
2592# So that we can recreate a full libtool script including additional
2593# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
2594# in macros and then make a single call at the end using the `libtool'
2595# label.
2596
2597
2598# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
2599# ----------------------------------------
2600# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2601m4_define([_LT_CONFIG_LIBTOOL_INIT],
2602[m4_ifval([$1],
2603          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
2604                     [$1
2605])])])
2606
2607# Initialize.
2608m4_define([_LT_OUTPUT_LIBTOOL_INIT])
2609
2610
2611# _LT_CONFIG_LIBTOOL([COMMANDS])
2612# ------------------------------
2613# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2614m4_define([_LT_CONFIG_LIBTOOL],
2615[m4_ifval([$1],
2616          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
2617                     [$1
2618])])])
2619
2620# Initialize.
2621m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
2622
2623
2624# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
2625# -----------------------------------------------------
2626m4_defun([_LT_CONFIG_SAVE_COMMANDS],
2627[_LT_CONFIG_LIBTOOL([$1])
2628_LT_CONFIG_LIBTOOL_INIT([$2])
2629])
2630
2631
2632# _LT_FORMAT_COMMENT([COMMENT])
2633# -----------------------------
2634# Add leading comment marks to the start of each line, and a trailing
2635# full-stop to the whole comment if one is not present already.
2636m4_define([_LT_FORMAT_COMMENT],
2637[m4_ifval([$1], [
2638m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
2639              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
2640)])
2641
2642
2643
2644
2645
2646# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
2647# -------------------------------------------------------------------
2648# CONFIGNAME is the name given to the value in the libtool script.
2649# VARNAME is the (base) name used in the configure script.
2650# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
2651# VARNAME.  Any other value will be used directly.
2652m4_define([_LT_DECL],
2653[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
2654    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
2655	[m4_ifval([$1], [$1], [$2])])
2656    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
2657    m4_ifval([$4],
2658	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
2659    lt_dict_add_subkey([lt_decl_dict], [$2],
2660	[tagged?], [m4_ifval([$5], [yes], [no])])])
2661])
2662
2663
2664# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
2665# --------------------------------------------------------
2666m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
2667
2668
2669# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
2670# ------------------------------------------------
2671m4_define([lt_decl_tag_varnames],
2672[_lt_decl_filter([tagged?], [yes], $@)])
2673
2674
2675# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
2676# ---------------------------------------------------------
2677m4_define([_lt_decl_filter],
2678[m4_case([$#],
2679  [0], [m4_fatal([$0: too few arguments: $#])],
2680  [1], [m4_fatal([$0: too few arguments: $#: $1])],
2681  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
2682  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
2683  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
2684])
2685
2686
2687# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
2688# --------------------------------------------------
2689m4_define([lt_decl_quote_varnames],
2690[_lt_decl_filter([value], [1], $@)])
2691
2692
2693# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
2694# ---------------------------------------------------
2695m4_define([lt_decl_dquote_varnames],
2696[_lt_decl_filter([value], [2], $@)])
2697
2698
2699# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
2700# ---------------------------------------------------
2701m4_define([lt_decl_varnames_tagged],
2702[m4_assert([$# <= 2])dnl
2703_$0(m4_quote(m4_default([$1], [[, ]])),
2704    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
2705    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
2706m4_define([_lt_decl_varnames_tagged],
2707[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
2708
2709
2710# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
2711# ------------------------------------------------
2712m4_define([lt_decl_all_varnames],
2713[_$0(m4_quote(m4_default([$1], [[, ]])),
2714     m4_if([$2], [],
2715	   m4_quote(lt_decl_varnames),
2716	m4_quote(m4_shift($@))))[]dnl
2717])
2718m4_define([_lt_decl_all_varnames],
2719[lt_join($@, lt_decl_varnames_tagged([$1],
2720			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
2721])
2722
2723
2724# _LT_CONFIG_STATUS_DECLARE([VARNAME])
2725# ------------------------------------
2726# Quote a variable value, and forward it to `config.status' so that its
2727# declaration there will have the same value as in `configure'.  VARNAME
2728# must have a single quote delimited value for this to work.
2729m4_define([_LT_CONFIG_STATUS_DECLARE],
2730[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
2731
2732
2733# _LT_CONFIG_STATUS_DECLARATIONS
2734# ------------------------------
2735# We delimit libtool config variables with single quotes, so when
2736# we write them to config.status, we have to be sure to quote all
2737# embedded single quotes properly.  In configure, this macro expands
2738# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
2739#
2740#    <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
2741m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
2742[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
2743    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
2744
2745
2746# _LT_LIBTOOL_TAGS
2747# ----------------
2748# Output comment and list of tags supported by the script
2749m4_defun([_LT_LIBTOOL_TAGS],
2750[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
2751available_tags="_LT_TAGS"dnl
2752])
2753
2754
2755# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
2756# -----------------------------------
2757# Extract the dictionary values for VARNAME (optionally with TAG) and
2758# expand to a commented shell variable setting:
2759#
2760#    # Some comment about what VAR is for.
2761#    visible_name=$lt_internal_name
2762m4_define([_LT_LIBTOOL_DECLARE],
2763[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
2764					   [description])))[]dnl
2765m4_pushdef([_libtool_name],
2766    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
2767m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
2768    [0], [_libtool_name=[$]$1],
2769    [1], [_libtool_name=$lt_[]$1],
2770    [2], [_libtool_name=$lt_[]$1],
2771    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
2772m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
2773])
2774
2775
2776# _LT_LIBTOOL_CONFIG_VARS
2777# -----------------------
2778# Produce commented declarations of non-tagged libtool config variables
2779# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
2780# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
2781# section) are produced by _LT_LIBTOOL_TAG_VARS.
2782m4_defun([_LT_LIBTOOL_CONFIG_VARS],
2783[m4_foreach([_lt_var],
2784    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
2785    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
2786
2787
2788# _LT_LIBTOOL_TAG_VARS(TAG)
2789# -------------------------
2790m4_define([_LT_LIBTOOL_TAG_VARS],
2791[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
2792    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
2793
2794
2795# _LT_TAGVAR(VARNAME, [TAGNAME])
2796# ------------------------------
2797m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
2798
2799
2800# _LT_CONFIG_COMMANDS
2801# -------------------
2802# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
2803# variables for single and double quote escaping we saved from calls
2804# to _LT_DECL, we can put quote escaped variables declarations
2805# into `config.status', and then the shell code to quote escape them in
2806# for loops in `config.status'.  Finally, any additional code accumulated
2807# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
2808m4_defun([_LT_CONFIG_COMMANDS],
2809[AC_PROVIDE_IFELSE([LT_OUTPUT],
2810	dnl If the libtool generation code has been placed in $CONFIG_LT,
2811	dnl instead of duplicating it all over again into config.status,
2812	dnl then we will have config.status run $CONFIG_LT later, so it
2813	dnl needs to know what name is stored there:
2814        [AC_CONFIG_COMMANDS([libtool],
2815            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
2816    dnl If the libtool generation code is destined for config.status,
2817    dnl expand the accumulated commands and init code now:
2818    [AC_CONFIG_COMMANDS([libtool],
2819        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
2820])#_LT_CONFIG_COMMANDS
2821
2822
2823# Initialize.
2824m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
2825[
2826
2827# The HP-UX ksh and POSIX shell print the target directory to stdout
2828# if CDPATH is set.
2829(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2830
2831sed_quote_subst='$sed_quote_subst'
2832double_quote_subst='$double_quote_subst'
2833delay_variable_subst='$delay_variable_subst'
2834_LT_CONFIG_STATUS_DECLARATIONS
2835LTCC='$LTCC'
2836LTCFLAGS='$LTCFLAGS'
2837compiler='$compiler_DEFAULT'
2838
2839# Quote evaled strings.
2840for var in lt_decl_all_varnames([[ \
2841]], lt_decl_quote_varnames); do
2842    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
2843    *[[\\\\\\\`\\"\\\$]]*)
2844      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
2845      ;;
2846    *)
2847      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2848      ;;
2849    esac
2850done
2851
2852# Double-quote double-evaled strings.
2853for var in lt_decl_all_varnames([[ \
2854]], lt_decl_dquote_varnames); do
2855    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
2856    *[[\\\\\\\`\\"\\\$]]*)
2857      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
2858      ;;
2859    *)
2860      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
2861      ;;
2862    esac
2863done
2864
2865# Fix-up fallback echo if it was mangled by the above quoting rules.
2866case \$lt_ECHO in
2867*'\\\[$]0 --fallback-echo"')dnl "
2868  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
2869  ;;
2870esac
2871
2872_LT_OUTPUT_LIBTOOL_INIT
2873])
2874
2875
2876# LT_OUTPUT
2877# ---------
2878# This macro allows early generation of the libtool script (before
2879# AC_OUTPUT is called), incase it is used in configure for compilation
2880# tests.
2881AC_DEFUN([LT_OUTPUT],
2882[: ${CONFIG_LT=./config.lt}
2883AC_MSG_NOTICE([creating $CONFIG_LT])
2884cat >"$CONFIG_LT" <<_LTEOF
2885#! $SHELL
2886# Generated by $as_me.
2887# Run this file to recreate a libtool stub with the current configuration.
2888
2889lt_cl_silent=false
2890SHELL=\${CONFIG_SHELL-$SHELL}
2891_LTEOF
2892
2893cat >>"$CONFIG_LT" <<\_LTEOF
2894AS_SHELL_SANITIZE
2895_AS_PREPARE
2896
2897exec AS_MESSAGE_FD>&1
2898exec AS_MESSAGE_LOG_FD>>config.log
2899{
2900  echo
2901  AS_BOX([Running $as_me.])
2902} >&AS_MESSAGE_LOG_FD
2903
2904lt_cl_help="\
2905\`$as_me' creates a local libtool stub from the current configuration,
2906for use in further configure time tests before the real libtool is
2907generated.
2908
2909Usage: $[0] [[OPTIONS]]
2910
2911  -h, --help      print this help, then exit
2912  -V, --version   print version number, then exit
2913  -q, --quiet     do not print progress messages
2914  -d, --debug     don't remove temporary files
2915
2916Report bugs to <bug-libtool@gnu.org>."
2917
2918lt_cl_version="\
2919m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
2920m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
2921configured by $[0], generated by m4_PACKAGE_STRING.
2922
2923Copyright (C) 2008 Free Software Foundation, Inc.
2924This config.lt script is free software; the Free Software Foundation
2925gives unlimited permision to copy, distribute and modify it."
2926
2927while test $[#] != 0
2928do
2929  case $[1] in
2930    --version | --v* | -V )
2931      echo "$lt_cl_version"; exit 0 ;;
2932    --help | --h* | -h )
2933      echo "$lt_cl_help"; exit 0 ;;
2934    --debug | --d* | -d )
2935      debug=: ;;
2936    --quiet | --q* | --silent | --s* | -q )
2937      lt_cl_silent=: ;;
2938
2939    -*) AC_MSG_ERROR([unrecognized option: $[1]
2940Try \`$[0] --help' for more information.]) ;;
2941
2942    *) AC_MSG_ERROR([unrecognized argument: $[1]
2943Try \`$[0] --help' for more information.]) ;;
2944  esac
2945  shift
2946done
2947
2948if $lt_cl_silent; then
2949  exec AS_MESSAGE_FD>/dev/null
2950fi
2951_LTEOF
2952
2953cat >>"$CONFIG_LT" <<_LTEOF
2954_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
2955_LTEOF
2956
2957cat >>"$CONFIG_LT" <<\_LTEOF
2958AC_MSG_NOTICE([creating $ofile])
2959_LT_OUTPUT_LIBTOOL_COMMANDS
2960AS_EXIT(0)
2961_LTEOF
2962chmod +x "$CONFIG_LT"
2963
2964# configure is writing to config.log, but config.lt does its own redirection,
2965# appending to config.log, which fails on DOS, as config.log is still kept
2966# open by configure.  Here we exec the FD to /dev/null, effectively closing
2967# config.log, so it can be properly (re)opened and appended to by config.lt.
2968if test "$no_create" != yes; then
2969  lt_cl_success=:
2970  test "$silent" = yes &&
2971    lt_config_lt_args="$lt_config_lt_args --quiet"
2972  exec AS_MESSAGE_LOG_FD>/dev/null
2973  $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
2974  exec AS_MESSAGE_LOG_FD>>config.log
2975  $lt_cl_success || AS_EXIT(1)
2976fi
2977])# LT_OUTPUT
2978
2979
2980# _LT_CONFIG(TAG)
2981# ---------------
2982# If TAG is the built-in tag, create an initial libtool script with a
2983# default configuration from the untagged config vars.  Otherwise add code
2984# to config.status for appending the configuration named by TAG from the
2985# matching tagged config vars.
2986m4_defun([_LT_CONFIG],
2987[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2988_LT_CONFIG_SAVE_COMMANDS([
2989  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
2990  m4_if(_LT_TAG, [C], [
2991    # See if we are running on zsh, and set the options which allow our
2992    # commands through without removal of \ escapes.
2993    if test -n "${ZSH_VERSION+set}" ; then
2994      setopt NO_GLOB_SUBST
2995    fi
2996
2997    cfgfile="${ofile}T"
2998    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
2999    $RM "$cfgfile"
3000
3001    cat <<_LT_EOF >> "$cfgfile"
3002#! $SHELL
3003
3004# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3005# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
3006# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3007# NOTE: Changes made to this file will be lost: look at ltmain.sh.
3008#
3009_LT_COPYING
3010_LT_LIBTOOL_TAGS
3011
3012# ### BEGIN LIBTOOL CONFIG
3013_LT_LIBTOOL_CONFIG_VARS
3014_LT_LIBTOOL_TAG_VARS
3015# ### END LIBTOOL CONFIG
3016
3017_LT_EOF
3018
3019  case $host_os in
3020  aix3*)
3021    cat <<\_LT_EOF >> "$cfgfile"
3022# AIX sometimes has problems with the GCC collect2 program.  For some
3023# reason, if we set the COLLECT_NAMES environment variable, the problems
3024# vanish in a puff of smoke.
3025if test "X${COLLECT_NAMES+set}" != Xset; then
3026  COLLECT_NAMES=
3027  export COLLECT_NAMES
3028fi
3029_LT_EOF
3030    ;;
3031  esac
3032
3033  _LT_PROG_LTMAIN
3034
3035  # We use sed instead of cat because bash on DJGPP gets confused if
3036  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
3037  # text mode, it properly converts lines to CR/LF.  This bash problem
3038  # is reportedly fixed, but why not run on old versions too?
3039  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
3040    || (rm -f "$cfgfile"; exit 1)
3041
3042  _LT_PROG_XSI_SHELLFNS
3043
3044  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
3045    || (rm -f "$cfgfile"; exit 1)
3046
3047  mv -f "$cfgfile" "$ofile" ||
3048    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
3049  chmod +x "$ofile"
3050],
3051[cat <<_LT_EOF >> "$ofile"
3052
3053dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
3054dnl in a comment (ie after a #).
3055# ### BEGIN LIBTOOL TAG CONFIG: $1
3056_LT_LIBTOOL_TAG_VARS(_LT_TAG)
3057# ### END LIBTOOL TAG CONFIG: $1
3058_LT_EOF
3059])dnl /m4_if
3060],
3061[m4_if([$1], [], [
3062    PACKAGE='$PACKAGE'
3063    VERSION='$VERSION'
3064    TIMESTAMP='$TIMESTAMP'
3065    RM='$RM'
3066    ofile='$ofile'], [])
3067])dnl /_LT_CONFIG_SAVE_COMMANDS
3068])# _LT_CONFIG
3069
3070
3071# LT_SUPPORTED_TAG(TAG)
3072# ---------------------
3073# Trace this macro to discover what tags are supported by the libtool
3074# --tag option, using:
3075#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
3076AC_DEFUN([LT_SUPPORTED_TAG], [])
3077
3078
3079# C support is built-in for now
3080m4_define([_LT_LANG_C_enabled], [])
3081m4_define([_LT_TAGS], [])
3082
3083
3084# LT_LANG(LANG)
3085# -------------
3086# Enable libtool support for the given language if not already enabled.
3087AC_DEFUN([LT_LANG],
3088[AC_BEFORE([$0], [LT_OUTPUT])dnl
3089m4_case([$1],
3090  [C],			[_LT_LANG(C)],
3091  [C++],		[_LT_LANG(CXX)],
3092  [Java],		[_LT_LANG(GCJ)],
3093  [Fortran 77],		[_LT_LANG(F77)],
3094  [Fortran],		[_LT_LANG(FC)],
3095  [Windows Resource],	[_LT_LANG(RC)],
3096  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
3097    [_LT_LANG($1)],
3098    [m4_fatal([$0: unsupported language: "$1"])])])dnl
3099])# LT_LANG
3100
3101
3102# _LT_LANG(LANGNAME)
3103# ------------------
3104m4_defun([_LT_LANG],
3105[m4_ifdef([_LT_LANG_]$1[_enabled], [],
3106  [LT_SUPPORTED_TAG([$1])dnl
3107  m4_append([_LT_TAGS], [$1 ])dnl
3108  m4_define([_LT_LANG_]$1[_enabled], [])dnl
3109  _LT_LANG_$1_CONFIG($1)])dnl
3110])# _LT_LANG
3111
3112
3113# _LT_LANG_DEFAULT_CONFIG
3114# -----------------------
3115m4_defun([_LT_LANG_DEFAULT_CONFIG],
3116[AC_PROVIDE_IFELSE([AC_PROG_CXX],
3117  [LT_LANG(CXX)],
3118  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
3119
3120AC_PROVIDE_IFELSE([AC_PROG_F77],
3121  [LT_LANG(F77)],
3122  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
3123
3124AC_PROVIDE_IFELSE([AC_PROG_FC],
3125  [LT_LANG(FC)],
3126  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
3127
3128dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
3129dnl pulling things in needlessly.
3130AC_PROVIDE_IFELSE([AC_PROG_GCJ],
3131  [LT_LANG(GCJ)],
3132  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
3133    [LT_LANG(GCJ)],
3134    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
3135      [LT_LANG(GCJ)],
3136      [m4_ifdef([AC_PROG_GCJ],
3137	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
3138       m4_ifdef([A][M_PROG_GCJ],
3139	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
3140       m4_ifdef([LT_PROG_GCJ],
3141	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
3142
3143AC_PROVIDE_IFELSE([LT_PROG_RC],
3144  [LT_LANG(RC)],
3145  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
3146])# _LT_LANG_DEFAULT_CONFIG
3147
3148# Obsolete macros:
3149AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
3150AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
3151AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
3152AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
3153dnl aclocal-1.4 backwards compatibility:
3154dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
3155dnl AC_DEFUN([AC_LIBTOOL_F77], [])
3156dnl AC_DEFUN([AC_LIBTOOL_FC], [])
3157dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
3158
3159
3160# _LT_TAG_COMPILER
3161# ----------------
3162m4_defun([_LT_TAG_COMPILER],
3163[AC_REQUIRE([AC_PROG_CC])dnl
3164
3165_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
3166_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
3167_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
3168_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
3169
3170# If no C compiler was specified, use CC.
3171LTCC=${LTCC-"$CC"}
3172
3173# If no C compiler flags were specified, use CFLAGS.
3174LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
3175
3176# Allow CC to be a program name with arguments.
3177compiler=$CC
3178])# _LT_TAG_COMPILER
3179
3180
3181# _LT_COMPILER_BOILERPLATE
3182# ------------------------
3183# Check for compiler boilerplate output or warnings with
3184# the simple compiler test code.
3185m4_defun([_LT_COMPILER_BOILERPLATE],
3186[m4_require([_LT_DECL_SED])dnl
3187ac_outfile=conftest.$ac_objext
3188echo "$lt_simple_compile_test_code" >conftest.$ac_ext
3189eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
3190_lt_compiler_boilerplate=`cat conftest.err`
3191$RM conftest*
3192])# _LT_COMPILER_BOILERPLATE
3193
3194
3195# _LT_LINKER_BOILERPLATE
3196# ----------------------
3197# Check for linker boilerplate output or warnings with
3198# the simple link test code.
3199m4_defun([_LT_LINKER_BOILERPLATE],
3200[m4_require([_LT_DECL_SED])dnl
3201ac_outfile=conftest.$ac_objext
3202echo "$lt_simple_link_test_code" >conftest.$ac_ext
3203eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
3204_lt_linker_boilerplate=`cat conftest.err`
3205$RM -r conftest*
3206])# _LT_LINKER_BOILERPLATE
3207
3208# _LT_REQUIRED_DARWIN_CHECKS
3209# -------------------------
3210m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
3211  case $host_os in
3212    rhapsody* | darwin*)
3213    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
3214    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
3215    AC_CHECK_TOOL([LIPO], [lipo], [:])
3216    AC_CHECK_TOOL([OTOOL], [otool], [:])
3217    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
3218    _LT_DECL([], [DSYMUTIL], [1],
3219      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
3220    _LT_DECL([], [NMEDIT], [1],
3221      [Tool to change global to local symbols on Mac OS X])
3222    _LT_DECL([], [LIPO], [1],
3223      [Tool to manipulate fat objects and archives on Mac OS X])
3224    _LT_DECL([], [OTOOL], [1],
3225      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
3226    _LT_DECL([], [OTOOL64], [1],
3227      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
3228
3229    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
3230      [lt_cv_apple_cc_single_mod=no
3231      if test -z "${LT_MULTI_MODULE}"; then
3232	# By default we will add the -single_module flag. You can override
3233	# by either setting the environment variable LT_MULTI_MODULE
3234	# non-empty at configure time, or by adding -multi_module to the
3235	# link flags.
3236	rm -rf libconftest.dylib*
3237	echo "int foo(void){return 1;}" > conftest.c
3238	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
3239-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
3240	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
3241	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
3242        _lt_result=$?
3243	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
3244	  lt_cv_apple_cc_single_mod=yes
3245	else
3246	  cat conftest.err >&AS_MESSAGE_LOG_FD
3247	fi
3248	rm -rf libconftest.dylib*
3249	rm -f conftest.*
3250      fi])
3251    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
3252      [lt_cv_ld_exported_symbols_list],
3253      [lt_cv_ld_exported_symbols_list=no
3254      save_LDFLAGS=$LDFLAGS
3255      echo "_main" > conftest.sym
3256      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
3257      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3258	[lt_cv_ld_exported_symbols_list=yes],
3259	[lt_cv_ld_exported_symbols_list=no])
3260	LDFLAGS="$save_LDFLAGS"
3261    ])
3262    case $host_os in
3263    rhapsody* | darwin1.[[012]])
3264      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
3265    darwin1.*)
3266      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3267    darwin*) # darwin 5.x on
3268      # if running on 10.5 or later, the deployment target defaults
3269      # to the OS version, if on x86, and 10.4, the deployment
3270      # target defaults to 10.4. Don't you love it?
3271      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
3272	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
3273	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3274	10.[[012]]*)
3275	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3276	10.*)
3277	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3278      esac
3279    ;;
3280  esac
3281    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
3282      _lt_dar_single_mod='$single_module'
3283    fi
3284    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
3285      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
3286    else
3287      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
3288    fi
3289    if test "$DSYMUTIL" != ":"; then
3290      _lt_dsymutil='~$DSYMUTIL $lib || :'
3291    else
3292      _lt_dsymutil=
3293    fi
3294    ;;
3295  esac
3296])
3297
3298
3299# _LT_DARWIN_LINKER_FEATURES
3300# --------------------------
3301# Checks for linker and compiler features on darwin
3302m4_defun([_LT_DARWIN_LINKER_FEATURES],
3303[
3304  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
3305  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
3306  _LT_TAGVAR(hardcode_direct, $1)=no
3307  _LT_TAGVAR(hardcode_automatic, $1)=yes
3308  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3309  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
3310  _LT_TAGVAR(link_all_deplibs, $1)=yes
3311  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
3312  case $cc_basename in
3313     ifort*) _lt_dar_can_shared=yes ;;
3314     *) _lt_dar_can_shared=$GCC ;;
3315  esac
3316  if test "$_lt_dar_can_shared" = "yes"; then
3317    output_verbose_link_cmd=echo
3318    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
3319    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
3320    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
3321    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
3322    m4_if([$1], [CXX],
3323[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
3324      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
3325      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
3326    fi
3327],[])
3328  else
3329  _LT_TAGVAR(ld_shlibs, $1)=no
3330  fi
3331])
3332
3333# _LT_SYS_MODULE_PATH_AIX
3334# -----------------------
3335# Links a minimal program and checks the executable
3336# for the system default hardcoded library path. In most cases,
3337# this is /usr/lib:/lib, but when the MPI compilers are used
3338# the location of the communication and MPI libs are included too.
3339# If we don't find anything, use the default library path according
3340# to the aix ld manual.
3341m4_defun([_LT_SYS_MODULE_PATH_AIX],
3342[m4_require([_LT_DECL_SED])dnl
3343AC_LINK_IFELSE(AC_LANG_PROGRAM,[
3344lt_aix_libpath_sed='
3345    /Import File Strings/,/^$/ {
3346	/^0/ {
3347	    s/^0  *\(.*\)$/\1/
3348	    p
3349	}
3350    }'
3351aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3352# Check for a 64-bit object if we didn't find anything.
3353if test -z "$aix_libpath"; then
3354  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3355fi],[])
3356if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
3357])# _LT_SYS_MODULE_PATH_AIX
3358
3359
3360# _LT_SHELL_INIT(ARG)
3361# -------------------
3362m4_define([_LT_SHELL_INIT],
3363[ifdef([AC_DIVERSION_NOTICE],
3364	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
3365	 [AC_DIVERT_PUSH(NOTICE)])
3366$1
3367AC_DIVERT_POP
3368])# _LT_SHELL_INIT
3369
3370
3371# _LT_PROG_ECHO_BACKSLASH
3372# -----------------------
3373# Add some code to the start of the generated configure script which
3374# will find an echo command which doesn't interpret backslashes.
3375m4_defun([_LT_PROG_ECHO_BACKSLASH],
3376[_LT_SHELL_INIT([
3377# Check that we are running under the correct shell.
3378SHELL=${CONFIG_SHELL-/bin/sh}
3379
3380case X$lt_ECHO in
3381X*--fallback-echo)
3382  # Remove one level of quotation (which was required for Make).
3383  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
3384  ;;
3385esac
3386
3387ECHO=${lt_ECHO-echo}
3388if test "X[$]1" = X--no-reexec; then
3389  # Discard the --no-reexec flag, and continue.
3390  shift
3391elif test "X[$]1" = X--fallback-echo; then
3392  # Avoid inline document here, it may be left over
3393  :
3394elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
3395  # Yippee, $ECHO works!
3396  :
3397else
3398  # Restart under the correct shell.
3399  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
3400fi
3401
3402if test "X[$]1" = X--fallback-echo; then
3403  # used as fallback echo
3404  shift
3405  cat <<_LT_EOF
3406[$]*
3407_LT_EOF
3408  exit 0
3409fi
3410
3411# The HP-UX ksh and POSIX shell print the target directory to stdout
3412# if CDPATH is set.
3413(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
3414
3415if test -z "$lt_ECHO"; then
3416  if test "X${echo_test_string+set}" != Xset; then
3417    # find a string as large as possible, as long as the shell can cope with it
3418    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
3419      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
3420      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
3421	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
3422      then
3423        break
3424      fi
3425    done
3426  fi
3427
3428  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
3429     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
3430     test "X$echo_testing_string" = "X$echo_test_string"; then
3431    :
3432  else
3433    # The Solaris, AIX, and Digital Unix default echo programs unquote
3434    # backslashes.  This makes it impossible to quote backslashes using
3435    #   echo "$something" | sed 's/\\/\\\\/g'
3436    #
3437    # So, first we look for a working echo in the user's PATH.
3438
3439    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3440    for dir in $PATH /usr/ucb; do
3441      IFS="$lt_save_ifs"
3442      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
3443         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
3444         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
3445         test "X$echo_testing_string" = "X$echo_test_string"; then
3446        ECHO="$dir/echo"
3447        break
3448      fi
3449    done
3450    IFS="$lt_save_ifs"
3451
3452    if test "X$ECHO" = Xecho; then
3453      # We didn't find a better echo, so look for alternatives.
3454      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
3455         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
3456         test "X$echo_testing_string" = "X$echo_test_string"; then
3457        # This shell has a builtin print -r that does the trick.
3458        ECHO='print -r'
3459      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
3460	   test "X$CONFIG_SHELL" != X/bin/ksh; then
3461        # If we have ksh, try running configure again with it.
3462        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
3463        export ORIGINAL_CONFIG_SHELL
3464        CONFIG_SHELL=/bin/ksh
3465        export CONFIG_SHELL
3466        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
3467      else
3468        # Try using printf.
3469        ECHO='printf %s\n'
3470        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
3471	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
3472	   test "X$echo_testing_string" = "X$echo_test_string"; then
3473	  # Cool, printf works
3474	  :
3475        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
3476	     test "X$echo_testing_string" = 'X\t' &&
3477	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
3478	     test "X$echo_testing_string" = "X$echo_test_string"; then
3479	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
3480	  export CONFIG_SHELL
3481	  SHELL="$CONFIG_SHELL"
3482	  export SHELL
3483	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
3484        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
3485	     test "X$echo_testing_string" = 'X\t' &&
3486	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
3487	     test "X$echo_testing_string" = "X$echo_test_string"; then
3488	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
3489        else
3490	  # maybe with a smaller string...
3491	  prev=:
3492
3493	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
3494	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
3495	    then
3496	      break
3497	    fi
3498	    prev="$cmd"
3499	  done
3500
3501	  if test "$prev" != 'sed 50q "[$]0"'; then
3502	    echo_test_string=`eval $prev`
3503	    export echo_test_string
3504	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
3505	  else
3506	    # Oops.  We lost completely, so just stick with echo.
3507	    ECHO=echo
3508	  fi
3509        fi
3510      fi
3511    fi
3512  fi
3513fi
3514
3515# Copy echo and quote the copy suitably for passing to libtool from
3516# the Makefile, instead of quoting the original, which is used later.
3517lt_ECHO=$ECHO
3518if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
3519   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
3520fi
3521
3522AC_SUBST(lt_ECHO)
3523])
3524_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
3525_LT_DECL([], [ECHO], [1],
3526    [An echo program that does not interpret backslashes])
3527])# _LT_PROG_ECHO_BACKSLASH
3528
3529
3530# _LT_ENABLE_LOCK
3531# ---------------
3532m4_defun([_LT_ENABLE_LOCK],
3533[AC_ARG_ENABLE([libtool-lock],
3534  [AS_HELP_STRING([--disable-libtool-lock],
3535    [avoid locking (might break parallel builds)])])
3536test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
3537
3538# Some flags need to be propagated to the compiler or linker for good
3539# libtool support.
3540case $host in
3541ia64-*-hpux*)
3542  # Find out which ABI we are using.
3543  echo 'int i;' > conftest.$ac_ext
3544  if AC_TRY_EVAL(ac_compile); then
3545    case `/usr/bin/file conftest.$ac_objext` in
3546      *ELF-32*)
3547	HPUX_IA64_MODE="32"
3548	;;
3549      *ELF-64*)
3550	HPUX_IA64_MODE="64"
3551	;;
3552    esac
3553  fi
3554  rm -rf conftest*
3555  ;;
3556*-*-irix6*)
3557  # Find out which ABI we are using.
3558  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
3559  if AC_TRY_EVAL(ac_compile); then
3560    if test "$lt_cv_prog_gnu_ld" = yes; then
3561      case `/usr/bin/file conftest.$ac_objext` in
3562	*32-bit*)
3563	  LD="${LD-ld} -melf32bsmip"
3564	  ;;
3565	*N32*)
3566	  LD="${LD-ld} -melf32bmipn32"
3567	  ;;
3568	*64-bit*)
3569	  LD="${LD-ld} -melf64bmip"
3570	;;
3571      esac
3572    else
3573      case `/usr/bin/file conftest.$ac_objext` in
3574	*32-bit*)
3575	  LD="${LD-ld} -32"
3576	  ;;
3577	*N32*)
3578	  LD="${LD-ld} -n32"
3579	  ;;
3580	*64-bit*)
3581	  LD="${LD-ld} -64"
3582	  ;;
3583      esac
3584    fi
3585  fi
3586  rm -rf conftest*
3587  ;;
3588
3589x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
3590s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
3591  # Find out which ABI we are using.
3592  echo 'int i;' > conftest.$ac_ext
3593  if AC_TRY_EVAL(ac_compile); then
3594    case `/usr/bin/file conftest.o` in
3595      *32-bit*)
3596	case $host in
3597	  x86_64-*kfreebsd*-gnu)
3598	    LD="${LD-ld} -m elf_i386_fbsd"
3599	    ;;
3600	  x86_64-*linux*)
3601	    LD="${LD-ld} -m elf_i386"
3602	    ;;
3603	  ppc64-*linux*|powerpc64-*linux*)
3604	    LD="${LD-ld} -m elf32ppclinux"
3605	    ;;
3606	  s390x-*linux*)
3607	    LD="${LD-ld} -m elf_s390"
3608	    ;;
3609	  sparc64-*linux*)
3610	    LD="${LD-ld} -m elf32_sparc"
3611	    ;;
3612	esac
3613	;;
3614      *64-bit*)
3615	case $host in
3616	  x86_64-*kfreebsd*-gnu)
3617	    LD="${LD-ld} -m elf_x86_64_fbsd"
3618	    ;;
3619	  x86_64-*linux*)
3620	    LD="${LD-ld} -m elf_x86_64"
3621	    ;;
3622	  ppc*-*linux*|powerpc*-*linux*)
3623	    LD="${LD-ld} -m elf64ppc"
3624	    ;;
3625	  s390*-*linux*|s390*-*tpf*)
3626	    LD="${LD-ld} -m elf64_s390"
3627	    ;;
3628	  sparc*-*linux*)
3629	    LD="${LD-ld} -m elf64_sparc"
3630	    ;;
3631	esac
3632	;;
3633    esac
3634  fi
3635  rm -rf conftest*
3636  ;;
3637
3638*-*-sco3.2v5*)
3639  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3640  SAVE_CFLAGS="$CFLAGS"
3641  CFLAGS="$CFLAGS -belf"
3642  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
3643    [AC_LANG_PUSH(C)
3644     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
3645     AC_LANG_POP])
3646  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3647    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3648    CFLAGS="$SAVE_CFLAGS"
3649  fi
3650  ;;
3651sparc*-*solaris*)
3652  # Find out which ABI we are using.
3653  echo 'int i;' > conftest.$ac_ext
3654  if AC_TRY_EVAL(ac_compile); then
3655    case `/usr/bin/file conftest.o` in
3656    *64-bit*)
3657      case $lt_cv_prog_gnu_ld in
3658      yes*) LD="${LD-ld} -m elf64_sparc" ;;
3659      *)
3660	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
3661	  LD="${LD-ld} -64"
3662	fi
3663	;;
3664      esac
3665      ;;
3666    esac
3667  fi
3668  rm -rf conftest*
3669  ;;
3670esac
3671
3672need_locks="$enable_libtool_lock"
3673])# _LT_ENABLE_LOCK
3674
3675
3676# _LT_CMD_OLD_ARCHIVE
3677# -------------------
3678m4_defun([_LT_CMD_OLD_ARCHIVE],
3679[AC_CHECK_TOOL(AR, ar, false)
3680test -z "$AR" && AR=ar
3681test -z "$AR_FLAGS" && AR_FLAGS=cru
3682_LT_DECL([], [AR], [1], [The archiver])
3683_LT_DECL([], [AR_FLAGS], [1])
3684
3685AC_CHECK_TOOL(STRIP, strip, :)
3686test -z "$STRIP" && STRIP=:
3687_LT_DECL([], [STRIP], [1], [A symbol stripping program])
3688
3689AC_CHECK_TOOL(RANLIB, ranlib, :)
3690test -z "$RANLIB" && RANLIB=:
3691_LT_DECL([], [RANLIB], [1],
3692    [Commands used to install an old-style archive])
3693
3694# Determine commands to create old-style static archives.
3695old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
3696old_postinstall_cmds='chmod 644 $oldlib'
3697old_postuninstall_cmds=
3698
3699if test -n "$RANLIB"; then
3700  case $host_os in
3701  openbsd*)
3702    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
3703    ;;
3704  *)
3705    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
3706    ;;
3707  esac
3708  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
3709fi
3710_LT_DECL([], [old_postinstall_cmds], [2])
3711_LT_DECL([], [old_postuninstall_cmds], [2])
3712_LT_TAGDECL([], [old_archive_cmds], [2],
3713    [Commands used to build an old-style archive])
3714])# _LT_CMD_OLD_ARCHIVE
3715
3716
3717# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3718#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
3719# ----------------------------------------------------------------
3720# Check whether the given compiler option works
3721AC_DEFUN([_LT_COMPILER_OPTION],
3722[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3723m4_require([_LT_DECL_SED])dnl
3724AC_CACHE_CHECK([$1], [$2],
3725  [$2=no
3726   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
3727   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3728   lt_compiler_flag="$3"
3729   # Insert the option either (1) after the last *FLAGS variable, or
3730   # (2) before a word containing "conftest.", or (3) at the end.
3731   # Note that $ac_compile itself does not contain backslashes and begins
3732   # with a dollar sign (not a hyphen), so the echo should work correctly.
3733   # The option is referenced via a variable to avoid confusing sed.
3734   lt_compile=`echo "$ac_compile" | $SED \
3735   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3736   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3737   -e 's:$: $lt_compiler_flag:'`
3738   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3739   (eval "$lt_compile" 2>conftest.err)
3740   ac_status=$?
3741   cat conftest.err >&AS_MESSAGE_LOG_FD
3742   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3743   if (exit $ac_status) && test -s "$ac_outfile"; then
3744     # The compiler can only warn and ignore the option if not recognized
3745     # So say no if there are warnings other than the usual output.
3746     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
3747     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3748     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
3749       $2=yes
3750     fi
3751   fi
3752   $RM conftest*
3753])
3754
3755if test x"[$]$2" = xyes; then
3756    m4_if([$5], , :, [$5])
3757else
3758    m4_if([$6], , :, [$6])
3759fi
3760])# _LT_COMPILER_OPTION
3761
3762# Old name:
3763AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
3764dnl aclocal-1.4 backwards compatibility:
3765dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
3766
3767
3768# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3769#                  [ACTION-SUCCESS], [ACTION-FAILURE])
3770# ----------------------------------------------------
3771# Check whether the given linker option works
3772AC_DEFUN([_LT_LINKER_OPTION],
3773[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3774m4_require([_LT_DECL_SED])dnl
3775AC_CACHE_CHECK([$1], [$2],
3776  [$2=no
3777   save_LDFLAGS="$LDFLAGS"
3778   LDFLAGS="$LDFLAGS $3"
3779   echo "$lt_simple_link_test_code" > conftest.$ac_ext
3780   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
3781     # The linker can only warn and ignore the option if not recognized
3782     # So say no if there are warnings
3783     if test -s conftest.err; then
3784       # Append any errors to the config.log.
3785       cat conftest.err 1>&AS_MESSAGE_LOG_FD
3786       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
3787       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3788       if diff conftest.exp conftest.er2 >/dev/null; then
3789         $2=yes
3790       fi
3791     else
3792       $2=yes
3793     fi
3794   fi
3795   $RM -r conftest*
3796   LDFLAGS="$save_LDFLAGS"
3797])
3798
3799if test x"[$]$2" = xyes; then
3800    m4_if([$4], , :, [$4])
3801else
3802    m4_if([$5], , :, [$5])
3803fi
3804])# _LT_LINKER_OPTION
3805
3806# Old name:
3807AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
3808dnl aclocal-1.4 backwards compatibility:
3809dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
3810
3811
3812# LT_CMD_MAX_LEN
3813#---------------
3814AC_DEFUN([LT_CMD_MAX_LEN],
3815[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3816# find the maximum length of command line arguments
3817AC_MSG_CHECKING([the maximum length of command line arguments])
3818AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
3819  i=0
3820  teststring="ABCD"
3821
3822  case $build_os in
3823  msdosdjgpp*)
3824    # On DJGPP, this test can blow up pretty badly due to problems in libc
3825    # (any single argument exceeding 2000 bytes causes a buffer overrun
3826    # during glob expansion).  Even if it were fixed, the result of this
3827    # check would be larger than it should be.
3828    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
3829    ;;
3830
3831  gnu*)
3832    # Under GNU Hurd, this test is not required because there is
3833    # no limit to the length of command line arguments.
3834    # Libtool will interpret -1 as no limit whatsoever
3835    lt_cv_sys_max_cmd_len=-1;
3836    ;;
3837
3838  cygwin* | mingw* | cegcc*)
3839    # On Win9x/ME, this test blows up -- it succeeds, but takes
3840    # about 5 minutes as the teststring grows exponentially.
3841    # Worse, since 9x/ME are not pre-emptively multitasking,
3842    # you end up with a "frozen" computer, even though with patience
3843    # the test eventually succeeds (with a max line length of 256k).
3844    # Instead, let's just punt: use the minimum linelength reported by
3845    # all of the supported platforms: 8192 (on NT/2K/XP).
3846    lt_cv_sys_max_cmd_len=8192;
3847    ;;
3848
3849  amigaos*)
3850    # On AmigaOS with pdksh, this test takes hours, literally.
3851    # So we just punt and use a minimum line length of 8192.
3852    lt_cv_sys_max_cmd_len=8192;
3853    ;;
3854
3855  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
3856    # This has been around since 386BSD, at least.  Likely further.
3857    if test -x /sbin/sysctl; then
3858      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
3859    elif test -x /usr/sbin/sysctl; then
3860      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
3861    else
3862      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
3863    fi
3864    # And add a safety zone
3865    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3866    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3867    ;;
3868
3869  interix*)
3870    # We know the value 262144 and hardcode it with a safety zone (like BSD)
3871    lt_cv_sys_max_cmd_len=196608
3872    ;;
3873
3874  osf*)
3875    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
3876    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
3877    # nice to cause kernel panics so lets avoid the loop below.
3878    # First set a reasonable default.
3879    lt_cv_sys_max_cmd_len=16384
3880    #
3881    if test -x /sbin/sysconfig; then
3882      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
3883        *1*) lt_cv_sys_max_cmd_len=-1 ;;
3884      esac
3885    fi
3886    ;;
3887  sco3.2v5*)
3888    lt_cv_sys_max_cmd_len=102400
3889    ;;
3890  sysv5* | sco5v6* | sysv4.2uw2*)
3891    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
3892    if test -n "$kargmax"; then
3893      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
3894    else
3895      lt_cv_sys_max_cmd_len=32768
3896    fi
3897    ;;
3898  *)
3899    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
3900    if test -n "$lt_cv_sys_max_cmd_len"; then
3901      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3902      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3903    else
3904      # Make teststring a little bigger before we do anything with it.
3905      # a 1K string should be a reasonable start.
3906      for i in 1 2 3 4 5 6 7 8 ; do
3907        teststring=$teststring$teststring
3908      done
3909      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
3910      # If test is not a shell built-in, we'll probably end up computing a
3911      # maximum length that is only half of the actual maximum length, but
3912      # we can't tell.
3913      while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
3914	         = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
3915	      test $i != 17 # 1/2 MB should be enough
3916      do
3917        i=`expr $i + 1`
3918        teststring=$teststring$teststring
3919      done
3920      # Only check the string length outside the loop.
3921      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
3922      teststring=
3923      # Add a significant safety factor because C++ compilers can tack on
3924      # massive amounts of additional arguments before passing them to the
3925      # linker.  It appears as though 1/2 is a usable value.
3926      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
3927    fi
3928    ;;
3929  esac
3930])
3931if test -n $lt_cv_sys_max_cmd_len ; then
3932  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3933else
3934  AC_MSG_RESULT(none)
3935fi
3936max_cmd_len=$lt_cv_sys_max_cmd_len
3937_LT_DECL([], [max_cmd_len], [0],
3938    [What is the maximum length of a command?])
3939])# LT_CMD_MAX_LEN
3940
3941# Old name:
3942AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
3943dnl aclocal-1.4 backwards compatibility:
3944dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
3945
3946
3947# _LT_HEADER_DLFCN
3948# ----------------
3949m4_defun([_LT_HEADER_DLFCN],
3950[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
3951])# _LT_HEADER_DLFCN
3952
3953
3954# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3955#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3956# ----------------------------------------------------------------
3957m4_defun([_LT_TRY_DLOPEN_SELF],
3958[m4_require([_LT_HEADER_DLFCN])dnl
3959if test "$cross_compiling" = yes; then :
3960  [$4]
3961else
3962  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
3963  lt_status=$lt_dlunknown
3964  cat > conftest.$ac_ext <<_LT_EOF
3965[#line __oline__ "configure"
3966#include "confdefs.h"
3967
3968#if HAVE_DLFCN_H
3969#include <dlfcn.h>
3970#endif
3971
3972#include <stdio.h>
3973
3974#ifdef RTLD_GLOBAL
3975#  define LT_DLGLOBAL		RTLD_GLOBAL
3976#else
3977#  ifdef DL_GLOBAL
3978#    define LT_DLGLOBAL		DL_GLOBAL
3979#  else
3980#    define LT_DLGLOBAL		0
3981#  endif
3982#endif
3983
3984/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
3985   find out it does not work in some platform. */
3986#ifndef LT_DLLAZY_OR_NOW
3987#  ifdef RTLD_LAZY
3988#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
3989#  else
3990#    ifdef DL_LAZY
3991#      define LT_DLLAZY_OR_NOW		DL_LAZY
3992#    else
3993#      ifdef RTLD_NOW
3994#        define LT_DLLAZY_OR_NOW	RTLD_NOW
3995#      else
3996#        ifdef DL_NOW
3997#          define LT_DLLAZY_OR_NOW	DL_NOW
3998#        else
3999#          define LT_DLLAZY_OR_NOW	0
4000#        endif
4001#      endif
4002#    endif
4003#  endif
4004#endif
4005
4006void fnord() { int i=42;}
4007int main ()
4008{
4009  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
4010  int status = $lt_dlunknown;
4011
4012  if (self)
4013    {
4014      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
4015      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
4016      /* dlclose (self); */
4017    }
4018  else
4019    puts (dlerror ());
4020
4021  return status;
4022}]
4023_LT_EOF
4024  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
4025    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
4026    lt_status=$?
4027    case x$lt_status in
4028      x$lt_dlno_uscore) $1 ;;
4029      x$lt_dlneed_uscore) $2 ;;
4030      x$lt_dlunknown|x*) $3 ;;
4031    esac
4032  else :
4033    # compilation failed
4034    $3
4035  fi
4036fi
4037rm -fr conftest*
4038])# _LT_TRY_DLOPEN_SELF
4039
4040
4041# LT_SYS_DLOPEN_SELF
4042# ------------------
4043AC_DEFUN([LT_SYS_DLOPEN_SELF],
4044[m4_require([_LT_HEADER_DLFCN])dnl
4045if test "x$enable_dlopen" != xyes; then
4046  enable_dlopen=unknown
4047  enable_dlopen_self=unknown
4048  enable_dlopen_self_static=unknown
4049else
4050  lt_cv_dlopen=no
4051  lt_cv_dlopen_libs=
4052
4053  case $host_os in
4054  beos*)
4055    lt_cv_dlopen="load_add_on"
4056    lt_cv_dlopen_libs=
4057    lt_cv_dlopen_self=yes
4058    ;;
4059
4060  mingw* | pw32* | cegcc*)
4061    lt_cv_dlopen="LoadLibrary"
4062    lt_cv_dlopen_libs=
4063    ;;
4064
4065  cygwin*)
4066    lt_cv_dlopen="dlopen"
4067    lt_cv_dlopen_libs=
4068    ;;
4069
4070  darwin*)
4071  # if libdl is installed we need to link against it
4072    AC_CHECK_LIB([dl], [dlopen],
4073		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
4074    lt_cv_dlopen="dyld"
4075    lt_cv_dlopen_libs=
4076    lt_cv_dlopen_self=yes
4077    ])
4078    ;;
4079
4080  *)
4081    AC_CHECK_FUNC([shl_load],
4082	  [lt_cv_dlopen="shl_load"],
4083      [AC_CHECK_LIB([dld], [shl_load],
4084	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
4085	[AC_CHECK_FUNC([dlopen],
4086	      [lt_cv_dlopen="dlopen"],
4087	  [AC_CHECK_LIB([dl], [dlopen],
4088		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
4089	    [AC_CHECK_LIB([svld], [dlopen],
4090		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
4091	      [AC_CHECK_LIB([dld], [dld_link],
4092		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
4093	      ])
4094	    ])
4095	  ])
4096	])
4097      ])
4098    ;;
4099  esac
4100
4101  if test "x$lt_cv_dlopen" != xno; then
4102    enable_dlopen=yes
4103  else
4104    enable_dlopen=no
4105  fi
4106
4107  case $lt_cv_dlopen in
4108  dlopen)
4109    save_CPPFLAGS="$CPPFLAGS"
4110    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
4111
4112    save_LDFLAGS="$LDFLAGS"
4113    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
4114
4115    save_LIBS="$LIBS"
4116    LIBS="$lt_cv_dlopen_libs $LIBS"
4117
4118    AC_CACHE_CHECK([whether a program can dlopen itself],
4119	  lt_cv_dlopen_self, [dnl
4120	  _LT_TRY_DLOPEN_SELF(
4121	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
4122	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
4123    ])
4124
4125    if test "x$lt_cv_dlopen_self" = xyes; then
4126      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
4127      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
4128	  lt_cv_dlopen_self_static, [dnl
4129	  _LT_TRY_DLOPEN_SELF(
4130	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
4131	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
4132      ])
4133    fi
4134
4135    CPPFLAGS="$save_CPPFLAGS"
4136    LDFLAGS="$save_LDFLAGS"
4137    LIBS="$save_LIBS"
4138    ;;
4139  esac
4140
4141  case $lt_cv_dlopen_self in
4142  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
4143  *) enable_dlopen_self=unknown ;;
4144  esac
4145
4146  case $lt_cv_dlopen_self_static in
4147  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
4148  *) enable_dlopen_self_static=unknown ;;
4149  esac
4150fi
4151_LT_DECL([dlopen_support], [enable_dlopen], [0],
4152	 [Whether dlopen is supported])
4153_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
4154	 [Whether dlopen of programs is supported])
4155_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
4156	 [Whether dlopen of statically linked programs is supported])
4157])# LT_SYS_DLOPEN_SELF
4158
4159# Old name:
4160AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
4161dnl aclocal-1.4 backwards compatibility:
4162dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
4163
4164
4165# _LT_COMPILER_C_O([TAGNAME])
4166# ---------------------------
4167# Check to see if options -c and -o are simultaneously supported by compiler.
4168# This macro does not hard code the compiler like AC_PROG_CC_C_O.
4169m4_defun([_LT_COMPILER_C_O],
4170[m4_require([_LT_DECL_SED])dnl
4171m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4172m4_require([_LT_TAG_COMPILER])dnl
4173AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
4174  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
4175  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
4176   $RM -r conftest 2>/dev/null
4177   mkdir conftest
4178   cd conftest
4179   mkdir out
4180   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
4181
4182   lt_compiler_flag="-o out/conftest2.$ac_objext"
4183   # Insert the option either (1) after the last *FLAGS variable, or
4184   # (2) before a word containing "conftest.", or (3) at the end.
4185   # Note that $ac_compile itself does not contain backslashes and begins
4186   # with a dollar sign (not a hyphen), so the echo should work correctly.
4187   lt_compile=`echo "$ac_compile" | $SED \
4188   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
4189   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
4190   -e 's:$: $lt_compiler_flag:'`
4191   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
4192   (eval "$lt_compile" 2>out/conftest.err)
4193   ac_status=$?
4194   cat out/conftest.err >&AS_MESSAGE_LOG_FD
4195   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
4196   if (exit $ac_status) && test -s out/conftest2.$ac_objext
4197   then
4198     # The compiler can only warn and ignore the option if not recognized
4199     # So say no if there are warnings
4200     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
4201     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
4202     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
4203       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4204     fi
4205   fi
4206   chmod u+w . 2>&AS_MESSAGE_LOG_FD
4207   $RM conftest*
4208   # SGI C++ compiler will create directory out/ii_files/ for
4209   # template instantiation
4210   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
4211   $RM out/* && rmdir out
4212   cd ..
4213   $RM -r conftest
4214   $RM conftest*
4215])
4216_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
4217	[Does compiler simultaneously support -c and -o options?])
4218])# _LT_COMPILER_C_O
4219
4220
4221# _LT_COMPILER_FILE_LOCKS([TAGNAME])
4222# ----------------------------------
4223# Check to see if we can do hard links to lock some files if needed
4224m4_defun([_LT_COMPILER_FILE_LOCKS],
4225[m4_require([_LT_ENABLE_LOCK])dnl
4226m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4227_LT_COMPILER_C_O([$1])
4228
4229hard_links="nottested"
4230if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
4231  # do not overwrite the value of need_locks provided by the user
4232  AC_MSG_CHECKING([if we can lock with hard links])
4233  hard_links=yes
4234  $RM conftest*
4235  ln conftest.a conftest.b 2>/dev/null && hard_links=no
4236  touch conftest.a
4237  ln conftest.a conftest.b 2>&5 || hard_links=no
4238  ln conftest.a conftest.b 2>/dev/null && hard_links=no
4239  AC_MSG_RESULT([$hard_links])
4240  if test "$hard_links" = no; then
4241    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
4242    need_locks=warn
4243  fi
4244else
4245  need_locks=no
4246fi
4247_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
4248])# _LT_COMPILER_FILE_LOCKS
4249
4250
4251# _LT_CHECK_OBJDIR
4252# ----------------
4253m4_defun([_LT_CHECK_OBJDIR],
4254[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
4255[rm -f .libs 2>/dev/null
4256mkdir .libs 2>/dev/null
4257if test -d .libs; then
4258  lt_cv_objdir=.libs
4259else
4260  # MS-DOS does not allow filenames that begin with a dot.
4261  lt_cv_objdir=_libs
4262fi
4263rmdir .libs 2>/dev/null])
4264objdir=$lt_cv_objdir
4265_LT_DECL([], [objdir], [0],
4266         [The name of the directory that contains temporary libtool files])dnl
4267m4_pattern_allow([LT_OBJDIR])dnl
4268AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
4269  [Define to the sub-directory in which libtool stores uninstalled libraries.])
4270])# _LT_CHECK_OBJDIR
4271
4272
4273# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
4274# --------------------------------------
4275# Check hardcoding attributes.
4276m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
4277[AC_MSG_CHECKING([how to hardcode library paths into programs])
4278_LT_TAGVAR(hardcode_action, $1)=
4279if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
4280   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
4281   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
4282
4283  # We can hardcode non-existent directories.
4284  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
4285     # If the only mechanism to avoid hardcoding is shlibpath_var, we
4286     # have to relink, otherwise we might link with an installed library
4287     # when we should be linking with a yet-to-be-installed one
4288     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
4289     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
4290    # Linking always hardcodes the temporary library directory.
4291    _LT_TAGVAR(hardcode_action, $1)=relink
4292  else
4293    # We can link without hardcoding, and we can hardcode nonexisting dirs.
4294    _LT_TAGVAR(hardcode_action, $1)=immediate
4295  fi
4296else
4297  # We cannot hardcode anything, or else we can only hardcode existing
4298  # directories.
4299  _LT_TAGVAR(hardcode_action, $1)=unsupported
4300fi
4301AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
4302
4303if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
4304   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
4305  # Fast installation is not supported
4306  enable_fast_install=no
4307elif test "$shlibpath_overrides_runpath" = yes ||
4308     test "$enable_shared" = no; then
4309  # Fast installation is not necessary
4310  enable_fast_install=needless
4311fi
4312_LT_TAGDECL([], [hardcode_action], [0],
4313    [How to hardcode a shared library path into an executable])
4314])# _LT_LINKER_HARDCODE_LIBPATH
4315
4316
4317# _LT_CMD_STRIPLIB
4318# ----------------
4319m4_defun([_LT_CMD_STRIPLIB],
4320[m4_require([_LT_DECL_EGREP])
4321striplib=
4322old_striplib=
4323AC_MSG_CHECKING([whether stripping libraries is possible])
4324if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
4325  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
4326  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
4327  AC_MSG_RESULT([yes])
4328else
4329# FIXME - insert some real tests, host_os isn't really good enough
4330  case $host_os in
4331  darwin*)
4332    if test -n "$STRIP" ; then
4333      striplib="$STRIP -x"
4334      old_striplib="$STRIP -S"
4335      AC_MSG_RESULT([yes])
4336    else
4337      AC_MSG_RESULT([no])
4338    fi
4339    ;;
4340  *)
4341    AC_MSG_RESULT([no])
4342    ;;
4343  esac
4344fi
4345_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
4346_LT_DECL([], [striplib], [1])
4347])# _LT_CMD_STRIPLIB
4348
4349
4350# _LT_SYS_DYNAMIC_LINKER([TAG])
4351# -----------------------------
4352# PORTME Fill in your ld.so characteristics
4353m4_defun([_LT_SYS_DYNAMIC_LINKER],
4354[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4355m4_require([_LT_DECL_EGREP])dnl
4356m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4357m4_require([_LT_DECL_OBJDUMP])dnl
4358m4_require([_LT_DECL_SED])dnl
4359AC_MSG_CHECKING([dynamic linker characteristics])
4360m4_if([$1],
4361	[], [
4362if test "$GCC" = yes; then
4363  case $host_os in
4364    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
4365    *) lt_awk_arg="/^libraries:/" ;;
4366  esac
4367  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
4368  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
4369    # if the path contains ";" then we assume it to be the separator
4370    # otherwise default to the standard path separator (i.e. ":") - it is
4371    # assumed that no part of a normal pathname contains ";" but that should
4372    # okay in the real world where ";" in dirpaths is itself problematic.
4373    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
4374  else
4375    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
4376  fi
4377  # Ok, now we have the path, separated by spaces, we can step through it
4378  # and add multilib dir if necessary.
4379  lt_tmp_lt_search_path_spec=
4380  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
4381  for lt_sys_path in $lt_search_path_spec; do
4382    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
4383      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
4384    else
4385      test -d "$lt_sys_path" && \
4386	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
4387    fi
4388  done
4389  lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
4390BEGIN {RS=" "; FS="/|\n";} {
4391  lt_foo="";
4392  lt_count=0;
4393  for (lt_i = NF; lt_i > 0; lt_i--) {
4394    if ($lt_i != "" && $lt_i != ".") {
4395      if ($lt_i == "..") {
4396        lt_count++;
4397      } else {
4398        if (lt_count == 0) {
4399          lt_foo="/" $lt_i lt_foo;
4400        } else {
4401          lt_count--;
4402        }
4403      }
4404    }
4405  }
4406  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
4407  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
4408}'`
4409  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
4410else
4411  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
4412fi])
4413library_names_spec=
4414libname_spec='lib$name'
4415soname_spec=
4416shrext_cmds=".so"
4417postinstall_cmds=
4418postuninstall_cmds=
4419finish_cmds=
4420finish_eval=
4421shlibpath_var=
4422shlibpath_overrides_runpath=unknown
4423version_type=none
4424dynamic_linker="$host_os ld.so"
4425sys_lib_dlsearch_path_spec="/lib /usr/lib"
4426need_lib_prefix=unknown
4427hardcode_into_libs=no
4428
4429# when you set need_version to no, make sure it does not cause -set_version
4430# flags to be left without arguments
4431need_version=unknown
4432
4433case $host_os in
4434aix3*)
4435  version_type=linux
4436  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
4437  shlibpath_var=LIBPATH
4438
4439  # AIX 3 has no versioning support, so we append a major version to the name.
4440  soname_spec='${libname}${release}${shared_ext}$major'
4441  ;;
4442
4443aix[[4-9]]*)
4444  version_type=linux
4445  need_lib_prefix=no
4446  need_version=no
4447  hardcode_into_libs=yes
4448  if test "$host_cpu" = ia64; then
4449    # AIX 5 supports IA64
4450    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
4451    shlibpath_var=LD_LIBRARY_PATH
4452  else
4453    # With GCC up to 2.95.x, collect2 would create an import file
4454    # for dependence libraries.  The import file would start with
4455    # the line `#! .'.  This would cause the generated library to
4456    # depend on `.', always an invalid library.  This was fixed in
4457    # development snapshots of GCC prior to 3.0.
4458    case $host_os in
4459      aix4 | aix4.[[01]] | aix4.[[01]].*)
4460      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
4461	   echo ' yes '
4462	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
4463	:
4464      else
4465	can_build_shared=no
4466      fi
4467      ;;
4468    esac
4469    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
4470    # soname into executable. Probably we can add versioning support to
4471    # collect2, so additional links can be useful in future.
4472    if test "$aix_use_runtimelinking" = yes; then
4473      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
4474      # instead of lib<name>.a to let people know that these are not
4475      # typical AIX shared libraries.
4476      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4477    else
4478      # We preserve .a as extension for shared libraries through AIX4.2
4479      # and later when we are not doing run time linking.
4480      library_names_spec='${libname}${release}.a $libname.a'
4481      soname_spec='${libname}${release}${shared_ext}$major'
4482    fi
4483    shlibpath_var=LIBPATH
4484  fi
4485  ;;
4486
4487amigaos*)
4488  case $host_cpu in
4489  powerpc)
4490    # Since July 2007 AmigaOS4 officially supports .so libraries.
4491    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
4492    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4493    ;;
4494  m68k)
4495    library_names_spec='$libname.ixlibrary $libname.a'
4496    # Create ${libname}_ixlibrary.a entries in /sys/libs.
4497    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'
4498    ;;
4499  esac
4500  ;;
4501
4502beos*)
4503  library_names_spec='${libname}${shared_ext}'
4504  dynamic_linker="$host_os ld.so"
4505  shlibpath_var=LIBRARY_PATH
4506  ;;
4507
4508bsdi[[45]]*)
4509  version_type=linux
4510  need_version=no
4511  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4512  soname_spec='${libname}${release}${shared_ext}$major'
4513  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
4514  shlibpath_var=LD_LIBRARY_PATH
4515  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
4516  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
4517  # the default ld.so.conf also contains /usr/contrib/lib and
4518  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
4519  # libtool to hard-code these into programs
4520  ;;
4521
4522cygwin* | mingw* | pw32* | cegcc*)
4523  version_type=windows
4524  shrext_cmds=".dll"
4525  need_version=no
4526  need_lib_prefix=no
4527
4528  case $GCC,$host_os in
4529  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
4530    library_names_spec='$libname.dll.a'
4531    # DLL is installed to $(libdir)/../bin by postinstall_cmds
4532    postinstall_cmds='base_file=`basename \${file}`~
4533      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
4534      dldir=$destdir/`dirname \$dlpath`~
4535      test -d \$dldir || mkdir -p \$dldir~
4536      $install_prog $dir/$dlname \$dldir/$dlname~
4537      chmod a+x \$dldir/$dlname~
4538      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
4539        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
4540      fi'
4541    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
4542      dlpath=$dir/\$dldll~
4543       $RM \$dlpath'
4544    shlibpath_overrides_runpath=yes
4545
4546    case $host_os in
4547    cygwin*)
4548      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
4549      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4550      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
4551      ;;
4552    mingw* | cegcc*)
4553      # MinGW DLLs use traditional 'lib' prefix
4554      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4555      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
4556      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
4557        # It is most probably a Windows format PATH printed by
4558        # mingw gcc, but we are running on Cygwin. Gcc prints its search
4559        # path with ; separators, and with drive letters. We can handle the
4560        # drive letters (cygwin fileutils understands them), so leave them,
4561        # especially as we might pass files found there to a mingw objdump,
4562        # which wouldn't understand a cygwinified path. Ahh.
4563        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
4564      else
4565        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
4566      fi
4567      ;;
4568    pw32*)
4569      # pw32 DLLs use 'pw' prefix rather than 'lib'
4570      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4571      ;;
4572    esac
4573    ;;
4574
4575  *)
4576    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
4577    ;;
4578  esac
4579  dynamic_linker='Win32 ld.exe'
4580  # FIXME: first we should search . and the directory the executable is in
4581  shlibpath_var=PATH
4582  ;;
4583
4584darwin* | rhapsody*)
4585  dynamic_linker="$host_os dyld"
4586  version_type=darwin
4587  need_lib_prefix=no
4588  need_version=no
4589  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
4590  soname_spec='${libname}${release}${major}$shared_ext'
4591  shlibpath_overrides_runpath=yes
4592  shlibpath_var=DYLD_LIBRARY_PATH
4593  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
4594m4_if([$1], [],[
4595  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
4596  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
4597  ;;
4598
4599dgux*)
4600  version_type=linux
4601  need_lib_prefix=no
4602  need_version=no
4603  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
4604  soname_spec='${libname}${release}${shared_ext}$major'
4605  shlibpath_var=LD_LIBRARY_PATH
4606  ;;
4607
4608freebsd1*)
4609  dynamic_linker=no
4610  ;;
4611
4612freebsd* | dragonfly*)
4613  # DragonFly does not have aout.  When/if they implement a new
4614  # versioning mechanism, adjust this.
4615  if test -x /usr/bin/objformat; then
4616    objformat=`/usr/bin/objformat`
4617  else
4618    case $host_os in
4619    freebsd[[123]]*) objformat=aout ;;
4620    *) objformat=elf ;;
4621    esac
4622  fi
4623  version_type=freebsd-$objformat
4624  case $version_type in
4625    freebsd-elf*)
4626      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4627      need_version=no
4628      need_lib_prefix=no
4629      ;;
4630    freebsd-*)
4631      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
4632      need_version=yes
4633      ;;
4634  esac
4635  shlibpath_var=LD_LIBRARY_PATH
4636  case $host_os in
4637  freebsd2*)
4638    shlibpath_overrides_runpath=yes
4639    ;;
4640  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
4641    shlibpath_overrides_runpath=yes
4642    hardcode_into_libs=yes
4643    ;;
4644  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
4645  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
4646    shlibpath_overrides_runpath=no
4647    hardcode_into_libs=yes
4648    ;;
4649  *) # from 4.6 on, and DragonFly
4650    shlibpath_overrides_runpath=yes
4651    hardcode_into_libs=yes
4652    ;;
4653  esac
4654  ;;
4655
4656gnu*)
4657  version_type=linux
4658  need_lib_prefix=no
4659  need_version=no
4660  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
4661  soname_spec='${libname}${release}${shared_ext}$major'
4662  shlibpath_var=LD_LIBRARY_PATH
4663  hardcode_into_libs=yes
4664  ;;
4665
4666hpux9* | hpux10* | hpux11*)
4667  # Give a soname corresponding to the major version so that dld.sl refuses to
4668  # link against other versions.
4669  version_type=sunos
4670  need_lib_prefix=no
4671  need_version=no
4672  case $host_cpu in
4673  ia64*)
4674    shrext_cmds='.so'
4675    hardcode_into_libs=yes
4676    dynamic_linker="$host_os dld.so"
4677    shlibpath_var=LD_LIBRARY_PATH
4678    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4679    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4680    soname_spec='${libname}${release}${shared_ext}$major'
4681    if test "X$HPUX_IA64_MODE" = X32; then
4682      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
4683    else
4684      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
4685    fi
4686    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4687    ;;
4688  hppa*64*)
4689    shrext_cmds='.sl'
4690    hardcode_into_libs=yes
4691    dynamic_linker="$host_os dld.sl"
4692    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
4693    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4694    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4695    soname_spec='${libname}${release}${shared_ext}$major'
4696    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
4697    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4698    ;;
4699  *)
4700    shrext_cmds='.sl'
4701    dynamic_linker="$host_os dld.sl"
4702    shlibpath_var=SHLIB_PATH
4703    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
4704    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4705    soname_spec='${libname}${release}${shared_ext}$major'
4706    ;;
4707  esac
4708  # HP-UX runs *really* slowly unless shared libraries are mode 555.
4709  postinstall_cmds='chmod 555 $lib'
4710  ;;
4711
4712interix[[3-9]]*)
4713  version_type=linux
4714  need_lib_prefix=no
4715  need_version=no
4716  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4717  soname_spec='${libname}${release}${shared_ext}$major'
4718  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
4719  shlibpath_var=LD_LIBRARY_PATH
4720  shlibpath_overrides_runpath=no
4721  hardcode_into_libs=yes
4722  ;;
4723
4724irix5* | irix6* | nonstopux*)
4725  case $host_os in
4726    nonstopux*) version_type=nonstopux ;;
4727    *)
4728	if test "$lt_cv_prog_gnu_ld" = yes; then
4729		version_type=linux
4730	else
4731		version_type=irix
4732	fi ;;
4733  esac
4734  need_lib_prefix=no
4735  need_version=no
4736  soname_spec='${libname}${release}${shared_ext}$major'
4737  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
4738  case $host_os in
4739  irix5* | nonstopux*)
4740    libsuff= shlibsuff=
4741    ;;
4742  *)
4743    case $LD in # libtool.m4 will add one of these switches to LD
4744    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
4745      libsuff= shlibsuff= libmagic=32-bit;;
4746    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
4747      libsuff=32 shlibsuff=N32 libmagic=N32;;
4748    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
4749      libsuff=64 shlibsuff=64 libmagic=64-bit;;
4750    *) libsuff= shlibsuff= libmagic=never-match;;
4751    esac
4752    ;;
4753  esac
4754  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
4755  shlibpath_overrides_runpath=no
4756  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
4757  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
4758  hardcode_into_libs=yes
4759  ;;
4760
4761# No shared lib support for Linux oldld, aout, or coff.
4762linux*oldld* | linux*aout* | linux*coff*)
4763  dynamic_linker=no
4764  ;;
4765
4766# This must be Linux ELF.
4767linux* | k*bsd*-gnu)
4768  version_type=linux
4769  need_lib_prefix=no
4770  need_version=no
4771  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4772  soname_spec='${libname}${release}${shared_ext}$major'
4773  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
4774  shlibpath_var=LD_LIBRARY_PATH
4775  shlibpath_overrides_runpath=no
4776  # Some binutils ld are patched to set DT_RUNPATH
4777  save_LDFLAGS=$LDFLAGS
4778  save_libdir=$libdir
4779  eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
4780       LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
4781  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
4782    [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
4783       [shlibpath_overrides_runpath=yes])])
4784  LDFLAGS=$save_LDFLAGS
4785  libdir=$save_libdir
4786
4787  # This implies no fast_install, which is unacceptable.
4788  # Some rework will be needed to allow for fast_install
4789  # before this can be enabled.
4790  hardcode_into_libs=yes
4791
4792  # Append ld.so.conf contents to the search path
4793  if test -f /etc/ld.so.conf; then
4794    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' ' '`
4795    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
4796  fi
4797
4798  # We used to test for /lib/ld.so.1 and disable shared libraries on
4799  # powerpc, because MkLinux only supported shared libraries with the
4800  # GNU dynamic linker.  Since this was broken with cross compilers,
4801  # most powerpc-linux boxes support dynamic linking these days and
4802  # people can always --disable-shared, the test was removed, and we
4803  # assume the GNU/Linux dynamic linker is in use.
4804  dynamic_linker='GNU/Linux ld.so'
4805  ;;
4806
4807netbsd*)
4808  version_type=sunos
4809  need_lib_prefix=no
4810  need_version=no
4811  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4812    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4813    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4814    dynamic_linker='NetBSD (a.out) ld.so'
4815  else
4816    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4817    soname_spec='${libname}${release}${shared_ext}$major'
4818    dynamic_linker='NetBSD ld.elf_so'
4819  fi
4820  shlibpath_var=LD_LIBRARY_PATH
4821  shlibpath_overrides_runpath=yes
4822  hardcode_into_libs=yes
4823  ;;
4824
4825newsos6)
4826  version_type=linux
4827  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4828  shlibpath_var=LD_LIBRARY_PATH
4829  shlibpath_overrides_runpath=yes
4830  ;;
4831
4832*nto* | *qnx*)
4833  version_type=qnx
4834  need_lib_prefix=no
4835  need_version=no
4836  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4837  soname_spec='${libname}${release}${shared_ext}$major'
4838  shlibpath_var=LD_LIBRARY_PATH
4839  shlibpath_overrides_runpath=no
4840  hardcode_into_libs=yes
4841  dynamic_linker='ldqnx.so'
4842  ;;
4843
4844openbsd*)
4845  version_type=sunos
4846  sys_lib_dlsearch_path_spec="/usr/lib"
4847  need_lib_prefix=no
4848  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
4849  case $host_os in
4850    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
4851    *)				need_version=no  ;;
4852  esac
4853  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4854  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4855  shlibpath_var=LD_LIBRARY_PATH
4856  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4857    case $host_os in
4858      openbsd2.[[89]] | openbsd2.[[89]].*)
4859	shlibpath_overrides_runpath=no
4860	;;
4861      *)
4862	shlibpath_overrides_runpath=yes
4863	;;
4864      esac
4865  else
4866    shlibpath_overrides_runpath=yes
4867  fi
4868  ;;
4869
4870os2*)
4871  libname_spec='$name'
4872  shrext_cmds=".dll"
4873  need_lib_prefix=no
4874  library_names_spec='$libname${shared_ext} $libname.a'
4875  dynamic_linker='OS/2 ld.exe'
4876  shlibpath_var=LIBPATH
4877  ;;
4878
4879osf3* | osf4* | osf5*)
4880  version_type=osf
4881  need_lib_prefix=no
4882  need_version=no
4883  soname_spec='${libname}${release}${shared_ext}$major'
4884  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4885  shlibpath_var=LD_LIBRARY_PATH
4886  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4887  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
4888  ;;
4889
4890rdos*)
4891  dynamic_linker=no
4892  ;;
4893
4894solaris*)
4895  version_type=linux
4896  need_lib_prefix=no
4897  need_version=no
4898  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4899  soname_spec='${libname}${release}${shared_ext}$major'
4900  shlibpath_var=LD_LIBRARY_PATH
4901  shlibpath_overrides_runpath=yes
4902  hardcode_into_libs=yes
4903  # ldd complains unless libraries are executable
4904  postinstall_cmds='chmod +x $lib'
4905  ;;
4906
4907sunos4*)
4908  version_type=sunos
4909  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4910  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4911  shlibpath_var=LD_LIBRARY_PATH
4912  shlibpath_overrides_runpath=yes
4913  if test "$with_gnu_ld" = yes; then
4914    need_lib_prefix=no
4915  fi
4916  need_version=yes
4917  ;;
4918
4919sysv4 | sysv4.3*)
4920  version_type=linux
4921  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4922  soname_spec='${libname}${release}${shared_ext}$major'
4923  shlibpath_var=LD_LIBRARY_PATH
4924  case $host_vendor in
4925    sni)
4926      shlibpath_overrides_runpath=no
4927      need_lib_prefix=no
4928      runpath_var=LD_RUN_PATH
4929      ;;
4930    siemens)
4931      need_lib_prefix=no
4932      ;;
4933    motorola)
4934      need_lib_prefix=no
4935      need_version=no
4936      shlibpath_overrides_runpath=no
4937      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4938      ;;
4939  esac
4940  ;;
4941
4942sysv4*MP*)
4943  if test -d /usr/nec ;then
4944    version_type=linux
4945    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
4946    soname_spec='$libname${shared_ext}.$major'
4947    shlibpath_var=LD_LIBRARY_PATH
4948  fi
4949  ;;
4950
4951sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4952  version_type=freebsd-elf
4953  need_lib_prefix=no
4954  need_version=no
4955  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4956  soname_spec='${libname}${release}${shared_ext}$major'
4957  shlibpath_var=LD_LIBRARY_PATH
4958  shlibpath_overrides_runpath=yes
4959  hardcode_into_libs=yes
4960  if test "$with_gnu_ld" = yes; then
4961    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
4962  else
4963    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
4964    case $host_os in
4965      sco3.2v5*)
4966        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
4967	;;
4968    esac
4969  fi
4970  sys_lib_dlsearch_path_spec='/usr/lib'
4971  ;;
4972
4973tpf*)
4974  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
4975  version_type=linux
4976  need_lib_prefix=no
4977  need_version=no
4978  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4979  shlibpath_var=LD_LIBRARY_PATH
4980  shlibpath_overrides_runpath=no
4981  hardcode_into_libs=yes
4982  ;;
4983
4984uts4*)
4985  version_type=linux
4986  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4987  soname_spec='${libname}${release}${shared_ext}$major'
4988  shlibpath_var=LD_LIBRARY_PATH
4989  ;;
4990
4991*)
4992  dynamic_linker=no
4993  ;;
4994esac
4995AC_MSG_RESULT([$dynamic_linker])
4996test "$dynamic_linker" = no && can_build_shared=no
4997
4998variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4999if test "$GCC" = yes; then
5000  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5001fi
5002
5003if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
5004  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
5005fi
5006if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
5007  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
5008fi
5009
5010_LT_DECL([], [variables_saved_for_relink], [1],
5011    [Variables whose values should be saved in libtool wrapper scripts and
5012    restored at link time])
5013_LT_DECL([], [need_lib_prefix], [0],
5014    [Do we need the "lib" prefix for modules?])
5015_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
5016_LT_DECL([], [version_type], [0], [Library versioning type])
5017_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
5018_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
5019_LT_DECL([], [shlibpath_overrides_runpath], [0],
5020    [Is shlibpath searched before the hard-coded library search path?])
5021_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
5022_LT_DECL([], [library_names_spec], [1],
5023    [[List of archive names.  First name is the real one, the rest are links.
5024    The last name is the one that the linker finds with -lNAME]])
5025_LT_DECL([], [soname_spec], [1],
5026    [[The coded name of the library, if different from the real name]])
5027_LT_DECL([], [postinstall_cmds], [2],
5028    [Command to use after installation of a shared archive])
5029_LT_DECL([], [postuninstall_cmds], [2],
5030    [Command to use after uninstallation of a shared archive])
5031_LT_DECL([], [finish_cmds], [2],
5032    [Commands used to finish a libtool library installation in a directory])
5033_LT_DECL([], [finish_eval], [1],
5034    [[As "finish_cmds", except a single script fragment to be evaled but
5035    not shown]])
5036_LT_DECL([], [hardcode_into_libs], [0],
5037    [Whether we should hardcode library paths into libraries])
5038_LT_DECL([], [sys_lib_search_path_spec], [2],
5039    [Compile-time system search path for libraries])
5040_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
5041    [Run-time system search path for libraries])
5042])# _LT_SYS_DYNAMIC_LINKER
5043
5044
5045# _LT_PATH_TOOL_PREFIX(TOOL)
5046# --------------------------
5047# find a file program which can recognize shared library
5048AC_DEFUN([_LT_PATH_TOOL_PREFIX],
5049[m4_require([_LT_DECL_EGREP])dnl
5050AC_MSG_CHECKING([for $1])
5051AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
5052[case $MAGIC_CMD in
5053[[\\/*] |  ?:[\\/]*])
5054  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
5055  ;;
5056*)
5057  lt_save_MAGIC_CMD="$MAGIC_CMD"
5058  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5059dnl $ac_dummy forces splitting on constant user-supplied paths.
5060dnl POSIX.2 word splitting is done only on the output of word expansions,
5061dnl not every word.  This closes a longstanding sh security hole.
5062  ac_dummy="m4_if([$2], , $PATH, [$2])"
5063  for ac_dir in $ac_dummy; do
5064    IFS="$lt_save_ifs"
5065    test -z "$ac_dir" && ac_dir=.
5066    if test -f $ac_dir/$1; then
5067      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
5068      if test -n "$file_magic_test_file"; then
5069	case $deplibs_check_method in
5070	"file_magic "*)
5071	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
5072	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5073	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
5074	    $EGREP "$file_magic_regex" > /dev/null; then
5075	    :
5076	  else
5077	    cat <<_LT_EOF 1>&2
5078
5079*** Warning: the command libtool uses to detect shared libraries,
5080*** $file_magic_cmd, produces output that libtool cannot recognize.
5081*** The result is that libtool may fail to recognize shared libraries
5082*** as such.  This will affect the creation of libtool libraries that
5083*** depend on shared libraries, but programs linked with such libtool
5084*** libraries will work regardless of this problem.  Nevertheless, you
5085*** may want to report the problem to your system manager and/or to
5086*** bug-libtool@gnu.org
5087
5088_LT_EOF
5089	  fi ;;
5090	esac
5091      fi
5092      break
5093    fi
5094  done
5095  IFS="$lt_save_ifs"
5096  MAGIC_CMD="$lt_save_MAGIC_CMD"
5097  ;;
5098esac])
5099MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5100if test -n "$MAGIC_CMD"; then
5101  AC_MSG_RESULT($MAGIC_CMD)
5102else
5103  AC_MSG_RESULT(no)
5104fi
5105_LT_DECL([], [MAGIC_CMD], [0],
5106	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
5107])# _LT_PATH_TOOL_PREFIX
5108
5109# Old name:
5110AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
5111dnl aclocal-1.4 backwards compatibility:
5112dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
5113
5114
5115# _LT_PATH_MAGIC
5116# --------------
5117# find a file program which can recognize a shared library
5118m4_defun([_LT_PATH_MAGIC],
5119[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
5120if test -z "$lt_cv_path_MAGIC_CMD"; then
5121  if test -n "$ac_tool_prefix"; then
5122    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
5123  else
5124    MAGIC_CMD=:
5125  fi
5126fi
5127])# _LT_PATH_MAGIC
5128
5129
5130# LT_PATH_LD
5131# ----------
5132# find the pathname to the GNU or non-GNU linker
5133AC_DEFUN([LT_PATH_LD],
5134[AC_REQUIRE([AC_PROG_CC])dnl
5135AC_REQUIRE([AC_CANONICAL_HOST])dnl
5136AC_REQUIRE([AC_CANONICAL_BUILD])dnl
5137m4_require([_LT_DECL_SED])dnl
5138m4_require([_LT_DECL_EGREP])dnl
5139
5140AC_ARG_WITH([gnu-ld],
5141    [AS_HELP_STRING([--with-gnu-ld],
5142	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
5143    [test "$withval" = no || with_gnu_ld=yes],
5144    [with_gnu_ld=no])dnl
5145
5146ac_prog=ld
5147if test "$GCC" = yes; then
5148  # Check if gcc -print-prog-name=ld gives a path.
5149  AC_MSG_CHECKING([for ld used by $CC])
5150  case $host in
5151  *-*-mingw*)
5152    # gcc leaves a trailing carriage return which upsets mingw
5153    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5154  *)
5155    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5156  esac
5157  case $ac_prog in
5158    # Accept absolute paths.
5159    [[\\/]]* | ?:[[\\/]]*)
5160      re_direlt='/[[^/]][[^/]]*/\.\./'
5161      # Canonicalize the pathname of ld
5162      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
5163      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
5164	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
5165      done
5166      test -z "$LD" && LD="$ac_prog"
5167      ;;
5168  "")
5169    # If it fails, then pretend we aren't using GCC.
5170    ac_prog=ld
5171    ;;
5172  *)
5173    # If it is relative, then search for the first ld in PATH.
5174    with_gnu_ld=unknown
5175    ;;
5176  esac
5177elif test "$with_gnu_ld" = yes; then
5178  AC_MSG_CHECKING([for GNU ld])
5179else
5180  AC_MSG_CHECKING([for non-GNU ld])
5181fi
5182AC_CACHE_VAL(lt_cv_path_LD,
5183[if test -z "$LD"; then
5184  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5185  for ac_dir in $PATH; do
5186    IFS="$lt_save_ifs"
5187    test -z "$ac_dir" && ac_dir=.
5188    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5189      lt_cv_path_LD="$ac_dir/$ac_prog"
5190      # Check to see if the program is GNU ld.  I'd rather use --version,
5191      # but apparently some variants of GNU ld only accept -v.
5192      # Break only if it was the GNU/non-GNU ld that we prefer.
5193      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5194      *GNU* | *'with BFD'*)
5195	test "$with_gnu_ld" != no && break
5196	;;
5197      *)
5198	test "$with_gnu_ld" != yes && break
5199	;;
5200      esac
5201    fi
5202  done
5203  IFS="$lt_save_ifs"
5204else
5205  lt_cv_path_LD="$LD" # Let the user override the test with a path.
5206fi])
5207LD="$lt_cv_path_LD"
5208if test -n "$LD"; then
5209  AC_MSG_RESULT($LD)
5210else
5211  AC_MSG_RESULT(no)
5212fi
5213test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
5214_LT_PATH_LD_GNU
5215AC_SUBST([LD])
5216
5217_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
5218])# LT_PATH_LD
5219
5220# Old names:
5221AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
5222AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
5223dnl aclocal-1.4 backwards compatibility:
5224dnl AC_DEFUN([AM_PROG_LD], [])
5225dnl AC_DEFUN([AC_PROG_LD], [])
5226
5227
5228# _LT_PATH_LD_GNU
5229#- --------------
5230m4_defun([_LT_PATH_LD_GNU],
5231[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
5232[# I'd rather use --version here, but apparently some GNU lds only accept -v.
5233case `$LD -v 2>&1 </dev/null` in
5234*GNU* | *'with BFD'*)
5235  lt_cv_prog_gnu_ld=yes
5236  ;;
5237*)
5238  lt_cv_prog_gnu_ld=no
5239  ;;
5240esac])
5241with_gnu_ld=$lt_cv_prog_gnu_ld
5242])# _LT_PATH_LD_GNU
5243
5244
5245# _LT_CMD_RELOAD
5246# --------------
5247# find reload flag for linker
5248#   -- PORTME Some linkers may need a different reload flag.
5249m4_defun([_LT_CMD_RELOAD],
5250[AC_CACHE_CHECK([for $LD option to reload object files],
5251  lt_cv_ld_reload_flag,
5252  [lt_cv_ld_reload_flag='-r'])
5253reload_flag=$lt_cv_ld_reload_flag
5254case $reload_flag in
5255"" | " "*) ;;
5256*) reload_flag=" $reload_flag" ;;
5257esac
5258reload_cmds='$LD$reload_flag -o $output$reload_objs'
5259case $host_os in
5260  darwin*)
5261    if test "$GCC" = yes; then
5262      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
5263    else
5264      reload_cmds='$LD$reload_flag -o $output$reload_objs'
5265    fi
5266    ;;
5267esac
5268_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
5269_LT_DECL([], [reload_cmds], [2])dnl
5270])# _LT_CMD_RELOAD
5271
5272
5273# _LT_CHECK_MAGIC_METHOD
5274# ----------------------
5275# how to check for library dependencies
5276#  -- PORTME fill in with the dynamic library characteristics
5277m4_defun([_LT_CHECK_MAGIC_METHOD],
5278[m4_require([_LT_DECL_EGREP])
5279m4_require([_LT_DECL_OBJDUMP])
5280AC_CACHE_CHECK([how to recognize dependent libraries],
5281lt_cv_deplibs_check_method,
5282[lt_cv_file_magic_cmd='$MAGIC_CMD'
5283lt_cv_file_magic_test_file=
5284lt_cv_deplibs_check_method='unknown'
5285# Need to set the preceding variable on all platforms that support
5286# interlibrary dependencies.
5287# 'none' -- dependencies not supported.
5288# `unknown' -- same as none, but documents that we really don't know.
5289# 'pass_all' -- all dependencies passed with no checks.
5290# 'test_compile' -- check by making test program.
5291# 'file_magic [[regex]]' -- check by looking for files in library path
5292# which responds to the $file_magic_cmd with a given extended regex.
5293# If you have `file' or equivalent on your system and you're not sure
5294# whether `pass_all' will *always* work, you probably want this one.
5295
5296case $host_os in
5297aix[[4-9]]*)
5298  lt_cv_deplibs_check_method=pass_all
5299  ;;
5300
5301beos*)
5302  lt_cv_deplibs_check_method=pass_all
5303  ;;
5304
5305bsdi[[45]]*)
5306  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
5307  lt_cv_file_magic_cmd='/usr/bin/file -L'
5308  lt_cv_file_magic_test_file=/shlib/libc.so
5309  ;;
5310
5311cygwin*)
5312  # func_win32_libid is a shell function defined in ltmain.sh
5313  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5314  lt_cv_file_magic_cmd='func_win32_libid'
5315  ;;
5316
5317mingw* | pw32*)
5318  # Base MSYS/MinGW do not provide the 'file' command needed by
5319  # func_win32_libid shell function, so use a weaker test based on 'objdump',
5320  # unless we find 'file', for example because we are cross-compiling.
5321  if ( file / ) >/dev/null 2>&1; then
5322    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5323    lt_cv_file_magic_cmd='func_win32_libid'
5324  else
5325    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
5326    lt_cv_file_magic_cmd='$OBJDUMP -f'
5327  fi
5328  ;;
5329
5330cegcc)
5331  # use the weaker test based on 'objdump'. See mingw*.
5332  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
5333  lt_cv_file_magic_cmd='$OBJDUMP -f'
5334  ;;
5335
5336darwin* | rhapsody*)
5337  lt_cv_deplibs_check_method=pass_all
5338  ;;
5339
5340freebsd* | dragonfly*)
5341  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5342    case $host_cpu in
5343    i*86 )
5344      # Not sure whether the presence of OpenBSD here was a mistake.
5345      # Let's accept both of them until this is cleared up.
5346      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
5347      lt_cv_file_magic_cmd=/usr/bin/file
5348      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5349      ;;
5350    esac
5351  else
5352    lt_cv_deplibs_check_method=pass_all
5353  fi
5354  ;;
5355
5356gnu*)
5357  lt_cv_deplibs_check_method=pass_all
5358  ;;
5359
5360hpux10.20* | hpux11*)
5361  lt_cv_file_magic_cmd=/usr/bin/file
5362  case $host_cpu in
5363  ia64*)
5364    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
5365    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5366    ;;
5367  hppa*64*)
5368    [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]']
5369    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5370    ;;
5371  *)
5372    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
5373    lt_cv_file_magic_test_file=/usr/lib/libc.sl
5374    ;;
5375  esac
5376  ;;
5377
5378interix[[3-9]]*)
5379  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
5380  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
5381  ;;
5382
5383irix5* | irix6* | nonstopux*)
5384  case $LD in
5385  *-32|*"-32 ") libmagic=32-bit;;
5386  *-n32|*"-n32 ") libmagic=N32;;
5387  *-64|*"-64 ") libmagic=64-bit;;
5388  *) libmagic=never-match;;
5389  esac
5390  lt_cv_deplibs_check_method=pass_all
5391  ;;
5392
5393# This must be Linux ELF.
5394linux* | k*bsd*-gnu)
5395  lt_cv_deplibs_check_method=pass_all
5396  ;;
5397
5398netbsd*)
5399  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5400    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5401  else
5402    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
5403  fi
5404  ;;
5405
5406newos6*)
5407  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
5408  lt_cv_file_magic_cmd=/usr/bin/file
5409  lt_cv_file_magic_test_file=/usr/lib/libnls.so
5410  ;;
5411
5412*nto* | *qnx*)
5413  lt_cv_deplibs_check_method=pass_all
5414  ;;
5415
5416openbsd*)
5417  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5418    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
5419  else
5420    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5421  fi
5422  ;;
5423
5424osf3* | osf4* | osf5*)
5425  lt_cv_deplibs_check_method=pass_all
5426  ;;
5427
5428rdos*)
5429  lt_cv_deplibs_check_method=pass_all
5430  ;;
5431
5432solaris*)
5433  lt_cv_deplibs_check_method=pass_all
5434  ;;
5435
5436sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
5437  lt_cv_deplibs_check_method=pass_all
5438  ;;
5439
5440sysv4 | sysv4.3*)
5441  case $host_vendor in
5442  motorola)
5443    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]]'
5444    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5445    ;;
5446  ncr)
5447    lt_cv_deplibs_check_method=pass_all
5448    ;;
5449  sequent)
5450    lt_cv_file_magic_cmd='/bin/file'
5451    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
5452    ;;
5453  sni)
5454    lt_cv_file_magic_cmd='/bin/file'
5455    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
5456    lt_cv_file_magic_test_file=/lib/libc.so
5457    ;;
5458  siemens)
5459    lt_cv_deplibs_check_method=pass_all
5460    ;;
5461  pc)
5462    lt_cv_deplibs_check_method=pass_all
5463    ;;
5464  esac
5465  ;;
5466
5467tpf*)
5468  lt_cv_deplibs_check_method=pass_all
5469  ;;
5470esac
5471])
5472file_magic_cmd=$lt_cv_file_magic_cmd
5473deplibs_check_method=$lt_cv_deplibs_check_method
5474test -z "$deplibs_check_method" && deplibs_check_method=unknown
5475
5476_LT_DECL([], [deplibs_check_method], [1],
5477    [Method to check whether dependent libraries are shared objects])
5478_LT_DECL([], [file_magic_cmd], [1],
5479    [Command to use when deplibs_check_method == "file_magic"])
5480])# _LT_CHECK_MAGIC_METHOD
5481
5482
5483# LT_PATH_NM
5484# ----------
5485# find the pathname to a BSD- or MS-compatible name lister
5486AC_DEFUN([LT_PATH_NM],
5487[AC_REQUIRE([AC_PROG_CC])dnl
5488AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
5489[if test -n "$NM"; then
5490  # Let the user override the test.
5491  lt_cv_path_NM="$NM"
5492else
5493  lt_nm_to_check="${ac_tool_prefix}nm"
5494  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
5495    lt_nm_to_check="$lt_nm_to_check nm"
5496  fi
5497  for lt_tmp_nm in $lt_nm_to_check; do
5498    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5499    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
5500      IFS="$lt_save_ifs"
5501      test -z "$ac_dir" && ac_dir=.
5502      tmp_nm="$ac_dir/$lt_tmp_nm"
5503      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
5504	# Check to see if the nm accepts a BSD-compat flag.
5505	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
5506	#   nm: unknown option "B" ignored
5507	# Tru64's nm complains that /dev/null is an invalid object file
5508	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
5509	*/dev/null* | *'Invalid file or object type'*)
5510	  lt_cv_path_NM="$tmp_nm -B"
5511	  break
5512	  ;;
5513	*)
5514	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5515	  */dev/null*)
5516	    lt_cv_path_NM="$tmp_nm -p"
5517	    break
5518	    ;;
5519	  *)
5520	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5521	    continue # so that we can try to find one that supports BSD flags
5522	    ;;
5523	  esac
5524	  ;;
5525	esac
5526      fi
5527    done
5528    IFS="$lt_save_ifs"
5529  done
5530  : ${lt_cv_path_NM=no}
5531fi])
5532if test "$lt_cv_path_NM" != "no"; then
5533  NM="$lt_cv_path_NM"
5534else
5535  # Didn't find any BSD compatible name lister, look for dumpbin.
5536  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
5537  AC_SUBST([DUMPBIN])
5538  if test "$DUMPBIN" != ":"; then
5539    NM="$DUMPBIN"
5540  fi
5541fi
5542test -z "$NM" && NM=nm
5543AC_SUBST([NM])
5544_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
5545
5546AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
5547  [lt_cv_nm_interface="BSD nm"
5548  echo "int some_variable = 0;" > conftest.$ac_ext
5549  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
5550  (eval "$ac_compile" 2>conftest.err)
5551  cat conftest.err >&AS_MESSAGE_LOG_FD
5552  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
5553  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
5554  cat conftest.err >&AS_MESSAGE_LOG_FD
5555  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
5556  cat conftest.out >&AS_MESSAGE_LOG_FD
5557  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
5558    lt_cv_nm_interface="MS dumpbin"
5559  fi
5560  rm -f conftest*])
5561])# LT_PATH_NM
5562
5563# Old names:
5564AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
5565AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
5566dnl aclocal-1.4 backwards compatibility:
5567dnl AC_DEFUN([AM_PROG_NM], [])
5568dnl AC_DEFUN([AC_PROG_NM], [])
5569
5570
5571# LT_LIB_M
5572# --------
5573# check for math library
5574AC_DEFUN([LT_LIB_M],
5575[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5576LIBM=
5577case $host in
5578*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
5579  # These system don't have libm, or don't need it
5580  ;;
5581*-ncr-sysv4.3*)
5582  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
5583  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
5584  ;;
5585*)
5586  AC_CHECK_LIB(m, cos, LIBM="-lm")
5587  ;;
5588esac
5589AC_SUBST([LIBM])
5590])# LT_LIB_M
5591
5592# Old name:
5593AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
5594dnl aclocal-1.4 backwards compatibility:
5595dnl AC_DEFUN([AC_CHECK_LIBM], [])
5596
5597
5598# _LT_COMPILER_NO_RTTI([TAGNAME])
5599# -------------------------------
5600m4_defun([_LT_COMPILER_NO_RTTI],
5601[m4_require([_LT_TAG_COMPILER])dnl
5602
5603_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5604
5605if test "$GCC" = yes; then
5606  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5607
5608  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5609    lt_cv_prog_compiler_rtti_exceptions,
5610    [-fno-rtti -fno-exceptions], [],
5611    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5612fi
5613_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
5614	[Compiler flag to turn off builtin functions])
5615])# _LT_COMPILER_NO_RTTI
5616
5617
5618# _LT_CMD_GLOBAL_SYMBOLS
5619# ----------------------
5620m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
5621[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5622AC_REQUIRE([AC_PROG_CC])dnl
5623AC_REQUIRE([LT_PATH_NM])dnl
5624AC_REQUIRE([LT_PATH_LD])dnl
5625m4_require([_LT_DECL_SED])dnl
5626m4_require([_LT_DECL_EGREP])dnl
5627m4_require([_LT_TAG_COMPILER])dnl
5628
5629# Check for command to grab the raw symbol name followed by C symbol from nm.
5630AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5631AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5632[
5633# These are sane defaults that work on at least a few old systems.
5634# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
5635
5636# Character class describing NM global symbol codes.
5637symcode='[[BCDEGRST]]'
5638
5639# Regexp to match symbols that can be accessed directly from C.
5640sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5641
5642# Define system-specific variables.
5643case $host_os in
5644aix*)
5645  symcode='[[BCDT]]'
5646  ;;
5647cygwin* | mingw* | pw32* | cegcc*)
5648  symcode='[[ABCDGISTW]]'
5649  ;;
5650hpux*)
5651  if test "$host_cpu" = ia64; then
5652    symcode='[[ABCDEGRST]]'
5653  fi
5654  ;;
5655irix* | nonstopux*)
5656  symcode='[[BCDEGRST]]'
5657  ;;
5658osf*)
5659  symcode='[[BCDEGQRST]]'
5660  ;;
5661solaris*)
5662  symcode='[[BDRT]]'
5663  ;;
5664sco3.2v5*)
5665  symcode='[[DT]]'
5666  ;;
5667sysv4.2uw2*)
5668  symcode='[[DT]]'
5669  ;;
5670sysv5* | sco5v6* | unixware* | OpenUNIX*)
5671  symcode='[[ABDT]]'
5672  ;;
5673sysv4)
5674  symcode='[[DFNSTU]]'
5675  ;;
5676esac
5677
5678# If we're using GNU nm, then use its standard symbol codes.
5679case `$NM -V 2>&1` in
5680*GNU* | *'with BFD'*)
5681  symcode='[[ABCDGIRSTW]]' ;;
5682esac
5683
5684# Transform an extracted symbol line into a proper C declaration.
5685# Some systems (esp. on ia64) link data and code symbols differently,
5686# so use this general approach.
5687lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5688
5689# Transform an extracted symbol line into symbol name and symbol address
5690lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
5691lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
5692
5693# Handle CRLF in mingw tool chain
5694opt_cr=
5695case $build_os in
5696mingw*)
5697  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5698  ;;
5699esac
5700
5701# Try without a prefix underscore, then with it.
5702for ac_symprfx in "" "_"; do
5703
5704  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5705  symxfrm="\\1 $ac_symprfx\\2 \\2"
5706
5707  # Write the raw and C identifiers.
5708  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5709    # Fake it for dumpbin and say T for any non-static function
5710    # and D for any global variable.
5711    # Also find C++ and __fastcall symbols from MSVC++,
5712    # which start with @ or ?.
5713    lt_cv_sys_global_symbol_pipe="$AWK ['"\
5714"     {last_section=section; section=\$ 3};"\
5715"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
5716"     \$ 0!~/External *\|/{next};"\
5717"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
5718"     {if(hide[section]) next};"\
5719"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
5720"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
5721"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
5722"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
5723"     ' prfx=^$ac_symprfx]"
5724  else
5725    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5726  fi
5727
5728  # Check to see that the pipe works correctly.
5729  pipe_works=no
5730
5731  rm -f conftest*
5732  cat > conftest.$ac_ext <<_LT_EOF
5733#ifdef __cplusplus
5734extern "C" {
5735#endif
5736char nm_test_var;
5737void nm_test_func(void);
5738void nm_test_func(void){}
5739#ifdef __cplusplus
5740}
5741#endif
5742int main(){nm_test_var='a';nm_test_func();return(0);}
5743_LT_EOF
5744
5745  if AC_TRY_EVAL(ac_compile); then
5746    # Now try to grab the symbols.
5747    nlist=conftest.nm
5748    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5749      # Try sorting and uniquifying the output.
5750      if sort "$nlist" | uniq > "$nlist"T; then
5751	mv -f "$nlist"T "$nlist"
5752      else
5753	rm -f "$nlist"T
5754      fi
5755
5756      # Make sure that we snagged all the symbols we need.
5757      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5758	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5759	  cat <<_LT_EOF > conftest.$ac_ext
5760#ifdef __cplusplus
5761extern "C" {
5762#endif
5763
5764_LT_EOF
5765	  # Now generate the symbol file.
5766	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5767
5768	  cat <<_LT_EOF >> conftest.$ac_ext
5769
5770/* The mapping between symbol names and symbols.  */
5771const struct {
5772  const char *name;
5773  void       *address;
5774}
5775lt__PROGRAM__LTX_preloaded_symbols[[]] =
5776{
5777  { "@PROGRAM@", (void *) 0 },
5778_LT_EOF
5779	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
5780	  cat <<\_LT_EOF >> conftest.$ac_ext
5781  {0, (void *) 0}
5782};
5783
5784/* This works around a problem in FreeBSD linker */
5785#ifdef FREEBSD_WORKAROUND
5786static const void *lt_preloaded_setup() {
5787  return lt__PROGRAM__LTX_preloaded_symbols;
5788}
5789#endif
5790
5791#ifdef __cplusplus
5792}
5793#endif
5794_LT_EOF
5795	  # Now try linking the two files.
5796	  mv conftest.$ac_objext conftstm.$ac_objext
5797	  lt_save_LIBS="$LIBS"
5798	  lt_save_CFLAGS="$CFLAGS"
5799	  LIBS="conftstm.$ac_objext"
5800	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5801	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5802	    pipe_works=yes
5803	  fi
5804	  LIBS="$lt_save_LIBS"
5805	  CFLAGS="$lt_save_CFLAGS"
5806	else
5807	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5808	fi
5809      else
5810	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5811      fi
5812    else
5813      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5814    fi
5815  else
5816    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5817    cat conftest.$ac_ext >&5
5818  fi
5819  rm -rf conftest* conftst*
5820
5821  # Do not use the global_symbol_pipe unless it works.
5822  if test "$pipe_works" = yes; then
5823    break
5824  else
5825    lt_cv_sys_global_symbol_pipe=
5826  fi
5827done
5828])
5829if test -z "$lt_cv_sys_global_symbol_pipe"; then
5830  lt_cv_sys_global_symbol_to_cdecl=
5831fi
5832if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5833  AC_MSG_RESULT(failed)
5834else
5835  AC_MSG_RESULT(ok)
5836fi
5837
5838_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
5839    [Take the output of nm and produce a listing of raw symbols and C names])
5840_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
5841    [Transform the output of nm in a proper C declaration])
5842_LT_DECL([global_symbol_to_c_name_address],
5843    [lt_cv_sys_global_symbol_to_c_name_address], [1],
5844    [Transform the output of nm in a C name address pair])
5845_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
5846    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
5847    [Transform the output of nm in a C name address pair when lib prefix is needed])
5848]) # _LT_CMD_GLOBAL_SYMBOLS
5849
5850
5851# _LT_COMPILER_PIC([TAGNAME])
5852# ---------------------------
5853m4_defun([_LT_COMPILER_PIC],
5854[m4_require([_LT_TAG_COMPILER])dnl
5855_LT_TAGVAR(lt_prog_compiler_wl, $1)=
5856_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5857_LT_TAGVAR(lt_prog_compiler_static, $1)=
5858
5859AC_MSG_CHECKING([for $compiler option to produce PIC])
5860m4_if([$1], [CXX], [
5861  # C++ specific cases for pic, static, wl, etc.
5862  if test "$GXX" = yes; then
5863    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5864    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5865
5866    case $host_os in
5867    aix*)
5868      # All AIX code is PIC.
5869      if test "$host_cpu" = ia64; then
5870	# AIX 5 now supports IA64 processor
5871	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5872      fi
5873      ;;
5874
5875    amigaos*)
5876      case $host_cpu in
5877      powerpc)
5878            # see comment about AmigaOS4 .so support
5879            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5880        ;;
5881      m68k)
5882            # FIXME: we need at least 68020 code to build shared libraries, but
5883            # adding the `-m68020' flag to GCC prevents building anything better,
5884            # like `-m68040'.
5885            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5886        ;;
5887      esac
5888      ;;
5889
5890    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5891      # PIC is the default for these OSes.
5892      ;;
5893    mingw* | cygwin* | os2* | pw32* | cegcc*)
5894      # This hack is so that the source file can tell whether it is being
5895      # built for inclusion in a dll (and should export symbols for example).
5896      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5897      # (--disable-auto-import) libraries
5898      m4_if([$1], [GCJ], [],
5899	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5900      ;;
5901    darwin* | rhapsody*)
5902      # PIC is the default on this platform
5903      # Common symbols not allowed in MH_DYLIB files
5904      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5905      ;;
5906    *djgpp*)
5907      # DJGPP does not support shared libraries at all
5908      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5909      ;;
5910    interix[[3-9]]*)
5911      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5912      # Instead, we relocate shared libraries at runtime.
5913      ;;
5914    sysv4*MP*)
5915      if test -d /usr/nec; then
5916	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5917      fi
5918      ;;
5919    hpux*)
5920      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5921      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5922      # sets the default TLS model and affects inlining.
5923      case $host_cpu in
5924      hppa*64*)
5925	;;
5926      *)
5927	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5928	;;
5929      esac
5930      ;;
5931    *qnx* | *nto*)
5932      # QNX uses GNU C++, but need to define -shared option too, otherwise
5933      # it will coredump.
5934      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5935      ;;
5936    *)
5937      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5938      ;;
5939    esac
5940  else
5941    case $host_os in
5942      aix[[4-9]]*)
5943	# All AIX code is PIC.
5944	if test "$host_cpu" = ia64; then
5945	  # AIX 5 now supports IA64 processor
5946	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5947	else
5948	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5949	fi
5950	;;
5951      chorus*)
5952	case $cc_basename in
5953	cxch68*)
5954	  # Green Hills C++ Compiler
5955	  # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
5956	  ;;
5957	esac
5958	;;
5959      dgux*)
5960	case $cc_basename in
5961	  ec++*)
5962	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5963	    ;;
5964	  ghcx*)
5965	    # Green Hills C++ Compiler
5966	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5967	    ;;
5968	  *)
5969	    ;;
5970	esac
5971	;;
5972      freebsd* | dragonfly*)
5973	# FreeBSD uses GNU C++
5974	;;
5975      hpux9* | hpux10* | hpux11*)
5976	case $cc_basename in
5977	  CC*)
5978	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5979	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5980	    if test "$host_cpu" != ia64; then
5981	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5982	    fi
5983	    ;;
5984	  aCC*)
5985	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5986	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5987	    case $host_cpu in
5988	    hppa*64*|ia64*)
5989	      # +Z the default
5990	      ;;
5991	    *)
5992	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5993	      ;;
5994	    esac
5995	    ;;
5996	  *)
5997	    ;;
5998	esac
5999	;;
6000      interix*)
6001	# This is c89, which is MS Visual C++ (no shared libs)
6002	# Anyone wants to do a port?
6003	;;
6004      irix5* | irix6* | nonstopux*)
6005	case $cc_basename in
6006	  CC*)
6007	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6008	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6009	    # CC pic flag -KPIC is the default.
6010	    ;;
6011	  *)
6012	    ;;
6013	esac
6014	;;
6015      linux* | k*bsd*-gnu)
6016	case $cc_basename in
6017	  KCC*)
6018	    # KAI C++ Compiler
6019	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6020	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6021	    ;;
6022	  ecpc* )
6023	    # old Intel C++ for x86_64 which still supported -KPIC.
6024	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6025	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6026	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6027	    ;;
6028	  icpc* )
6029	    # Intel C++, used to be incompatible with GCC.
6030	    # ICC 10 doesn't accept -KPIC any more.
6031	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6032	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6033	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6034	    ;;
6035	  pgCC* | pgcpp*)
6036	    # Portland Group C++ compiler
6037	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6038	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6039	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6040	    ;;
6041	  cxx*)
6042	    # Compaq C++
6043	    # Make sure the PIC flag is empty.  It appears that all Alpha
6044	    # Linux and Compaq Tru64 Unix objects are PIC.
6045	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6046	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6047	    ;;
6048	  xlc* | xlC*)
6049	    # IBM XL 8.0 on PPC
6050	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6051	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
6052	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
6053	    ;;
6054	  *)
6055	    case `$CC -V 2>&1 | sed 5q` in
6056	    *Sun\ C*)
6057	      # Sun C++ 5.9
6058	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6059	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6060	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6061	      ;;
6062	    esac
6063	    ;;
6064	esac
6065	;;
6066      lynxos*)
6067	;;
6068      m88k*)
6069	;;
6070      mvs*)
6071	case $cc_basename in
6072	  cxx*)
6073	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6074	    ;;
6075	  *)
6076	    ;;
6077	esac
6078	;;
6079      netbsd*)
6080	;;
6081      *qnx* | *nto*)
6082        # QNX uses GNU C++, but need to define -shared option too, otherwise
6083        # it will coredump.
6084        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6085        ;;
6086      osf3* | osf4* | osf5*)
6087	case $cc_basename in
6088	  KCC*)
6089	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6090	    ;;
6091	  RCC*)
6092	    # Rational C++ 2.4.1
6093	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6094	    ;;
6095	  cxx*)
6096	    # Digital/Compaq C++
6097	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6098	    # Make sure the PIC flag is empty.  It appears that all Alpha
6099	    # Linux and Compaq Tru64 Unix objects are PIC.
6100	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6101	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6102	    ;;
6103	  *)
6104	    ;;
6105	esac
6106	;;
6107      psos*)
6108	;;
6109      solaris*)
6110	case $cc_basename in
6111	  CC*)
6112	    # Sun C++ 4.2, 5.x and Centerline C++
6113	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6114	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6115	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6116	    ;;
6117	  gcx*)
6118	    # Green Hills C++ Compiler
6119	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6120	    ;;
6121	  *)
6122	    ;;
6123	esac
6124	;;
6125      sunos4*)
6126	case $cc_basename in
6127	  CC*)
6128	    # Sun C++ 4.x
6129	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6130	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6131	    ;;
6132	  lcc*)
6133	    # Lucid
6134	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6135	    ;;
6136	  *)
6137	    ;;
6138	esac
6139	;;
6140      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6141	case $cc_basename in
6142	  CC*)
6143	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6144	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6145	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6146	    ;;
6147	esac
6148	;;
6149      tandem*)
6150	case $cc_basename in
6151	  NCC*)
6152	    # NonStop-UX NCC 3.20
6153	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6154	    ;;
6155	  *)
6156	    ;;
6157	esac
6158	;;
6159      vxworks*)
6160	;;
6161      *)
6162	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6163	;;
6164    esac
6165  fi
6166],
6167[
6168  if test "$GCC" = yes; then
6169    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6170    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6171
6172    case $host_os in
6173      aix*)
6174      # All AIX code is PIC.
6175      if test "$host_cpu" = ia64; then
6176	# AIX 5 now supports IA64 processor
6177	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6178      fi
6179      ;;
6180
6181    amigaos*)
6182      case $host_cpu in
6183      powerpc)
6184            # see comment about AmigaOS4 .so support
6185            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6186        ;;
6187      m68k)
6188            # FIXME: we need at least 68020 code to build shared libraries, but
6189            # adding the `-m68020' flag to GCC prevents building anything better,
6190            # like `-m68040'.
6191            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6192        ;;
6193      esac
6194      ;;
6195
6196    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6197      # PIC is the default for these OSes.
6198      ;;
6199
6200    mingw* | cygwin* | pw32* | os2* | cegcc*)
6201      # This hack is so that the source file can tell whether it is being
6202      # built for inclusion in a dll (and should export symbols for example).
6203      # Although the cygwin gcc ignores -fPIC, still need this for old-style
6204      # (--disable-auto-import) libraries
6205      m4_if([$1], [GCJ], [],
6206	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6207      ;;
6208
6209    darwin* | rhapsody*)
6210      # PIC is the default on this platform
6211      # Common symbols not allowed in MH_DYLIB files
6212      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6213      ;;
6214
6215    hpux*)
6216      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
6217      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
6218      # sets the default TLS model and affects inlining.
6219      case $host_cpu in
6220      hppa*64*)
6221	# +Z the default
6222	;;
6223      *)
6224	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6225	;;
6226      esac
6227      ;;
6228
6229    interix[[3-9]]*)
6230      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6231      # Instead, we relocate shared libraries at runtime.
6232      ;;
6233
6234    msdosdjgpp*)
6235      # Just because we use GCC doesn't mean we suddenly get shared libraries
6236      # on systems that don't support them.
6237      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6238      enable_shared=no
6239      ;;
6240
6241    *nto* | *qnx*)
6242      # QNX uses GNU C++, but need to define -shared option too, otherwise
6243      # it will coredump.
6244      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6245      ;;
6246
6247    sysv4*MP*)
6248      if test -d /usr/nec; then
6249	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6250      fi
6251      ;;
6252
6253    *)
6254      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6255      ;;
6256    esac
6257  else
6258    # PORTME Check for flag to pass linker flags through the system compiler.
6259    case $host_os in
6260    aix*)
6261      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6262      if test "$host_cpu" = ia64; then
6263	# AIX 5 now supports IA64 processor
6264	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6265      else
6266	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6267      fi
6268      ;;
6269
6270    mingw* | cygwin* | pw32* | os2* | cegcc*)
6271      # This hack is so that the source file can tell whether it is being
6272      # built for inclusion in a dll (and should export symbols for example).
6273      m4_if([$1], [GCJ], [],
6274	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6275      ;;
6276
6277    hpux9* | hpux10* | hpux11*)
6278      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6279      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6280      # not for PA HP-UX.
6281      case $host_cpu in
6282      hppa*64*|ia64*)
6283	# +Z the default
6284	;;
6285      *)
6286	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6287	;;
6288      esac
6289      # Is there a better lt_prog_compiler_static that works with the bundled CC?
6290      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6291      ;;
6292
6293    irix5* | irix6* | nonstopux*)
6294      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6295      # PIC (with -KPIC) is the default.
6296      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6297      ;;
6298
6299    linux* | k*bsd*-gnu)
6300      case $cc_basename in
6301      # old Intel for x86_64 which still supported -KPIC.
6302      ecc*)
6303	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6304	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6305	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6306        ;;
6307      # icc used to be incompatible with GCC.
6308      # ICC 10 doesn't accept -KPIC any more.
6309      icc* | ifort*)
6310	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6311	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6312	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6313        ;;
6314      # Lahey Fortran 8.1.
6315      lf95*)
6316	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6317	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
6318	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
6319	;;
6320      pgcc* | pgf77* | pgf90* | pgf95*)
6321        # Portland Group compilers (*not* the Pentium gcc compiler,
6322	# which looks to be a dead project)
6323	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6324	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6325	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6326        ;;
6327      ccc*)
6328        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6329        # All Alpha code is PIC.
6330        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6331        ;;
6332      xl*)
6333	# IBM XL C 8.0/Fortran 10.1 on PPC
6334	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6335	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
6336	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
6337	;;
6338      *)
6339	case `$CC -V 2>&1 | sed 5q` in
6340	*Sun\ C*)
6341	  # Sun C 5.9
6342	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6343	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6344	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6345	  ;;
6346	*Sun\ F*)
6347	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
6348	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6349	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6350	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
6351	  ;;
6352	esac
6353	;;
6354      esac
6355      ;;
6356
6357    newsos6)
6358      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6359      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6360      ;;
6361
6362    *nto* | *qnx*)
6363      # QNX uses GNU C++, but need to define -shared option too, otherwise
6364      # it will coredump.
6365      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6366      ;;
6367
6368    osf3* | osf4* | osf5*)
6369      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6370      # All OSF/1 code is PIC.
6371      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6372      ;;
6373
6374    rdos*)
6375      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6376      ;;
6377
6378    solaris*)
6379      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6380      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6381      case $cc_basename in
6382      f77* | f90* | f95*)
6383	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6384      *)
6385	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6386      esac
6387      ;;
6388
6389    sunos4*)
6390      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6391      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6392      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6393      ;;
6394
6395    sysv4 | sysv4.2uw2* | sysv4.3*)
6396      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6397      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6398      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6399      ;;
6400
6401    sysv4*MP*)
6402      if test -d /usr/nec ;then
6403	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6404	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6405      fi
6406      ;;
6407
6408    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6409      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6410      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6411      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6412      ;;
6413
6414    unicos*)
6415      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6416      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6417      ;;
6418
6419    uts4*)
6420      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6421      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6422      ;;
6423
6424    *)
6425      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6426      ;;
6427    esac
6428  fi
6429])
6430case $host_os in
6431  # For platforms which do not support PIC, -DPIC is meaningless:
6432  *djgpp*)
6433    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6434    ;;
6435  *)
6436    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
6437    ;;
6438esac
6439AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
6440_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
6441	[How to pass a linker flag through the compiler])
6442
6443#
6444# Check to make sure the PIC flag actually works.
6445#
6446if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
6447  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
6448    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
6449    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
6450    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
6451     "" | " "*) ;;
6452     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6453     esac],
6454    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
6455     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6456fi
6457_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
6458	[Additional compiler flags for building library objects])
6459
6460#
6461# Check to make sure the static flag actually works.
6462#
6463wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
6464_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
6465  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
6466  $lt_tmp_static_flag,
6467  [],
6468  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
6469_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
6470	[Compiler flag to prevent dynamic linking])
6471])# _LT_COMPILER_PIC
6472
6473
6474# _LT_LINKER_SHLIBS([TAGNAME])
6475# ----------------------------
6476# See if the linker supports building shared libraries.
6477m4_defun([_LT_LINKER_SHLIBS],
6478[AC_REQUIRE([LT_PATH_LD])dnl
6479AC_REQUIRE([LT_PATH_NM])dnl
6480m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6481m4_require([_LT_DECL_EGREP])dnl
6482m4_require([_LT_DECL_SED])dnl
6483m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
6484m4_require([_LT_TAG_COMPILER])dnl
6485AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6486m4_if([$1], [CXX], [
6487  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6488  case $host_os in
6489  aix[[4-9]]*)
6490    # If we're using GNU nm, then we don't want the "-C" option.
6491    # -C means demangle to AIX nm, but means don't demangle with GNU nm
6492    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6493      _LT_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'
6494    else
6495      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
6496    fi
6497    ;;
6498  pw32*)
6499    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6500  ;;
6501  cygwin* | mingw* | cegcc*)
6502    _LT_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'
6503  ;;
6504  *)
6505    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6506  ;;
6507  esac
6508  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6509], [
6510  runpath_var=
6511  _LT_TAGVAR(allow_undefined_flag, $1)=
6512  _LT_TAGVAR(always_export_symbols, $1)=no
6513  _LT_TAGVAR(archive_cmds, $1)=
6514  _LT_TAGVAR(archive_expsym_cmds, $1)=
6515  _LT_TAGVAR(compiler_needs_object, $1)=no
6516  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6517  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6518  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6519  _LT_TAGVAR(hardcode_automatic, $1)=no
6520  _LT_TAGVAR(hardcode_direct, $1)=no
6521  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6522  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6523  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6524  _LT_TAGVAR(hardcode_libdir_separator, $1)=
6525  _LT_TAGVAR(hardcode_minus_L, $1)=no
6526  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6527  _LT_TAGVAR(inherit_rpath, $1)=no
6528  _LT_TAGVAR(link_all_deplibs, $1)=unknown
6529  _LT_TAGVAR(module_cmds, $1)=
6530  _LT_TAGVAR(module_expsym_cmds, $1)=
6531  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
6532  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6533  _LT_TAGVAR(thread_safe_flag_spec, $1)=
6534  _LT_TAGVAR(whole_archive_flag_spec, $1)=
6535  # include_expsyms should be a list of space-separated symbols to be *always*
6536  # included in the symbol list
6537  _LT_TAGVAR(include_expsyms, $1)=
6538  # exclude_expsyms can be an extended regexp of symbols to exclude
6539  # it will be wrapped by ` (' and `)$', so one must not match beginning or
6540  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6541  # as well as any symbol that contains `d'.
6542  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6543  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6544  # platforms (ab)use it in PIC code, but their linkers get confused if
6545  # the symbol is explicitly referenced.  Since portable code cannot
6546  # rely on this symbol name, it's probably fine to never include it in
6547  # preloaded symbol tables.
6548  # Exclude shared library initialization/finalization symbols.
6549dnl Note also adjust exclude_expsyms for C++ above.
6550  extract_expsyms_cmds=
6551
6552  case $host_os in
6553  cygwin* | mingw* | pw32* | cegcc*)
6554    # FIXME: the MSVC++ port hasn't been tested in a loooong time
6555    # When not using gcc, we currently assume that we are using
6556    # Microsoft Visual C++.
6557    if test "$GCC" != yes; then
6558      with_gnu_ld=no
6559    fi
6560    ;;
6561  interix*)
6562    # we just hope/assume this is gcc and not c89 (= MSVC++)
6563    with_gnu_ld=yes
6564    ;;
6565  openbsd*)
6566    with_gnu_ld=no
6567    ;;
6568  esac
6569
6570  _LT_TAGVAR(ld_shlibs, $1)=yes
6571  if test "$with_gnu_ld" = yes; then
6572    # If archive_cmds runs LD, not CC, wlarc should be empty
6573    wlarc='${wl}'
6574
6575    # Set some defaults for GNU ld with shared library support. These
6576    # are reset later if shared libraries are not supported. Putting them
6577    # here allows them to be overridden if necessary.
6578    runpath_var=LD_RUN_PATH
6579    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6580    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6581    # ancient GNU ld didn't support --whole-archive et. al.
6582    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
6583      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6584    else
6585      _LT_TAGVAR(whole_archive_flag_spec, $1)=
6586    fi
6587    supports_anon_versioning=no
6588    case `$LD -v 2>&1` in
6589      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6590      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6591      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6592      *\ 2.11.*) ;; # other 2.11 versions
6593      *) supports_anon_versioning=yes ;;
6594    esac
6595
6596    # See if GNU ld supports shared libraries.
6597    case $host_os in
6598    aix[[3-9]]*)
6599      # On AIX/PPC, the GNU linker is very broken
6600      if test "$host_cpu" != ia64; then
6601	_LT_TAGVAR(ld_shlibs, $1)=no
6602	cat <<_LT_EOF 1>&2
6603
6604*** Warning: the GNU linker, at least up to release 2.9.1, is reported
6605*** to be unable to reliably create shared libraries on AIX.
6606*** Therefore, libtool is disabling shared libraries support.  If you
6607*** really care for shared libraries, you may want to modify your PATH
6608*** so that a non-GNU linker is found, and then restart.
6609
6610_LT_EOF
6611      fi
6612      ;;
6613
6614    amigaos*)
6615      case $host_cpu in
6616      powerpc)
6617            # see comment about AmigaOS4 .so support
6618            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6619            _LT_TAGVAR(archive_expsym_cmds, $1)=''
6620        ;;
6621      m68k)
6622            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6623            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6624            _LT_TAGVAR(hardcode_minus_L, $1)=yes
6625        ;;
6626      esac
6627      ;;
6628
6629    beos*)
6630      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6631	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6632	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6633	# support --undefined.  This deserves some investigation.  FIXME
6634	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6635      else
6636	_LT_TAGVAR(ld_shlibs, $1)=no
6637      fi
6638      ;;
6639
6640    cygwin* | mingw* | pw32* | cegcc*)
6641      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6642      # as there is no search path for DLLs.
6643      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6644      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6645      _LT_TAGVAR(always_export_symbols, $1)=no
6646      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6647      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
6648
6649      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6650        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6651	# If the export-symbols file already is a .def file (1st line
6652	# is EXPORTS), use it as is; otherwise, prepend...
6653	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6654	  cp $export_symbols $output_objdir/$soname.def;
6655	else
6656	  echo EXPORTS > $output_objdir/$soname.def;
6657	  cat $export_symbols >> $output_objdir/$soname.def;
6658	fi~
6659	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6660      else
6661	_LT_TAGVAR(ld_shlibs, $1)=no
6662      fi
6663      ;;
6664
6665    interix[[3-9]]*)
6666      _LT_TAGVAR(hardcode_direct, $1)=no
6667      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6668      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6669      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6670      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6671      # Instead, shared libraries are loaded at an image base (0x10000000 by
6672      # default) and relocated if they conflict, which is a slow very memory
6673      # consuming and fragmenting process.  To avoid this, we pick a random,
6674      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6675      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6676      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6677      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
6678      ;;
6679
6680    gnu* | linux* | tpf* | k*bsd*-gnu)
6681      tmp_diet=no
6682      if test "$host_os" = linux-dietlibc; then
6683	case $cc_basename in
6684	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
6685	esac
6686      fi
6687      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
6688	 && test "$tmp_diet" = no
6689      then
6690	tmp_addflag=
6691	tmp_sharedflag='-shared'
6692	case $cc_basename,$host_cpu in
6693        pgcc*)				# Portland Group C compiler
6694	  _LT_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'
6695	  tmp_addflag=' $pic_flag'
6696	  ;;
6697	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
6698	  _LT_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'
6699	  tmp_addflag=' $pic_flag -Mnomain' ;;
6700	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
6701	  tmp_addflag=' -i_dynamic' ;;
6702	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
6703	  tmp_addflag=' -i_dynamic -nofor_main' ;;
6704	ifc* | ifort*)			# Intel Fortran compiler
6705	  tmp_addflag=' -nofor_main' ;;
6706	lf95*)				# Lahey Fortran 8.1
6707	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
6708	  tmp_sharedflag='--shared' ;;
6709	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
6710	  tmp_sharedflag='-qmkshrobj'
6711	  tmp_addflag= ;;
6712	esac
6713	case `$CC -V 2>&1 | sed 5q` in
6714	*Sun\ C*)			# Sun C 5.9
6715	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
6716	  _LT_TAGVAR(compiler_needs_object, $1)=yes
6717	  tmp_sharedflag='-G' ;;
6718	*Sun\ F*)			# Sun Fortran 8.3
6719	  tmp_sharedflag='-G' ;;
6720	esac
6721	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6722
6723        if test "x$supports_anon_versioning" = xyes; then
6724          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6725	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6726	    echo "local: *; };" >> $output_objdir/$libname.ver~
6727	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6728        fi
6729
6730	case $cc_basename in
6731	xlf*)
6732	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
6733	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
6734	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6735	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6736	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
6737	  if test "x$supports_anon_versioning" = xyes; then
6738	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6739	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6740	      echo "local: *; };" >> $output_objdir/$libname.ver~
6741	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
6742	  fi
6743	  ;;
6744	esac
6745      else
6746        _LT_TAGVAR(ld_shlibs, $1)=no
6747      fi
6748      ;;
6749
6750    netbsd*)
6751      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6752	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6753	wlarc=
6754      else
6755	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6756	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6757      fi
6758      ;;
6759
6760    solaris*)
6761      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
6762	_LT_TAGVAR(ld_shlibs, $1)=no
6763	cat <<_LT_EOF 1>&2
6764
6765*** Warning: The releases 2.8.* of the GNU linker cannot reliably
6766*** create shared libraries on Solaris systems.  Therefore, libtool
6767*** is disabling shared libraries support.  We urge you to upgrade GNU
6768*** binutils to release 2.9.1 or newer.  Another option is to modify
6769*** your PATH or compiler configuration so that the native linker is
6770*** used, and then restart.
6771
6772_LT_EOF
6773      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6774	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6775	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6776      else
6777	_LT_TAGVAR(ld_shlibs, $1)=no
6778      fi
6779      ;;
6780
6781    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6782      case `$LD -v 2>&1` in
6783        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6784	_LT_TAGVAR(ld_shlibs, $1)=no
6785	cat <<_LT_EOF 1>&2
6786
6787*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6788*** reliably create shared libraries on SCO systems.  Therefore, libtool
6789*** is disabling shared libraries support.  We urge you to upgrade GNU
6790*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
6791*** your PATH or compiler configuration so that the native linker is
6792*** used, and then restart.
6793
6794_LT_EOF
6795	;;
6796	*)
6797	  # For security reasons, it is highly recommended that you always
6798	  # use absolute paths for naming shared libraries, and exclude the
6799	  # DT_RUNPATH tag from executables and libraries.  But doing so
6800	  # requires that you compile everything twice, which is a pain.
6801	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6802	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6803	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6804	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6805	  else
6806	    _LT_TAGVAR(ld_shlibs, $1)=no
6807	  fi
6808	;;
6809      esac
6810      ;;
6811
6812    sunos4*)
6813      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6814      wlarc=
6815      _LT_TAGVAR(hardcode_direct, $1)=yes
6816      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6817      ;;
6818
6819    *)
6820      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6821	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6822	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6823      else
6824	_LT_TAGVAR(ld_shlibs, $1)=no
6825      fi
6826      ;;
6827    esac
6828
6829    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
6830      runpath_var=
6831      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6832      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6833      _LT_TAGVAR(whole_archive_flag_spec, $1)=
6834    fi
6835  else
6836    # PORTME fill in a description of your system's linker (not GNU ld)
6837    case $host_os in
6838    aix3*)
6839      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6840      _LT_TAGVAR(always_export_symbols, $1)=yes
6841      _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
6842      # Note: this linker hardcodes the directories in LIBPATH if there
6843      # are no directories specified by -L.
6844      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6845      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6846	# Neither direct hardcoding nor static linking is supported with a
6847	# broken collect2.
6848	_LT_TAGVAR(hardcode_direct, $1)=unsupported
6849      fi
6850      ;;
6851
6852    aix[[4-9]]*)
6853      if test "$host_cpu" = ia64; then
6854	# On IA64, the linker does run time linking by default, so we don't
6855	# have to do anything special.
6856	aix_use_runtimelinking=no
6857	exp_sym_flag='-Bexport'
6858	no_entry_flag=""
6859      else
6860	# If we're using GNU nm, then we don't want the "-C" option.
6861	# -C means demangle to AIX nm, but means don't demangle with GNU nm
6862	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6863	  _LT_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'
6864	else
6865	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
6866	fi
6867	aix_use_runtimelinking=no
6868
6869	# Test if we are trying to use run time linking or normal
6870	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
6871	# need to do runtime linking.
6872	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6873	  for ld_flag in $LDFLAGS; do
6874	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6875	    aix_use_runtimelinking=yes
6876	    break
6877	  fi
6878	  done
6879	  ;;
6880	esac
6881
6882	exp_sym_flag='-bexport'
6883	no_entry_flag='-bnoentry'
6884      fi
6885
6886      # When large executables or shared objects are built, AIX ld can
6887      # have problems creating the table of contents.  If linking a library
6888      # or program results in "error TOC overflow" add -mminimal-toc to
6889      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6890      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6891
6892      _LT_TAGVAR(archive_cmds, $1)=''
6893      _LT_TAGVAR(hardcode_direct, $1)=yes
6894      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6895      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6896      _LT_TAGVAR(link_all_deplibs, $1)=yes
6897      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6898
6899      if test "$GCC" = yes; then
6900	case $host_os in aix4.[[012]]|aix4.[[012]].*)
6901	# We only want to do this on AIX 4.2 and lower, the check
6902	# below for broken collect2 doesn't work under 4.3+
6903	  collect2name=`${CC} -print-prog-name=collect2`
6904	  if test -f "$collect2name" &&
6905	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6906	  then
6907	  # We have reworked collect2
6908	  :
6909	  else
6910	  # We have old collect2
6911	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
6912	  # It fails to find uninstalled libraries when the uninstalled
6913	  # path is not listed in the libpath.  Setting hardcode_minus_L
6914	  # to unsupported forces relinking
6915	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
6916	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6917	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
6918	  fi
6919	  ;;
6920	esac
6921	shared_flag='-shared'
6922	if test "$aix_use_runtimelinking" = yes; then
6923	  shared_flag="$shared_flag "'${wl}-G'
6924	fi
6925      else
6926	# not using gcc
6927	if test "$host_cpu" = ia64; then
6928	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6929	# chokes on -Wl,-G. The following line is correct:
6930	  shared_flag='-G'
6931	else
6932	  if test "$aix_use_runtimelinking" = yes; then
6933	    shared_flag='${wl}-G'
6934	  else
6935	    shared_flag='${wl}-bM:SRE'
6936	  fi
6937	fi
6938      fi
6939
6940      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6941      # It seems that -bexpall does not export symbols beginning with
6942      # underscore (_), so it is better to generate a list of symbols to export.
6943      _LT_TAGVAR(always_export_symbols, $1)=yes
6944      if test "$aix_use_runtimelinking" = yes; then
6945	# Warning - without using the other runtime loading flags (-brtl),
6946	# -berok will link without error, but may produce a broken library.
6947	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6948        # Determine the default libpath from the value encoded in an
6949        # empty executable.
6950        _LT_SYS_MODULE_PATH_AIX
6951        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6952        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6953      else
6954	if test "$host_cpu" = ia64; then
6955	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6956	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6957	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
6958	else
6959	 # Determine the default libpath from the value encoded in an
6960	 # empty executable.
6961	 _LT_SYS_MODULE_PATH_AIX
6962	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6963	  # Warning - without using the other run time loading flags,
6964	  # -berok will link without error, but may produce a broken library.
6965	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6966	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6967	  # Exported symbols can be pulled into shared objects from archives
6968	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6969	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6970	  # This is similar to how AIX traditionally builds its shared libraries.
6971	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
6972	fi
6973      fi
6974      ;;
6975
6976    amigaos*)
6977      case $host_cpu in
6978      powerpc)
6979            # see comment about AmigaOS4 .so support
6980            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6981            _LT_TAGVAR(archive_expsym_cmds, $1)=''
6982        ;;
6983      m68k)
6984            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
6985            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6986            _LT_TAGVAR(hardcode_minus_L, $1)=yes
6987        ;;
6988      esac
6989      ;;
6990
6991    bsdi[[45]]*)
6992      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6993      ;;
6994
6995    cygwin* | mingw* | pw32* | cegcc*)
6996      # When not using gcc, we currently assume that we are using
6997      # Microsoft Visual C++.
6998      # hardcode_libdir_flag_spec is actually meaningless, as there is
6999      # no search path for DLLs.
7000      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7001      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7002      # Tell ltmain to make .lib files, not .a files.
7003      libext=lib
7004      # Tell ltmain to make .dll files, not .so files.
7005      shrext_cmds=".dll"
7006      # FIXME: Setting linknames here is a bad hack.
7007      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
7008      # The linker will automatically build a .lib file if we build a DLL.
7009      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7010      # FIXME: Should let the user specify the lib program.
7011      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
7012      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
7013      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7014      ;;
7015
7016    darwin* | rhapsody*)
7017      _LT_DARWIN_LINKER_FEATURES($1)
7018      ;;
7019
7020    dgux*)
7021      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7022      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7023      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7024      ;;
7025
7026    freebsd1*)
7027      _LT_TAGVAR(ld_shlibs, $1)=no
7028      ;;
7029
7030    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
7031    # support.  Future versions do this automatically, but an explicit c++rt0.o
7032    # does not break anything, and helps significantly (at the cost of a little
7033    # extra space).
7034    freebsd2.2*)
7035      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
7036      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7037      _LT_TAGVAR(hardcode_direct, $1)=yes
7038      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7039      ;;
7040
7041    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
7042    freebsd2*)
7043      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7044      _LT_TAGVAR(hardcode_direct, $1)=yes
7045      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7046      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7047      ;;
7048
7049    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
7050    freebsd* | dragonfly*)
7051      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
7052      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7053      _LT_TAGVAR(hardcode_direct, $1)=yes
7054      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7055      ;;
7056
7057    hpux9*)
7058      if test "$GCC" = yes; then
7059	_LT_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'
7060      else
7061	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7062      fi
7063      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7064      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7065      _LT_TAGVAR(hardcode_direct, $1)=yes
7066
7067      # hardcode_minus_L: Not really in the search PATH,
7068      # but as the default location of the library.
7069      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7070      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7071      ;;
7072
7073    hpux10*)
7074      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
7075	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7076      else
7077	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
7078      fi
7079      if test "$with_gnu_ld" = no; then
7080	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7081	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
7082	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7083	_LT_TAGVAR(hardcode_direct, $1)=yes
7084	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7085	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7086	# hardcode_minus_L: Not really in the search PATH,
7087	# but as the default location of the library.
7088	_LT_TAGVAR(hardcode_minus_L, $1)=yes
7089      fi
7090      ;;
7091
7092    hpux11*)
7093      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
7094	case $host_cpu in
7095	hppa*64*)
7096	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7097	  ;;
7098	ia64*)
7099	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7100	  ;;
7101	*)
7102	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7103	  ;;
7104	esac
7105      else
7106	case $host_cpu in
7107	hppa*64*)
7108	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7109	  ;;
7110	ia64*)
7111	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7112	  ;;
7113	*)
7114	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7115	  ;;
7116	esac
7117      fi
7118      if test "$with_gnu_ld" = no; then
7119	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7120	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7121
7122	case $host_cpu in
7123	hppa*64*|ia64*)
7124	  _LT_TAGVAR(hardcode_direct, $1)=no
7125	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7126	  ;;
7127	*)
7128	  _LT_TAGVAR(hardcode_direct, $1)=yes
7129	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7130	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7131
7132	  # hardcode_minus_L: Not really in the search PATH,
7133	  # but as the default location of the library.
7134	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
7135	  ;;
7136	esac
7137      fi
7138      ;;
7139
7140    irix5* | irix6* | nonstopux*)
7141      if test "$GCC" = yes; then
7142	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7143	# Try to use the -exported_symbol ld option, if it does not
7144	# work, assume that -exports_file does not work either and
7145	# implicitly export all symbols.
7146        save_LDFLAGS="$LDFLAGS"
7147        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
7148        AC_LINK_IFELSE(int foo(void) {},
7149          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
7150        )
7151        LDFLAGS="$save_LDFLAGS"
7152      else
7153	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
7154	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
7155      fi
7156      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7157      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7158      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7159      _LT_TAGVAR(inherit_rpath, $1)=yes
7160      _LT_TAGVAR(link_all_deplibs, $1)=yes
7161      ;;
7162
7163    netbsd*)
7164      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7165	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
7166      else
7167	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
7168      fi
7169      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7170      _LT_TAGVAR(hardcode_direct, $1)=yes
7171      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7172      ;;
7173
7174    newsos6)
7175      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7176      _LT_TAGVAR(hardcode_direct, $1)=yes
7177      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7178      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7179      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7180      ;;
7181
7182    *nto* | *qnx*)
7183      ;;
7184
7185    openbsd*)
7186      if test -f /usr/libexec/ld.so; then
7187	_LT_TAGVAR(hardcode_direct, $1)=yes
7188	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7189	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7190	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7191	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7192	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
7193	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7194	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7195	else
7196	  case $host_os in
7197	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
7198	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7199	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7200	     ;;
7201	   *)
7202	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7203	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7204	     ;;
7205	  esac
7206	fi
7207      else
7208	_LT_TAGVAR(ld_shlibs, $1)=no
7209      fi
7210      ;;
7211
7212    os2*)
7213      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7214      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7215      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7216      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
7217      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
7218      ;;
7219
7220    osf3*)
7221      if test "$GCC" = yes; then
7222	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7223	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7224      else
7225	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7226	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
7227      fi
7228      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7229      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7230      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7231      ;;
7232
7233    osf4* | osf5*)	# as osf3* with the addition of -msym flag
7234      if test "$GCC" = yes; then
7235	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7236	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7237	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7238      else
7239	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7240	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
7241	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
7242	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
7243
7244	# Both c and cxx compiler support -rpath directly
7245	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7246      fi
7247      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7248      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7249      ;;
7250
7251    solaris*)
7252      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
7253      if test "$GCC" = yes; then
7254	wlarc='${wl}'
7255	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7256	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7257	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
7258      else
7259	case `$CC -V 2>&1` in
7260	*"Compilers 5.0"*)
7261	  wlarc=''
7262	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7263	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7264	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
7265	  ;;
7266	*)
7267	  wlarc='${wl}'
7268	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
7269	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7270	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
7271	  ;;
7272	esac
7273      fi
7274      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7275      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7276      case $host_os in
7277      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7278      *)
7279	# The compiler driver will combine and reorder linker options,
7280	# but understands `-z linker_flag'.  GCC discards it without `$wl',
7281	# but is careful enough not to reorder.
7282	# Supported since Solaris 2.6 (maybe 2.5.1?)
7283	if test "$GCC" = yes; then
7284	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7285	else
7286	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7287	fi
7288	;;
7289      esac
7290      _LT_TAGVAR(link_all_deplibs, $1)=yes
7291      ;;
7292
7293    sunos4*)
7294      if test "x$host_vendor" = xsequent; then
7295	# Use $CC to link under sequent, because it throws in some extra .o
7296	# files that make .init and .fini sections work.
7297	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7298      else
7299	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7300      fi
7301      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7302      _LT_TAGVAR(hardcode_direct, $1)=yes
7303      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7304      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7305      ;;
7306
7307    sysv4)
7308      case $host_vendor in
7309	sni)
7310	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7311	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7312	;;
7313	siemens)
7314	  ## LD is ld it makes a PLAMLIB
7315	  ## CC just makes a GrossModule.
7316	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7317	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7318	  _LT_TAGVAR(hardcode_direct, $1)=no
7319        ;;
7320	motorola)
7321	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7322	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7323	;;
7324      esac
7325      runpath_var='LD_RUN_PATH'
7326      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7327      ;;
7328
7329    sysv4.3*)
7330      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7331      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7332      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7333      ;;
7334
7335    sysv4*MP*)
7336      if test -d /usr/nec; then
7337	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7338	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7339	runpath_var=LD_RUN_PATH
7340	hardcode_runpath_var=yes
7341	_LT_TAGVAR(ld_shlibs, $1)=yes
7342      fi
7343      ;;
7344
7345    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7346      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7347      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7348      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7349      runpath_var='LD_RUN_PATH'
7350
7351      if test "$GCC" = yes; then
7352	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7353	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7354      else
7355	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7356	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7357      fi
7358      ;;
7359
7360    sysv5* | sco3.2v5* | sco5v6*)
7361      # Note: We can NOT use -z defs as we might desire, because we do not
7362      # link with -lc, and that would cause any symbols used from libc to
7363      # always be unresolved, which means just about no library would
7364      # ever link correctly.  If we're not using GNU ld we use -z text
7365      # though, which does catch some bad symbols but isn't as heavy-handed
7366      # as -z defs.
7367      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7368      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7369      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7370      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7371      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7372      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7373      _LT_TAGVAR(link_all_deplibs, $1)=yes
7374      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7375      runpath_var='LD_RUN_PATH'
7376
7377      if test "$GCC" = yes; then
7378	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7379	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7380      else
7381	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7382	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7383      fi
7384      ;;
7385
7386    uts4*)
7387      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7388      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7389      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7390      ;;
7391
7392    *)
7393      _LT_TAGVAR(ld_shlibs, $1)=no
7394      ;;
7395    esac
7396
7397    if test x$host_vendor = xsni; then
7398      case $host in
7399      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7400	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
7401	;;
7402      esac
7403    fi
7404  fi
7405])
7406AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7407test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7408
7409_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
7410
7411_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
7412_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
7413_LT_DECL([], [extract_expsyms_cmds], [2],
7414    [The commands to extract the exported symbol list from a shared archive])
7415
7416#
7417# Do we need to explicitly link libc?
7418#
7419case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
7420x|xyes)
7421  # Assume -lc should be added
7422  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7423
7424  if test "$enable_shared" = yes && test "$GCC" = yes; then
7425    case $_LT_TAGVAR(archive_cmds, $1) in
7426    *'~'*)
7427      # FIXME: we may have to deal with multi-command sequences.
7428      ;;
7429    '$CC '*)
7430      # Test whether the compiler implicitly links with -lc since on some
7431      # systems, -lgcc has to come before -lc. If gcc already passes -lc
7432      # to ld, don't add -lc before -lgcc.
7433      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
7434      $RM conftest*
7435      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7436
7437      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7438        soname=conftest
7439        lib=conftest
7440        libobjs=conftest.$ac_objext
7441        deplibs=
7442        wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
7443	pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
7444        compiler_flags=-v
7445        linker_flags=-v
7446        verstring=
7447        output_objdir=.
7448        libname=conftest
7449        lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
7450        _LT_TAGVAR(allow_undefined_flag, $1)=
7451        if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
7452        then
7453	  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7454        else
7455	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7456        fi
7457        _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7458      else
7459        cat conftest.err 1>&5
7460      fi
7461      $RM conftest*
7462      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
7463      ;;
7464    esac
7465  fi
7466  ;;
7467esac
7468
7469_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
7470    [Whether or not to add -lc for building shared libraries])
7471_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
7472    [enable_shared_with_static_runtimes], [0],
7473    [Whether or not to disallow shared libs when runtime libs are static])
7474_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
7475    [Compiler flag to allow reflexive dlopens])
7476_LT_TAGDECL([], [whole_archive_flag_spec], [1],
7477    [Compiler flag to generate shared objects directly from archives])
7478_LT_TAGDECL([], [compiler_needs_object], [1],
7479    [Whether the compiler copes with passing no objects directly])
7480_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
7481    [Create an old-style archive from a shared archive])
7482_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
7483    [Create a temporary old-style archive to link instead of a shared archive])
7484_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
7485_LT_TAGDECL([], [archive_expsym_cmds], [2])
7486_LT_TAGDECL([], [module_cmds], [2],
7487    [Commands used to build a loadable module if different from building
7488    a shared archive.])
7489_LT_TAGDECL([], [module_expsym_cmds], [2])
7490_LT_TAGDECL([], [with_gnu_ld], [1],
7491    [Whether we are building with GNU ld or not])
7492_LT_TAGDECL([], [allow_undefined_flag], [1],
7493    [Flag that allows shared libraries with undefined symbols to be built])
7494_LT_TAGDECL([], [no_undefined_flag], [1],
7495    [Flag that enforces no undefined symbols])
7496_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
7497    [Flag to hardcode $libdir into a binary during linking.
7498    This must work even if $libdir does not exist])
7499_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
7500    [[If ld is used when linking, flag to hardcode $libdir into a binary
7501    during linking.  This must work even if $libdir does not exist]])
7502_LT_TAGDECL([], [hardcode_libdir_separator], [1],
7503    [Whether we need a single "-rpath" flag with a separated argument])
7504_LT_TAGDECL([], [hardcode_direct], [0],
7505    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7506    DIR into the resulting binary])
7507_LT_TAGDECL([], [hardcode_direct_absolute], [0],
7508    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7509    DIR into the resulting binary and the resulting library dependency is
7510    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
7511    library is relocated])
7512_LT_TAGDECL([], [hardcode_minus_L], [0],
7513    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
7514    into the resulting binary])
7515_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
7516    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
7517    into the resulting binary])
7518_LT_TAGDECL([], [hardcode_automatic], [0],
7519    [Set to "yes" if building a shared library automatically hardcodes DIR
7520    into the library and all subsequent libraries and executables linked
7521    against it])
7522_LT_TAGDECL([], [inherit_rpath], [0],
7523    [Set to yes if linker adds runtime paths of dependent libraries
7524    to runtime path list])
7525_LT_TAGDECL([], [link_all_deplibs], [0],
7526    [Whether libtool must link a program against all its dependency libraries])
7527_LT_TAGDECL([], [fix_srcfile_path], [1],
7528    [Fix the shell variable $srcfile for the compiler])
7529_LT_TAGDECL([], [always_export_symbols], [0],
7530    [Set to "yes" if exported symbols are required])
7531_LT_TAGDECL([], [export_symbols_cmds], [2],
7532    [The commands to list exported symbols])
7533_LT_TAGDECL([], [exclude_expsyms], [1],
7534    [Symbols that should not be listed in the preloaded symbols])
7535_LT_TAGDECL([], [include_expsyms], [1],
7536    [Symbols that must always be exported])
7537_LT_TAGDECL([], [prelink_cmds], [2],
7538    [Commands necessary for linking programs (against libraries) with templates])
7539_LT_TAGDECL([], [file_list_spec], [1],
7540    [Specify filename containing input files])
7541dnl FIXME: Not yet implemented
7542dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
7543dnl    [Compiler flag to generate thread safe objects])
7544])# _LT_LINKER_SHLIBS
7545
7546
7547# _LT_LANG_C_CONFIG([TAG])
7548# ------------------------
7549# Ensure that the configuration variables for a C compiler are suitably
7550# defined.  These variables are subsequently used by _LT_CONFIG to write
7551# the compiler configuration to `libtool'.
7552m4_defun([_LT_LANG_C_CONFIG],
7553[m4_require([_LT_DECL_EGREP])dnl
7554lt_save_CC="$CC"
7555AC_LANG_PUSH(C)
7556
7557# Source file extension for C test sources.
7558ac_ext=c
7559
7560# Object file extension for compiled C test sources.
7561objext=o
7562_LT_TAGVAR(objext, $1)=$objext
7563
7564# Code to be used in simple compile tests
7565lt_simple_compile_test_code="int some_variable = 0;"
7566
7567# Code to be used in simple link tests
7568lt_simple_link_test_code='int main(){return(0);}'
7569
7570_LT_TAG_COMPILER
7571# Save the default compiler, since it gets overwritten when the other
7572# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
7573compiler_DEFAULT=$CC
7574
7575# save warnings/boilerplate of simple test code
7576_LT_COMPILER_BOILERPLATE
7577_LT_LINKER_BOILERPLATE
7578
7579if test -n "$compiler"; then
7580  _LT_COMPILER_NO_RTTI($1)
7581  _LT_COMPILER_PIC($1)
7582  _LT_COMPILER_C_O($1)
7583  _LT_COMPILER_FILE_LOCKS($1)
7584  _LT_LINKER_SHLIBS($1)
7585  _LT_SYS_DYNAMIC_LINKER($1)
7586  _LT_LINKER_HARDCODE_LIBPATH($1)
7587  LT_SYS_DLOPEN_SELF
7588  _LT_CMD_STRIPLIB
7589
7590  # Report which library types will actually be built
7591  AC_MSG_CHECKING([if libtool supports shared libraries])
7592  AC_MSG_RESULT([$can_build_shared])
7593
7594  AC_MSG_CHECKING([whether to build shared libraries])
7595  test "$can_build_shared" = "no" && enable_shared=no
7596
7597  # On AIX, shared libraries and static libraries use the same namespace, and
7598  # are all built from PIC.
7599  case $host_os in
7600  aix3*)
7601    test "$enable_shared" = yes && enable_static=no
7602    if test -n "$RANLIB"; then
7603      archive_cmds="$archive_cmds~\$RANLIB \$lib"
7604      postinstall_cmds='$RANLIB $lib'
7605    fi
7606    ;;
7607
7608  aix[[4-9]]*)
7609    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7610      test "$enable_shared" = yes && enable_static=no
7611    fi
7612    ;;
7613  esac
7614  AC_MSG_RESULT([$enable_shared])
7615
7616  AC_MSG_CHECKING([whether to build static libraries])
7617  # Make sure either enable_shared or enable_static is yes.
7618  test "$enable_shared" = yes || enable_static=yes
7619  AC_MSG_RESULT([$enable_static])
7620
7621  _LT_CONFIG($1)
7622fi
7623AC_LANG_POP
7624CC="$lt_save_CC"
7625])# _LT_LANG_C_CONFIG
7626
7627
7628# _LT_PROG_CXX
7629# ------------
7630# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
7631# compiler, we have our own version here.
7632m4_defun([_LT_PROG_CXX],
7633[
7634pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
7635AC_PROG_CXX
7636if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
7637    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
7638    (test "X$CXX" != "Xg++"))) ; then
7639  AC_PROG_CXXCPP
7640else
7641  _lt_caught_CXX_error=yes
7642fi
7643popdef([AC_MSG_ERROR])
7644])# _LT_PROG_CXX
7645
7646dnl aclocal-1.4 backwards compatibility:
7647dnl AC_DEFUN([_LT_PROG_CXX], [])
7648
7649
7650# _LT_LANG_CXX_CONFIG([TAG])
7651# --------------------------
7652# Ensure that the configuration variables for a C++ compiler are suitably
7653# defined.  These variables are subsequently used by _LT_CONFIG to write
7654# the compiler configuration to `libtool'.
7655m4_defun([_LT_LANG_CXX_CONFIG],
7656[AC_REQUIRE([_LT_PROG_CXX])dnl
7657m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7658m4_require([_LT_DECL_EGREP])dnl
7659
7660AC_LANG_PUSH(C++)
7661_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7662_LT_TAGVAR(allow_undefined_flag, $1)=
7663_LT_TAGVAR(always_export_symbols, $1)=no
7664_LT_TAGVAR(archive_expsym_cmds, $1)=
7665_LT_TAGVAR(compiler_needs_object, $1)=no
7666_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7667_LT_TAGVAR(hardcode_direct, $1)=no
7668_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7669_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7670_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7671_LT_TAGVAR(hardcode_libdir_separator, $1)=
7672_LT_TAGVAR(hardcode_minus_L, $1)=no
7673_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7674_LT_TAGVAR(hardcode_automatic, $1)=no
7675_LT_TAGVAR(inherit_rpath, $1)=no
7676_LT_TAGVAR(module_cmds, $1)=
7677_LT_TAGVAR(module_expsym_cmds, $1)=
7678_LT_TAGVAR(link_all_deplibs, $1)=unknown
7679_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7680_LT_TAGVAR(no_undefined_flag, $1)=
7681_LT_TAGVAR(whole_archive_flag_spec, $1)=
7682_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7683
7684# Source file extension for C++ test sources.
7685ac_ext=cpp
7686
7687# Object file extension for compiled C++ test sources.
7688objext=o
7689_LT_TAGVAR(objext, $1)=$objext
7690
7691# No sense in running all these tests if we already determined that
7692# the CXX compiler isn't working.  Some variables (like enable_shared)
7693# are currently assumed to apply to all compilers on this platform,
7694# and will be corrupted by setting them based on a non-working compiler.
7695if test "$_lt_caught_CXX_error" != yes; then
7696  # Code to be used in simple compile tests
7697  lt_simple_compile_test_code="int some_variable = 0;"
7698
7699  # Code to be used in simple link tests
7700  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
7701
7702  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7703  _LT_TAG_COMPILER
7704
7705  # save warnings/boilerplate of simple test code
7706  _LT_COMPILER_BOILERPLATE
7707  _LT_LINKER_BOILERPLATE
7708
7709  # Allow CC to be a program name with arguments.
7710  lt_save_CC=$CC
7711  lt_save_LD=$LD
7712  lt_save_GCC=$GCC
7713  GCC=$GXX
7714  lt_save_with_gnu_ld=$with_gnu_ld
7715  lt_save_path_LD=$lt_cv_path_LD
7716  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
7717    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
7718  else
7719    $as_unset lt_cv_prog_gnu_ld
7720  fi
7721  if test -n "${lt_cv_path_LDCXX+set}"; then
7722    lt_cv_path_LD=$lt_cv_path_LDCXX
7723  else
7724    $as_unset lt_cv_path_LD
7725  fi
7726  test -z "${LDCXX+set}" || LD=$LDCXX
7727  CC=${CXX-"c++"}
7728  compiler=$CC
7729  _LT_TAGVAR(compiler, $1)=$CC
7730  _LT_CC_BASENAME([$compiler])
7731
7732  if test -n "$compiler"; then
7733    # We don't want -fno-exception when compiling C++ code, so set the
7734    # no_builtin_flag separately
7735    if test "$GXX" = yes; then
7736      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7737    else
7738      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7739    fi
7740
7741    if test "$GXX" = yes; then
7742      # Set up default GNU C++ configuration
7743
7744      LT_PATH_LD
7745
7746      # Check if GNU C++ uses GNU ld as the underlying linker, since the
7747      # archiving commands below assume that GNU ld is being used.
7748      if test "$with_gnu_ld" = yes; then
7749        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7750        _LT_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'
7751
7752        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7753        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7754
7755        # If archive_cmds runs LD, not CC, wlarc should be empty
7756        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7757        #     investigate it a little bit more. (MM)
7758        wlarc='${wl}'
7759
7760        # ancient GNU ld didn't support --whole-archive et. al.
7761        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
7762	  $GREP 'no-whole-archive' > /dev/null; then
7763          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7764        else
7765          _LT_TAGVAR(whole_archive_flag_spec, $1)=
7766        fi
7767      else
7768        with_gnu_ld=no
7769        wlarc=
7770
7771        # A generic and very simple default shared library creation
7772        # command for GNU C++ for the case where it uses the native
7773        # linker, instead of GNU ld.  If possible, this setting should
7774        # overridden to take advantage of the native linker features on
7775        # the platform it is being used on.
7776        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7777      fi
7778
7779      # Commands to make compiler produce verbose output that lists
7780      # what "hidden" libraries, object files and flags are used when
7781      # linking a shared library.
7782      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
7783
7784    else
7785      GXX=no
7786      with_gnu_ld=no
7787      wlarc=
7788    fi
7789
7790    # PORTME: fill in a description of your system's C++ link characteristics
7791    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7792    _LT_TAGVAR(ld_shlibs, $1)=yes
7793    case $host_os in
7794      aix3*)
7795        # FIXME: insert proper C++ library support
7796        _LT_TAGVAR(ld_shlibs, $1)=no
7797        ;;
7798      aix[[4-9]]*)
7799        if test "$host_cpu" = ia64; then
7800          # On IA64, the linker does run time linking by default, so we don't
7801          # have to do anything special.
7802          aix_use_runtimelinking=no
7803          exp_sym_flag='-Bexport'
7804          no_entry_flag=""
7805        else
7806          aix_use_runtimelinking=no
7807
7808          # Test if we are trying to use run time linking or normal
7809          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7810          # need to do runtime linking.
7811          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7812	    for ld_flag in $LDFLAGS; do
7813	      case $ld_flag in
7814	      *-brtl*)
7815	        aix_use_runtimelinking=yes
7816	        break
7817	        ;;
7818	      esac
7819	    done
7820	    ;;
7821          esac
7822
7823          exp_sym_flag='-bexport'
7824          no_entry_flag='-bnoentry'
7825        fi
7826
7827        # When large executables or shared objects are built, AIX ld can
7828        # have problems creating the table of contents.  If linking a library
7829        # or program results in "error TOC overflow" add -mminimal-toc to
7830        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7831        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7832
7833        _LT_TAGVAR(archive_cmds, $1)=''
7834        _LT_TAGVAR(hardcode_direct, $1)=yes
7835        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7836        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7837        _LT_TAGVAR(link_all_deplibs, $1)=yes
7838        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7839
7840        if test "$GXX" = yes; then
7841          case $host_os in aix4.[[012]]|aix4.[[012]].*)
7842          # We only want to do this on AIX 4.2 and lower, the check
7843          # below for broken collect2 doesn't work under 4.3+
7844	  collect2name=`${CC} -print-prog-name=collect2`
7845	  if test -f "$collect2name" &&
7846	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7847	  then
7848	    # We have reworked collect2
7849	    :
7850	  else
7851	    # We have old collect2
7852	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
7853	    # It fails to find uninstalled libraries when the uninstalled
7854	    # path is not listed in the libpath.  Setting hardcode_minus_L
7855	    # to unsupported forces relinking
7856	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
7857	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7858	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
7859	  fi
7860          esac
7861          shared_flag='-shared'
7862	  if test "$aix_use_runtimelinking" = yes; then
7863	    shared_flag="$shared_flag "'${wl}-G'
7864	  fi
7865        else
7866          # not using gcc
7867          if test "$host_cpu" = ia64; then
7868	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7869	  # chokes on -Wl,-G. The following line is correct:
7870	  shared_flag='-G'
7871          else
7872	    if test "$aix_use_runtimelinking" = yes; then
7873	      shared_flag='${wl}-G'
7874	    else
7875	      shared_flag='${wl}-bM:SRE'
7876	    fi
7877          fi
7878        fi
7879
7880        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7881        # It seems that -bexpall does not export symbols beginning with
7882        # underscore (_), so it is better to generate a list of symbols to
7883	# export.
7884        _LT_TAGVAR(always_export_symbols, $1)=yes
7885        if test "$aix_use_runtimelinking" = yes; then
7886          # Warning - without using the other runtime loading flags (-brtl),
7887          # -berok will link without error, but may produce a broken library.
7888          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7889          # Determine the default libpath from the value encoded in an empty
7890          # executable.
7891          _LT_SYS_MODULE_PATH_AIX
7892          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7893
7894          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
7895        else
7896          if test "$host_cpu" = ia64; then
7897	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7898	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7899	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
7900          else
7901	    # Determine the default libpath from the value encoded in an
7902	    # empty executable.
7903	    _LT_SYS_MODULE_PATH_AIX
7904	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7905	    # Warning - without using the other run time loading flags,
7906	    # -berok will link without error, but may produce a broken library.
7907	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7908	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7909	    # Exported symbols can be pulled into shared objects from archives
7910	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7911	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7912	    # This is similar to how AIX traditionally builds its shared
7913	    # libraries.
7914	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
7915          fi
7916        fi
7917        ;;
7918
7919      beos*)
7920	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7921	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7922	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7923	  # support --undefined.  This deserves some investigation.  FIXME
7924	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7925	else
7926	  _LT_TAGVAR(ld_shlibs, $1)=no
7927	fi
7928	;;
7929
7930      chorus*)
7931        case $cc_basename in
7932          *)
7933	  # FIXME: insert proper C++ library support
7934	  _LT_TAGVAR(ld_shlibs, $1)=no
7935	  ;;
7936        esac
7937        ;;
7938
7939      cygwin* | mingw* | pw32* | cegcc*)
7940        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7941        # as there is no search path for DLLs.
7942        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7943        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7944        _LT_TAGVAR(always_export_symbols, $1)=no
7945        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7946
7947        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7948          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7949          # If the export-symbols file already is a .def file (1st line
7950          # is EXPORTS), use it as is; otherwise, prepend...
7951          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7952	    cp $export_symbols $output_objdir/$soname.def;
7953          else
7954	    echo EXPORTS > $output_objdir/$soname.def;
7955	    cat $export_symbols >> $output_objdir/$soname.def;
7956          fi~
7957          $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'
7958        else
7959          _LT_TAGVAR(ld_shlibs, $1)=no
7960        fi
7961        ;;
7962      darwin* | rhapsody*)
7963        _LT_DARWIN_LINKER_FEATURES($1)
7964	;;
7965
7966      dgux*)
7967        case $cc_basename in
7968          ec++*)
7969	    # FIXME: insert proper C++ library support
7970	    _LT_TAGVAR(ld_shlibs, $1)=no
7971	    ;;
7972          ghcx*)
7973	    # Green Hills C++ Compiler
7974	    # FIXME: insert proper C++ library support
7975	    _LT_TAGVAR(ld_shlibs, $1)=no
7976	    ;;
7977          *)
7978	    # FIXME: insert proper C++ library support
7979	    _LT_TAGVAR(ld_shlibs, $1)=no
7980	    ;;
7981        esac
7982        ;;
7983
7984      freebsd[[12]]*)
7985        # C++ shared libraries reported to be fairly broken before
7986	# switch to ELF
7987        _LT_TAGVAR(ld_shlibs, $1)=no
7988        ;;
7989
7990      freebsd-elf*)
7991        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7992        ;;
7993
7994      freebsd* | dragonfly*)
7995        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7996        # conventions
7997        _LT_TAGVAR(ld_shlibs, $1)=yes
7998        ;;
7999
8000      gnu*)
8001        ;;
8002
8003      hpux9*)
8004        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8005        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8006        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8007        _LT_TAGVAR(hardcode_direct, $1)=yes
8008        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8009				             # but as the default
8010				             # location of the library.
8011
8012        case $cc_basename in
8013          CC*)
8014            # FIXME: insert proper C++ library support
8015            _LT_TAGVAR(ld_shlibs, $1)=no
8016            ;;
8017          aCC*)
8018            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8019            # Commands to make compiler produce verbose output that lists
8020            # what "hidden" libraries, object files and flags are used when
8021            # linking a shared library.
8022            #
8023            # There doesn't appear to be a way to prevent this compiler from
8024            # explicitly linking system object files so we need to strip them
8025            # from the output so that they don't get included in the library
8026            # dependencies.
8027            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
8028            ;;
8029          *)
8030            if test "$GXX" = yes; then
8031              _LT_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'
8032            else
8033              # FIXME: insert proper C++ library support
8034              _LT_TAGVAR(ld_shlibs, $1)=no
8035            fi
8036            ;;
8037        esac
8038        ;;
8039
8040      hpux10*|hpux11*)
8041        if test $with_gnu_ld = no; then
8042	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8043	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8044
8045          case $host_cpu in
8046            hppa*64*|ia64*)
8047              ;;
8048            *)
8049	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8050              ;;
8051          esac
8052        fi
8053        case $host_cpu in
8054          hppa*64*|ia64*)
8055            _LT_TAGVAR(hardcode_direct, $1)=no
8056            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8057            ;;
8058          *)
8059            _LT_TAGVAR(hardcode_direct, $1)=yes
8060            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8061            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8062					         # but as the default
8063					         # location of the library.
8064            ;;
8065        esac
8066
8067        case $cc_basename in
8068          CC*)
8069	    # FIXME: insert proper C++ library support
8070	    _LT_TAGVAR(ld_shlibs, $1)=no
8071	    ;;
8072          aCC*)
8073	    case $host_cpu in
8074	      hppa*64*)
8075	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8076	        ;;
8077	      ia64*)
8078	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8079	        ;;
8080	      *)
8081	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8082	        ;;
8083	    esac
8084	    # Commands to make compiler produce verbose output that lists
8085	    # what "hidden" libraries, object files and flags are used when
8086	    # linking a shared library.
8087	    #
8088	    # There doesn't appear to be a way to prevent this compiler from
8089	    # explicitly linking system object files so we need to strip them
8090	    # from the output so that they don't get included in the library
8091	    # dependencies.
8092	    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 "X$list" | $Xsed'
8093	    ;;
8094          *)
8095	    if test "$GXX" = yes; then
8096	      if test $with_gnu_ld = no; then
8097	        case $host_cpu in
8098	          hppa*64*)
8099	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8100	            ;;
8101	          ia64*)
8102	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8103	            ;;
8104	          *)
8105	            _LT_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'
8106	            ;;
8107	        esac
8108	      fi
8109	    else
8110	      # FIXME: insert proper C++ library support
8111	      _LT_TAGVAR(ld_shlibs, $1)=no
8112	    fi
8113	    ;;
8114        esac
8115        ;;
8116
8117      interix[[3-9]]*)
8118	_LT_TAGVAR(hardcode_direct, $1)=no
8119	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8120	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8121	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8122	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
8123	# Instead, shared libraries are loaded at an image base (0x10000000 by
8124	# default) and relocated if they conflict, which is a slow very memory
8125	# consuming and fragmenting process.  To avoid this, we pick a random,
8126	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
8127	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
8128	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
8129	_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
8130	;;
8131      irix5* | irix6*)
8132        case $cc_basename in
8133          CC*)
8134	    # SGI C++
8135	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
8136
8137	    # Archives containing C++ object files must be created using
8138	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
8139	    # necessary to make sure instantiated templates are included
8140	    # in the archive.
8141	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
8142	    ;;
8143          *)
8144	    if test "$GXX" = yes; then
8145	      if test "$with_gnu_ld" = no; then
8146	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8147	      else
8148	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
8149	      fi
8150	    fi
8151	    _LT_TAGVAR(link_all_deplibs, $1)=yes
8152	    ;;
8153        esac
8154        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8155        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8156        _LT_TAGVAR(inherit_rpath, $1)=yes
8157        ;;
8158
8159      linux* | k*bsd*-gnu)
8160        case $cc_basename in
8161          KCC*)
8162	    # Kuck and Associates, Inc. (KAI) C++ Compiler
8163
8164	    # KCC will only create a shared library if the output file
8165	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
8166	    # to its proper name (with version) after linking.
8167	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
8168	    _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
8169	    # Commands to make compiler produce verbose output that lists
8170	    # what "hidden" libraries, object files and flags are used when
8171	    # linking a shared library.
8172	    #
8173	    # There doesn't appear to be a way to prevent this compiler from
8174	    # explicitly linking system object files so we need to strip them
8175	    # from the output so that they don't get included in the library
8176	    # dependencies.
8177	    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 "X$list" | $Xsed'
8178
8179	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8180	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8181
8182	    # Archives containing C++ object files must be created using
8183	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
8184	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8185	    ;;
8186	  icpc* | ecpc* )
8187	    # Intel C++
8188	    with_gnu_ld=yes
8189	    # version 8.0 and above of icpc choke on multiply defined symbols
8190	    # if we add $predep_objects and $postdep_objects, however 7.1 and
8191	    # earlier do not add the objects themselves.
8192	    case `$CC -V 2>&1` in
8193	      *"Version 7."*)
8194	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8195		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8196		;;
8197	      *)  # Version 8.0 or newer
8198	        tmp_idyn=
8199	        case $host_cpu in
8200		  ia64*) tmp_idyn=' -i_dynamic';;
8201		esac
8202	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8203		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8204		;;
8205	    esac
8206	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8207	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8208	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8209	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8210	    ;;
8211          pgCC* | pgcpp*)
8212            # Portland Group C++ compiler
8213	    case `$CC -V` in
8214	    *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
8215	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
8216		rm -rf $tpldir~
8217		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
8218		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
8219	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
8220		rm -rf $tpldir~
8221		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
8222		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
8223		$RANLIB $oldlib'
8224	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
8225		rm -rf $tpldir~
8226		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
8227		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
8228	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
8229		rm -rf $tpldir~
8230		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
8231		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
8232	      ;;
8233	    *) # Version 6 will use weak symbols
8234	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
8235	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
8236	      ;;
8237	    esac
8238
8239	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
8240	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8241	    _LT_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'
8242            ;;
8243	  cxx*)
8244	    # Compaq C++
8245	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8246	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
8247
8248	    runpath_var=LD_RUN_PATH
8249	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8250	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8251
8252	    # Commands to make compiler produce verbose output that lists
8253	    # what "hidden" libraries, object files and flags are used when
8254	    # linking a shared library.
8255	    #
8256	    # There doesn't appear to be a way to prevent this compiler from
8257	    # explicitly linking system object files so we need to strip them
8258	    # from the output so that they don't get included in the library
8259	    # dependencies.
8260	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "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 "X$list" | $Xsed'
8261	    ;;
8262	  xl*)
8263	    # IBM XL 8.0 on PPC, with GNU ld
8264	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8265	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8266	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8267	    if test "x$supports_anon_versioning" = xyes; then
8268	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
8269		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8270		echo "local: *; };" >> $output_objdir/$libname.ver~
8271		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
8272	    fi
8273	    ;;
8274	  *)
8275	    case `$CC -V 2>&1 | sed 5q` in
8276	    *Sun\ C*)
8277	      # Sun C++ 5.9
8278	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8279	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8280	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
8281	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8282	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
8283	      _LT_TAGVAR(compiler_needs_object, $1)=yes
8284
8285	      # Not sure whether something based on
8286	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
8287	      # would be better.
8288	      output_verbose_link_cmd='echo'
8289
8290	      # Archives containing C++ object files must be created using
8291	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
8292	      # necessary to make sure instantiated templates are included
8293	      # in the archive.
8294	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8295	      ;;
8296	    esac
8297	    ;;
8298	esac
8299	;;
8300
8301      lynxos*)
8302        # FIXME: insert proper C++ library support
8303	_LT_TAGVAR(ld_shlibs, $1)=no
8304	;;
8305
8306      m88k*)
8307        # FIXME: insert proper C++ library support
8308        _LT_TAGVAR(ld_shlibs, $1)=no
8309	;;
8310
8311      mvs*)
8312        case $cc_basename in
8313          cxx*)
8314	    # FIXME: insert proper C++ library support
8315	    _LT_TAGVAR(ld_shlibs, $1)=no
8316	    ;;
8317	  *)
8318	    # FIXME: insert proper C++ library support
8319	    _LT_TAGVAR(ld_shlibs, $1)=no
8320	    ;;
8321	esac
8322	;;
8323
8324      netbsd*)
8325        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
8326	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
8327	  wlarc=
8328	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8329	  _LT_TAGVAR(hardcode_direct, $1)=yes
8330	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8331	fi
8332	# Workaround some broken pre-1.5 toolchains
8333	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
8334	;;
8335
8336      *nto* | *qnx*)
8337        _LT_TAGVAR(ld_shlibs, $1)=yes
8338	;;
8339
8340      openbsd2*)
8341        # C++ shared libraries are fairly broken
8342	_LT_TAGVAR(ld_shlibs, $1)=no
8343	;;
8344
8345      openbsd*)
8346	if test -f /usr/libexec/ld.so; then
8347	  _LT_TAGVAR(hardcode_direct, $1)=yes
8348	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8349	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8350	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
8351	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8352	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8353	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
8354	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8355	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8356	  fi
8357	  output_verbose_link_cmd=echo
8358	else
8359	  _LT_TAGVAR(ld_shlibs, $1)=no
8360	fi
8361	;;
8362
8363      osf3* | osf4* | osf5*)
8364        case $cc_basename in
8365          KCC*)
8366	    # Kuck and Associates, Inc. (KAI) C++ Compiler
8367
8368	    # KCC will only create a shared library if the output file
8369	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
8370	    # to its proper name (with version) after linking.
8371	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
8372
8373	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8374	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8375
8376	    # Archives containing C++ object files must be created using
8377	    # the KAI C++ compiler.
8378	    case $host in
8379	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
8380	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
8381	    esac
8382	    ;;
8383          RCC*)
8384	    # Rational C++ 2.4.1
8385	    # FIXME: insert proper C++ library support
8386	    _LT_TAGVAR(ld_shlibs, $1)=no
8387	    ;;
8388          cxx*)
8389	    case $host in
8390	      osf3*)
8391	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8392	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
8393	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8394		;;
8395	      *)
8396	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8397	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
8398	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
8399	          echo "-hidden">> $lib.exp~
8400	          $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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
8401	          $RM $lib.exp'
8402	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8403		;;
8404	    esac
8405
8406	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8407
8408	    # Commands to make compiler produce verbose output that lists
8409	    # what "hidden" libraries, object files and flags are used when
8410	    # linking a shared library.
8411	    #
8412	    # There doesn't appear to be a way to prevent this compiler from
8413	    # explicitly linking system object files so we need to strip them
8414	    # from the output so that they don't get included in the library
8415	    # dependencies.
8416	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "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 "X$list" | $Xsed'
8417	    ;;
8418	  *)
8419	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8420	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8421	      case $host in
8422	        osf3*)
8423	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8424		  ;;
8425	        *)
8426	          _LT_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" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8427		  ;;
8428	      esac
8429
8430	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8431	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8432
8433	      # Commands to make compiler produce verbose output that lists
8434	      # what "hidden" libraries, object files and flags are used when
8435	      # linking a shared library.
8436	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
8437
8438	    else
8439	      # FIXME: insert proper C++ library support
8440	      _LT_TAGVAR(ld_shlibs, $1)=no
8441	    fi
8442	    ;;
8443        esac
8444        ;;
8445
8446      psos*)
8447        # FIXME: insert proper C++ library support
8448        _LT_TAGVAR(ld_shlibs, $1)=no
8449        ;;
8450
8451      sunos4*)
8452        case $cc_basename in
8453          CC*)
8454	    # Sun C++ 4.x
8455	    # FIXME: insert proper C++ library support
8456	    _LT_TAGVAR(ld_shlibs, $1)=no
8457	    ;;
8458          lcc*)
8459	    # Lucid
8460	    # FIXME: insert proper C++ library support
8461	    _LT_TAGVAR(ld_shlibs, $1)=no
8462	    ;;
8463          *)
8464	    # FIXME: insert proper C++ library support
8465	    _LT_TAGVAR(ld_shlibs, $1)=no
8466	    ;;
8467        esac
8468        ;;
8469
8470      solaris*)
8471        case $cc_basename in
8472          CC*)
8473	    # Sun C++ 4.2, 5.x and Centerline C++
8474            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
8475	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8476	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8477	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8478	      $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'
8479
8480	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8481	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8482	    case $host_os in
8483	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8484	      *)
8485		# The compiler driver will combine and reorder linker options,
8486		# but understands `-z linker_flag'.
8487	        # Supported since Solaris 2.6 (maybe 2.5.1?)
8488		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
8489	        ;;
8490	    esac
8491	    _LT_TAGVAR(link_all_deplibs, $1)=yes
8492
8493	    output_verbose_link_cmd='echo'
8494
8495	    # Archives containing C++ object files must be created using
8496	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
8497	    # necessary to make sure instantiated templates are included
8498	    # in the archive.
8499	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8500	    ;;
8501          gcx*)
8502	    # Green Hills C++ Compiler
8503	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8504
8505	    # The C++ compiler must be used to create the archive.
8506	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
8507	    ;;
8508          *)
8509	    # GNU C++ compiler with Solaris linker
8510	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8511	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
8512	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
8513	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8514	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8515		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8516
8517	        # Commands to make compiler produce verbose output that lists
8518	        # what "hidden" libraries, object files and flags are used when
8519	        # linking a shared library.
8520	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
8521	      else
8522	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
8523	        # platform.
8524	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8525	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8526		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8527
8528	        # Commands to make compiler produce verbose output that lists
8529	        # what "hidden" libraries, object files and flags are used when
8530	        # linking a shared library.
8531	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
8532	      fi
8533
8534	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
8535	      case $host_os in
8536		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8537		*)
8538		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8539		  ;;
8540	      esac
8541	    fi
8542	    ;;
8543        esac
8544        ;;
8545
8546    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
8547      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8548      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8549      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8550      runpath_var='LD_RUN_PATH'
8551
8552      case $cc_basename in
8553        CC*)
8554	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8555	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8556	  ;;
8557	*)
8558	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8559	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8560	  ;;
8561      esac
8562      ;;
8563
8564      sysv5* | sco3.2v5* | sco5v6*)
8565	# Note: We can NOT use -z defs as we might desire, because we do not
8566	# link with -lc, and that would cause any symbols used from libc to
8567	# always be unresolved, which means just about no library would
8568	# ever link correctly.  If we're not using GNU ld we use -z text
8569	# though, which does catch some bad symbols but isn't as heavy-handed
8570	# as -z defs.
8571	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8572	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
8573	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8574	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8575	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
8576	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8577	_LT_TAGVAR(link_all_deplibs, $1)=yes
8578	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
8579	runpath_var='LD_RUN_PATH'
8580
8581	case $cc_basename in
8582          CC*)
8583	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8584	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8585	    ;;
8586	  *)
8587	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8588	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8589	    ;;
8590	esac
8591      ;;
8592
8593      tandem*)
8594        case $cc_basename in
8595          NCC*)
8596	    # NonStop-UX NCC 3.20
8597	    # FIXME: insert proper C++ library support
8598	    _LT_TAGVAR(ld_shlibs, $1)=no
8599	    ;;
8600          *)
8601	    # FIXME: insert proper C++ library support
8602	    _LT_TAGVAR(ld_shlibs, $1)=no
8603	    ;;
8604        esac
8605        ;;
8606
8607      vxworks*)
8608        # FIXME: insert proper C++ library support
8609        _LT_TAGVAR(ld_shlibs, $1)=no
8610        ;;
8611
8612      *)
8613        # FIXME: insert proper C++ library support
8614        _LT_TAGVAR(ld_shlibs, $1)=no
8615        ;;
8616    esac
8617
8618    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
8619    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8620
8621    _LT_TAGVAR(GCC, $1)="$GXX"
8622    _LT_TAGVAR(LD, $1)="$LD"
8623
8624    ## CAVEAT EMPTOR:
8625    ## There is no encapsulation within the following macros, do not change
8626    ## the running order or otherwise move them around unless you know exactly
8627    ## what you are doing...
8628    _LT_SYS_HIDDEN_LIBDEPS($1)
8629    _LT_COMPILER_PIC($1)
8630    _LT_COMPILER_C_O($1)
8631    _LT_COMPILER_FILE_LOCKS($1)
8632    _LT_LINKER_SHLIBS($1)
8633    _LT_SYS_DYNAMIC_LINKER($1)
8634    _LT_LINKER_HARDCODE_LIBPATH($1)
8635
8636    _LT_CONFIG($1)
8637  fi # test -n "$compiler"
8638
8639  CC=$lt_save_CC
8640  LDCXX=$LD
8641  LD=$lt_save_LD
8642  GCC=$lt_save_GCC
8643  with_gnu_ld=$lt_save_with_gnu_ld
8644  lt_cv_path_LDCXX=$lt_cv_path_LD
8645  lt_cv_path_LD=$lt_save_path_LD
8646  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
8647  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
8648fi # test "$_lt_caught_CXX_error" != yes
8649
8650AC_LANG_POP
8651])# _LT_LANG_CXX_CONFIG
8652
8653
8654# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
8655# ---------------------------------
8656# Figure out "hidden" library dependencies from verbose
8657# compiler output when linking a shared library.
8658# Parse the compiler output and extract the necessary
8659# objects, libraries and library flags.
8660m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
8661[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8662# Dependencies to place before and after the object being linked:
8663_LT_TAGVAR(predep_objects, $1)=
8664_LT_TAGVAR(postdep_objects, $1)=
8665_LT_TAGVAR(predeps, $1)=
8666_LT_TAGVAR(postdeps, $1)=
8667_LT_TAGVAR(compiler_lib_search_path, $1)=
8668
8669dnl we can't use the lt_simple_compile_test_code here,
8670dnl because it contains code intended for an executable,
8671dnl not a library.  It's possible we should let each
8672dnl tag define a new lt_????_link_test_code variable,
8673dnl but it's only used here...
8674m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
8675int a;
8676void foo (void) { a = 0; }
8677_LT_EOF
8678], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
8679class Foo
8680{
8681public:
8682  Foo (void) { a = 0; }
8683private:
8684  int a;
8685};
8686_LT_EOF
8687], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
8688      subroutine foo
8689      implicit none
8690      integer*4 a
8691      a=0
8692      return
8693      end
8694_LT_EOF
8695], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
8696      subroutine foo
8697      implicit none
8698      integer a
8699      a=0
8700      return
8701      end
8702_LT_EOF
8703], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
8704public class foo {
8705  private int a;
8706  public void bar (void) {
8707    a = 0;
8708  }
8709};
8710_LT_EOF
8711])
8712dnl Parse the compiler output and extract the necessary
8713dnl objects, libraries and library flags.
8714if AC_TRY_EVAL(ac_compile); then
8715  # Parse the compiler output and extract the necessary
8716  # objects, libraries and library flags.
8717
8718  # Sentinel used to keep track of whether or not we are before
8719  # the conftest object file.
8720  pre_test_object_deps_done=no
8721
8722  for p in `eval "$output_verbose_link_cmd"`; do
8723    case $p in
8724
8725    -L* | -R* | -l*)
8726       # Some compilers place space between "-{L,R}" and the path.
8727       # Remove the space.
8728       if test $p = "-L" ||
8729          test $p = "-R"; then
8730	 prev=$p
8731	 continue
8732       else
8733	 prev=
8734       fi
8735
8736       if test "$pre_test_object_deps_done" = no; then
8737	 case $p in
8738	 -L* | -R*)
8739	   # Internal compiler library paths should come after those
8740	   # provided the user.  The postdeps already come after the
8741	   # user supplied libs so there is no need to process them.
8742	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8743	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8744	   else
8745	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8746	   fi
8747	   ;;
8748	 # The "-l" case would never come before the object being
8749	 # linked, so don't bother handling this case.
8750	 esac
8751       else
8752	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8753	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
8754	 else
8755	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8756	 fi
8757       fi
8758       ;;
8759
8760    *.$objext)
8761       # This assumes that the test object file only shows up
8762       # once in the compiler output.
8763       if test "$p" = "conftest.$objext"; then
8764	 pre_test_object_deps_done=yes
8765	 continue
8766       fi
8767
8768       if test "$pre_test_object_deps_done" = no; then
8769	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8770	   _LT_TAGVAR(predep_objects, $1)="$p"
8771	 else
8772	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8773	 fi
8774       else
8775	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8776	   _LT_TAGVAR(postdep_objects, $1)="$p"
8777	 else
8778	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8779	 fi
8780       fi
8781       ;;
8782
8783    *) ;; # Ignore the rest.
8784
8785    esac
8786  done
8787
8788  # Clean up.
8789  rm -f a.out a.exe
8790else
8791  echo "libtool.m4: error: problem compiling $1 test program"
8792fi
8793
8794$RM -f confest.$objext
8795
8796# PORTME: override above test on systems where it is broken
8797m4_if([$1], [CXX],
8798[case $host_os in
8799interix[[3-9]]*)
8800  # Interix 3.5 installs completely hosed .la files for C++, so rather than
8801  # hack all around it, let's just trust "g++" to DTRT.
8802  _LT_TAGVAR(predep_objects,$1)=
8803  _LT_TAGVAR(postdep_objects,$1)=
8804  _LT_TAGVAR(postdeps,$1)=
8805  ;;
8806
8807linux*)
8808  case `$CC -V 2>&1 | sed 5q` in
8809  *Sun\ C*)
8810    # Sun C++ 5.9
8811
8812    # The more standards-conforming stlport4 library is
8813    # incompatible with the Cstd library. Avoid specifying
8814    # it if it's in CXXFLAGS. Ignore libCrun as
8815    # -library=stlport4 depends on it.
8816    case " $CXX $CXXFLAGS " in
8817    *" -library=stlport4 "*)
8818      solaris_use_stlport4=yes
8819      ;;
8820    esac
8821
8822    if test "$solaris_use_stlport4" != yes; then
8823      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8824    fi
8825    ;;
8826  esac
8827  ;;
8828
8829solaris*)
8830  case $cc_basename in
8831  CC*)
8832    # The more standards-conforming stlport4 library is
8833    # incompatible with the Cstd library. Avoid specifying
8834    # it if it's in CXXFLAGS. Ignore libCrun as
8835    # -library=stlport4 depends on it.
8836    case " $CXX $CXXFLAGS " in
8837    *" -library=stlport4 "*)
8838      solaris_use_stlport4=yes
8839      ;;
8840    esac
8841
8842    # Adding this requires a known-good setup of shared libraries for
8843    # Sun compiler versions before 5.6, else PIC objects from an old
8844    # archive will be linked into the output, leading to subtle bugs.
8845    if test "$solaris_use_stlport4" != yes; then
8846      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8847    fi
8848    ;;
8849  esac
8850  ;;
8851esac
8852])
8853
8854case " $_LT_TAGVAR(postdeps, $1) " in
8855*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8856esac
8857 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8858if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8859 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
8860fi
8861_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8862    [The directories searched by this compiler when creating a shared library])
8863_LT_TAGDECL([], [predep_objects], [1],
8864    [Dependencies to place before and after the objects being linked to
8865    create a shared library])
8866_LT_TAGDECL([], [postdep_objects], [1])
8867_LT_TAGDECL([], [predeps], [1])
8868_LT_TAGDECL([], [postdeps], [1])
8869_LT_TAGDECL([], [compiler_lib_search_path], [1],
8870    [The library search path used internally by the compiler when linking
8871    a shared library])
8872])# _LT_SYS_HIDDEN_LIBDEPS
8873
8874
8875# _LT_PROG_F77
8876# ------------
8877# Since AC_PROG_F77 is broken, in that it returns the empty string
8878# if there is no fortran compiler, we have our own version here.
8879m4_defun([_LT_PROG_F77],
8880[
8881pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
8882AC_PROG_F77
8883if test -z "$F77" || test "X$F77" = "Xno"; then
8884  _lt_disable_F77=yes
8885fi
8886popdef([AC_MSG_ERROR])
8887])# _LT_PROG_F77
8888
8889dnl aclocal-1.4 backwards compatibility:
8890dnl AC_DEFUN([_LT_PROG_F77], [])
8891
8892
8893# _LT_LANG_F77_CONFIG([TAG])
8894# --------------------------
8895# Ensure that the configuration variables for a Fortran 77 compiler are
8896# suitably defined.  These variables are subsequently used by _LT_CONFIG
8897# to write the compiler configuration to `libtool'.
8898m4_defun([_LT_LANG_F77_CONFIG],
8899[AC_REQUIRE([_LT_PROG_F77])dnl
8900AC_LANG_PUSH(Fortran 77)
8901
8902_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8903_LT_TAGVAR(allow_undefined_flag, $1)=
8904_LT_TAGVAR(always_export_symbols, $1)=no
8905_LT_TAGVAR(archive_expsym_cmds, $1)=
8906_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8907_LT_TAGVAR(hardcode_direct, $1)=no
8908_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8909_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8910_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8911_LT_TAGVAR(hardcode_libdir_separator, $1)=
8912_LT_TAGVAR(hardcode_minus_L, $1)=no
8913_LT_TAGVAR(hardcode_automatic, $1)=no
8914_LT_TAGVAR(inherit_rpath, $1)=no
8915_LT_TAGVAR(module_cmds, $1)=
8916_LT_TAGVAR(module_expsym_cmds, $1)=
8917_LT_TAGVAR(link_all_deplibs, $1)=unknown
8918_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8919_LT_TAGVAR(no_undefined_flag, $1)=
8920_LT_TAGVAR(whole_archive_flag_spec, $1)=
8921_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8922
8923# Source file extension for f77 test sources.
8924ac_ext=f
8925
8926# Object file extension for compiled f77 test sources.
8927objext=o
8928_LT_TAGVAR(objext, $1)=$objext
8929
8930# No sense in running all these tests if we already determined that
8931# the F77 compiler isn't working.  Some variables (like enable_shared)
8932# are currently assumed to apply to all compilers on this platform,
8933# and will be corrupted by setting them based on a non-working compiler.
8934if test "$_lt_disable_F77" != yes; then
8935  # Code to be used in simple compile tests
8936  lt_simple_compile_test_code="\
8937      subroutine t
8938      return
8939      end
8940"
8941
8942  # Code to be used in simple link tests
8943  lt_simple_link_test_code="\
8944      program t
8945      end
8946"
8947
8948  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8949  _LT_TAG_COMPILER
8950
8951  # save warnings/boilerplate of simple test code
8952  _LT_COMPILER_BOILERPLATE
8953  _LT_LINKER_BOILERPLATE
8954
8955  # Allow CC to be a program name with arguments.
8956  lt_save_CC="$CC"
8957  lt_save_GCC=$GCC
8958  CC=${F77-"f77"}
8959  compiler=$CC
8960  _LT_TAGVAR(compiler, $1)=$CC
8961  _LT_CC_BASENAME([$compiler])
8962  GCC=$G77
8963  if test -n "$compiler"; then
8964    AC_MSG_CHECKING([if libtool supports shared libraries])
8965    AC_MSG_RESULT([$can_build_shared])
8966
8967    AC_MSG_CHECKING([whether to build shared libraries])
8968    test "$can_build_shared" = "no" && enable_shared=no
8969
8970    # On AIX, shared libraries and static libraries use the same namespace, and
8971    # are all built from PIC.
8972    case $host_os in
8973      aix3*)
8974        test "$enable_shared" = yes && enable_static=no
8975        if test -n "$RANLIB"; then
8976          archive_cmds="$archive_cmds~\$RANLIB \$lib"
8977          postinstall_cmds='$RANLIB $lib'
8978        fi
8979        ;;
8980      aix[[4-9]]*)
8981	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8982	  test "$enable_shared" = yes && enable_static=no
8983	fi
8984        ;;
8985    esac
8986    AC_MSG_RESULT([$enable_shared])
8987
8988    AC_MSG_CHECKING([whether to build static libraries])
8989    # Make sure either enable_shared or enable_static is yes.
8990    test "$enable_shared" = yes || enable_static=yes
8991    AC_MSG_RESULT([$enable_static])
8992
8993    _LT_TAGVAR(GCC, $1)="$G77"
8994    _LT_TAGVAR(LD, $1)="$LD"
8995
8996    ## CAVEAT EMPTOR:
8997    ## There is no encapsulation within the following macros, do not change
8998    ## the running order or otherwise move them around unless you know exactly
8999    ## what you are doing...
9000    _LT_COMPILER_PIC($1)
9001    _LT_COMPILER_C_O($1)
9002    _LT_COMPILER_FILE_LOCKS($1)
9003    _LT_LINKER_SHLIBS($1)
9004    _LT_SYS_DYNAMIC_LINKER($1)
9005    _LT_LINKER_HARDCODE_LIBPATH($1)
9006
9007    _LT_CONFIG($1)
9008  fi # test -n "$compiler"
9009
9010  GCC=$lt_save_GCC
9011  CC="$lt_save_CC"
9012fi # test "$_lt_disable_F77" != yes
9013
9014AC_LANG_POP
9015])# _LT_LANG_F77_CONFIG
9016
9017
9018# _LT_PROG_FC
9019# -----------
9020# Since AC_PROG_FC is broken, in that it returns the empty string
9021# if there is no fortran compiler, we have our own version here.
9022m4_defun([_LT_PROG_FC],
9023[
9024pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
9025AC_PROG_FC
9026if test -z "$FC" || test "X$FC" = "Xno"; then
9027  _lt_disable_FC=yes
9028fi
9029popdef([AC_MSG_ERROR])
9030])# _LT_PROG_FC
9031
9032dnl aclocal-1.4 backwards compatibility:
9033dnl AC_DEFUN([_LT_PROG_FC], [])
9034
9035
9036# _LT_LANG_FC_CONFIG([TAG])
9037# -------------------------
9038# Ensure that the configuration variables for a Fortran compiler are
9039# suitably defined.  These variables are subsequently used by _LT_CONFIG
9040# to write the compiler configuration to `libtool'.
9041m4_defun([_LT_LANG_FC_CONFIG],
9042[AC_REQUIRE([_LT_PROG_FC])dnl
9043AC_LANG_PUSH(Fortran)
9044
9045_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9046_LT_TAGVAR(allow_undefined_flag, $1)=
9047_LT_TAGVAR(always_export_symbols, $1)=no
9048_LT_TAGVAR(archive_expsym_cmds, $1)=
9049_LT_TAGVAR(export_dynamic_flag_spec, $1)=
9050_LT_TAGVAR(hardcode_direct, $1)=no
9051_LT_TAGVAR(hardcode_direct_absolute, $1)=no
9052_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9053_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
9054_LT_TAGVAR(hardcode_libdir_separator, $1)=
9055_LT_TAGVAR(hardcode_minus_L, $1)=no
9056_LT_TAGVAR(hardcode_automatic, $1)=no
9057_LT_TAGVAR(inherit_rpath, $1)=no
9058_LT_TAGVAR(module_cmds, $1)=
9059_LT_TAGVAR(module_expsym_cmds, $1)=
9060_LT_TAGVAR(link_all_deplibs, $1)=unknown
9061_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9062_LT_TAGVAR(no_undefined_flag, $1)=
9063_LT_TAGVAR(whole_archive_flag_spec, $1)=
9064_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9065
9066# Source file extension for fc test sources.
9067ac_ext=${ac_fc_srcext-f}
9068
9069# Object file extension for compiled fc test sources.
9070objext=o
9071_LT_TAGVAR(objext, $1)=$objext
9072
9073# No sense in running all these tests if we already determined that
9074# the FC compiler isn't working.  Some variables (like enable_shared)
9075# are currently assumed to apply to all compilers on this platform,
9076# and will be corrupted by setting them based on a non-working compiler.
9077if test "$_lt_disable_FC" != yes; then
9078  # Code to be used in simple compile tests
9079  lt_simple_compile_test_code="\
9080      subroutine t
9081      return
9082      end
9083"
9084
9085  # Code to be used in simple link tests
9086  lt_simple_link_test_code="\
9087      program t
9088      end
9089"
9090
9091  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9092  _LT_TAG_COMPILER
9093
9094  # save warnings/boilerplate of simple test code
9095  _LT_COMPILER_BOILERPLATE
9096  _LT_LINKER_BOILERPLATE
9097
9098  # Allow CC to be a program name with arguments.
9099  lt_save_CC="$CC"
9100  lt_save_GCC=$GCC
9101  CC=${FC-"f95"}
9102  compiler=$CC
9103  GCC=$ac_cv_fc_compiler_gnu
9104
9105  _LT_TAGVAR(compiler, $1)=$CC
9106  _LT_CC_BASENAME([$compiler])
9107
9108  if test -n "$compiler"; then
9109    AC_MSG_CHECKING([if libtool supports shared libraries])
9110    AC_MSG_RESULT([$can_build_shared])
9111
9112    AC_MSG_CHECKING([whether to build shared libraries])
9113    test "$can_build_shared" = "no" && enable_shared=no
9114
9115    # On AIX, shared libraries and static libraries use the same namespace, and
9116    # are all built from PIC.
9117    case $host_os in
9118      aix3*)
9119        test "$enable_shared" = yes && enable_static=no
9120        if test -n "$RANLIB"; then
9121          archive_cmds="$archive_cmds~\$RANLIB \$lib"
9122          postinstall_cmds='$RANLIB $lib'
9123        fi
9124        ;;
9125      aix[[4-9]]*)
9126	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
9127	  test "$enable_shared" = yes && enable_static=no
9128	fi
9129        ;;
9130    esac
9131    AC_MSG_RESULT([$enable_shared])
9132
9133    AC_MSG_CHECKING([whether to build static libraries])
9134    # Make sure either enable_shared or enable_static is yes.
9135    test "$enable_shared" = yes || enable_static=yes
9136    AC_MSG_RESULT([$enable_static])
9137
9138    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
9139    _LT_TAGVAR(LD, $1)="$LD"
9140
9141    ## CAVEAT EMPTOR:
9142    ## There is no encapsulation within the following macros, do not change
9143    ## the running order or otherwise move them around unless you know exactly
9144    ## what you are doing...
9145    _LT_SYS_HIDDEN_LIBDEPS($1)
9146    _LT_COMPILER_PIC($1)
9147    _LT_COMPILER_C_O($1)
9148    _LT_COMPILER_FILE_LOCKS($1)
9149    _LT_LINKER_SHLIBS($1)
9150    _LT_SYS_DYNAMIC_LINKER($1)
9151    _LT_LINKER_HARDCODE_LIBPATH($1)
9152
9153    _LT_CONFIG($1)
9154  fi # test -n "$compiler"
9155
9156  GCC=$lt_save_GCC
9157  CC="$lt_save_CC"
9158fi # test "$_lt_disable_FC" != yes
9159
9160AC_LANG_POP
9161])# _LT_LANG_FC_CONFIG
9162
9163
9164# _LT_LANG_GCJ_CONFIG([TAG])
9165# --------------------------
9166# Ensure that the configuration variables for the GNU Java Compiler compiler
9167# are suitably defined.  These variables are subsequently used by _LT_CONFIG
9168# to write the compiler configuration to `libtool'.
9169m4_defun([_LT_LANG_GCJ_CONFIG],
9170[AC_REQUIRE([LT_PROG_GCJ])dnl
9171AC_LANG_SAVE
9172
9173# Source file extension for Java test sources.
9174ac_ext=java
9175
9176# Object file extension for compiled Java test sources.
9177objext=o
9178_LT_TAGVAR(objext, $1)=$objext
9179
9180# Code to be used in simple compile tests
9181lt_simple_compile_test_code="class foo {}"
9182
9183# Code to be used in simple link tests
9184lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
9185
9186# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9187_LT_TAG_COMPILER
9188
9189# save warnings/boilerplate of simple test code
9190_LT_COMPILER_BOILERPLATE
9191_LT_LINKER_BOILERPLATE
9192
9193# Allow CC to be a program name with arguments.
9194lt_save_CC="$CC"
9195lt_save_GCC=$GCC
9196GCC=yes
9197CC=${GCJ-"gcj"}
9198compiler=$CC
9199_LT_TAGVAR(compiler, $1)=$CC
9200_LT_TAGVAR(LD, $1)="$LD"
9201_LT_CC_BASENAME([$compiler])
9202
9203# GCJ did not exist at the time GCC didn't implicitly link libc in.
9204_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9205
9206_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9207
9208if test -n "$compiler"; then
9209  _LT_COMPILER_NO_RTTI($1)
9210  _LT_COMPILER_PIC($1)
9211  _LT_COMPILER_C_O($1)
9212  _LT_COMPILER_FILE_LOCKS($1)
9213  _LT_LINKER_SHLIBS($1)
9214  _LT_LINKER_HARDCODE_LIBPATH($1)
9215
9216  _LT_CONFIG($1)
9217fi
9218
9219AC_LANG_RESTORE
9220
9221GCC=$lt_save_GCC
9222CC="$lt_save_CC"
9223])# _LT_LANG_GCJ_CONFIG
9224
9225
9226# _LT_LANG_RC_CONFIG([TAG])
9227# -------------------------
9228# Ensure that the configuration variables for the Windows resource compiler
9229# are suitably defined.  These variables are subsequently used by _LT_CONFIG
9230# to write the compiler configuration to `libtool'.
9231m4_defun([_LT_LANG_RC_CONFIG],
9232[AC_REQUIRE([LT_PROG_RC])dnl
9233AC_LANG_SAVE
9234
9235# Source file extension for RC test sources.
9236ac_ext=rc
9237
9238# Object file extension for compiled RC test sources.
9239objext=o
9240_LT_TAGVAR(objext, $1)=$objext
9241
9242# Code to be used in simple compile tests
9243lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
9244
9245# Code to be used in simple link tests
9246lt_simple_link_test_code="$lt_simple_compile_test_code"
9247
9248# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9249_LT_TAG_COMPILER
9250
9251# save warnings/boilerplate of simple test code
9252_LT_COMPILER_BOILERPLATE
9253_LT_LINKER_BOILERPLATE
9254
9255# Allow CC to be a program name with arguments.
9256lt_save_CC="$CC"
9257lt_save_GCC=$GCC
9258GCC=
9259CC=${RC-"windres"}
9260compiler=$CC
9261_LT_TAGVAR(compiler, $1)=$CC
9262_LT_CC_BASENAME([$compiler])
9263_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
9264
9265if test -n "$compiler"; then
9266  :
9267  _LT_CONFIG($1)
9268fi
9269
9270GCC=$lt_save_GCC
9271AC_LANG_RESTORE
9272CC="$lt_save_CC"
9273])# _LT_LANG_RC_CONFIG
9274
9275
9276# LT_PROG_GCJ
9277# -----------
9278AC_DEFUN([LT_PROG_GCJ],
9279[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
9280  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
9281    [AC_CHECK_TOOL(GCJ, gcj,)
9282      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
9283      AC_SUBST(GCJFLAGS)])])[]dnl
9284])
9285
9286# Old name:
9287AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
9288dnl aclocal-1.4 backwards compatibility:
9289dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
9290
9291
9292# LT_PROG_RC
9293# ----------
9294AC_DEFUN([LT_PROG_RC],
9295[AC_CHECK_TOOL(RC, windres,)
9296])
9297
9298# Old name:
9299AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
9300dnl aclocal-1.4 backwards compatibility:
9301dnl AC_DEFUN([LT_AC_PROG_RC], [])
9302
9303
9304# _LT_DECL_EGREP
9305# --------------
9306# If we don't have a new enough Autoconf to choose the best grep
9307# available, choose the one first in the user's PATH.
9308m4_defun([_LT_DECL_EGREP],
9309[AC_REQUIRE([AC_PROG_EGREP])dnl
9310AC_REQUIRE([AC_PROG_FGREP])dnl
9311test -z "$GREP" && GREP=grep
9312_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
9313_LT_DECL([], [EGREP], [1], [An ERE matcher])
9314_LT_DECL([], [FGREP], [1], [A literal string matcher])
9315dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
9316AC_SUBST([GREP])
9317])
9318
9319
9320# _LT_DECL_OBJDUMP
9321# --------------
9322# If we don't have a new enough Autoconf to choose the best objdump
9323# available, choose the one first in the user's PATH.
9324m4_defun([_LT_DECL_OBJDUMP],
9325[AC_CHECK_TOOL(OBJDUMP, objdump, false)
9326test -z "$OBJDUMP" && OBJDUMP=objdump
9327_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
9328AC_SUBST([OBJDUMP])
9329])
9330
9331
9332# _LT_DECL_SED
9333# ------------
9334# Check for a fully-functional sed program, that truncates
9335# as few characters as possible.  Prefer GNU sed if found.
9336m4_defun([_LT_DECL_SED],
9337[AC_PROG_SED
9338test -z "$SED" && SED=sed
9339Xsed="$SED -e 1s/^X//"
9340_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
9341_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
9342    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
9343])# _LT_DECL_SED
9344
9345m4_ifndef([AC_PROG_SED], [
9346# NOTE: This macro has been submitted for inclusion into   #
9347#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
9348#  a released version of Autoconf we should remove this    #
9349#  macro and use it instead.                               #
9350
9351m4_defun([AC_PROG_SED],
9352[AC_MSG_CHECKING([for a sed that does not truncate output])
9353AC_CACHE_VAL(lt_cv_path_SED,
9354[# Loop through the user's path and test for sed and gsed.
9355# Then use that list of sed's as ones to test for truncation.
9356as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9357for as_dir in $PATH
9358do
9359  IFS=$as_save_IFS
9360  test -z "$as_dir" && as_dir=.
9361  for lt_ac_prog in sed gsed; do
9362    for ac_exec_ext in '' $ac_executable_extensions; do
9363      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
9364        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
9365      fi
9366    done
9367  done
9368done
9369IFS=$as_save_IFS
9370lt_ac_max=0
9371lt_ac_count=0
9372# Add /usr/xpg4/bin/sed as it is typically found on Solaris
9373# along with /bin/sed that truncates output.
9374for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
9375  test ! -f $lt_ac_sed && continue
9376  cat /dev/null > conftest.in
9377  lt_ac_count=0
9378  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
9379  # Check for GNU sed and select it if it is found.
9380  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
9381    lt_cv_path_SED=$lt_ac_sed
9382    break
9383  fi
9384  while true; do
9385    cat conftest.in conftest.in >conftest.tmp
9386    mv conftest.tmp conftest.in
9387    cp conftest.in conftest.nl
9388    echo >>conftest.nl
9389    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
9390    cmp -s conftest.out conftest.nl || break
9391    # 10000 chars as input seems more than enough
9392    test $lt_ac_count -gt 10 && break
9393    lt_ac_count=`expr $lt_ac_count + 1`
9394    if test $lt_ac_count -gt $lt_ac_max; then
9395      lt_ac_max=$lt_ac_count
9396      lt_cv_path_SED=$lt_ac_sed
9397    fi
9398  done
9399done
9400])
9401SED=$lt_cv_path_SED
9402AC_SUBST([SED])
9403AC_MSG_RESULT([$SED])
9404])#AC_PROG_SED
9405])#m4_ifndef
9406
9407# Old name:
9408AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
9409dnl aclocal-1.4 backwards compatibility:
9410dnl AC_DEFUN([LT_AC_PROG_SED], [])
9411
9412
9413# _LT_CHECK_SHELL_FEATURES
9414# ------------------------
9415# Find out whether the shell is Bourne or XSI compatible,
9416# or has some other useful features.
9417m4_defun([_LT_CHECK_SHELL_FEATURES],
9418[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
9419# Try some XSI features
9420xsi_shell=no
9421( _lt_dummy="a/b/c"
9422  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
9423      = c,a/b,, \
9424    && eval 'test $(( 1 + 1 )) -eq 2 \
9425    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
9426  && xsi_shell=yes
9427AC_MSG_RESULT([$xsi_shell])
9428_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
9429
9430AC_MSG_CHECKING([whether the shell understands "+="])
9431lt_shell_append=no
9432( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
9433    >/dev/null 2>&1 \
9434  && lt_shell_append=yes
9435AC_MSG_RESULT([$lt_shell_append])
9436_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
9437
9438if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
9439  lt_unset=unset
9440else
9441  lt_unset=false
9442fi
9443_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
9444
9445# test EBCDIC or ASCII
9446case `echo X|tr X '\101'` in
9447 A) # ASCII based system
9448    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
9449  lt_SP2NL='tr \040 \012'
9450  lt_NL2SP='tr \015\012 \040\040'
9451  ;;
9452 *) # EBCDIC based system
9453  lt_SP2NL='tr \100 \n'
9454  lt_NL2SP='tr \r\n \100\100'
9455  ;;
9456esac
9457_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
9458_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
9459])# _LT_CHECK_SHELL_FEATURES
9460
9461
9462# _LT_PROG_XSI_SHELLFNS
9463# ---------------------
9464# Bourne and XSI compatible variants of some useful shell functions.
9465m4_defun([_LT_PROG_XSI_SHELLFNS],
9466[case $xsi_shell in
9467  yes)
9468    cat << \_LT_EOF >> "$cfgfile"
9469
9470# func_dirname file append nondir_replacement
9471# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
9472# otherwise set result to NONDIR_REPLACEMENT.
9473func_dirname ()
9474{
9475  case ${1} in
9476    */*) func_dirname_result="${1%/*}${2}" ;;
9477    *  ) func_dirname_result="${3}" ;;
9478  esac
9479}
9480
9481# func_basename file
9482func_basename ()
9483{
9484  func_basename_result="${1##*/}"
9485}
9486
9487# func_dirname_and_basename file append nondir_replacement
9488# perform func_basename and func_dirname in a single function
9489# call:
9490#   dirname:  Compute the dirname of FILE.  If nonempty,
9491#             add APPEND to the result, otherwise set result
9492#             to NONDIR_REPLACEMENT.
9493#             value returned in "$func_dirname_result"
9494#   basename: Compute filename of FILE.
9495#             value retuned in "$func_basename_result"
9496# Implementation must be kept synchronized with func_dirname
9497# and func_basename. For efficiency, we do not delegate to
9498# those functions but instead duplicate the functionality here.
9499func_dirname_and_basename ()
9500{
9501  case ${1} in
9502    */*) func_dirname_result="${1%/*}${2}" ;;
9503    *  ) func_dirname_result="${3}" ;;
9504  esac
9505  func_basename_result="${1##*/}"
9506}
9507
9508# func_stripname prefix suffix name
9509# strip PREFIX and SUFFIX off of NAME.
9510# PREFIX and SUFFIX must not contain globbing or regex special
9511# characters, hashes, percent signs, but SUFFIX may contain a leading
9512# dot (in which case that matches only a dot).
9513func_stripname ()
9514{
9515  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
9516  # positional parameters, so assign one to ordinary parameter first.
9517  func_stripname_result=${3}
9518  func_stripname_result=${func_stripname_result#"${1}"}
9519  func_stripname_result=${func_stripname_result%"${2}"}
9520}
9521
9522# func_opt_split
9523func_opt_split ()
9524{
9525  func_opt_split_opt=${1%%=*}
9526  func_opt_split_arg=${1#*=}
9527}
9528
9529# func_lo2o object
9530func_lo2o ()
9531{
9532  case ${1} in
9533    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
9534    *)    func_lo2o_result=${1} ;;
9535  esac
9536}
9537
9538# func_xform libobj-or-source
9539func_xform ()
9540{
9541  func_xform_result=${1%.*}.lo
9542}
9543
9544# func_arith arithmetic-term...
9545func_arith ()
9546{
9547  func_arith_result=$(( $[*] ))
9548}
9549
9550# func_len string
9551# STRING may not start with a hyphen.
9552func_len ()
9553{
9554  func_len_result=${#1}
9555}
9556
9557_LT_EOF
9558    ;;
9559  *) # Bourne compatible functions.
9560    cat << \_LT_EOF >> "$cfgfile"
9561
9562# func_dirname file append nondir_replacement
9563# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
9564# otherwise set result to NONDIR_REPLACEMENT.
9565func_dirname ()
9566{
9567  # Extract subdirectory from the argument.
9568  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
9569  if test "X$func_dirname_result" = "X${1}"; then
9570    func_dirname_result="${3}"
9571  else
9572    func_dirname_result="$func_dirname_result${2}"
9573  fi
9574}
9575
9576# func_basename file
9577func_basename ()
9578{
9579  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
9580}
9581
9582dnl func_dirname_and_basename
9583dnl A portable version of this function is already defined in general.m4sh
9584dnl so there is no need for it here.
9585
9586# func_stripname prefix suffix name
9587# strip PREFIX and SUFFIX off of NAME.
9588# PREFIX and SUFFIX must not contain globbing or regex special
9589# characters, hashes, percent signs, but SUFFIX may contain a leading
9590# dot (in which case that matches only a dot).
9591# func_strip_suffix prefix name
9592func_stripname ()
9593{
9594  case ${2} in
9595    .*) func_stripname_result=`$ECHO "X${3}" \
9596           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
9597    *)  func_stripname_result=`$ECHO "X${3}" \
9598           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
9599  esac
9600}
9601
9602# sed scripts:
9603my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
9604my_sed_long_arg='1s/^-[[^=]]*=//'
9605
9606# func_opt_split
9607func_opt_split ()
9608{
9609  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
9610  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
9611}
9612
9613# func_lo2o object
9614func_lo2o ()
9615{
9616  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
9617}
9618
9619# func_xform libobj-or-source
9620func_xform ()
9621{
9622  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
9623}
9624
9625# func_arith arithmetic-term...
9626func_arith ()
9627{
9628  func_arith_result=`expr "$[@]"`
9629}
9630
9631# func_len string
9632# STRING may not start with a hyphen.
9633func_len ()
9634{
9635  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
9636}
9637
9638_LT_EOF
9639esac
9640
9641case $lt_shell_append in
9642  yes)
9643    cat << \_LT_EOF >> "$cfgfile"
9644
9645# func_append var value
9646# Append VALUE to the end of shell variable VAR.
9647func_append ()
9648{
9649  eval "$[1]+=\$[2]"
9650}
9651_LT_EOF
9652    ;;
9653  *)
9654    cat << \_LT_EOF >> "$cfgfile"
9655
9656# func_append var value
9657# Append VALUE to the end of shell variable VAR.
9658func_append ()
9659{
9660  eval "$[1]=\$$[1]\$[2]"
9661}
9662
9663_LT_EOF
9664    ;;
9665  esac
9666])
9667
9668# Helper functions for option handling.                    -*- Autoconf -*-
9669#
9670#   Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9671#   Written by Gary V. Vaughan, 2004
9672#
9673# This file is free software; the Free Software Foundation gives
9674# unlimited permission to copy and/or distribute it, with or without
9675# modifications, as long as this notice is preserved.
9676
9677# serial 6 ltoptions.m4
9678
9679# This is to help aclocal find these macros, as it can't see m4_define.
9680AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9681
9682
9683# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9684# ------------------------------------------
9685m4_define([_LT_MANGLE_OPTION],
9686[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9687
9688
9689# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9690# ---------------------------------------
9691# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9692# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
9693# saved as a flag.
9694m4_define([_LT_SET_OPTION],
9695[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9696m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9697        _LT_MANGLE_DEFUN([$1], [$2]),
9698    [m4_warning([Unknown $1 option `$2'])])[]dnl
9699])
9700
9701
9702# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9703# ------------------------------------------------------------
9704# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9705m4_define([_LT_IF_OPTION],
9706[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9707
9708
9709# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9710# -------------------------------------------------------
9711# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9712# are set.
9713m4_define([_LT_UNLESS_OPTIONS],
9714[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9715	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9716		      [m4_define([$0_found])])])[]dnl
9717m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9718])[]dnl
9719])
9720
9721
9722# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9723# ----------------------------------------
9724# OPTION-LIST is a space-separated list of Libtool options associated
9725# with MACRO-NAME.  If any OPTION has a matching handler declared with
9726# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9727# the unknown option and exit.
9728m4_defun([_LT_SET_OPTIONS],
9729[# Set options
9730m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9731    [_LT_SET_OPTION([$1], _LT_Option)])
9732
9733m4_if([$1],[LT_INIT],[
9734  dnl
9735  dnl Simply set some default values (i.e off) if boolean options were not
9736  dnl specified:
9737  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9738  ])
9739  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9740  ])
9741  dnl
9742  dnl If no reference was made to various pairs of opposing options, then
9743  dnl we run the default mode handler for the pair.  For example, if neither
9744  dnl `shared' nor `disable-shared' was passed, we enable building of shared
9745  dnl archives by default:
9746  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9747  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9748  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9749  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9750  		   [_LT_ENABLE_FAST_INSTALL])
9751  ])
9752])# _LT_SET_OPTIONS
9753
9754
9755
9756# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9757# -----------------------------------------
9758m4_define([_LT_MANGLE_DEFUN],
9759[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9760
9761
9762# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9763# -----------------------------------------------
9764m4_define([LT_OPTION_DEFINE],
9765[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9766])# LT_OPTION_DEFINE
9767
9768
9769# dlopen
9770# ------
9771LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9772])
9773
9774AU_DEFUN([AC_LIBTOOL_DLOPEN],
9775[_LT_SET_OPTION([LT_INIT], [dlopen])
9776AC_DIAGNOSE([obsolete],
9777[$0: Remove this warning and the call to _LT_SET_OPTION when you
9778put the `dlopen' option into LT_INIT's first parameter.])
9779])
9780
9781dnl aclocal-1.4 backwards compatibility:
9782dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9783
9784
9785# win32-dll
9786# ---------
9787# Declare package support for building win32 dll's.
9788LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9789[enable_win32_dll=yes
9790
9791case $host in
9792*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
9793  AC_CHECK_TOOL(AS, as, false)
9794  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9795  AC_CHECK_TOOL(OBJDUMP, objdump, false)
9796  ;;
9797esac
9798
9799test -z "$AS" && AS=as
9800_LT_DECL([], [AS],      [0], [Assembler program])dnl
9801
9802test -z "$DLLTOOL" && DLLTOOL=dlltool
9803_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
9804
9805test -z "$OBJDUMP" && OBJDUMP=objdump
9806_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
9807])# win32-dll
9808
9809AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9810[AC_REQUIRE([AC_CANONICAL_HOST])dnl
9811_LT_SET_OPTION([LT_INIT], [win32-dll])
9812AC_DIAGNOSE([obsolete],
9813[$0: Remove this warning and the call to _LT_SET_OPTION when you
9814put the `win32-dll' option into LT_INIT's first parameter.])
9815])
9816
9817dnl aclocal-1.4 backwards compatibility:
9818dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9819
9820
9821# _LT_ENABLE_SHARED([DEFAULT])
9822# ----------------------------
9823# implement the --enable-shared flag, and supports the `shared' and
9824# `disable-shared' LT_INIT options.
9825# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9826m4_define([_LT_ENABLE_SHARED],
9827[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9828AC_ARG_ENABLE([shared],
9829    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9830	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9831    [p=${PACKAGE-default}
9832    case $enableval in
9833    yes) enable_shared=yes ;;
9834    no) enable_shared=no ;;
9835    *)
9836      enable_shared=no
9837      # Look at the argument we got.  We use all the common list separators.
9838      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9839      for pkg in $enableval; do
9840	IFS="$lt_save_ifs"
9841	if test "X$pkg" = "X$p"; then
9842	  enable_shared=yes
9843	fi
9844      done
9845      IFS="$lt_save_ifs"
9846      ;;
9847    esac],
9848    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9849
9850    _LT_DECL([build_libtool_libs], [enable_shared], [0],
9851	[Whether or not to build shared libraries])
9852])# _LT_ENABLE_SHARED
9853
9854LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9855LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9856
9857# Old names:
9858AC_DEFUN([AC_ENABLE_SHARED],
9859[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9860])
9861
9862AC_DEFUN([AC_DISABLE_SHARED],
9863[_LT_SET_OPTION([LT_INIT], [disable-shared])
9864])
9865
9866AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9867AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9868
9869dnl aclocal-1.4 backwards compatibility:
9870dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9871dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9872
9873
9874
9875# _LT_ENABLE_STATIC([DEFAULT])
9876# ----------------------------
9877# implement the --enable-static flag, and support the `static' and
9878# `disable-static' LT_INIT options.
9879# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9880m4_define([_LT_ENABLE_STATIC],
9881[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9882AC_ARG_ENABLE([static],
9883    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9884	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9885    [p=${PACKAGE-default}
9886    case $enableval in
9887    yes) enable_static=yes ;;
9888    no) enable_static=no ;;
9889    *)
9890     enable_static=no
9891      # Look at the argument we got.  We use all the common list separators.
9892      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9893      for pkg in $enableval; do
9894	IFS="$lt_save_ifs"
9895	if test "X$pkg" = "X$p"; then
9896	  enable_static=yes
9897	fi
9898      done
9899      IFS="$lt_save_ifs"
9900      ;;
9901    esac],
9902    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9903
9904    _LT_DECL([build_old_libs], [enable_static], [0],
9905	[Whether or not to build static libraries])
9906])# _LT_ENABLE_STATIC
9907
9908LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9909LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9910
9911# Old names:
9912AC_DEFUN([AC_ENABLE_STATIC],
9913[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9914])
9915
9916AC_DEFUN([AC_DISABLE_STATIC],
9917[_LT_SET_OPTION([LT_INIT], [disable-static])
9918])
9919
9920AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9921AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9922
9923dnl aclocal-1.4 backwards compatibility:
9924dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9925dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9926
9927
9928
9929# _LT_ENABLE_FAST_INSTALL([DEFAULT])
9930# ----------------------------------
9931# implement the --enable-fast-install flag, and support the `fast-install'
9932# and `disable-fast-install' LT_INIT options.
9933# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9934m4_define([_LT_ENABLE_FAST_INSTALL],
9935[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9936AC_ARG_ENABLE([fast-install],
9937    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9938    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9939    [p=${PACKAGE-default}
9940    case $enableval in
9941    yes) enable_fast_install=yes ;;
9942    no) enable_fast_install=no ;;
9943    *)
9944      enable_fast_install=no
9945      # Look at the argument we got.  We use all the common list separators.
9946      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9947      for pkg in $enableval; do
9948	IFS="$lt_save_ifs"
9949	if test "X$pkg" = "X$p"; then
9950	  enable_fast_install=yes
9951	fi
9952      done
9953      IFS="$lt_save_ifs"
9954      ;;
9955    esac],
9956    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9957
9958_LT_DECL([fast_install], [enable_fast_install], [0],
9959	 [Whether or not to optimize for fast installation])dnl
9960])# _LT_ENABLE_FAST_INSTALL
9961
9962LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9963LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9964
9965# Old names:
9966AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9967[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9968AC_DIAGNOSE([obsolete],
9969[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9970the `fast-install' option into LT_INIT's first parameter.])
9971])
9972
9973AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9974[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9975AC_DIAGNOSE([obsolete],
9976[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9977the `disable-fast-install' option into LT_INIT's first parameter.])
9978])
9979
9980dnl aclocal-1.4 backwards compatibility:
9981dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9982dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9983
9984
9985# _LT_WITH_PIC([MODE])
9986# --------------------
9987# implement the --with-pic flag, and support the `pic-only' and `no-pic'
9988# LT_INIT options.
9989# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
9990m4_define([_LT_WITH_PIC],
9991[AC_ARG_WITH([pic],
9992    [AS_HELP_STRING([--with-pic],
9993	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9994    [pic_mode="$withval"],
9995    [pic_mode=default])
9996
9997test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9998
9999_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
10000])# _LT_WITH_PIC
10001
10002LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
10003LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
10004
10005# Old name:
10006AU_DEFUN([AC_LIBTOOL_PICMODE],
10007[_LT_SET_OPTION([LT_INIT], [pic-only])
10008AC_DIAGNOSE([obsolete],
10009[$0: Remove this warning and the call to _LT_SET_OPTION when you
10010put the `pic-only' option into LT_INIT's first parameter.])
10011])
10012
10013dnl aclocal-1.4 backwards compatibility:
10014dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
10015
10016
10017m4_define([_LTDL_MODE], [])
10018LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
10019		 [m4_define([_LTDL_MODE], [nonrecursive])])
10020LT_OPTION_DEFINE([LTDL_INIT], [recursive],
10021		 [m4_define([_LTDL_MODE], [recursive])])
10022LT_OPTION_DEFINE([LTDL_INIT], [subproject],
10023		 [m4_define([_LTDL_MODE], [subproject])])
10024
10025m4_define([_LTDL_TYPE], [])
10026LT_OPTION_DEFINE([LTDL_INIT], [installable],
10027		 [m4_define([_LTDL_TYPE], [installable])])
10028LT_OPTION_DEFINE([LTDL_INIT], [convenience],
10029		 [m4_define([_LTDL_TYPE], [convenience])])
10030
10031# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
10032#
10033# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
10034# Written by Gary V. Vaughan, 2004
10035#
10036# This file is free software; the Free Software Foundation gives
10037# unlimited permission to copy and/or distribute it, with or without
10038# modifications, as long as this notice is preserved.
10039
10040# serial 6 ltsugar.m4
10041
10042# This is to help aclocal find these macros, as it can't see m4_define.
10043AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
10044
10045
10046# lt_join(SEP, ARG1, [ARG2...])
10047# -----------------------------
10048# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
10049# associated separator.
10050# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
10051# versions in m4sugar had bugs.
10052m4_define([lt_join],
10053[m4_if([$#], [1], [],
10054       [$#], [2], [[$2]],
10055       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
10056m4_define([_lt_join],
10057[m4_if([$#$2], [2], [],
10058       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
10059
10060
10061# lt_car(LIST)
10062# lt_cdr(LIST)
10063# ------------
10064# Manipulate m4 lists.
10065# These macros are necessary as long as will still need to support
10066# Autoconf-2.59 which quotes differently.
10067m4_define([lt_car], [[$1]])
10068m4_define([lt_cdr],
10069[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
10070       [$#], 1, [],
10071       [m4_dquote(m4_shift($@))])])
10072m4_define([lt_unquote], $1)
10073
10074
10075# lt_append(MACRO-NAME, STRING, [SEPARATOR])
10076# ------------------------------------------
10077# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
10078# Note that neither SEPARATOR nor STRING are expanded; they are appended
10079# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
10080# No SEPARATOR is output if MACRO-NAME was previously undefined (different
10081# than defined and empty).
10082#
10083# This macro is needed until we can rely on Autoconf 2.62, since earlier
10084# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
10085m4_define([lt_append],
10086[m4_define([$1],
10087	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
10088
10089
10090
10091# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
10092# ----------------------------------------------------------
10093# Produce a SEP delimited list of all paired combinations of elements of
10094# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
10095# has the form PREFIXmINFIXSUFFIXn.
10096# Needed until we can rely on m4_combine added in Autoconf 2.62.
10097m4_define([lt_combine],
10098[m4_if(m4_eval([$# > 3]), [1],
10099       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
10100[[m4_foreach([_Lt_prefix], [$2],
10101	     [m4_foreach([_Lt_suffix],
10102		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
10103	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
10104
10105
10106# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
10107# -----------------------------------------------------------------------
10108# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
10109# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
10110m4_define([lt_if_append_uniq],
10111[m4_ifdef([$1],
10112	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
10113		 [lt_append([$1], [$2], [$3])$4],
10114		 [$5])],
10115	  [lt_append([$1], [$2], [$3])$4])])
10116
10117
10118# lt_dict_add(DICT, KEY, VALUE)
10119# -----------------------------
10120m4_define([lt_dict_add],
10121[m4_define([$1($2)], [$3])])
10122
10123
10124# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
10125# --------------------------------------------
10126m4_define([lt_dict_add_subkey],
10127[m4_define([$1($2:$3)], [$4])])
10128
10129
10130# lt_dict_fetch(DICT, KEY, [SUBKEY])
10131# ----------------------------------
10132m4_define([lt_dict_fetch],
10133[m4_ifval([$3],
10134	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
10135    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
10136
10137
10138# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
10139# -----------------------------------------------------------------
10140m4_define([lt_if_dict_fetch],
10141[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
10142	[$5],
10143    [$6])])
10144
10145
10146# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
10147# --------------------------------------------------------------
10148m4_define([lt_dict_filter],
10149[m4_if([$5], [], [],
10150  [lt_join(m4_quote(m4_default([$4], [[, ]])),
10151           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
10152		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
10153])
10154
10155# ltversion.m4 -- version numbers			-*- Autoconf -*-
10156#
10157#   Copyright (C) 2004 Free Software Foundation, Inc.
10158#   Written by Scott James Remnant, 2004
10159#
10160# This file is free software; the Free Software Foundation gives
10161# unlimited permission to copy and/or distribute it, with or without
10162# modifications, as long as this notice is preserved.
10163
10164# Generated from ltversion.in.
10165
10166# serial 3012 ltversion.m4
10167# This file is part of GNU Libtool
10168
10169m4_define([LT_PACKAGE_VERSION], [2.2.6])
10170m4_define([LT_PACKAGE_REVISION], [1.3012])
10171
10172AC_DEFUN([LTVERSION_VERSION],
10173[macro_version='2.2.6'
10174macro_revision='1.3012'
10175_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
10176_LT_DECL(, macro_revision, 0)
10177])
10178
10179# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
10180#
10181#   Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
10182#   Written by Scott James Remnant, 2004.
10183#
10184# This file is free software; the Free Software Foundation gives
10185# unlimited permission to copy and/or distribute it, with or without
10186# modifications, as long as this notice is preserved.
10187
10188# serial 4 lt~obsolete.m4
10189
10190# These exist entirely to fool aclocal when bootstrapping libtool.
10191#
10192# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
10193# which have later been changed to m4_define as they aren't part of the
10194# exported API, or moved to Autoconf or Automake where they belong.
10195#
10196# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
10197# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
10198# using a macro with the same name in our local m4/libtool.m4 it'll
10199# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
10200# and doesn't know about Autoconf macros at all.)
10201#
10202# So we provide this file, which has a silly filename so it's always
10203# included after everything else.  This provides aclocal with the
10204# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
10205# because those macros already exist, or will be overwritten later.
10206# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
10207#
10208# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
10209# Yes, that means every name once taken will need to remain here until
10210# we give up compatibility with versions before 1.7, at which point
10211# we need to keep only those names which we still refer to.
10212
10213# This is to help aclocal find these macros, as it can't see m4_define.
10214AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
10215
10216m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
10217m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
10218m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
10219m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
10220m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
10221m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
10222m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
10223m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
10224m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
10225m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
10226m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
10227m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
10228m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
10229m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
10230m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
10231m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
10232m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
10233m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
10234m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
10235m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
10236m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
10237m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
10238m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
10239m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
10240m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
10241m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
10242m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
10243m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
10244m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
10245m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
10246m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
10247m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
10248m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
10249m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
10250m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
10251m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
10252m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
10253m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
10254m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
10255m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
10256m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
10257m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
10258m4_ifndef([AC_LIBTOOL_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
10259m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
10260m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
10261m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
10262m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
10263m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
10264m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
10265m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
10266m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
10267m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
10268m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
10269m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
10270m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
10271
10272