aclocal.m4 revision 629baa8c
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.68],,
17[m4_warning([this file was generated for autoconf 2.68.
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
1019m4_include([m4/ax_define_dir.m4])
1020# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1021#
1022#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1023#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
1024#                 Inc.
1025#   Written by Gordon Matzigkeit, 1996
1026#
1027# This file is free software; the Free Software Foundation gives
1028# unlimited permission to copy and/or distribute it, with or without
1029# modifications, as long as this notice is preserved.
1030
1031m4_define([_LT_COPYING], [dnl
1032#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1033#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
1034#                 Inc.
1035#   Written by Gordon Matzigkeit, 1996
1036#
1037#   This file is part of GNU Libtool.
1038#
1039# GNU Libtool is free software; you can redistribute it and/or
1040# modify it under the terms of the GNU General Public License as
1041# published by the Free Software Foundation; either version 2 of
1042# the License, or (at your option) any later version.
1043#
1044# As a special exception to the GNU General Public License,
1045# if you distribute this file as part of a program or library that
1046# is built using GNU Libtool, you may include this file under the
1047# same distribution terms that you use for the rest of that program.
1048#
1049# GNU Libtool is distributed in the hope that it will be useful,
1050# but WITHOUT ANY WARRANTY; without even the implied warranty of
1051# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1052# GNU General Public License for more details.
1053#
1054# You should have received a copy of the GNU General Public License
1055# along with GNU Libtool; see the file COPYING.  If not, a copy
1056# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1057# obtained by writing to the Free Software Foundation, Inc.,
1058# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1059])
1060
1061# serial 57 LT_INIT
1062
1063
1064# LT_PREREQ(VERSION)
1065# ------------------
1066# Complain and exit if this libtool version is less that VERSION.
1067m4_defun([LT_PREREQ],
1068[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1069       [m4_default([$3],
1070		   [m4_fatal([Libtool version $1 or higher is required],
1071		             63)])],
1072       [$2])])
1073
1074
1075# _LT_CHECK_BUILDDIR
1076# ------------------
1077# Complain if the absolute build directory name contains unusual characters
1078m4_defun([_LT_CHECK_BUILDDIR],
1079[case `pwd` in
1080  *\ * | *\	*)
1081    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1082esac
1083])
1084
1085
1086# LT_INIT([OPTIONS])
1087# ------------------
1088AC_DEFUN([LT_INIT],
1089[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
1090AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1091AC_BEFORE([$0], [LT_LANG])dnl
1092AC_BEFORE([$0], [LT_OUTPUT])dnl
1093AC_BEFORE([$0], [LTDL_INIT])dnl
1094m4_require([_LT_CHECK_BUILDDIR])dnl
1095
1096dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1097m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1098m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1099dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1100dnl unless we require an AC_DEFUNed macro:
1101AC_REQUIRE([LTOPTIONS_VERSION])dnl
1102AC_REQUIRE([LTSUGAR_VERSION])dnl
1103AC_REQUIRE([LTVERSION_VERSION])dnl
1104AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1105m4_require([_LT_PROG_LTMAIN])dnl
1106
1107_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
1108
1109dnl Parse OPTIONS
1110_LT_SET_OPTIONS([$0], [$1])
1111
1112# This can be used to rebuild libtool when needed
1113LIBTOOL_DEPS="$ltmain"
1114
1115# Always use our own libtool.
1116LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1117AC_SUBST(LIBTOOL)dnl
1118
1119_LT_SETUP
1120
1121# Only expand once:
1122m4_define([LT_INIT])
1123])# LT_INIT
1124
1125# Old names:
1126AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1127AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1128dnl aclocal-1.4 backwards compatibility:
1129dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1130dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1131
1132
1133# _LT_CC_BASENAME(CC)
1134# -------------------
1135# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1136m4_defun([_LT_CC_BASENAME],
1137[for cc_temp in $1""; do
1138  case $cc_temp in
1139    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1140    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1141    \-*) ;;
1142    *) break;;
1143  esac
1144done
1145cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
1146])
1147
1148
1149# _LT_FILEUTILS_DEFAULTS
1150# ----------------------
1151# It is okay to use these file commands and assume they have been set
1152# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1153m4_defun([_LT_FILEUTILS_DEFAULTS],
1154[: ${CP="cp -f"}
1155: ${MV="mv -f"}
1156: ${RM="rm -f"}
1157])# _LT_FILEUTILS_DEFAULTS
1158
1159
1160# _LT_SETUP
1161# ---------
1162m4_defun([_LT_SETUP],
1163[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1164AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1165AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1166AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1167
1168_LT_DECL([], [host_alias], [0], [The host system])dnl
1169_LT_DECL([], [host], [0])dnl
1170_LT_DECL([], [host_os], [0])dnl
1171dnl
1172_LT_DECL([], [build_alias], [0], [The build system])dnl
1173_LT_DECL([], [build], [0])dnl
1174_LT_DECL([], [build_os], [0])dnl
1175dnl
1176AC_REQUIRE([AC_PROG_CC])dnl
1177AC_REQUIRE([LT_PATH_LD])dnl
1178AC_REQUIRE([LT_PATH_NM])dnl
1179dnl
1180AC_REQUIRE([AC_PROG_LN_S])dnl
1181test -z "$LN_S" && LN_S="ln -s"
1182_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1183dnl
1184AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1185_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1186_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1187dnl
1188m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1189m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1190m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
1191m4_require([_LT_CMD_RELOAD])dnl
1192m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1193m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
1194m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1195m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1196m4_require([_LT_WITH_SYSROOT])dnl
1197
1198_LT_CONFIG_LIBTOOL_INIT([
1199# See if we are running on zsh, and set the options which allow our
1200# commands through without removal of \ escapes INIT.
1201if test -n "\${ZSH_VERSION+set}" ; then
1202   setopt NO_GLOB_SUBST
1203fi
1204])
1205if test -n "${ZSH_VERSION+set}" ; then
1206   setopt NO_GLOB_SUBST
1207fi
1208
1209_LT_CHECK_OBJDIR
1210
1211m4_require([_LT_TAG_COMPILER])dnl
1212
1213case $host_os in
1214aix3*)
1215  # AIX sometimes has problems with the GCC collect2 program.  For some
1216  # reason, if we set the COLLECT_NAMES environment variable, the problems
1217  # vanish in a puff of smoke.
1218  if test "X${COLLECT_NAMES+set}" != Xset; then
1219    COLLECT_NAMES=
1220    export COLLECT_NAMES
1221  fi
1222  ;;
1223esac
1224
1225# Global variables:
1226ofile=libtool
1227can_build_shared=yes
1228
1229# All known linkers require a `.a' archive for static linking (except MSVC,
1230# which needs '.lib').
1231libext=a
1232
1233with_gnu_ld="$lt_cv_prog_gnu_ld"
1234
1235old_CC="$CC"
1236old_CFLAGS="$CFLAGS"
1237
1238# Set sane defaults for various variables
1239test -z "$CC" && CC=cc
1240test -z "$LTCC" && LTCC=$CC
1241test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1242test -z "$LD" && LD=ld
1243test -z "$ac_objext" && ac_objext=o
1244
1245_LT_CC_BASENAME([$compiler])
1246
1247# Only perform the check for file, if the check method requires it
1248test -z "$MAGIC_CMD" && MAGIC_CMD=file
1249case $deplibs_check_method in
1250file_magic*)
1251  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1252    _LT_PATH_MAGIC
1253  fi
1254  ;;
1255esac
1256
1257# Use C for the default configuration in the libtool script
1258LT_SUPPORTED_TAG([CC])
1259_LT_LANG_C_CONFIG
1260_LT_LANG_DEFAULT_CONFIG
1261_LT_CONFIG_COMMANDS
1262])# _LT_SETUP
1263
1264
1265# _LT_PREPARE_SED_QUOTE_VARS
1266# --------------------------
1267# Define a few sed substitution that help us do robust quoting.
1268m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
1269[# Backslashify metacharacters that are still active within
1270# double-quoted strings.
1271sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1272
1273# Same as above, but do not quote variable references.
1274double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1275
1276# Sed substitution to delay expansion of an escaped shell variable in a
1277# double_quote_subst'ed string.
1278delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1279
1280# Sed substitution to delay expansion of an escaped single quote.
1281delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1282
1283# Sed substitution to avoid accidental globbing in evaled expressions
1284no_glob_subst='s/\*/\\\*/g'
1285])
1286
1287# _LT_PROG_LTMAIN
1288# ---------------
1289# Note that this code is called both from `configure', and `config.status'
1290# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
1291# `config.status' has no value for ac_aux_dir unless we are using Automake,
1292# so we pass a copy along to make sure it has a sensible value anyway.
1293m4_defun([_LT_PROG_LTMAIN],
1294[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1295_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1296ltmain="$ac_aux_dir/ltmain.sh"
1297])# _LT_PROG_LTMAIN
1298
1299
1300
1301# So that we can recreate a full libtool script including additional
1302# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1303# in macros and then make a single call at the end using the `libtool'
1304# label.
1305
1306
1307# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1308# ----------------------------------------
1309# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1310m4_define([_LT_CONFIG_LIBTOOL_INIT],
1311[m4_ifval([$1],
1312          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1313                     [$1
1314])])])
1315
1316# Initialize.
1317m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1318
1319
1320# _LT_CONFIG_LIBTOOL([COMMANDS])
1321# ------------------------------
1322# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1323m4_define([_LT_CONFIG_LIBTOOL],
1324[m4_ifval([$1],
1325          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1326                     [$1
1327])])])
1328
1329# Initialize.
1330m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1331
1332
1333# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1334# -----------------------------------------------------
1335m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1336[_LT_CONFIG_LIBTOOL([$1])
1337_LT_CONFIG_LIBTOOL_INIT([$2])
1338])
1339
1340
1341# _LT_FORMAT_COMMENT([COMMENT])
1342# -----------------------------
1343# Add leading comment marks to the start of each line, and a trailing
1344# full-stop to the whole comment if one is not present already.
1345m4_define([_LT_FORMAT_COMMENT],
1346[m4_ifval([$1], [
1347m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1348              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1349)])
1350
1351
1352
1353
1354
1355# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1356# -------------------------------------------------------------------
1357# CONFIGNAME is the name given to the value in the libtool script.
1358# VARNAME is the (base) name used in the configure script.
1359# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1360# VARNAME.  Any other value will be used directly.
1361m4_define([_LT_DECL],
1362[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1363    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1364	[m4_ifval([$1], [$1], [$2])])
1365    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1366    m4_ifval([$4],
1367	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1368    lt_dict_add_subkey([lt_decl_dict], [$2],
1369	[tagged?], [m4_ifval([$5], [yes], [no])])])
1370])
1371
1372
1373# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1374# --------------------------------------------------------
1375m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1376
1377
1378# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1379# ------------------------------------------------
1380m4_define([lt_decl_tag_varnames],
1381[_lt_decl_filter([tagged?], [yes], $@)])
1382
1383
1384# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1385# ---------------------------------------------------------
1386m4_define([_lt_decl_filter],
1387[m4_case([$#],
1388  [0], [m4_fatal([$0: too few arguments: $#])],
1389  [1], [m4_fatal([$0: too few arguments: $#: $1])],
1390  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1391  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1392  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1393])
1394
1395
1396# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1397# --------------------------------------------------
1398m4_define([lt_decl_quote_varnames],
1399[_lt_decl_filter([value], [1], $@)])
1400
1401
1402# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1403# ---------------------------------------------------
1404m4_define([lt_decl_dquote_varnames],
1405[_lt_decl_filter([value], [2], $@)])
1406
1407
1408# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1409# ---------------------------------------------------
1410m4_define([lt_decl_varnames_tagged],
1411[m4_assert([$# <= 2])dnl
1412_$0(m4_quote(m4_default([$1], [[, ]])),
1413    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1414    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1415m4_define([_lt_decl_varnames_tagged],
1416[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1417
1418
1419# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1420# ------------------------------------------------
1421m4_define([lt_decl_all_varnames],
1422[_$0(m4_quote(m4_default([$1], [[, ]])),
1423     m4_if([$2], [],
1424	   m4_quote(lt_decl_varnames),
1425	m4_quote(m4_shift($@))))[]dnl
1426])
1427m4_define([_lt_decl_all_varnames],
1428[lt_join($@, lt_decl_varnames_tagged([$1],
1429			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1430])
1431
1432
1433# _LT_CONFIG_STATUS_DECLARE([VARNAME])
1434# ------------------------------------
1435# Quote a variable value, and forward it to `config.status' so that its
1436# declaration there will have the same value as in `configure'.  VARNAME
1437# must have a single quote delimited value for this to work.
1438m4_define([_LT_CONFIG_STATUS_DECLARE],
1439[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
1440
1441
1442# _LT_CONFIG_STATUS_DECLARATIONS
1443# ------------------------------
1444# We delimit libtool config variables with single quotes, so when
1445# we write them to config.status, we have to be sure to quote all
1446# embedded single quotes properly.  In configure, this macro expands
1447# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1448#
1449#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
1450m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1451[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1452    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1453
1454
1455# _LT_LIBTOOL_TAGS
1456# ----------------
1457# Output comment and list of tags supported by the script
1458m4_defun([_LT_LIBTOOL_TAGS],
1459[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1460available_tags="_LT_TAGS"dnl
1461])
1462
1463
1464# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1465# -----------------------------------
1466# Extract the dictionary values for VARNAME (optionally with TAG) and
1467# expand to a commented shell variable setting:
1468#
1469#    # Some comment about what VAR is for.
1470#    visible_name=$lt_internal_name
1471m4_define([_LT_LIBTOOL_DECLARE],
1472[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1473					   [description])))[]dnl
1474m4_pushdef([_libtool_name],
1475    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1476m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1477    [0], [_libtool_name=[$]$1],
1478    [1], [_libtool_name=$lt_[]$1],
1479    [2], [_libtool_name=$lt_[]$1],
1480    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1481m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1482])
1483
1484
1485# _LT_LIBTOOL_CONFIG_VARS
1486# -----------------------
1487# Produce commented declarations of non-tagged libtool config variables
1488# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1489# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
1490# section) are produced by _LT_LIBTOOL_TAG_VARS.
1491m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1492[m4_foreach([_lt_var],
1493    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1494    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1495
1496
1497# _LT_LIBTOOL_TAG_VARS(TAG)
1498# -------------------------
1499m4_define([_LT_LIBTOOL_TAG_VARS],
1500[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1501    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1502
1503
1504# _LT_TAGVAR(VARNAME, [TAGNAME])
1505# ------------------------------
1506m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1507
1508
1509# _LT_CONFIG_COMMANDS
1510# -------------------
1511# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
1512# variables for single and double quote escaping we saved from calls
1513# to _LT_DECL, we can put quote escaped variables declarations
1514# into `config.status', and then the shell code to quote escape them in
1515# for loops in `config.status'.  Finally, any additional code accumulated
1516# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1517m4_defun([_LT_CONFIG_COMMANDS],
1518[AC_PROVIDE_IFELSE([LT_OUTPUT],
1519	dnl If the libtool generation code has been placed in $CONFIG_LT,
1520	dnl instead of duplicating it all over again into config.status,
1521	dnl then we will have config.status run $CONFIG_LT later, so it
1522	dnl needs to know what name is stored there:
1523        [AC_CONFIG_COMMANDS([libtool],
1524            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1525    dnl If the libtool generation code is destined for config.status,
1526    dnl expand the accumulated commands and init code now:
1527    [AC_CONFIG_COMMANDS([libtool],
1528        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1529])#_LT_CONFIG_COMMANDS
1530
1531
1532# Initialize.
1533m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1534[
1535
1536# The HP-UX ksh and POSIX shell print the target directory to stdout
1537# if CDPATH is set.
1538(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1539
1540sed_quote_subst='$sed_quote_subst'
1541double_quote_subst='$double_quote_subst'
1542delay_variable_subst='$delay_variable_subst'
1543_LT_CONFIG_STATUS_DECLARATIONS
1544LTCC='$LTCC'
1545LTCFLAGS='$LTCFLAGS'
1546compiler='$compiler_DEFAULT'
1547
1548# A function that is used when there is no print builtin or printf.
1549func_fallback_echo ()
1550{
1551  eval 'cat <<_LTECHO_EOF
1552\$[]1
1553_LTECHO_EOF'
1554}
1555
1556# Quote evaled strings.
1557for var in lt_decl_all_varnames([[ \
1558]], lt_decl_quote_varnames); do
1559    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1560    *[[\\\\\\\`\\"\\\$]]*)
1561      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1562      ;;
1563    *)
1564      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1565      ;;
1566    esac
1567done
1568
1569# Double-quote double-evaled strings.
1570for var in lt_decl_all_varnames([[ \
1571]], lt_decl_dquote_varnames); do
1572    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1573    *[[\\\\\\\`\\"\\\$]]*)
1574      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1575      ;;
1576    *)
1577      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1578      ;;
1579    esac
1580done
1581
1582_LT_OUTPUT_LIBTOOL_INIT
1583])
1584
1585# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
1586# ------------------------------------
1587# Generate a child script FILE with all initialization necessary to
1588# reuse the environment learned by the parent script, and make the
1589# file executable.  If COMMENT is supplied, it is inserted after the
1590# `#!' sequence but before initialization text begins.  After this
1591# macro, additional text can be appended to FILE to form the body of
1592# the child script.  The macro ends with non-zero status if the
1593# file could not be fully written (such as if the disk is full).
1594m4_ifdef([AS_INIT_GENERATED],
1595[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
1596[m4_defun([_LT_GENERATED_FILE_INIT],
1597[m4_require([AS_PREPARE])]dnl
1598[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
1599[lt_write_fail=0
1600cat >$1 <<_ASEOF || lt_write_fail=1
1601#! $SHELL
1602# Generated by $as_me.
1603$2
1604SHELL=\${CONFIG_SHELL-$SHELL}
1605export SHELL
1606_ASEOF
1607cat >>$1 <<\_ASEOF || lt_write_fail=1
1608AS_SHELL_SANITIZE
1609_AS_PREPARE
1610exec AS_MESSAGE_FD>&1
1611_ASEOF
1612test $lt_write_fail = 0 && chmod +x $1[]dnl
1613m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
1614
1615# LT_OUTPUT
1616# ---------
1617# This macro allows early generation of the libtool script (before
1618# AC_OUTPUT is called), incase it is used in configure for compilation
1619# tests.
1620AC_DEFUN([LT_OUTPUT],
1621[: ${CONFIG_LT=./config.lt}
1622AC_MSG_NOTICE([creating $CONFIG_LT])
1623_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
1624[# Run this file to recreate a libtool stub with the current configuration.])
1625
1626cat >>"$CONFIG_LT" <<\_LTEOF
1627lt_cl_silent=false
1628exec AS_MESSAGE_LOG_FD>>config.log
1629{
1630  echo
1631  AS_BOX([Running $as_me.])
1632} >&AS_MESSAGE_LOG_FD
1633
1634lt_cl_help="\
1635\`$as_me' creates a local libtool stub from the current configuration,
1636for use in further configure time tests before the real libtool is
1637generated.
1638
1639Usage: $[0] [[OPTIONS]]
1640
1641  -h, --help      print this help, then exit
1642  -V, --version   print version number, then exit
1643  -q, --quiet     do not print progress messages
1644  -d, --debug     don't remove temporary files
1645
1646Report bugs to <bug-libtool@gnu.org>."
1647
1648lt_cl_version="\
1649m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
1650m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
1651configured by $[0], generated by m4_PACKAGE_STRING.
1652
1653Copyright (C) 2010 Free Software Foundation, Inc.
1654This config.lt script is free software; the Free Software Foundation
1655gives unlimited permision to copy, distribute and modify it."
1656
1657while test $[#] != 0
1658do
1659  case $[1] in
1660    --version | --v* | -V )
1661      echo "$lt_cl_version"; exit 0 ;;
1662    --help | --h* | -h )
1663      echo "$lt_cl_help"; exit 0 ;;
1664    --debug | --d* | -d )
1665      debug=: ;;
1666    --quiet | --q* | --silent | --s* | -q )
1667      lt_cl_silent=: ;;
1668
1669    -*) AC_MSG_ERROR([unrecognized option: $[1]
1670Try \`$[0] --help' for more information.]) ;;
1671
1672    *) AC_MSG_ERROR([unrecognized argument: $[1]
1673Try \`$[0] --help' for more information.]) ;;
1674  esac
1675  shift
1676done
1677
1678if $lt_cl_silent; then
1679  exec AS_MESSAGE_FD>/dev/null
1680fi
1681_LTEOF
1682
1683cat >>"$CONFIG_LT" <<_LTEOF
1684_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
1685_LTEOF
1686
1687cat >>"$CONFIG_LT" <<\_LTEOF
1688AC_MSG_NOTICE([creating $ofile])
1689_LT_OUTPUT_LIBTOOL_COMMANDS
1690AS_EXIT(0)
1691_LTEOF
1692chmod +x "$CONFIG_LT"
1693
1694# configure is writing to config.log, but config.lt does its own redirection,
1695# appending to config.log, which fails on DOS, as config.log is still kept
1696# open by configure.  Here we exec the FD to /dev/null, effectively closing
1697# config.log, so it can be properly (re)opened and appended to by config.lt.
1698lt_cl_success=:
1699test "$silent" = yes &&
1700  lt_config_lt_args="$lt_config_lt_args --quiet"
1701exec AS_MESSAGE_LOG_FD>/dev/null
1702$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
1703exec AS_MESSAGE_LOG_FD>>config.log
1704$lt_cl_success || AS_EXIT(1)
1705])# LT_OUTPUT
1706
1707
1708# _LT_CONFIG(TAG)
1709# ---------------
1710# If TAG is the built-in tag, create an initial libtool script with a
1711# default configuration from the untagged config vars.  Otherwise add code
1712# to config.status for appending the configuration named by TAG from the
1713# matching tagged config vars.
1714m4_defun([_LT_CONFIG],
1715[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1716_LT_CONFIG_SAVE_COMMANDS([
1717  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
1718  m4_if(_LT_TAG, [C], [
1719    # See if we are running on zsh, and set the options which allow our
1720    # commands through without removal of \ escapes.
1721    if test -n "${ZSH_VERSION+set}" ; then
1722      setopt NO_GLOB_SUBST
1723    fi
1724
1725    cfgfile="${ofile}T"
1726    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
1727    $RM "$cfgfile"
1728
1729    cat <<_LT_EOF >> "$cfgfile"
1730#! $SHELL
1731
1732# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
1733# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
1734# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1735# NOTE: Changes made to this file will be lost: look at ltmain.sh.
1736#
1737_LT_COPYING
1738_LT_LIBTOOL_TAGS
1739
1740# ### BEGIN LIBTOOL CONFIG
1741_LT_LIBTOOL_CONFIG_VARS
1742_LT_LIBTOOL_TAG_VARS
1743# ### END LIBTOOL CONFIG
1744
1745_LT_EOF
1746
1747  case $host_os in
1748  aix3*)
1749    cat <<\_LT_EOF >> "$cfgfile"
1750# AIX sometimes has problems with the GCC collect2 program.  For some
1751# reason, if we set the COLLECT_NAMES environment variable, the problems
1752# vanish in a puff of smoke.
1753if test "X${COLLECT_NAMES+set}" != Xset; then
1754  COLLECT_NAMES=
1755  export COLLECT_NAMES
1756fi
1757_LT_EOF
1758    ;;
1759  esac
1760
1761  _LT_PROG_LTMAIN
1762
1763  # We use sed instead of cat because bash on DJGPP gets confused if
1764  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
1765  # text mode, it properly converts lines to CR/LF.  This bash problem
1766  # is reportedly fixed, but why not run on old versions too?
1767  sed '$q' "$ltmain" >> "$cfgfile" \
1768     || (rm -f "$cfgfile"; exit 1)
1769
1770  _LT_PROG_REPLACE_SHELLFNS
1771
1772   mv -f "$cfgfile" "$ofile" ||
1773    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
1774  chmod +x "$ofile"
1775],
1776[cat <<_LT_EOF >> "$ofile"
1777
1778dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
1779dnl in a comment (ie after a #).
1780# ### BEGIN LIBTOOL TAG CONFIG: $1
1781_LT_LIBTOOL_TAG_VARS(_LT_TAG)
1782# ### END LIBTOOL TAG CONFIG: $1
1783_LT_EOF
1784])dnl /m4_if
1785],
1786[m4_if([$1], [], [
1787    PACKAGE='$PACKAGE'
1788    VERSION='$VERSION'
1789    TIMESTAMP='$TIMESTAMP'
1790    RM='$RM'
1791    ofile='$ofile'], [])
1792])dnl /_LT_CONFIG_SAVE_COMMANDS
1793])# _LT_CONFIG
1794
1795
1796# LT_SUPPORTED_TAG(TAG)
1797# ---------------------
1798# Trace this macro to discover what tags are supported by the libtool
1799# --tag option, using:
1800#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
1801AC_DEFUN([LT_SUPPORTED_TAG], [])
1802
1803
1804# C support is built-in for now
1805m4_define([_LT_LANG_C_enabled], [])
1806m4_define([_LT_TAGS], [])
1807
1808
1809# LT_LANG(LANG)
1810# -------------
1811# Enable libtool support for the given language if not already enabled.
1812AC_DEFUN([LT_LANG],
1813[AC_BEFORE([$0], [LT_OUTPUT])dnl
1814m4_case([$1],
1815  [C],			[_LT_LANG(C)],
1816  [C++],		[_LT_LANG(CXX)],
1817  [Java],		[_LT_LANG(GCJ)],
1818  [Fortran 77],		[_LT_LANG(F77)],
1819  [Fortran],		[_LT_LANG(FC)],
1820  [Windows Resource],	[_LT_LANG(RC)],
1821  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
1822    [_LT_LANG($1)],
1823    [m4_fatal([$0: unsupported language: "$1"])])])dnl
1824])# LT_LANG
1825
1826
1827# _LT_LANG(LANGNAME)
1828# ------------------
1829m4_defun([_LT_LANG],
1830[m4_ifdef([_LT_LANG_]$1[_enabled], [],
1831  [LT_SUPPORTED_TAG([$1])dnl
1832  m4_append([_LT_TAGS], [$1 ])dnl
1833  m4_define([_LT_LANG_]$1[_enabled], [])dnl
1834  _LT_LANG_$1_CONFIG($1)])dnl
1835])# _LT_LANG
1836
1837
1838# _LT_LANG_DEFAULT_CONFIG
1839# -----------------------
1840m4_defun([_LT_LANG_DEFAULT_CONFIG],
1841[AC_PROVIDE_IFELSE([AC_PROG_CXX],
1842  [LT_LANG(CXX)],
1843  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1844
1845AC_PROVIDE_IFELSE([AC_PROG_F77],
1846  [LT_LANG(F77)],
1847  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
1848
1849AC_PROVIDE_IFELSE([AC_PROG_FC],
1850  [LT_LANG(FC)],
1851  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
1852
1853dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
1854dnl pulling things in needlessly.
1855AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1856  [LT_LANG(GCJ)],
1857  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1858    [LT_LANG(GCJ)],
1859    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
1860      [LT_LANG(GCJ)],
1861      [m4_ifdef([AC_PROG_GCJ],
1862	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
1863       m4_ifdef([A][M_PROG_GCJ],
1864	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
1865       m4_ifdef([LT_PROG_GCJ],
1866	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
1867
1868AC_PROVIDE_IFELSE([LT_PROG_RC],
1869  [LT_LANG(RC)],
1870  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
1871])# _LT_LANG_DEFAULT_CONFIG
1872
1873# Obsolete macros:
1874AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
1875AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
1876AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
1877AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
1878AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
1879dnl aclocal-1.4 backwards compatibility:
1880dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
1881dnl AC_DEFUN([AC_LIBTOOL_F77], [])
1882dnl AC_DEFUN([AC_LIBTOOL_FC], [])
1883dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
1884dnl AC_DEFUN([AC_LIBTOOL_RC], [])
1885
1886
1887# _LT_TAG_COMPILER
1888# ----------------
1889m4_defun([_LT_TAG_COMPILER],
1890[AC_REQUIRE([AC_PROG_CC])dnl
1891
1892_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
1893_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
1894_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
1895_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
1896
1897# If no C compiler was specified, use CC.
1898LTCC=${LTCC-"$CC"}
1899
1900# If no C compiler flags were specified, use CFLAGS.
1901LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1902
1903# Allow CC to be a program name with arguments.
1904compiler=$CC
1905])# _LT_TAG_COMPILER
1906
1907
1908# _LT_COMPILER_BOILERPLATE
1909# ------------------------
1910# Check for compiler boilerplate output or warnings with
1911# the simple compiler test code.
1912m4_defun([_LT_COMPILER_BOILERPLATE],
1913[m4_require([_LT_DECL_SED])dnl
1914ac_outfile=conftest.$ac_objext
1915echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1916eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1917_lt_compiler_boilerplate=`cat conftest.err`
1918$RM conftest*
1919])# _LT_COMPILER_BOILERPLATE
1920
1921
1922# _LT_LINKER_BOILERPLATE
1923# ----------------------
1924# Check for linker boilerplate output or warnings with
1925# the simple link test code.
1926m4_defun([_LT_LINKER_BOILERPLATE],
1927[m4_require([_LT_DECL_SED])dnl
1928ac_outfile=conftest.$ac_objext
1929echo "$lt_simple_link_test_code" >conftest.$ac_ext
1930eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1931_lt_linker_boilerplate=`cat conftest.err`
1932$RM -r conftest*
1933])# _LT_LINKER_BOILERPLATE
1934
1935# _LT_REQUIRED_DARWIN_CHECKS
1936# -------------------------
1937m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
1938  case $host_os in
1939    rhapsody* | darwin*)
1940    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1941    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1942    AC_CHECK_TOOL([LIPO], [lipo], [:])
1943    AC_CHECK_TOOL([OTOOL], [otool], [:])
1944    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
1945    _LT_DECL([], [DSYMUTIL], [1],
1946      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
1947    _LT_DECL([], [NMEDIT], [1],
1948      [Tool to change global to local symbols on Mac OS X])
1949    _LT_DECL([], [LIPO], [1],
1950      [Tool to manipulate fat objects and archives on Mac OS X])
1951    _LT_DECL([], [OTOOL], [1],
1952      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
1953    _LT_DECL([], [OTOOL64], [1],
1954      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
1955
1956    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1957      [lt_cv_apple_cc_single_mod=no
1958      if test -z "${LT_MULTI_MODULE}"; then
1959	# By default we will add the -single_module flag. You can override
1960	# by either setting the environment variable LT_MULTI_MODULE
1961	# non-empty at configure time, or by adding -multi_module to the
1962	# link flags.
1963	rm -rf libconftest.dylib*
1964	echo "int foo(void){return 1;}" > conftest.c
1965	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1966-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
1967	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1968	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
1969        _lt_result=$?
1970	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
1971	  lt_cv_apple_cc_single_mod=yes
1972	else
1973	  cat conftest.err >&AS_MESSAGE_LOG_FD
1974	fi
1975	rm -rf libconftest.dylib*
1976	rm -f conftest.*
1977      fi])
1978    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1979      [lt_cv_ld_exported_symbols_list],
1980      [lt_cv_ld_exported_symbols_list=no
1981      save_LDFLAGS=$LDFLAGS
1982      echo "_main" > conftest.sym
1983      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1984      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1985	[lt_cv_ld_exported_symbols_list=yes],
1986	[lt_cv_ld_exported_symbols_list=no])
1987	LDFLAGS="$save_LDFLAGS"
1988    ])
1989    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
1990      [lt_cv_ld_force_load=no
1991      cat > conftest.c << _LT_EOF
1992int forced_loaded() { return 2;}
1993_LT_EOF
1994      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
1995      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1996      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1997      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1998      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
1999      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
2000      cat > conftest.c << _LT_EOF
2001int main() { return 0;}
2002_LT_EOF
2003      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
2004      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
2005      _lt_result=$?
2006      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
2007	lt_cv_ld_force_load=yes
2008      else
2009	cat conftest.err >&AS_MESSAGE_LOG_FD
2010      fi
2011        rm -f conftest.err libconftest.a conftest conftest.c
2012        rm -rf conftest.dSYM
2013    ])
2014    case $host_os in
2015    rhapsody* | darwin1.[[012]])
2016      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2017    darwin1.*)
2018      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2019    darwin*) # darwin 5.x on
2020      # if running on 10.5 or later, the deployment target defaults
2021      # to the OS version, if on x86, and 10.4, the deployment
2022      # target defaults to 10.4. Don't you love it?
2023      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2024	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2025	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2026	10.[[012]]*)
2027	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2028	10.*)
2029	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2030      esac
2031    ;;
2032  esac
2033    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2034      _lt_dar_single_mod='$single_module'
2035    fi
2036    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2037      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2038    else
2039      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2040    fi
2041    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
2042      _lt_dsymutil='~$DSYMUTIL $lib || :'
2043    else
2044      _lt_dsymutil=
2045    fi
2046    ;;
2047  esac
2048])
2049
2050
2051# _LT_DARWIN_LINKER_FEATURES
2052# --------------------------
2053# Checks for linker and compiler features on darwin
2054m4_defun([_LT_DARWIN_LINKER_FEATURES],
2055[
2056  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2057  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2058  _LT_TAGVAR(hardcode_direct, $1)=no
2059  _LT_TAGVAR(hardcode_automatic, $1)=yes
2060  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2061  if test "$lt_cv_ld_force_load" = "yes"; then
2062    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
2063  else
2064    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2065  fi
2066  _LT_TAGVAR(link_all_deplibs, $1)=yes
2067  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
2068  case $cc_basename in
2069     ifort*) _lt_dar_can_shared=yes ;;
2070     *) _lt_dar_can_shared=$GCC ;;
2071  esac
2072  if test "$_lt_dar_can_shared" = "yes"; then
2073    output_verbose_link_cmd=func_echo_all
2074    _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}"
2075    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2076    _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}"
2077    _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}"
2078    m4_if([$1], [CXX],
2079[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2080      _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}"
2081      _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}"
2082    fi
2083],[])
2084  else
2085  _LT_TAGVAR(ld_shlibs, $1)=no
2086  fi
2087])
2088
2089# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
2090# ----------------------------------
2091# Links a minimal program and checks the executable
2092# for the system default hardcoded library path. In most cases,
2093# this is /usr/lib:/lib, but when the MPI compilers are used
2094# the location of the communication and MPI libs are included too.
2095# If we don't find anything, use the default library path according
2096# to the aix ld manual.
2097# Store the results from the different compilers for each TAGNAME.
2098# Allow to override them for all tags through lt_cv_aix_libpath.
2099m4_defun([_LT_SYS_MODULE_PATH_AIX],
2100[m4_require([_LT_DECL_SED])dnl
2101if test "${lt_cv_aix_libpath+set}" = set; then
2102  aix_libpath=$lt_cv_aix_libpath
2103else
2104  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
2105  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
2106  lt_aix_libpath_sed='[
2107      /Import File Strings/,/^$/ {
2108	  /^0/ {
2109	      s/^0  *\([^ ]*\) *$/\1/
2110	      p
2111	  }
2112      }]'
2113  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2114  # Check for a 64-bit object if we didn't find anything.
2115  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2116    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2117  fi],[])
2118  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2119    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
2120  fi
2121  ])
2122  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
2123fi
2124])# _LT_SYS_MODULE_PATH_AIX
2125
2126
2127# _LT_SHELL_INIT(ARG)
2128# -------------------
2129m4_define([_LT_SHELL_INIT],
2130[m4_divert_text([M4SH-INIT], [$1
2131])])# _LT_SHELL_INIT
2132
2133
2134
2135# _LT_PROG_ECHO_BACKSLASH
2136# -----------------------
2137# Find how we can fake an echo command that does not interpret backslash.
2138# In particular, with Autoconf 2.60 or later we add some code to the start
2139# of the generated configure script which will find a shell with a builtin
2140# printf (which we can use as an echo command).
2141m4_defun([_LT_PROG_ECHO_BACKSLASH],
2142[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2143ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2144ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2145
2146AC_MSG_CHECKING([how to print strings])
2147# Test print first, because it will be a builtin if present.
2148if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
2149   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
2150  ECHO='print -r --'
2151elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
2152  ECHO='printf %s\n'
2153else
2154  # Use this function as a fallback that always works.
2155  func_fallback_echo ()
2156  {
2157    eval 'cat <<_LTECHO_EOF
2158$[]1
2159_LTECHO_EOF'
2160  }
2161  ECHO='func_fallback_echo'
2162fi
2163
2164# func_echo_all arg...
2165# Invoke $ECHO with all args, space-separated.
2166func_echo_all ()
2167{
2168    $ECHO "$*" 
2169}
2170
2171case "$ECHO" in
2172  printf*) AC_MSG_RESULT([printf]) ;;
2173  print*) AC_MSG_RESULT([print -r]) ;;
2174  *) AC_MSG_RESULT([cat]) ;;
2175esac
2176
2177m4_ifdef([_AS_DETECT_SUGGESTED],
2178[_AS_DETECT_SUGGESTED([
2179  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
2180    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2181    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2182    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2183    PATH=/empty FPATH=/empty; export PATH FPATH
2184    test "X`printf %s $ECHO`" = "X$ECHO" \
2185      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
2186
2187_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2188_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
2189])# _LT_PROG_ECHO_BACKSLASH
2190
2191
2192# _LT_WITH_SYSROOT
2193# ----------------
2194AC_DEFUN([_LT_WITH_SYSROOT],
2195[AC_MSG_CHECKING([for sysroot])
2196AC_ARG_WITH([sysroot],
2197[  --with-sysroot[=DIR] Search for dependent libraries within DIR
2198                        (or the compiler's sysroot if not specified).],
2199[], [with_sysroot=no])
2200
2201dnl lt_sysroot will always be passed unquoted.  We quote it here
2202dnl in case the user passed a directory name.
2203lt_sysroot=
2204case ${with_sysroot} in #(
2205 yes)
2206   if test "$GCC" = yes; then
2207     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
2208   fi
2209   ;; #(
2210 /*)
2211   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
2212   ;; #(
2213 no|'')
2214   ;; #(
2215 *)
2216   AC_MSG_RESULT([${with_sysroot}])
2217   AC_MSG_ERROR([The sysroot must be an absolute path.])
2218   ;;
2219esac
2220
2221 AC_MSG_RESULT([${lt_sysroot:-no}])
2222_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
2223[dependent libraries, and in which our libraries should be installed.])])
2224
2225# _LT_ENABLE_LOCK
2226# ---------------
2227m4_defun([_LT_ENABLE_LOCK],
2228[AC_ARG_ENABLE([libtool-lock],
2229  [AS_HELP_STRING([--disable-libtool-lock],
2230    [avoid locking (might break parallel builds)])])
2231test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2232
2233# Some flags need to be propagated to the compiler or linker for good
2234# libtool support.
2235case $host in
2236ia64-*-hpux*)
2237  # Find out which ABI we are using.
2238  echo 'int i;' > conftest.$ac_ext
2239  if AC_TRY_EVAL(ac_compile); then
2240    case `/usr/bin/file conftest.$ac_objext` in
2241      *ELF-32*)
2242	HPUX_IA64_MODE="32"
2243	;;
2244      *ELF-64*)
2245	HPUX_IA64_MODE="64"
2246	;;
2247    esac
2248  fi
2249  rm -rf conftest*
2250  ;;
2251*-*-irix6*)
2252  # Find out which ABI we are using.
2253  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
2254  if AC_TRY_EVAL(ac_compile); then
2255    if test "$lt_cv_prog_gnu_ld" = yes; then
2256      case `/usr/bin/file conftest.$ac_objext` in
2257	*32-bit*)
2258	  LD="${LD-ld} -melf32bsmip"
2259	  ;;
2260	*N32*)
2261	  LD="${LD-ld} -melf32bmipn32"
2262	  ;;
2263	*64-bit*)
2264	  LD="${LD-ld} -melf64bmip"
2265	;;
2266      esac
2267    else
2268      case `/usr/bin/file conftest.$ac_objext` in
2269	*32-bit*)
2270	  LD="${LD-ld} -32"
2271	  ;;
2272	*N32*)
2273	  LD="${LD-ld} -n32"
2274	  ;;
2275	*64-bit*)
2276	  LD="${LD-ld} -64"
2277	  ;;
2278      esac
2279    fi
2280  fi
2281  rm -rf conftest*
2282  ;;
2283
2284x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2285s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2286  # Find out which ABI we are using.
2287  echo 'int i;' > conftest.$ac_ext
2288  if AC_TRY_EVAL(ac_compile); then
2289    case `/usr/bin/file conftest.o` in
2290      *32-bit*)
2291	case $host in
2292	  x86_64-*kfreebsd*-gnu)
2293	    LD="${LD-ld} -m elf_i386_fbsd"
2294	    ;;
2295	  x86_64-*linux*)
2296	    LD="${LD-ld} -m elf_i386"
2297	    ;;
2298	  ppc64-*linux*|powerpc64-*linux*)
2299	    LD="${LD-ld} -m elf32ppclinux"
2300	    ;;
2301	  s390x-*linux*)
2302	    LD="${LD-ld} -m elf_s390"
2303	    ;;
2304	  sparc64-*linux*)
2305	    LD="${LD-ld} -m elf32_sparc"
2306	    ;;
2307	esac
2308	;;
2309      *64-bit*)
2310	case $host in
2311	  x86_64-*kfreebsd*-gnu)
2312	    LD="${LD-ld} -m elf_x86_64_fbsd"
2313	    ;;
2314	  x86_64-*linux*)
2315	    LD="${LD-ld} -m elf_x86_64"
2316	    ;;
2317	  ppc*-*linux*|powerpc*-*linux*)
2318	    LD="${LD-ld} -m elf64ppc"
2319	    ;;
2320	  s390*-*linux*|s390*-*tpf*)
2321	    LD="${LD-ld} -m elf64_s390"
2322	    ;;
2323	  sparc*-*linux*)
2324	    LD="${LD-ld} -m elf64_sparc"
2325	    ;;
2326	esac
2327	;;
2328    esac
2329  fi
2330  rm -rf conftest*
2331  ;;
2332
2333*-*-sco3.2v5*)
2334  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2335  SAVE_CFLAGS="$CFLAGS"
2336  CFLAGS="$CFLAGS -belf"
2337  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2338    [AC_LANG_PUSH(C)
2339     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2340     AC_LANG_POP])
2341  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2342    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2343    CFLAGS="$SAVE_CFLAGS"
2344  fi
2345  ;;
2346sparc*-*solaris*)
2347  # Find out which ABI we are using.
2348  echo 'int i;' > conftest.$ac_ext
2349  if AC_TRY_EVAL(ac_compile); then
2350    case `/usr/bin/file conftest.o` in
2351    *64-bit*)
2352      case $lt_cv_prog_gnu_ld in
2353      yes*) LD="${LD-ld} -m elf64_sparc" ;;
2354      *)
2355	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2356	  LD="${LD-ld} -64"
2357	fi
2358	;;
2359      esac
2360      ;;
2361    esac
2362  fi
2363  rm -rf conftest*
2364  ;;
2365esac
2366
2367need_locks="$enable_libtool_lock"
2368])# _LT_ENABLE_LOCK
2369
2370
2371# _LT_PROG_AR
2372# -----------
2373m4_defun([_LT_PROG_AR],
2374[AC_CHECK_TOOLS(AR, [ar], false)
2375: ${AR=ar}
2376: ${AR_FLAGS=cru}
2377_LT_DECL([], [AR], [1], [The archiver])
2378_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
2379
2380AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
2381  [lt_cv_ar_at_file=no
2382   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
2383     [echo conftest.$ac_objext > conftest.lst
2384      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
2385      AC_TRY_EVAL([lt_ar_try])
2386      if test "$ac_status" -eq 0; then
2387	# Ensure the archiver fails upon bogus file names.
2388	rm -f conftest.$ac_objext libconftest.a
2389	AC_TRY_EVAL([lt_ar_try])
2390	if test "$ac_status" -ne 0; then
2391          lt_cv_ar_at_file=@
2392        fi
2393      fi
2394      rm -f conftest.* libconftest.a
2395     ])
2396  ])
2397
2398if test "x$lt_cv_ar_at_file" = xno; then
2399  archiver_list_spec=
2400else
2401  archiver_list_spec=$lt_cv_ar_at_file
2402fi
2403_LT_DECL([], [archiver_list_spec], [1],
2404  [How to feed a file listing to the archiver])
2405])# _LT_PROG_AR
2406
2407
2408# _LT_CMD_OLD_ARCHIVE
2409# -------------------
2410m4_defun([_LT_CMD_OLD_ARCHIVE],
2411[_LT_PROG_AR
2412
2413AC_CHECK_TOOL(STRIP, strip, :)
2414test -z "$STRIP" && STRIP=:
2415_LT_DECL([], [STRIP], [1], [A symbol stripping program])
2416
2417AC_CHECK_TOOL(RANLIB, ranlib, :)
2418test -z "$RANLIB" && RANLIB=:
2419_LT_DECL([], [RANLIB], [1],
2420    [Commands used to install an old-style archive])
2421
2422# Determine commands to create old-style static archives.
2423old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2424old_postinstall_cmds='chmod 644 $oldlib'
2425old_postuninstall_cmds=
2426
2427if test -n "$RANLIB"; then
2428  case $host_os in
2429  openbsd*)
2430    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
2431    ;;
2432  *)
2433    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
2434    ;;
2435  esac
2436  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2437fi
2438
2439case $host_os in
2440  darwin*)
2441    lock_old_archive_extraction=yes ;;
2442  *)
2443    lock_old_archive_extraction=no ;;
2444esac
2445_LT_DECL([], [old_postinstall_cmds], [2])
2446_LT_DECL([], [old_postuninstall_cmds], [2])
2447_LT_TAGDECL([], [old_archive_cmds], [2],
2448    [Commands used to build an old-style archive])
2449_LT_DECL([], [lock_old_archive_extraction], [0],
2450    [Whether to use a lock for old archive extraction])
2451])# _LT_CMD_OLD_ARCHIVE
2452
2453
2454# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2455#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2456# ----------------------------------------------------------------
2457# Check whether the given compiler option works
2458AC_DEFUN([_LT_COMPILER_OPTION],
2459[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2460m4_require([_LT_DECL_SED])dnl
2461AC_CACHE_CHECK([$1], [$2],
2462  [$2=no
2463   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2464   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2465   lt_compiler_flag="$3"
2466   # Insert the option either (1) after the last *FLAGS variable, or
2467   # (2) before a word containing "conftest.", or (3) at the end.
2468   # Note that $ac_compile itself does not contain backslashes and begins
2469   # with a dollar sign (not a hyphen), so the echo should work correctly.
2470   # The option is referenced via a variable to avoid confusing sed.
2471   lt_compile=`echo "$ac_compile" | $SED \
2472   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2473   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2474   -e 's:$: $lt_compiler_flag:'`
2475   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2476   (eval "$lt_compile" 2>conftest.err)
2477   ac_status=$?
2478   cat conftest.err >&AS_MESSAGE_LOG_FD
2479   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2480   if (exit $ac_status) && test -s "$ac_outfile"; then
2481     # The compiler can only warn and ignore the option if not recognized
2482     # So say no if there are warnings other than the usual output.
2483     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
2484     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2485     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2486       $2=yes
2487     fi
2488   fi
2489   $RM conftest*
2490])
2491
2492if test x"[$]$2" = xyes; then
2493    m4_if([$5], , :, [$5])
2494else
2495    m4_if([$6], , :, [$6])
2496fi
2497])# _LT_COMPILER_OPTION
2498
2499# Old name:
2500AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2501dnl aclocal-1.4 backwards compatibility:
2502dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2503
2504
2505# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2506#                  [ACTION-SUCCESS], [ACTION-FAILURE])
2507# ----------------------------------------------------
2508# Check whether the given linker option works
2509AC_DEFUN([_LT_LINKER_OPTION],
2510[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2511m4_require([_LT_DECL_SED])dnl
2512AC_CACHE_CHECK([$1], [$2],
2513  [$2=no
2514   save_LDFLAGS="$LDFLAGS"
2515   LDFLAGS="$LDFLAGS $3"
2516   echo "$lt_simple_link_test_code" > conftest.$ac_ext
2517   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2518     # The linker can only warn and ignore the option if not recognized
2519     # So say no if there are warnings
2520     if test -s conftest.err; then
2521       # Append any errors to the config.log.
2522       cat conftest.err 1>&AS_MESSAGE_LOG_FD
2523       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
2524       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2525       if diff conftest.exp conftest.er2 >/dev/null; then
2526         $2=yes
2527       fi
2528     else
2529       $2=yes
2530     fi
2531   fi
2532   $RM -r conftest*
2533   LDFLAGS="$save_LDFLAGS"
2534])
2535
2536if test x"[$]$2" = xyes; then
2537    m4_if([$4], , :, [$4])
2538else
2539    m4_if([$5], , :, [$5])
2540fi
2541])# _LT_LINKER_OPTION
2542
2543# Old name:
2544AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2545dnl aclocal-1.4 backwards compatibility:
2546dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2547
2548
2549# LT_CMD_MAX_LEN
2550#---------------
2551AC_DEFUN([LT_CMD_MAX_LEN],
2552[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2553# find the maximum length of command line arguments
2554AC_MSG_CHECKING([the maximum length of command line arguments])
2555AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2556  i=0
2557  teststring="ABCD"
2558
2559  case $build_os in
2560  msdosdjgpp*)
2561    # On DJGPP, this test can blow up pretty badly due to problems in libc
2562    # (any single argument exceeding 2000 bytes causes a buffer overrun
2563    # during glob expansion).  Even if it were fixed, the result of this
2564    # check would be larger than it should be.
2565    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2566    ;;
2567
2568  gnu*)
2569    # Under GNU Hurd, this test is not required because there is
2570    # no limit to the length of command line arguments.
2571    # Libtool will interpret -1 as no limit whatsoever
2572    lt_cv_sys_max_cmd_len=-1;
2573    ;;
2574
2575  cygwin* | mingw* | cegcc*)
2576    # On Win9x/ME, this test blows up -- it succeeds, but takes
2577    # about 5 minutes as the teststring grows exponentially.
2578    # Worse, since 9x/ME are not pre-emptively multitasking,
2579    # you end up with a "frozen" computer, even though with patience
2580    # the test eventually succeeds (with a max line length of 256k).
2581    # Instead, let's just punt: use the minimum linelength reported by
2582    # all of the supported platforms: 8192 (on NT/2K/XP).
2583    lt_cv_sys_max_cmd_len=8192;
2584    ;;
2585
2586  mint*)
2587    # On MiNT this can take a long time and run out of memory.
2588    lt_cv_sys_max_cmd_len=8192;
2589    ;;
2590
2591  amigaos*)
2592    # On AmigaOS with pdksh, this test takes hours, literally.
2593    # So we just punt and use a minimum line length of 8192.
2594    lt_cv_sys_max_cmd_len=8192;
2595    ;;
2596
2597  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2598    # This has been around since 386BSD, at least.  Likely further.
2599    if test -x /sbin/sysctl; then
2600      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2601    elif test -x /usr/sbin/sysctl; then
2602      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2603    else
2604      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
2605    fi
2606    # And add a safety zone
2607    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2608    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2609    ;;
2610
2611  interix*)
2612    # We know the value 262144 and hardcode it with a safety zone (like BSD)
2613    lt_cv_sys_max_cmd_len=196608
2614    ;;
2615
2616  osf*)
2617    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2618    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2619    # nice to cause kernel panics so lets avoid the loop below.
2620    # First set a reasonable default.
2621    lt_cv_sys_max_cmd_len=16384
2622    #
2623    if test -x /sbin/sysconfig; then
2624      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2625        *1*) lt_cv_sys_max_cmd_len=-1 ;;
2626      esac
2627    fi
2628    ;;
2629  sco3.2v5*)
2630    lt_cv_sys_max_cmd_len=102400
2631    ;;
2632  sysv5* | sco5v6* | sysv4.2uw2*)
2633    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2634    if test -n "$kargmax"; then
2635      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
2636    else
2637      lt_cv_sys_max_cmd_len=32768
2638    fi
2639    ;;
2640  *)
2641    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2642    if test -n "$lt_cv_sys_max_cmd_len"; then
2643      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2644      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2645    else
2646      # Make teststring a little bigger before we do anything with it.
2647      # a 1K string should be a reasonable start.
2648      for i in 1 2 3 4 5 6 7 8 ; do
2649        teststring=$teststring$teststring
2650      done
2651      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2652      # If test is not a shell built-in, we'll probably end up computing a
2653      # maximum length that is only half of the actual maximum length, but
2654      # we can't tell.
2655      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
2656	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
2657	      test $i != 17 # 1/2 MB should be enough
2658      do
2659        i=`expr $i + 1`
2660        teststring=$teststring$teststring
2661      done
2662      # Only check the string length outside the loop.
2663      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
2664      teststring=
2665      # Add a significant safety factor because C++ compilers can tack on
2666      # massive amounts of additional arguments before passing them to the
2667      # linker.  It appears as though 1/2 is a usable value.
2668      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2669    fi
2670    ;;
2671  esac
2672])
2673if test -n $lt_cv_sys_max_cmd_len ; then
2674  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2675else
2676  AC_MSG_RESULT(none)
2677fi
2678max_cmd_len=$lt_cv_sys_max_cmd_len
2679_LT_DECL([], [max_cmd_len], [0],
2680    [What is the maximum length of a command?])
2681])# LT_CMD_MAX_LEN
2682
2683# Old name:
2684AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
2685dnl aclocal-1.4 backwards compatibility:
2686dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
2687
2688
2689# _LT_HEADER_DLFCN
2690# ----------------
2691m4_defun([_LT_HEADER_DLFCN],
2692[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
2693])# _LT_HEADER_DLFCN
2694
2695
2696# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2697#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2698# ----------------------------------------------------------------
2699m4_defun([_LT_TRY_DLOPEN_SELF],
2700[m4_require([_LT_HEADER_DLFCN])dnl
2701if test "$cross_compiling" = yes; then :
2702  [$4]
2703else
2704  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2705  lt_status=$lt_dlunknown
2706  cat > conftest.$ac_ext <<_LT_EOF
2707[#line $LINENO "configure"
2708#include "confdefs.h"
2709
2710#if HAVE_DLFCN_H
2711#include <dlfcn.h>
2712#endif
2713
2714#include <stdio.h>
2715
2716#ifdef RTLD_GLOBAL
2717#  define LT_DLGLOBAL		RTLD_GLOBAL
2718#else
2719#  ifdef DL_GLOBAL
2720#    define LT_DLGLOBAL		DL_GLOBAL
2721#  else
2722#    define LT_DLGLOBAL		0
2723#  endif
2724#endif
2725
2726/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2727   find out it does not work in some platform. */
2728#ifndef LT_DLLAZY_OR_NOW
2729#  ifdef RTLD_LAZY
2730#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
2731#  else
2732#    ifdef DL_LAZY
2733#      define LT_DLLAZY_OR_NOW		DL_LAZY
2734#    else
2735#      ifdef RTLD_NOW
2736#        define LT_DLLAZY_OR_NOW	RTLD_NOW
2737#      else
2738#        ifdef DL_NOW
2739#          define LT_DLLAZY_OR_NOW	DL_NOW
2740#        else
2741#          define LT_DLLAZY_OR_NOW	0
2742#        endif
2743#      endif
2744#    endif
2745#  endif
2746#endif
2747
2748/* When -fvisbility=hidden is used, assume the code has been annotated
2749   correspondingly for the symbols needed.  */
2750#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
2751int fnord () __attribute__((visibility("default")));
2752#endif
2753
2754int fnord () { return 42; }
2755int main ()
2756{
2757  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2758  int status = $lt_dlunknown;
2759
2760  if (self)
2761    {
2762      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2763      else
2764        {
2765	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
2766          else puts (dlerror ());
2767	}
2768      /* dlclose (self); */
2769    }
2770  else
2771    puts (dlerror ());
2772
2773  return status;
2774}]
2775_LT_EOF
2776  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2777    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2778    lt_status=$?
2779    case x$lt_status in
2780      x$lt_dlno_uscore) $1 ;;
2781      x$lt_dlneed_uscore) $2 ;;
2782      x$lt_dlunknown|x*) $3 ;;
2783    esac
2784  else :
2785    # compilation failed
2786    $3
2787  fi
2788fi
2789rm -fr conftest*
2790])# _LT_TRY_DLOPEN_SELF
2791
2792
2793# LT_SYS_DLOPEN_SELF
2794# ------------------
2795AC_DEFUN([LT_SYS_DLOPEN_SELF],
2796[m4_require([_LT_HEADER_DLFCN])dnl
2797if test "x$enable_dlopen" != xyes; then
2798  enable_dlopen=unknown
2799  enable_dlopen_self=unknown
2800  enable_dlopen_self_static=unknown
2801else
2802  lt_cv_dlopen=no
2803  lt_cv_dlopen_libs=
2804
2805  case $host_os in
2806  beos*)
2807    lt_cv_dlopen="load_add_on"
2808    lt_cv_dlopen_libs=
2809    lt_cv_dlopen_self=yes
2810    ;;
2811
2812  mingw* | pw32* | cegcc*)
2813    lt_cv_dlopen="LoadLibrary"
2814    lt_cv_dlopen_libs=
2815    ;;
2816
2817  cygwin*)
2818    lt_cv_dlopen="dlopen"
2819    lt_cv_dlopen_libs=
2820    ;;
2821
2822  darwin*)
2823  # if libdl is installed we need to link against it
2824    AC_CHECK_LIB([dl], [dlopen],
2825		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2826    lt_cv_dlopen="dyld"
2827    lt_cv_dlopen_libs=
2828    lt_cv_dlopen_self=yes
2829    ])
2830    ;;
2831
2832  *)
2833    AC_CHECK_FUNC([shl_load],
2834	  [lt_cv_dlopen="shl_load"],
2835      [AC_CHECK_LIB([dld], [shl_load],
2836	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2837	[AC_CHECK_FUNC([dlopen],
2838	      [lt_cv_dlopen="dlopen"],
2839	  [AC_CHECK_LIB([dl], [dlopen],
2840		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2841	    [AC_CHECK_LIB([svld], [dlopen],
2842		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2843	      [AC_CHECK_LIB([dld], [dld_link],
2844		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2845	      ])
2846	    ])
2847	  ])
2848	])
2849      ])
2850    ;;
2851  esac
2852
2853  if test "x$lt_cv_dlopen" != xno; then
2854    enable_dlopen=yes
2855  else
2856    enable_dlopen=no
2857  fi
2858
2859  case $lt_cv_dlopen in
2860  dlopen)
2861    save_CPPFLAGS="$CPPFLAGS"
2862    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2863
2864    save_LDFLAGS="$LDFLAGS"
2865    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2866
2867    save_LIBS="$LIBS"
2868    LIBS="$lt_cv_dlopen_libs $LIBS"
2869
2870    AC_CACHE_CHECK([whether a program can dlopen itself],
2871	  lt_cv_dlopen_self, [dnl
2872	  _LT_TRY_DLOPEN_SELF(
2873	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2874	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2875    ])
2876
2877    if test "x$lt_cv_dlopen_self" = xyes; then
2878      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2879      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2880	  lt_cv_dlopen_self_static, [dnl
2881	  _LT_TRY_DLOPEN_SELF(
2882	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2883	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2884      ])
2885    fi
2886
2887    CPPFLAGS="$save_CPPFLAGS"
2888    LDFLAGS="$save_LDFLAGS"
2889    LIBS="$save_LIBS"
2890    ;;
2891  esac
2892
2893  case $lt_cv_dlopen_self in
2894  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2895  *) enable_dlopen_self=unknown ;;
2896  esac
2897
2898  case $lt_cv_dlopen_self_static in
2899  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2900  *) enable_dlopen_self_static=unknown ;;
2901  esac
2902fi
2903_LT_DECL([dlopen_support], [enable_dlopen], [0],
2904	 [Whether dlopen is supported])
2905_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
2906	 [Whether dlopen of programs is supported])
2907_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
2908	 [Whether dlopen of statically linked programs is supported])
2909])# LT_SYS_DLOPEN_SELF
2910
2911# Old name:
2912AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
2913dnl aclocal-1.4 backwards compatibility:
2914dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
2915
2916
2917# _LT_COMPILER_C_O([TAGNAME])
2918# ---------------------------
2919# Check to see if options -c and -o are simultaneously supported by compiler.
2920# This macro does not hard code the compiler like AC_PROG_CC_C_O.
2921m4_defun([_LT_COMPILER_C_O],
2922[m4_require([_LT_DECL_SED])dnl
2923m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2924m4_require([_LT_TAG_COMPILER])dnl
2925AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2926  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2927  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2928   $RM -r conftest 2>/dev/null
2929   mkdir conftest
2930   cd conftest
2931   mkdir out
2932   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2933
2934   lt_compiler_flag="-o out/conftest2.$ac_objext"
2935   # Insert the option either (1) after the last *FLAGS variable, or
2936   # (2) before a word containing "conftest.", or (3) at the end.
2937   # Note that $ac_compile itself does not contain backslashes and begins
2938   # with a dollar sign (not a hyphen), so the echo should work correctly.
2939   lt_compile=`echo "$ac_compile" | $SED \
2940   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2941   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2942   -e 's:$: $lt_compiler_flag:'`
2943   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2944   (eval "$lt_compile" 2>out/conftest.err)
2945   ac_status=$?
2946   cat out/conftest.err >&AS_MESSAGE_LOG_FD
2947   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2948   if (exit $ac_status) && test -s out/conftest2.$ac_objext
2949   then
2950     # The compiler can only warn and ignore the option if not recognized
2951     # So say no if there are warnings
2952     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
2953     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2954     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2955       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2956     fi
2957   fi
2958   chmod u+w . 2>&AS_MESSAGE_LOG_FD
2959   $RM conftest*
2960   # SGI C++ compiler will create directory out/ii_files/ for
2961   # template instantiation
2962   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
2963   $RM out/* && rmdir out
2964   cd ..
2965   $RM -r conftest
2966   $RM conftest*
2967])
2968_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
2969	[Does compiler simultaneously support -c and -o options?])
2970])# _LT_COMPILER_C_O
2971
2972
2973# _LT_COMPILER_FILE_LOCKS([TAGNAME])
2974# ----------------------------------
2975# Check to see if we can do hard links to lock some files if needed
2976m4_defun([_LT_COMPILER_FILE_LOCKS],
2977[m4_require([_LT_ENABLE_LOCK])dnl
2978m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2979_LT_COMPILER_C_O([$1])
2980
2981hard_links="nottested"
2982if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2983  # do not overwrite the value of need_locks provided by the user
2984  AC_MSG_CHECKING([if we can lock with hard links])
2985  hard_links=yes
2986  $RM conftest*
2987  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2988  touch conftest.a
2989  ln conftest.a conftest.b 2>&5 || hard_links=no
2990  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2991  AC_MSG_RESULT([$hard_links])
2992  if test "$hard_links" = no; then
2993    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2994    need_locks=warn
2995  fi
2996else
2997  need_locks=no
2998fi
2999_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3000])# _LT_COMPILER_FILE_LOCKS
3001
3002
3003# _LT_CHECK_OBJDIR
3004# ----------------
3005m4_defun([_LT_CHECK_OBJDIR],
3006[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3007[rm -f .libs 2>/dev/null
3008mkdir .libs 2>/dev/null
3009if test -d .libs; then
3010  lt_cv_objdir=.libs
3011else
3012  # MS-DOS does not allow filenames that begin with a dot.
3013  lt_cv_objdir=_libs
3014fi
3015rmdir .libs 2>/dev/null])
3016objdir=$lt_cv_objdir
3017_LT_DECL([], [objdir], [0],
3018         [The name of the directory that contains temporary libtool files])dnl
3019m4_pattern_allow([LT_OBJDIR])dnl
3020AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
3021  [Define to the sub-directory in which libtool stores uninstalled libraries.])
3022])# _LT_CHECK_OBJDIR
3023
3024
3025# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3026# --------------------------------------
3027# Check hardcoding attributes.
3028m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3029[AC_MSG_CHECKING([how to hardcode library paths into programs])
3030_LT_TAGVAR(hardcode_action, $1)=
3031if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3032   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3033   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
3034
3035  # We can hardcode non-existent directories.
3036  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
3037     # If the only mechanism to avoid hardcoding is shlibpath_var, we
3038     # have to relink, otherwise we might link with an installed library
3039     # when we should be linking with a yet-to-be-installed one
3040     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3041     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
3042    # Linking always hardcodes the temporary library directory.
3043    _LT_TAGVAR(hardcode_action, $1)=relink
3044  else
3045    # We can link without hardcoding, and we can hardcode nonexisting dirs.
3046    _LT_TAGVAR(hardcode_action, $1)=immediate
3047  fi
3048else
3049  # We cannot hardcode anything, or else we can only hardcode existing
3050  # directories.
3051  _LT_TAGVAR(hardcode_action, $1)=unsupported
3052fi
3053AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3054
3055if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
3056   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
3057  # Fast installation is not supported
3058  enable_fast_install=no
3059elif test "$shlibpath_overrides_runpath" = yes ||
3060     test "$enable_shared" = no; then
3061  # Fast installation is not necessary
3062  enable_fast_install=needless
3063fi
3064_LT_TAGDECL([], [hardcode_action], [0],
3065    [How to hardcode a shared library path into an executable])
3066])# _LT_LINKER_HARDCODE_LIBPATH
3067
3068
3069# _LT_CMD_STRIPLIB
3070# ----------------
3071m4_defun([_LT_CMD_STRIPLIB],
3072[m4_require([_LT_DECL_EGREP])
3073striplib=
3074old_striplib=
3075AC_MSG_CHECKING([whether stripping libraries is possible])
3076if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3077  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3078  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3079  AC_MSG_RESULT([yes])
3080else
3081# FIXME - insert some real tests, host_os isn't really good enough
3082  case $host_os in
3083  darwin*)
3084    if test -n "$STRIP" ; then
3085      striplib="$STRIP -x"
3086      old_striplib="$STRIP -S"
3087      AC_MSG_RESULT([yes])
3088    else
3089      AC_MSG_RESULT([no])
3090    fi
3091    ;;
3092  *)
3093    AC_MSG_RESULT([no])
3094    ;;
3095  esac
3096fi
3097_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3098_LT_DECL([], [striplib], [1])
3099])# _LT_CMD_STRIPLIB
3100
3101
3102# _LT_SYS_DYNAMIC_LINKER([TAG])
3103# -----------------------------
3104# PORTME Fill in your ld.so characteristics
3105m4_defun([_LT_SYS_DYNAMIC_LINKER],
3106[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3107m4_require([_LT_DECL_EGREP])dnl
3108m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3109m4_require([_LT_DECL_OBJDUMP])dnl
3110m4_require([_LT_DECL_SED])dnl
3111m4_require([_LT_CHECK_SHELL_FEATURES])dnl
3112AC_MSG_CHECKING([dynamic linker characteristics])
3113m4_if([$1],
3114	[], [
3115if test "$GCC" = yes; then
3116  case $host_os in
3117    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3118    *) lt_awk_arg="/^libraries:/" ;;
3119  esac
3120  case $host_os in
3121    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
3122    *) lt_sed_strip_eq="s,=/,/,g" ;;
3123  esac
3124  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
3125  case $lt_search_path_spec in
3126  *\;*)
3127    # if the path contains ";" then we assume it to be the separator
3128    # otherwise default to the standard path separator (i.e. ":") - it is
3129    # assumed that no part of a normal pathname contains ";" but that should
3130    # okay in the real world where ";" in dirpaths is itself problematic.
3131    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
3132    ;;
3133  *)
3134    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
3135    ;;
3136  esac
3137  # Ok, now we have the path, separated by spaces, we can step through it
3138  # and add multilib dir if necessary.
3139  lt_tmp_lt_search_path_spec=
3140  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3141  for lt_sys_path in $lt_search_path_spec; do
3142    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
3143      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3144    else
3145      test -d "$lt_sys_path" && \
3146	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3147    fi
3148  done
3149  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
3150BEGIN {RS=" "; FS="/|\n";} {
3151  lt_foo="";
3152  lt_count=0;
3153  for (lt_i = NF; lt_i > 0; lt_i--) {
3154    if ($lt_i != "" && $lt_i != ".") {
3155      if ($lt_i == "..") {
3156        lt_count++;
3157      } else {
3158        if (lt_count == 0) {
3159          lt_foo="/" $lt_i lt_foo;
3160        } else {
3161          lt_count--;
3162        }
3163      }
3164    }
3165  }
3166  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3167  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3168}'`
3169  # AWK program above erroneously prepends '/' to C:/dos/paths
3170  # for these hosts.
3171  case $host_os in
3172    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
3173      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
3174  esac
3175  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
3176else
3177  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3178fi])
3179library_names_spec=
3180libname_spec='lib$name'
3181soname_spec=
3182shrext_cmds=".so"
3183postinstall_cmds=
3184postuninstall_cmds=
3185finish_cmds=
3186finish_eval=
3187shlibpath_var=
3188shlibpath_overrides_runpath=unknown
3189version_type=none
3190dynamic_linker="$host_os ld.so"
3191sys_lib_dlsearch_path_spec="/lib /usr/lib"
3192need_lib_prefix=unknown
3193hardcode_into_libs=no
3194
3195# when you set need_version to no, make sure it does not cause -set_version
3196# flags to be left without arguments
3197need_version=unknown
3198
3199case $host_os in
3200aix3*)
3201  version_type=linux
3202  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3203  shlibpath_var=LIBPATH
3204
3205  # AIX 3 has no versioning support, so we append a major version to the name.
3206  soname_spec='${libname}${release}${shared_ext}$major'
3207  ;;
3208
3209aix[[4-9]]*)
3210  version_type=linux
3211  need_lib_prefix=no
3212  need_version=no
3213  hardcode_into_libs=yes
3214  if test "$host_cpu" = ia64; then
3215    # AIX 5 supports IA64
3216    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3217    shlibpath_var=LD_LIBRARY_PATH
3218  else
3219    # With GCC up to 2.95.x, collect2 would create an import file
3220    # for dependence libraries.  The import file would start with
3221    # the line `#! .'.  This would cause the generated library to
3222    # depend on `.', always an invalid library.  This was fixed in
3223    # development snapshots of GCC prior to 3.0.
3224    case $host_os in
3225      aix4 | aix4.[[01]] | aix4.[[01]].*)
3226      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3227	   echo ' yes '
3228	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3229	:
3230      else
3231	can_build_shared=no
3232      fi
3233      ;;
3234    esac
3235    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3236    # soname into executable. Probably we can add versioning support to
3237    # collect2, so additional links can be useful in future.
3238    if test "$aix_use_runtimelinking" = yes; then
3239      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3240      # instead of lib<name>.a to let people know that these are not
3241      # typical AIX shared libraries.
3242      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3243    else
3244      # We preserve .a as extension for shared libraries through AIX4.2
3245      # and later when we are not doing run time linking.
3246      library_names_spec='${libname}${release}.a $libname.a'
3247      soname_spec='${libname}${release}${shared_ext}$major'
3248    fi
3249    shlibpath_var=LIBPATH
3250  fi
3251  ;;
3252
3253amigaos*)
3254  case $host_cpu in
3255  powerpc)
3256    # Since July 2007 AmigaOS4 officially supports .so libraries.
3257    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3258    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3259    ;;
3260  m68k)
3261    library_names_spec='$libname.ixlibrary $libname.a'
3262    # Create ${libname}_ixlibrary.a entries in /sys/libs.
3263    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''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'
3264    ;;
3265  esac
3266  ;;
3267
3268beos*)
3269  library_names_spec='${libname}${shared_ext}'
3270  dynamic_linker="$host_os ld.so"
3271  shlibpath_var=LIBRARY_PATH
3272  ;;
3273
3274bsdi[[45]]*)
3275  version_type=linux
3276  need_version=no
3277  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3278  soname_spec='${libname}${release}${shared_ext}$major'
3279  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3280  shlibpath_var=LD_LIBRARY_PATH
3281  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3282  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3283  # the default ld.so.conf also contains /usr/contrib/lib and
3284  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3285  # libtool to hard-code these into programs
3286  ;;
3287
3288cygwin* | mingw* | pw32* | cegcc*)
3289  version_type=windows
3290  shrext_cmds=".dll"
3291  need_version=no
3292  need_lib_prefix=no
3293
3294  case $GCC,$cc_basename in
3295  yes,*)
3296    # gcc
3297    library_names_spec='$libname.dll.a'
3298    # DLL is installed to $(libdir)/../bin by postinstall_cmds
3299    postinstall_cmds='base_file=`basename \${file}`~
3300      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3301      dldir=$destdir/`dirname \$dlpath`~
3302      test -d \$dldir || mkdir -p \$dldir~
3303      $install_prog $dir/$dlname \$dldir/$dlname~
3304      chmod a+x \$dldir/$dlname~
3305      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3306        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3307      fi'
3308    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3309      dlpath=$dir/\$dldll~
3310       $RM \$dlpath'
3311    shlibpath_overrides_runpath=yes
3312
3313    case $host_os in
3314    cygwin*)
3315      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3316      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3317m4_if([$1], [],[
3318      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
3319      ;;
3320    mingw* | cegcc*)
3321      # MinGW DLLs use traditional 'lib' prefix
3322      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3323      ;;
3324    pw32*)
3325      # pw32 DLLs use 'pw' prefix rather than 'lib'
3326      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3327      ;;
3328    esac
3329    dynamic_linker='Win32 ld.exe'
3330    ;;
3331
3332  *,cl*)
3333    # Native MSVC
3334    libname_spec='$name'
3335    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3336    library_names_spec='${libname}.dll.lib'
3337
3338    case $build_os in
3339    mingw*)
3340      sys_lib_search_path_spec=
3341      lt_save_ifs=$IFS
3342      IFS=';'
3343      for lt_path in $LIB
3344      do
3345        IFS=$lt_save_ifs
3346        # Let DOS variable expansion print the short 8.3 style file name.
3347        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
3348        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
3349      done
3350      IFS=$lt_save_ifs
3351      # Convert to MSYS style.
3352      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
3353      ;;
3354    cygwin*)
3355      # Convert to unix form, then to dos form, then back to unix form
3356      # but this time dos style (no spaces!) so that the unix form looks
3357      # like /cygdrive/c/PROGRA~1:/cygdr...
3358      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
3359      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
3360      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3361      ;;
3362    *)
3363      sys_lib_search_path_spec="$LIB"
3364      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3365        # It is most probably a Windows format PATH.
3366        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3367      else
3368        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3369      fi
3370      # FIXME: find the short name or the path components, as spaces are
3371      # common. (e.g. "Program Files" -> "PROGRA~1")
3372      ;;
3373    esac
3374
3375    # DLL is installed to $(libdir)/../bin by postinstall_cmds
3376    postinstall_cmds='base_file=`basename \${file}`~
3377      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3378      dldir=$destdir/`dirname \$dlpath`~
3379      test -d \$dldir || mkdir -p \$dldir~
3380      $install_prog $dir/$dlname \$dldir/$dlname'
3381    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3382      dlpath=$dir/\$dldll~
3383       $RM \$dlpath'
3384    shlibpath_overrides_runpath=yes
3385    dynamic_linker='Win32 link.exe'
3386    ;;
3387
3388  *)
3389    # Assume MSVC wrapper
3390    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3391    dynamic_linker='Win32 ld.exe'
3392    ;;
3393  esac
3394  # FIXME: first we should search . and the directory the executable is in
3395  shlibpath_var=PATH
3396  ;;
3397
3398darwin* | rhapsody*)
3399  dynamic_linker="$host_os dyld"
3400  version_type=darwin
3401  need_lib_prefix=no
3402  need_version=no
3403  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3404  soname_spec='${libname}${release}${major}$shared_ext'
3405  shlibpath_overrides_runpath=yes
3406  shlibpath_var=DYLD_LIBRARY_PATH
3407  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3408m4_if([$1], [],[
3409  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3410  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3411  ;;
3412
3413dgux*)
3414  version_type=linux
3415  need_lib_prefix=no
3416  need_version=no
3417  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3418  soname_spec='${libname}${release}${shared_ext}$major'
3419  shlibpath_var=LD_LIBRARY_PATH
3420  ;;
3421
3422freebsd1*)
3423  dynamic_linker=no
3424  ;;
3425
3426freebsd* | dragonfly*)
3427  # DragonFly does not have aout.  When/if they implement a new
3428  # versioning mechanism, adjust this.
3429  if test -x /usr/bin/objformat; then
3430    objformat=`/usr/bin/objformat`
3431  else
3432    case $host_os in
3433    freebsd[[123]]*) objformat=aout ;;
3434    *) objformat=elf ;;
3435    esac
3436  fi
3437  version_type=freebsd-$objformat
3438  case $version_type in
3439    freebsd-elf*)
3440      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3441      need_version=no
3442      need_lib_prefix=no
3443      ;;
3444    freebsd-*)
3445      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3446      need_version=yes
3447      ;;
3448  esac
3449  shlibpath_var=LD_LIBRARY_PATH
3450  case $host_os in
3451  freebsd2*)
3452    shlibpath_overrides_runpath=yes
3453    ;;
3454  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3455    shlibpath_overrides_runpath=yes
3456    hardcode_into_libs=yes
3457    ;;
3458  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3459  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3460    shlibpath_overrides_runpath=no
3461    hardcode_into_libs=yes
3462    ;;
3463  *) # from 4.6 on, and DragonFly
3464    shlibpath_overrides_runpath=yes
3465    hardcode_into_libs=yes
3466    ;;
3467  esac
3468  ;;
3469
3470gnu*)
3471  version_type=linux
3472  need_lib_prefix=no
3473  need_version=no
3474  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3475  soname_spec='${libname}${release}${shared_ext}$major'
3476  shlibpath_var=LD_LIBRARY_PATH
3477  hardcode_into_libs=yes
3478  ;;
3479
3480haiku*)
3481  version_type=linux
3482  need_lib_prefix=no
3483  need_version=no
3484  dynamic_linker="$host_os runtime_loader"
3485  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3486  soname_spec='${libname}${release}${shared_ext}$major'
3487  shlibpath_var=LIBRARY_PATH
3488  shlibpath_overrides_runpath=yes
3489  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
3490  hardcode_into_libs=yes
3491  ;;
3492
3493hpux9* | hpux10* | hpux11*)
3494  # Give a soname corresponding to the major version so that dld.sl refuses to
3495  # link against other versions.
3496  version_type=sunos
3497  need_lib_prefix=no
3498  need_version=no
3499  case $host_cpu in
3500  ia64*)
3501    shrext_cmds='.so'
3502    hardcode_into_libs=yes
3503    dynamic_linker="$host_os dld.so"
3504    shlibpath_var=LD_LIBRARY_PATH
3505    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3506    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3507    soname_spec='${libname}${release}${shared_ext}$major'
3508    if test "X$HPUX_IA64_MODE" = X32; then
3509      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3510    else
3511      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3512    fi
3513    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3514    ;;
3515  hppa*64*)
3516    shrext_cmds='.sl'
3517    hardcode_into_libs=yes
3518    dynamic_linker="$host_os dld.sl"
3519    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3520    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3521    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3522    soname_spec='${libname}${release}${shared_ext}$major'
3523    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3524    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3525    ;;
3526  *)
3527    shrext_cmds='.sl'
3528    dynamic_linker="$host_os dld.sl"
3529    shlibpath_var=SHLIB_PATH
3530    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3531    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3532    soname_spec='${libname}${release}${shared_ext}$major'
3533    ;;
3534  esac
3535  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
3536  postinstall_cmds='chmod 555 $lib'
3537  # or fails outright, so override atomically:
3538  install_override_mode=555
3539  ;;
3540
3541interix[[3-9]]*)
3542  version_type=linux
3543  need_lib_prefix=no
3544  need_version=no
3545  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3546  soname_spec='${libname}${release}${shared_ext}$major'
3547  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3548  shlibpath_var=LD_LIBRARY_PATH
3549  shlibpath_overrides_runpath=no
3550  hardcode_into_libs=yes
3551  ;;
3552
3553irix5* | irix6* | nonstopux*)
3554  case $host_os in
3555    nonstopux*) version_type=nonstopux ;;
3556    *)
3557	if test "$lt_cv_prog_gnu_ld" = yes; then
3558		version_type=linux
3559	else
3560		version_type=irix
3561	fi ;;
3562  esac
3563  need_lib_prefix=no
3564  need_version=no
3565  soname_spec='${libname}${release}${shared_ext}$major'
3566  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3567  case $host_os in
3568  irix5* | nonstopux*)
3569    libsuff= shlibsuff=
3570    ;;
3571  *)
3572    case $LD in # libtool.m4 will add one of these switches to LD
3573    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3574      libsuff= shlibsuff= libmagic=32-bit;;
3575    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3576      libsuff=32 shlibsuff=N32 libmagic=N32;;
3577    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3578      libsuff=64 shlibsuff=64 libmagic=64-bit;;
3579    *) libsuff= shlibsuff= libmagic=never-match;;
3580    esac
3581    ;;
3582  esac
3583  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3584  shlibpath_overrides_runpath=no
3585  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3586  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3587  hardcode_into_libs=yes
3588  ;;
3589
3590# No shared lib support for Linux oldld, aout, or coff.
3591linux*oldld* | linux*aout* | linux*coff*)
3592  dynamic_linker=no
3593  ;;
3594
3595# This must be Linux ELF.
3596linux* | k*bsd*-gnu | kopensolaris*-gnu)
3597  version_type=linux
3598  need_lib_prefix=no
3599  need_version=no
3600  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3601  soname_spec='${libname}${release}${shared_ext}$major'
3602  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3603  shlibpath_var=LD_LIBRARY_PATH
3604  shlibpath_overrides_runpath=no
3605
3606  # Some binutils ld are patched to set DT_RUNPATH
3607  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
3608    [lt_cv_shlibpath_overrides_runpath=no
3609    save_LDFLAGS=$LDFLAGS
3610    save_libdir=$libdir
3611    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3612	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3613    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3614      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
3615	 [lt_cv_shlibpath_overrides_runpath=yes])])
3616    LDFLAGS=$save_LDFLAGS
3617    libdir=$save_libdir
3618    ])
3619  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
3620
3621  # This implies no fast_install, which is unacceptable.
3622  # Some rework will be needed to allow for fast_install
3623  # before this can be enabled.
3624  hardcode_into_libs=yes
3625
3626  # Append ld.so.conf contents to the search path
3627  if test -f /etc/ld.so.conf; then
3628    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;s/"//g;/^$/d' | tr '\n' ' '`
3629    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3630  fi
3631
3632  # We used to test for /lib/ld.so.1 and disable shared libraries on
3633  # powerpc, because MkLinux only supported shared libraries with the
3634  # GNU dynamic linker.  Since this was broken with cross compilers,
3635  # most powerpc-linux boxes support dynamic linking these days and
3636  # people can always --disable-shared, the test was removed, and we
3637  # assume the GNU/Linux dynamic linker is in use.
3638  dynamic_linker='GNU/Linux ld.so'
3639  ;;
3640
3641netbsd*)
3642  version_type=sunos
3643  need_lib_prefix=no
3644  need_version=no
3645  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
3646    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3647    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3648    dynamic_linker='NetBSD (a.out) ld.so'
3649  else
3650    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3651    soname_spec='${libname}${release}${shared_ext}$major'
3652    dynamic_linker='NetBSD ld.elf_so'
3653  fi
3654  shlibpath_var=LD_LIBRARY_PATH
3655  shlibpath_overrides_runpath=yes
3656  hardcode_into_libs=yes
3657  ;;
3658
3659newsos6)
3660  version_type=linux
3661  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3662  shlibpath_var=LD_LIBRARY_PATH
3663  shlibpath_overrides_runpath=yes
3664  ;;
3665
3666*nto* | *qnx*)
3667  version_type=qnx
3668  need_lib_prefix=no
3669  need_version=no
3670  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3671  soname_spec='${libname}${release}${shared_ext}$major'
3672  shlibpath_var=LD_LIBRARY_PATH
3673  shlibpath_overrides_runpath=no
3674  hardcode_into_libs=yes
3675  dynamic_linker='ldqnx.so'
3676  ;;
3677
3678openbsd*)
3679  version_type=sunos
3680  sys_lib_dlsearch_path_spec="/usr/lib"
3681  need_lib_prefix=no
3682  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3683  case $host_os in
3684    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
3685    *)				need_version=no  ;;
3686  esac
3687  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3688  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3689  shlibpath_var=LD_LIBRARY_PATH
3690  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3691    case $host_os in
3692      openbsd2.[[89]] | openbsd2.[[89]].*)
3693	shlibpath_overrides_runpath=no
3694	;;
3695      *)
3696	shlibpath_overrides_runpath=yes
3697	;;
3698      esac
3699  else
3700    shlibpath_overrides_runpath=yes
3701  fi
3702  ;;
3703
3704os2*)
3705  libname_spec='$name'
3706  shrext_cmds=".dll"
3707  need_lib_prefix=no
3708  library_names_spec='$libname${shared_ext} $libname.a'
3709  dynamic_linker='OS/2 ld.exe'
3710  shlibpath_var=LIBPATH
3711  ;;
3712
3713osf3* | osf4* | osf5*)
3714  version_type=osf
3715  need_lib_prefix=no
3716  need_version=no
3717  soname_spec='${libname}${release}${shared_ext}$major'
3718  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3719  shlibpath_var=LD_LIBRARY_PATH
3720  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3721  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3722  ;;
3723
3724rdos*)
3725  dynamic_linker=no
3726  ;;
3727
3728solaris*)
3729  version_type=linux
3730  need_lib_prefix=no
3731  need_version=no
3732  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3733  soname_spec='${libname}${release}${shared_ext}$major'
3734  shlibpath_var=LD_LIBRARY_PATH
3735  shlibpath_overrides_runpath=yes
3736  hardcode_into_libs=yes
3737  # ldd complains unless libraries are executable
3738  postinstall_cmds='chmod +x $lib'
3739  ;;
3740
3741sunos4*)
3742  version_type=sunos
3743  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3744  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3745  shlibpath_var=LD_LIBRARY_PATH
3746  shlibpath_overrides_runpath=yes
3747  if test "$with_gnu_ld" = yes; then
3748    need_lib_prefix=no
3749  fi
3750  need_version=yes
3751  ;;
3752
3753sysv4 | sysv4.3*)
3754  version_type=linux
3755  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3756  soname_spec='${libname}${release}${shared_ext}$major'
3757  shlibpath_var=LD_LIBRARY_PATH
3758  case $host_vendor in
3759    sni)
3760      shlibpath_overrides_runpath=no
3761      need_lib_prefix=no
3762      runpath_var=LD_RUN_PATH
3763      ;;
3764    siemens)
3765      need_lib_prefix=no
3766      ;;
3767    motorola)
3768      need_lib_prefix=no
3769      need_version=no
3770      shlibpath_overrides_runpath=no
3771      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3772      ;;
3773  esac
3774  ;;
3775
3776sysv4*MP*)
3777  if test -d /usr/nec ;then
3778    version_type=linux
3779    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3780    soname_spec='$libname${shared_ext}.$major'
3781    shlibpath_var=LD_LIBRARY_PATH
3782  fi
3783  ;;
3784
3785sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3786  version_type=freebsd-elf
3787  need_lib_prefix=no
3788  need_version=no
3789  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3790  soname_spec='${libname}${release}${shared_ext}$major'
3791  shlibpath_var=LD_LIBRARY_PATH
3792  shlibpath_overrides_runpath=yes
3793  hardcode_into_libs=yes
3794  if test "$with_gnu_ld" = yes; then
3795    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3796  else
3797    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3798    case $host_os in
3799      sco3.2v5*)
3800        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3801	;;
3802    esac
3803  fi
3804  sys_lib_dlsearch_path_spec='/usr/lib'
3805  ;;
3806
3807tpf*)
3808  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
3809  version_type=linux
3810  need_lib_prefix=no
3811  need_version=no
3812  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3813  shlibpath_var=LD_LIBRARY_PATH
3814  shlibpath_overrides_runpath=no
3815  hardcode_into_libs=yes
3816  ;;
3817
3818uts4*)
3819  version_type=linux
3820  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3821  soname_spec='${libname}${release}${shared_ext}$major'
3822  shlibpath_var=LD_LIBRARY_PATH
3823  ;;
3824
3825*)
3826  dynamic_linker=no
3827  ;;
3828esac
3829AC_MSG_RESULT([$dynamic_linker])
3830test "$dynamic_linker" = no && can_build_shared=no
3831
3832variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3833if test "$GCC" = yes; then
3834  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3835fi
3836
3837if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
3838  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3839fi
3840if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
3841  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3842fi
3843
3844_LT_DECL([], [variables_saved_for_relink], [1],
3845    [Variables whose values should be saved in libtool wrapper scripts and
3846    restored at link time])
3847_LT_DECL([], [need_lib_prefix], [0],
3848    [Do we need the "lib" prefix for modules?])
3849_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
3850_LT_DECL([], [version_type], [0], [Library versioning type])
3851_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
3852_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
3853_LT_DECL([], [shlibpath_overrides_runpath], [0],
3854    [Is shlibpath searched before the hard-coded library search path?])
3855_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
3856_LT_DECL([], [library_names_spec], [1],
3857    [[List of archive names.  First name is the real one, the rest are links.
3858    The last name is the one that the linker finds with -lNAME]])
3859_LT_DECL([], [soname_spec], [1],
3860    [[The coded name of the library, if different from the real name]])
3861_LT_DECL([], [install_override_mode], [1],
3862    [Permission mode override for installation of shared libraries])
3863_LT_DECL([], [postinstall_cmds], [2],
3864    [Command to use after installation of a shared archive])
3865_LT_DECL([], [postuninstall_cmds], [2],
3866    [Command to use after uninstallation of a shared archive])
3867_LT_DECL([], [finish_cmds], [2],
3868    [Commands used to finish a libtool library installation in a directory])
3869_LT_DECL([], [finish_eval], [1],
3870    [[As "finish_cmds", except a single script fragment to be evaled but
3871    not shown]])
3872_LT_DECL([], [hardcode_into_libs], [0],
3873    [Whether we should hardcode library paths into libraries])
3874_LT_DECL([], [sys_lib_search_path_spec], [2],
3875    [Compile-time system search path for libraries])
3876_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
3877    [Run-time system search path for libraries])
3878])# _LT_SYS_DYNAMIC_LINKER
3879
3880
3881# _LT_PATH_TOOL_PREFIX(TOOL)
3882# --------------------------
3883# find a file program which can recognize shared library
3884AC_DEFUN([_LT_PATH_TOOL_PREFIX],
3885[m4_require([_LT_DECL_EGREP])dnl
3886AC_MSG_CHECKING([for $1])
3887AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3888[case $MAGIC_CMD in
3889[[\\/*] |  ?:[\\/]*])
3890  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3891  ;;
3892*)
3893  lt_save_MAGIC_CMD="$MAGIC_CMD"
3894  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3895dnl $ac_dummy forces splitting on constant user-supplied paths.
3896dnl POSIX.2 word splitting is done only on the output of word expansions,
3897dnl not every word.  This closes a longstanding sh security hole.
3898  ac_dummy="m4_if([$2], , $PATH, [$2])"
3899  for ac_dir in $ac_dummy; do
3900    IFS="$lt_save_ifs"
3901    test -z "$ac_dir" && ac_dir=.
3902    if test -f $ac_dir/$1; then
3903      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3904      if test -n "$file_magic_test_file"; then
3905	case $deplibs_check_method in
3906	"file_magic "*)
3907	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3908	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3909	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3910	    $EGREP "$file_magic_regex" > /dev/null; then
3911	    :
3912	  else
3913	    cat <<_LT_EOF 1>&2
3914
3915*** Warning: the command libtool uses to detect shared libraries,
3916*** $file_magic_cmd, produces output that libtool cannot recognize.
3917*** The result is that libtool may fail to recognize shared libraries
3918*** as such.  This will affect the creation of libtool libraries that
3919*** depend on shared libraries, but programs linked with such libtool
3920*** libraries will work regardless of this problem.  Nevertheless, you
3921*** may want to report the problem to your system manager and/or to
3922*** bug-libtool@gnu.org
3923
3924_LT_EOF
3925	  fi ;;
3926	esac
3927      fi
3928      break
3929    fi
3930  done
3931  IFS="$lt_save_ifs"
3932  MAGIC_CMD="$lt_save_MAGIC_CMD"
3933  ;;
3934esac])
3935MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3936if test -n "$MAGIC_CMD"; then
3937  AC_MSG_RESULT($MAGIC_CMD)
3938else
3939  AC_MSG_RESULT(no)
3940fi
3941_LT_DECL([], [MAGIC_CMD], [0],
3942	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
3943])# _LT_PATH_TOOL_PREFIX
3944
3945# Old name:
3946AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
3947dnl aclocal-1.4 backwards compatibility:
3948dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
3949
3950
3951# _LT_PATH_MAGIC
3952# --------------
3953# find a file program which can recognize a shared library
3954m4_defun([_LT_PATH_MAGIC],
3955[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3956if test -z "$lt_cv_path_MAGIC_CMD"; then
3957  if test -n "$ac_tool_prefix"; then
3958    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3959  else
3960    MAGIC_CMD=:
3961  fi
3962fi
3963])# _LT_PATH_MAGIC
3964
3965
3966# LT_PATH_LD
3967# ----------
3968# find the pathname to the GNU or non-GNU linker
3969AC_DEFUN([LT_PATH_LD],
3970[AC_REQUIRE([AC_PROG_CC])dnl
3971AC_REQUIRE([AC_CANONICAL_HOST])dnl
3972AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3973m4_require([_LT_DECL_SED])dnl
3974m4_require([_LT_DECL_EGREP])dnl
3975m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
3976
3977AC_ARG_WITH([gnu-ld],
3978    [AS_HELP_STRING([--with-gnu-ld],
3979	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3980    [test "$withval" = no || with_gnu_ld=yes],
3981    [with_gnu_ld=no])dnl
3982
3983ac_prog=ld
3984if test "$GCC" = yes; then
3985  # Check if gcc -print-prog-name=ld gives a path.
3986  AC_MSG_CHECKING([for ld used by $CC])
3987  case $host in
3988  *-*-mingw*)
3989    # gcc leaves a trailing carriage return which upsets mingw
3990    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3991  *)
3992    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3993  esac
3994  case $ac_prog in
3995    # Accept absolute paths.
3996    [[\\/]]* | ?:[[\\/]]*)
3997      re_direlt='/[[^/]][[^/]]*/\.\./'
3998      # Canonicalize the pathname of ld
3999      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4000      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4001	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4002      done
4003      test -z "$LD" && LD="$ac_prog"
4004      ;;
4005  "")
4006    # If it fails, then pretend we aren't using GCC.
4007    ac_prog=ld
4008    ;;
4009  *)
4010    # If it is relative, then search for the first ld in PATH.
4011    with_gnu_ld=unknown
4012    ;;
4013  esac
4014elif test "$with_gnu_ld" = yes; then
4015  AC_MSG_CHECKING([for GNU ld])
4016else
4017  AC_MSG_CHECKING([for non-GNU ld])
4018fi
4019AC_CACHE_VAL(lt_cv_path_LD,
4020[if test -z "$LD"; then
4021  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4022  for ac_dir in $PATH; do
4023    IFS="$lt_save_ifs"
4024    test -z "$ac_dir" && ac_dir=.
4025    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4026      lt_cv_path_LD="$ac_dir/$ac_prog"
4027      # Check to see if the program is GNU ld.  I'd rather use --version,
4028      # but apparently some variants of GNU ld only accept -v.
4029      # Break only if it was the GNU/non-GNU ld that we prefer.
4030      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4031      *GNU* | *'with BFD'*)
4032	test "$with_gnu_ld" != no && break
4033	;;
4034      *)
4035	test "$with_gnu_ld" != yes && break
4036	;;
4037      esac
4038    fi
4039  done
4040  IFS="$lt_save_ifs"
4041else
4042  lt_cv_path_LD="$LD" # Let the user override the test with a path.
4043fi])
4044LD="$lt_cv_path_LD"
4045if test -n "$LD"; then
4046  AC_MSG_RESULT($LD)
4047else
4048  AC_MSG_RESULT(no)
4049fi
4050test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4051_LT_PATH_LD_GNU
4052AC_SUBST([LD])
4053
4054_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4055])# LT_PATH_LD
4056
4057# Old names:
4058AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4059AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4060dnl aclocal-1.4 backwards compatibility:
4061dnl AC_DEFUN([AM_PROG_LD], [])
4062dnl AC_DEFUN([AC_PROG_LD], [])
4063
4064
4065# _LT_PATH_LD_GNU
4066#- --------------
4067m4_defun([_LT_PATH_LD_GNU],
4068[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4069[# I'd rather use --version here, but apparently some GNU lds only accept -v.
4070case `$LD -v 2>&1 </dev/null` in
4071*GNU* | *'with BFD'*)
4072  lt_cv_prog_gnu_ld=yes
4073  ;;
4074*)
4075  lt_cv_prog_gnu_ld=no
4076  ;;
4077esac])
4078with_gnu_ld=$lt_cv_prog_gnu_ld
4079])# _LT_PATH_LD_GNU
4080
4081
4082# _LT_CMD_RELOAD
4083# --------------
4084# find reload flag for linker
4085#   -- PORTME Some linkers may need a different reload flag.
4086m4_defun([_LT_CMD_RELOAD],
4087[AC_CACHE_CHECK([for $LD option to reload object files],
4088  lt_cv_ld_reload_flag,
4089  [lt_cv_ld_reload_flag='-r'])
4090reload_flag=$lt_cv_ld_reload_flag
4091case $reload_flag in
4092"" | " "*) ;;
4093*) reload_flag=" $reload_flag" ;;
4094esac
4095reload_cmds='$LD$reload_flag -o $output$reload_objs'
4096case $host_os in
4097  cygwin* | mingw* | pw32* | cegcc*)
4098    if test "$GCC" != yes; then
4099      reload_cmds=false
4100    fi
4101    ;;
4102  darwin*)
4103    if test "$GCC" = yes; then
4104      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4105    else
4106      reload_cmds='$LD$reload_flag -o $output$reload_objs'
4107    fi
4108    ;;
4109esac
4110_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4111_LT_TAGDECL([], [reload_cmds], [2])dnl
4112])# _LT_CMD_RELOAD
4113
4114
4115# _LT_CHECK_MAGIC_METHOD
4116# ----------------------
4117# how to check for library dependencies
4118#  -- PORTME fill in with the dynamic library characteristics
4119m4_defun([_LT_CHECK_MAGIC_METHOD],
4120[m4_require([_LT_DECL_EGREP])
4121m4_require([_LT_DECL_OBJDUMP])
4122AC_CACHE_CHECK([how to recognize dependent libraries],
4123lt_cv_deplibs_check_method,
4124[lt_cv_file_magic_cmd='$MAGIC_CMD'
4125lt_cv_file_magic_test_file=
4126lt_cv_deplibs_check_method='unknown'
4127# Need to set the preceding variable on all platforms that support
4128# interlibrary dependencies.
4129# 'none' -- dependencies not supported.
4130# `unknown' -- same as none, but documents that we really don't know.
4131# 'pass_all' -- all dependencies passed with no checks.
4132# 'test_compile' -- check by making test program.
4133# 'file_magic [[regex]]' -- check by looking for files in library path
4134# which responds to the $file_magic_cmd with a given extended regex.
4135# If you have `file' or equivalent on your system and you're not sure
4136# whether `pass_all' will *always* work, you probably want this one.
4137
4138case $host_os in
4139aix[[4-9]]*)
4140  lt_cv_deplibs_check_method=pass_all
4141  ;;
4142
4143beos*)
4144  lt_cv_deplibs_check_method=pass_all
4145  ;;
4146
4147bsdi[[45]]*)
4148  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4149  lt_cv_file_magic_cmd='/usr/bin/file -L'
4150  lt_cv_file_magic_test_file=/shlib/libc.so
4151  ;;
4152
4153cygwin*)
4154  # func_win32_libid is a shell function defined in ltmain.sh
4155  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4156  lt_cv_file_magic_cmd='func_win32_libid'
4157  ;;
4158
4159mingw* | pw32*)
4160  # Base MSYS/MinGW do not provide the 'file' command needed by
4161  # func_win32_libid shell function, so use a weaker test based on 'objdump',
4162  # unless we find 'file', for example because we are cross-compiling.
4163  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
4164  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
4165    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4166    lt_cv_file_magic_cmd='func_win32_libid'
4167  else
4168    # Keep this pattern in sync with the one in func_win32_libid.
4169    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
4170    lt_cv_file_magic_cmd='$OBJDUMP -f'
4171  fi
4172  ;;
4173
4174cegcc*)
4175  # use the weaker test based on 'objdump'. See mingw*.
4176  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4177  lt_cv_file_magic_cmd='$OBJDUMP -f'
4178  ;;
4179
4180darwin* | rhapsody*)
4181  lt_cv_deplibs_check_method=pass_all
4182  ;;
4183
4184freebsd* | dragonfly*)
4185  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4186    case $host_cpu in
4187    i*86 )
4188      # Not sure whether the presence of OpenBSD here was a mistake.
4189      # Let's accept both of them until this is cleared up.
4190      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4191      lt_cv_file_magic_cmd=/usr/bin/file
4192      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4193      ;;
4194    esac
4195  else
4196    lt_cv_deplibs_check_method=pass_all
4197  fi
4198  ;;
4199
4200gnu*)
4201  lt_cv_deplibs_check_method=pass_all
4202  ;;
4203
4204haiku*)
4205  lt_cv_deplibs_check_method=pass_all
4206  ;;
4207
4208hpux10.20* | hpux11*)
4209  lt_cv_file_magic_cmd=/usr/bin/file
4210  case $host_cpu in
4211  ia64*)
4212    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4213    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4214    ;;
4215  hppa*64*)
4216    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
4217    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4218    ;;
4219  *)
4220    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
4221    lt_cv_file_magic_test_file=/usr/lib/libc.sl
4222    ;;
4223  esac
4224  ;;
4225
4226interix[[3-9]]*)
4227  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4228  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4229  ;;
4230
4231irix5* | irix6* | nonstopux*)
4232  case $LD in
4233  *-32|*"-32 ") libmagic=32-bit;;
4234  *-n32|*"-n32 ") libmagic=N32;;
4235  *-64|*"-64 ") libmagic=64-bit;;
4236  *) libmagic=never-match;;
4237  esac
4238  lt_cv_deplibs_check_method=pass_all
4239  ;;
4240
4241# This must be Linux ELF.
4242linux* | k*bsd*-gnu | kopensolaris*-gnu)
4243  lt_cv_deplibs_check_method=pass_all
4244  ;;
4245
4246netbsd*)
4247  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4248    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4249  else
4250    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4251  fi
4252  ;;
4253
4254newos6*)
4255  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4256  lt_cv_file_magic_cmd=/usr/bin/file
4257  lt_cv_file_magic_test_file=/usr/lib/libnls.so
4258  ;;
4259
4260*nto* | *qnx*)
4261  lt_cv_deplibs_check_method=pass_all
4262  ;;
4263
4264openbsd*)
4265  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4266    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4267  else
4268    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4269  fi
4270  ;;
4271
4272osf3* | osf4* | osf5*)
4273  lt_cv_deplibs_check_method=pass_all
4274  ;;
4275
4276rdos*)
4277  lt_cv_deplibs_check_method=pass_all
4278  ;;
4279
4280solaris*)
4281  lt_cv_deplibs_check_method=pass_all
4282  ;;
4283
4284sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4285  lt_cv_deplibs_check_method=pass_all
4286  ;;
4287
4288sysv4 | sysv4.3*)
4289  case $host_vendor in
4290  motorola)
4291    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]]'
4292    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4293    ;;
4294  ncr)
4295    lt_cv_deplibs_check_method=pass_all
4296    ;;
4297  sequent)
4298    lt_cv_file_magic_cmd='/bin/file'
4299    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4300    ;;
4301  sni)
4302    lt_cv_file_magic_cmd='/bin/file'
4303    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4304    lt_cv_file_magic_test_file=/lib/libc.so
4305    ;;
4306  siemens)
4307    lt_cv_deplibs_check_method=pass_all
4308    ;;
4309  pc)
4310    lt_cv_deplibs_check_method=pass_all
4311    ;;
4312  esac
4313  ;;
4314
4315tpf*)
4316  lt_cv_deplibs_check_method=pass_all
4317  ;;
4318esac
4319])
4320
4321file_magic_glob=
4322want_nocaseglob=no
4323if test "$build" = "$host"; then
4324  case $host_os in
4325  mingw* | pw32*)
4326    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
4327      want_nocaseglob=yes
4328    else
4329      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
4330    fi
4331    ;;
4332  esac
4333fi
4334
4335file_magic_cmd=$lt_cv_file_magic_cmd
4336deplibs_check_method=$lt_cv_deplibs_check_method
4337test -z "$deplibs_check_method" && deplibs_check_method=unknown
4338
4339_LT_DECL([], [deplibs_check_method], [1],
4340    [Method to check whether dependent libraries are shared objects])
4341_LT_DECL([], [file_magic_cmd], [1],
4342    [Command to use when deplibs_check_method = "file_magic"])
4343_LT_DECL([], [file_magic_glob], [1],
4344    [How to find potential files when deplibs_check_method = "file_magic"])
4345_LT_DECL([], [want_nocaseglob], [1],
4346    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
4347])# _LT_CHECK_MAGIC_METHOD
4348
4349
4350# LT_PATH_NM
4351# ----------
4352# find the pathname to a BSD- or MS-compatible name lister
4353AC_DEFUN([LT_PATH_NM],
4354[AC_REQUIRE([AC_PROG_CC])dnl
4355AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4356[if test -n "$NM"; then
4357  # Let the user override the test.
4358  lt_cv_path_NM="$NM"
4359else
4360  lt_nm_to_check="${ac_tool_prefix}nm"
4361  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4362    lt_nm_to_check="$lt_nm_to_check nm"
4363  fi
4364  for lt_tmp_nm in $lt_nm_to_check; do
4365    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4366    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4367      IFS="$lt_save_ifs"
4368      test -z "$ac_dir" && ac_dir=.
4369      tmp_nm="$ac_dir/$lt_tmp_nm"
4370      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4371	# Check to see if the nm accepts a BSD-compat flag.
4372	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
4373	#   nm: unknown option "B" ignored
4374	# Tru64's nm complains that /dev/null is an invalid object file
4375	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4376	*/dev/null* | *'Invalid file or object type'*)
4377	  lt_cv_path_NM="$tmp_nm -B"
4378	  break
4379	  ;;
4380	*)
4381	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4382	  */dev/null*)
4383	    lt_cv_path_NM="$tmp_nm -p"
4384	    break
4385	    ;;
4386	  *)
4387	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4388	    continue # so that we can try to find one that supports BSD flags
4389	    ;;
4390	  esac
4391	  ;;
4392	esac
4393      fi
4394    done
4395    IFS="$lt_save_ifs"
4396  done
4397  : ${lt_cv_path_NM=no}
4398fi])
4399if test "$lt_cv_path_NM" != "no"; then
4400  NM="$lt_cv_path_NM"
4401else
4402  # Didn't find any BSD compatible name lister, look for dumpbin.
4403  if test -n "$DUMPBIN"; then :
4404    # Let the user override the test.
4405  else
4406    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
4407    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
4408    *COFF*)
4409      DUMPBIN="$DUMPBIN -symbols"
4410      ;;
4411    *)
4412      DUMPBIN=:
4413      ;;
4414    esac
4415  fi
4416  AC_SUBST([DUMPBIN])
4417  if test "$DUMPBIN" != ":"; then
4418    NM="$DUMPBIN"
4419  fi
4420fi
4421test -z "$NM" && NM=nm
4422AC_SUBST([NM])
4423_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4424
4425AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4426  [lt_cv_nm_interface="BSD nm"
4427  echo "int some_variable = 0;" > conftest.$ac_ext
4428  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4429  (eval "$ac_compile" 2>conftest.err)
4430  cat conftest.err >&AS_MESSAGE_LOG_FD
4431  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4432  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4433  cat conftest.err >&AS_MESSAGE_LOG_FD
4434  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
4435  cat conftest.out >&AS_MESSAGE_LOG_FD
4436  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4437    lt_cv_nm_interface="MS dumpbin"
4438  fi
4439  rm -f conftest*])
4440])# LT_PATH_NM
4441
4442# Old names:
4443AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4444AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4445dnl aclocal-1.4 backwards compatibility:
4446dnl AC_DEFUN([AM_PROG_NM], [])
4447dnl AC_DEFUN([AC_PROG_NM], [])
4448
4449# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4450# --------------------------------
4451# how to determine the name of the shared library
4452# associated with a specific link library.
4453#  -- PORTME fill in with the dynamic library characteristics
4454m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
4455[m4_require([_LT_DECL_EGREP])
4456m4_require([_LT_DECL_OBJDUMP])
4457m4_require([_LT_DECL_DLLTOOL])
4458AC_CACHE_CHECK([how to associate runtime and link libraries],
4459lt_cv_sharedlib_from_linklib_cmd,
4460[lt_cv_sharedlib_from_linklib_cmd='unknown'
4461
4462case $host_os in
4463cygwin* | mingw* | pw32* | cegcc*)
4464  # two different shell functions defined in ltmain.sh
4465  # decide which to use based on capabilities of $DLLTOOL
4466  case `$DLLTOOL --help 2>&1` in
4467  *--identify-strict*)
4468    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
4469    ;;
4470  *)
4471    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
4472    ;;
4473  esac
4474  ;;
4475*)
4476  # fallback: assume linklib IS sharedlib
4477  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
4478  ;;
4479esac
4480])
4481sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
4482test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
4483
4484_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
4485    [Command to associate shared and link libraries])
4486])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4487
4488
4489# _LT_PATH_MANIFEST_TOOL
4490# ----------------------
4491# locate the manifest tool
4492m4_defun([_LT_PATH_MANIFEST_TOOL],
4493[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
4494test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
4495AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
4496  [lt_cv_path_mainfest_tool=no
4497  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
4498  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
4499  cat conftest.err >&AS_MESSAGE_LOG_FD
4500  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
4501    lt_cv_path_mainfest_tool=yes
4502  fi
4503  rm -f conftest*])
4504if test "x$lt_cv_path_mainfest_tool" != xyes; then
4505  MANIFEST_TOOL=:
4506fi
4507_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
4508])# _LT_PATH_MANIFEST_TOOL
4509
4510
4511# LT_LIB_M
4512# --------
4513# check for math library
4514AC_DEFUN([LT_LIB_M],
4515[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4516LIBM=
4517case $host in
4518*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
4519  # These system don't have libm, or don't need it
4520  ;;
4521*-ncr-sysv4.3*)
4522  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4523  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4524  ;;
4525*)
4526  AC_CHECK_LIB(m, cos, LIBM="-lm")
4527  ;;
4528esac
4529AC_SUBST([LIBM])
4530])# LT_LIB_M
4531
4532# Old name:
4533AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4534dnl aclocal-1.4 backwards compatibility:
4535dnl AC_DEFUN([AC_CHECK_LIBM], [])
4536
4537
4538# _LT_COMPILER_NO_RTTI([TAGNAME])
4539# -------------------------------
4540m4_defun([_LT_COMPILER_NO_RTTI],
4541[m4_require([_LT_TAG_COMPILER])dnl
4542
4543_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4544
4545if test "$GCC" = yes; then
4546  case $cc_basename in
4547  nvcc*)
4548    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
4549  *)
4550    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
4551  esac
4552
4553  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4554    lt_cv_prog_compiler_rtti_exceptions,
4555    [-fno-rtti -fno-exceptions], [],
4556    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4557fi
4558_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4559	[Compiler flag to turn off builtin functions])
4560])# _LT_COMPILER_NO_RTTI
4561
4562
4563# _LT_CMD_GLOBAL_SYMBOLS
4564# ----------------------
4565m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4566[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4567AC_REQUIRE([AC_PROG_CC])dnl
4568AC_REQUIRE([AC_PROG_AWK])dnl
4569AC_REQUIRE([LT_PATH_NM])dnl
4570AC_REQUIRE([LT_PATH_LD])dnl
4571m4_require([_LT_DECL_SED])dnl
4572m4_require([_LT_DECL_EGREP])dnl
4573m4_require([_LT_TAG_COMPILER])dnl
4574
4575# Check for command to grab the raw symbol name followed by C symbol from nm.
4576AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4577AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4578[
4579# These are sane defaults that work on at least a few old systems.
4580# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4581
4582# Character class describing NM global symbol codes.
4583symcode='[[BCDEGRST]]'
4584
4585# Regexp to match symbols that can be accessed directly from C.
4586sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4587
4588# Define system-specific variables.
4589case $host_os in
4590aix*)
4591  symcode='[[BCDT]]'
4592  ;;
4593cygwin* | mingw* | pw32* | cegcc*)
4594  symcode='[[ABCDGISTW]]'
4595  ;;
4596hpux*)
4597  if test "$host_cpu" = ia64; then
4598    symcode='[[ABCDEGRST]]'
4599  fi
4600  ;;
4601irix* | nonstopux*)
4602  symcode='[[BCDEGRST]]'
4603  ;;
4604osf*)
4605  symcode='[[BCDEGQRST]]'
4606  ;;
4607solaris*)
4608  symcode='[[BDRT]]'
4609  ;;
4610sco3.2v5*)
4611  symcode='[[DT]]'
4612  ;;
4613sysv4.2uw2*)
4614  symcode='[[DT]]'
4615  ;;
4616sysv5* | sco5v6* | unixware* | OpenUNIX*)
4617  symcode='[[ABDT]]'
4618  ;;
4619sysv4)
4620  symcode='[[DFNSTU]]'
4621  ;;
4622esac
4623
4624# If we're using GNU nm, then use its standard symbol codes.
4625case `$NM -V 2>&1` in
4626*GNU* | *'with BFD'*)
4627  symcode='[[ABCDGIRSTW]]' ;;
4628esac
4629
4630# Transform an extracted symbol line into a proper C declaration.
4631# Some systems (esp. on ia64) link data and code symbols differently,
4632# so use this general approach.
4633lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4634
4635# Transform an extracted symbol line into symbol name and symbol address
4636lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
4637lt_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'"
4638
4639# Handle CRLF in mingw tool chain
4640opt_cr=
4641case $build_os in
4642mingw*)
4643  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4644  ;;
4645esac
4646
4647# Try without a prefix underscore, then with it.
4648for ac_symprfx in "" "_"; do
4649
4650  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4651  symxfrm="\\1 $ac_symprfx\\2 \\2"
4652
4653  # Write the raw and C identifiers.
4654  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4655    # Fake it for dumpbin and say T for any non-static function
4656    # and D for any global variable.
4657    # Also find C++ and __fastcall symbols from MSVC++,
4658    # which start with @ or ?.
4659    lt_cv_sys_global_symbol_pipe="$AWK ['"\
4660"     {last_section=section; section=\$ 3};"\
4661"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
4662"     \$ 0!~/External *\|/{next};"\
4663"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
4664"     {if(hide[section]) next};"\
4665"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
4666"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
4667"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
4668"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
4669"     ' prfx=^$ac_symprfx]"
4670  else
4671    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4672  fi
4673  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
4674
4675  # Check to see that the pipe works correctly.
4676  pipe_works=no
4677
4678  rm -f conftest*
4679  cat > conftest.$ac_ext <<_LT_EOF
4680#ifdef __cplusplus
4681extern "C" {
4682#endif
4683char nm_test_var;
4684void nm_test_func(void);
4685void nm_test_func(void){}
4686#ifdef __cplusplus
4687}
4688#endif
4689int main(){nm_test_var='a';nm_test_func();return(0);}
4690_LT_EOF
4691
4692  if AC_TRY_EVAL(ac_compile); then
4693    # Now try to grab the symbols.
4694    nlist=conftest.nm
4695    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
4696      # Try sorting and uniquifying the output.
4697      if sort "$nlist" | uniq > "$nlist"T; then
4698	mv -f "$nlist"T "$nlist"
4699      else
4700	rm -f "$nlist"T
4701      fi
4702
4703      # Make sure that we snagged all the symbols we need.
4704      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
4705	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
4706	  cat <<_LT_EOF > conftest.$ac_ext
4707/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
4708#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
4709/* DATA imports from DLLs on WIN32 con't be const, because runtime
4710   relocations are performed -- see ld's documentation on pseudo-relocs.  */
4711# define LT@&t@_DLSYM_CONST
4712#elif defined(__osf__)
4713/* This system does not cope well with relocations in const data.  */
4714# define LT@&t@_DLSYM_CONST
4715#else
4716# define LT@&t@_DLSYM_CONST const
4717#endif
4718
4719#ifdef __cplusplus
4720extern "C" {
4721#endif
4722
4723_LT_EOF
4724	  # Now generate the symbol file.
4725	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4726
4727	  cat <<_LT_EOF >> conftest.$ac_ext
4728
4729/* The mapping between symbol names and symbols.  */
4730LT@&t@_DLSYM_CONST struct {
4731  const char *name;
4732  void       *address;
4733}
4734lt__PROGRAM__LTX_preloaded_symbols[[]] =
4735{
4736  { "@PROGRAM@", (void *) 0 },
4737_LT_EOF
4738	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
4739	  cat <<\_LT_EOF >> conftest.$ac_ext
4740  {0, (void *) 0}
4741};
4742
4743/* This works around a problem in FreeBSD linker */
4744#ifdef FREEBSD_WORKAROUND
4745static const void *lt_preloaded_setup() {
4746  return lt__PROGRAM__LTX_preloaded_symbols;
4747}
4748#endif
4749
4750#ifdef __cplusplus
4751}
4752#endif
4753_LT_EOF
4754	  # Now try linking the two files.
4755	  mv conftest.$ac_objext conftstm.$ac_objext
4756	  lt_globsym_save_LIBS=$LIBS
4757	  lt_globsym_save_CFLAGS=$CFLAGS
4758	  LIBS="conftstm.$ac_objext"
4759	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4760	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4761	    pipe_works=yes
4762	  fi
4763	  LIBS=$lt_globsym_save_LIBS
4764	  CFLAGS=$lt_globsym_save_CFLAGS
4765	else
4766	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4767	fi
4768      else
4769	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4770      fi
4771    else
4772      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4773    fi
4774  else
4775    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4776    cat conftest.$ac_ext >&5
4777  fi
4778  rm -rf conftest* conftst*
4779
4780  # Do not use the global_symbol_pipe unless it works.
4781  if test "$pipe_works" = yes; then
4782    break
4783  else
4784    lt_cv_sys_global_symbol_pipe=
4785  fi
4786done
4787])
4788if test -z "$lt_cv_sys_global_symbol_pipe"; then
4789  lt_cv_sys_global_symbol_to_cdecl=
4790fi
4791if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4792  AC_MSG_RESULT(failed)
4793else
4794  AC_MSG_RESULT(ok)
4795fi
4796
4797# Response file support.
4798if test "$lt_cv_nm_interface" = "MS dumpbin"; then
4799  nm_file_list_spec='@'
4800elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
4801  nm_file_list_spec='@'
4802fi
4803
4804_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
4805    [Take the output of nm and produce a listing of raw symbols and C names])
4806_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
4807    [Transform the output of nm in a proper C declaration])
4808_LT_DECL([global_symbol_to_c_name_address],
4809    [lt_cv_sys_global_symbol_to_c_name_address], [1],
4810    [Transform the output of nm in a C name address pair])
4811_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
4812    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
4813    [Transform the output of nm in a C name address pair when lib prefix is needed])
4814_LT_DECL([], [nm_file_list_spec], [1],
4815    [Specify filename containing input files for $NM])
4816]) # _LT_CMD_GLOBAL_SYMBOLS
4817
4818
4819# _LT_COMPILER_PIC([TAGNAME])
4820# ---------------------------
4821m4_defun([_LT_COMPILER_PIC],
4822[m4_require([_LT_TAG_COMPILER])dnl
4823_LT_TAGVAR(lt_prog_compiler_wl, $1)=
4824_LT_TAGVAR(lt_prog_compiler_pic, $1)=
4825_LT_TAGVAR(lt_prog_compiler_static, $1)=
4826
4827m4_if([$1], [CXX], [
4828  # C++ specific cases for pic, static, wl, etc.
4829  if test "$GXX" = yes; then
4830    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4831    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4832
4833    case $host_os in
4834    aix*)
4835      # All AIX code is PIC.
4836      if test "$host_cpu" = ia64; then
4837	# AIX 5 now supports IA64 processor
4838	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4839      fi
4840      ;;
4841
4842    amigaos*)
4843      case $host_cpu in
4844      powerpc)
4845            # see comment about AmigaOS4 .so support
4846            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4847        ;;
4848      m68k)
4849            # FIXME: we need at least 68020 code to build shared libraries, but
4850            # adding the `-m68020' flag to GCC prevents building anything better,
4851            # like `-m68040'.
4852            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4853        ;;
4854      esac
4855      ;;
4856
4857    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4858      # PIC is the default for these OSes.
4859      ;;
4860    mingw* | cygwin* | os2* | pw32* | cegcc*)
4861      # This hack is so that the source file can tell whether it is being
4862      # built for inclusion in a dll (and should export symbols for example).
4863      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4864      # (--disable-auto-import) libraries
4865      m4_if([$1], [GCJ], [],
4866	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4867      ;;
4868    darwin* | rhapsody*)
4869      # PIC is the default on this platform
4870      # Common symbols not allowed in MH_DYLIB files
4871      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4872      ;;
4873    *djgpp*)
4874      # DJGPP does not support shared libraries at all
4875      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
4876      ;;
4877    haiku*)
4878      # PIC is the default for Haiku.
4879      # The "-static" flag exists, but is broken.
4880      _LT_TAGVAR(lt_prog_compiler_static, $1)=
4881      ;;
4882    interix[[3-9]]*)
4883      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4884      # Instead, we relocate shared libraries at runtime.
4885      ;;
4886    sysv4*MP*)
4887      if test -d /usr/nec; then
4888	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4889      fi
4890      ;;
4891    hpux*)
4892      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
4893      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
4894      # sets the default TLS model and affects inlining.
4895      case $host_cpu in
4896      hppa*64*)
4897	;;
4898      *)
4899	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4900	;;
4901      esac
4902      ;;
4903    *qnx* | *nto*)
4904      # QNX uses GNU C++, but need to define -shared option too, otherwise
4905      # it will coredump.
4906      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
4907      ;;
4908    *)
4909      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4910      ;;
4911    esac
4912  else
4913    case $host_os in
4914      aix[[4-9]]*)
4915	# All AIX code is PIC.
4916	if test "$host_cpu" = ia64; then
4917	  # AIX 5 now supports IA64 processor
4918	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4919	else
4920	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4921	fi
4922	;;
4923      chorus*)
4924	case $cc_basename in
4925	cxch68*)
4926	  # Green Hills C++ Compiler
4927	  # _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"
4928	  ;;
4929	esac
4930	;;
4931      mingw* | cygwin* | os2* | pw32* | cegcc*)
4932	# This hack is so that the source file can tell whether it is being
4933	# built for inclusion in a dll (and should export symbols for example).
4934	m4_if([$1], [GCJ], [],
4935	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
4936	;;
4937      dgux*)
4938	case $cc_basename in
4939	  ec++*)
4940	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4941	    ;;
4942	  ghcx*)
4943	    # Green Hills C++ Compiler
4944	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4945	    ;;
4946	  *)
4947	    ;;
4948	esac
4949	;;
4950      freebsd* | dragonfly*)
4951	# FreeBSD uses GNU C++
4952	;;
4953      hpux9* | hpux10* | hpux11*)
4954	case $cc_basename in
4955	  CC*)
4956	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4957	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4958	    if test "$host_cpu" != ia64; then
4959	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4960	    fi
4961	    ;;
4962	  aCC*)
4963	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4964	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4965	    case $host_cpu in
4966	    hppa*64*|ia64*)
4967	      # +Z the default
4968	      ;;
4969	    *)
4970	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4971	      ;;
4972	    esac
4973	    ;;
4974	  *)
4975	    ;;
4976	esac
4977	;;
4978      interix*)
4979	# This is c89, which is MS Visual C++ (no shared libs)
4980	# Anyone wants to do a port?
4981	;;
4982      irix5* | irix6* | nonstopux*)
4983	case $cc_basename in
4984	  CC*)
4985	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4986	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4987	    # CC pic flag -KPIC is the default.
4988	    ;;
4989	  *)
4990	    ;;
4991	esac
4992	;;
4993      linux* | k*bsd*-gnu | kopensolaris*-gnu)
4994	case $cc_basename in
4995	  KCC*)
4996	    # KAI C++ Compiler
4997	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4998	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4999	    ;;
5000	  ecpc* )
5001	    # old Intel C++ for x86_64 which still supported -KPIC.
5002	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5003	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5004	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5005	    ;;
5006	  icpc* )
5007	    # Intel C++, used to be incompatible with GCC.
5008	    # ICC 10 doesn't accept -KPIC any more.
5009	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5010	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5011	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5012	    ;;
5013	  pgCC* | pgcpp*)
5014	    # Portland Group C++ compiler
5015	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5016	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5017	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5018	    ;;
5019	  cxx*)
5020	    # Compaq C++
5021	    # Make sure the PIC flag is empty.  It appears that all Alpha
5022	    # Linux and Compaq Tru64 Unix objects are PIC.
5023	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5024	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5025	    ;;
5026	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
5027	    # IBM XL 8.0, 9.0 on PPC and BlueGene
5028	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5029	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5030	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5031	    ;;
5032	  *)
5033	    case `$CC -V 2>&1 | sed 5q` in
5034	    *Sun\ C*)
5035	      # Sun C++ 5.9
5036	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5037	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5038	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5039	      ;;
5040	    esac
5041	    ;;
5042	esac
5043	;;
5044      lynxos*)
5045	;;
5046      m88k*)
5047	;;
5048      mvs*)
5049	case $cc_basename in
5050	  cxx*)
5051	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5052	    ;;
5053	  *)
5054	    ;;
5055	esac
5056	;;
5057      netbsd*)
5058	;;
5059      *qnx* | *nto*)
5060        # QNX uses GNU C++, but need to define -shared option too, otherwise
5061        # it will coredump.
5062        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5063        ;;
5064      osf3* | osf4* | osf5*)
5065	case $cc_basename in
5066	  KCC*)
5067	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5068	    ;;
5069	  RCC*)
5070	    # Rational C++ 2.4.1
5071	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5072	    ;;
5073	  cxx*)
5074	    # Digital/Compaq C++
5075	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5076	    # Make sure the PIC flag is empty.  It appears that all Alpha
5077	    # Linux and Compaq Tru64 Unix objects are PIC.
5078	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5079	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5080	    ;;
5081	  *)
5082	    ;;
5083	esac
5084	;;
5085      psos*)
5086	;;
5087      solaris*)
5088	case $cc_basename in
5089	  CC* | sunCC*)
5090	    # Sun C++ 4.2, 5.x and Centerline C++
5091	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5092	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5093	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5094	    ;;
5095	  gcx*)
5096	    # Green Hills C++ Compiler
5097	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5098	    ;;
5099	  *)
5100	    ;;
5101	esac
5102	;;
5103      sunos4*)
5104	case $cc_basename in
5105	  CC*)
5106	    # Sun C++ 4.x
5107	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5108	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5109	    ;;
5110	  lcc*)
5111	    # Lucid
5112	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5113	    ;;
5114	  *)
5115	    ;;
5116	esac
5117	;;
5118      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5119	case $cc_basename in
5120	  CC*)
5121	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5122	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5123	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5124	    ;;
5125	esac
5126	;;
5127      tandem*)
5128	case $cc_basename in
5129	  NCC*)
5130	    # NonStop-UX NCC 3.20
5131	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5132	    ;;
5133	  *)
5134	    ;;
5135	esac
5136	;;
5137      vxworks*)
5138	;;
5139      *)
5140	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5141	;;
5142    esac
5143  fi
5144],
5145[
5146  if test "$GCC" = yes; then
5147    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5148    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5149
5150    case $host_os in
5151      aix*)
5152      # All AIX code is PIC.
5153      if test "$host_cpu" = ia64; then
5154	# AIX 5 now supports IA64 processor
5155	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5156      fi
5157      ;;
5158
5159    amigaos*)
5160      case $host_cpu in
5161      powerpc)
5162            # see comment about AmigaOS4 .so support
5163            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5164        ;;
5165      m68k)
5166            # FIXME: we need at least 68020 code to build shared libraries, but
5167            # adding the `-m68020' flag to GCC prevents building anything better,
5168            # like `-m68040'.
5169            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5170        ;;
5171      esac
5172      ;;
5173
5174    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5175      # PIC is the default for these OSes.
5176      ;;
5177
5178    mingw* | cygwin* | pw32* | os2* | cegcc*)
5179      # This hack is so that the source file can tell whether it is being
5180      # built for inclusion in a dll (and should export symbols for example).
5181      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5182      # (--disable-auto-import) libraries
5183      m4_if([$1], [GCJ], [],
5184	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5185      ;;
5186
5187    darwin* | rhapsody*)
5188      # PIC is the default on this platform
5189      # Common symbols not allowed in MH_DYLIB files
5190      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5191      ;;
5192
5193    haiku*)
5194      # PIC is the default for Haiku.
5195      # The "-static" flag exists, but is broken.
5196      _LT_TAGVAR(lt_prog_compiler_static, $1)=
5197      ;;
5198
5199    hpux*)
5200      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5201      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5202      # sets the default TLS model and affects inlining.
5203      case $host_cpu in
5204      hppa*64*)
5205	# +Z the default
5206	;;
5207      *)
5208	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5209	;;
5210      esac
5211      ;;
5212
5213    interix[[3-9]]*)
5214      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5215      # Instead, we relocate shared libraries at runtime.
5216      ;;
5217
5218    msdosdjgpp*)
5219      # Just because we use GCC doesn't mean we suddenly get shared libraries
5220      # on systems that don't support them.
5221      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5222      enable_shared=no
5223      ;;
5224
5225    *nto* | *qnx*)
5226      # QNX uses GNU C++, but need to define -shared option too, otherwise
5227      # it will coredump.
5228      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5229      ;;
5230
5231    sysv4*MP*)
5232      if test -d /usr/nec; then
5233	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5234      fi
5235      ;;
5236
5237    *)
5238      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5239      ;;
5240    esac
5241
5242    case $cc_basename in
5243    nvcc*) # Cuda Compiler Driver 2.2
5244      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
5245      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
5246      ;;
5247    esac
5248  else
5249    # PORTME Check for flag to pass linker flags through the system compiler.
5250    case $host_os in
5251    aix*)
5252      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5253      if test "$host_cpu" = ia64; then
5254	# AIX 5 now supports IA64 processor
5255	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5256      else
5257	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5258      fi
5259      ;;
5260
5261    mingw* | cygwin* | pw32* | os2* | cegcc*)
5262      # This hack is so that the source file can tell whether it is being
5263      # built for inclusion in a dll (and should export symbols for example).
5264      m4_if([$1], [GCJ], [],
5265	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5266      ;;
5267
5268    hpux9* | hpux10* | hpux11*)
5269      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5270      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5271      # not for PA HP-UX.
5272      case $host_cpu in
5273      hppa*64*|ia64*)
5274	# +Z the default
5275	;;
5276      *)
5277	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5278	;;
5279      esac
5280      # Is there a better lt_prog_compiler_static that works with the bundled CC?
5281      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5282      ;;
5283
5284    irix5* | irix6* | nonstopux*)
5285      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5286      # PIC (with -KPIC) is the default.
5287      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5288      ;;
5289
5290    linux* | k*bsd*-gnu | kopensolaris*-gnu)
5291      case $cc_basename in
5292      # old Intel for x86_64 which still supported -KPIC.
5293      ecc*)
5294	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5295	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5296	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5297        ;;
5298      # icc used to be incompatible with GCC.
5299      # ICC 10 doesn't accept -KPIC any more.
5300      icc* | ifort*)
5301	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5302	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5303	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5304        ;;
5305      # Lahey Fortran 8.1.
5306      lf95*)
5307	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5308	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5309	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5310	;;
5311      nagfor*)
5312	# NAG Fortran compiler
5313	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
5314	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5315	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5316	;;
5317      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
5318        # Portland Group compilers (*not* the Pentium gcc compiler,
5319	# which looks to be a dead project)
5320	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5321	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5322	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5323        ;;
5324      ccc*)
5325        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5326        # All Alpha code is PIC.
5327        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5328        ;;
5329      xl* | bgxl* | bgf* | mpixl*)
5330	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
5331	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5332	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5333	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5334	;;
5335      *)
5336	case `$CC -V 2>&1 | sed 5q` in
5337	*Sun\ F* | *Sun*Fortran*)
5338	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
5339	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5340	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5341	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5342	  ;;
5343	*Sun\ C*)
5344	  # Sun C 5.9
5345	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5346	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5347	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5348	  ;;
5349	esac
5350	;;
5351      esac
5352      ;;
5353
5354    newsos6)
5355      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5356      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5357      ;;
5358
5359    *nto* | *qnx*)
5360      # QNX uses GNU C++, but need to define -shared option too, otherwise
5361      # it will coredump.
5362      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5363      ;;
5364
5365    osf3* | osf4* | osf5*)
5366      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5367      # All OSF/1 code is PIC.
5368      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5369      ;;
5370
5371    rdos*)
5372      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5373      ;;
5374
5375    solaris*)
5376      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5377      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5378      case $cc_basename in
5379      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
5380	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5381      *)
5382	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5383      esac
5384      ;;
5385
5386    sunos4*)
5387      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5388      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5389      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5390      ;;
5391
5392    sysv4 | sysv4.2uw2* | sysv4.3*)
5393      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5394      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5395      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5396      ;;
5397
5398    sysv4*MP*)
5399      if test -d /usr/nec ;then
5400	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5401	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5402      fi
5403      ;;
5404
5405    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5406      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5407      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5408      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5409      ;;
5410
5411    unicos*)
5412      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5413      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5414      ;;
5415
5416    uts4*)
5417      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5418      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5419      ;;
5420
5421    *)
5422      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5423      ;;
5424    esac
5425  fi
5426])
5427case $host_os in
5428  # For platforms which do not support PIC, -DPIC is meaningless:
5429  *djgpp*)
5430    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5431    ;;
5432  *)
5433    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5434    ;;
5435esac
5436
5437AC_CACHE_CHECK([for $compiler option to produce PIC],
5438  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
5439  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5440_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
5441
5442#
5443# Check to make sure the PIC flag actually works.
5444#
5445if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5446  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5447    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5448    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5449    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5450     "" | " "*) ;;
5451     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5452     esac],
5453    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5454     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5455fi
5456_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5457	[Additional compiler flags for building library objects])
5458
5459_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5460	[How to pass a linker flag through the compiler])
5461#
5462# Check to make sure the static flag actually works.
5463#
5464wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5465_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5466  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5467  $lt_tmp_static_flag,
5468  [],
5469  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5470_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5471	[Compiler flag to prevent dynamic linking])
5472])# _LT_COMPILER_PIC
5473
5474
5475# _LT_LINKER_SHLIBS([TAGNAME])
5476# ----------------------------
5477# See if the linker supports building shared libraries.
5478m4_defun([_LT_LINKER_SHLIBS],
5479[AC_REQUIRE([LT_PATH_LD])dnl
5480AC_REQUIRE([LT_PATH_NM])dnl
5481m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5482m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5483m4_require([_LT_DECL_EGREP])dnl
5484m4_require([_LT_DECL_SED])dnl
5485m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5486m4_require([_LT_TAG_COMPILER])dnl
5487AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5488m4_if([$1], [CXX], [
5489  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5490  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5491  case $host_os in
5492  aix[[4-9]]*)
5493    # If we're using GNU nm, then we don't want the "-C" option.
5494    # -C means demangle to AIX nm, but means don't demangle with GNU nm
5495    # Also, AIX nm treats weak defined symbols like other global defined
5496    # symbols, whereas GNU nm marks them as "W".
5497    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5498      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5499    else
5500      _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'
5501    fi
5502    ;;
5503  pw32*)
5504    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5505    ;;
5506  cygwin* | mingw* | cegcc*)
5507    case $cc_basename in
5508    cl*) ;;
5509    *)
5510      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5511      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5512      ;;
5513    esac
5514    ;;
5515  *)
5516    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5517    ;;
5518  esac
5519], [
5520  runpath_var=
5521  _LT_TAGVAR(allow_undefined_flag, $1)=
5522  _LT_TAGVAR(always_export_symbols, $1)=no
5523  _LT_TAGVAR(archive_cmds, $1)=
5524  _LT_TAGVAR(archive_expsym_cmds, $1)=
5525  _LT_TAGVAR(compiler_needs_object, $1)=no
5526  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5527  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5528  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5529  _LT_TAGVAR(hardcode_automatic, $1)=no
5530  _LT_TAGVAR(hardcode_direct, $1)=no
5531  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5532  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5533  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5534  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5535  _LT_TAGVAR(hardcode_minus_L, $1)=no
5536  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5537  _LT_TAGVAR(inherit_rpath, $1)=no
5538  _LT_TAGVAR(link_all_deplibs, $1)=unknown
5539  _LT_TAGVAR(module_cmds, $1)=
5540  _LT_TAGVAR(module_expsym_cmds, $1)=
5541  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5542  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5543  _LT_TAGVAR(thread_safe_flag_spec, $1)=
5544  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5545  # include_expsyms should be a list of space-separated symbols to be *always*
5546  # included in the symbol list
5547  _LT_TAGVAR(include_expsyms, $1)=
5548  # exclude_expsyms can be an extended regexp of symbols to exclude
5549  # it will be wrapped by ` (' and `)$', so one must not match beginning or
5550  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5551  # as well as any symbol that contains `d'.
5552  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5553  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5554  # platforms (ab)use it in PIC code, but their linkers get confused if
5555  # the symbol is explicitly referenced.  Since portable code cannot
5556  # rely on this symbol name, it's probably fine to never include it in
5557  # preloaded symbol tables.
5558  # Exclude shared library initialization/finalization symbols.
5559dnl Note also adjust exclude_expsyms for C++ above.
5560  extract_expsyms_cmds=
5561
5562  case $host_os in
5563  cygwin* | mingw* | pw32* | cegcc*)
5564    # FIXME: the MSVC++ port hasn't been tested in a loooong time
5565    # When not using gcc, we currently assume that we are using
5566    # Microsoft Visual C++.
5567    if test "$GCC" != yes; then
5568      with_gnu_ld=no
5569    fi
5570    ;;
5571  interix*)
5572    # we just hope/assume this is gcc and not c89 (= MSVC++)
5573    with_gnu_ld=yes
5574    ;;
5575  openbsd*)
5576    with_gnu_ld=no
5577    ;;
5578  esac
5579
5580  _LT_TAGVAR(ld_shlibs, $1)=yes
5581
5582  # On some targets, GNU ld is compatible enough with the native linker
5583  # that we're better off using the native interface for both.
5584  lt_use_gnu_ld_interface=no
5585  if test "$with_gnu_ld" = yes; then
5586    case $host_os in
5587      aix*)
5588	# The AIX port of GNU ld has always aspired to compatibility
5589	# with the native linker.  However, as the warning in the GNU ld
5590	# block says, versions before 2.19.5* couldn't really create working
5591	# shared libraries, regardless of the interface used.
5592	case `$LD -v 2>&1` in
5593	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5594	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5595	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5596	  *)
5597	    lt_use_gnu_ld_interface=yes
5598	    ;;
5599	esac
5600	;;
5601      *)
5602	lt_use_gnu_ld_interface=yes
5603	;;
5604    esac
5605  fi
5606
5607  if test "$lt_use_gnu_ld_interface" = yes; then
5608    # If archive_cmds runs LD, not CC, wlarc should be empty
5609    wlarc='${wl}'
5610
5611    # Set some defaults for GNU ld with shared library support. These
5612    # are reset later if shared libraries are not supported. Putting them
5613    # here allows them to be overridden if necessary.
5614    runpath_var=LD_RUN_PATH
5615    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5616    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5617    # ancient GNU ld didn't support --whole-archive et. al.
5618    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
5619      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5620    else
5621      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5622    fi
5623    supports_anon_versioning=no
5624    case `$LD -v 2>&1` in
5625      *GNU\ gold*) supports_anon_versioning=yes ;;
5626      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5627      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5628      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5629      *\ 2.11.*) ;; # other 2.11 versions
5630      *) supports_anon_versioning=yes ;;
5631    esac
5632
5633    # See if GNU ld supports shared libraries.
5634    case $host_os in
5635    aix[[3-9]]*)
5636      # On AIX/PPC, the GNU linker is very broken
5637      if test "$host_cpu" != ia64; then
5638	_LT_TAGVAR(ld_shlibs, $1)=no
5639	cat <<_LT_EOF 1>&2
5640
5641*** Warning: the GNU linker, at least up to release 2.19, is reported
5642*** to be unable to reliably create shared libraries on AIX.
5643*** Therefore, libtool is disabling shared libraries support.  If you
5644*** really care for shared libraries, you may want to install binutils
5645*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
5646*** You will then need to restart the configuration process.
5647
5648_LT_EOF
5649      fi
5650      ;;
5651
5652    amigaos*)
5653      case $host_cpu in
5654      powerpc)
5655            # see comment about AmigaOS4 .so support
5656            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5657            _LT_TAGVAR(archive_expsym_cmds, $1)=''
5658        ;;
5659      m68k)
5660            _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)'
5661            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5662            _LT_TAGVAR(hardcode_minus_L, $1)=yes
5663        ;;
5664      esac
5665      ;;
5666
5667    beos*)
5668      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5669	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5670	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5671	# support --undefined.  This deserves some investigation.  FIXME
5672	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5673      else
5674	_LT_TAGVAR(ld_shlibs, $1)=no
5675      fi
5676      ;;
5677
5678    cygwin* | mingw* | pw32* | cegcc*)
5679      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5680      # as there is no search path for DLLs.
5681      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5682      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
5683      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5684      _LT_TAGVAR(always_export_symbols, $1)=no
5685      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5686      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
5687      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5688
5689      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
5690        _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'
5691	# If the export-symbols file already is a .def file (1st line
5692	# is EXPORTS), use it as is; otherwise, prepend...
5693	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5694	  cp $export_symbols $output_objdir/$soname.def;
5695	else
5696	  echo EXPORTS > $output_objdir/$soname.def;
5697	  cat $export_symbols >> $output_objdir/$soname.def;
5698	fi~
5699	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5700      else
5701	_LT_TAGVAR(ld_shlibs, $1)=no
5702      fi
5703      ;;
5704
5705    haiku*)
5706      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5707      _LT_TAGVAR(link_all_deplibs, $1)=yes
5708      ;;
5709
5710    interix[[3-9]]*)
5711      _LT_TAGVAR(hardcode_direct, $1)=no
5712      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5713      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5714      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5715      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5716      # Instead, shared libraries are loaded at an image base (0x10000000 by
5717      # default) and relocated if they conflict, which is a slow very memory
5718      # consuming and fragmenting process.  To avoid this, we pick a random,
5719      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5720      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5721      _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'
5722      _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'
5723      ;;
5724
5725    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
5726      tmp_diet=no
5727      if test "$host_os" = linux-dietlibc; then
5728	case $cc_basename in
5729	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
5730	esac
5731      fi
5732      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
5733	 && test "$tmp_diet" = no
5734      then
5735	tmp_addflag=' $pic_flag'
5736	tmp_sharedflag='-shared'
5737	case $cc_basename,$host_cpu in
5738        pgcc*)				# Portland Group C compiler
5739	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5740	  tmp_addflag=' $pic_flag'
5741	  ;;
5742	pgf77* | pgf90* | pgf95* | pgfortran*)
5743					# Portland Group f77 and f90 compilers
5744	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5745	  tmp_addflag=' $pic_flag -Mnomain' ;;
5746	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
5747	  tmp_addflag=' -i_dynamic' ;;
5748	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5749	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5750	ifc* | ifort*)			# Intel Fortran compiler
5751	  tmp_addflag=' -nofor_main' ;;
5752	lf95*)				# Lahey Fortran 8.1
5753	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5754	  tmp_sharedflag='--shared' ;;
5755	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
5756	  tmp_sharedflag='-qmkshrobj'
5757	  tmp_addflag= ;;
5758	nvcc*)	# Cuda Compiler Driver 2.2
5759	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5760	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5761	  ;;
5762	esac
5763	case `$CC -V 2>&1 | sed 5q` in
5764	*Sun\ C*)			# Sun C 5.9
5765	  _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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
5766	  _LT_TAGVAR(compiler_needs_object, $1)=yes
5767	  tmp_sharedflag='-G' ;;
5768	*Sun\ F*)			# Sun Fortran 8.3
5769	  tmp_sharedflag='-G' ;;
5770	esac
5771	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5772
5773        if test "x$supports_anon_versioning" = xyes; then
5774          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5775	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5776	    echo "local: *; };" >> $output_objdir/$libname.ver~
5777	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5778        fi
5779
5780	case $cc_basename in
5781	xlf* | bgf* | bgxlf* | mpixlf*)
5782	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
5783	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
5784	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5785	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5786	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
5787	  if test "x$supports_anon_versioning" = xyes; then
5788	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
5789	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5790	      echo "local: *; };" >> $output_objdir/$libname.ver~
5791	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
5792	  fi
5793	  ;;
5794	esac
5795      else
5796        _LT_TAGVAR(ld_shlibs, $1)=no
5797      fi
5798      ;;
5799
5800    netbsd*)
5801      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
5802	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5803	wlarc=
5804      else
5805	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5806	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5807      fi
5808      ;;
5809
5810    solaris*)
5811      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
5812	_LT_TAGVAR(ld_shlibs, $1)=no
5813	cat <<_LT_EOF 1>&2
5814
5815*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5816*** create shared libraries on Solaris systems.  Therefore, libtool
5817*** is disabling shared libraries support.  We urge you to upgrade GNU
5818*** binutils to release 2.9.1 or newer.  Another option is to modify
5819*** your PATH or compiler configuration so that the native linker is
5820*** used, and then restart.
5821
5822_LT_EOF
5823      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5824	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5825	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5826      else
5827	_LT_TAGVAR(ld_shlibs, $1)=no
5828      fi
5829      ;;
5830
5831    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5832      case `$LD -v 2>&1` in
5833        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5834	_LT_TAGVAR(ld_shlibs, $1)=no
5835	cat <<_LT_EOF 1>&2
5836
5837*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5838*** reliably create shared libraries on SCO systems.  Therefore, libtool
5839*** is disabling shared libraries support.  We urge you to upgrade GNU
5840*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5841*** your PATH or compiler configuration so that the native linker is
5842*** used, and then restart.
5843
5844_LT_EOF
5845	;;
5846	*)
5847	  # For security reasons, it is highly recommended that you always
5848	  # use absolute paths for naming shared libraries, and exclude the
5849	  # DT_RUNPATH tag from executables and libraries.  But doing so
5850	  # requires that you compile everything twice, which is a pain.
5851	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5852	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5853	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5854	    _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'
5855	  else
5856	    _LT_TAGVAR(ld_shlibs, $1)=no
5857	  fi
5858	;;
5859      esac
5860      ;;
5861
5862    sunos4*)
5863      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5864      wlarc=
5865      _LT_TAGVAR(hardcode_direct, $1)=yes
5866      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
5867      ;;
5868
5869    *)
5870      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
5871	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5872	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5873      else
5874	_LT_TAGVAR(ld_shlibs, $1)=no
5875      fi
5876      ;;
5877    esac
5878
5879    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
5880      runpath_var=
5881      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5882      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5883      _LT_TAGVAR(whole_archive_flag_spec, $1)=
5884    fi
5885  else
5886    # PORTME fill in a description of your system's linker (not GNU ld)
5887    case $host_os in
5888    aix3*)
5889      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
5890      _LT_TAGVAR(always_export_symbols, $1)=yes
5891      _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'
5892      # Note: this linker hardcodes the directories in LIBPATH if there
5893      # are no directories specified by -L.
5894      _LT_TAGVAR(hardcode_minus_L, $1)=yes
5895      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5896	# Neither direct hardcoding nor static linking is supported with a
5897	# broken collect2.
5898	_LT_TAGVAR(hardcode_direct, $1)=unsupported
5899      fi
5900      ;;
5901
5902    aix[[4-9]]*)
5903      if test "$host_cpu" = ia64; then
5904	# On IA64, the linker does run time linking by default, so we don't
5905	# have to do anything special.
5906	aix_use_runtimelinking=no
5907	exp_sym_flag='-Bexport'
5908	no_entry_flag=""
5909      else
5910	# If we're using GNU nm, then we don't want the "-C" option.
5911	# -C means demangle to AIX nm, but means don't demangle with GNU nm
5912	# Also, AIX nm treats weak defined symbols like other global
5913	# defined symbols, whereas GNU nm marks them as "W".
5914	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5915	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
5916	else
5917	  _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'
5918	fi
5919	aix_use_runtimelinking=no
5920
5921	# Test if we are trying to use run time linking or normal
5922	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5923	# need to do runtime linking.
5924	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5925	  for ld_flag in $LDFLAGS; do
5926	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5927	    aix_use_runtimelinking=yes
5928	    break
5929	  fi
5930	  done
5931	  ;;
5932	esac
5933
5934	exp_sym_flag='-bexport'
5935	no_entry_flag='-bnoentry'
5936      fi
5937
5938      # When large executables or shared objects are built, AIX ld can
5939      # have problems creating the table of contents.  If linking a library
5940      # or program results in "error TOC overflow" add -mminimal-toc to
5941      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5942      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5943
5944      _LT_TAGVAR(archive_cmds, $1)=''
5945      _LT_TAGVAR(hardcode_direct, $1)=yes
5946      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
5947      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
5948      _LT_TAGVAR(link_all_deplibs, $1)=yes
5949      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
5950
5951      if test "$GCC" = yes; then
5952	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5953	# We only want to do this on AIX 4.2 and lower, the check
5954	# below for broken collect2 doesn't work under 4.3+
5955	  collect2name=`${CC} -print-prog-name=collect2`
5956	  if test -f "$collect2name" &&
5957	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
5958	  then
5959	  # We have reworked collect2
5960	  :
5961	  else
5962	  # We have old collect2
5963	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
5964	  # It fails to find uninstalled libraries when the uninstalled
5965	  # path is not listed in the libpath.  Setting hardcode_minus_L
5966	  # to unsupported forces relinking
5967	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
5968	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5969	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5970	  fi
5971	  ;;
5972	esac
5973	shared_flag='-shared'
5974	if test "$aix_use_runtimelinking" = yes; then
5975	  shared_flag="$shared_flag "'${wl}-G'
5976	fi
5977      else
5978	# not using gcc
5979	if test "$host_cpu" = ia64; then
5980	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5981	# chokes on -Wl,-G. The following line is correct:
5982	  shared_flag='-G'
5983	else
5984	  if test "$aix_use_runtimelinking" = yes; then
5985	    shared_flag='${wl}-G'
5986	  else
5987	    shared_flag='${wl}-bM:SRE'
5988	  fi
5989	fi
5990      fi
5991
5992      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
5993      # It seems that -bexpall does not export symbols beginning with
5994      # underscore (_), so it is better to generate a list of symbols to export.
5995      _LT_TAGVAR(always_export_symbols, $1)=yes
5996      if test "$aix_use_runtimelinking" = yes; then
5997	# Warning - without using the other runtime loading flags (-brtl),
5998	# -berok will link without error, but may produce a broken library.
5999	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6000        # Determine the default libpath from the value encoded in an
6001        # empty executable.
6002        _LT_SYS_MODULE_PATH_AIX([$1])
6003        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6004        _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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
6005      else
6006	if test "$host_cpu" = ia64; then
6007	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6008	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6009	  _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"
6010	else
6011	 # Determine the default libpath from the value encoded in an
6012	 # empty executable.
6013	 _LT_SYS_MODULE_PATH_AIX([$1])
6014	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6015	  # Warning - without using the other run time loading flags,
6016	  # -berok will link without error, but may produce a broken library.
6017	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6018	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6019	  if test "$with_gnu_ld" = yes; then
6020	    # We only use this code for GNU lds that support --whole-archive.
6021	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6022	  else
6023	    # Exported symbols can be pulled into shared objects from archives
6024	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6025	  fi
6026	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6027	  # This is similar to how AIX traditionally builds its shared libraries.
6028	  _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'
6029	fi
6030      fi
6031      ;;
6032
6033    amigaos*)
6034      case $host_cpu in
6035      powerpc)
6036            # see comment about AmigaOS4 .so support
6037            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6038            _LT_TAGVAR(archive_expsym_cmds, $1)=''
6039        ;;
6040      m68k)
6041            _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)'
6042            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6043            _LT_TAGVAR(hardcode_minus_L, $1)=yes
6044        ;;
6045      esac
6046      ;;
6047
6048    bsdi[[45]]*)
6049      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6050      ;;
6051
6052    cygwin* | mingw* | pw32* | cegcc*)
6053      # When not using gcc, we currently assume that we are using
6054      # Microsoft Visual C++.
6055      # hardcode_libdir_flag_spec is actually meaningless, as there is
6056      # no search path for DLLs.
6057      case $cc_basename in
6058      cl*)
6059	# Native MSVC
6060	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6061	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6062	_LT_TAGVAR(always_export_symbols, $1)=yes
6063	_LT_TAGVAR(file_list_spec, $1)='@'
6064	# Tell ltmain to make .lib files, not .a files.
6065	libext=lib
6066	# Tell ltmain to make .dll files, not .so files.
6067	shrext_cmds=".dll"
6068	# FIXME: Setting linknames here is a bad hack.
6069	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6070	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6071	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6072	  else
6073	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6074	  fi~
6075	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6076	  linknames='
6077	# The linker will not automatically build a static lib if we build a DLL.
6078	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6079	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6080	_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'
6081	# Don't use ranlib
6082	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6083	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6084	  lt_tool_outputfile="@TOOL_OUTPUT@"~
6085	  case $lt_outputfile in
6086	    *.exe|*.EXE) ;;
6087	    *)
6088	      lt_outputfile="$lt_outputfile.exe"
6089	      lt_tool_outputfile="$lt_tool_outputfile.exe"
6090	      ;;
6091	  esac~
6092	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6093	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6094	    $RM "$lt_outputfile.manifest";
6095	  fi'
6096	;;
6097      *)
6098	# Assume MSVC wrapper
6099	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6100	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6101	# Tell ltmain to make .lib files, not .a files.
6102	libext=lib
6103	# Tell ltmain to make .dll files, not .so files.
6104	shrext_cmds=".dll"
6105	# FIXME: Setting linknames here is a bad hack.
6106	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
6107	# The linker will automatically build a .lib file if we build a DLL.
6108	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6109	# FIXME: Should let the user specify the lib program.
6110	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6111	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6112	;;
6113      esac
6114      ;;
6115
6116    darwin* | rhapsody*)
6117      _LT_DARWIN_LINKER_FEATURES($1)
6118      ;;
6119
6120    dgux*)
6121      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6122      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6123      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6124      ;;
6125
6126    freebsd1*)
6127      _LT_TAGVAR(ld_shlibs, $1)=no
6128      ;;
6129
6130    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6131    # support.  Future versions do this automatically, but an explicit c++rt0.o
6132    # does not break anything, and helps significantly (at the cost of a little
6133    # extra space).
6134    freebsd2.2*)
6135      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6136      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6137      _LT_TAGVAR(hardcode_direct, $1)=yes
6138      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6139      ;;
6140
6141    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6142    freebsd2*)
6143      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6144      _LT_TAGVAR(hardcode_direct, $1)=yes
6145      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6146      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6147      ;;
6148
6149    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6150    freebsd* | dragonfly*)
6151      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6152      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6153      _LT_TAGVAR(hardcode_direct, $1)=yes
6154      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6155      ;;
6156
6157    hpux9*)
6158      if test "$GCC" = yes; then
6159	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
6160      else
6161	_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'
6162      fi
6163      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6164      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6165      _LT_TAGVAR(hardcode_direct, $1)=yes
6166
6167      # hardcode_minus_L: Not really in the search PATH,
6168      # but as the default location of the library.
6169      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6170      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6171      ;;
6172
6173    hpux10*)
6174      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6175	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6176      else
6177	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6178      fi
6179      if test "$with_gnu_ld" = no; then
6180	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6181	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6182	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6183	_LT_TAGVAR(hardcode_direct, $1)=yes
6184	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6185	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6186	# hardcode_minus_L: Not really in the search PATH,
6187	# but as the default location of the library.
6188	_LT_TAGVAR(hardcode_minus_L, $1)=yes
6189      fi
6190      ;;
6191
6192    hpux11*)
6193      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6194	case $host_cpu in
6195	hppa*64*)
6196	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6197	  ;;
6198	ia64*)
6199	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6200	  ;;
6201	*)
6202	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6203	  ;;
6204	esac
6205      else
6206	case $host_cpu in
6207	hppa*64*)
6208	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6209	  ;;
6210	ia64*)
6211	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6212	  ;;
6213	*)
6214	m4_if($1, [], [
6215	  # Older versions of the 11.00 compiler do not understand -b yet
6216	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
6217	  _LT_LINKER_OPTION([if $CC understands -b],
6218	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
6219	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
6220	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
6221	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
6222	  ;;
6223	esac
6224      fi
6225      if test "$with_gnu_ld" = no; then
6226	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6227	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6228
6229	case $host_cpu in
6230	hppa*64*|ia64*)
6231	  _LT_TAGVAR(hardcode_direct, $1)=no
6232	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6233	  ;;
6234	*)
6235	  _LT_TAGVAR(hardcode_direct, $1)=yes
6236	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6237	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6238
6239	  # hardcode_minus_L: Not really in the search PATH,
6240	  # but as the default location of the library.
6241	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
6242	  ;;
6243	esac
6244      fi
6245      ;;
6246
6247    irix5* | irix6* | nonstopux*)
6248      if test "$GCC" = yes; then
6249	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6250	# Try to use the -exported_symbol ld option, if it does not
6251	# work, assume that -exports_file does not work either and
6252	# implicitly export all symbols.
6253	# This should be the same for all languages, so no per-tag cache variable.
6254	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
6255	  [lt_cv_irix_exported_symbol],
6256	  [save_LDFLAGS="$LDFLAGS"
6257	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6258	   AC_LINK_IFELSE(
6259	     [AC_LANG_SOURCE(
6260	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
6261			      [C++], [[int foo (void) { return 0; }]],
6262			      [Fortran 77], [[
6263      subroutine foo
6264      end]],
6265			      [Fortran], [[
6266      subroutine foo
6267      end]])])],
6268	      [lt_cv_irix_exported_symbol=yes],
6269	      [lt_cv_irix_exported_symbol=no])
6270           LDFLAGS="$save_LDFLAGS"])
6271	if test "$lt_cv_irix_exported_symbol" = yes; then
6272          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
6273	fi
6274      else
6275	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6276	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
6277      fi
6278      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6279      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6280      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6281      _LT_TAGVAR(inherit_rpath, $1)=yes
6282      _LT_TAGVAR(link_all_deplibs, $1)=yes
6283      ;;
6284
6285    netbsd*)
6286      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6287	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6288      else
6289	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6290      fi
6291      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6292      _LT_TAGVAR(hardcode_direct, $1)=yes
6293      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6294      ;;
6295
6296    newsos6)
6297      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6298      _LT_TAGVAR(hardcode_direct, $1)=yes
6299      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6300      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6301      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6302      ;;
6303
6304    *nto* | *qnx*)
6305      ;;
6306
6307    openbsd*)
6308      if test -f /usr/libexec/ld.so; then
6309	_LT_TAGVAR(hardcode_direct, $1)=yes
6310	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6311	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6312	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6313	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6314	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6315	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6316	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6317	else
6318	  case $host_os in
6319	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6320	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6321	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6322	     ;;
6323	   *)
6324	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6325	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6326	     ;;
6327	  esac
6328	fi
6329      else
6330	_LT_TAGVAR(ld_shlibs, $1)=no
6331      fi
6332      ;;
6333
6334    os2*)
6335      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6336      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6337      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6338      _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'
6339      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6340      ;;
6341
6342    osf3*)
6343      if test "$GCC" = yes; then
6344	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6345	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6346      else
6347	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6348	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6349      fi
6350      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6351      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6352      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6353      ;;
6354
6355    osf4* | osf5*)	# as osf3* with the addition of -msym flag
6356      if test "$GCC" = yes; then
6357	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6358	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6359	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6360      else
6361	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6362	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
6363	_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~
6364	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
6365
6366	# Both c and cxx compiler support -rpath directly
6367	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6368      fi
6369      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6370      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6371      ;;
6372
6373    solaris*)
6374      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6375      if test "$GCC" = yes; then
6376	wlarc='${wl}'
6377	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6378	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6379	  $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6380      else
6381	case `$CC -V 2>&1` in
6382	*"Compilers 5.0"*)
6383	  wlarc=''
6384	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6385	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6386	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6387	  ;;
6388	*)
6389	  wlarc='${wl}'
6390	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6391	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6392	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6393	  ;;
6394	esac
6395      fi
6396      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6397      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6398      case $host_os in
6399      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6400      *)
6401	# The compiler driver will combine and reorder linker options,
6402	# but understands `-z linker_flag'.  GCC discards it without `$wl',
6403	# but is careful enough not to reorder.
6404	# Supported since Solaris 2.6 (maybe 2.5.1?)
6405	if test "$GCC" = yes; then
6406	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6407	else
6408	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6409	fi
6410	;;
6411      esac
6412      _LT_TAGVAR(link_all_deplibs, $1)=yes
6413      ;;
6414
6415    sunos4*)
6416      if test "x$host_vendor" = xsequent; then
6417	# Use $CC to link under sequent, because it throws in some extra .o
6418	# files that make .init and .fini sections work.
6419	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6420      else
6421	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6422      fi
6423      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6424      _LT_TAGVAR(hardcode_direct, $1)=yes
6425      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6426      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6427      ;;
6428
6429    sysv4)
6430      case $host_vendor in
6431	sni)
6432	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6433	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6434	;;
6435	siemens)
6436	  ## LD is ld it makes a PLAMLIB
6437	  ## CC just makes a GrossModule.
6438	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6439	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6440	  _LT_TAGVAR(hardcode_direct, $1)=no
6441        ;;
6442	motorola)
6443	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6444	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6445	;;
6446      esac
6447      runpath_var='LD_RUN_PATH'
6448      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6449      ;;
6450
6451    sysv4.3*)
6452      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6453      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6454      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6455      ;;
6456
6457    sysv4*MP*)
6458      if test -d /usr/nec; then
6459	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6460	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6461	runpath_var=LD_RUN_PATH
6462	hardcode_runpath_var=yes
6463	_LT_TAGVAR(ld_shlibs, $1)=yes
6464      fi
6465      ;;
6466
6467    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6468      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6469      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6470      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6471      runpath_var='LD_RUN_PATH'
6472
6473      if test "$GCC" = yes; then
6474	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6475	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6476      else
6477	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6478	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6479      fi
6480      ;;
6481
6482    sysv5* | sco3.2v5* | sco5v6*)
6483      # Note: We can NOT use -z defs as we might desire, because we do not
6484      # link with -lc, and that would cause any symbols used from libc to
6485      # always be unresolved, which means just about no library would
6486      # ever link correctly.  If we're not using GNU ld we use -z text
6487      # though, which does catch some bad symbols but isn't as heavy-handed
6488      # as -z defs.
6489      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6490      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6491      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6492      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6493      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6494      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6495      _LT_TAGVAR(link_all_deplibs, $1)=yes
6496      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6497      runpath_var='LD_RUN_PATH'
6498
6499      if test "$GCC" = yes; then
6500	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6501	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6502      else
6503	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6504	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6505      fi
6506      ;;
6507
6508    uts4*)
6509      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6510      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6511      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6512      ;;
6513
6514    *)
6515      _LT_TAGVAR(ld_shlibs, $1)=no
6516      ;;
6517    esac
6518
6519    if test x$host_vendor = xsni; then
6520      case $host in
6521      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6522	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6523	;;
6524      esac
6525    fi
6526  fi
6527])
6528AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6529test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6530
6531_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6532
6533_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6534_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6535_LT_DECL([], [extract_expsyms_cmds], [2],
6536    [The commands to extract the exported symbol list from a shared archive])
6537
6538#
6539# Do we need to explicitly link libc?
6540#
6541case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6542x|xyes)
6543  # Assume -lc should be added
6544  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6545
6546  if test "$enable_shared" = yes && test "$GCC" = yes; then
6547    case $_LT_TAGVAR(archive_cmds, $1) in
6548    *'~'*)
6549      # FIXME: we may have to deal with multi-command sequences.
6550      ;;
6551    '$CC '*)
6552      # Test whether the compiler implicitly links with -lc since on some
6553      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6554      # to ld, don't add -lc before -lgcc.
6555      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6556	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6557	[$RM conftest*
6558	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6559
6560	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6561	  soname=conftest
6562	  lib=conftest
6563	  libobjs=conftest.$ac_objext
6564	  deplibs=
6565	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6566	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6567	  compiler_flags=-v
6568	  linker_flags=-v
6569	  verstring=
6570	  output_objdir=.
6571	  libname=conftest
6572	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6573	  _LT_TAGVAR(allow_undefined_flag, $1)=
6574	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6575	  then
6576	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6577	  else
6578	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6579	  fi
6580	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6581	else
6582	  cat conftest.err 1>&5
6583	fi
6584	$RM conftest*
6585	])
6586      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6587      ;;
6588    esac
6589  fi
6590  ;;
6591esac
6592
6593_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6594    [Whether or not to add -lc for building shared libraries])
6595_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6596    [enable_shared_with_static_runtimes], [0],
6597    [Whether or not to disallow shared libs when runtime libs are static])
6598_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6599    [Compiler flag to allow reflexive dlopens])
6600_LT_TAGDECL([], [whole_archive_flag_spec], [1],
6601    [Compiler flag to generate shared objects directly from archives])
6602_LT_TAGDECL([], [compiler_needs_object], [1],
6603    [Whether the compiler copes with passing no objects directly])
6604_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6605    [Create an old-style archive from a shared archive])
6606_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6607    [Create a temporary old-style archive to link instead of a shared archive])
6608_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6609_LT_TAGDECL([], [archive_expsym_cmds], [2])
6610_LT_TAGDECL([], [module_cmds], [2],
6611    [Commands used to build a loadable module if different from building
6612    a shared archive.])
6613_LT_TAGDECL([], [module_expsym_cmds], [2])
6614_LT_TAGDECL([], [with_gnu_ld], [1],
6615    [Whether we are building with GNU ld or not])
6616_LT_TAGDECL([], [allow_undefined_flag], [1],
6617    [Flag that allows shared libraries with undefined symbols to be built])
6618_LT_TAGDECL([], [no_undefined_flag], [1],
6619    [Flag that enforces no undefined symbols])
6620_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
6621    [Flag to hardcode $libdir into a binary during linking.
6622    This must work even if $libdir does not exist])
6623_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
6624    [[If ld is used when linking, flag to hardcode $libdir into a binary
6625    during linking.  This must work even if $libdir does not exist]])
6626_LT_TAGDECL([], [hardcode_libdir_separator], [1],
6627    [Whether we need a single "-rpath" flag with a separated argument])
6628_LT_TAGDECL([], [hardcode_direct], [0],
6629    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6630    DIR into the resulting binary])
6631_LT_TAGDECL([], [hardcode_direct_absolute], [0],
6632    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
6633    DIR into the resulting binary and the resulting library dependency is
6634    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
6635    library is relocated])
6636_LT_TAGDECL([], [hardcode_minus_L], [0],
6637    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
6638    into the resulting binary])
6639_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
6640    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
6641    into the resulting binary])
6642_LT_TAGDECL([], [hardcode_automatic], [0],
6643    [Set to "yes" if building a shared library automatically hardcodes DIR
6644    into the library and all subsequent libraries and executables linked
6645    against it])
6646_LT_TAGDECL([], [inherit_rpath], [0],
6647    [Set to yes if linker adds runtime paths of dependent libraries
6648    to runtime path list])
6649_LT_TAGDECL([], [link_all_deplibs], [0],
6650    [Whether libtool must link a program against all its dependency libraries])
6651_LT_TAGDECL([], [always_export_symbols], [0],
6652    [Set to "yes" if exported symbols are required])
6653_LT_TAGDECL([], [export_symbols_cmds], [2],
6654    [The commands to list exported symbols])
6655_LT_TAGDECL([], [exclude_expsyms], [1],
6656    [Symbols that should not be listed in the preloaded symbols])
6657_LT_TAGDECL([], [include_expsyms], [1],
6658    [Symbols that must always be exported])
6659_LT_TAGDECL([], [prelink_cmds], [2],
6660    [Commands necessary for linking programs (against libraries) with templates])
6661_LT_TAGDECL([], [postlink_cmds], [2],
6662    [Commands necessary for finishing linking programs])
6663_LT_TAGDECL([], [file_list_spec], [1],
6664    [Specify filename containing input files])
6665dnl FIXME: Not yet implemented
6666dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
6667dnl    [Compiler flag to generate thread safe objects])
6668])# _LT_LINKER_SHLIBS
6669
6670
6671# _LT_LANG_C_CONFIG([TAG])
6672# ------------------------
6673# Ensure that the configuration variables for a C compiler are suitably
6674# defined.  These variables are subsequently used by _LT_CONFIG to write
6675# the compiler configuration to `libtool'.
6676m4_defun([_LT_LANG_C_CONFIG],
6677[m4_require([_LT_DECL_EGREP])dnl
6678lt_save_CC="$CC"
6679AC_LANG_PUSH(C)
6680
6681# Source file extension for C test sources.
6682ac_ext=c
6683
6684# Object file extension for compiled C test sources.
6685objext=o
6686_LT_TAGVAR(objext, $1)=$objext
6687
6688# Code to be used in simple compile tests
6689lt_simple_compile_test_code="int some_variable = 0;"
6690
6691# Code to be used in simple link tests
6692lt_simple_link_test_code='int main(){return(0);}'
6693
6694_LT_TAG_COMPILER
6695# Save the default compiler, since it gets overwritten when the other
6696# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
6697compiler_DEFAULT=$CC
6698
6699# save warnings/boilerplate of simple test code
6700_LT_COMPILER_BOILERPLATE
6701_LT_LINKER_BOILERPLATE
6702
6703if test -n "$compiler"; then
6704  _LT_COMPILER_NO_RTTI($1)
6705  _LT_COMPILER_PIC($1)
6706  _LT_COMPILER_C_O($1)
6707  _LT_COMPILER_FILE_LOCKS($1)
6708  _LT_LINKER_SHLIBS($1)
6709  _LT_SYS_DYNAMIC_LINKER($1)
6710  _LT_LINKER_HARDCODE_LIBPATH($1)
6711  LT_SYS_DLOPEN_SELF
6712  _LT_CMD_STRIPLIB
6713
6714  # Report which library types will actually be built
6715  AC_MSG_CHECKING([if libtool supports shared libraries])
6716  AC_MSG_RESULT([$can_build_shared])
6717
6718  AC_MSG_CHECKING([whether to build shared libraries])
6719  test "$can_build_shared" = "no" && enable_shared=no
6720
6721  # On AIX, shared libraries and static libraries use the same namespace, and
6722  # are all built from PIC.
6723  case $host_os in
6724  aix3*)
6725    test "$enable_shared" = yes && enable_static=no
6726    if test -n "$RANLIB"; then
6727      archive_cmds="$archive_cmds~\$RANLIB \$lib"
6728      postinstall_cmds='$RANLIB $lib'
6729    fi
6730    ;;
6731
6732  aix[[4-9]]*)
6733    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6734      test "$enable_shared" = yes && enable_static=no
6735    fi
6736    ;;
6737  esac
6738  AC_MSG_RESULT([$enable_shared])
6739
6740  AC_MSG_CHECKING([whether to build static libraries])
6741  # Make sure either enable_shared or enable_static is yes.
6742  test "$enable_shared" = yes || enable_static=yes
6743  AC_MSG_RESULT([$enable_static])
6744
6745  _LT_CONFIG($1)
6746fi
6747AC_LANG_POP
6748CC="$lt_save_CC"
6749])# _LT_LANG_C_CONFIG
6750
6751
6752# _LT_LANG_CXX_CONFIG([TAG])
6753# --------------------------
6754# Ensure that the configuration variables for a C++ compiler are suitably
6755# defined.  These variables are subsequently used by _LT_CONFIG to write
6756# the compiler configuration to `libtool'.
6757m4_defun([_LT_LANG_CXX_CONFIG],
6758[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6759m4_require([_LT_DECL_EGREP])dnl
6760m4_require([_LT_PATH_MANIFEST_TOOL])dnl
6761if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
6762    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
6763    (test "X$CXX" != "Xg++"))) ; then
6764  AC_PROG_CXXCPP
6765else
6766  _lt_caught_CXX_error=yes
6767fi
6768
6769AC_LANG_PUSH(C++)
6770_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6771_LT_TAGVAR(allow_undefined_flag, $1)=
6772_LT_TAGVAR(always_export_symbols, $1)=no
6773_LT_TAGVAR(archive_expsym_cmds, $1)=
6774_LT_TAGVAR(compiler_needs_object, $1)=no
6775_LT_TAGVAR(export_dynamic_flag_spec, $1)=
6776_LT_TAGVAR(hardcode_direct, $1)=no
6777_LT_TAGVAR(hardcode_direct_absolute, $1)=no
6778_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6779_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6780_LT_TAGVAR(hardcode_libdir_separator, $1)=
6781_LT_TAGVAR(hardcode_minus_L, $1)=no
6782_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6783_LT_TAGVAR(hardcode_automatic, $1)=no
6784_LT_TAGVAR(inherit_rpath, $1)=no
6785_LT_TAGVAR(module_cmds, $1)=
6786_LT_TAGVAR(module_expsym_cmds, $1)=
6787_LT_TAGVAR(link_all_deplibs, $1)=unknown
6788_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
6789_LT_TAGVAR(reload_flag, $1)=$reload_flag
6790_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
6791_LT_TAGVAR(no_undefined_flag, $1)=
6792_LT_TAGVAR(whole_archive_flag_spec, $1)=
6793_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6794
6795# Source file extension for C++ test sources.
6796ac_ext=cpp
6797
6798# Object file extension for compiled C++ test sources.
6799objext=o
6800_LT_TAGVAR(objext, $1)=$objext
6801
6802# No sense in running all these tests if we already determined that
6803# the CXX compiler isn't working.  Some variables (like enable_shared)
6804# are currently assumed to apply to all compilers on this platform,
6805# and will be corrupted by setting them based on a non-working compiler.
6806if test "$_lt_caught_CXX_error" != yes; then
6807  # Code to be used in simple compile tests
6808  lt_simple_compile_test_code="int some_variable = 0;"
6809
6810  # Code to be used in simple link tests
6811  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6812
6813  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
6814  _LT_TAG_COMPILER
6815
6816  # save warnings/boilerplate of simple test code
6817  _LT_COMPILER_BOILERPLATE
6818  _LT_LINKER_BOILERPLATE
6819
6820  # Allow CC to be a program name with arguments.
6821  lt_save_CC=$CC
6822  lt_save_CFLAGS=$CFLAGS
6823  lt_save_LD=$LD
6824  lt_save_GCC=$GCC
6825  GCC=$GXX
6826  lt_save_with_gnu_ld=$with_gnu_ld
6827  lt_save_path_LD=$lt_cv_path_LD
6828  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
6829    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
6830  else
6831    $as_unset lt_cv_prog_gnu_ld
6832  fi
6833  if test -n "${lt_cv_path_LDCXX+set}"; then
6834    lt_cv_path_LD=$lt_cv_path_LDCXX
6835  else
6836    $as_unset lt_cv_path_LD
6837  fi
6838  test -z "${LDCXX+set}" || LD=$LDCXX
6839  CC=${CXX-"c++"}
6840  CFLAGS=$CXXFLAGS
6841  compiler=$CC
6842  _LT_TAGVAR(compiler, $1)=$CC
6843  _LT_CC_BASENAME([$compiler])
6844
6845  if test -n "$compiler"; then
6846    # We don't want -fno-exception when compiling C++ code, so set the
6847    # no_builtin_flag separately
6848    if test "$GXX" = yes; then
6849      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6850    else
6851      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6852    fi
6853
6854    if test "$GXX" = yes; then
6855      # Set up default GNU C++ configuration
6856
6857      LT_PATH_LD
6858
6859      # Check if GNU C++ uses GNU ld as the underlying linker, since the
6860      # archiving commands below assume that GNU ld is being used.
6861      if test "$with_gnu_ld" = yes; then
6862        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
6863        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
6864
6865        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6866        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6867
6868        # If archive_cmds runs LD, not CC, wlarc should be empty
6869        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
6870        #     investigate it a little bit more. (MM)
6871        wlarc='${wl}'
6872
6873        # ancient GNU ld didn't support --whole-archive et. al.
6874        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
6875	  $GREP 'no-whole-archive' > /dev/null; then
6876          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6877        else
6878          _LT_TAGVAR(whole_archive_flag_spec, $1)=
6879        fi
6880      else
6881        with_gnu_ld=no
6882        wlarc=
6883
6884        # A generic and very simple default shared library creation
6885        # command for GNU C++ for the case where it uses the native
6886        # linker, instead of GNU ld.  If possible, this setting should
6887        # overridden to take advantage of the native linker features on
6888        # the platform it is being used on.
6889        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
6890      fi
6891
6892      # Commands to make compiler produce verbose output that lists
6893      # what "hidden" libraries, object files and flags are used when
6894      # linking a shared library.
6895      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
6896
6897    else
6898      GXX=no
6899      with_gnu_ld=no
6900      wlarc=
6901    fi
6902
6903    # PORTME: fill in a description of your system's C++ link characteristics
6904    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6905    _LT_TAGVAR(ld_shlibs, $1)=yes
6906    case $host_os in
6907      aix3*)
6908        # FIXME: insert proper C++ library support
6909        _LT_TAGVAR(ld_shlibs, $1)=no
6910        ;;
6911      aix[[4-9]]*)
6912        if test "$host_cpu" = ia64; then
6913          # On IA64, the linker does run time linking by default, so we don't
6914          # have to do anything special.
6915          aix_use_runtimelinking=no
6916          exp_sym_flag='-Bexport'
6917          no_entry_flag=""
6918        else
6919          aix_use_runtimelinking=no
6920
6921          # Test if we are trying to use run time linking or normal
6922          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6923          # need to do runtime linking.
6924          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6925	    for ld_flag in $LDFLAGS; do
6926	      case $ld_flag in
6927	      *-brtl*)
6928	        aix_use_runtimelinking=yes
6929	        break
6930	        ;;
6931	      esac
6932	    done
6933	    ;;
6934          esac
6935
6936          exp_sym_flag='-bexport'
6937          no_entry_flag='-bnoentry'
6938        fi
6939
6940        # When large executables or shared objects are built, AIX ld can
6941        # have problems creating the table of contents.  If linking a library
6942        # or program results in "error TOC overflow" add -mminimal-toc to
6943        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6944        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6945
6946        _LT_TAGVAR(archive_cmds, $1)=''
6947        _LT_TAGVAR(hardcode_direct, $1)=yes
6948        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6949        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6950        _LT_TAGVAR(link_all_deplibs, $1)=yes
6951        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6952
6953        if test "$GXX" = yes; then
6954          case $host_os in aix4.[[012]]|aix4.[[012]].*)
6955          # We only want to do this on AIX 4.2 and lower, the check
6956          # below for broken collect2 doesn't work under 4.3+
6957	  collect2name=`${CC} -print-prog-name=collect2`
6958	  if test -f "$collect2name" &&
6959	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6960	  then
6961	    # We have reworked collect2
6962	    :
6963	  else
6964	    # We have old collect2
6965	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
6966	    # It fails to find uninstalled libraries when the uninstalled
6967	    # path is not listed in the libpath.  Setting hardcode_minus_L
6968	    # to unsupported forces relinking
6969	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
6970	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6971	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
6972	  fi
6973          esac
6974          shared_flag='-shared'
6975	  if test "$aix_use_runtimelinking" = yes; then
6976	    shared_flag="$shared_flag "'${wl}-G'
6977	  fi
6978        else
6979          # not using gcc
6980          if test "$host_cpu" = ia64; then
6981	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6982	  # chokes on -Wl,-G. The following line is correct:
6983	  shared_flag='-G'
6984          else
6985	    if test "$aix_use_runtimelinking" = yes; then
6986	      shared_flag='${wl}-G'
6987	    else
6988	      shared_flag='${wl}-bM:SRE'
6989	    fi
6990          fi
6991        fi
6992
6993        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6994        # It seems that -bexpall does not export symbols beginning with
6995        # underscore (_), so it is better to generate a list of symbols to
6996	# export.
6997        _LT_TAGVAR(always_export_symbols, $1)=yes
6998        if test "$aix_use_runtimelinking" = yes; then
6999          # Warning - without using the other runtime loading flags (-brtl),
7000          # -berok will link without error, but may produce a broken library.
7001          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7002          # Determine the default libpath from the value encoded in an empty
7003          # executable.
7004          _LT_SYS_MODULE_PATH_AIX([$1])
7005          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7006
7007          _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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
7008        else
7009          if test "$host_cpu" = ia64; then
7010	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7011	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7012	    _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"
7013          else
7014	    # Determine the default libpath from the value encoded in an
7015	    # empty executable.
7016	    _LT_SYS_MODULE_PATH_AIX([$1])
7017	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7018	    # Warning - without using the other run time loading flags,
7019	    # -berok will link without error, but may produce a broken library.
7020	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7021	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7022	    if test "$with_gnu_ld" = yes; then
7023	      # We only use this code for GNU lds that support --whole-archive.
7024	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7025	    else
7026	      # Exported symbols can be pulled into shared objects from archives
7027	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7028	    fi
7029	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7030	    # This is similar to how AIX traditionally builds its shared
7031	    # libraries.
7032	    _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'
7033          fi
7034        fi
7035        ;;
7036
7037      beos*)
7038	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7039	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7040	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7041	  # support --undefined.  This deserves some investigation.  FIXME
7042	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7043	else
7044	  _LT_TAGVAR(ld_shlibs, $1)=no
7045	fi
7046	;;
7047
7048      chorus*)
7049        case $cc_basename in
7050          *)
7051	  # FIXME: insert proper C++ library support
7052	  _LT_TAGVAR(ld_shlibs, $1)=no
7053	  ;;
7054        esac
7055        ;;
7056
7057      cygwin* | mingw* | pw32* | cegcc*)
7058	case $GXX,$cc_basename in
7059	,cl* | no,cl*)
7060	  # Native MSVC
7061	  # hardcode_libdir_flag_spec is actually meaningless, as there is
7062	  # no search path for DLLs.
7063	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7064	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7065	  _LT_TAGVAR(always_export_symbols, $1)=yes
7066	  _LT_TAGVAR(file_list_spec, $1)='@'
7067	  # Tell ltmain to make .lib files, not .a files.
7068	  libext=lib
7069	  # Tell ltmain to make .dll files, not .so files.
7070	  shrext_cmds=".dll"
7071	  # FIXME: Setting linknames here is a bad hack.
7072	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
7073	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7074	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
7075	    else
7076	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
7077	    fi~
7078	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7079	    linknames='
7080	  # The linker will not automatically build a static lib if we build a DLL.
7081	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7082	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7083	  # Don't use ranlib
7084	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7085	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7086	    lt_tool_outputfile="@TOOL_OUTPUT@"~
7087	    case $lt_outputfile in
7088	      *.exe|*.EXE) ;;
7089	      *)
7090		lt_outputfile="$lt_outputfile.exe"
7091		lt_tool_outputfile="$lt_tool_outputfile.exe"
7092		;;
7093	    esac~
7094	    func_to_tool_file "$lt_outputfile"~
7095	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
7096	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7097	      $RM "$lt_outputfile.manifest";
7098	    fi'
7099	  ;;
7100	*)
7101	  # g++
7102	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7103	  # as there is no search path for DLLs.
7104	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7105	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
7106	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7107	  _LT_TAGVAR(always_export_symbols, $1)=no
7108	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7109
7110	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7111	    _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'
7112	    # If the export-symbols file already is a .def file (1st line
7113	    # is EXPORTS), use it as is; otherwise, prepend...
7114	    _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7115	      cp $export_symbols $output_objdir/$soname.def;
7116	    else
7117	      echo EXPORTS > $output_objdir/$soname.def;
7118	      cat $export_symbols >> $output_objdir/$soname.def;
7119	    fi~
7120	    $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'
7121	  else
7122	    _LT_TAGVAR(ld_shlibs, $1)=no
7123	  fi
7124	  ;;
7125	esac
7126	;;
7127      darwin* | rhapsody*)
7128        _LT_DARWIN_LINKER_FEATURES($1)
7129	;;
7130
7131      dgux*)
7132        case $cc_basename in
7133          ec++*)
7134	    # FIXME: insert proper C++ library support
7135	    _LT_TAGVAR(ld_shlibs, $1)=no
7136	    ;;
7137          ghcx*)
7138	    # Green Hills C++ Compiler
7139	    # FIXME: insert proper C++ library support
7140	    _LT_TAGVAR(ld_shlibs, $1)=no
7141	    ;;
7142          *)
7143	    # FIXME: insert proper C++ library support
7144	    _LT_TAGVAR(ld_shlibs, $1)=no
7145	    ;;
7146        esac
7147        ;;
7148
7149      freebsd[[12]]*)
7150        # C++ shared libraries reported to be fairly broken before
7151	# switch to ELF
7152        _LT_TAGVAR(ld_shlibs, $1)=no
7153        ;;
7154
7155      freebsd-elf*)
7156        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7157        ;;
7158
7159      freebsd* | dragonfly*)
7160        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7161        # conventions
7162        _LT_TAGVAR(ld_shlibs, $1)=yes
7163        ;;
7164
7165      gnu*)
7166        ;;
7167
7168      haiku*)
7169        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7170        _LT_TAGVAR(link_all_deplibs, $1)=yes
7171        ;;
7172
7173      hpux9*)
7174        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7175        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7176        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7177        _LT_TAGVAR(hardcode_direct, $1)=yes
7178        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7179				             # but as the default
7180				             # location of the library.
7181
7182        case $cc_basename in
7183          CC*)
7184            # FIXME: insert proper C++ library support
7185            _LT_TAGVAR(ld_shlibs, $1)=no
7186            ;;
7187          aCC*)
7188            _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'
7189            # Commands to make compiler produce verbose output that lists
7190            # what "hidden" libraries, object files and flags are used when
7191            # linking a shared library.
7192            #
7193            # There doesn't appear to be a way to prevent this compiler from
7194            # explicitly linking system object files so we need to strip them
7195            # from the output so that they don't get included in the library
7196            # dependencies.
7197            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; func_echo_all "$list"'
7198            ;;
7199          *)
7200            if test "$GXX" = yes; then
7201              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${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'
7202            else
7203              # FIXME: insert proper C++ library support
7204              _LT_TAGVAR(ld_shlibs, $1)=no
7205            fi
7206            ;;
7207        esac
7208        ;;
7209
7210      hpux10*|hpux11*)
7211        if test $with_gnu_ld = no; then
7212	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7213	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7214
7215          case $host_cpu in
7216            hppa*64*|ia64*)
7217              ;;
7218            *)
7219	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7220              ;;
7221          esac
7222        fi
7223        case $host_cpu in
7224          hppa*64*|ia64*)
7225            _LT_TAGVAR(hardcode_direct, $1)=no
7226            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7227            ;;
7228          *)
7229            _LT_TAGVAR(hardcode_direct, $1)=yes
7230            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7231            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7232					         # but as the default
7233					         # location of the library.
7234            ;;
7235        esac
7236
7237        case $cc_basename in
7238          CC*)
7239	    # FIXME: insert proper C++ library support
7240	    _LT_TAGVAR(ld_shlibs, $1)=no
7241	    ;;
7242          aCC*)
7243	    case $host_cpu in
7244	      hppa*64*)
7245	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7246	        ;;
7247	      ia64*)
7248	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7249	        ;;
7250	      *)
7251	        _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'
7252	        ;;
7253	    esac
7254	    # Commands to make compiler produce verbose output that lists
7255	    # what "hidden" libraries, object files and flags are used when
7256	    # linking a shared library.
7257	    #
7258	    # There doesn't appear to be a way to prevent this compiler from
7259	    # explicitly linking system object files so we need to strip them
7260	    # from the output so that they don't get included in the library
7261	    # dependencies.
7262	    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; func_echo_all "$list"'
7263	    ;;
7264          *)
7265	    if test "$GXX" = yes; then
7266	      if test $with_gnu_ld = no; then
7267	        case $host_cpu in
7268	          hppa*64*)
7269	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7270	            ;;
7271	          ia64*)
7272	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7273	            ;;
7274	          *)
7275	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7276	            ;;
7277	        esac
7278	      fi
7279	    else
7280	      # FIXME: insert proper C++ library support
7281	      _LT_TAGVAR(ld_shlibs, $1)=no
7282	    fi
7283	    ;;
7284        esac
7285        ;;
7286
7287      interix[[3-9]]*)
7288	_LT_TAGVAR(hardcode_direct, $1)=no
7289	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7290	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7291	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7292	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7293	# Instead, shared libraries are loaded at an image base (0x10000000 by
7294	# default) and relocated if they conflict, which is a slow very memory
7295	# consuming and fragmenting process.  To avoid this, we pick a random,
7296	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7297	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7298	_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'
7299	_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'
7300	;;
7301      irix5* | irix6*)
7302        case $cc_basename in
7303          CC*)
7304	    # SGI C++
7305	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7306
7307	    # Archives containing C++ object files must be created using
7308	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
7309	    # necessary to make sure instantiated templates are included
7310	    # in the archive.
7311	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7312	    ;;
7313          *)
7314	    if test "$GXX" = yes; then
7315	      if test "$with_gnu_ld" = no; then
7316	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7317	      else
7318	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
7319	      fi
7320	    fi
7321	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7322	    ;;
7323        esac
7324        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7325        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7326        _LT_TAGVAR(inherit_rpath, $1)=yes
7327        ;;
7328
7329      linux* | k*bsd*-gnu | kopensolaris*-gnu)
7330        case $cc_basename in
7331          KCC*)
7332	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7333
7334	    # KCC will only create a shared library if the output file
7335	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7336	    # to its proper name (with version) after linking.
7337	    _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'
7338	    _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'
7339	    # Commands to make compiler produce verbose output that lists
7340	    # what "hidden" libraries, object files and flags are used when
7341	    # linking a shared library.
7342	    #
7343	    # There doesn't appear to be a way to prevent this compiler from
7344	    # explicitly linking system object files so we need to strip them
7345	    # from the output so that they don't get included in the library
7346	    # dependencies.
7347	    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; func_echo_all "$list"'
7348
7349	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7350	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7351
7352	    # Archives containing C++ object files must be created using
7353	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7354	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7355	    ;;
7356	  icpc* | ecpc* )
7357	    # Intel C++
7358	    with_gnu_ld=yes
7359	    # version 8.0 and above of icpc choke on multiply defined symbols
7360	    # if we add $predep_objects and $postdep_objects, however 7.1 and
7361	    # earlier do not add the objects themselves.
7362	    case `$CC -V 2>&1` in
7363	      *"Version 7."*)
7364	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7365		_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'
7366		;;
7367	      *)  # Version 8.0 or newer
7368	        tmp_idyn=
7369	        case $host_cpu in
7370		  ia64*) tmp_idyn=' -i_dynamic';;
7371		esac
7372	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7373		_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'
7374		;;
7375	    esac
7376	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7377	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7378	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7379	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7380	    ;;
7381          pgCC* | pgcpp*)
7382            # Portland Group C++ compiler
7383	    case `$CC -V` in
7384	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7385	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7386		rm -rf $tpldir~
7387		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7388		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7389	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7390		rm -rf $tpldir~
7391		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7392		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7393		$RANLIB $oldlib'
7394	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7395		rm -rf $tpldir~
7396		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7397		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7398	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7399		rm -rf $tpldir~
7400		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7401		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
7402	      ;;
7403	    *) # Version 6 and above use weak symbols
7404	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7405	      _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'
7406	      ;;
7407	    esac
7408
7409	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7410	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7411	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7412            ;;
7413	  cxx*)
7414	    # Compaq C++
7415	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7416	    _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'
7417
7418	    runpath_var=LD_RUN_PATH
7419	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7420	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7421
7422	    # Commands to make compiler produce verbose output that lists
7423	    # what "hidden" libraries, object files and flags are used when
7424	    # linking a shared library.
7425	    #
7426	    # There doesn't appear to be a way to prevent this compiler from
7427	    # explicitly linking system object files so we need to strip them
7428	    # from the output so that they don't get included in the library
7429	    # dependencies.
7430	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
7431	    ;;
7432	  xl* | mpixl* | bgxl*)
7433	    # IBM XL 8.0 on PPC, with GNU ld
7434	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7435	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7436	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7437	    if test "x$supports_anon_versioning" = xyes; then
7438	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7439		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7440		echo "local: *; };" >> $output_objdir/$libname.ver~
7441		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7442	    fi
7443	    ;;
7444	  *)
7445	    case `$CC -V 2>&1 | sed 5q` in
7446	    *Sun\ C*)
7447	      # Sun C++ 5.9
7448	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7449	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7450	      _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'
7451	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7452	      _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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
7453	      _LT_TAGVAR(compiler_needs_object, $1)=yes
7454
7455	      # Not sure whether something based on
7456	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7457	      # would be better.
7458	      output_verbose_link_cmd='func_echo_all'
7459
7460	      # Archives containing C++ object files must be created using
7461	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7462	      # necessary to make sure instantiated templates are included
7463	      # in the archive.
7464	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7465	      ;;
7466	    esac
7467	    ;;
7468	esac
7469	;;
7470
7471      lynxos*)
7472        # FIXME: insert proper C++ library support
7473	_LT_TAGVAR(ld_shlibs, $1)=no
7474	;;
7475
7476      m88k*)
7477        # FIXME: insert proper C++ library support
7478        _LT_TAGVAR(ld_shlibs, $1)=no
7479	;;
7480
7481      mvs*)
7482        case $cc_basename in
7483          cxx*)
7484	    # FIXME: insert proper C++ library support
7485	    _LT_TAGVAR(ld_shlibs, $1)=no
7486	    ;;
7487	  *)
7488	    # FIXME: insert proper C++ library support
7489	    _LT_TAGVAR(ld_shlibs, $1)=no
7490	    ;;
7491	esac
7492	;;
7493
7494      netbsd*)
7495        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7496	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7497	  wlarc=
7498	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7499	  _LT_TAGVAR(hardcode_direct, $1)=yes
7500	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7501	fi
7502	# Workaround some broken pre-1.5 toolchains
7503	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7504	;;
7505
7506      *nto* | *qnx*)
7507        _LT_TAGVAR(ld_shlibs, $1)=yes
7508	;;
7509
7510      openbsd2*)
7511        # C++ shared libraries are fairly broken
7512	_LT_TAGVAR(ld_shlibs, $1)=no
7513	;;
7514
7515      openbsd*)
7516	if test -f /usr/libexec/ld.so; then
7517	  _LT_TAGVAR(hardcode_direct, $1)=yes
7518	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7519	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7520	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7521	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7522	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7523	    _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'
7524	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7525	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7526	  fi
7527	  output_verbose_link_cmd=func_echo_all
7528	else
7529	  _LT_TAGVAR(ld_shlibs, $1)=no
7530	fi
7531	;;
7532
7533      osf3* | osf4* | osf5*)
7534        case $cc_basename in
7535          KCC*)
7536	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7537
7538	    # KCC will only create a shared library if the output file
7539	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7540	    # to its proper name (with version) after linking.
7541	    _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'
7542
7543	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7544	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7545
7546	    # Archives containing C++ object files must be created using
7547	    # the KAI C++ compiler.
7548	    case $host in
7549	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7550	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7551	    esac
7552	    ;;
7553          RCC*)
7554	    # Rational C++ 2.4.1
7555	    # FIXME: insert proper C++ library support
7556	    _LT_TAGVAR(ld_shlibs, $1)=no
7557	    ;;
7558          cxx*)
7559	    case $host in
7560	      osf3*)
7561	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7562	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7563	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7564		;;
7565	      *)
7566	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7567	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
7568	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7569	          echo "-hidden">> $lib.exp~
7570	          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
7571	          $RM $lib.exp'
7572	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7573		;;
7574	    esac
7575
7576	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7577
7578	    # Commands to make compiler produce verbose output that lists
7579	    # what "hidden" libraries, object files and flags are used when
7580	    # linking a shared library.
7581	    #
7582	    # There doesn't appear to be a way to prevent this compiler from
7583	    # explicitly linking system object files so we need to strip them
7584	    # from the output so that they don't get included in the library
7585	    # dependencies.
7586	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
7587	    ;;
7588	  *)
7589	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7590	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7591	      case $host in
7592	        osf3*)
7593	          _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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7594		  ;;
7595	        *)
7596	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7597		  ;;
7598	      esac
7599
7600	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7601	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7602
7603	      # Commands to make compiler produce verbose output that lists
7604	      # what "hidden" libraries, object files and flags are used when
7605	      # linking a shared library.
7606	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7607
7608	    else
7609	      # FIXME: insert proper C++ library support
7610	      _LT_TAGVAR(ld_shlibs, $1)=no
7611	    fi
7612	    ;;
7613        esac
7614        ;;
7615
7616      psos*)
7617        # FIXME: insert proper C++ library support
7618        _LT_TAGVAR(ld_shlibs, $1)=no
7619        ;;
7620
7621      sunos4*)
7622        case $cc_basename in
7623          CC*)
7624	    # Sun C++ 4.x
7625	    # FIXME: insert proper C++ library support
7626	    _LT_TAGVAR(ld_shlibs, $1)=no
7627	    ;;
7628          lcc*)
7629	    # Lucid
7630	    # FIXME: insert proper C++ library support
7631	    _LT_TAGVAR(ld_shlibs, $1)=no
7632	    ;;
7633          *)
7634	    # FIXME: insert proper C++ library support
7635	    _LT_TAGVAR(ld_shlibs, $1)=no
7636	    ;;
7637        esac
7638        ;;
7639
7640      solaris*)
7641        case $cc_basename in
7642          CC* | sunCC*)
7643	    # Sun C++ 4.2, 5.x and Centerline C++
7644            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
7645	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7646	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7647	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7648	      $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'
7649
7650	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7651	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7652	    case $host_os in
7653	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7654	      *)
7655		# The compiler driver will combine and reorder linker options,
7656		# but understands `-z linker_flag'.
7657	        # Supported since Solaris 2.6 (maybe 2.5.1?)
7658		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7659	        ;;
7660	    esac
7661	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7662
7663	    output_verbose_link_cmd='func_echo_all'
7664
7665	    # Archives containing C++ object files must be created using
7666	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7667	    # necessary to make sure instantiated templates are included
7668	    # in the archive.
7669	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7670	    ;;
7671          gcx*)
7672	    # Green Hills C++ Compiler
7673	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7674
7675	    # The C++ compiler must be used to create the archive.
7676	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
7677	    ;;
7678          *)
7679	    # GNU C++ compiler with Solaris linker
7680	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7681	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
7682	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
7683	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7684	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7685		  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7686
7687	        # Commands to make compiler produce verbose output that lists
7688	        # what "hidden" libraries, object files and flags are used when
7689	        # linking a shared library.
7690	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7691	      else
7692	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
7693	        # platform.
7694	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
7695	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7696		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
7697
7698	        # Commands to make compiler produce verbose output that lists
7699	        # what "hidden" libraries, object files and flags are used when
7700	        # linking a shared library.
7701	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7702	      fi
7703
7704	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
7705	      case $host_os in
7706		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7707		*)
7708		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7709		  ;;
7710	      esac
7711	    fi
7712	    ;;
7713        esac
7714        ;;
7715
7716    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7717      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7718      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7719      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7720      runpath_var='LD_RUN_PATH'
7721
7722      case $cc_basename in
7723        CC*)
7724	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7725	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7726	  ;;
7727	*)
7728	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7729	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7730	  ;;
7731      esac
7732      ;;
7733
7734      sysv5* | sco3.2v5* | sco5v6*)
7735	# Note: We can NOT use -z defs as we might desire, because we do not
7736	# link with -lc, and that would cause any symbols used from libc to
7737	# always be unresolved, which means just about no library would
7738	# ever link correctly.  If we're not using GNU ld we use -z text
7739	# though, which does catch some bad symbols but isn't as heavy-handed
7740	# as -z defs.
7741	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7742	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7743	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7744	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7745	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7746	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7747	_LT_TAGVAR(link_all_deplibs, $1)=yes
7748	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7749	runpath_var='LD_RUN_PATH'
7750
7751	case $cc_basename in
7752          CC*)
7753	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7754	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7755	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
7756	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
7757	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
7758	      '"$_LT_TAGVAR(reload_cmds, $1)"
7759	    ;;
7760	  *)
7761	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7762	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7763	    ;;
7764	esac
7765      ;;
7766
7767      tandem*)
7768        case $cc_basename in
7769          NCC*)
7770	    # NonStop-UX NCC 3.20
7771	    # FIXME: insert proper C++ library support
7772	    _LT_TAGVAR(ld_shlibs, $1)=no
7773	    ;;
7774          *)
7775	    # FIXME: insert proper C++ library support
7776	    _LT_TAGVAR(ld_shlibs, $1)=no
7777	    ;;
7778        esac
7779        ;;
7780
7781      vxworks*)
7782        # FIXME: insert proper C++ library support
7783        _LT_TAGVAR(ld_shlibs, $1)=no
7784        ;;
7785
7786      *)
7787        # FIXME: insert proper C++ library support
7788        _LT_TAGVAR(ld_shlibs, $1)=no
7789        ;;
7790    esac
7791
7792    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7793    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7794
7795    _LT_TAGVAR(GCC, $1)="$GXX"
7796    _LT_TAGVAR(LD, $1)="$LD"
7797
7798    ## CAVEAT EMPTOR:
7799    ## There is no encapsulation within the following macros, do not change
7800    ## the running order or otherwise move them around unless you know exactly
7801    ## what you are doing...
7802    _LT_SYS_HIDDEN_LIBDEPS($1)
7803    _LT_COMPILER_PIC($1)
7804    _LT_COMPILER_C_O($1)
7805    _LT_COMPILER_FILE_LOCKS($1)
7806    _LT_LINKER_SHLIBS($1)
7807    _LT_SYS_DYNAMIC_LINKER($1)
7808    _LT_LINKER_HARDCODE_LIBPATH($1)
7809
7810    _LT_CONFIG($1)
7811  fi # test -n "$compiler"
7812
7813  CC=$lt_save_CC
7814  CFLAGS=$lt_save_CFLAGS
7815  LDCXX=$LD
7816  LD=$lt_save_LD
7817  GCC=$lt_save_GCC
7818  with_gnu_ld=$lt_save_with_gnu_ld
7819  lt_cv_path_LDCXX=$lt_cv_path_LD
7820  lt_cv_path_LD=$lt_save_path_LD
7821  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
7822  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
7823fi # test "$_lt_caught_CXX_error" != yes
7824
7825AC_LANG_POP
7826])# _LT_LANG_CXX_CONFIG
7827
7828
7829# _LT_FUNC_STRIPNAME_CNF
7830# ----------------------
7831# func_stripname_cnf prefix suffix name
7832# strip PREFIX and SUFFIX off of NAME.
7833# PREFIX and SUFFIX must not contain globbing or regex special
7834# characters, hashes, percent signs, but SUFFIX may contain a leading
7835# dot (in which case that matches only a dot).
7836#
7837# This function is identical to the (non-XSI) version of func_stripname,
7838# except this one can be used by m4 code that may be executed by configure,
7839# rather than the libtool script.
7840m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
7841AC_REQUIRE([_LT_DECL_SED])
7842AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
7843func_stripname_cnf ()
7844{
7845  case ${2} in
7846  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
7847  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
7848  esac
7849} # func_stripname_cnf
7850])# _LT_FUNC_STRIPNAME_CNF
7851
7852# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
7853# ---------------------------------
7854# Figure out "hidden" library dependencies from verbose
7855# compiler output when linking a shared library.
7856# Parse the compiler output and extract the necessary
7857# objects, libraries and library flags.
7858m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
7859[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7860AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
7861# Dependencies to place before and after the object being linked:
7862_LT_TAGVAR(predep_objects, $1)=
7863_LT_TAGVAR(postdep_objects, $1)=
7864_LT_TAGVAR(predeps, $1)=
7865_LT_TAGVAR(postdeps, $1)=
7866_LT_TAGVAR(compiler_lib_search_path, $1)=
7867
7868dnl we can't use the lt_simple_compile_test_code here,
7869dnl because it contains code intended for an executable,
7870dnl not a library.  It's possible we should let each
7871dnl tag define a new lt_????_link_test_code variable,
7872dnl but it's only used here...
7873m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
7874int a;
7875void foo (void) { a = 0; }
7876_LT_EOF
7877], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
7878class Foo
7879{
7880public:
7881  Foo (void) { a = 0; }
7882private:
7883  int a;
7884};
7885_LT_EOF
7886], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
7887      subroutine foo
7888      implicit none
7889      integer*4 a
7890      a=0
7891      return
7892      end
7893_LT_EOF
7894], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
7895      subroutine foo
7896      implicit none
7897      integer a
7898      a=0
7899      return
7900      end
7901_LT_EOF
7902], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
7903public class foo {
7904  private int a;
7905  public void bar (void) {
7906    a = 0;
7907  }
7908};
7909_LT_EOF
7910])
7911
7912_lt_libdeps_save_CFLAGS=$CFLAGS
7913case "$CC $CFLAGS " in #(
7914*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
7915*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
7916esac
7917
7918dnl Parse the compiler output and extract the necessary
7919dnl objects, libraries and library flags.
7920if AC_TRY_EVAL(ac_compile); then
7921  # Parse the compiler output and extract the necessary
7922  # objects, libraries and library flags.
7923
7924  # Sentinel used to keep track of whether or not we are before
7925  # the conftest object file.
7926  pre_test_object_deps_done=no
7927
7928  for p in `eval "$output_verbose_link_cmd"`; do
7929    case ${prev}${p} in
7930
7931    -L* | -R* | -l*)
7932       # Some compilers place space between "-{L,R}" and the path.
7933       # Remove the space.
7934       if test $p = "-L" ||
7935          test $p = "-R"; then
7936	 prev=$p
7937	 continue
7938       fi
7939
7940       # Expand the sysroot to ease extracting the directories later.
7941       if test -z "$prev"; then
7942         case $p in
7943         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
7944         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
7945         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
7946         esac
7947       fi
7948       case $p in
7949       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
7950       esac
7951       if test "$pre_test_object_deps_done" = no; then
7952	 case ${prev} in
7953	 -L | -R)
7954	   # Internal compiler library paths should come after those
7955	   # provided the user.  The postdeps already come after the
7956	   # user supplied libs so there is no need to process them.
7957	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
7958	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
7959	   else
7960	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
7961	   fi
7962	   ;;
7963	 # The "-l" case would never come before the object being
7964	 # linked, so don't bother handling this case.
7965	 esac
7966       else
7967	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
7968	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
7969	 else
7970	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
7971	 fi
7972       fi
7973       prev=
7974       ;;
7975
7976    *.lto.$objext) ;; # Ignore GCC LTO objects
7977    *.$objext)
7978       # This assumes that the test object file only shows up
7979       # once in the compiler output.
7980       if test "$p" = "conftest.$objext"; then
7981	 pre_test_object_deps_done=yes
7982	 continue
7983       fi
7984
7985       if test "$pre_test_object_deps_done" = no; then
7986	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
7987	   _LT_TAGVAR(predep_objects, $1)="$p"
7988	 else
7989	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
7990	 fi
7991       else
7992	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
7993	   _LT_TAGVAR(postdep_objects, $1)="$p"
7994	 else
7995	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
7996	 fi
7997       fi
7998       ;;
7999
8000    *) ;; # Ignore the rest.
8001
8002    esac
8003  done
8004
8005  # Clean up.
8006  rm -f a.out a.exe
8007else
8008  echo "libtool.m4: error: problem compiling $1 test program"
8009fi
8010
8011$RM -f confest.$objext
8012CFLAGS=$_lt_libdeps_save_CFLAGS
8013
8014# PORTME: override above test on systems where it is broken
8015m4_if([$1], [CXX],
8016[case $host_os in
8017interix[[3-9]]*)
8018  # Interix 3.5 installs completely hosed .la files for C++, so rather than
8019  # hack all around it, let's just trust "g++" to DTRT.
8020  _LT_TAGVAR(predep_objects,$1)=
8021  _LT_TAGVAR(postdep_objects,$1)=
8022  _LT_TAGVAR(postdeps,$1)=
8023  ;;
8024
8025linux*)
8026  case `$CC -V 2>&1 | sed 5q` in
8027  *Sun\ C*)
8028    # Sun C++ 5.9
8029
8030    # The more standards-conforming stlport4 library is
8031    # incompatible with the Cstd library. Avoid specifying
8032    # it if it's in CXXFLAGS. Ignore libCrun as
8033    # -library=stlport4 depends on it.
8034    case " $CXX $CXXFLAGS " in
8035    *" -library=stlport4 "*)
8036      solaris_use_stlport4=yes
8037      ;;
8038    esac
8039
8040    if test "$solaris_use_stlport4" != yes; then
8041      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8042    fi
8043    ;;
8044  esac
8045  ;;
8046
8047solaris*)
8048  case $cc_basename in
8049  CC* | sunCC*)
8050    # The more standards-conforming stlport4 library is
8051    # incompatible with the Cstd library. Avoid specifying
8052    # it if it's in CXXFLAGS. Ignore libCrun as
8053    # -library=stlport4 depends on it.
8054    case " $CXX $CXXFLAGS " in
8055    *" -library=stlport4 "*)
8056      solaris_use_stlport4=yes
8057      ;;
8058    esac
8059
8060    # Adding this requires a known-good setup of shared libraries for
8061    # Sun compiler versions before 5.6, else PIC objects from an old
8062    # archive will be linked into the output, leading to subtle bugs.
8063    if test "$solaris_use_stlport4" != yes; then
8064      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8065    fi
8066    ;;
8067  esac
8068  ;;
8069esac
8070])
8071
8072case " $_LT_TAGVAR(postdeps, $1) " in
8073*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8074esac
8075 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8076if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8077 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
8078fi
8079_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8080    [The directories searched by this compiler when creating a shared library])
8081_LT_TAGDECL([], [predep_objects], [1],
8082    [Dependencies to place before and after the objects being linked to
8083    create a shared library])
8084_LT_TAGDECL([], [postdep_objects], [1])
8085_LT_TAGDECL([], [predeps], [1])
8086_LT_TAGDECL([], [postdeps], [1])
8087_LT_TAGDECL([], [compiler_lib_search_path], [1],
8088    [The library search path used internally by the compiler when linking
8089    a shared library])
8090])# _LT_SYS_HIDDEN_LIBDEPS
8091
8092
8093# _LT_LANG_F77_CONFIG([TAG])
8094# --------------------------
8095# Ensure that the configuration variables for a Fortran 77 compiler are
8096# suitably defined.  These variables are subsequently used by _LT_CONFIG
8097# to write the compiler configuration to `libtool'.
8098m4_defun([_LT_LANG_F77_CONFIG],
8099[AC_LANG_PUSH(Fortran 77)
8100if test -z "$F77" || test "X$F77" = "Xno"; then
8101  _lt_disable_F77=yes
8102fi
8103
8104_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8105_LT_TAGVAR(allow_undefined_flag, $1)=
8106_LT_TAGVAR(always_export_symbols, $1)=no
8107_LT_TAGVAR(archive_expsym_cmds, $1)=
8108_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8109_LT_TAGVAR(hardcode_direct, $1)=no
8110_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8111_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8112_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8113_LT_TAGVAR(hardcode_libdir_separator, $1)=
8114_LT_TAGVAR(hardcode_minus_L, $1)=no
8115_LT_TAGVAR(hardcode_automatic, $1)=no
8116_LT_TAGVAR(inherit_rpath, $1)=no
8117_LT_TAGVAR(module_cmds, $1)=
8118_LT_TAGVAR(module_expsym_cmds, $1)=
8119_LT_TAGVAR(link_all_deplibs, $1)=unknown
8120_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8121_LT_TAGVAR(reload_flag, $1)=$reload_flag
8122_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8123_LT_TAGVAR(no_undefined_flag, $1)=
8124_LT_TAGVAR(whole_archive_flag_spec, $1)=
8125_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8126
8127# Source file extension for f77 test sources.
8128ac_ext=f
8129
8130# Object file extension for compiled f77 test sources.
8131objext=o
8132_LT_TAGVAR(objext, $1)=$objext
8133
8134# No sense in running all these tests if we already determined that
8135# the F77 compiler isn't working.  Some variables (like enable_shared)
8136# are currently assumed to apply to all compilers on this platform,
8137# and will be corrupted by setting them based on a non-working compiler.
8138if test "$_lt_disable_F77" != yes; then
8139  # Code to be used in simple compile tests
8140  lt_simple_compile_test_code="\
8141      subroutine t
8142      return
8143      end
8144"
8145
8146  # Code to be used in simple link tests
8147  lt_simple_link_test_code="\
8148      program t
8149      end
8150"
8151
8152  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8153  _LT_TAG_COMPILER
8154
8155  # save warnings/boilerplate of simple test code
8156  _LT_COMPILER_BOILERPLATE
8157  _LT_LINKER_BOILERPLATE
8158
8159  # Allow CC to be a program name with arguments.
8160  lt_save_CC="$CC"
8161  lt_save_GCC=$GCC
8162  lt_save_CFLAGS=$CFLAGS
8163  CC=${F77-"f77"}
8164  CFLAGS=$FFLAGS
8165  compiler=$CC
8166  _LT_TAGVAR(compiler, $1)=$CC
8167  _LT_CC_BASENAME([$compiler])
8168  GCC=$G77
8169  if test -n "$compiler"; then
8170    AC_MSG_CHECKING([if libtool supports shared libraries])
8171    AC_MSG_RESULT([$can_build_shared])
8172
8173    AC_MSG_CHECKING([whether to build shared libraries])
8174    test "$can_build_shared" = "no" && enable_shared=no
8175
8176    # On AIX, shared libraries and static libraries use the same namespace, and
8177    # are all built from PIC.
8178    case $host_os in
8179      aix3*)
8180        test "$enable_shared" = yes && enable_static=no
8181        if test -n "$RANLIB"; then
8182          archive_cmds="$archive_cmds~\$RANLIB \$lib"
8183          postinstall_cmds='$RANLIB $lib'
8184        fi
8185        ;;
8186      aix[[4-9]]*)
8187	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8188	  test "$enable_shared" = yes && enable_static=no
8189	fi
8190        ;;
8191    esac
8192    AC_MSG_RESULT([$enable_shared])
8193
8194    AC_MSG_CHECKING([whether to build static libraries])
8195    # Make sure either enable_shared or enable_static is yes.
8196    test "$enable_shared" = yes || enable_static=yes
8197    AC_MSG_RESULT([$enable_static])
8198
8199    _LT_TAGVAR(GCC, $1)="$G77"
8200    _LT_TAGVAR(LD, $1)="$LD"
8201
8202    ## CAVEAT EMPTOR:
8203    ## There is no encapsulation within the following macros, do not change
8204    ## the running order or otherwise move them around unless you know exactly
8205    ## what you are doing...
8206    _LT_COMPILER_PIC($1)
8207    _LT_COMPILER_C_O($1)
8208    _LT_COMPILER_FILE_LOCKS($1)
8209    _LT_LINKER_SHLIBS($1)
8210    _LT_SYS_DYNAMIC_LINKER($1)
8211    _LT_LINKER_HARDCODE_LIBPATH($1)
8212
8213    _LT_CONFIG($1)
8214  fi # test -n "$compiler"
8215
8216  GCC=$lt_save_GCC
8217  CC="$lt_save_CC"
8218  CFLAGS="$lt_save_CFLAGS"
8219fi # test "$_lt_disable_F77" != yes
8220
8221AC_LANG_POP
8222])# _LT_LANG_F77_CONFIG
8223
8224
8225# _LT_LANG_FC_CONFIG([TAG])
8226# -------------------------
8227# Ensure that the configuration variables for a Fortran compiler are
8228# suitably defined.  These variables are subsequently used by _LT_CONFIG
8229# to write the compiler configuration to `libtool'.
8230m4_defun([_LT_LANG_FC_CONFIG],
8231[AC_LANG_PUSH(Fortran)
8232
8233if test -z "$FC" || test "X$FC" = "Xno"; then
8234  _lt_disable_FC=yes
8235fi
8236
8237_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8238_LT_TAGVAR(allow_undefined_flag, $1)=
8239_LT_TAGVAR(always_export_symbols, $1)=no
8240_LT_TAGVAR(archive_expsym_cmds, $1)=
8241_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8242_LT_TAGVAR(hardcode_direct, $1)=no
8243_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8244_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8245_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8246_LT_TAGVAR(hardcode_libdir_separator, $1)=
8247_LT_TAGVAR(hardcode_minus_L, $1)=no
8248_LT_TAGVAR(hardcode_automatic, $1)=no
8249_LT_TAGVAR(inherit_rpath, $1)=no
8250_LT_TAGVAR(module_cmds, $1)=
8251_LT_TAGVAR(module_expsym_cmds, $1)=
8252_LT_TAGVAR(link_all_deplibs, $1)=unknown
8253_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8254_LT_TAGVAR(reload_flag, $1)=$reload_flag
8255_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8256_LT_TAGVAR(no_undefined_flag, $1)=
8257_LT_TAGVAR(whole_archive_flag_spec, $1)=
8258_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8259
8260# Source file extension for fc test sources.
8261ac_ext=${ac_fc_srcext-f}
8262
8263# Object file extension for compiled fc test sources.
8264objext=o
8265_LT_TAGVAR(objext, $1)=$objext
8266
8267# No sense in running all these tests if we already determined that
8268# the FC compiler isn't working.  Some variables (like enable_shared)
8269# are currently assumed to apply to all compilers on this platform,
8270# and will be corrupted by setting them based on a non-working compiler.
8271if test "$_lt_disable_FC" != yes; then
8272  # Code to be used in simple compile tests
8273  lt_simple_compile_test_code="\
8274      subroutine t
8275      return
8276      end
8277"
8278
8279  # Code to be used in simple link tests
8280  lt_simple_link_test_code="\
8281      program t
8282      end
8283"
8284
8285  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8286  _LT_TAG_COMPILER
8287
8288  # save warnings/boilerplate of simple test code
8289  _LT_COMPILER_BOILERPLATE
8290  _LT_LINKER_BOILERPLATE
8291
8292  # Allow CC to be a program name with arguments.
8293  lt_save_CC="$CC"
8294  lt_save_GCC=$GCC
8295  lt_save_CFLAGS=$CFLAGS
8296  CC=${FC-"f95"}
8297  CFLAGS=$FCFLAGS
8298  compiler=$CC
8299  GCC=$ac_cv_fc_compiler_gnu
8300
8301  _LT_TAGVAR(compiler, $1)=$CC
8302  _LT_CC_BASENAME([$compiler])
8303
8304  if test -n "$compiler"; then
8305    AC_MSG_CHECKING([if libtool supports shared libraries])
8306    AC_MSG_RESULT([$can_build_shared])
8307
8308    AC_MSG_CHECKING([whether to build shared libraries])
8309    test "$can_build_shared" = "no" && enable_shared=no
8310
8311    # On AIX, shared libraries and static libraries use the same namespace, and
8312    # are all built from PIC.
8313    case $host_os in
8314      aix3*)
8315        test "$enable_shared" = yes && enable_static=no
8316        if test -n "$RANLIB"; then
8317          archive_cmds="$archive_cmds~\$RANLIB \$lib"
8318          postinstall_cmds='$RANLIB $lib'
8319        fi
8320        ;;
8321      aix[[4-9]]*)
8322	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8323	  test "$enable_shared" = yes && enable_static=no
8324	fi
8325        ;;
8326    esac
8327    AC_MSG_RESULT([$enable_shared])
8328
8329    AC_MSG_CHECKING([whether to build static libraries])
8330    # Make sure either enable_shared or enable_static is yes.
8331    test "$enable_shared" = yes || enable_static=yes
8332    AC_MSG_RESULT([$enable_static])
8333
8334    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8335    _LT_TAGVAR(LD, $1)="$LD"
8336
8337    ## CAVEAT EMPTOR:
8338    ## There is no encapsulation within the following macros, do not change
8339    ## the running order or otherwise move them around unless you know exactly
8340    ## what you are doing...
8341    _LT_SYS_HIDDEN_LIBDEPS($1)
8342    _LT_COMPILER_PIC($1)
8343    _LT_COMPILER_C_O($1)
8344    _LT_COMPILER_FILE_LOCKS($1)
8345    _LT_LINKER_SHLIBS($1)
8346    _LT_SYS_DYNAMIC_LINKER($1)
8347    _LT_LINKER_HARDCODE_LIBPATH($1)
8348
8349    _LT_CONFIG($1)
8350  fi # test -n "$compiler"
8351
8352  GCC=$lt_save_GCC
8353  CC=$lt_save_CC
8354  CFLAGS=$lt_save_CFLAGS
8355fi # test "$_lt_disable_FC" != yes
8356
8357AC_LANG_POP
8358])# _LT_LANG_FC_CONFIG
8359
8360
8361# _LT_LANG_GCJ_CONFIG([TAG])
8362# --------------------------
8363# Ensure that the configuration variables for the GNU Java Compiler compiler
8364# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8365# to write the compiler configuration to `libtool'.
8366m4_defun([_LT_LANG_GCJ_CONFIG],
8367[AC_REQUIRE([LT_PROG_GCJ])dnl
8368AC_LANG_SAVE
8369
8370# Source file extension for Java test sources.
8371ac_ext=java
8372
8373# Object file extension for compiled Java test sources.
8374objext=o
8375_LT_TAGVAR(objext, $1)=$objext
8376
8377# Code to be used in simple compile tests
8378lt_simple_compile_test_code="class foo {}"
8379
8380# Code to be used in simple link tests
8381lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8382
8383# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8384_LT_TAG_COMPILER
8385
8386# save warnings/boilerplate of simple test code
8387_LT_COMPILER_BOILERPLATE
8388_LT_LINKER_BOILERPLATE
8389
8390# Allow CC to be a program name with arguments.
8391lt_save_CC=$CC
8392lt_save_CFLAGS=$CFLAGS
8393lt_save_GCC=$GCC
8394GCC=yes
8395CC=${GCJ-"gcj"}
8396CFLAGS=$GCJFLAGS
8397compiler=$CC
8398_LT_TAGVAR(compiler, $1)=$CC
8399_LT_TAGVAR(LD, $1)="$LD"
8400_LT_CC_BASENAME([$compiler])
8401
8402# GCJ did not exist at the time GCC didn't implicitly link libc in.
8403_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8404
8405_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8406_LT_TAGVAR(reload_flag, $1)=$reload_flag
8407_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8408
8409if test -n "$compiler"; then
8410  _LT_COMPILER_NO_RTTI($1)
8411  _LT_COMPILER_PIC($1)
8412  _LT_COMPILER_C_O($1)
8413  _LT_COMPILER_FILE_LOCKS($1)
8414  _LT_LINKER_SHLIBS($1)
8415  _LT_LINKER_HARDCODE_LIBPATH($1)
8416
8417  _LT_CONFIG($1)
8418fi
8419
8420AC_LANG_RESTORE
8421
8422GCC=$lt_save_GCC
8423CC=$lt_save_CC
8424CFLAGS=$lt_save_CFLAGS
8425])# _LT_LANG_GCJ_CONFIG
8426
8427
8428# _LT_LANG_RC_CONFIG([TAG])
8429# -------------------------
8430# Ensure that the configuration variables for the Windows resource compiler
8431# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8432# to write the compiler configuration to `libtool'.
8433m4_defun([_LT_LANG_RC_CONFIG],
8434[AC_REQUIRE([LT_PROG_RC])dnl
8435AC_LANG_SAVE
8436
8437# Source file extension for RC test sources.
8438ac_ext=rc
8439
8440# Object file extension for compiled RC test sources.
8441objext=o
8442_LT_TAGVAR(objext, $1)=$objext
8443
8444# Code to be used in simple compile tests
8445lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8446
8447# Code to be used in simple link tests
8448lt_simple_link_test_code="$lt_simple_compile_test_code"
8449
8450# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8451_LT_TAG_COMPILER
8452
8453# save warnings/boilerplate of simple test code
8454_LT_COMPILER_BOILERPLATE
8455_LT_LINKER_BOILERPLATE
8456
8457# Allow CC to be a program name with arguments.
8458lt_save_CC="$CC"
8459lt_save_CFLAGS=$CFLAGS
8460lt_save_GCC=$GCC
8461GCC=
8462CC=${RC-"windres"}
8463CFLAGS=
8464compiler=$CC
8465_LT_TAGVAR(compiler, $1)=$CC
8466_LT_CC_BASENAME([$compiler])
8467_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8468
8469if test -n "$compiler"; then
8470  :
8471  _LT_CONFIG($1)
8472fi
8473
8474GCC=$lt_save_GCC
8475AC_LANG_RESTORE
8476CC=$lt_save_CC
8477CFLAGS=$lt_save_CFLAGS
8478])# _LT_LANG_RC_CONFIG
8479
8480
8481# LT_PROG_GCJ
8482# -----------
8483AC_DEFUN([LT_PROG_GCJ],
8484[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8485  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8486    [AC_CHECK_TOOL(GCJ, gcj,)
8487      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8488      AC_SUBST(GCJFLAGS)])])[]dnl
8489])
8490
8491# Old name:
8492AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8493dnl aclocal-1.4 backwards compatibility:
8494dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8495
8496
8497# LT_PROG_RC
8498# ----------
8499AC_DEFUN([LT_PROG_RC],
8500[AC_CHECK_TOOL(RC, windres,)
8501])
8502
8503# Old name:
8504AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8505dnl aclocal-1.4 backwards compatibility:
8506dnl AC_DEFUN([LT_AC_PROG_RC], [])
8507
8508
8509# _LT_DECL_EGREP
8510# --------------
8511# If we don't have a new enough Autoconf to choose the best grep
8512# available, choose the one first in the user's PATH.
8513m4_defun([_LT_DECL_EGREP],
8514[AC_REQUIRE([AC_PROG_EGREP])dnl
8515AC_REQUIRE([AC_PROG_FGREP])dnl
8516test -z "$GREP" && GREP=grep
8517_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8518_LT_DECL([], [EGREP], [1], [An ERE matcher])
8519_LT_DECL([], [FGREP], [1], [A literal string matcher])
8520dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8521AC_SUBST([GREP])
8522])
8523
8524
8525# _LT_DECL_OBJDUMP
8526# --------------
8527# If we don't have a new enough Autoconf to choose the best objdump
8528# available, choose the one first in the user's PATH.
8529m4_defun([_LT_DECL_OBJDUMP],
8530[AC_CHECK_TOOL(OBJDUMP, objdump, false)
8531test -z "$OBJDUMP" && OBJDUMP=objdump
8532_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8533AC_SUBST([OBJDUMP])
8534])
8535
8536# _LT_DECL_DLLTOOL
8537# ----------------
8538# Ensure DLLTOOL variable is set.
8539m4_defun([_LT_DECL_DLLTOOL],
8540[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8541test -z "$DLLTOOL" && DLLTOOL=dlltool
8542_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8543AC_SUBST([DLLTOOL])
8544])
8545
8546# _LT_DECL_SED
8547# ------------
8548# Check for a fully-functional sed program, that truncates
8549# as few characters as possible.  Prefer GNU sed if found.
8550m4_defun([_LT_DECL_SED],
8551[AC_PROG_SED
8552test -z "$SED" && SED=sed
8553Xsed="$SED -e 1s/^X//"
8554_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8555_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8556    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8557])# _LT_DECL_SED
8558
8559m4_ifndef([AC_PROG_SED], [
8560# NOTE: This macro has been submitted for inclusion into   #
8561#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8562#  a released version of Autoconf we should remove this    #
8563#  macro and use it instead.                               #
8564
8565m4_defun([AC_PROG_SED],
8566[AC_MSG_CHECKING([for a sed that does not truncate output])
8567AC_CACHE_VAL(lt_cv_path_SED,
8568[# Loop through the user's path and test for sed and gsed.
8569# Then use that list of sed's as ones to test for truncation.
8570as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8571for as_dir in $PATH
8572do
8573  IFS=$as_save_IFS
8574  test -z "$as_dir" && as_dir=.
8575  for lt_ac_prog in sed gsed; do
8576    for ac_exec_ext in '' $ac_executable_extensions; do
8577      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8578        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8579      fi
8580    done
8581  done
8582done
8583IFS=$as_save_IFS
8584lt_ac_max=0
8585lt_ac_count=0
8586# Add /usr/xpg4/bin/sed as it is typically found on Solaris
8587# along with /bin/sed that truncates output.
8588for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8589  test ! -f $lt_ac_sed && continue
8590  cat /dev/null > conftest.in
8591  lt_ac_count=0
8592  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8593  # Check for GNU sed and select it if it is found.
8594  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8595    lt_cv_path_SED=$lt_ac_sed
8596    break
8597  fi
8598  while true; do
8599    cat conftest.in conftest.in >conftest.tmp
8600    mv conftest.tmp conftest.in
8601    cp conftest.in conftest.nl
8602    echo >>conftest.nl
8603    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8604    cmp -s conftest.out conftest.nl || break
8605    # 10000 chars as input seems more than enough
8606    test $lt_ac_count -gt 10 && break
8607    lt_ac_count=`expr $lt_ac_count + 1`
8608    if test $lt_ac_count -gt $lt_ac_max; then
8609      lt_ac_max=$lt_ac_count
8610      lt_cv_path_SED=$lt_ac_sed
8611    fi
8612  done
8613done
8614])
8615SED=$lt_cv_path_SED
8616AC_SUBST([SED])
8617AC_MSG_RESULT([$SED])
8618])#AC_PROG_SED
8619])#m4_ifndef
8620
8621# Old name:
8622AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
8623dnl aclocal-1.4 backwards compatibility:
8624dnl AC_DEFUN([LT_AC_PROG_SED], [])
8625
8626
8627# _LT_CHECK_SHELL_FEATURES
8628# ------------------------
8629# Find out whether the shell is Bourne or XSI compatible,
8630# or has some other useful features.
8631m4_defun([_LT_CHECK_SHELL_FEATURES],
8632[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
8633# Try some XSI features
8634xsi_shell=no
8635( _lt_dummy="a/b/c"
8636  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
8637      = c,a/b,b/c, \
8638    && eval 'test $(( 1 + 1 )) -eq 2 \
8639    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
8640  && xsi_shell=yes
8641AC_MSG_RESULT([$xsi_shell])
8642_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
8643
8644AC_MSG_CHECKING([whether the shell understands "+="])
8645lt_shell_append=no
8646( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
8647    >/dev/null 2>&1 \
8648  && lt_shell_append=yes
8649AC_MSG_RESULT([$lt_shell_append])
8650_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8651
8652if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
8653  lt_unset=unset
8654else
8655  lt_unset=false
8656fi
8657_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8658
8659# test EBCDIC or ASCII
8660case `echo X|tr X '\101'` in
8661 A) # ASCII based system
8662    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
8663  lt_SP2NL='tr \040 \012'
8664  lt_NL2SP='tr \015\012 \040\040'
8665  ;;
8666 *) # EBCDIC based system
8667  lt_SP2NL='tr \100 \n'
8668  lt_NL2SP='tr \r\n \100\100'
8669  ;;
8670esac
8671_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
8672_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
8673])# _LT_CHECK_SHELL_FEATURES
8674
8675
8676# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
8677# ------------------------------------------------------
8678# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
8679# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
8680m4_defun([_LT_PROG_FUNCTION_REPLACE],
8681[dnl {
8682sed -e '/^$1 ()$/,/^} # $1 /c\
8683$1 ()\
8684{\
8685m4_bpatsubsts([$2], [$], [\\], [^\([	 ]\)], [\\\1])
8686} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
8687  && mv -f "$cfgfile.tmp" "$cfgfile" \
8688    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8689test 0 -eq $? || _lt_function_replace_fail=:
8690])
8691
8692
8693# _LT_PROG_REPLACE_SHELLFNS
8694# -------------------------
8695# Replace existing portable implementations of several shell functions with
8696# equivalent extended shell implementations where those features are available..
8697m4_defun([_LT_PROG_REPLACE_SHELLFNS],
8698[if test x"$xsi_shell" = xyes; then
8699  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
8700    case ${1} in
8701      */*) func_dirname_result="${1%/*}${2}" ;;
8702      *  ) func_dirname_result="${3}" ;;
8703    esac])
8704
8705  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
8706    func_basename_result="${1##*/}"])
8707
8708  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
8709    case ${1} in
8710      */*) func_dirname_result="${1%/*}${2}" ;;
8711      *  ) func_dirname_result="${3}" ;;
8712    esac
8713    func_basename_result="${1##*/}"])
8714
8715  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
8716    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
8717    # positional parameters, so assign one to ordinary parameter first.
8718    func_stripname_result=${3}
8719    func_stripname_result=${func_stripname_result#"${1}"}
8720    func_stripname_result=${func_stripname_result%"${2}"}])
8721
8722  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
8723    func_split_long_opt_name=${1%%=*}
8724    func_split_long_opt_arg=${1#*=}])
8725
8726  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
8727    func_split_short_opt_arg=${1#??}
8728    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
8729
8730  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
8731    case ${1} in
8732      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
8733      *)    func_lo2o_result=${1} ;;
8734    esac])
8735
8736  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
8737
8738  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
8739
8740  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
8741fi
8742
8743if test x"$lt_shell_append" = xyes; then
8744  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
8745
8746  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
8747    func_quote_for_eval "${2}"
8748dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
8749    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
8750
8751  # Save a `func_append' function call where possible by direct use of '+='
8752  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
8753    && mv -f "$cfgfile.tmp" "$cfgfile" \
8754      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8755  test 0 -eq $? || _lt_function_replace_fail=:
8756else
8757  # Save a `func_append' function call even when '+=' is not available
8758  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
8759    && mv -f "$cfgfile.tmp" "$cfgfile" \
8760      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
8761  test 0 -eq $? || _lt_function_replace_fail=:
8762fi
8763
8764if test x"$_lt_function_replace_fail" = x":"; then
8765  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
8766fi
8767])
8768
8769# _LT_PATH_CONVERSION_FUNCTIONS
8770# -----------------------------
8771# Determine which file name conversion functions should be used by
8772# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
8773# for certain cross-compile configurations and native mingw.
8774m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
8775[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8776AC_REQUIRE([AC_CANONICAL_BUILD])dnl
8777AC_MSG_CHECKING([how to convert $build file names to $host format])
8778AC_CACHE_VAL(lt_cv_to_host_file_cmd,
8779[case $host in
8780  *-*-mingw* )
8781    case $build in
8782      *-*-mingw* ) # actually msys
8783        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
8784        ;;
8785      *-*-cygwin* )
8786        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
8787        ;;
8788      * ) # otherwise, assume *nix
8789        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
8790        ;;
8791    esac
8792    ;;
8793  *-*-cygwin* )
8794    case $build in
8795      *-*-mingw* ) # actually msys
8796        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
8797        ;;
8798      *-*-cygwin* )
8799        lt_cv_to_host_file_cmd=func_convert_file_noop
8800        ;;
8801      * ) # otherwise, assume *nix
8802        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
8803        ;;
8804    esac
8805    ;;
8806  * ) # unhandled hosts (and "normal" native builds)
8807    lt_cv_to_host_file_cmd=func_convert_file_noop
8808    ;;
8809esac
8810])
8811to_host_file_cmd=$lt_cv_to_host_file_cmd
8812AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
8813_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
8814         [0], [convert $build file names to $host format])dnl
8815
8816AC_MSG_CHECKING([how to convert $build file names to toolchain format])
8817AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
8818[#assume ordinary cross tools, or native build.
8819lt_cv_to_tool_file_cmd=func_convert_file_noop
8820case $host in
8821  *-*-mingw* )
8822    case $build in
8823      *-*-mingw* ) # actually msys
8824        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
8825        ;;
8826    esac
8827    ;;
8828esac
8829])
8830to_tool_file_cmd=$lt_cv_to_tool_file_cmd
8831AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
8832_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
8833         [0], [convert $build files to toolchain format])dnl
8834])# _LT_PATH_CONVERSION_FUNCTIONS
8835
8836# Helper functions for option handling.                    -*- Autoconf -*-
8837#
8838#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
8839#   Inc.
8840#   Written by Gary V. Vaughan, 2004
8841#
8842# This file is free software; the Free Software Foundation gives
8843# unlimited permission to copy and/or distribute it, with or without
8844# modifications, as long as this notice is preserved.
8845
8846# serial 7 ltoptions.m4
8847
8848# This is to help aclocal find these macros, as it can't see m4_define.
8849AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
8850
8851
8852# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
8853# ------------------------------------------
8854m4_define([_LT_MANGLE_OPTION],
8855[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
8856
8857
8858# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
8859# ---------------------------------------
8860# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
8861# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
8862# saved as a flag.
8863m4_define([_LT_SET_OPTION],
8864[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
8865m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
8866        _LT_MANGLE_DEFUN([$1], [$2]),
8867    [m4_warning([Unknown $1 option `$2'])])[]dnl
8868])
8869
8870
8871# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
8872# ------------------------------------------------------------
8873# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8874m4_define([_LT_IF_OPTION],
8875[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
8876
8877
8878# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
8879# -------------------------------------------------------
8880# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
8881# are set.
8882m4_define([_LT_UNLESS_OPTIONS],
8883[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8884	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
8885		      [m4_define([$0_found])])])[]dnl
8886m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
8887])[]dnl
8888])
8889
8890
8891# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
8892# ----------------------------------------
8893# OPTION-LIST is a space-separated list of Libtool options associated
8894# with MACRO-NAME.  If any OPTION has a matching handler declared with
8895# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
8896# the unknown option and exit.
8897m4_defun([_LT_SET_OPTIONS],
8898[# Set options
8899m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
8900    [_LT_SET_OPTION([$1], _LT_Option)])
8901
8902m4_if([$1],[LT_INIT],[
8903  dnl
8904  dnl Simply set some default values (i.e off) if boolean options were not
8905  dnl specified:
8906  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
8907  ])
8908  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
8909  ])
8910  dnl
8911  dnl If no reference was made to various pairs of opposing options, then
8912  dnl we run the default mode handler for the pair.  For example, if neither
8913  dnl `shared' nor `disable-shared' was passed, we enable building of shared
8914  dnl archives by default:
8915  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
8916  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
8917  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
8918  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
8919  		   [_LT_ENABLE_FAST_INSTALL])
8920  ])
8921])# _LT_SET_OPTIONS
8922
8923
8924
8925# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
8926# -----------------------------------------
8927m4_define([_LT_MANGLE_DEFUN],
8928[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
8929
8930
8931# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
8932# -----------------------------------------------
8933m4_define([LT_OPTION_DEFINE],
8934[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
8935])# LT_OPTION_DEFINE
8936
8937
8938# dlopen
8939# ------
8940LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
8941])
8942
8943AU_DEFUN([AC_LIBTOOL_DLOPEN],
8944[_LT_SET_OPTION([LT_INIT], [dlopen])
8945AC_DIAGNOSE([obsolete],
8946[$0: Remove this warning and the call to _LT_SET_OPTION when you
8947put the `dlopen' option into LT_INIT's first parameter.])
8948])
8949
8950dnl aclocal-1.4 backwards compatibility:
8951dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
8952
8953
8954# win32-dll
8955# ---------
8956# Declare package support for building win32 dll's.
8957LT_OPTION_DEFINE([LT_INIT], [win32-dll],
8958[enable_win32_dll=yes
8959
8960case $host in
8961*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
8962  AC_CHECK_TOOL(AS, as, false)
8963  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8964  AC_CHECK_TOOL(OBJDUMP, objdump, false)
8965  ;;
8966esac
8967
8968test -z "$AS" && AS=as
8969_LT_DECL([], [AS],      [1], [Assembler program])dnl
8970
8971test -z "$DLLTOOL" && DLLTOOL=dlltool
8972_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
8973
8974test -z "$OBJDUMP" && OBJDUMP=objdump
8975_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
8976])# win32-dll
8977
8978AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
8979[AC_REQUIRE([AC_CANONICAL_HOST])dnl
8980_LT_SET_OPTION([LT_INIT], [win32-dll])
8981AC_DIAGNOSE([obsolete],
8982[$0: Remove this warning and the call to _LT_SET_OPTION when you
8983put the `win32-dll' option into LT_INIT's first parameter.])
8984])
8985
8986dnl aclocal-1.4 backwards compatibility:
8987dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
8988
8989
8990# _LT_ENABLE_SHARED([DEFAULT])
8991# ----------------------------
8992# implement the --enable-shared flag, and supports the `shared' and
8993# `disable-shared' LT_INIT options.
8994# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
8995m4_define([_LT_ENABLE_SHARED],
8996[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
8997AC_ARG_ENABLE([shared],
8998    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
8999	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9000    [p=${PACKAGE-default}
9001    case $enableval in
9002    yes) enable_shared=yes ;;
9003    no) enable_shared=no ;;
9004    *)
9005      enable_shared=no
9006      # Look at the argument we got.  We use all the common list separators.
9007      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9008      for pkg in $enableval; do
9009	IFS="$lt_save_ifs"
9010	if test "X$pkg" = "X$p"; then
9011	  enable_shared=yes
9012	fi
9013      done
9014      IFS="$lt_save_ifs"
9015      ;;
9016    esac],
9017    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9018
9019    _LT_DECL([build_libtool_libs], [enable_shared], [0],
9020	[Whether or not to build shared libraries])
9021])# _LT_ENABLE_SHARED
9022
9023LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9024LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9025
9026# Old names:
9027AC_DEFUN([AC_ENABLE_SHARED],
9028[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9029])
9030
9031AC_DEFUN([AC_DISABLE_SHARED],
9032[_LT_SET_OPTION([LT_INIT], [disable-shared])
9033])
9034
9035AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9036AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9037
9038dnl aclocal-1.4 backwards compatibility:
9039dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9040dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9041
9042
9043
9044# _LT_ENABLE_STATIC([DEFAULT])
9045# ----------------------------
9046# implement the --enable-static flag, and support the `static' and
9047# `disable-static' LT_INIT options.
9048# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9049m4_define([_LT_ENABLE_STATIC],
9050[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9051AC_ARG_ENABLE([static],
9052    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9053	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9054    [p=${PACKAGE-default}
9055    case $enableval in
9056    yes) enable_static=yes ;;
9057    no) enable_static=no ;;
9058    *)
9059     enable_static=no
9060      # Look at the argument we got.  We use all the common list separators.
9061      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9062      for pkg in $enableval; do
9063	IFS="$lt_save_ifs"
9064	if test "X$pkg" = "X$p"; then
9065	  enable_static=yes
9066	fi
9067      done
9068      IFS="$lt_save_ifs"
9069      ;;
9070    esac],
9071    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9072
9073    _LT_DECL([build_old_libs], [enable_static], [0],
9074	[Whether or not to build static libraries])
9075])# _LT_ENABLE_STATIC
9076
9077LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9078LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9079
9080# Old names:
9081AC_DEFUN([AC_ENABLE_STATIC],
9082[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9083])
9084
9085AC_DEFUN([AC_DISABLE_STATIC],
9086[_LT_SET_OPTION([LT_INIT], [disable-static])
9087])
9088
9089AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9090AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9091
9092dnl aclocal-1.4 backwards compatibility:
9093dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9094dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9095
9096
9097
9098# _LT_ENABLE_FAST_INSTALL([DEFAULT])
9099# ----------------------------------
9100# implement the --enable-fast-install flag, and support the `fast-install'
9101# and `disable-fast-install' LT_INIT options.
9102# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9103m4_define([_LT_ENABLE_FAST_INSTALL],
9104[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9105AC_ARG_ENABLE([fast-install],
9106    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9107    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9108    [p=${PACKAGE-default}
9109    case $enableval in
9110    yes) enable_fast_install=yes ;;
9111    no) enable_fast_install=no ;;
9112    *)
9113      enable_fast_install=no
9114      # Look at the argument we got.  We use all the common list separators.
9115      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9116      for pkg in $enableval; do
9117	IFS="$lt_save_ifs"
9118	if test "X$pkg" = "X$p"; then
9119	  enable_fast_install=yes
9120	fi
9121      done
9122      IFS="$lt_save_ifs"
9123      ;;
9124    esac],
9125    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9126
9127_LT_DECL([fast_install], [enable_fast_install], [0],
9128	 [Whether or not to optimize for fast installation])dnl
9129])# _LT_ENABLE_FAST_INSTALL
9130
9131LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9132LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9133
9134# Old names:
9135AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9136[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9137AC_DIAGNOSE([obsolete],
9138[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9139the `fast-install' option into LT_INIT's first parameter.])
9140])
9141
9142AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9143[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9144AC_DIAGNOSE([obsolete],
9145[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9146the `disable-fast-install' option into LT_INIT's first parameter.])
9147])
9148
9149dnl aclocal-1.4 backwards compatibility:
9150dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9151dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9152
9153
9154# _LT_WITH_PIC([MODE])
9155# --------------------
9156# implement the --with-pic flag, and support the `pic-only' and `no-pic'
9157# LT_INIT options.
9158# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
9159m4_define([_LT_WITH_PIC],
9160[AC_ARG_WITH([pic],
9161    [AS_HELP_STRING([--with-pic],
9162	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9163    [pic_mode="$withval"],
9164    [pic_mode=default])
9165
9166test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9167
9168_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9169])# _LT_WITH_PIC
9170
9171LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9172LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9173
9174# Old name:
9175AU_DEFUN([AC_LIBTOOL_PICMODE],
9176[_LT_SET_OPTION([LT_INIT], [pic-only])
9177AC_DIAGNOSE([obsolete],
9178[$0: Remove this warning and the call to _LT_SET_OPTION when you
9179put the `pic-only' option into LT_INIT's first parameter.])
9180])
9181
9182dnl aclocal-1.4 backwards compatibility:
9183dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9184
9185
9186m4_define([_LTDL_MODE], [])
9187LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9188		 [m4_define([_LTDL_MODE], [nonrecursive])])
9189LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9190		 [m4_define([_LTDL_MODE], [recursive])])
9191LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9192		 [m4_define([_LTDL_MODE], [subproject])])
9193
9194m4_define([_LTDL_TYPE], [])
9195LT_OPTION_DEFINE([LTDL_INIT], [installable],
9196		 [m4_define([_LTDL_TYPE], [installable])])
9197LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9198		 [m4_define([_LTDL_TYPE], [convenience])])
9199
9200# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
9201#
9202# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9203# Written by Gary V. Vaughan, 2004
9204#
9205# This file is free software; the Free Software Foundation gives
9206# unlimited permission to copy and/or distribute it, with or without
9207# modifications, as long as this notice is preserved.
9208
9209# serial 6 ltsugar.m4
9210
9211# This is to help aclocal find these macros, as it can't see m4_define.
9212AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9213
9214
9215# lt_join(SEP, ARG1, [ARG2...])
9216# -----------------------------
9217# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9218# associated separator.
9219# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9220# versions in m4sugar had bugs.
9221m4_define([lt_join],
9222[m4_if([$#], [1], [],
9223       [$#], [2], [[$2]],
9224       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9225m4_define([_lt_join],
9226[m4_if([$#$2], [2], [],
9227       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9228
9229
9230# lt_car(LIST)
9231# lt_cdr(LIST)
9232# ------------
9233# Manipulate m4 lists.
9234# These macros are necessary as long as will still need to support
9235# Autoconf-2.59 which quotes differently.
9236m4_define([lt_car], [[$1]])
9237m4_define([lt_cdr],
9238[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9239       [$#], 1, [],
9240       [m4_dquote(m4_shift($@))])])
9241m4_define([lt_unquote], $1)
9242
9243
9244# lt_append(MACRO-NAME, STRING, [SEPARATOR])
9245# ------------------------------------------
9246# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9247# Note that neither SEPARATOR nor STRING are expanded; they are appended
9248# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9249# No SEPARATOR is output if MACRO-NAME was previously undefined (different
9250# than defined and empty).
9251#
9252# This macro is needed until we can rely on Autoconf 2.62, since earlier
9253# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9254m4_define([lt_append],
9255[m4_define([$1],
9256	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9257
9258
9259
9260# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9261# ----------------------------------------------------------
9262# Produce a SEP delimited list of all paired combinations of elements of
9263# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
9264# has the form PREFIXmINFIXSUFFIXn.
9265# Needed until we can rely on m4_combine added in Autoconf 2.62.
9266m4_define([lt_combine],
9267[m4_if(m4_eval([$# > 3]), [1],
9268       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9269[[m4_foreach([_Lt_prefix], [$2],
9270	     [m4_foreach([_Lt_suffix],
9271		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9272	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9273
9274
9275# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9276# -----------------------------------------------------------------------
9277# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9278# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9279m4_define([lt_if_append_uniq],
9280[m4_ifdef([$1],
9281	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9282		 [lt_append([$1], [$2], [$3])$4],
9283		 [$5])],
9284	  [lt_append([$1], [$2], [$3])$4])])
9285
9286
9287# lt_dict_add(DICT, KEY, VALUE)
9288# -----------------------------
9289m4_define([lt_dict_add],
9290[m4_define([$1($2)], [$3])])
9291
9292
9293# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9294# --------------------------------------------
9295m4_define([lt_dict_add_subkey],
9296[m4_define([$1($2:$3)], [$4])])
9297
9298
9299# lt_dict_fetch(DICT, KEY, [SUBKEY])
9300# ----------------------------------
9301m4_define([lt_dict_fetch],
9302[m4_ifval([$3],
9303	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9304    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9305
9306
9307# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9308# -----------------------------------------------------------------
9309m4_define([lt_if_dict_fetch],
9310[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9311	[$5],
9312    [$6])])
9313
9314
9315# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9316# --------------------------------------------------------------
9317m4_define([lt_dict_filter],
9318[m4_if([$5], [], [],
9319  [lt_join(m4_quote(m4_default([$4], [[, ]])),
9320           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9321		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9322])
9323
9324# ltversion.m4 -- version numbers			-*- Autoconf -*-
9325#
9326#   Copyright (C) 2004 Free Software Foundation, Inc.
9327#   Written by Scott James Remnant, 2004
9328#
9329# This file is free software; the Free Software Foundation gives
9330# unlimited permission to copy and/or distribute it, with or without
9331# modifications, as long as this notice is preserved.
9332
9333# @configure_input@
9334
9335# serial 3293 ltversion.m4
9336# This file is part of GNU Libtool
9337
9338m4_define([LT_PACKAGE_VERSION], [2.4])
9339m4_define([LT_PACKAGE_REVISION], [1.3293])
9340
9341AC_DEFUN([LTVERSION_VERSION],
9342[macro_version='2.4'
9343macro_revision='1.3293'
9344_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9345_LT_DECL(, macro_revision, 0)
9346])
9347
9348# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
9349#
9350#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
9351#   Written by Scott James Remnant, 2004.
9352#
9353# This file is free software; the Free Software Foundation gives
9354# unlimited permission to copy and/or distribute it, with or without
9355# modifications, as long as this notice is preserved.
9356
9357# serial 5 lt~obsolete.m4
9358
9359# These exist entirely to fool aclocal when bootstrapping libtool.
9360#
9361# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9362# which have later been changed to m4_define as they aren't part of the
9363# exported API, or moved to Autoconf or Automake where they belong.
9364#
9365# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
9366# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9367# using a macro with the same name in our local m4/libtool.m4 it'll
9368# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9369# and doesn't know about Autoconf macros at all.)
9370#
9371# So we provide this file, which has a silly filename so it's always
9372# included after everything else.  This provides aclocal with the
9373# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9374# because those macros already exist, or will be overwritten later.
9375# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
9376#
9377# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9378# Yes, that means every name once taken will need to remain here until
9379# we give up compatibility with versions before 1.7, at which point
9380# we need to keep only those names which we still refer to.
9381
9382# This is to help aclocal find these macros, as it can't see m4_define.
9383AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9384
9385m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9386m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
9387m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9388m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
9389m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9390m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
9391m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
9392m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9393m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
9394m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
9395m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
9396m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9397m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9398m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9399m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9400m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9401m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
9402m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9403m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9404m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
9405m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
9406m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9407m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9408m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9409m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9410m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9411m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9412m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9413m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
9414m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
9415m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
9416m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9417m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9418m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
9419m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
9420m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9421m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9422m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
9423m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9424m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
9425m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
9426m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
9427m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9428m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9429m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9430m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9431m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9432m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9433m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9434m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9435m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9436m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9437m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
9438m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9439m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9440m4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9441m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9442m4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9443m4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
9444m4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
9445m4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
9446
9447# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
9448# serial 1 (pkg-config-0.24)
9449# 
9450# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
9451#
9452# This program is free software; you can redistribute it and/or modify
9453# it under the terms of the GNU General Public License as published by
9454# the Free Software Foundation; either version 2 of the License, or
9455# (at your option) any later version.
9456#
9457# This program is distributed in the hope that it will be useful, but
9458# WITHOUT ANY WARRANTY; without even the implied warranty of
9459# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9460# General Public License for more details.
9461#
9462# You should have received a copy of the GNU General Public License
9463# along with this program; if not, write to the Free Software
9464# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9465#
9466# As a special exception to the GNU General Public License, if you
9467# distribute this file as part of a program that contains a
9468# configuration script generated by Autoconf, you may include it under
9469# the same distribution terms that you use for the rest of that program.
9470
9471# PKG_PROG_PKG_CONFIG([MIN-VERSION])
9472# ----------------------------------
9473AC_DEFUN([PKG_PROG_PKG_CONFIG],
9474[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9475m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
9476m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
9477AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
9478AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
9479AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
9480
9481if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9482	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9483fi
9484if test -n "$PKG_CONFIG"; then
9485	_pkg_min_version=m4_default([$1], [0.9.0])
9486	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9487	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9488		AC_MSG_RESULT([yes])
9489	else
9490		AC_MSG_RESULT([no])
9491		PKG_CONFIG=""
9492	fi
9493fi[]dnl
9494])# PKG_PROG_PKG_CONFIG
9495
9496# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9497#
9498# Check to see whether a particular set of modules exists.  Similar
9499# to PKG_CHECK_MODULES(), but does not set variables or print errors.
9500#
9501# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9502# only at the first occurence in configure.ac, so if the first place
9503# it's called might be skipped (such as if it is within an "if", you
9504# have to call PKG_CHECK_EXISTS manually
9505# --------------------------------------------------------------
9506AC_DEFUN([PKG_CHECK_EXISTS],
9507[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9508if test -n "$PKG_CONFIG" && \
9509    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9510  m4_default([$2], [:])
9511m4_ifvaln([$3], [else
9512  $3])dnl
9513fi])
9514
9515# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9516# ---------------------------------------------
9517m4_define([_PKG_CONFIG],
9518[if test -n "$$1"; then
9519    pkg_cv_[]$1="$$1"
9520 elif test -n "$PKG_CONFIG"; then
9521    PKG_CHECK_EXISTS([$3],
9522                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
9523		      test "x$?" != "x0" && pkg_failed=yes ],
9524		     [pkg_failed=yes])
9525 else
9526    pkg_failed=untried
9527fi[]dnl
9528])# _PKG_CONFIG
9529
9530# _PKG_SHORT_ERRORS_SUPPORTED
9531# -----------------------------
9532AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9533[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9534if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9535        _pkg_short_errors_supported=yes
9536else
9537        _pkg_short_errors_supported=no
9538fi[]dnl
9539])# _PKG_SHORT_ERRORS_SUPPORTED
9540
9541
9542# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9543# [ACTION-IF-NOT-FOUND])
9544#
9545#
9546# Note that if there is a possibility the first call to
9547# PKG_CHECK_MODULES might not happen, you should be sure to include an
9548# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9549#
9550#
9551# --------------------------------------------------------------
9552AC_DEFUN([PKG_CHECK_MODULES],
9553[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9554AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9555AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9556
9557pkg_failed=no
9558AC_MSG_CHECKING([for $1])
9559
9560_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9561_PKG_CONFIG([$1][_LIBS], [libs], [$2])
9562
9563m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9564and $1[]_LIBS to avoid the need to call pkg-config.
9565See the pkg-config man page for more details.])
9566
9567if test $pkg_failed = yes; then
9568   	AC_MSG_RESULT([no])
9569        _PKG_SHORT_ERRORS_SUPPORTED
9570        if test $_pkg_short_errors_supported = yes; then
9571	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
9572        else 
9573	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
9574        fi
9575	# Put the nasty error message in config.log where it belongs
9576	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9577
9578	m4_default([$4], [AC_MSG_ERROR(
9579[Package requirements ($2) were not met:
9580
9581$$1_PKG_ERRORS
9582
9583Consider adjusting the PKG_CONFIG_PATH environment variable if you
9584installed software in a non-standard prefix.
9585
9586_PKG_TEXT])[]dnl
9587        ])
9588elif test $pkg_failed = untried; then
9589     	AC_MSG_RESULT([no])
9590	m4_default([$4], [AC_MSG_FAILURE(
9591[The pkg-config script could not be found or is too old.  Make sure it
9592is in your PATH or set the PKG_CONFIG environment variable to the full
9593path to pkg-config.
9594
9595_PKG_TEXT
9596
9597To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
9598        ])
9599else
9600	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9601	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9602        AC_MSG_RESULT([yes])
9603	$3
9604fi[]dnl
9605])# PKG_CHECK_MODULES
9606
9607dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
9608dnl
9609dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
9610dnl 
9611dnl Permission is hereby granted, free of charge, to any person obtaining a
9612dnl copy of this software and associated documentation files (the "Software"),
9613dnl to deal in the Software without restriction, including without limitation
9614dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
9615dnl and/or sell copies of the Software, and to permit persons to whom the
9616dnl Software is furnished to do so, subject to the following conditions:
9617dnl
9618dnl The above copyright notice and this permission notice (including the next
9619dnl paragraph) shall be included in all copies or substantial portions of the
9620dnl Software.
9621dnl
9622dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
9623dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
9624dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
9625dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
9626dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
9627dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
9628dnl DEALINGS IN THE SOFTWARE.
9629
9630# XORG_MACROS_VERSION(required-version)
9631# -------------------------------------
9632# Minimum version: 1.1.0
9633#
9634# If you're using a macro added in Version 1.1 or newer, include this in
9635# your configure.ac with the minimum required version, such as:
9636# XORG_MACROS_VERSION(1.1)
9637#
9638# To ensure that this macro is defined, also add:
9639# m4_ifndef([XORG_MACROS_VERSION],
9640#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
9641#
9642#
9643# See the "minimum version" comment for each macro you use to see what 
9644# version you require.
9645m4_defun([XORG_MACROS_VERSION],[
9646m4_define([vers_have], [1.15.0])
9647m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
9648m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
9649m4_if(m4_cmp(maj_have, maj_needed), 0,,
9650    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
9651m4_if(m4_version_compare(vers_have, [$1]), -1,
9652    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
9653m4_undefine([vers_have])
9654m4_undefine([maj_have])
9655m4_undefine([maj_needed])
9656]) # XORG_MACROS_VERSION
9657
9658# XORG_PROG_RAWCPP()
9659# ------------------
9660# Minimum version: 1.0.0
9661#
9662# Find cpp program and necessary flags for use in pre-processing text files
9663# such as man pages and config files
9664AC_DEFUN([XORG_PROG_RAWCPP],[
9665AC_REQUIRE([AC_PROG_CPP])
9666AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
9667   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
9668
9669# Check for flag to avoid builtin definitions - assumes unix is predefined,
9670# which is not the best choice for supporting other OS'es, but covers most
9671# of the ones we need for now.
9672AC_MSG_CHECKING([if $RAWCPP requires -undef])
9673AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])])
9674if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
9675	AC_MSG_RESULT([no])
9676else
9677	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
9678		RAWCPPFLAGS=-undef
9679		AC_MSG_RESULT([yes])
9680	# under Cygwin unix is still defined even with -undef
9681	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
9682		RAWCPPFLAGS="-undef -ansi"
9683		AC_MSG_RESULT([yes, with -ansi])
9684	else
9685		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
9686	fi
9687fi
9688rm -f conftest.$ac_ext
9689
9690AC_MSG_CHECKING([if $RAWCPP requires -traditional])
9691AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve   "whitespace"?]])])
9692if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
9693	AC_MSG_RESULT([no])
9694else
9695	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
9696		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
9697		AC_MSG_RESULT([yes])
9698	else
9699		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
9700	fi
9701fi
9702rm -f conftest.$ac_ext
9703AC_SUBST(RAWCPPFLAGS)
9704]) # XORG_PROG_RAWCPP
9705
9706# XORG_MANPAGE_SECTIONS()
9707# -----------------------
9708# Minimum version: 1.0.0
9709#
9710# Determine which sections man pages go in for the different man page types
9711# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
9712# Not sure if there's any better way than just hardcoding by OS name.
9713# Override default settings by setting environment variables
9714# Added MAN_SUBSTS in version 1.8
9715# Added AC_PROG_SED in version 1.8
9716
9717AC_DEFUN([XORG_MANPAGE_SECTIONS],[
9718AC_REQUIRE([AC_CANONICAL_HOST])
9719AC_REQUIRE([AC_PROG_SED])
9720
9721if test x$APP_MAN_SUFFIX = x    ; then
9722    APP_MAN_SUFFIX=1
9723fi
9724if test x$APP_MAN_DIR = x    ; then
9725    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
9726fi
9727
9728if test x$LIB_MAN_SUFFIX = x    ; then
9729    LIB_MAN_SUFFIX=3
9730fi
9731if test x$LIB_MAN_DIR = x    ; then
9732    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
9733fi
9734
9735if test x$FILE_MAN_SUFFIX = x    ; then
9736    case $host_os in
9737	solaris*)	FILE_MAN_SUFFIX=4  ;;
9738	*)		FILE_MAN_SUFFIX=5  ;;
9739    esac
9740fi
9741if test x$FILE_MAN_DIR = x    ; then
9742    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
9743fi
9744
9745if test x$MISC_MAN_SUFFIX = x    ; then
9746    case $host_os in
9747	solaris*)	MISC_MAN_SUFFIX=5  ;;
9748	*)		MISC_MAN_SUFFIX=7  ;;
9749    esac
9750fi
9751if test x$MISC_MAN_DIR = x    ; then
9752    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
9753fi
9754
9755if test x$DRIVER_MAN_SUFFIX = x    ; then
9756    case $host_os in
9757	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
9758	*)		DRIVER_MAN_SUFFIX=4  ;;
9759    esac
9760fi
9761if test x$DRIVER_MAN_DIR = x    ; then
9762    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
9763fi
9764
9765if test x$ADMIN_MAN_SUFFIX = x    ; then
9766    case $host_os in
9767	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
9768	*)		ADMIN_MAN_SUFFIX=8  ;;
9769    esac
9770fi
9771if test x$ADMIN_MAN_DIR = x    ; then
9772    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
9773fi
9774
9775
9776AC_SUBST([APP_MAN_SUFFIX])
9777AC_SUBST([LIB_MAN_SUFFIX])
9778AC_SUBST([FILE_MAN_SUFFIX])
9779AC_SUBST([MISC_MAN_SUFFIX])
9780AC_SUBST([DRIVER_MAN_SUFFIX])
9781AC_SUBST([ADMIN_MAN_SUFFIX])
9782AC_SUBST([APP_MAN_DIR])
9783AC_SUBST([LIB_MAN_DIR])
9784AC_SUBST([FILE_MAN_DIR])
9785AC_SUBST([MISC_MAN_DIR])
9786AC_SUBST([DRIVER_MAN_DIR])
9787AC_SUBST([ADMIN_MAN_DIR])
9788
9789XORG_MAN_PAGE="X Version 11"
9790AC_SUBST([XORG_MAN_PAGE])
9791MAN_SUBSTS="\
9792	-e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
9793	-e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
9794	-e 's|__xservername__|Xorg|g' \
9795	-e 's|__xconfigfile__|xorg.conf|g' \
9796	-e 's|__projectroot__|\$(prefix)|g' \
9797	-e 's|__apploaddir__|\$(appdefaultdir)|g' \
9798	-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
9799	-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
9800	-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
9801	-e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
9802	-e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
9803	-e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
9804AC_SUBST([MAN_SUBSTS])
9805
9806]) # XORG_MANPAGE_SECTIONS
9807
9808# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
9809# ------------------------
9810# Minimum version: 1.7.0
9811#
9812# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
9813# provided by xorg-sgml-doctools, if installed.
9814AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
9815AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
9816XORG_SGML_PATH=
9817PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
9818    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
9819    [m4_ifval([$1],[:],
9820        [if test x"$cross_compiling" != x"yes" ; then
9821            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
9822                          [XORG_SGML_PATH=$prefix/share/sgml])
9823         fi])
9824    ])
9825
9826# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
9827# the path and the name of the doc stylesheet
9828if test "x$XORG_SGML_PATH" != "x" ; then
9829   AC_MSG_RESULT([$XORG_SGML_PATH])
9830   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
9831   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
9832else
9833   AC_MSG_RESULT([no])
9834fi
9835
9836AC_SUBST(XORG_SGML_PATH)
9837AC_SUBST(STYLESHEET_SRCDIR)
9838AC_SUBST(XSL_STYLESHEET)
9839AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
9840]) # XORG_CHECK_SGML_DOCTOOLS
9841
9842# XORG_CHECK_LINUXDOC
9843# -------------------
9844# Minimum version: 1.0.0
9845#
9846# Defines the variable MAKE_TEXT if the necessary tools and
9847# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
9848# Whether or not the necessary tools and files are found can be checked
9849# with the AM_CONDITIONAL "BUILD_LINUXDOC"
9850AC_DEFUN([XORG_CHECK_LINUXDOC],[
9851AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
9852AC_REQUIRE([XORG_WITH_PS2PDF])
9853
9854AC_PATH_PROG(LINUXDOC, linuxdoc)
9855
9856AC_MSG_CHECKING([whether to build documentation])
9857
9858if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
9859   BUILDDOC=yes
9860else
9861   BUILDDOC=no
9862fi
9863
9864AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
9865
9866AC_MSG_RESULT([$BUILDDOC])
9867
9868AC_MSG_CHECKING([whether to build pdf documentation])
9869
9870if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
9871   BUILDPDFDOC=yes
9872else
9873   BUILDPDFDOC=no
9874fi
9875
9876AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
9877
9878AC_MSG_RESULT([$BUILDPDFDOC])
9879
9880MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
9881MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
9882MAKE_PDF="$PS2PDF"
9883MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
9884
9885AC_SUBST(MAKE_TEXT)
9886AC_SUBST(MAKE_PS)
9887AC_SUBST(MAKE_PDF)
9888AC_SUBST(MAKE_HTML)
9889]) # XORG_CHECK_LINUXDOC
9890
9891# XORG_CHECK_DOCBOOK
9892# -------------------
9893# Minimum version: 1.0.0
9894#
9895# Checks for the ability to build output formats from SGML DocBook source.
9896# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
9897# indicates whether the necessary tools and files are found and, if set,
9898# $(MAKE_XXX) blah.sgml will produce blah.xxx.
9899AC_DEFUN([XORG_CHECK_DOCBOOK],[
9900AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
9901
9902BUILDTXTDOC=no
9903BUILDPDFDOC=no
9904BUILDPSDOC=no
9905BUILDHTMLDOC=no
9906
9907AC_PATH_PROG(DOCBOOKPS, docbook2ps)
9908AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
9909AC_PATH_PROG(DOCBOOKHTML, docbook2html)
9910AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
9911
9912AC_MSG_CHECKING([whether to build text documentation])
9913if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
9914   test x$BUILD_TXTDOC != xno; then
9915	BUILDTXTDOC=yes
9916fi
9917AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
9918AC_MSG_RESULT([$BUILDTXTDOC])
9919
9920AC_MSG_CHECKING([whether to build PDF documentation])
9921if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
9922   test x$BUILD_PDFDOC != xno; then
9923	BUILDPDFDOC=yes
9924fi
9925AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
9926AC_MSG_RESULT([$BUILDPDFDOC])
9927
9928AC_MSG_CHECKING([whether to build PostScript documentation])
9929if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
9930   test x$BUILD_PSDOC != xno; then
9931	BUILDPSDOC=yes
9932fi
9933AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
9934AC_MSG_RESULT([$BUILDPSDOC])
9935
9936AC_MSG_CHECKING([whether to build HTML documentation])
9937if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
9938   test x$BUILD_HTMLDOC != xno; then
9939	BUILDHTMLDOC=yes
9940fi
9941AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
9942AC_MSG_RESULT([$BUILDHTMLDOC])
9943
9944MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
9945MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
9946MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
9947MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
9948
9949AC_SUBST(MAKE_TEXT)
9950AC_SUBST(MAKE_PS)
9951AC_SUBST(MAKE_PDF)
9952AC_SUBST(MAKE_HTML)
9953]) # XORG_CHECK_DOCBOOK
9954
9955# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
9956# ----------------
9957# Minimum version: 1.5.0
9958# Minimum version for optional DEFAULT argument: 1.11.0
9959#
9960# Documentation tools are not always available on all platforms and sometimes
9961# not at the appropriate level. This macro enables a module to test for the
9962# presence of the tool and obtain it's path in separate variables. Coupled with
9963# the --with-xmlto option, it allows maximum flexibilty in making decisions
9964# as whether or not to use the xmlto package. When DEFAULT is not specified,
9965# --with-xmlto assumes 'auto'.
9966#
9967# Interface to module:
9968# HAVE_XMLTO: 	used in makefiles to conditionally generate documentation
9969# XMLTO:	returns the path of the xmlto program found
9970#		returns the path set by the user in the environment
9971# --with-xmlto:	'yes' user instructs the module to use xmlto
9972#		'no' user instructs the module not to use xmlto
9973#
9974# Added in version 1.10.0
9975# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
9976#                  xmlto for text output requires either lynx, links, or w3m browsers
9977#
9978# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
9979#
9980AC_DEFUN([XORG_WITH_XMLTO],[
9981AC_ARG_VAR([XMLTO], [Path to xmlto command])
9982m4_define([_defopt], m4_default([$2], [auto]))
9983AC_ARG_WITH(xmlto,
9984	AS_HELP_STRING([--with-xmlto],
9985	   [Use xmlto to regenerate documentation (default: ]_defopt[)]),
9986	   [use_xmlto=$withval], [use_xmlto=]_defopt)
9987m4_undefine([_defopt])
9988
9989if test "x$use_xmlto" = x"auto"; then
9990   AC_PATH_PROG([XMLTO], [xmlto])
9991   if test "x$XMLTO" = "x"; then
9992        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
9993	have_xmlto=no
9994   else
9995        have_xmlto=yes
9996   fi
9997elif test "x$use_xmlto" = x"yes" ; then
9998   AC_PATH_PROG([XMLTO], [xmlto])
9999   if test "x$XMLTO" = "x"; then
10000        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
10001   fi
10002   have_xmlto=yes
10003elif test "x$use_xmlto" = x"no" ; then
10004   if test "x$XMLTO" != "x"; then
10005      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
10006   fi
10007   have_xmlto=no
10008else
10009   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
10010fi
10011
10012# Test for a minimum version of xmlto, if provided.
10013m4_ifval([$1],
10014[if test "$have_xmlto" = yes; then
10015    # scrape the xmlto version
10016    AC_MSG_CHECKING([the xmlto version])
10017    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
10018    AC_MSG_RESULT([$xmlto_version])
10019    AS_VERSION_COMPARE([$xmlto_version], [$1],
10020        [if test "x$use_xmlto" = xauto; then
10021            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
10022            have_xmlto=no
10023        else
10024            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
10025        fi])
10026fi])
10027
10028# Test for the ability of xmlto to generate a text target
10029have_xmlto_text=no
10030cat > conftest.xml << "EOF"
10031EOF
10032AS_IF([test "$have_xmlto" = yes],
10033      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
10034             [have_xmlto_text=yes],
10035             [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
10036rm -f conftest.xml
10037AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
10038AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
10039]) # XORG_WITH_XMLTO
10040
10041# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT])
10042# --------------------------------------------
10043# Minimum version: 1.12.0
10044# Minimum version for optional DEFAULT argument: 1.12.0
10045#
10046# XSLT (Extensible Stylesheet Language Transformations) is a declarative,
10047# XML-based language used for the transformation of XML documents.
10048# The xsltproc command line tool is for applying XSLT stylesheets to XML documents.
10049# It is used under the cover by xmlto to generate html files from DocBook/XML.
10050# The XSLT processor is often used as a standalone tool for transformations.
10051# It should not be assumed that this tool is used only to work with documnetation.
10052# When DEFAULT is not specified, --with-xsltproc assumes 'auto'.
10053#
10054# Interface to module:
10055# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation
10056# XSLTPROC:	 returns the path of the xsltproc program found
10057#		 returns the path set by the user in the environment
10058# --with-xsltproc: 'yes' user instructs the module to use xsltproc
10059#		  'no' user instructs the module not to use xsltproc
10060# have_xsltproc: returns yes if xsltproc found in PATH or no
10061#
10062# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path.
10063#
10064AC_DEFUN([XORG_WITH_XSLTPROC],[
10065AC_ARG_VAR([XSLTPROC], [Path to xsltproc command])
10066# Preserves the interface, should it be implemented later
10067m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])])
10068m4_define([_defopt], m4_default([$2], [auto]))
10069AC_ARG_WITH(xsltproc,
10070	AS_HELP_STRING([--with-xsltproc],
10071	   [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]),
10072	   [use_xsltproc=$withval], [use_xsltproc=]_defopt)
10073m4_undefine([_defopt])
10074
10075if test "x$use_xsltproc" = x"auto"; then
10076   AC_PATH_PROG([XSLTPROC], [xsltproc])
10077   if test "x$XSLTPROC" = "x"; then
10078        AC_MSG_WARN([xsltproc not found - cannot transform XML documents])
10079	have_xsltproc=no
10080   else
10081        have_xsltproc=yes
10082   fi
10083elif test "x$use_xsltproc" = x"yes" ; then
10084   AC_PATH_PROG([XSLTPROC], [xsltproc])
10085   if test "x$XSLTPROC" = "x"; then
10086        AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH])
10087   fi
10088   have_xsltproc=yes
10089elif test "x$use_xsltproc" = x"no" ; then
10090   if test "x$XSLTPROC" != "x"; then
10091      AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified])
10092   fi
10093   have_xsltproc=no
10094else
10095   AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no'])
10096fi
10097
10098AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes])
10099]) # XORG_WITH_XSLTPROC
10100
10101# XORG_WITH_PERL([MIN-VERSION], [DEFAULT])
10102# ----------------------------------------
10103# Minimum version: 1.15.0
10104#
10105# PERL (Practical Extraction and Report Language) is a language optimized for
10106# scanning arbitrary text files, extracting information from those text files,
10107# and printing reports based on that information.
10108#
10109# When DEFAULT is not specified, --with-perl assumes 'auto'.
10110#
10111# Interface to module:
10112# HAVE_PERL: used in makefiles to conditionally scan text files
10113# PERL:	     returns the path of the perl program found
10114#	     returns the path set by the user in the environment
10115# --with-perl: 'yes' user instructs the module to use perl
10116#	       'no' user instructs the module not to use perl
10117# have_perl: returns yes if perl found in PATH or no
10118#
10119# If the user sets the value of PERL, AC_PATH_PROG skips testing the path.
10120#
10121AC_DEFUN([XORG_WITH_PERL],[
10122AC_ARG_VAR([PERL], [Path to perl command])
10123# Preserves the interface, should it be implemented later
10124m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])])
10125m4_define([_defopt], m4_default([$2], [auto]))
10126AC_ARG_WITH(perl,
10127	AS_HELP_STRING([--with-perl],
10128	   [Use perl for extracting information from files (default: ]_defopt[)]),
10129	   [use_perl=$withval], [use_perl=]_defopt)
10130m4_undefine([_defopt])
10131
10132if test "x$use_perl" = x"auto"; then
10133   AC_PATH_PROG([PERL], [perl])
10134   if test "x$PERL" = "x"; then
10135        AC_MSG_WARN([perl not found - cannot extract information and report])
10136	have_perl=no
10137   else
10138        have_perl=yes
10139   fi
10140elif test "x$use_perl" = x"yes" ; then
10141   AC_PATH_PROG([PERL], [perl])
10142   if test "x$PERL" = "x"; then
10143        AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH])
10144   fi
10145   have_perl=yes
10146elif test "x$use_perl" = x"no" ; then
10147   if test "x$PERL" != "x"; then
10148      AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified])
10149   fi
10150   have_perl=no
10151else
10152   AC_MSG_ERROR([--with-perl expects 'yes' or 'no'])
10153fi
10154
10155AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
10156]) # XORG_WITH_PERL
10157
10158# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
10159# ----------------
10160# Minimum version: 1.5.0
10161# Minimum version for optional DEFAULT argument: 1.11.0
10162#
10163# Documentation tools are not always available on all platforms and sometimes
10164# not at the appropriate level. This macro enables a module to test for the
10165# presence of the tool and obtain it's path in separate variables. Coupled with
10166# the --with-asciidoc option, it allows maximum flexibilty in making decisions
10167# as whether or not to use the asciidoc package. When DEFAULT is not specified,
10168# --with-asciidoc assumes 'auto'.
10169#
10170# Interface to module:
10171# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
10172# ASCIIDOC:	 returns the path of the asciidoc program found
10173#		 returns the path set by the user in the environment
10174# --with-asciidoc: 'yes' user instructs the module to use asciidoc
10175#		  'no' user instructs the module not to use asciidoc
10176#
10177# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
10178#
10179AC_DEFUN([XORG_WITH_ASCIIDOC],[
10180AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
10181m4_define([_defopt], m4_default([$2], [auto]))
10182AC_ARG_WITH(asciidoc,
10183	AS_HELP_STRING([--with-asciidoc],
10184	   [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
10185	   [use_asciidoc=$withval], [use_asciidoc=]_defopt)
10186m4_undefine([_defopt])
10187
10188if test "x$use_asciidoc" = x"auto"; then
10189   AC_PATH_PROG([ASCIIDOC], [asciidoc])
10190   if test "x$ASCIIDOC" = "x"; then
10191        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
10192	have_asciidoc=no
10193   else
10194        have_asciidoc=yes
10195   fi
10196elif test "x$use_asciidoc" = x"yes" ; then
10197   AC_PATH_PROG([ASCIIDOC], [asciidoc])
10198   if test "x$ASCIIDOC" = "x"; then
10199        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
10200   fi
10201   have_asciidoc=yes
10202elif test "x$use_asciidoc" = x"no" ; then
10203   if test "x$ASCIIDOC" != "x"; then
10204      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
10205   fi
10206   have_asciidoc=no
10207else
10208   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
10209fi
10210m4_ifval([$1],
10211[if test "$have_asciidoc" = yes; then
10212    # scrape the asciidoc version
10213    AC_MSG_CHECKING([the asciidoc version])
10214    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
10215    AC_MSG_RESULT([$asciidoc_version])
10216    AS_VERSION_COMPARE([$asciidoc_version], [$1],
10217        [if test "x$use_asciidoc" = xauto; then
10218            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
10219            have_asciidoc=no
10220        else
10221            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
10222        fi])
10223fi])
10224AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
10225]) # XORG_WITH_ASCIIDOC
10226
10227# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
10228# --------------------------------
10229# Minimum version: 1.5.0
10230# Minimum version for optional DEFAULT argument: 1.11.0
10231#
10232# Documentation tools are not always available on all platforms and sometimes
10233# not at the appropriate level. This macro enables a module to test for the
10234# presence of the tool and obtain it's path in separate variables. Coupled with
10235# the --with-doxygen option, it allows maximum flexibilty in making decisions
10236# as whether or not to use the doxygen package. When DEFAULT is not specified,
10237# --with-doxygen assumes 'auto'.
10238#
10239# Interface to module:
10240# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
10241# DOXYGEN:	 returns the path of the doxygen program found
10242#		 returns the path set by the user in the environment
10243# --with-doxygen: 'yes' user instructs the module to use doxygen
10244#		  'no' user instructs the module not to use doxygen
10245#
10246# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
10247#
10248AC_DEFUN([XORG_WITH_DOXYGEN],[
10249AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
10250m4_define([_defopt], m4_default([$2], [auto]))
10251AC_ARG_WITH(doxygen,
10252	AS_HELP_STRING([--with-doxygen],
10253	   [Use doxygen to regenerate documentation (default: ]_defopt[)]),
10254	   [use_doxygen=$withval], [use_doxygen=]_defopt)
10255m4_undefine([_defopt])
10256
10257if test "x$use_doxygen" = x"auto"; then
10258   AC_PATH_PROG([DOXYGEN], [doxygen])
10259   if test "x$DOXYGEN" = "x"; then
10260        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
10261	have_doxygen=no
10262   else
10263        have_doxygen=yes
10264   fi
10265elif test "x$use_doxygen" = x"yes" ; then
10266   AC_PATH_PROG([DOXYGEN], [doxygen])
10267   if test "x$DOXYGEN" = "x"; then
10268        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
10269   fi
10270   have_doxygen=yes
10271elif test "x$use_doxygen" = x"no" ; then
10272   if test "x$DOXYGEN" != "x"; then
10273      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
10274   fi
10275   have_doxygen=no
10276else
10277   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
10278fi
10279m4_ifval([$1],
10280[if test "$have_doxygen" = yes; then
10281    # scrape the doxygen version
10282    AC_MSG_CHECKING([the doxygen version])
10283    doxygen_version=`$DOXYGEN --version 2>/dev/null`
10284    AC_MSG_RESULT([$doxygen_version])
10285    AS_VERSION_COMPARE([$doxygen_version], [$1],
10286        [if test "x$use_doxygen" = xauto; then
10287            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
10288            have_doxygen=no
10289        else
10290            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
10291        fi])
10292fi])
10293AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
10294]) # XORG_WITH_DOXYGEN
10295
10296# XORG_WITH_GROFF([DEFAULT])
10297# ----------------
10298# Minimum version: 1.6.0
10299# Minimum version for optional DEFAULT argument: 1.11.0
10300#
10301# Documentation tools are not always available on all platforms and sometimes
10302# not at the appropriate level. This macro enables a module to test for the
10303# presence of the tool and obtain it's path in separate variables. Coupled with
10304# the --with-groff option, it allows maximum flexibilty in making decisions
10305# as whether or not to use the groff package. When DEFAULT is not specified,
10306# --with-groff assumes 'auto'.
10307#
10308# Interface to module:
10309# HAVE_GROFF:	 used in makefiles to conditionally generate documentation
10310# HAVE_GROFF_MM: the memorandum macros (-mm) package
10311# HAVE_GROFF_MS: the -ms macros package
10312# GROFF:	 returns the path of the groff program found
10313#		 returns the path set by the user in the environment
10314# --with-groff:	 'yes' user instructs the module to use groff
10315#		 'no' user instructs the module not to use groff
10316#
10317# Added in version 1.9.0:
10318# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
10319#		   pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
10320#		   psselect from the psutils package.
10321#		   the ghostcript package. Refer to the grohtml man pages
10322#
10323# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
10324#
10325# OS and distros often splits groff in a basic and full package, the former
10326# having the groff program and the later having devices, fonts and macros
10327# Checking for the groff executable is not enough.
10328#
10329# If macros are missing, we cannot assume that groff is useless, so we don't
10330# unset HAVE_GROFF or GROFF env variables.
10331# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
10332#
10333AC_DEFUN([XORG_WITH_GROFF],[
10334AC_ARG_VAR([GROFF], [Path to groff command])
10335m4_define([_defopt], m4_default([$1], [auto]))
10336AC_ARG_WITH(groff,
10337	AS_HELP_STRING([--with-groff],
10338	   [Use groff to regenerate documentation (default: ]_defopt[)]),
10339	   [use_groff=$withval], [use_groff=]_defopt)
10340m4_undefine([_defopt])
10341
10342if test "x$use_groff" = x"auto"; then
10343   AC_PATH_PROG([GROFF], [groff])
10344   if test "x$GROFF" = "x"; then
10345        AC_MSG_WARN([groff not found - documentation targets will be skipped])
10346	have_groff=no
10347   else
10348        have_groff=yes
10349   fi
10350elif test "x$use_groff" = x"yes" ; then
10351   AC_PATH_PROG([GROFF], [groff])
10352   if test "x$GROFF" = "x"; then
10353        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
10354   fi
10355   have_groff=yes
10356elif test "x$use_groff" = x"no" ; then
10357   if test "x$GROFF" != "x"; then
10358      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
10359   fi
10360   have_groff=no
10361else
10362   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
10363fi
10364
10365# We have groff, test for the presence of the macro packages
10366if test "x$have_groff" = x"yes"; then
10367    AC_MSG_CHECKING([for ${GROFF} -ms macros])
10368    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
10369        groff_ms_works=yes
10370    else
10371        groff_ms_works=no
10372    fi
10373    AC_MSG_RESULT([$groff_ms_works])
10374    AC_MSG_CHECKING([for ${GROFF} -mm macros])
10375    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
10376        groff_mm_works=yes
10377    else
10378        groff_mm_works=no
10379    fi
10380    AC_MSG_RESULT([$groff_mm_works])
10381fi
10382
10383# We have groff, test for HTML dependencies, one command per package
10384if test "x$have_groff" = x"yes"; then
10385   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
10386   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
10387   AC_PATH_PROG(PSSELECT_PATH, [psselect])
10388   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
10389      have_groff_html=yes
10390   else
10391      have_groff_html=no
10392      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
10393   fi
10394fi
10395
10396# Set Automake conditionals for Makefiles
10397AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
10398AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
10399AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
10400AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
10401]) # XORG_WITH_GROFF
10402
10403# XORG_WITH_FOP([MIN-VERSION], [DEFAULT])
10404# ---------------------------------------
10405# Minimum version: 1.6.0
10406# Minimum version for optional DEFAULT argument: 1.11.0
10407# Minimum version for optional MIN-VERSION argument: 1.15.0
10408#
10409# Documentation tools are not always available on all platforms and sometimes
10410# not at the appropriate level. This macro enables a module to test for the
10411# presence of the tool and obtain it's path in separate variables. Coupled with
10412# the --with-fop option, it allows maximum flexibilty in making decisions
10413# as whether or not to use the fop package. When DEFAULT is not specified,
10414# --with-fop assumes 'auto'.
10415#
10416# Interface to module:
10417# HAVE_FOP: 	used in makefiles to conditionally generate documentation
10418# FOP:	 	returns the path of the fop program found
10419#		returns the path set by the user in the environment
10420# --with-fop: 	'yes' user instructs the module to use fop
10421#		'no' user instructs the module not to use fop
10422#
10423# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
10424#
10425AC_DEFUN([XORG_WITH_FOP],[
10426AC_ARG_VAR([FOP], [Path to fop command])
10427m4_define([_defopt], m4_default([$2], [auto]))
10428AC_ARG_WITH(fop,
10429	AS_HELP_STRING([--with-fop],
10430	   [Use fop to regenerate documentation (default: ]_defopt[)]),
10431	   [use_fop=$withval], [use_fop=]_defopt)
10432m4_undefine([_defopt])
10433
10434if test "x$use_fop" = x"auto"; then
10435   AC_PATH_PROG([FOP], [fop])
10436   if test "x$FOP" = "x"; then
10437        AC_MSG_WARN([fop not found - documentation targets will be skipped])
10438	have_fop=no
10439   else
10440        have_fop=yes
10441   fi
10442elif test "x$use_fop" = x"yes" ; then
10443   AC_PATH_PROG([FOP], [fop])
10444   if test "x$FOP" = "x"; then
10445        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
10446   fi
10447   have_fop=yes
10448elif test "x$use_fop" = x"no" ; then
10449   if test "x$FOP" != "x"; then
10450      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
10451   fi
10452   have_fop=no
10453else
10454   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
10455fi
10456
10457# Test for a minimum version of fop, if provided.
10458m4_ifval([$1],
10459[if test "$have_fop" = yes; then
10460    # scrape the fop version
10461    AC_MSG_CHECKING([for fop minimum version])
10462    fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3`
10463    AC_MSG_RESULT([$fop_version])
10464    AS_VERSION_COMPARE([$fop_version], [$1],
10465        [if test "x$use_fop" = xauto; then
10466            AC_MSG_WARN([fop version $fop_version found, but $1 needed])
10467            have_fop=no
10468        else
10469            AC_MSG_ERROR([fop version $fop_version found, but $1 needed])
10470        fi])
10471fi])
10472AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
10473]) # XORG_WITH_FOP
10474
10475# XORG_WITH_PS2PDF([DEFAULT])
10476# ----------------
10477# Minimum version: 1.6.0
10478# Minimum version for optional DEFAULT argument: 1.11.0
10479#
10480# Documentation tools are not always available on all platforms and sometimes
10481# not at the appropriate level. This macro enables a module to test for the
10482# presence of the tool and obtain it's path in separate variables. Coupled with
10483# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
10484# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
10485# --with-ps2pdf assumes 'auto'.
10486#
10487# Interface to module:
10488# HAVE_PS2PDF: 	used in makefiles to conditionally generate documentation
10489# PS2PDF:	returns the path of the ps2pdf program found
10490#		returns the path set by the user in the environment
10491# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
10492#		 'no' user instructs the module not to use ps2pdf
10493#
10494# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
10495#
10496AC_DEFUN([XORG_WITH_PS2PDF],[
10497AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
10498m4_define([_defopt], m4_default([$1], [auto]))
10499AC_ARG_WITH(ps2pdf,
10500	AS_HELP_STRING([--with-ps2pdf],
10501	   [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
10502	   [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
10503m4_undefine([_defopt])
10504
10505if test "x$use_ps2pdf" = x"auto"; then
10506   AC_PATH_PROG([PS2PDF], [ps2pdf])
10507   if test "x$PS2PDF" = "x"; then
10508        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
10509	have_ps2pdf=no
10510   else
10511        have_ps2pdf=yes
10512   fi
10513elif test "x$use_ps2pdf" = x"yes" ; then
10514   AC_PATH_PROG([PS2PDF], [ps2pdf])
10515   if test "x$PS2PDF" = "x"; then
10516        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
10517   fi
10518   have_ps2pdf=yes
10519elif test "x$use_ps2pdf" = x"no" ; then
10520   if test "x$PS2PDF" != "x"; then
10521      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
10522   fi
10523   have_ps2pdf=no
10524else
10525   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
10526fi
10527AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
10528]) # XORG_WITH_PS2PDF
10529
10530# XORG_ENABLE_DOCS (enable_docs=yes)
10531# ----------------
10532# Minimum version: 1.6.0
10533#
10534# Documentation tools are not always available on all platforms and sometimes
10535# not at the appropriate level. This macro enables a builder to skip all
10536# documentation targets except traditional man pages.
10537# Combined with the specific tool checking macros XORG_WITH_*, it provides
10538# maximum flexibilty in controlling documentation building.
10539# Refer to:
10540# XORG_WITH_XMLTO         --with-xmlto
10541# XORG_WITH_ASCIIDOC      --with-asciidoc
10542# XORG_WITH_DOXYGEN       --with-doxygen
10543# XORG_WITH_FOP           --with-fop
10544# XORG_WITH_GROFF         --with-groff
10545# XORG_WITH_PS2PDF        --with-ps2pdf
10546#
10547# Interface to module:
10548# ENABLE_DOCS: 	  used in makefiles to conditionally generate documentation
10549# --enable-docs: 'yes' user instructs the module to generate docs
10550#		 'no' user instructs the module not to generate docs
10551# parm1:	specify the default value, yes or no.
10552#
10553AC_DEFUN([XORG_ENABLE_DOCS],[
10554m4_define([docs_default], m4_default([$1], [yes]))
10555AC_ARG_ENABLE(docs,
10556	AS_HELP_STRING([--enable-docs],
10557	   [Enable building the documentation (default: ]docs_default[)]),
10558	   [build_docs=$enableval], [build_docs=]docs_default)
10559m4_undefine([docs_default])
10560AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
10561AC_MSG_CHECKING([whether to build documentation])
10562AC_MSG_RESULT([$build_docs])
10563]) # XORG_ENABLE_DOCS
10564
10565# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
10566# ----------------
10567# Minimum version: 1.6.0
10568#
10569# This macro enables a builder to skip all developer documentation.
10570# Combined with the specific tool checking macros XORG_WITH_*, it provides
10571# maximum flexibilty in controlling documentation building.
10572# Refer to:
10573# XORG_WITH_XMLTO         --with-xmlto
10574# XORG_WITH_ASCIIDOC      --with-asciidoc
10575# XORG_WITH_DOXYGEN       --with-doxygen
10576# XORG_WITH_FOP           --with-fop
10577# XORG_WITH_GROFF         --with-groff
10578# XORG_WITH_PS2PDF        --with-ps2pdf
10579#
10580# Interface to module:
10581# ENABLE_DEVEL_DOCS:	used in makefiles to conditionally generate developer docs
10582# --enable-devel-docs:	'yes' user instructs the module to generate developer docs
10583#			'no' user instructs the module not to generate developer docs
10584# parm1:		specify the default value, yes or no.
10585#
10586AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
10587m4_define([devel_default], m4_default([$1], [yes]))
10588AC_ARG_ENABLE(devel-docs,
10589	AS_HELP_STRING([--enable-devel-docs],
10590	   [Enable building the developer documentation (default: ]devel_default[)]),
10591	   [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
10592m4_undefine([devel_default])
10593AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
10594AC_MSG_CHECKING([whether to build developer documentation])
10595AC_MSG_RESULT([$build_devel_docs])
10596]) # XORG_ENABLE_DEVEL_DOCS
10597
10598# XORG_ENABLE_SPECS (enable_specs=yes)
10599# ----------------
10600# Minimum version: 1.6.0
10601#
10602# This macro enables a builder to skip all functional specification targets.
10603# Combined with the specific tool checking macros XORG_WITH_*, it provides
10604# maximum flexibilty in controlling documentation building.
10605# Refer to:
10606# XORG_WITH_XMLTO         --with-xmlto
10607# XORG_WITH_ASCIIDOC      --with-asciidoc
10608# XORG_WITH_DOXYGEN       --with-doxygen
10609# XORG_WITH_FOP           --with-fop
10610# XORG_WITH_GROFF         --with-groff
10611# XORG_WITH_PS2PDF        --with-ps2pdf
10612#
10613# Interface to module:
10614# ENABLE_SPECS:		used in makefiles to conditionally generate specs
10615# --enable-specs:	'yes' user instructs the module to generate specs
10616#			'no' user instructs the module not to generate specs
10617# parm1:		specify the default value, yes or no.
10618#
10619AC_DEFUN([XORG_ENABLE_SPECS],[
10620m4_define([spec_default], m4_default([$1], [yes]))
10621AC_ARG_ENABLE(specs,
10622	AS_HELP_STRING([--enable-specs],
10623	   [Enable building the specs (default: ]spec_default[)]),
10624	   [build_specs=$enableval], [build_specs=]spec_default)
10625m4_undefine([spec_default])
10626AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
10627AC_MSG_CHECKING([whether to build functional specifications])
10628AC_MSG_RESULT([$build_specs])
10629]) # XORG_ENABLE_SPECS
10630
10631# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto)
10632# ----------------------------------------------
10633# Minimum version: 1.13.0
10634#
10635# This macro enables a builder to enable/disable unit testing
10636# It makes no assumption about the test cases implementation
10637# Test cases may or may not use Automake "Support for test suites"
10638# They may or may not use the software utility library GLib
10639#
10640# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL
10641# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib.
10642# The variable enable_unit_tests is used by other macros in this file.
10643#
10644# Interface to module:
10645# ENABLE_UNIT_TESTS:	used in makefiles to conditionally build tests
10646# enable_unit_tests:    used in configure.ac for additional configuration
10647# --enable-unit-tests:	'yes' user instructs the module to build tests
10648#			'no' user instructs the module not to build tests
10649# parm1:		specify the default value, yes or no.
10650#
10651AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[
10652AC_BEFORE([$0], [XORG_WITH_GLIB])
10653AC_BEFORE([$0], [XORG_LD_WRAP])
10654m4_define([_defopt], m4_default([$1], [auto]))
10655AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests],
10656	[Enable building unit test cases (default: ]_defopt[)]),
10657	[enable_unit_tests=$enableval], [enable_unit_tests=]_defopt)
10658m4_undefine([_defopt])
10659AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno])
10660AC_MSG_CHECKING([whether to build unit test cases])
10661AC_MSG_RESULT([$enable_unit_tests])
10662]) # XORG_ENABLE_UNIT_TESTS
10663
10664# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
10665# ----------------------------------------
10666# Minimum version: 1.13.0
10667#
10668# GLib is a library which provides advanced data structures and functions.
10669# This macro enables a module to test for the presence of Glib.
10670#
10671# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
10672# Otherwise the value of $enable_unit_tests is blank.
10673#
10674# Interface to module:
10675# HAVE_GLIB: used in makefiles to conditionally build targets
10676# with_glib: used in configure.ac to know if GLib has been found
10677# --with-glib:	'yes' user instructs the module to use glib
10678#		'no' user instructs the module not to use glib
10679#
10680AC_DEFUN([XORG_WITH_GLIB],[
10681AC_REQUIRE([PKG_PROG_PKG_CONFIG])
10682m4_define([_defopt], m4_default([$2], [auto]))
10683AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib],
10684	[Use GLib library for unit testing (default: ]_defopt[)]),
10685	[with_glib=$withval], [with_glib=]_defopt)
10686m4_undefine([_defopt])
10687
10688have_glib=no
10689# Do not probe GLib if user explicitly disabled unit testing
10690if test "x$enable_unit_tests" != x"no"; then
10691  # Do not probe GLib if user explicitly disabled it
10692  if test "x$with_glib" != x"no"; then
10693    m4_ifval(
10694      [$1],
10695      [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])],
10696      [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])]
10697    )
10698  fi
10699fi
10700
10701# Not having GLib when unit testing has been explicitly requested is an error
10702if test "x$enable_unit_tests" = x"yes"; then
10703  if test "x$have_glib" = x"no"; then
10704    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
10705  fi
10706fi
10707
10708# Having unit testing disabled when GLib has been explicitly requested is an error
10709if test "x$enable_unit_tests" = x"no"; then
10710  if test "x$with_glib" = x"yes"; then
10711    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
10712  fi
10713fi
10714
10715# Not having GLib when it has been explicitly requested is an error
10716if test "x$with_glib" = x"yes"; then
10717  if test "x$have_glib" = x"no"; then
10718    AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found])
10719  fi
10720fi
10721
10722AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes])
10723]) # XORG_WITH_GLIB
10724
10725# XORG_LD_WRAP
10726# ------------
10727# Minimum version: 1.13.0
10728#
10729# Check if linker supports -wrap, passed via compiler flags
10730#
10731# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing.
10732# Otherwise the value of $enable_unit_tests is blank.
10733#
10734AC_DEFUN([XORG_LD_WRAP],[
10735XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no])
10736# Not having ld wrap when unit testing has been explicitly requested is an error
10737if test "x$enable_unit_tests" = x"yes"; then
10738  if test "x$have_ld_wrap" = x"no"; then
10739    AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available])
10740  fi
10741fi
10742AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes])
10743#
10744]) # XORG_LD_WRAP
10745
10746# XORG_CHECK_LINKER_FLAGS
10747# -----------------------
10748# SYNOPSIS
10749#
10750#   XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE])
10751#
10752# DESCRIPTION
10753#
10754#   Check whether the given linker FLAGS work with the current language's
10755#   linker, or whether they give an error.
10756#
10757#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
10758#   success/failure.
10759#
10760#   NOTE: Based on AX_CHECK_COMPILER_FLAGS.
10761#
10762# LICENSE
10763#
10764#   Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org>
10765#   Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
10766#   Copyright (c) 2009 Matteo Frigo
10767#
10768#   This program is free software: you can redistribute it and/or modify it
10769#   under the terms of the GNU General Public License as published by the
10770#   Free Software Foundation, either version 3 of the License, or (at your
10771#   option) any later version.
10772#
10773#   This program is distributed in the hope that it will be useful, but
10774#   WITHOUT ANY WARRANTY; without even the implied warranty of
10775#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
10776#   Public License for more details.
10777#
10778#   You should have received a copy of the GNU General Public License along
10779#   with this program. If not, see <http://www.gnu.org/licenses/>.
10780#
10781#   As a special exception, the respective Autoconf Macro's copyright owner
10782#   gives unlimited permission to copy, distribute and modify the configure
10783#   scripts that are the output of Autoconf when processing the Macro. You
10784#   need not follow the terms of the GNU General Public License when using
10785#   or distributing such scripts, even though portions of the text of the
10786#   Macro appear in them. The GNU General Public License (GPL) does govern
10787#   all other use of the material that constitutes the Autoconf Macro.
10788#
10789#   This special exception to the GPL applies to versions of the Autoconf
10790#   Macro released by the Autoconf Archive. When you make and distribute a
10791#   modified version of the Autoconf Macro, you may extend this special
10792#   exception to the GPL to apply to your modified version as well.#
10793AC_DEFUN([XORG_CHECK_LINKER_FLAGS],
10794[AC_MSG_CHECKING([whether the linker accepts $1])
10795dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
10796AS_LITERAL_IF([$1],
10797  [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [
10798      ax_save_FLAGS=$LDFLAGS
10799      LDFLAGS="$1"
10800      AC_LINK_IFELSE([AC_LANG_PROGRAM()],
10801        AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
10802        AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
10803      LDFLAGS=$ax_save_FLAGS])],
10804  [ax_save_FLAGS=$LDFLAGS
10805   LDFLAGS="$1"
10806   AC_LINK_IFELSE([AC_LANG_PROGRAM()],
10807     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
10808     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
10809   LDFLAGS=$ax_save_FLAGS])
10810eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1])
10811AC_MSG_RESULT($xorg_check_linker_flags)
10812if test "x$xorg_check_linker_flags" = xyes; then
10813	m4_default([$2], :)
10814else
10815	m4_default([$3], :)
10816fi
10817]) # XORG_CHECK_LINKER_FLAGS
10818
10819# XORG_CHECK_MALLOC_ZERO
10820# ----------------------
10821# Minimum version: 1.0.0
10822#
10823# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
10824# malloc(0) returns NULL.  Packages should add one of these cflags to
10825# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
10826AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
10827AC_ARG_ENABLE(malloc0returnsnull,
10828	AS_HELP_STRING([--enable-malloc0returnsnull],
10829		       [malloc(0) returns NULL (default: auto)]),
10830	[MALLOC_ZERO_RETURNS_NULL=$enableval],
10831	[MALLOC_ZERO_RETURNS_NULL=auto])
10832
10833AC_MSG_CHECKING([whether malloc(0) returns NULL])
10834if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
10835	AC_RUN_IFELSE([AC_LANG_PROGRAM([
10836#include <stdlib.h>
10837],[
10838    char *m0, *r0, *c0, *p;
10839    m0 = malloc(0);
10840    p = malloc(10);
10841    r0 = realloc(p,0);
10842    c0 = calloc(0,10);
10843    exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
10844])],
10845		[MALLOC_ZERO_RETURNS_NULL=yes],
10846		[MALLOC_ZERO_RETURNS_NULL=no],
10847		[MALLOC_ZERO_RETURNS_NULL=yes])
10848fi
10849AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
10850
10851if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
10852	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
10853	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
10854	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
10855else
10856	MALLOC_ZERO_CFLAGS=""
10857	XMALLOC_ZERO_CFLAGS=""
10858	XTMALLOC_ZERO_CFLAGS=""
10859fi
10860
10861AC_SUBST([MALLOC_ZERO_CFLAGS])
10862AC_SUBST([XMALLOC_ZERO_CFLAGS])
10863AC_SUBST([XTMALLOC_ZERO_CFLAGS])
10864]) # XORG_CHECK_MALLOC_ZERO
10865
10866# XORG_WITH_LINT()
10867# ----------------
10868# Minimum version: 1.1.0
10869#
10870# This macro enables the use of a tool that flags some suspicious and
10871# non-portable constructs (likely to be bugs) in C language source code.
10872# It will attempt to locate the tool and use appropriate options.
10873# There are various lint type tools on different platforms.
10874#
10875# Interface to module:
10876# LINT:		returns the path to the tool found on the platform
10877#		or the value set to LINT on the configure cmd line
10878#		also an Automake conditional
10879# LINT_FLAGS:	an Automake variable with appropriate flags
10880#
10881# --with-lint:	'yes' user instructs the module to use lint
10882#		'no' user instructs the module not to use lint (default)
10883#
10884# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
10885# If the user sets the value of LINT_FLAGS, they are used verbatim.
10886#
10887AC_DEFUN([XORG_WITH_LINT],[
10888
10889AC_ARG_VAR([LINT], [Path to a lint-style command])
10890AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
10891AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
10892		[Use a lint-style source code checker (default: disabled)])],
10893		[use_lint=$withval], [use_lint=no])
10894
10895# Obtain platform specific info like program name and options
10896# The lint program on FreeBSD and NetBSD is different from the one on Solaris
10897case $host_os in
10898  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
10899	lint_name=splint
10900	lint_options="-badflag"
10901	;;
10902  *freebsd* | *netbsd*)
10903	lint_name=lint
10904	lint_options="-u -b"
10905	;;
10906  *solaris*)
10907	lint_name=lint
10908	lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
10909	;;
10910esac
10911
10912# Test for the presence of the program (either guessed by the code or spelled out by the user)
10913if test "x$use_lint" = x"yes" ; then
10914   AC_PATH_PROG([LINT], [$lint_name])
10915   if test "x$LINT" = "x"; then
10916        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
10917   fi
10918elif test "x$use_lint" = x"no" ; then
10919   if test "x$LINT" != "x"; then
10920      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
10921   fi
10922else
10923   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
10924fi
10925
10926# User supplied flags override default flags
10927if test "x$LINT_FLAGS" != "x"; then
10928   lint_options=$LINT_FLAGS
10929fi
10930
10931AC_SUBST([LINT_FLAGS],[$lint_options])
10932AM_CONDITIONAL(LINT, [test "x$LINT" != x])
10933
10934]) # XORG_WITH_LINT
10935
10936# XORG_LINT_LIBRARY(LIBNAME)
10937# --------------------------
10938# Minimum version: 1.1.0
10939#
10940# Sets up flags for building lint libraries for checking programs that call
10941# functions in the library.
10942#
10943# Interface to module:
10944# LINTLIB		- Automake variable with the name of lint library file to make
10945# MAKE_LINT_LIB		- Automake conditional
10946#
10947# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
10948#			  - 'no' user instructs the module not to create a lint library (default)
10949
10950AC_DEFUN([XORG_LINT_LIBRARY],[
10951AC_REQUIRE([XORG_WITH_LINT])
10952AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
10953	[Create lint library (default: disabled)])],
10954	[make_lint_lib=$enableval], [make_lint_lib=no])
10955
10956if test "x$make_lint_lib" = x"yes" ; then
10957   LINTLIB=llib-l$1.ln
10958   if test "x$LINT" = "x"; then
10959        AC_MSG_ERROR([Cannot make lint library without --with-lint])
10960   fi
10961elif test "x$make_lint_lib" != x"no" ; then
10962   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
10963fi
10964
10965AC_SUBST(LINTLIB)
10966AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
10967
10968]) # XORG_LINT_LIBRARY
10969
10970# XORG_COMPILER_BRAND
10971# -------------------
10972# Minimum version: 1.14.0
10973#
10974# Checks for various brands of compilers and sets flags as appropriate:
10975#   GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes"
10976#   clang compiler - sets CLANGCC to "yes"
10977#   Intel compiler - sets INTELCC to "yes"
10978#   Sun/Oracle Solaris Studio cc - sets SUNCC to "yes"
10979#
10980AC_DEFUN([XORG_COMPILER_BRAND], [
10981AC_REQUIRE([AC_PROG_CC_C99])
10982AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"])
10983AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
10984AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
10985]) # XORG_COMPILER_BRAND
10986
10987# XORG_CWARNFLAGS
10988# ---------------
10989# Minimum version: 1.2.0
10990#
10991# Defines CWARNFLAGS to enable C compiler warnings.
10992#
10993AC_DEFUN([XORG_CWARNFLAGS], [
10994AC_REQUIRE([AC_PROG_CC_C99])
10995AC_REQUIRE([XORG_COMPILER_BRAND])
10996if  test "x$GCC" = xyes ; then
10997    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
10998-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
10999-Wbad-function-cast -Wformat=2"
11000    case `$CC -dumpversion` in
11001    3.4.* | 4.*)
11002	CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
11003	;;
11004    esac
11005else
11006    if test "x$SUNCC" = "xyes"; then
11007	CWARNFLAGS="-v"
11008    fi
11009fi
11010AC_SUBST(CWARNFLAGS)
11011]) # XORG_CWARNFLAGS
11012
11013# XORG_STRICT_OPTION
11014# -----------------------
11015# Minimum version: 1.3.0
11016#
11017# Add configure option to enable strict compilation flags, such as treating
11018# warnings as fatal errors.
11019# If --enable-strict-compilation is passed to configure, adds strict flags to
11020# $CWARNFLAGS.
11021#
11022# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or
11023# when strict compilation is unconditionally desired.
11024AC_DEFUN([XORG_STRICT_OPTION], [
11025# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
11026AC_REQUIRE([AC_PROG_CC_C99])
11027AC_REQUIRE([XORG_COMPILER_BRAND])
11028AC_REQUIRE([XORG_CWARNFLAGS])
11029
11030AC_ARG_ENABLE(strict-compilation,
11031			  AS_HELP_STRING([--enable-strict-compilation],
11032			  [Enable all warnings from compiler and make them errors (default: disabled)]),
11033			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
11034if test "x$GCC" = xyes ; then
11035    STRICT_CFLAGS="-pedantic -Werror"
11036    # Add -Werror=attributes if supported (gcc 4.2 & later)
11037    AC_MSG_CHECKING([if $CC supports -Werror=attributes])
11038    save_CFLAGS="$CFLAGS"
11039    CFLAGS="$CFLAGS $STRICT_CFLAGS -Werror=attributes"
11040    AC_COMPILE_IFELSE([AC_LANG_SOURCE([return 0;])],
11041		      [STRICT_CFLAGS="$STRICT_CFLAGS -Werror=attributes"
11042		       AC_MSG_RESULT([yes])],
11043		      [AC_MSG_RESULT([no])])
11044    CFLAGS="$save_CFLAGS"
11045elif test "x$SUNCC" = "xyes"; then
11046    STRICT_CFLAGS="-errwarn"
11047elif test "x$INTELCC" = "xyes"; then
11048    STRICT_CFLAGS="-Werror"
11049fi
11050if test "x$STRICT_COMPILE" = "xyes"; then
11051    CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
11052fi
11053AC_SUBST([STRICT_CFLAGS])
11054AC_SUBST([CWARNFLAGS])
11055]) # XORG_STRICT_OPTION
11056
11057# XORG_DEFAULT_OPTIONS
11058# --------------------
11059# Minimum version: 1.3.0
11060#
11061# Defines default options for X.Org modules.
11062#
11063AC_DEFUN([XORG_DEFAULT_OPTIONS], [
11064AC_REQUIRE([AC_PROG_INSTALL])
11065XORG_CWARNFLAGS
11066XORG_STRICT_OPTION
11067XORG_RELEASE_VERSION
11068XORG_CHANGELOG
11069XORG_INSTALL
11070XORG_MANPAGE_SECTIONS
11071m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
11072    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
11073]) # XORG_DEFAULT_OPTIONS
11074
11075# XORG_INSTALL()
11076# ----------------
11077# Minimum version: 1.4.0
11078#
11079# Defines the variable INSTALL_CMD as the command to copy
11080# INSTALL from $prefix/share/util-macros.
11081#
11082AC_DEFUN([XORG_INSTALL], [
11083AC_REQUIRE([PKG_PROG_PKG_CONFIG])
11084macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
11085INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
11086mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
11087|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
11088echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
11089AC_SUBST([INSTALL_CMD])
11090]) # XORG_INSTALL
11091dnl Copyright 2005 Red Hat, Inc
11092dnl
11093dnl Permission to use, copy, modify, distribute, and sell this software and its
11094dnl documentation for any purpose is hereby granted without fee, provided that
11095dnl the above copyright notice appear in all copies and that both that
11096dnl copyright notice and this permission notice appear in supporting
11097dnl documentation.
11098dnl
11099dnl The above copyright notice and this permission notice shall be included
11100dnl in all copies or substantial portions of the Software.
11101dnl
11102dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
11103dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
11104dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11105dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
11106dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
11107dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
11108dnl OTHER DEALINGS IN THE SOFTWARE.
11109dnl
11110dnl Except as contained in this notice, the name of the copyright holders shall
11111dnl not be used in advertising or otherwise to promote the sale, use or
11112dnl other dealings in this Software without prior written authorization
11113dnl from the copyright holders.
11114dnl
11115
11116# XORG_RELEASE_VERSION
11117# --------------------
11118# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
11119 
11120AC_DEFUN([XORG_RELEASE_VERSION],[
11121	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
11122		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
11123		[Major version of this package])
11124	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
11125	if test "x$PVM" = "x"; then
11126		PVM="0"
11127	fi
11128	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
11129		[$PVM],
11130		[Minor version of this package])
11131	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
11132	if test "x$PVP" = "x"; then
11133		PVP="0"
11134	fi
11135	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
11136		[$PVP],
11137		[Patch version of this package])
11138])
11139
11140# XORG_CHANGELOG()
11141# ----------------
11142# Minimum version: 1.2.0
11143#
11144# Defines the variable CHANGELOG_CMD as the command to generate
11145# ChangeLog from git.
11146#
11147#
11148AC_DEFUN([XORG_CHANGELOG], [
11149CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
11150mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
11151|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
11152echo 'git directory not found: installing possibly empty changelog.' >&2)"
11153AC_SUBST([CHANGELOG_CMD])
11154]) # XORG_CHANGELOG
11155
11156dnl
11157dnl Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
11158dnl
11159dnl Permission is hereby granted, free of charge, to any person obtaining a
11160dnl copy of this software and associated documentation files (the "Software"),
11161dnl to deal in the Software without restriction, including without limitation
11162dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
11163dnl and/or sell copies of the Software, and to permit persons to whom the
11164dnl Software is furnished to do so, subject to the following conditions:
11165dnl
11166dnl The above copyright notice and this permission notice (including the next
11167dnl paragraph) shall be included in all copies or substantial portions of the
11168dnl Software.
11169dnl
11170dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11171dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
11172dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
11173dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
11174dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
11175dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
11176dnl DEALINGS IN THE SOFTWARE.
11177dnl
11178
11179# XTRANS_TCP_FLAGS()
11180# ------------------
11181# Find needed libraries for TCP sockets, and check for IPv6 support
11182AC_DEFUN([XTRANS_TCP_FLAGS],[
11183 # SVR4 hides these in libraries other than libc
11184 AC_SEARCH_LIBS(socket, [socket])
11185 AC_SEARCH_LIBS(gethostbyname, [nsl])
11186 if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then
11187   AC_HAVE_LIBRARY([ws2_32])
11188 fi
11189
11190 # Needs to come after above checks for libsocket & libnsl for SVR4 systems
11191 AC_ARG_ENABLE(ipv6, 
11192	AC_HELP_STRING([--enable-ipv6],[Enable IPv6 support]),
11193	[IPV6CONN=$enableval], 
11194	[AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])])
11195 AC_MSG_CHECKING([if IPv6 support should be built])
11196 if test "$IPV6CONN" = "yes"; then
11197	AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections])
11198 fi
11199 AC_MSG_RESULT($IPV6CONN)
11200
11201 # 4.3BSD-Reno added a new member to struct sockaddr_in
11202 AC_CHECK_MEMBER([struct sockaddr_in.sin_len], 
11203	AC_DEFINE([BSD44SOCKETS],1,
11204 	    [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [
11205#include <sys/types.h>
11206#include <sys/socket.h>
11207#include <netinet/in.h>
11208 ])
11209
11210 # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc.
11211 AC_CHECK_TYPES([socklen_t], [], [], [
11212AC_INCLUDES_DEFAULT
11213#include <sys/socket.h>])
11214 
11215]) # XTRANS_TCP_FLAGS
11216
11217# XTRANS_CONNECTION_FLAGS()
11218# -------------------------
11219# Standard checks for which Xtrans transports to use by the Xorg packages
11220# that use Xtrans functions
11221AC_DEFUN([XTRANS_CONNECTION_FLAGS],[
11222 AC_REQUIRE([AC_CANONICAL_HOST])
11223 AC_REQUIRE([AC_TYPE_SIGNAL])
11224 [case $host_os in
11225	mingw*)	unixdef="no"   ;;
11226	*)	unixdef="yes"  ;;
11227 esac]
11228 AC_ARG_ENABLE(unix-transport,
11229	AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]),
11230	[UNIXCONN=$enableval], [UNIXCONN=$unixdef])
11231 AC_MSG_CHECKING([if Xtrans should support UNIX socket connections])
11232 if test "$UNIXCONN" = "yes"; then
11233	AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections])
11234 fi
11235 AC_MSG_RESULT($UNIXCONN)
11236 AC_ARG_ENABLE(tcp-transport, 
11237	AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]),
11238	[TCPCONN=$enableval], [TCPCONN=yes])
11239 AC_MSG_CHECKING([if Xtrans should support TCP socket connections])
11240 AC_MSG_RESULT($TCPCONN)
11241 if test "$TCPCONN" = "yes"; then
11242	AC_DEFINE(TCPCONN,1,[Support TCP socket connections])
11243	XTRANS_TCP_FLAGS
11244 fi
11245 [case $host_os in
11246	solaris*|sco*|sysv4*)	localdef="yes" ;;
11247	*)			localdef="no"  ;;
11248 esac]
11249 AC_ARG_ENABLE(local-transport,
11250	AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]),
11251	[LOCALCONN=$enableval], [LOCALCONN=$localdef])
11252 AC_MSG_CHECKING([if Xtrans should support os-specific local connections])
11253 AC_MSG_RESULT($LOCALCONN)
11254 if test "$LOCALCONN" = "yes"; then
11255	AC_DEFINE(LOCALCONN,1,[Support os-specific local connections])
11256 fi
11257 
11258]) # XTRANS_CONNECTION_FLAGS
11259
11260
11261# XTRANS_SECURE_RPC_FLAGS()
11262# -------------------------
11263# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS
11264# so that any necessary networking libraries are already found
11265AC_DEFUN([XTRANS_SECURE_RPC_FLAGS],
11266[AC_REQUIRE([XTRANS_TCP_FLAGS])
11267 AC_ARG_ENABLE(secure-rpc, 
11268	AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]),
11269        [SECURE_RPC=$enableval], [SECURE_RPC="try"])
11270
11271 if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then
11272	FOUND_SECURE_RPC="no"
11273	AC_CHECK_FUNCS([authdes_seccreate authdes_create],
11274			[FOUND_SECURE_RPC="yes"])
11275	if test "x$FOUND_SECURE_RPC" = "xno" ; then
11276		if test "x$SECURE_RPC" = "xyes" ; then
11277	AC_MSG_ERROR([Secure RPC requested, but required functions not found])
11278		fi	
11279		SECURE_RPC="no"
11280	else
11281		dnl FreeBSD keeps getsecretkey in librpcsvc
11282		AC_SEARCH_LIBS(getsecretkey, [rpcsvc])
11283		SECURE_RPC="yes"
11284	fi
11285 fi
11286 AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported])
11287 if test "x$SECURE_RPC" = "xyes" ; then
11288	AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients])
11289 fi
11290 AC_MSG_RESULT($SECURE_RPC)
11291]) # XTRANS_SECURE_RPC_FLAGS
11292
11293
11294