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