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