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