aclocal.m4 revision 9ace9065
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# Figure out how to run the assembler.                      -*- Autoconf -*-
59
60# Copyright (C) 2001, 2003, 2004, 2005, 2006  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# serial 5
67
68# AM_PROG_AS
69# ----------
70AC_DEFUN([AM_PROG_AS],
71[# By default we simply use the C compiler to build assembly code.
72AC_REQUIRE([AC_PROG_CC])
73test "${CCAS+set}" = set || CCAS=$CC
74test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
75AC_ARG_VAR([CCAS],      [assembler compiler command (defaults to CC)])
76AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
77_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
78])
79
80# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
81
82# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
83#
84# This file is free software; the Free Software Foundation
85# gives unlimited permission to copy and/or distribute it,
86# with or without modifications, as long as this notice is preserved.
87
88# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
89# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
90# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
91#
92# Of course, Automake must honor this variable whenever it calls a
93# tool from the auxiliary directory.  The problem is that $srcdir (and
94# therefore $ac_aux_dir as well) can be either absolute or relative,
95# depending on how configure is run.  This is pretty annoying, since
96# it makes $ac_aux_dir quite unusable in subdirectories: in the top
97# source directory, any form will work fine, but in subdirectories a
98# relative path needs to be adjusted first.
99#
100# $ac_aux_dir/missing
101#    fails when called from a subdirectory if $ac_aux_dir is relative
102# $top_srcdir/$ac_aux_dir/missing
103#    fails if $ac_aux_dir is absolute,
104#    fails when called from a subdirectory in a VPATH build with
105#          a relative $ac_aux_dir
106#
107# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
108# are both prefixed by $srcdir.  In an in-source build this is usually
109# harmless because $srcdir is `.', but things will broke when you
110# start a VPATH build or use an absolute $srcdir.
111#
112# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
113# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
114#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
115# and then we would define $MISSING as
116#   MISSING="\${SHELL} $am_aux_dir/missing"
117# This will work as long as MISSING is not called from configure, because
118# unfortunately $(top_srcdir) has no meaning in configure.
119# However there are other variables, like CC, which are often used in
120# configure, and could therefore not use this "fixed" $ac_aux_dir.
121#
122# Another solution, used here, is to always expand $ac_aux_dir to an
123# absolute PATH.  The drawback is that using absolute paths prevent a
124# configured tree to be moved without reconfiguration.
125
126AC_DEFUN([AM_AUX_DIR_EXPAND],
127[dnl Rely on autoconf to set up CDPATH properly.
128AC_PREREQ([2.50])dnl
129# expand $ac_aux_dir to an absolute path
130am_aux_dir=`cd $ac_aux_dir && pwd`
131])
132
133# AM_CONDITIONAL                                            -*- Autoconf -*-
134
135# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
136# Free Software Foundation, Inc.
137#
138# This file is free software; the Free Software Foundation
139# gives unlimited permission to copy and/or distribute it,
140# with or without modifications, as long as this notice is preserved.
141
142# serial 9
143
144# AM_CONDITIONAL(NAME, SHELL-CONDITION)
145# -------------------------------------
146# Define a conditional.
147AC_DEFUN([AM_CONDITIONAL],
148[AC_PREREQ(2.52)dnl
149 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
150	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
151AC_SUBST([$1_TRUE])dnl
152AC_SUBST([$1_FALSE])dnl
153_AM_SUBST_NOTMAKE([$1_TRUE])dnl
154_AM_SUBST_NOTMAKE([$1_FALSE])dnl
155m4_define([_AM_COND_VALUE_$1], [$2])dnl
156if $2; then
157  $1_TRUE=
158  $1_FALSE='#'
159else
160  $1_TRUE='#'
161  $1_FALSE=
162fi
163AC_CONFIG_COMMANDS_PRE(
164[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
165  AC_MSG_ERROR([[conditional "$1" was never defined.
166Usually this means the macro was only invoked conditionally.]])
167fi])])
168
169# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
170# Free Software Foundation, Inc.
171#
172# This file is free software; the Free Software Foundation
173# gives unlimited permission to copy and/or distribute it,
174# with or without modifications, as long as this notice is preserved.
175
176# serial 10
177
178# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
179# written in clear, in which case automake, when reading aclocal.m4,
180# will think it sees a *use*, and therefore will trigger all it's
181# C support machinery.  Also note that it means that autoscan, seeing
182# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
183
184
185# _AM_DEPENDENCIES(NAME)
186# ----------------------
187# See how the compiler implements dependency checking.
188# NAME is "CC", "CXX", "GCJ", or "OBJC".
189# We try a few techniques and use that to set a single cache variable.
190#
191# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
192# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
193# dependency, and given that the user is not expected to run this macro,
194# just rely on AC_PROG_CC.
195AC_DEFUN([_AM_DEPENDENCIES],
196[AC_REQUIRE([AM_SET_DEPDIR])dnl
197AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
198AC_REQUIRE([AM_MAKE_INCLUDE])dnl
199AC_REQUIRE([AM_DEP_TRACK])dnl
200
201ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
202       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
203       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
204       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
205       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
206                   [depcc="$$1"   am_compiler_list=])
207
208AC_CACHE_CHECK([dependency style of $depcc],
209               [am_cv_$1_dependencies_compiler_type],
210[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
211  # We make a subdir and do the tests there.  Otherwise we can end up
212  # making bogus files that we don't know about and never remove.  For
213  # instance it was reported that on HP-UX the gcc test will end up
214  # making a dummy file named `D' -- because `-MD' means `put the output
215  # in D'.
216  mkdir conftest.dir
217  # Copy depcomp to subdir because otherwise we won't find it if we're
218  # using a relative directory.
219  cp "$am_depcomp" conftest.dir
220  cd conftest.dir
221  # We will build objects and dependencies in a subdirectory because
222  # it helps to detect inapplicable dependency modes.  For instance
223  # both Tru64's cc and ICC support -MD to output dependencies as a
224  # side effect of compilation, but ICC will put the dependencies in
225  # the current directory while Tru64 will put them in the object
226  # directory.
227  mkdir sub
228
229  am_cv_$1_dependencies_compiler_type=none
230  if test "$am_compiler_list" = ""; then
231     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
232  fi
233  am__universal=false
234  m4_case([$1], [CC],
235    [case " $depcc " in #(
236     *\ -arch\ *\ -arch\ *) am__universal=true ;;
237     esac],
238    [CXX],
239    [case " $depcc " in #(
240     *\ -arch\ *\ -arch\ *) am__universal=true ;;
241     esac])
242
243  for depmode in $am_compiler_list; do
244    # Setup a source with many dependencies, because some compilers
245    # like to wrap large dependency lists on column 80 (with \), and
246    # we should not choose a depcomp mode which is confused by this.
247    #
248    # We need to recreate these files for each test, as the compiler may
249    # overwrite some of them when testing with obscure command lines.
250    # This happens at least with the AIX C compiler.
251    : > sub/conftest.c
252    for i in 1 2 3 4 5 6; do
253      echo '#include "conftst'$i'.h"' >> sub/conftest.c
254      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
255      # Solaris 8's {/usr,}/bin/sh.
256      touch sub/conftst$i.h
257    done
258    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
259
260    # We check with `-c' and `-o' for the sake of the "dashmstdout"
261    # mode.  It turns out that the SunPro C++ compiler does not properly
262    # handle `-M -o', and we need to detect this.  Also, some Intel
263    # versions had trouble with output in subdirs
264    am__obj=sub/conftest.${OBJEXT-o}
265    am__minus_obj="-o $am__obj"
266    case $depmode in
267    gcc)
268      # This depmode causes a compiler race in universal mode.
269      test "$am__universal" = false || continue
270      ;;
271    nosideeffect)
272      # after this tag, mechanisms are not by side-effect, so they'll
273      # only be used when explicitly requested
274      if test "x$enable_dependency_tracking" = xyes; then
275	continue
276      else
277	break
278      fi
279      ;;
280    msvisualcpp | msvcmsys)
281      # This compiler won't grok `-c -o', but also, the minuso test has
282      # not run yet.  These depmodes are late enough in the game, and
283      # so weak that their functioning should not be impacted.
284      am__obj=conftest.${OBJEXT-o}
285      am__minus_obj=
286      ;;
287    none) break ;;
288    esac
289    if depmode=$depmode \
290       source=sub/conftest.c object=$am__obj \
291       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
292       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
293         >/dev/null 2>conftest.err &&
294       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
295       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
296       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
297       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
298      # icc doesn't choke on unknown options, it will just issue warnings
299      # or remarks (even with -Werror).  So we grep stderr for any message
300      # that says an option was ignored or not supported.
301      # When given -MP, icc 7.0 and 7.1 complain thusly:
302      #   icc: Command line warning: ignoring option '-M'; no argument required
303      # The diagnosis changed in icc 8.0:
304      #   icc: Command line remark: option '-MP' not supported
305      if (grep 'ignoring option' conftest.err ||
306          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
307        am_cv_$1_dependencies_compiler_type=$depmode
308        break
309      fi
310    fi
311  done
312
313  cd ..
314  rm -rf conftest.dir
315else
316  am_cv_$1_dependencies_compiler_type=none
317fi
318])
319AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
320AM_CONDITIONAL([am__fastdep$1], [
321  test "x$enable_dependency_tracking" != xno \
322  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
323])
324
325
326# AM_SET_DEPDIR
327# -------------
328# Choose a directory name for dependency files.
329# This macro is AC_REQUIREd in _AM_DEPENDENCIES
330AC_DEFUN([AM_SET_DEPDIR],
331[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
332AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
333])
334
335
336# AM_DEP_TRACK
337# ------------
338AC_DEFUN([AM_DEP_TRACK],
339[AC_ARG_ENABLE(dependency-tracking,
340[  --disable-dependency-tracking  speeds up one-time build
341  --enable-dependency-tracking   do not reject slow dependency extractors])
342if test "x$enable_dependency_tracking" != xno; then
343  am_depcomp="$ac_aux_dir/depcomp"
344  AMDEPBACKSLASH='\'
345fi
346AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
347AC_SUBST([AMDEPBACKSLASH])dnl
348_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
349])
350
351# Generate code to set up dependency tracking.              -*- Autoconf -*-
352
353# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
354# Free Software Foundation, Inc.
355#
356# This file is free software; the Free Software Foundation
357# gives unlimited permission to copy and/or distribute it,
358# with or without modifications, as long as this notice is preserved.
359
360#serial 5
361
362# _AM_OUTPUT_DEPENDENCY_COMMANDS
363# ------------------------------
364AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
365[{
366  # Autoconf 2.62 quotes --file arguments for eval, but not when files
367  # are listed without --file.  Let's play safe and only enable the eval
368  # if we detect the quoting.
369  case $CONFIG_FILES in
370  *\'*) eval set x "$CONFIG_FILES" ;;
371  *)   set x $CONFIG_FILES ;;
372  esac
373  shift
374  for mf
375  do
376    # Strip MF so we end up with the name of the file.
377    mf=`echo "$mf" | sed -e 's/:.*$//'`
378    # Check whether this is an Automake generated Makefile or not.
379    # We used to match only the files named `Makefile.in', but
380    # some people rename them; so instead we look at the file content.
381    # Grep'ing the first line is not enough: some people post-process
382    # each Makefile.in and add a new line on top of each file to say so.
383    # Grep'ing the whole file is not good either: AIX grep has a line
384    # limit of 2048, but all sed's we know have understand at least 4000.
385    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
386      dirpart=`AS_DIRNAME("$mf")`
387    else
388      continue
389    fi
390    # Extract the definition of DEPDIR, am__include, and am__quote
391    # from the Makefile without running `make'.
392    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
393    test -z "$DEPDIR" && continue
394    am__include=`sed -n 's/^am__include = //p' < "$mf"`
395    test -z "am__include" && continue
396    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
397    # When using ansi2knr, U may be empty or an underscore; expand it
398    U=`sed -n 's/^U = //p' < "$mf"`
399    # Find all dependency output files, they are included files with
400    # $(DEPDIR) in their names.  We invoke sed twice because it is the
401    # simplest approach to changing $(DEPDIR) to its actual value in the
402    # expansion.
403    for file in `sed -n "
404      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
405	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
406      # Make sure the directory exists.
407      test -f "$dirpart/$file" && continue
408      fdir=`AS_DIRNAME(["$file"])`
409      AS_MKDIR_P([$dirpart/$fdir])
410      # echo "creating $dirpart/$file"
411      echo '# dummy' > "$dirpart/$file"
412    done
413  done
414}
415])# _AM_OUTPUT_DEPENDENCY_COMMANDS
416
417
418# AM_OUTPUT_DEPENDENCY_COMMANDS
419# -----------------------------
420# This macro should only be invoked once -- use via AC_REQUIRE.
421#
422# This code is only required when automatic dependency tracking
423# is enabled.  FIXME.  This creates each `.P' file that we will
424# need in order to bootstrap the dependency handling code.
425AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
426[AC_CONFIG_COMMANDS([depfiles],
427     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
428     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
429])
430
431# Do all the work for Automake.                             -*- Autoconf -*-
432
433# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
434# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
435#
436# This file is free software; the Free Software Foundation
437# gives unlimited permission to copy and/or distribute it,
438# with or without modifications, as long as this notice is preserved.
439
440# serial 16
441
442# This macro actually does too much.  Some checks are only needed if
443# your package does certain things.  But this isn't really a big deal.
444
445# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
446# AM_INIT_AUTOMAKE([OPTIONS])
447# -----------------------------------------------
448# The call with PACKAGE and VERSION arguments is the old style
449# call (pre autoconf-2.50), which is being phased out.  PACKAGE
450# and VERSION should now be passed to AC_INIT and removed from
451# the call to AM_INIT_AUTOMAKE.
452# We support both call styles for the transition.  After
453# the next Automake release, Autoconf can make the AC_INIT
454# arguments mandatory, and then we can depend on a new Autoconf
455# release and drop the old call support.
456AC_DEFUN([AM_INIT_AUTOMAKE],
457[AC_PREREQ([2.62])dnl
458dnl Autoconf wants to disallow AM_ names.  We explicitly allow
459dnl the ones we care about.
460m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
461AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
462AC_REQUIRE([AC_PROG_INSTALL])dnl
463if test "`cd $srcdir && pwd`" != "`pwd`"; then
464  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
465  # is not polluted with repeated "-I."
466  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
467  # test to see if srcdir already configured
468  if test -f $srcdir/config.status; then
469    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
470  fi
471fi
472
473# test whether we have cygpath
474if test -z "$CYGPATH_W"; then
475  if (cygpath --version) >/dev/null 2>/dev/null; then
476    CYGPATH_W='cygpath -w'
477  else
478    CYGPATH_W=echo
479  fi
480fi
481AC_SUBST([CYGPATH_W])
482
483# Define the identity of the package.
484dnl Distinguish between old-style and new-style calls.
485m4_ifval([$2],
486[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
487 AC_SUBST([PACKAGE], [$1])dnl
488 AC_SUBST([VERSION], [$2])],
489[_AM_SET_OPTIONS([$1])dnl
490dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
491m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
492  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
493 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
494 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
495
496_AM_IF_OPTION([no-define],,
497[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
498 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
499
500# Some tools Automake needs.
501AC_REQUIRE([AM_SANITY_CHECK])dnl
502AC_REQUIRE([AC_ARG_PROGRAM])dnl
503AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
504AM_MISSING_PROG(AUTOCONF, autoconf)
505AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
506AM_MISSING_PROG(AUTOHEADER, autoheader)
507AM_MISSING_PROG(MAKEINFO, makeinfo)
508AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
509AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
510AC_REQUIRE([AM_PROG_MKDIR_P])dnl
511# We need awk for the "check" target.  The system "awk" is bad on
512# some platforms.
513AC_REQUIRE([AC_PROG_AWK])dnl
514AC_REQUIRE([AC_PROG_MAKE_SET])dnl
515AC_REQUIRE([AM_SET_LEADING_DOT])dnl
516_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
517	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
518			     [_AM_PROG_TAR([v7])])])
519_AM_IF_OPTION([no-dependencies],,
520[AC_PROVIDE_IFELSE([AC_PROG_CC],
521		  [_AM_DEPENDENCIES(CC)],
522		  [define([AC_PROG_CC],
523			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
524AC_PROVIDE_IFELSE([AC_PROG_CXX],
525		  [_AM_DEPENDENCIES(CXX)],
526		  [define([AC_PROG_CXX],
527			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
528AC_PROVIDE_IFELSE([AC_PROG_OBJC],
529		  [_AM_DEPENDENCIES(OBJC)],
530		  [define([AC_PROG_OBJC],
531			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
532])
533_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
534dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
535dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
536dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
537AC_CONFIG_COMMANDS_PRE(dnl
538[m4_provide_if([_AM_COMPILER_EXEEXT],
539  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
540])
541
542dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
543dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
544dnl mangled by Autoconf and run in a shell conditional statement.
545m4_define([_AC_COMPILER_EXEEXT],
546m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
547
548
549# When config.status generates a header, we must update the stamp-h file.
550# This file resides in the same directory as the config header
551# that is generated.  The stamp files are numbered to have different names.
552
553# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
554# loop where config.status creates the headers, so we can generate
555# our stamp files there.
556AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
557[# Compute $1's index in $config_headers.
558_am_arg=$1
559_am_stamp_count=1
560for _am_header in $config_headers :; do
561  case $_am_header in
562    $_am_arg | $_am_arg:* )
563      break ;;
564    * )
565      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
566  esac
567done
568echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
569
570# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
571#
572# This file is free software; the Free Software Foundation
573# gives unlimited permission to copy and/or distribute it,
574# with or without modifications, as long as this notice is preserved.
575
576# AM_PROG_INSTALL_SH
577# ------------------
578# Define $install_sh.
579AC_DEFUN([AM_PROG_INSTALL_SH],
580[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
581if test x"${install_sh}" != xset; then
582  case $am_aux_dir in
583  *\ * | *\	*)
584    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
585  *)
586    install_sh="\${SHELL} $am_aux_dir/install-sh"
587  esac
588fi
589AC_SUBST(install_sh)])
590
591# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
592#
593# This file is free software; the Free Software Foundation
594# gives unlimited permission to copy and/or distribute it,
595# with or without modifications, as long as this notice is preserved.
596
597# serial 2
598
599# Check whether the underlying file-system supports filenames
600# with a leading dot.  For instance MS-DOS doesn't.
601AC_DEFUN([AM_SET_LEADING_DOT],
602[rm -rf .tst 2>/dev/null
603mkdir .tst 2>/dev/null
604if test -d .tst; then
605  am__leading_dot=.
606else
607  am__leading_dot=_
608fi
609rmdir .tst 2>/dev/null
610AC_SUBST([am__leading_dot])])
611
612# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
613# From Jim Meyering
614
615# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
616# Free Software Foundation, Inc.
617#
618# This file is free software; the Free Software Foundation
619# gives unlimited permission to copy and/or distribute it,
620# with or without modifications, as long as this notice is preserved.
621
622# serial 5
623
624# AM_MAINTAINER_MODE([DEFAULT-MODE])
625# ----------------------------------
626# Control maintainer-specific portions of Makefiles.
627# Default is to disable them, unless `enable' is passed literally.
628# For symmetry, `disable' may be passed as well.  Anyway, the user
629# can override the default with the --enable/--disable switch.
630AC_DEFUN([AM_MAINTAINER_MODE],
631[m4_case(m4_default([$1], [disable]),
632       [enable], [m4_define([am_maintainer_other], [disable])],
633       [disable], [m4_define([am_maintainer_other], [enable])],
634       [m4_define([am_maintainer_other], [enable])
635        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
636AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
637  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
638  AC_ARG_ENABLE([maintainer-mode],
639[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
640			  (and sometimes confusing) to the casual installer],
641      [USE_MAINTAINER_MODE=$enableval],
642      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
643  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
644  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
645  MAINT=$MAINTAINER_MODE_TRUE
646  AC_SUBST([MAINT])dnl
647]
648)
649
650AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
651
652# Check to see how 'make' treats includes.	            -*- Autoconf -*-
653
654# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
655#
656# This file is free software; the Free Software Foundation
657# gives unlimited permission to copy and/or distribute it,
658# with or without modifications, as long as this notice is preserved.
659
660# serial 4
661
662# AM_MAKE_INCLUDE()
663# -----------------
664# Check to see how make treats includes.
665AC_DEFUN([AM_MAKE_INCLUDE],
666[am_make=${MAKE-make}
667cat > confinc << 'END'
668am__doit:
669	@echo this is the am__doit target
670.PHONY: am__doit
671END
672# If we don't find an include directive, just comment out the code.
673AC_MSG_CHECKING([for style of include used by $am_make])
674am__include="#"
675am__quote=
676_am_result=none
677# First try GNU make style include.
678echo "include confinc" > confmf
679# Ignore all kinds of additional output from `make'.
680case `$am_make -s -f confmf 2> /dev/null` in #(
681*the\ am__doit\ target*)
682  am__include=include
683  am__quote=
684  _am_result=GNU
685  ;;
686esac
687# Now try BSD make style include.
688if test "$am__include" = "#"; then
689   echo '.include "confinc"' > confmf
690   case `$am_make -s -f confmf 2> /dev/null` in #(
691   *the\ am__doit\ target*)
692     am__include=.include
693     am__quote="\""
694     _am_result=BSD
695     ;;
696   esac
697fi
698AC_SUBST([am__include])
699AC_SUBST([am__quote])
700AC_MSG_RESULT([$_am_result])
701rm -f confinc confmf
702])
703
704# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
705
706# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
707# Free Software Foundation, Inc.
708#
709# This file is free software; the Free Software Foundation
710# gives unlimited permission to copy and/or distribute it,
711# with or without modifications, as long as this notice is preserved.
712
713# serial 6
714
715# AM_MISSING_PROG(NAME, PROGRAM)
716# ------------------------------
717AC_DEFUN([AM_MISSING_PROG],
718[AC_REQUIRE([AM_MISSING_HAS_RUN])
719$1=${$1-"${am_missing_run}$2"}
720AC_SUBST($1)])
721
722
723# AM_MISSING_HAS_RUN
724# ------------------
725# Define MISSING if not defined so far and test if it supports --run.
726# If it does, set am_missing_run to use it, otherwise, to nothing.
727AC_DEFUN([AM_MISSING_HAS_RUN],
728[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
729AC_REQUIRE_AUX_FILE([missing])dnl
730if test x"${MISSING+set}" != xset; then
731  case $am_aux_dir in
732  *\ * | *\	*)
733    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
734  *)
735    MISSING="\${SHELL} $am_aux_dir/missing" ;;
736  esac
737fi
738# Use eval to expand $SHELL
739if eval "$MISSING --run true"; then
740  am_missing_run="$MISSING --run "
741else
742  am_missing_run=
743  AC_MSG_WARN([`missing' script is too old or missing])
744fi
745])
746
747# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
748#
749# This file is free software; the Free Software Foundation
750# gives unlimited permission to copy and/or distribute it,
751# with or without modifications, as long as this notice is preserved.
752
753# AM_PROG_MKDIR_P
754# ---------------
755# Check for `mkdir -p'.
756AC_DEFUN([AM_PROG_MKDIR_P],
757[AC_PREREQ([2.60])dnl
758AC_REQUIRE([AC_PROG_MKDIR_P])dnl
759dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
760dnl while keeping a definition of mkdir_p for backward compatibility.
761dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
762dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
763dnl Makefile.ins that do not define MKDIR_P, so we do our own
764dnl adjustment using top_builddir (which is defined more often than
765dnl MKDIR_P).
766AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
767case $mkdir_p in
768  [[\\/$]]* | ?:[[\\/]]*) ;;
769  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
770esac
771])
772
773# Helper functions for option handling.                     -*- Autoconf -*-
774
775# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
776#
777# This file is free software; the Free Software Foundation
778# gives unlimited permission to copy and/or distribute it,
779# with or without modifications, as long as this notice is preserved.
780
781# serial 4
782
783# _AM_MANGLE_OPTION(NAME)
784# -----------------------
785AC_DEFUN([_AM_MANGLE_OPTION],
786[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
787
788# _AM_SET_OPTION(NAME)
789# ------------------------------
790# Set option NAME.  Presently that only means defining a flag for this option.
791AC_DEFUN([_AM_SET_OPTION],
792[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
793
794# _AM_SET_OPTIONS(OPTIONS)
795# ----------------------------------
796# OPTIONS is a space-separated list of Automake options.
797AC_DEFUN([_AM_SET_OPTIONS],
798[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
799
800# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
801# -------------------------------------------
802# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
803AC_DEFUN([_AM_IF_OPTION],
804[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
805
806# Check to make sure that the build environment is sane.    -*- Autoconf -*-
807
808# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
809# Free Software Foundation, Inc.
810#
811# This file is free software; the Free Software Foundation
812# gives unlimited permission to copy and/or distribute it,
813# with or without modifications, as long as this notice is preserved.
814
815# serial 5
816
817# AM_SANITY_CHECK
818# ---------------
819AC_DEFUN([AM_SANITY_CHECK],
820[AC_MSG_CHECKING([whether build environment is sane])
821# Just in case
822sleep 1
823echo timestamp > conftest.file
824# Reject unsafe characters in $srcdir or the absolute working directory
825# name.  Accept space and tab only in the latter.
826am_lf='
827'
828case `pwd` in
829  *[[\\\"\#\$\&\'\`$am_lf]]*)
830    AC_MSG_ERROR([unsafe absolute working directory name]);;
831esac
832case $srcdir in
833  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
834    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
835esac
836
837# Do `set' in a subshell so we don't clobber the current shell's
838# arguments.  Must try -L first in case configure is actually a
839# symlink; some systems play weird games with the mod time of symlinks
840# (eg FreeBSD returns the mod time of the symlink's containing
841# directory).
842if (
843   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
844   if test "$[*]" = "X"; then
845      # -L didn't work.
846      set X `ls -t "$srcdir/configure" conftest.file`
847   fi
848   rm -f conftest.file
849   if test "$[*]" != "X $srcdir/configure conftest.file" \
850      && test "$[*]" != "X conftest.file $srcdir/configure"; then
851
852      # If neither matched, then we have a broken ls.  This can happen
853      # if, for instance, CONFIG_SHELL is bash and it inherits a
854      # broken ls alias from the environment.  This has actually
855      # happened.  Such a system could not be considered "sane".
856      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
857alias in your environment])
858   fi
859
860   test "$[2]" = conftest.file
861   )
862then
863   # Ok.
864   :
865else
866   AC_MSG_ERROR([newly created file is older than distributed files!
867Check your system clock])
868fi
869AC_MSG_RESULT(yes)])
870
871# Copyright (C) 2009  Free Software Foundation, Inc.
872#
873# This file is free software; the Free Software Foundation
874# gives unlimited permission to copy and/or distribute it,
875# with or without modifications, as long as this notice is preserved.
876
877# serial 1
878
879# AM_SILENT_RULES([DEFAULT])
880# --------------------------
881# Enable less verbose build rules; with the default set to DEFAULT
882# (`yes' being less verbose, `no' or empty being verbose).
883AC_DEFUN([AM_SILENT_RULES],
884[AC_ARG_ENABLE([silent-rules],
885[  --enable-silent-rules          less verbose build output (undo: `make V=1')
886  --disable-silent-rules         verbose build output (undo: `make V=0')])
887case $enable_silent_rules in
888yes) AM_DEFAULT_VERBOSITY=0;;
889no)  AM_DEFAULT_VERBOSITY=1;;
890*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
891esac
892AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
893AM_BACKSLASH='\'
894AC_SUBST([AM_BACKSLASH])dnl
895_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
896])
897
898# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
899#
900# This file is free software; the Free Software Foundation
901# gives unlimited permission to copy and/or distribute it,
902# with or without modifications, as long as this notice is preserved.
903
904# AM_PROG_INSTALL_STRIP
905# ---------------------
906# One issue with vendor `install' (even GNU) is that you can't
907# specify the program used to strip binaries.  This is especially
908# annoying in cross-compiling environments, where the build's strip
909# is unlikely to handle the host's binaries.
910# Fortunately install-sh will honor a STRIPPROG variable, so we
911# always use install-sh in `make install-strip', and initialize
912# STRIPPROG with the value of the STRIP variable (set by the user).
913AC_DEFUN([AM_PROG_INSTALL_STRIP],
914[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
915# Installed binaries are usually stripped using `strip' when the user
916# run `make install-strip'.  However `strip' might not be the right
917# tool to use in cross-compilation environments, therefore Automake
918# will honor the `STRIP' environment variable to overrule this program.
919dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
920if test "$cross_compiling" != no; then
921  AC_CHECK_TOOL([STRIP], [strip], :)
922fi
923INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
924AC_SUBST([INSTALL_STRIP_PROGRAM])])
925
926# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
927#
928# This file is free software; the Free Software Foundation
929# gives unlimited permission to copy and/or distribute it,
930# with or without modifications, as long as this notice is preserved.
931
932# serial 2
933
934# _AM_SUBST_NOTMAKE(VARIABLE)
935# ---------------------------
936# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
937# This macro is traced by Automake.
938AC_DEFUN([_AM_SUBST_NOTMAKE])
939
940# AM_SUBST_NOTMAKE(VARIABLE)
941# ---------------------------
942# Public sister of _AM_SUBST_NOTMAKE.
943AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
944
945# Check how to create a tarball.                            -*- Autoconf -*-
946
947# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
948#
949# This file is free software; the Free Software Foundation
950# gives unlimited permission to copy and/or distribute it,
951# with or without modifications, as long as this notice is preserved.
952
953# serial 2
954
955# _AM_PROG_TAR(FORMAT)
956# --------------------
957# Check how to create a tarball in format FORMAT.
958# FORMAT should be one of `v7', `ustar', or `pax'.
959#
960# Substitute a variable $(am__tar) that is a command
961# writing to stdout a FORMAT-tarball containing the directory
962# $tardir.
963#     tardir=directory && $(am__tar) > result.tar
964#
965# Substitute a variable $(am__untar) that extract such
966# a tarball read from stdin.
967#     $(am__untar) < result.tar
968AC_DEFUN([_AM_PROG_TAR],
969[# Always define AMTAR for backward compatibility.
970AM_MISSING_PROG([AMTAR], [tar])
971m4_if([$1], [v7],
972     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
973     [m4_case([$1], [ustar],, [pax],,
974              [m4_fatal([Unknown tar format])])
975AC_MSG_CHECKING([how to create a $1 tar archive])
976# Loop over all known methods to create a tar archive until one works.
977_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
978_am_tools=${am_cv_prog_tar_$1-$_am_tools}
979# Do not fold the above two line into one, because Tru64 sh and
980# Solaris sh will not grok spaces in the rhs of `-'.
981for _am_tool in $_am_tools
982do
983  case $_am_tool in
984  gnutar)
985    for _am_tar in tar gnutar gtar;
986    do
987      AM_RUN_LOG([$_am_tar --version]) && break
988    done
989    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
990    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
991    am__untar="$_am_tar -xf -"
992    ;;
993  plaintar)
994    # Must skip GNU tar: if it does not support --format= it doesn't create
995    # ustar tarball either.
996    (tar --version) >/dev/null 2>&1 && continue
997    am__tar='tar chf - "$$tardir"'
998    am__tar_='tar chf - "$tardir"'
999    am__untar='tar xf -'
1000    ;;
1001  pax)
1002    am__tar='pax -L -x $1 -w "$$tardir"'
1003    am__tar_='pax -L -x $1 -w "$tardir"'
1004    am__untar='pax -r'
1005    ;;
1006  cpio)
1007    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1008    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1009    am__untar='cpio -i -H $1 -d'
1010    ;;
1011  none)
1012    am__tar=false
1013    am__tar_=false
1014    am__untar=false
1015    ;;
1016  esac
1017
1018  # If the value was cached, stop now.  We just wanted to have am__tar
1019  # and am__untar set.
1020  test -n "${am_cv_prog_tar_$1}" && break
1021
1022  # tar/untar a dummy directory, and stop if the command works
1023  rm -rf conftest.dir
1024  mkdir conftest.dir
1025  echo GrepMe > conftest.dir/file
1026  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1027  rm -rf conftest.dir
1028  if test -s conftest.tar; then
1029    AM_RUN_LOG([$am__untar <conftest.tar])
1030    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1031  fi
1032done
1033rm -rf conftest.dir
1034
1035AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1036AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1037AC_SUBST([am__tar])
1038AC_SUBST([am__untar])
1039]) # _AM_PROG_TAR
1040
1041m4_include([m4/ac_define_dir.m4])
1042m4_include([m4/ax_tls.m4])
1043dnl fontutil.m4.  Generated from fontutil.m4.in by configure.
1044dnl
1045dnl This file comes from X.Org's font-util 1.2.0
1046dnl
1047dnl Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
1048dnl
1049dnl Permission is hereby granted, free of charge, to any person obtaining a
1050dnl copy of this software and associated documentation files (the "Software"),
1051dnl to deal in the Software without restriction, including without limitation
1052dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
1053dnl and/or sell copies of the Software, and to permit persons to whom the
1054dnl Software is furnished to do so, subject to the following conditions:
1055dnl
1056dnl The above copyright notice and this permission notice (including the next
1057dnl paragraph) shall be included in all copies or substantial portions of the
1058dnl Software.
1059dnl
1060dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1061dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1062dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
1063dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1064dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1065dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1066dnl DEALINGS IN THE SOFTWARE.
1067dnl
1068dnl --------------------------------------------------------------------
1069dnl
1070dnl Copyright 2005 Red Hat, Inc
1071dnl
1072dnl Permission to use, copy, modify, distribute, and sell this software and its
1073dnl documentation for any purpose is hereby granted without fee, provided that
1074dnl the above copyright notice appear in all copies and that both that
1075dnl copyright notice and this permission notice appear in supporting
1076dnl documentation.
1077dnl
1078dnl The above copyright notice and this permission notice shall be included
1079dnl in all copies or substantial portions of the Software.
1080dnl
1081dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1082dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1083dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
1084dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
1085dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
1086dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
1087dnl OTHER DEALINGS IN THE SOFTWARE.
1088dnl
1089dnl Except as contained in this notice, the name of the copyright holders shall
1090dnl not be used in advertising or otherwise to promote the sale, use or
1091dnl other dealings in this Software without prior written authorization
1092dnl from the copyright holders.
1093
1094# XORG_FONT_MACROS_VERSION(required-version)
1095# ------------------------------------------
1096# Minimum version: 1.1.0
1097#
1098# If you're using a macro added in Version 1.1 or newer, include this in
1099# your configure.ac with the minimum required version, such as:
1100# XORG_FONT_MACROS_VERSION(1.1)
1101#
1102# To ensure that this macro is defined, also add:
1103# m4_ifndef([XORG_FONT_MACROS_VERSION],
1104#     [m4_fatal([must install X.Org font-util 1.1 or later before running autoconf/autogen])])
1105#
1106#
1107# See the "minimum version" comment for each macro you use to see what
1108# version you require.
1109m4_defun([XORG_FONT_MACROS_VERSION],[
1110m4_define([vers_have], [1.2.0])
1111m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
1112m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
1113m4_if(m4_cmp(maj_have, maj_needed), 0,,
1114    [m4_fatal([font-util major version ]maj_needed[ is required but ]vers_have[ found])])
1115m4_if(m4_version_compare(vers_have, [$1]), -1,
1116    [m4_fatal([font-util version $1 or higher is required but ]vers_have[ found])])
1117m4_undefine([vers_have])
1118m4_undefine([maj_have])
1119m4_undefine([maj_needed])
1120]) # XORG_FONT_MACROS_VERSION
1121
1122# XORG_FONT_CHECK_{maps}()
1123# ------------------------
1124# Minimum version: 1.0.0
1125# These macros add --enable/disable-{maps} where {maps} are ISO8859-*,
1126# JISX0201 or KOI8_R.  By default, they are all enabled.
1127
1128AC_DEFUN([XORG_FONT_CHECK_ISO8859_1], [XORG_FONT_CHECK_ENCODING(ISO8859-1)])
1129AC_DEFUN([XORG_FONT_CHECK_ISO8859_2], [XORG_FONT_CHECK_ENCODING(ISO8859-2)])
1130AC_DEFUN([XORG_FONT_CHECK_ISO8859_3], [XORG_FONT_CHECK_ENCODING(ISO8859-3)])
1131AC_DEFUN([XORG_FONT_CHECK_ISO8859_4], [XORG_FONT_CHECK_ENCODING(ISO8859-4)])
1132AC_DEFUN([XORG_FONT_CHECK_ISO8859_5], [XORG_FONT_CHECK_ENCODING(ISO8859-5)])
1133AC_DEFUN([XORG_FONT_CHECK_ISO8859_6], [XORG_FONT_CHECK_ENCODING(ISO8859-6)])
1134AC_DEFUN([XORG_FONT_CHECK_ISO8859_7], [XORG_FONT_CHECK_ENCODING(ISO8859-7)])
1135AC_DEFUN([XORG_FONT_CHECK_ISO8859_8], [XORG_FONT_CHECK_ENCODING(ISO8859-8)])
1136AC_DEFUN([XORG_FONT_CHECK_ISO8859_9], [XORG_FONT_CHECK_ENCODING(ISO8859-9)])
1137AC_DEFUN([XORG_FONT_CHECK_ISO8859_10],[XORG_FONT_CHECK_ENCODING(ISO8859-10)])
1138AC_DEFUN([XORG_FONT_CHECK_ISO8859_11],[XORG_FONT_CHECK_ENCODING(ISO8859-11)])
1139AC_DEFUN([XORG_FONT_CHECK_ISO8859_12],[XORG_FONT_CHECK_ENCODING(ISO8859-12)])
1140AC_DEFUN([XORG_FONT_CHECK_ISO8859_13],[XORG_FONT_CHECK_ENCODING(ISO8859-13)])
1141AC_DEFUN([XORG_FONT_CHECK_ISO8859_14],[XORG_FONT_CHECK_ENCODING(ISO8859-14)])
1142AC_DEFUN([XORG_FONT_CHECK_ISO8859_15],[XORG_FONT_CHECK_ENCODING(ISO8859-15)])
1143AC_DEFUN([XORG_FONT_CHECK_ISO8859_16],[XORG_FONT_CHECK_ENCODING(ISO8859-16)])
1144AC_DEFUN([XORG_FONT_CHECK_JISX0201],  [XORG_FONT_CHECK_ENCODING(JISX0201)])
1145AC_DEFUN([XORG_FONT_CHECK_KOI8_R],    [XORG_FONT_CHECK_ENCODING(KOI8-R)])
1146
1147# XORG_FONT_CHECK_ENCODING(encoding)
1148# ----------------------------------
1149# Minimum version: 1.1.0
1150# This macro adds --enable/disable-<encoding>, enabled by default.
1151# It replaced individual copies of this code in the above macros in 1.1.
1152# Currently assumes encoding names will be all upper-case - add m4_toupper
1153# calls if this is not true in the future.
1154
1155AC_DEFUN([XORG_FONT_CHECK_ENCODING],[
1156	AC_ARG_ENABLE(m4_tolower($1),
1157		AS_HELP_STRING(m4_join([-], [--disable], m4_tolower($1)),
1158				[Build $1 fonts (default: yes)]),
1159		[AS_TR_SH($1)=$enableval])
1160	AC_MSG_CHECKING([whether to build $1 fonts])
1161	AC_MSG_RESULT($[AS_TR_SH($1)])
1162	AM_CONDITIONAL(AS_TR_SH($1), [test "x$AS_TR_SH($1)" = xyes])
1163]) # XORG_FONT_CHECK_ENCODING
1164
1165# XORG_FONT_CHECK_ENCODING_LIST(encoding1 encoding2....)
1166# -----------------------------------------------------
1167# Minimum version: 1.1.0
1168# Call XORG_FONT_CHECK_ENCODING for multiple encodings at once.
1169# Add a shorthand --enable/disable-all-encodings option.
1170
1171AC_DEFUN([XORG_FONT_CHECK_ENCODING_LIST],[
1172	AC_ARG_ENABLE([all-encodings],
1173		AS_HELP_STRING([--disable-all-encodings],
1174				[Disable building of all font encodings]),
1175		[m4_foreach_w([enc], [$1], [
1176			AS_TR_SH(enc)=$enableval
1177		])],
1178		[m4_foreach_w([enc], [$1], [
1179			AS_TR_SH(enc)=yes
1180		])])
1181	m4_foreach_w([enc], [$1], [XORG_FONT_CHECK_ENCODING(enc)])
1182]) # XORG_FONT_CHECK_ENCODING_LIST
1183
1184# XORG_FONT_REQUIRED_PROG(VARNAME, progname)
1185# ------------------------------------------
1186# Minimum version: 1.1.0
1187#
1188# Simple wrapper around AC_PATH_PROG that errors if not found
1189#
1190
1191AC_DEFUN([XORG_FONT_REQUIRED_PROG],[
1192	AC_PATH_PROG($1, $2)
1193	if test x"$$1" = x; then
1194		AC_MSG_ERROR([$2 is required to build $PACKAGE_NAME.])
1195	fi
1196])
1197
1198
1199# XORG_FONT_FCCACHE()
1200# -------------------
1201# Minimum version: 1.1.0
1202#
1203# Set FCCACHE to path to fc-cache (fontconfig cache builder) if found
1204# Set RUN_FCCACHE to a rule suitable for substituting into a makefile
1205# to run fc-cache if found and not installing to $DESTDIR
1206#
1207# fc-cache is optional, not required, and should be skipped when making
1208# packages (installing to $DESTDIR).
1209#
1210AC_DEFUN([XORG_FONT_FCCACHE],[
1211	AC_PATH_PROG(FCCACHE, fc-cache)
1212	FCCACHE_WARN='echo "** Warning: fonts.cache not built" ; echo "** Generate this file manually on host system using fc-cache"'
1213	if test x"$FCCACHE" = x ; then
1214		RUN_FCCACHE="${FCCACHE_WARN}"
1215	else
1216		RUN_FCCACHE='@(if test -z "$(DESTDIR)"; then echo $(FCCACHE) $(fontdir); $(FCCACHE) $(fontdir); else'
1217		RUN_FCCACHE="${RUN_FCCACHE} ${FCCACHE_WARN} ; fi)"
1218	fi
1219	AC_SUBST([RUN_FCCACHE])
1220])
1221
1222
1223# XORG_FONT_COMMON_UTILS()
1224# ------------------------
1225# Minimum version: 1.1.0
1226#
1227# Call XORG_FONT_REQUIRED_PROG for programs needed for all font types
1228
1229AC_DEFUN([XORG_FONT_COMMON_UTILS],[
1230	XORG_FONT_FCCACHE
1231	XORG_FONT_REQUIRED_PROG(MKFONTDIR, mkfontdir)
1232])
1233
1234# XORG_FONT_SCALED_UTILS()
1235# ------------------------
1236# Minimum version: 1.1.0
1237#
1238# Call XORG_FONT_REQUIRED_PROG for programs needed for scalable fonts
1239# (TrueType, OpenType, Type1)
1240
1241AC_DEFUN([XORG_FONT_SCALED_UTILS],[
1242	XORG_FONT_COMMON_UTILS
1243	XORG_FONT_REQUIRED_PROG(MKFONTSCALE, mkfontscale)
1244])
1245
1246# XORG_FONT_BDF_UTILS()
1247# ---------------------
1248# Minimum version: 1.1.0
1249#
1250# Call XORG_FONT_REQUIRED_PROG for programs needed for BDF format bitmap fonts
1251# Also call XORG_FONT_CHECK_COMPRESSION to determine how to compress the
1252# PCF output files created by bdftopcf
1253
1254AC_DEFUN([XORG_FONT_BDF_UTILS],[
1255	XORG_FONT_COMMON_UTILS
1256	XORG_FONT_REQUIRED_PROG(BDFTOPCF, bdftopcf)
1257	XORG_FONT_CHECK_COMPRESSION
1258])
1259
1260# XORG_FONT_CHECK_COMPRESSION()
1261# -----------------------------
1262# Minimum version: 1.1.0
1263#
1264# Offer a --with-compression flag to control what compression method is
1265# used for pcf font files.   Offers all the methods currently supported
1266# by libXfont, including no compression.
1267
1268AC_DEFUN([XORG_FONT_CHECK_COMPRESSION],[
1269	AC_MSG_CHECKING([font compression method])
1270	AC_ARG_WITH(compression,
1271	 [AS_HELP_STRING([--with-compression=<no|compress|gzip|bzip2>],
1272			 [compression method to use on pcf fonts])],
1273         [compression="$withval"], [compression="yes"])
1274	if test x"$compression" = "xyes" ; then
1275		compression="gzip"
1276	fi
1277	AC_MSG_RESULT([${compression}])
1278	case ${compression} in
1279	 *compress)	COMPRESS_SUFFIX=".Z" ;;
1280	 *gzip)		COMPRESS_SUFFIX=".gz" ;;
1281	 *bzip2)	COMPRESS_SUFFIX=".bz2" ;;
1282	 no|none)	COMPRESS_SUFFIX="" ; COMPRESS="cat" ;;
1283	 *) AC_MSG_ERROR([${compression} is not a supported compression method]) ;;
1284	esac
1285	if test x"$COMPRESS_SUFFIX" != "x" ; then
1286	   XORG_FONT_REQUIRED_PROG(COMPRESS, ${compression})
1287	fi
1288	AC_SUBST([COMPRESS_SUFFIX])
1289])
1290
1291# XORG_FONT_UCS2ANY()
1292# -------------------
1293# Minimum version: 1.1.0
1294#
1295# Call XORG_FONT_REQUIRED_PROG for ucs2any program needed for splitting
1296# Unicode-encoded BDF format bitmap fonts into subsets for older encodings.
1297# Also call pkg-config to find the directory with the encoding files needed
1298# by ucs2any, and export it as MAPFILES_PATH to the Makefiles
1299
1300AC_DEFUN([XORG_FONT_UCS2ANY],[
1301	XORG_FONT_REQUIRED_PROG(UCS2ANY, ucs2any)
1302	PKG_CHECK_MODULES(MAPS, [fontutil])
1303	AC_MSG_CHECKING([for ucs2any encoding data files])
1304	MAPFILES_PATH=`pkg-config --variable=mapdir fontutil`
1305	AC_SUBST(MAPFILES_PATH)
1306	AC_MSG_RESULT([${MAPFILES_PATH}])
1307])
1308
1309
1310
1311# XORG_FONT_FC_CONFDIR()
1312# --------------------
1313# Minimum version: 1.2.0
1314#
1315# Sets FC_CONFDIR to the fontconfig config directory
1316# (which should be --with-confdir=... when building fontconfig)
1317# found from:
1318#	--with-fc-confdir=...
1319#	pkg-config --variable=confdir fontconfig
1320#	${sysconfdir}/fonts
1321
1322AC_DEFUN([XORG_FONT_FC_CONFDIR],[
1323	dnl Ensure $PKG_CONFIG is set first
1324	AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1325
1326	AC_MSG_CHECKING([for fontconfig's configuration directory])
1327	AC_ARG_WITH(fc-confdir,
1328		    AS_HELP_STRING([--with-fc-confdir=DIR],
1329			   [Path to fontconfig's configuration directory]),
1330		    [FC_CONFDIR="$withval"])
1331	# if --with-fc-confdir was not specified
1332	if test "x${FC_CONFDIR}" = "x"; then
1333		FC_CONFDIR=`$PKG_CONFIG --variable=confdir fontconfig`
1334	fi
1335	# ...and if pkg-config didn't find confdir in fontconfig.pc...
1336	if test "x${FC_CONFDIR}" = "x"; then
1337		FC_CONFDIR="${sysconfdir}/fonts"
1338	fi
1339	AC_SUBST(FC_CONFDIR)
1340	AC_MSG_RESULT([${FC_CONFDIR}])
1341])
1342
1343
1344
1345# XORG_FONTROOTDIR()
1346# --------------------
1347# Minimum version: 1.1.0
1348#
1349# Sets FONTROOTDIR to the root directory for font files.  Uses the first
1350# found from:
1351#	--with-fontrootdir
1352#	pkg-config --variable=fontrootdir fontutil
1353#	${datadir}/fonts/X11
1354
1355AC_DEFUN([XORG_FONTROOTDIR],[
1356	dnl Ensure $PKG_CONFIG is set first
1357	AC_REQUIRE([PKG_PROG_PKG_CONFIG])
1358
1359	AC_MSG_CHECKING([for root directory for font files])
1360	AC_ARG_WITH(fontrootdir,
1361		    AS_HELP_STRING([--with-fontrootdir=DIR],
1362			   [Path to root directory for font files]),
1363		    [FONTROOTDIR="$withval"])
1364	# if --with-fontrootdir not specified...
1365	if test "x${FONTROOTDIR}" = "x"; then
1366		FONTROOTDIR=`$PKG_CONFIG --variable=fontrootdir fontutil`
1367	fi
1368	# ...and if pkg-config didn't find fontdir in fontutil.pc...
1369	if test "x${FONTROOTDIR}" = "x"; then
1370		FONTROOTDIR="${datadir}/fonts/X11"
1371	fi
1372	AC_SUBST(FONTROOTDIR)
1373	AC_MSG_RESULT([${FONTROOTDIR}])
1374])
1375
1376# XORG_FONTSUBDIR(variable, flag, subdir)
1377# ---------------------------------------
1378# Minimum version: 1.1.0
1379#
1380# Offer a --with-<flag> flag to control directory for font installation
1381# Default is the specified <subdir> of the font root directory.
1382# Sets <variable> to the selected directory
1383
1384AC_DEFUN([XORG_FONTSUBDIR],[
1385	AC_REQUIRE([XORG_FONTROOTDIR])
1386
1387	AC_MSG_CHECKING([for directory for $3 files])
1388	AC_ARG_WITH($2,
1389		    [AS_HELP_STRING([--with-$2=DIR],
1390				    [Path to $3 files [FONTROOTDIR/$3]])],
1391		    [$1="${withval}"], [$1='${FONTROOTDIR}/$3'])
1392	AC_SUBST($1)
1393	AC_MSG_RESULT([${$1}])
1394]) # XORG_FONTSUBDIR
1395
1396# XORG_FONTDIR(subdir)
1397# --------------------
1398# Minimum version: 1.1.0
1399#
1400# Offer a --with-fontdir flag to control directory for font installation
1401# Default is the specified subdir of the font root directory.
1402# Sets FONTDIR to the selected directory
1403
1404AC_DEFUN([XORG_FONTDIR],[XORG_FONTSUBDIR([FONTDIR], [fontdir], [$1])])
1405
1406# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1407#
1408#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1409#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
1410#                 Inc.
1411#   Written by Gordon Matzigkeit, 1996
1412#
1413# This file is free software; the Free Software Foundation gives
1414# unlimited permission to copy and/or distribute it, with or without
1415# modifications, as long as this notice is preserved.
1416
1417m4_define([_LT_COPYING], [dnl
1418#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
1419#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
1420#                 Inc.
1421#   Written by Gordon Matzigkeit, 1996
1422#
1423#   This file is part of GNU Libtool.
1424#
1425# GNU Libtool is free software; you can redistribute it and/or
1426# modify it under the terms of the GNU General Public License as
1427# published by the Free Software Foundation; either version 2 of
1428# the License, or (at your option) any later version.
1429#
1430# As a special exception to the GNU General Public License,
1431# if you distribute this file as part of a program or library that
1432# is built using GNU Libtool, you may include this file under the
1433# same distribution terms that you use for the rest of that program.
1434#
1435# GNU Libtool is distributed in the hope that it will be useful,
1436# but WITHOUT ANY WARRANTY; without even the implied warranty of
1437# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1438# GNU General Public License for more details.
1439#
1440# You should have received a copy of the GNU General Public License
1441# along with GNU Libtool; see the file COPYING.  If not, a copy
1442# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
1443# obtained by writing to the Free Software Foundation, Inc.,
1444# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1445])
1446
1447# serial 57 LT_INIT
1448
1449
1450# LT_PREREQ(VERSION)
1451# ------------------
1452# Complain and exit if this libtool version is less that VERSION.
1453m4_defun([LT_PREREQ],
1454[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
1455       [m4_default([$3],
1456		   [m4_fatal([Libtool version $1 or higher is required],
1457		             63)])],
1458       [$2])])
1459
1460
1461# _LT_CHECK_BUILDDIR
1462# ------------------
1463# Complain if the absolute build directory name contains unusual characters
1464m4_defun([_LT_CHECK_BUILDDIR],
1465[case `pwd` in
1466  *\ * | *\	*)
1467    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
1468esac
1469])
1470
1471
1472# LT_INIT([OPTIONS])
1473# ------------------
1474AC_DEFUN([LT_INIT],
1475[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
1476AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1477AC_BEFORE([$0], [LT_LANG])dnl
1478AC_BEFORE([$0], [LT_OUTPUT])dnl
1479AC_BEFORE([$0], [LTDL_INIT])dnl
1480m4_require([_LT_CHECK_BUILDDIR])dnl
1481
1482dnl Autoconf doesn't catch unexpanded LT_ macros by default:
1483m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
1484m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
1485dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
1486dnl unless we require an AC_DEFUNed macro:
1487AC_REQUIRE([LTOPTIONS_VERSION])dnl
1488AC_REQUIRE([LTSUGAR_VERSION])dnl
1489AC_REQUIRE([LTVERSION_VERSION])dnl
1490AC_REQUIRE([LTOBSOLETE_VERSION])dnl
1491m4_require([_LT_PROG_LTMAIN])dnl
1492
1493_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
1494
1495dnl Parse OPTIONS
1496_LT_SET_OPTIONS([$0], [$1])
1497
1498# This can be used to rebuild libtool when needed
1499LIBTOOL_DEPS="$ltmain"
1500
1501# Always use our own libtool.
1502LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1503AC_SUBST(LIBTOOL)dnl
1504
1505_LT_SETUP
1506
1507# Only expand once:
1508m4_define([LT_INIT])
1509])# LT_INIT
1510
1511# Old names:
1512AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
1513AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
1514dnl aclocal-1.4 backwards compatibility:
1515dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
1516dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1517
1518
1519# _LT_CC_BASENAME(CC)
1520# -------------------
1521# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1522m4_defun([_LT_CC_BASENAME],
1523[for cc_temp in $1""; do
1524  case $cc_temp in
1525    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1526    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1527    \-*) ;;
1528    *) break;;
1529  esac
1530done
1531cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
1532])
1533
1534
1535# _LT_FILEUTILS_DEFAULTS
1536# ----------------------
1537# It is okay to use these file commands and assume they have been set
1538# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
1539m4_defun([_LT_FILEUTILS_DEFAULTS],
1540[: ${CP="cp -f"}
1541: ${MV="mv -f"}
1542: ${RM="rm -f"}
1543])# _LT_FILEUTILS_DEFAULTS
1544
1545
1546# _LT_SETUP
1547# ---------
1548m4_defun([_LT_SETUP],
1549[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1550AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1551AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
1552AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
1553
1554_LT_DECL([], [host_alias], [0], [The host system])dnl
1555_LT_DECL([], [host], [0])dnl
1556_LT_DECL([], [host_os], [0])dnl
1557dnl
1558_LT_DECL([], [build_alias], [0], [The build system])dnl
1559_LT_DECL([], [build], [0])dnl
1560_LT_DECL([], [build_os], [0])dnl
1561dnl
1562AC_REQUIRE([AC_PROG_CC])dnl
1563AC_REQUIRE([LT_PATH_LD])dnl
1564AC_REQUIRE([LT_PATH_NM])dnl
1565dnl
1566AC_REQUIRE([AC_PROG_LN_S])dnl
1567test -z "$LN_S" && LN_S="ln -s"
1568_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
1569dnl
1570AC_REQUIRE([LT_CMD_MAX_LEN])dnl
1571_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
1572_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
1573dnl
1574m4_require([_LT_FILEUTILS_DEFAULTS])dnl
1575m4_require([_LT_CHECK_SHELL_FEATURES])dnl
1576m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
1577m4_require([_LT_CMD_RELOAD])dnl
1578m4_require([_LT_CHECK_MAGIC_METHOD])dnl
1579m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
1580m4_require([_LT_CMD_OLD_ARCHIVE])dnl
1581m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
1582m4_require([_LT_WITH_SYSROOT])dnl
1583
1584_LT_CONFIG_LIBTOOL_INIT([
1585# See if we are running on zsh, and set the options which allow our
1586# commands through without removal of \ escapes INIT.
1587if test -n "\${ZSH_VERSION+set}" ; then
1588   setopt NO_GLOB_SUBST
1589fi
1590])
1591if test -n "${ZSH_VERSION+set}" ; then
1592   setopt NO_GLOB_SUBST
1593fi
1594
1595_LT_CHECK_OBJDIR
1596
1597m4_require([_LT_TAG_COMPILER])dnl
1598
1599case $host_os in
1600aix3*)
1601  # AIX sometimes has problems with the GCC collect2 program.  For some
1602  # reason, if we set the COLLECT_NAMES environment variable, the problems
1603  # vanish in a puff of smoke.
1604  if test "X${COLLECT_NAMES+set}" != Xset; then
1605    COLLECT_NAMES=
1606    export COLLECT_NAMES
1607  fi
1608  ;;
1609esac
1610
1611# Global variables:
1612ofile=libtool
1613can_build_shared=yes
1614
1615# All known linkers require a `.a' archive for static linking (except MSVC,
1616# which needs '.lib').
1617libext=a
1618
1619with_gnu_ld="$lt_cv_prog_gnu_ld"
1620
1621old_CC="$CC"
1622old_CFLAGS="$CFLAGS"
1623
1624# Set sane defaults for various variables
1625test -z "$CC" && CC=cc
1626test -z "$LTCC" && LTCC=$CC
1627test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1628test -z "$LD" && LD=ld
1629test -z "$ac_objext" && ac_objext=o
1630
1631_LT_CC_BASENAME([$compiler])
1632
1633# Only perform the check for file, if the check method requires it
1634test -z "$MAGIC_CMD" && MAGIC_CMD=file
1635case $deplibs_check_method in
1636file_magic*)
1637  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1638    _LT_PATH_MAGIC
1639  fi
1640  ;;
1641esac
1642
1643# Use C for the default configuration in the libtool script
1644LT_SUPPORTED_TAG([CC])
1645_LT_LANG_C_CONFIG
1646_LT_LANG_DEFAULT_CONFIG
1647_LT_CONFIG_COMMANDS
1648])# _LT_SETUP
1649
1650
1651# _LT_PREPARE_SED_QUOTE_VARS
1652# --------------------------
1653# Define a few sed substitution that help us do robust quoting.
1654m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
1655[# Backslashify metacharacters that are still active within
1656# double-quoted strings.
1657sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1658
1659# Same as above, but do not quote variable references.
1660double_quote_subst='s/\([["`\\]]\)/\\\1/g'
1661
1662# Sed substitution to delay expansion of an escaped shell variable in a
1663# double_quote_subst'ed string.
1664delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1665
1666# Sed substitution to delay expansion of an escaped single quote.
1667delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
1668
1669# Sed substitution to avoid accidental globbing in evaled expressions
1670no_glob_subst='s/\*/\\\*/g'
1671])
1672
1673# _LT_PROG_LTMAIN
1674# ---------------
1675# Note that this code is called both from `configure', and `config.status'
1676# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
1677# `config.status' has no value for ac_aux_dir unless we are using Automake,
1678# so we pass a copy along to make sure it has a sensible value anyway.
1679m4_defun([_LT_PROG_LTMAIN],
1680[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
1681_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
1682ltmain="$ac_aux_dir/ltmain.sh"
1683])# _LT_PROG_LTMAIN
1684
1685
1686
1687# So that we can recreate a full libtool script including additional
1688# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
1689# in macros and then make a single call at the end using the `libtool'
1690# label.
1691
1692
1693# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
1694# ----------------------------------------
1695# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1696m4_define([_LT_CONFIG_LIBTOOL_INIT],
1697[m4_ifval([$1],
1698          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
1699                     [$1
1700])])])
1701
1702# Initialize.
1703m4_define([_LT_OUTPUT_LIBTOOL_INIT])
1704
1705
1706# _LT_CONFIG_LIBTOOL([COMMANDS])
1707# ------------------------------
1708# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
1709m4_define([_LT_CONFIG_LIBTOOL],
1710[m4_ifval([$1],
1711          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
1712                     [$1
1713])])])
1714
1715# Initialize.
1716m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1717
1718
1719# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
1720# -----------------------------------------------------
1721m4_defun([_LT_CONFIG_SAVE_COMMANDS],
1722[_LT_CONFIG_LIBTOOL([$1])
1723_LT_CONFIG_LIBTOOL_INIT([$2])
1724])
1725
1726
1727# _LT_FORMAT_COMMENT([COMMENT])
1728# -----------------------------
1729# Add leading comment marks to the start of each line, and a trailing
1730# full-stop to the whole comment if one is not present already.
1731m4_define([_LT_FORMAT_COMMENT],
1732[m4_ifval([$1], [
1733m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
1734              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
1735)])
1736
1737
1738
1739
1740
1741# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
1742# -------------------------------------------------------------------
1743# CONFIGNAME is the name given to the value in the libtool script.
1744# VARNAME is the (base) name used in the configure script.
1745# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
1746# VARNAME.  Any other value will be used directly.
1747m4_define([_LT_DECL],
1748[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
1749    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
1750	[m4_ifval([$1], [$1], [$2])])
1751    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
1752    m4_ifval([$4],
1753	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
1754    lt_dict_add_subkey([lt_decl_dict], [$2],
1755	[tagged?], [m4_ifval([$5], [yes], [no])])])
1756])
1757
1758
1759# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
1760# --------------------------------------------------------
1761m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1762
1763
1764# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
1765# ------------------------------------------------
1766m4_define([lt_decl_tag_varnames],
1767[_lt_decl_filter([tagged?], [yes], $@)])
1768
1769
1770# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
1771# ---------------------------------------------------------
1772m4_define([_lt_decl_filter],
1773[m4_case([$#],
1774  [0], [m4_fatal([$0: too few arguments: $#])],
1775  [1], [m4_fatal([$0: too few arguments: $#: $1])],
1776  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
1777  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
1778  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
1779])
1780
1781
1782# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
1783# --------------------------------------------------
1784m4_define([lt_decl_quote_varnames],
1785[_lt_decl_filter([value], [1], $@)])
1786
1787
1788# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
1789# ---------------------------------------------------
1790m4_define([lt_decl_dquote_varnames],
1791[_lt_decl_filter([value], [2], $@)])
1792
1793
1794# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
1795# ---------------------------------------------------
1796m4_define([lt_decl_varnames_tagged],
1797[m4_assert([$# <= 2])dnl
1798_$0(m4_quote(m4_default([$1], [[, ]])),
1799    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
1800    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
1801m4_define([_lt_decl_varnames_tagged],
1802[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1803
1804
1805# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
1806# ------------------------------------------------
1807m4_define([lt_decl_all_varnames],
1808[_$0(m4_quote(m4_default([$1], [[, ]])),
1809     m4_if([$2], [],
1810	   m4_quote(lt_decl_varnames),
1811	m4_quote(m4_shift($@))))[]dnl
1812])
1813m4_define([_lt_decl_all_varnames],
1814[lt_join($@, lt_decl_varnames_tagged([$1],
1815			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
1816])
1817
1818
1819# _LT_CONFIG_STATUS_DECLARE([VARNAME])
1820# ------------------------------------
1821# Quote a variable value, and forward it to `config.status' so that its
1822# declaration there will have the same value as in `configure'.  VARNAME
1823# must have a single quote delimited value for this to work.
1824m4_define([_LT_CONFIG_STATUS_DECLARE],
1825[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
1826
1827
1828# _LT_CONFIG_STATUS_DECLARATIONS
1829# ------------------------------
1830# We delimit libtool config variables with single quotes, so when
1831# we write them to config.status, we have to be sure to quote all
1832# embedded single quotes properly.  In configure, this macro expands
1833# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1834#
1835#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
1836m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
1837[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
1838    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1839
1840
1841# _LT_LIBTOOL_TAGS
1842# ----------------
1843# Output comment and list of tags supported by the script
1844m4_defun([_LT_LIBTOOL_TAGS],
1845[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
1846available_tags="_LT_TAGS"dnl
1847])
1848
1849
1850# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
1851# -----------------------------------
1852# Extract the dictionary values for VARNAME (optionally with TAG) and
1853# expand to a commented shell variable setting:
1854#
1855#    # Some comment about what VAR is for.
1856#    visible_name=$lt_internal_name
1857m4_define([_LT_LIBTOOL_DECLARE],
1858[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
1859					   [description])))[]dnl
1860m4_pushdef([_libtool_name],
1861    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
1862m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
1863    [0], [_libtool_name=[$]$1],
1864    [1], [_libtool_name=$lt_[]$1],
1865    [2], [_libtool_name=$lt_[]$1],
1866    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
1867m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
1868])
1869
1870
1871# _LT_LIBTOOL_CONFIG_VARS
1872# -----------------------
1873# Produce commented declarations of non-tagged libtool config variables
1874# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
1875# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
1876# section) are produced by _LT_LIBTOOL_TAG_VARS.
1877m4_defun([_LT_LIBTOOL_CONFIG_VARS],
1878[m4_foreach([_lt_var],
1879    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
1880    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1881
1882
1883# _LT_LIBTOOL_TAG_VARS(TAG)
1884# -------------------------
1885m4_define([_LT_LIBTOOL_TAG_VARS],
1886[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
1887    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1888
1889
1890# _LT_TAGVAR(VARNAME, [TAGNAME])
1891# ------------------------------
1892m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1893
1894
1895# _LT_CONFIG_COMMANDS
1896# -------------------
1897# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
1898# variables for single and double quote escaping we saved from calls
1899# to _LT_DECL, we can put quote escaped variables declarations
1900# into `config.status', and then the shell code to quote escape them in
1901# for loops in `config.status'.  Finally, any additional code accumulated
1902# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
1903m4_defun([_LT_CONFIG_COMMANDS],
1904[AC_PROVIDE_IFELSE([LT_OUTPUT],
1905	dnl If the libtool generation code has been placed in $CONFIG_LT,
1906	dnl instead of duplicating it all over again into config.status,
1907	dnl then we will have config.status run $CONFIG_LT later, so it
1908	dnl needs to know what name is stored there:
1909        [AC_CONFIG_COMMANDS([libtool],
1910            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
1911    dnl If the libtool generation code is destined for config.status,
1912    dnl expand the accumulated commands and init code now:
1913    [AC_CONFIG_COMMANDS([libtool],
1914        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
1915])#_LT_CONFIG_COMMANDS
1916
1917
1918# Initialize.
1919m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
1920[
1921
1922# The HP-UX ksh and POSIX shell print the target directory to stdout
1923# if CDPATH is set.
1924(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
1925
1926sed_quote_subst='$sed_quote_subst'
1927double_quote_subst='$double_quote_subst'
1928delay_variable_subst='$delay_variable_subst'
1929_LT_CONFIG_STATUS_DECLARATIONS
1930LTCC='$LTCC'
1931LTCFLAGS='$LTCFLAGS'
1932compiler='$compiler_DEFAULT'
1933
1934# A function that is used when there is no print builtin or printf.
1935func_fallback_echo ()
1936{
1937  eval 'cat <<_LTECHO_EOF
1938\$[]1
1939_LTECHO_EOF'
1940}
1941
1942# Quote evaled strings.
1943for var in lt_decl_all_varnames([[ \
1944]], lt_decl_quote_varnames); do
1945    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1946    *[[\\\\\\\`\\"\\\$]]*)
1947      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
1948      ;;
1949    *)
1950      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1951      ;;
1952    esac
1953done
1954
1955# Double-quote double-evaled strings.
1956for var in lt_decl_all_varnames([[ \
1957]], lt_decl_dquote_varnames); do
1958    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
1959    *[[\\\\\\\`\\"\\\$]]*)
1960      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
1961      ;;
1962    *)
1963      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
1964      ;;
1965    esac
1966done
1967
1968_LT_OUTPUT_LIBTOOL_INIT
1969])
1970
1971# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
1972# ------------------------------------
1973# Generate a child script FILE with all initialization necessary to
1974# reuse the environment learned by the parent script, and make the
1975# file executable.  If COMMENT is supplied, it is inserted after the
1976# `#!' sequence but before initialization text begins.  After this
1977# macro, additional text can be appended to FILE to form the body of
1978# the child script.  The macro ends with non-zero status if the
1979# file could not be fully written (such as if the disk is full).
1980m4_ifdef([AS_INIT_GENERATED],
1981[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
1982[m4_defun([_LT_GENERATED_FILE_INIT],
1983[m4_require([AS_PREPARE])]dnl
1984[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
1985[lt_write_fail=0
1986cat >$1 <<_ASEOF || lt_write_fail=1
1987#! $SHELL
1988# Generated by $as_me.
1989$2
1990SHELL=\${CONFIG_SHELL-$SHELL}
1991export SHELL
1992_ASEOF
1993cat >>$1 <<\_ASEOF || lt_write_fail=1
1994AS_SHELL_SANITIZE
1995_AS_PREPARE
1996exec AS_MESSAGE_FD>&1
1997_ASEOF
1998test $lt_write_fail = 0 && chmod +x $1[]dnl
1999m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
2000
2001# LT_OUTPUT
2002# ---------
2003# This macro allows early generation of the libtool script (before
2004# AC_OUTPUT is called), incase it is used in configure for compilation
2005# tests.
2006AC_DEFUN([LT_OUTPUT],
2007[: ${CONFIG_LT=./config.lt}
2008AC_MSG_NOTICE([creating $CONFIG_LT])
2009_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
2010[# Run this file to recreate a libtool stub with the current configuration.])
2011
2012cat >>"$CONFIG_LT" <<\_LTEOF
2013lt_cl_silent=false
2014exec AS_MESSAGE_LOG_FD>>config.log
2015{
2016  echo
2017  AS_BOX([Running $as_me.])
2018} >&AS_MESSAGE_LOG_FD
2019
2020lt_cl_help="\
2021\`$as_me' creates a local libtool stub from the current configuration,
2022for use in further configure time tests before the real libtool is
2023generated.
2024
2025Usage: $[0] [[OPTIONS]]
2026
2027  -h, --help      print this help, then exit
2028  -V, --version   print version number, then exit
2029  -q, --quiet     do not print progress messages
2030  -d, --debug     don't remove temporary files
2031
2032Report bugs to <bug-libtool@gnu.org>."
2033
2034lt_cl_version="\
2035m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
2036m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
2037configured by $[0], generated by m4_PACKAGE_STRING.
2038
2039Copyright (C) 2010 Free Software Foundation, Inc.
2040This config.lt script is free software; the Free Software Foundation
2041gives unlimited permision to copy, distribute and modify it."
2042
2043while test $[#] != 0
2044do
2045  case $[1] in
2046    --version | --v* | -V )
2047      echo "$lt_cl_version"; exit 0 ;;
2048    --help | --h* | -h )
2049      echo "$lt_cl_help"; exit 0 ;;
2050    --debug | --d* | -d )
2051      debug=: ;;
2052    --quiet | --q* | --silent | --s* | -q )
2053      lt_cl_silent=: ;;
2054
2055    -*) AC_MSG_ERROR([unrecognized option: $[1]
2056Try \`$[0] --help' for more information.]) ;;
2057
2058    *) AC_MSG_ERROR([unrecognized argument: $[1]
2059Try \`$[0] --help' for more information.]) ;;
2060  esac
2061  shift
2062done
2063
2064if $lt_cl_silent; then
2065  exec AS_MESSAGE_FD>/dev/null
2066fi
2067_LTEOF
2068
2069cat >>"$CONFIG_LT" <<_LTEOF
2070_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
2071_LTEOF
2072
2073cat >>"$CONFIG_LT" <<\_LTEOF
2074AC_MSG_NOTICE([creating $ofile])
2075_LT_OUTPUT_LIBTOOL_COMMANDS
2076AS_EXIT(0)
2077_LTEOF
2078chmod +x "$CONFIG_LT"
2079
2080# configure is writing to config.log, but config.lt does its own redirection,
2081# appending to config.log, which fails on DOS, as config.log is still kept
2082# open by configure.  Here we exec the FD to /dev/null, effectively closing
2083# config.log, so it can be properly (re)opened and appended to by config.lt.
2084lt_cl_success=:
2085test "$silent" = yes &&
2086  lt_config_lt_args="$lt_config_lt_args --quiet"
2087exec AS_MESSAGE_LOG_FD>/dev/null
2088$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
2089exec AS_MESSAGE_LOG_FD>>config.log
2090$lt_cl_success || AS_EXIT(1)
2091])# LT_OUTPUT
2092
2093
2094# _LT_CONFIG(TAG)
2095# ---------------
2096# If TAG is the built-in tag, create an initial libtool script with a
2097# default configuration from the untagged config vars.  Otherwise add code
2098# to config.status for appending the configuration named by TAG from the
2099# matching tagged config vars.
2100m4_defun([_LT_CONFIG],
2101[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2102_LT_CONFIG_SAVE_COMMANDS([
2103  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
2104  m4_if(_LT_TAG, [C], [
2105    # See if we are running on zsh, and set the options which allow our
2106    # commands through without removal of \ escapes.
2107    if test -n "${ZSH_VERSION+set}" ; then
2108      setopt NO_GLOB_SUBST
2109    fi
2110
2111    cfgfile="${ofile}T"
2112    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
2113    $RM "$cfgfile"
2114
2115    cat <<_LT_EOF >> "$cfgfile"
2116#! $SHELL
2117
2118# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2119# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
2120# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2121# NOTE: Changes made to this file will be lost: look at ltmain.sh.
2122#
2123_LT_COPYING
2124_LT_LIBTOOL_TAGS
2125
2126# ### BEGIN LIBTOOL CONFIG
2127_LT_LIBTOOL_CONFIG_VARS
2128_LT_LIBTOOL_TAG_VARS
2129# ### END LIBTOOL CONFIG
2130
2131_LT_EOF
2132
2133  case $host_os in
2134  aix3*)
2135    cat <<\_LT_EOF >> "$cfgfile"
2136# AIX sometimes has problems with the GCC collect2 program.  For some
2137# reason, if we set the COLLECT_NAMES environment variable, the problems
2138# vanish in a puff of smoke.
2139if test "X${COLLECT_NAMES+set}" != Xset; then
2140  COLLECT_NAMES=
2141  export COLLECT_NAMES
2142fi
2143_LT_EOF
2144    ;;
2145  esac
2146
2147  _LT_PROG_LTMAIN
2148
2149  # We use sed instead of cat because bash on DJGPP gets confused if
2150  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
2151  # text mode, it properly converts lines to CR/LF.  This bash problem
2152  # is reportedly fixed, but why not run on old versions too?
2153  sed '$q' "$ltmain" >> "$cfgfile" \
2154     || (rm -f "$cfgfile"; exit 1)
2155
2156  _LT_PROG_REPLACE_SHELLFNS
2157
2158   mv -f "$cfgfile" "$ofile" ||
2159    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
2160  chmod +x "$ofile"
2161],
2162[cat <<_LT_EOF >> "$ofile"
2163
2164dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
2165dnl in a comment (ie after a #).
2166# ### BEGIN LIBTOOL TAG CONFIG: $1
2167_LT_LIBTOOL_TAG_VARS(_LT_TAG)
2168# ### END LIBTOOL TAG CONFIG: $1
2169_LT_EOF
2170])dnl /m4_if
2171],
2172[m4_if([$1], [], [
2173    PACKAGE='$PACKAGE'
2174    VERSION='$VERSION'
2175    TIMESTAMP='$TIMESTAMP'
2176    RM='$RM'
2177    ofile='$ofile'], [])
2178])dnl /_LT_CONFIG_SAVE_COMMANDS
2179])# _LT_CONFIG
2180
2181
2182# LT_SUPPORTED_TAG(TAG)
2183# ---------------------
2184# Trace this macro to discover what tags are supported by the libtool
2185# --tag option, using:
2186#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
2187AC_DEFUN([LT_SUPPORTED_TAG], [])
2188
2189
2190# C support is built-in for now
2191m4_define([_LT_LANG_C_enabled], [])
2192m4_define([_LT_TAGS], [])
2193
2194
2195# LT_LANG(LANG)
2196# -------------
2197# Enable libtool support for the given language if not already enabled.
2198AC_DEFUN([LT_LANG],
2199[AC_BEFORE([$0], [LT_OUTPUT])dnl
2200m4_case([$1],
2201  [C],			[_LT_LANG(C)],
2202  [C++],		[_LT_LANG(CXX)],
2203  [Java],		[_LT_LANG(GCJ)],
2204  [Fortran 77],		[_LT_LANG(F77)],
2205  [Fortran],		[_LT_LANG(FC)],
2206  [Windows Resource],	[_LT_LANG(RC)],
2207  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
2208    [_LT_LANG($1)],
2209    [m4_fatal([$0: unsupported language: "$1"])])])dnl
2210])# LT_LANG
2211
2212
2213# _LT_LANG(LANGNAME)
2214# ------------------
2215m4_defun([_LT_LANG],
2216[m4_ifdef([_LT_LANG_]$1[_enabled], [],
2217  [LT_SUPPORTED_TAG([$1])dnl
2218  m4_append([_LT_TAGS], [$1 ])dnl
2219  m4_define([_LT_LANG_]$1[_enabled], [])dnl
2220  _LT_LANG_$1_CONFIG($1)])dnl
2221])# _LT_LANG
2222
2223
2224# _LT_LANG_DEFAULT_CONFIG
2225# -----------------------
2226m4_defun([_LT_LANG_DEFAULT_CONFIG],
2227[AC_PROVIDE_IFELSE([AC_PROG_CXX],
2228  [LT_LANG(CXX)],
2229  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
2230
2231AC_PROVIDE_IFELSE([AC_PROG_F77],
2232  [LT_LANG(F77)],
2233  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
2234
2235AC_PROVIDE_IFELSE([AC_PROG_FC],
2236  [LT_LANG(FC)],
2237  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
2238
2239dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
2240dnl pulling things in needlessly.
2241AC_PROVIDE_IFELSE([AC_PROG_GCJ],
2242  [LT_LANG(GCJ)],
2243  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
2244    [LT_LANG(GCJ)],
2245    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
2246      [LT_LANG(GCJ)],
2247      [m4_ifdef([AC_PROG_GCJ],
2248	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
2249       m4_ifdef([A][M_PROG_GCJ],
2250	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
2251       m4_ifdef([LT_PROG_GCJ],
2252	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
2253
2254AC_PROVIDE_IFELSE([LT_PROG_RC],
2255  [LT_LANG(RC)],
2256  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
2257])# _LT_LANG_DEFAULT_CONFIG
2258
2259# Obsolete macros:
2260AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
2261AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
2262AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
2263AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
2264AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
2265dnl aclocal-1.4 backwards compatibility:
2266dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
2267dnl AC_DEFUN([AC_LIBTOOL_F77], [])
2268dnl AC_DEFUN([AC_LIBTOOL_FC], [])
2269dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
2270dnl AC_DEFUN([AC_LIBTOOL_RC], [])
2271
2272
2273# _LT_TAG_COMPILER
2274# ----------------
2275m4_defun([_LT_TAG_COMPILER],
2276[AC_REQUIRE([AC_PROG_CC])dnl
2277
2278_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
2279_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
2280_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
2281_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
2282
2283# If no C compiler was specified, use CC.
2284LTCC=${LTCC-"$CC"}
2285
2286# If no C compiler flags were specified, use CFLAGS.
2287LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
2288
2289# Allow CC to be a program name with arguments.
2290compiler=$CC
2291])# _LT_TAG_COMPILER
2292
2293
2294# _LT_COMPILER_BOILERPLATE
2295# ------------------------
2296# Check for compiler boilerplate output or warnings with
2297# the simple compiler test code.
2298m4_defun([_LT_COMPILER_BOILERPLATE],
2299[m4_require([_LT_DECL_SED])dnl
2300ac_outfile=conftest.$ac_objext
2301echo "$lt_simple_compile_test_code" >conftest.$ac_ext
2302eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2303_lt_compiler_boilerplate=`cat conftest.err`
2304$RM conftest*
2305])# _LT_COMPILER_BOILERPLATE
2306
2307
2308# _LT_LINKER_BOILERPLATE
2309# ----------------------
2310# Check for linker boilerplate output or warnings with
2311# the simple link test code.
2312m4_defun([_LT_LINKER_BOILERPLATE],
2313[m4_require([_LT_DECL_SED])dnl
2314ac_outfile=conftest.$ac_objext
2315echo "$lt_simple_link_test_code" >conftest.$ac_ext
2316eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
2317_lt_linker_boilerplate=`cat conftest.err`
2318$RM -r conftest*
2319])# _LT_LINKER_BOILERPLATE
2320
2321# _LT_REQUIRED_DARWIN_CHECKS
2322# -------------------------
2323m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
2324  case $host_os in
2325    rhapsody* | darwin*)
2326    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
2327    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
2328    AC_CHECK_TOOL([LIPO], [lipo], [:])
2329    AC_CHECK_TOOL([OTOOL], [otool], [:])
2330    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
2331    _LT_DECL([], [DSYMUTIL], [1],
2332      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
2333    _LT_DECL([], [NMEDIT], [1],
2334      [Tool to change global to local symbols on Mac OS X])
2335    _LT_DECL([], [LIPO], [1],
2336      [Tool to manipulate fat objects and archives on Mac OS X])
2337    _LT_DECL([], [OTOOL], [1],
2338      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
2339    _LT_DECL([], [OTOOL64], [1],
2340      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
2341
2342    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
2343      [lt_cv_apple_cc_single_mod=no
2344      if test -z "${LT_MULTI_MODULE}"; then
2345	# By default we will add the -single_module flag. You can override
2346	# by either setting the environment variable LT_MULTI_MODULE
2347	# non-empty at configure time, or by adding -multi_module to the
2348	# link flags.
2349	rm -rf libconftest.dylib*
2350	echo "int foo(void){return 1;}" > conftest.c
2351	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2352-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
2353	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
2354	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
2355        _lt_result=$?
2356	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
2357	  lt_cv_apple_cc_single_mod=yes
2358	else
2359	  cat conftest.err >&AS_MESSAGE_LOG_FD
2360	fi
2361	rm -rf libconftest.dylib*
2362	rm -f conftest.*
2363      fi])
2364    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
2365      [lt_cv_ld_exported_symbols_list],
2366      [lt_cv_ld_exported_symbols_list=no
2367      save_LDFLAGS=$LDFLAGS
2368      echo "_main" > conftest.sym
2369      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
2370      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
2371	[lt_cv_ld_exported_symbols_list=yes],
2372	[lt_cv_ld_exported_symbols_list=no])
2373	LDFLAGS="$save_LDFLAGS"
2374    ])
2375    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
2376      [lt_cv_ld_force_load=no
2377      cat > conftest.c << _LT_EOF
2378int forced_loaded() { return 2;}
2379_LT_EOF
2380      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
2381      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
2382      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
2383      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
2384      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
2385      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
2386      cat > conftest.c << _LT_EOF
2387int main() { return 0;}
2388_LT_EOF
2389      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
2390      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
2391      _lt_result=$?
2392      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
2393	lt_cv_ld_force_load=yes
2394      else
2395	cat conftest.err >&AS_MESSAGE_LOG_FD
2396      fi
2397        rm -f conftest.err libconftest.a conftest conftest.c
2398        rm -rf conftest.dSYM
2399    ])
2400    case $host_os in
2401    rhapsody* | darwin1.[[012]])
2402      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
2403    darwin1.*)
2404      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2405    darwin*) # darwin 5.x on
2406      # if running on 10.5 or later, the deployment target defaults
2407      # to the OS version, if on x86, and 10.4, the deployment
2408      # target defaults to 10.4. Don't you love it?
2409      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
2410	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
2411	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2412	10.[[012]]*)
2413	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
2414	10.*)
2415	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
2416      esac
2417    ;;
2418  esac
2419    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
2420      _lt_dar_single_mod='$single_module'
2421    fi
2422    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
2423      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
2424    else
2425      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
2426    fi
2427    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
2428      _lt_dsymutil='~$DSYMUTIL $lib || :'
2429    else
2430      _lt_dsymutil=
2431    fi
2432    ;;
2433  esac
2434])
2435
2436
2437# _LT_DARWIN_LINKER_FEATURES
2438# --------------------------
2439# Checks for linker and compiler features on darwin
2440m4_defun([_LT_DARWIN_LINKER_FEATURES],
2441[
2442  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
2443  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
2444  _LT_TAGVAR(hardcode_direct, $1)=no
2445  _LT_TAGVAR(hardcode_automatic, $1)=yes
2446  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2447  if test "$lt_cv_ld_force_load" = "yes"; then
2448    _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\"`'
2449  else
2450    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
2451  fi
2452  _LT_TAGVAR(link_all_deplibs, $1)=yes
2453  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
2454  case $cc_basename in
2455     ifort*) _lt_dar_can_shared=yes ;;
2456     *) _lt_dar_can_shared=$GCC ;;
2457  esac
2458  if test "$_lt_dar_can_shared" = "yes"; then
2459    output_verbose_link_cmd=func_echo_all
2460    _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}"
2461    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
2462    _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}"
2463    _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}"
2464    m4_if([$1], [CXX],
2465[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
2466      _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}"
2467      _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}"
2468    fi
2469],[])
2470  else
2471  _LT_TAGVAR(ld_shlibs, $1)=no
2472  fi
2473])
2474
2475# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
2476# ----------------------------------
2477# Links a minimal program and checks the executable
2478# for the system default hardcoded library path. In most cases,
2479# this is /usr/lib:/lib, but when the MPI compilers are used
2480# the location of the communication and MPI libs are included too.
2481# If we don't find anything, use the default library path according
2482# to the aix ld manual.
2483# Store the results from the different compilers for each TAGNAME.
2484# Allow to override them for all tags through lt_cv_aix_libpath.
2485m4_defun([_LT_SYS_MODULE_PATH_AIX],
2486[m4_require([_LT_DECL_SED])dnl
2487if test "${lt_cv_aix_libpath+set}" = set; then
2488  aix_libpath=$lt_cv_aix_libpath
2489else
2490  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
2491  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
2492  lt_aix_libpath_sed='[
2493      /Import File Strings/,/^$/ {
2494	  /^0/ {
2495	      s/^0  *\([^ ]*\) *$/\1/
2496	      p
2497	  }
2498      }]'
2499  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2500  # Check for a 64-bit object if we didn't find anything.
2501  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2502    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2503  fi],[])
2504  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
2505    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
2506  fi
2507  ])
2508  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
2509fi
2510])# _LT_SYS_MODULE_PATH_AIX
2511
2512
2513# _LT_SHELL_INIT(ARG)
2514# -------------------
2515m4_define([_LT_SHELL_INIT],
2516[m4_divert_text([M4SH-INIT], [$1
2517])])# _LT_SHELL_INIT
2518
2519
2520
2521# _LT_PROG_ECHO_BACKSLASH
2522# -----------------------
2523# Find how we can fake an echo command that does not interpret backslash.
2524# In particular, with Autoconf 2.60 or later we add some code to the start
2525# of the generated configure script which will find a shell with a builtin
2526# printf (which we can use as an echo command).
2527m4_defun([_LT_PROG_ECHO_BACKSLASH],
2528[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2529ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2530ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2531
2532AC_MSG_CHECKING([how to print strings])
2533# Test print first, because it will be a builtin if present.
2534if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
2535   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
2536  ECHO='print -r --'
2537elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
2538  ECHO='printf %s\n'
2539else
2540  # Use this function as a fallback that always works.
2541  func_fallback_echo ()
2542  {
2543    eval 'cat <<_LTECHO_EOF
2544$[]1
2545_LTECHO_EOF'
2546  }
2547  ECHO='func_fallback_echo'
2548fi
2549
2550# func_echo_all arg...
2551# Invoke $ECHO with all args, space-separated.
2552func_echo_all ()
2553{
2554    $ECHO "$*" 
2555}
2556
2557case "$ECHO" in
2558  printf*) AC_MSG_RESULT([printf]) ;;
2559  print*) AC_MSG_RESULT([print -r]) ;;
2560  *) AC_MSG_RESULT([cat]) ;;
2561esac
2562
2563m4_ifdef([_AS_DETECT_SUGGESTED],
2564[_AS_DETECT_SUGGESTED([
2565  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
2566    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
2567    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
2568    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2569    PATH=/empty FPATH=/empty; export PATH FPATH
2570    test "X`printf %s $ECHO`" = "X$ECHO" \
2571      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
2572
2573_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
2574_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
2575])# _LT_PROG_ECHO_BACKSLASH
2576
2577
2578# _LT_WITH_SYSROOT
2579# ----------------
2580AC_DEFUN([_LT_WITH_SYSROOT],
2581[AC_MSG_CHECKING([for sysroot])
2582AC_ARG_WITH([sysroot],
2583[  --with-sysroot[=DIR] Search for dependent libraries within DIR
2584                        (or the compiler's sysroot if not specified).],
2585[], [with_sysroot=no])
2586
2587dnl lt_sysroot will always be passed unquoted.  We quote it here
2588dnl in case the user passed a directory name.
2589lt_sysroot=
2590case ${with_sysroot} in #(
2591 yes)
2592   if test "$GCC" = yes; then
2593     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
2594   fi
2595   ;; #(
2596 /*)
2597   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
2598   ;; #(
2599 no|'')
2600   ;; #(
2601 *)
2602   AC_MSG_RESULT([${with_sysroot}])
2603   AC_MSG_ERROR([The sysroot must be an absolute path.])
2604   ;;
2605esac
2606
2607 AC_MSG_RESULT([${lt_sysroot:-no}])
2608_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
2609[dependent libraries, and in which our libraries should be installed.])])
2610
2611# _LT_ENABLE_LOCK
2612# ---------------
2613m4_defun([_LT_ENABLE_LOCK],
2614[AC_ARG_ENABLE([libtool-lock],
2615  [AS_HELP_STRING([--disable-libtool-lock],
2616    [avoid locking (might break parallel builds)])])
2617test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2618
2619# Some flags need to be propagated to the compiler or linker for good
2620# libtool support.
2621case $host in
2622ia64-*-hpux*)
2623  # Find out which ABI we are using.
2624  echo 'int i;' > conftest.$ac_ext
2625  if AC_TRY_EVAL(ac_compile); then
2626    case `/usr/bin/file conftest.$ac_objext` in
2627      *ELF-32*)
2628	HPUX_IA64_MODE="32"
2629	;;
2630      *ELF-64*)
2631	HPUX_IA64_MODE="64"
2632	;;
2633    esac
2634  fi
2635  rm -rf conftest*
2636  ;;
2637*-*-irix6*)
2638  # Find out which ABI we are using.
2639  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
2640  if AC_TRY_EVAL(ac_compile); then
2641    if test "$lt_cv_prog_gnu_ld" = yes; then
2642      case `/usr/bin/file conftest.$ac_objext` in
2643	*32-bit*)
2644	  LD="${LD-ld} -melf32bsmip"
2645	  ;;
2646	*N32*)
2647	  LD="${LD-ld} -melf32bmipn32"
2648	  ;;
2649	*64-bit*)
2650	  LD="${LD-ld} -melf64bmip"
2651	;;
2652      esac
2653    else
2654      case `/usr/bin/file conftest.$ac_objext` in
2655	*32-bit*)
2656	  LD="${LD-ld} -32"
2657	  ;;
2658	*N32*)
2659	  LD="${LD-ld} -n32"
2660	  ;;
2661	*64-bit*)
2662	  LD="${LD-ld} -64"
2663	  ;;
2664      esac
2665    fi
2666  fi
2667  rm -rf conftest*
2668  ;;
2669
2670x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2671s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
2672  # Find out which ABI we are using.
2673  echo 'int i;' > conftest.$ac_ext
2674  if AC_TRY_EVAL(ac_compile); then
2675    case `/usr/bin/file conftest.o` in
2676      *32-bit*)
2677	case $host in
2678	  x86_64-*kfreebsd*-gnu)
2679	    LD="${LD-ld} -m elf_i386_fbsd"
2680	    ;;
2681	  x86_64-*linux*)
2682	    LD="${LD-ld} -m elf_i386"
2683	    ;;
2684	  ppc64-*linux*|powerpc64-*linux*)
2685	    LD="${LD-ld} -m elf32ppclinux"
2686	    ;;
2687	  s390x-*linux*)
2688	    LD="${LD-ld} -m elf_s390"
2689	    ;;
2690	  sparc64-*linux*)
2691	    LD="${LD-ld} -m elf32_sparc"
2692	    ;;
2693	esac
2694	;;
2695      *64-bit*)
2696	case $host in
2697	  x86_64-*kfreebsd*-gnu)
2698	    LD="${LD-ld} -m elf_x86_64_fbsd"
2699	    ;;
2700	  x86_64-*linux*)
2701	    LD="${LD-ld} -m elf_x86_64"
2702	    ;;
2703	  ppc*-*linux*|powerpc*-*linux*)
2704	    LD="${LD-ld} -m elf64ppc"
2705	    ;;
2706	  s390*-*linux*|s390*-*tpf*)
2707	    LD="${LD-ld} -m elf64_s390"
2708	    ;;
2709	  sparc*-*linux*)
2710	    LD="${LD-ld} -m elf64_sparc"
2711	    ;;
2712	esac
2713	;;
2714    esac
2715  fi
2716  rm -rf conftest*
2717  ;;
2718
2719*-*-sco3.2v5*)
2720  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2721  SAVE_CFLAGS="$CFLAGS"
2722  CFLAGS="$CFLAGS -belf"
2723  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2724    [AC_LANG_PUSH(C)
2725     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2726     AC_LANG_POP])
2727  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2728    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2729    CFLAGS="$SAVE_CFLAGS"
2730  fi
2731  ;;
2732sparc*-*solaris*)
2733  # Find out which ABI we are using.
2734  echo 'int i;' > conftest.$ac_ext
2735  if AC_TRY_EVAL(ac_compile); then
2736    case `/usr/bin/file conftest.o` in
2737    *64-bit*)
2738      case $lt_cv_prog_gnu_ld in
2739      yes*) LD="${LD-ld} -m elf64_sparc" ;;
2740      *)
2741	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2742	  LD="${LD-ld} -64"
2743	fi
2744	;;
2745      esac
2746      ;;
2747    esac
2748  fi
2749  rm -rf conftest*
2750  ;;
2751esac
2752
2753need_locks="$enable_libtool_lock"
2754])# _LT_ENABLE_LOCK
2755
2756
2757# _LT_PROG_AR
2758# -----------
2759m4_defun([_LT_PROG_AR],
2760[AC_CHECK_TOOLS(AR, [ar], false)
2761: ${AR=ar}
2762: ${AR_FLAGS=cru}
2763_LT_DECL([], [AR], [1], [The archiver])
2764_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
2765
2766AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
2767  [lt_cv_ar_at_file=no
2768   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
2769     [echo conftest.$ac_objext > conftest.lst
2770      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
2771      AC_TRY_EVAL([lt_ar_try])
2772      if test "$ac_status" -eq 0; then
2773	# Ensure the archiver fails upon bogus file names.
2774	rm -f conftest.$ac_objext libconftest.a
2775	AC_TRY_EVAL([lt_ar_try])
2776	if test "$ac_status" -ne 0; then
2777          lt_cv_ar_at_file=@
2778        fi
2779      fi
2780      rm -f conftest.* libconftest.a
2781     ])
2782  ])
2783
2784if test "x$lt_cv_ar_at_file" = xno; then
2785  archiver_list_spec=
2786else
2787  archiver_list_spec=$lt_cv_ar_at_file
2788fi
2789_LT_DECL([], [archiver_list_spec], [1],
2790  [How to feed a file listing to the archiver])
2791])# _LT_PROG_AR
2792
2793
2794# _LT_CMD_OLD_ARCHIVE
2795# -------------------
2796m4_defun([_LT_CMD_OLD_ARCHIVE],
2797[_LT_PROG_AR
2798
2799AC_CHECK_TOOL(STRIP, strip, :)
2800test -z "$STRIP" && STRIP=:
2801_LT_DECL([], [STRIP], [1], [A symbol stripping program])
2802
2803AC_CHECK_TOOL(RANLIB, ranlib, :)
2804test -z "$RANLIB" && RANLIB=:
2805_LT_DECL([], [RANLIB], [1],
2806    [Commands used to install an old-style archive])
2807
2808# Determine commands to create old-style static archives.
2809old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
2810old_postinstall_cmds='chmod 644 $oldlib'
2811old_postuninstall_cmds=
2812
2813if test -n "$RANLIB"; then
2814  case $host_os in
2815  openbsd*)
2816    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
2817    ;;
2818  *)
2819    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
2820    ;;
2821  esac
2822  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
2823fi
2824
2825case $host_os in
2826  darwin*)
2827    lock_old_archive_extraction=yes ;;
2828  *)
2829    lock_old_archive_extraction=no ;;
2830esac
2831_LT_DECL([], [old_postinstall_cmds], [2])
2832_LT_DECL([], [old_postuninstall_cmds], [2])
2833_LT_TAGDECL([], [old_archive_cmds], [2],
2834    [Commands used to build an old-style archive])
2835_LT_DECL([], [lock_old_archive_extraction], [0],
2836    [Whether to use a lock for old archive extraction])
2837])# _LT_CMD_OLD_ARCHIVE
2838
2839
2840# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2841#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2842# ----------------------------------------------------------------
2843# Check whether the given compiler option works
2844AC_DEFUN([_LT_COMPILER_OPTION],
2845[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2846m4_require([_LT_DECL_SED])dnl
2847AC_CACHE_CHECK([$1], [$2],
2848  [$2=no
2849   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2850   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2851   lt_compiler_flag="$3"
2852   # Insert the option either (1) after the last *FLAGS variable, or
2853   # (2) before a word containing "conftest.", or (3) at the end.
2854   # Note that $ac_compile itself does not contain backslashes and begins
2855   # with a dollar sign (not a hyphen), so the echo should work correctly.
2856   # The option is referenced via a variable to avoid confusing sed.
2857   lt_compile=`echo "$ac_compile" | $SED \
2858   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2859   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2860   -e 's:$: $lt_compiler_flag:'`
2861   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2862   (eval "$lt_compile" 2>conftest.err)
2863   ac_status=$?
2864   cat conftest.err >&AS_MESSAGE_LOG_FD
2865   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2866   if (exit $ac_status) && test -s "$ac_outfile"; then
2867     # The compiler can only warn and ignore the option if not recognized
2868     # So say no if there are warnings other than the usual output.
2869     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
2870     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2871     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2872       $2=yes
2873     fi
2874   fi
2875   $RM conftest*
2876])
2877
2878if test x"[$]$2" = xyes; then
2879    m4_if([$5], , :, [$5])
2880else
2881    m4_if([$6], , :, [$6])
2882fi
2883])# _LT_COMPILER_OPTION
2884
2885# Old name:
2886AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
2887dnl aclocal-1.4 backwards compatibility:
2888dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2889
2890
2891# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2892#                  [ACTION-SUCCESS], [ACTION-FAILURE])
2893# ----------------------------------------------------
2894# Check whether the given linker option works
2895AC_DEFUN([_LT_LINKER_OPTION],
2896[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2897m4_require([_LT_DECL_SED])dnl
2898AC_CACHE_CHECK([$1], [$2],
2899  [$2=no
2900   save_LDFLAGS="$LDFLAGS"
2901   LDFLAGS="$LDFLAGS $3"
2902   echo "$lt_simple_link_test_code" > conftest.$ac_ext
2903   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2904     # The linker can only warn and ignore the option if not recognized
2905     # So say no if there are warnings
2906     if test -s conftest.err; then
2907       # Append any errors to the config.log.
2908       cat conftest.err 1>&AS_MESSAGE_LOG_FD
2909       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
2910       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2911       if diff conftest.exp conftest.er2 >/dev/null; then
2912         $2=yes
2913       fi
2914     else
2915       $2=yes
2916     fi
2917   fi
2918   $RM -r conftest*
2919   LDFLAGS="$save_LDFLAGS"
2920])
2921
2922if test x"[$]$2" = xyes; then
2923    m4_if([$4], , :, [$4])
2924else
2925    m4_if([$5], , :, [$5])
2926fi
2927])# _LT_LINKER_OPTION
2928
2929# Old name:
2930AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
2931dnl aclocal-1.4 backwards compatibility:
2932dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2933
2934
2935# LT_CMD_MAX_LEN
2936#---------------
2937AC_DEFUN([LT_CMD_MAX_LEN],
2938[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2939# find the maximum length of command line arguments
2940AC_MSG_CHECKING([the maximum length of command line arguments])
2941AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2942  i=0
2943  teststring="ABCD"
2944
2945  case $build_os in
2946  msdosdjgpp*)
2947    # On DJGPP, this test can blow up pretty badly due to problems in libc
2948    # (any single argument exceeding 2000 bytes causes a buffer overrun
2949    # during glob expansion).  Even if it were fixed, the result of this
2950    # check would be larger than it should be.
2951    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2952    ;;
2953
2954  gnu*)
2955    # Under GNU Hurd, this test is not required because there is
2956    # no limit to the length of command line arguments.
2957    # Libtool will interpret -1 as no limit whatsoever
2958    lt_cv_sys_max_cmd_len=-1;
2959    ;;
2960
2961  cygwin* | mingw* | cegcc*)
2962    # On Win9x/ME, this test blows up -- it succeeds, but takes
2963    # about 5 minutes as the teststring grows exponentially.
2964    # Worse, since 9x/ME are not pre-emptively multitasking,
2965    # you end up with a "frozen" computer, even though with patience
2966    # the test eventually succeeds (with a max line length of 256k).
2967    # Instead, let's just punt: use the minimum linelength reported by
2968    # all of the supported platforms: 8192 (on NT/2K/XP).
2969    lt_cv_sys_max_cmd_len=8192;
2970    ;;
2971
2972  mint*)
2973    # On MiNT this can take a long time and run out of memory.
2974    lt_cv_sys_max_cmd_len=8192;
2975    ;;
2976
2977  amigaos*)
2978    # On AmigaOS with pdksh, this test takes hours, literally.
2979    # So we just punt and use a minimum line length of 8192.
2980    lt_cv_sys_max_cmd_len=8192;
2981    ;;
2982
2983  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2984    # This has been around since 386BSD, at least.  Likely further.
2985    if test -x /sbin/sysctl; then
2986      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2987    elif test -x /usr/sbin/sysctl; then
2988      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2989    else
2990      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
2991    fi
2992    # And add a safety zone
2993    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2994    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2995    ;;
2996
2997  interix*)
2998    # We know the value 262144 and hardcode it with a safety zone (like BSD)
2999    lt_cv_sys_max_cmd_len=196608
3000    ;;
3001
3002  osf*)
3003    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
3004    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
3005    # nice to cause kernel panics so lets avoid the loop below.
3006    # First set a reasonable default.
3007    lt_cv_sys_max_cmd_len=16384
3008    #
3009    if test -x /sbin/sysconfig; then
3010      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
3011        *1*) lt_cv_sys_max_cmd_len=-1 ;;
3012      esac
3013    fi
3014    ;;
3015  sco3.2v5*)
3016    lt_cv_sys_max_cmd_len=102400
3017    ;;
3018  sysv5* | sco5v6* | sysv4.2uw2*)
3019    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
3020    if test -n "$kargmax"; then
3021      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
3022    else
3023      lt_cv_sys_max_cmd_len=32768
3024    fi
3025    ;;
3026  *)
3027    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
3028    if test -n "$lt_cv_sys_max_cmd_len"; then
3029      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
3030      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
3031    else
3032      # Make teststring a little bigger before we do anything with it.
3033      # a 1K string should be a reasonable start.
3034      for i in 1 2 3 4 5 6 7 8 ; do
3035        teststring=$teststring$teststring
3036      done
3037      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
3038      # If test is not a shell built-in, we'll probably end up computing a
3039      # maximum length that is only half of the actual maximum length, but
3040      # we can't tell.
3041      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
3042	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
3043	      test $i != 17 # 1/2 MB should be enough
3044      do
3045        i=`expr $i + 1`
3046        teststring=$teststring$teststring
3047      done
3048      # Only check the string length outside the loop.
3049      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
3050      teststring=
3051      # Add a significant safety factor because C++ compilers can tack on
3052      # massive amounts of additional arguments before passing them to the
3053      # linker.  It appears as though 1/2 is a usable value.
3054      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
3055    fi
3056    ;;
3057  esac
3058])
3059if test -n $lt_cv_sys_max_cmd_len ; then
3060  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
3061else
3062  AC_MSG_RESULT(none)
3063fi
3064max_cmd_len=$lt_cv_sys_max_cmd_len
3065_LT_DECL([], [max_cmd_len], [0],
3066    [What is the maximum length of a command?])
3067])# LT_CMD_MAX_LEN
3068
3069# Old name:
3070AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
3071dnl aclocal-1.4 backwards compatibility:
3072dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
3073
3074
3075# _LT_HEADER_DLFCN
3076# ----------------
3077m4_defun([_LT_HEADER_DLFCN],
3078[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
3079])# _LT_HEADER_DLFCN
3080
3081
3082# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
3083#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
3084# ----------------------------------------------------------------
3085m4_defun([_LT_TRY_DLOPEN_SELF],
3086[m4_require([_LT_HEADER_DLFCN])dnl
3087if test "$cross_compiling" = yes; then :
3088  [$4]
3089else
3090  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
3091  lt_status=$lt_dlunknown
3092  cat > conftest.$ac_ext <<_LT_EOF
3093[#line $LINENO "configure"
3094#include "confdefs.h"
3095
3096#if HAVE_DLFCN_H
3097#include <dlfcn.h>
3098#endif
3099
3100#include <stdio.h>
3101
3102#ifdef RTLD_GLOBAL
3103#  define LT_DLGLOBAL		RTLD_GLOBAL
3104#else
3105#  ifdef DL_GLOBAL
3106#    define LT_DLGLOBAL		DL_GLOBAL
3107#  else
3108#    define LT_DLGLOBAL		0
3109#  endif
3110#endif
3111
3112/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
3113   find out it does not work in some platform. */
3114#ifndef LT_DLLAZY_OR_NOW
3115#  ifdef RTLD_LAZY
3116#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
3117#  else
3118#    ifdef DL_LAZY
3119#      define LT_DLLAZY_OR_NOW		DL_LAZY
3120#    else
3121#      ifdef RTLD_NOW
3122#        define LT_DLLAZY_OR_NOW	RTLD_NOW
3123#      else
3124#        ifdef DL_NOW
3125#          define LT_DLLAZY_OR_NOW	DL_NOW
3126#        else
3127#          define LT_DLLAZY_OR_NOW	0
3128#        endif
3129#      endif
3130#    endif
3131#  endif
3132#endif
3133
3134/* When -fvisbility=hidden is used, assume the code has been annotated
3135   correspondingly for the symbols needed.  */
3136#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
3137int fnord () __attribute__((visibility("default")));
3138#endif
3139
3140int fnord () { return 42; }
3141int main ()
3142{
3143  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
3144  int status = $lt_dlunknown;
3145
3146  if (self)
3147    {
3148      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
3149      else
3150        {
3151	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
3152          else puts (dlerror ());
3153	}
3154      /* dlclose (self); */
3155    }
3156  else
3157    puts (dlerror ());
3158
3159  return status;
3160}]
3161_LT_EOF
3162  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
3163    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
3164    lt_status=$?
3165    case x$lt_status in
3166      x$lt_dlno_uscore) $1 ;;
3167      x$lt_dlneed_uscore) $2 ;;
3168      x$lt_dlunknown|x*) $3 ;;
3169    esac
3170  else :
3171    # compilation failed
3172    $3
3173  fi
3174fi
3175rm -fr conftest*
3176])# _LT_TRY_DLOPEN_SELF
3177
3178
3179# LT_SYS_DLOPEN_SELF
3180# ------------------
3181AC_DEFUN([LT_SYS_DLOPEN_SELF],
3182[m4_require([_LT_HEADER_DLFCN])dnl
3183if test "x$enable_dlopen" != xyes; then
3184  enable_dlopen=unknown
3185  enable_dlopen_self=unknown
3186  enable_dlopen_self_static=unknown
3187else
3188  lt_cv_dlopen=no
3189  lt_cv_dlopen_libs=
3190
3191  case $host_os in
3192  beos*)
3193    lt_cv_dlopen="load_add_on"
3194    lt_cv_dlopen_libs=
3195    lt_cv_dlopen_self=yes
3196    ;;
3197
3198  mingw* | pw32* | cegcc*)
3199    lt_cv_dlopen="LoadLibrary"
3200    lt_cv_dlopen_libs=
3201    ;;
3202
3203  cygwin*)
3204    lt_cv_dlopen="dlopen"
3205    lt_cv_dlopen_libs=
3206    ;;
3207
3208  darwin*)
3209  # if libdl is installed we need to link against it
3210    AC_CHECK_LIB([dl], [dlopen],
3211		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
3212    lt_cv_dlopen="dyld"
3213    lt_cv_dlopen_libs=
3214    lt_cv_dlopen_self=yes
3215    ])
3216    ;;
3217
3218  *)
3219    AC_CHECK_FUNC([shl_load],
3220	  [lt_cv_dlopen="shl_load"],
3221      [AC_CHECK_LIB([dld], [shl_load],
3222	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
3223	[AC_CHECK_FUNC([dlopen],
3224	      [lt_cv_dlopen="dlopen"],
3225	  [AC_CHECK_LIB([dl], [dlopen],
3226		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
3227	    [AC_CHECK_LIB([svld], [dlopen],
3228		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
3229	      [AC_CHECK_LIB([dld], [dld_link],
3230		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
3231	      ])
3232	    ])
3233	  ])
3234	])
3235      ])
3236    ;;
3237  esac
3238
3239  if test "x$lt_cv_dlopen" != xno; then
3240    enable_dlopen=yes
3241  else
3242    enable_dlopen=no
3243  fi
3244
3245  case $lt_cv_dlopen in
3246  dlopen)
3247    save_CPPFLAGS="$CPPFLAGS"
3248    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
3249
3250    save_LDFLAGS="$LDFLAGS"
3251    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
3252
3253    save_LIBS="$LIBS"
3254    LIBS="$lt_cv_dlopen_libs $LIBS"
3255
3256    AC_CACHE_CHECK([whether a program can dlopen itself],
3257	  lt_cv_dlopen_self, [dnl
3258	  _LT_TRY_DLOPEN_SELF(
3259	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
3260	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
3261    ])
3262
3263    if test "x$lt_cv_dlopen_self" = xyes; then
3264      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
3265      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
3266	  lt_cv_dlopen_self_static, [dnl
3267	  _LT_TRY_DLOPEN_SELF(
3268	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
3269	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
3270      ])
3271    fi
3272
3273    CPPFLAGS="$save_CPPFLAGS"
3274    LDFLAGS="$save_LDFLAGS"
3275    LIBS="$save_LIBS"
3276    ;;
3277  esac
3278
3279  case $lt_cv_dlopen_self in
3280  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
3281  *) enable_dlopen_self=unknown ;;
3282  esac
3283
3284  case $lt_cv_dlopen_self_static in
3285  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
3286  *) enable_dlopen_self_static=unknown ;;
3287  esac
3288fi
3289_LT_DECL([dlopen_support], [enable_dlopen], [0],
3290	 [Whether dlopen is supported])
3291_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
3292	 [Whether dlopen of programs is supported])
3293_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
3294	 [Whether dlopen of statically linked programs is supported])
3295])# LT_SYS_DLOPEN_SELF
3296
3297# Old name:
3298AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
3299dnl aclocal-1.4 backwards compatibility:
3300dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
3301
3302
3303# _LT_COMPILER_C_O([TAGNAME])
3304# ---------------------------
3305# Check to see if options -c and -o are simultaneously supported by compiler.
3306# This macro does not hard code the compiler like AC_PROG_CC_C_O.
3307m4_defun([_LT_COMPILER_C_O],
3308[m4_require([_LT_DECL_SED])dnl
3309m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3310m4_require([_LT_TAG_COMPILER])dnl
3311AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
3312  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
3313  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
3314   $RM -r conftest 2>/dev/null
3315   mkdir conftest
3316   cd conftest
3317   mkdir out
3318   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3319
3320   lt_compiler_flag="-o out/conftest2.$ac_objext"
3321   # Insert the option either (1) after the last *FLAGS variable, or
3322   # (2) before a word containing "conftest.", or (3) at the end.
3323   # Note that $ac_compile itself does not contain backslashes and begins
3324   # with a dollar sign (not a hyphen), so the echo should work correctly.
3325   lt_compile=`echo "$ac_compile" | $SED \
3326   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3327   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3328   -e 's:$: $lt_compiler_flag:'`
3329   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3330   (eval "$lt_compile" 2>out/conftest.err)
3331   ac_status=$?
3332   cat out/conftest.err >&AS_MESSAGE_LOG_FD
3333   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3334   if (exit $ac_status) && test -s out/conftest2.$ac_objext
3335   then
3336     # The compiler can only warn and ignore the option if not recognized
3337     # So say no if there are warnings
3338     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
3339     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
3340     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
3341       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3342     fi
3343   fi
3344   chmod u+w . 2>&AS_MESSAGE_LOG_FD
3345   $RM conftest*
3346   # SGI C++ compiler will create directory out/ii_files/ for
3347   # template instantiation
3348   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
3349   $RM out/* && rmdir out
3350   cd ..
3351   $RM -r conftest
3352   $RM conftest*
3353])
3354_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
3355	[Does compiler simultaneously support -c and -o options?])
3356])# _LT_COMPILER_C_O
3357
3358
3359# _LT_COMPILER_FILE_LOCKS([TAGNAME])
3360# ----------------------------------
3361# Check to see if we can do hard links to lock some files if needed
3362m4_defun([_LT_COMPILER_FILE_LOCKS],
3363[m4_require([_LT_ENABLE_LOCK])dnl
3364m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3365_LT_COMPILER_C_O([$1])
3366
3367hard_links="nottested"
3368if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
3369  # do not overwrite the value of need_locks provided by the user
3370  AC_MSG_CHECKING([if we can lock with hard links])
3371  hard_links=yes
3372  $RM conftest*
3373  ln conftest.a conftest.b 2>/dev/null && hard_links=no
3374  touch conftest.a
3375  ln conftest.a conftest.b 2>&5 || hard_links=no
3376  ln conftest.a conftest.b 2>/dev/null && hard_links=no
3377  AC_MSG_RESULT([$hard_links])
3378  if test "$hard_links" = no; then
3379    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
3380    need_locks=warn
3381  fi
3382else
3383  need_locks=no
3384fi
3385_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
3386])# _LT_COMPILER_FILE_LOCKS
3387
3388
3389# _LT_CHECK_OBJDIR
3390# ----------------
3391m4_defun([_LT_CHECK_OBJDIR],
3392[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
3393[rm -f .libs 2>/dev/null
3394mkdir .libs 2>/dev/null
3395if test -d .libs; then
3396  lt_cv_objdir=.libs
3397else
3398  # MS-DOS does not allow filenames that begin with a dot.
3399  lt_cv_objdir=_libs
3400fi
3401rmdir .libs 2>/dev/null])
3402objdir=$lt_cv_objdir
3403_LT_DECL([], [objdir], [0],
3404         [The name of the directory that contains temporary libtool files])dnl
3405m4_pattern_allow([LT_OBJDIR])dnl
3406AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
3407  [Define to the sub-directory in which libtool stores uninstalled libraries.])
3408])# _LT_CHECK_OBJDIR
3409
3410
3411# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
3412# --------------------------------------
3413# Check hardcoding attributes.
3414m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
3415[AC_MSG_CHECKING([how to hardcode library paths into programs])
3416_LT_TAGVAR(hardcode_action, $1)=
3417if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
3418   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
3419   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
3420
3421  # We can hardcode non-existent directories.
3422  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
3423     # If the only mechanism to avoid hardcoding is shlibpath_var, we
3424     # have to relink, otherwise we might link with an installed library
3425     # when we should be linking with a yet-to-be-installed one
3426     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
3427     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
3428    # Linking always hardcodes the temporary library directory.
3429    _LT_TAGVAR(hardcode_action, $1)=relink
3430  else
3431    # We can link without hardcoding, and we can hardcode nonexisting dirs.
3432    _LT_TAGVAR(hardcode_action, $1)=immediate
3433  fi
3434else
3435  # We cannot hardcode anything, or else we can only hardcode existing
3436  # directories.
3437  _LT_TAGVAR(hardcode_action, $1)=unsupported
3438fi
3439AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
3440
3441if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
3442   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
3443  # Fast installation is not supported
3444  enable_fast_install=no
3445elif test "$shlibpath_overrides_runpath" = yes ||
3446     test "$enable_shared" = no; then
3447  # Fast installation is not necessary
3448  enable_fast_install=needless
3449fi
3450_LT_TAGDECL([], [hardcode_action], [0],
3451    [How to hardcode a shared library path into an executable])
3452])# _LT_LINKER_HARDCODE_LIBPATH
3453
3454
3455# _LT_CMD_STRIPLIB
3456# ----------------
3457m4_defun([_LT_CMD_STRIPLIB],
3458[m4_require([_LT_DECL_EGREP])
3459striplib=
3460old_striplib=
3461AC_MSG_CHECKING([whether stripping libraries is possible])
3462if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
3463  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
3464  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
3465  AC_MSG_RESULT([yes])
3466else
3467# FIXME - insert some real tests, host_os isn't really good enough
3468  case $host_os in
3469  darwin*)
3470    if test -n "$STRIP" ; then
3471      striplib="$STRIP -x"
3472      old_striplib="$STRIP -S"
3473      AC_MSG_RESULT([yes])
3474    else
3475      AC_MSG_RESULT([no])
3476    fi
3477    ;;
3478  *)
3479    AC_MSG_RESULT([no])
3480    ;;
3481  esac
3482fi
3483_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
3484_LT_DECL([], [striplib], [1])
3485])# _LT_CMD_STRIPLIB
3486
3487
3488# _LT_SYS_DYNAMIC_LINKER([TAG])
3489# -----------------------------
3490# PORTME Fill in your ld.so characteristics
3491m4_defun([_LT_SYS_DYNAMIC_LINKER],
3492[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3493m4_require([_LT_DECL_EGREP])dnl
3494m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3495m4_require([_LT_DECL_OBJDUMP])dnl
3496m4_require([_LT_DECL_SED])dnl
3497m4_require([_LT_CHECK_SHELL_FEATURES])dnl
3498AC_MSG_CHECKING([dynamic linker characteristics])
3499m4_if([$1],
3500	[], [
3501if test "$GCC" = yes; then
3502  case $host_os in
3503    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
3504    *) lt_awk_arg="/^libraries:/" ;;
3505  esac
3506  case $host_os in
3507    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
3508    *) lt_sed_strip_eq="s,=/,/,g" ;;
3509  esac
3510  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
3511  case $lt_search_path_spec in
3512  *\;*)
3513    # if the path contains ";" then we assume it to be the separator
3514    # otherwise default to the standard path separator (i.e. ":") - it is
3515    # assumed that no part of a normal pathname contains ";" but that should
3516    # okay in the real world where ";" in dirpaths is itself problematic.
3517    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
3518    ;;
3519  *)
3520    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
3521    ;;
3522  esac
3523  # Ok, now we have the path, separated by spaces, we can step through it
3524  # and add multilib dir if necessary.
3525  lt_tmp_lt_search_path_spec=
3526  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
3527  for lt_sys_path in $lt_search_path_spec; do
3528    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
3529      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
3530    else
3531      test -d "$lt_sys_path" && \
3532	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
3533    fi
3534  done
3535  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
3536BEGIN {RS=" "; FS="/|\n";} {
3537  lt_foo="";
3538  lt_count=0;
3539  for (lt_i = NF; lt_i > 0; lt_i--) {
3540    if ($lt_i != "" && $lt_i != ".") {
3541      if ($lt_i == "..") {
3542        lt_count++;
3543      } else {
3544        if (lt_count == 0) {
3545          lt_foo="/" $lt_i lt_foo;
3546        } else {
3547          lt_count--;
3548        }
3549      }
3550    }
3551  }
3552  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
3553  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
3554}'`
3555  # AWK program above erroneously prepends '/' to C:/dos/paths
3556  # for these hosts.
3557  case $host_os in
3558    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
3559      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
3560  esac
3561  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
3562else
3563  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
3564fi])
3565library_names_spec=
3566libname_spec='lib$name'
3567soname_spec=
3568shrext_cmds=".so"
3569postinstall_cmds=
3570postuninstall_cmds=
3571finish_cmds=
3572finish_eval=
3573shlibpath_var=
3574shlibpath_overrides_runpath=unknown
3575version_type=none
3576dynamic_linker="$host_os ld.so"
3577sys_lib_dlsearch_path_spec="/lib /usr/lib"
3578need_lib_prefix=unknown
3579hardcode_into_libs=no
3580
3581# when you set need_version to no, make sure it does not cause -set_version
3582# flags to be left without arguments
3583need_version=unknown
3584
3585case $host_os in
3586aix3*)
3587  version_type=linux
3588  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3589  shlibpath_var=LIBPATH
3590
3591  # AIX 3 has no versioning support, so we append a major version to the name.
3592  soname_spec='${libname}${release}${shared_ext}$major'
3593  ;;
3594
3595aix[[4-9]]*)
3596  version_type=linux
3597  need_lib_prefix=no
3598  need_version=no
3599  hardcode_into_libs=yes
3600  if test "$host_cpu" = ia64; then
3601    # AIX 5 supports IA64
3602    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3603    shlibpath_var=LD_LIBRARY_PATH
3604  else
3605    # With GCC up to 2.95.x, collect2 would create an import file
3606    # for dependence libraries.  The import file would start with
3607    # the line `#! .'.  This would cause the generated library to
3608    # depend on `.', always an invalid library.  This was fixed in
3609    # development snapshots of GCC prior to 3.0.
3610    case $host_os in
3611      aix4 | aix4.[[01]] | aix4.[[01]].*)
3612      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3613	   echo ' yes '
3614	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
3615	:
3616      else
3617	can_build_shared=no
3618      fi
3619      ;;
3620    esac
3621    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3622    # soname into executable. Probably we can add versioning support to
3623    # collect2, so additional links can be useful in future.
3624    if test "$aix_use_runtimelinking" = yes; then
3625      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3626      # instead of lib<name>.a to let people know that these are not
3627      # typical AIX shared libraries.
3628      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3629    else
3630      # We preserve .a as extension for shared libraries through AIX4.2
3631      # and later when we are not doing run time linking.
3632      library_names_spec='${libname}${release}.a $libname.a'
3633      soname_spec='${libname}${release}${shared_ext}$major'
3634    fi
3635    shlibpath_var=LIBPATH
3636  fi
3637  ;;
3638
3639amigaos*)
3640  case $host_cpu in
3641  powerpc)
3642    # Since July 2007 AmigaOS4 officially supports .so libraries.
3643    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
3644    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3645    ;;
3646  m68k)
3647    library_names_spec='$libname.ixlibrary $libname.a'
3648    # Create ${libname}_ixlibrary.a entries in /sys/libs.
3649    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'
3650    ;;
3651  esac
3652  ;;
3653
3654beos*)
3655  library_names_spec='${libname}${shared_ext}'
3656  dynamic_linker="$host_os ld.so"
3657  shlibpath_var=LIBRARY_PATH
3658  ;;
3659
3660bsdi[[45]]*)
3661  version_type=linux
3662  need_version=no
3663  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3664  soname_spec='${libname}${release}${shared_ext}$major'
3665  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3666  shlibpath_var=LD_LIBRARY_PATH
3667  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3668  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3669  # the default ld.so.conf also contains /usr/contrib/lib and
3670  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3671  # libtool to hard-code these into programs
3672  ;;
3673
3674cygwin* | mingw* | pw32* | cegcc*)
3675  version_type=windows
3676  shrext_cmds=".dll"
3677  need_version=no
3678  need_lib_prefix=no
3679
3680  case $GCC,$cc_basename in
3681  yes,*)
3682    # gcc
3683    library_names_spec='$libname.dll.a'
3684    # DLL is installed to $(libdir)/../bin by postinstall_cmds
3685    postinstall_cmds='base_file=`basename \${file}`~
3686      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3687      dldir=$destdir/`dirname \$dlpath`~
3688      test -d \$dldir || mkdir -p \$dldir~
3689      $install_prog $dir/$dlname \$dldir/$dlname~
3690      chmod a+x \$dldir/$dlname~
3691      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
3692        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
3693      fi'
3694    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3695      dlpath=$dir/\$dldll~
3696       $RM \$dlpath'
3697    shlibpath_overrides_runpath=yes
3698
3699    case $host_os in
3700    cygwin*)
3701      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3702      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3703m4_if([$1], [],[
3704      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
3705      ;;
3706    mingw* | cegcc*)
3707      # MinGW DLLs use traditional 'lib' prefix
3708      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3709      ;;
3710    pw32*)
3711      # pw32 DLLs use 'pw' prefix rather than 'lib'
3712      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3713      ;;
3714    esac
3715    dynamic_linker='Win32 ld.exe'
3716    ;;
3717
3718  *,cl*)
3719    # Native MSVC
3720    libname_spec='$name'
3721    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3722    library_names_spec='${libname}.dll.lib'
3723
3724    case $build_os in
3725    mingw*)
3726      sys_lib_search_path_spec=
3727      lt_save_ifs=$IFS
3728      IFS=';'
3729      for lt_path in $LIB
3730      do
3731        IFS=$lt_save_ifs
3732        # Let DOS variable expansion print the short 8.3 style file name.
3733        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
3734        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
3735      done
3736      IFS=$lt_save_ifs
3737      # Convert to MSYS style.
3738      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
3739      ;;
3740    cygwin*)
3741      # Convert to unix form, then to dos form, then back to unix form
3742      # but this time dos style (no spaces!) so that the unix form looks
3743      # like /cygdrive/c/PROGRA~1:/cygdr...
3744      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
3745      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
3746      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3747      ;;
3748    *)
3749      sys_lib_search_path_spec="$LIB"
3750      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
3751        # It is most probably a Windows format PATH.
3752        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3753      else
3754        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
3755      fi
3756      # FIXME: find the short name or the path components, as spaces are
3757      # common. (e.g. "Program Files" -> "PROGRA~1")
3758      ;;
3759    esac
3760
3761    # DLL is installed to $(libdir)/../bin by postinstall_cmds
3762    postinstall_cmds='base_file=`basename \${file}`~
3763      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
3764      dldir=$destdir/`dirname \$dlpath`~
3765      test -d \$dldir || mkdir -p \$dldir~
3766      $install_prog $dir/$dlname \$dldir/$dlname'
3767    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3768      dlpath=$dir/\$dldll~
3769       $RM \$dlpath'
3770    shlibpath_overrides_runpath=yes
3771    dynamic_linker='Win32 link.exe'
3772    ;;
3773
3774  *)
3775    # Assume MSVC wrapper
3776    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3777    dynamic_linker='Win32 ld.exe'
3778    ;;
3779  esac
3780  # FIXME: first we should search . and the directory the executable is in
3781  shlibpath_var=PATH
3782  ;;
3783
3784darwin* | rhapsody*)
3785  dynamic_linker="$host_os dyld"
3786  version_type=darwin
3787  need_lib_prefix=no
3788  need_version=no
3789  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3790  soname_spec='${libname}${release}${major}$shared_ext'
3791  shlibpath_overrides_runpath=yes
3792  shlibpath_var=DYLD_LIBRARY_PATH
3793  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3794m4_if([$1], [],[
3795  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
3796  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3797  ;;
3798
3799dgux*)
3800  version_type=linux
3801  need_lib_prefix=no
3802  need_version=no
3803  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3804  soname_spec='${libname}${release}${shared_ext}$major'
3805  shlibpath_var=LD_LIBRARY_PATH
3806  ;;
3807
3808freebsd1*)
3809  dynamic_linker=no
3810  ;;
3811
3812freebsd* | dragonfly*)
3813  # DragonFly does not have aout.  When/if they implement a new
3814  # versioning mechanism, adjust this.
3815  if test -x /usr/bin/objformat; then
3816    objformat=`/usr/bin/objformat`
3817  else
3818    case $host_os in
3819    freebsd[[123]]*) objformat=aout ;;
3820    *) objformat=elf ;;
3821    esac
3822  fi
3823  version_type=freebsd-$objformat
3824  case $version_type in
3825    freebsd-elf*)
3826      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3827      need_version=no
3828      need_lib_prefix=no
3829      ;;
3830    freebsd-*)
3831      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3832      need_version=yes
3833      ;;
3834  esac
3835  shlibpath_var=LD_LIBRARY_PATH
3836  case $host_os in
3837  freebsd2*)
3838    shlibpath_overrides_runpath=yes
3839    ;;
3840  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3841    shlibpath_overrides_runpath=yes
3842    hardcode_into_libs=yes
3843    ;;
3844  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3845  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3846    shlibpath_overrides_runpath=no
3847    hardcode_into_libs=yes
3848    ;;
3849  *) # from 4.6 on, and DragonFly
3850    shlibpath_overrides_runpath=yes
3851    hardcode_into_libs=yes
3852    ;;
3853  esac
3854  ;;
3855
3856gnu*)
3857  version_type=linux
3858  need_lib_prefix=no
3859  need_version=no
3860  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3861  soname_spec='${libname}${release}${shared_ext}$major'
3862  shlibpath_var=LD_LIBRARY_PATH
3863  hardcode_into_libs=yes
3864  ;;
3865
3866haiku*)
3867  version_type=linux
3868  need_lib_prefix=no
3869  need_version=no
3870  dynamic_linker="$host_os runtime_loader"
3871  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3872  soname_spec='${libname}${release}${shared_ext}$major'
3873  shlibpath_var=LIBRARY_PATH
3874  shlibpath_overrides_runpath=yes
3875  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
3876  hardcode_into_libs=yes
3877  ;;
3878
3879hpux9* | hpux10* | hpux11*)
3880  # Give a soname corresponding to the major version so that dld.sl refuses to
3881  # link against other versions.
3882  version_type=sunos
3883  need_lib_prefix=no
3884  need_version=no
3885  case $host_cpu in
3886  ia64*)
3887    shrext_cmds='.so'
3888    hardcode_into_libs=yes
3889    dynamic_linker="$host_os dld.so"
3890    shlibpath_var=LD_LIBRARY_PATH
3891    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3892    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3893    soname_spec='${libname}${release}${shared_ext}$major'
3894    if test "X$HPUX_IA64_MODE" = X32; then
3895      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3896    else
3897      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3898    fi
3899    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3900    ;;
3901  hppa*64*)
3902    shrext_cmds='.sl'
3903    hardcode_into_libs=yes
3904    dynamic_linker="$host_os dld.sl"
3905    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3906    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3907    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3908    soname_spec='${libname}${release}${shared_ext}$major'
3909    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3910    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3911    ;;
3912  *)
3913    shrext_cmds='.sl'
3914    dynamic_linker="$host_os dld.sl"
3915    shlibpath_var=SHLIB_PATH
3916    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3917    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3918    soname_spec='${libname}${release}${shared_ext}$major'
3919    ;;
3920  esac
3921  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
3922  postinstall_cmds='chmod 555 $lib'
3923  # or fails outright, so override atomically:
3924  install_override_mode=555
3925  ;;
3926
3927interix[[3-9]]*)
3928  version_type=linux
3929  need_lib_prefix=no
3930  need_version=no
3931  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3932  soname_spec='${libname}${release}${shared_ext}$major'
3933  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3934  shlibpath_var=LD_LIBRARY_PATH
3935  shlibpath_overrides_runpath=no
3936  hardcode_into_libs=yes
3937  ;;
3938
3939irix5* | irix6* | nonstopux*)
3940  case $host_os in
3941    nonstopux*) version_type=nonstopux ;;
3942    *)
3943	if test "$lt_cv_prog_gnu_ld" = yes; then
3944		version_type=linux
3945	else
3946		version_type=irix
3947	fi ;;
3948  esac
3949  need_lib_prefix=no
3950  need_version=no
3951  soname_spec='${libname}${release}${shared_ext}$major'
3952  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3953  case $host_os in
3954  irix5* | nonstopux*)
3955    libsuff= shlibsuff=
3956    ;;
3957  *)
3958    case $LD in # libtool.m4 will add one of these switches to LD
3959    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3960      libsuff= shlibsuff= libmagic=32-bit;;
3961    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3962      libsuff=32 shlibsuff=N32 libmagic=N32;;
3963    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3964      libsuff=64 shlibsuff=64 libmagic=64-bit;;
3965    *) libsuff= shlibsuff= libmagic=never-match;;
3966    esac
3967    ;;
3968  esac
3969  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3970  shlibpath_overrides_runpath=no
3971  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3972  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3973  hardcode_into_libs=yes
3974  ;;
3975
3976# No shared lib support for Linux oldld, aout, or coff.
3977linux*oldld* | linux*aout* | linux*coff*)
3978  dynamic_linker=no
3979  ;;
3980
3981# This must be Linux ELF.
3982linux* | k*bsd*-gnu | kopensolaris*-gnu)
3983  version_type=linux
3984  need_lib_prefix=no
3985  need_version=no
3986  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3987  soname_spec='${libname}${release}${shared_ext}$major'
3988  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3989  shlibpath_var=LD_LIBRARY_PATH
3990  shlibpath_overrides_runpath=no
3991
3992  # Some binutils ld are patched to set DT_RUNPATH
3993  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
3994    [lt_cv_shlibpath_overrides_runpath=no
3995    save_LDFLAGS=$LDFLAGS
3996    save_libdir=$libdir
3997    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
3998	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
3999    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
4000      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
4001	 [lt_cv_shlibpath_overrides_runpath=yes])])
4002    LDFLAGS=$save_LDFLAGS
4003    libdir=$save_libdir
4004    ])
4005  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
4006
4007  # This implies no fast_install, which is unacceptable.
4008  # Some rework will be needed to allow for fast_install
4009  # before this can be enabled.
4010  hardcode_into_libs=yes
4011
4012  # Append ld.so.conf contents to the search path
4013  if test -f /etc/ld.so.conf; then
4014    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' ' '`
4015    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
4016  fi
4017
4018  # We used to test for /lib/ld.so.1 and disable shared libraries on
4019  # powerpc, because MkLinux only supported shared libraries with the
4020  # GNU dynamic linker.  Since this was broken with cross compilers,
4021  # most powerpc-linux boxes support dynamic linking these days and
4022  # people can always --disable-shared, the test was removed, and we
4023  # assume the GNU/Linux dynamic linker is in use.
4024  dynamic_linker='GNU/Linux ld.so'
4025  ;;
4026
4027netbsd*)
4028  version_type=sunos
4029  need_lib_prefix=no
4030  need_version=no
4031  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4032    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4033    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4034    dynamic_linker='NetBSD (a.out) ld.so'
4035  else
4036    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4037    soname_spec='${libname}${release}${shared_ext}$major'
4038    dynamic_linker='NetBSD ld.elf_so'
4039  fi
4040  shlibpath_var=LD_LIBRARY_PATH
4041  shlibpath_overrides_runpath=yes
4042  hardcode_into_libs=yes
4043  ;;
4044
4045newsos6)
4046  version_type=linux
4047  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4048  shlibpath_var=LD_LIBRARY_PATH
4049  shlibpath_overrides_runpath=yes
4050  ;;
4051
4052*nto* | *qnx*)
4053  version_type=qnx
4054  need_lib_prefix=no
4055  need_version=no
4056  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4057  soname_spec='${libname}${release}${shared_ext}$major'
4058  shlibpath_var=LD_LIBRARY_PATH
4059  shlibpath_overrides_runpath=no
4060  hardcode_into_libs=yes
4061  dynamic_linker='ldqnx.so'
4062  ;;
4063
4064openbsd*)
4065  version_type=sunos
4066  sys_lib_dlsearch_path_spec="/usr/lib"
4067  need_lib_prefix=no
4068  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
4069  case $host_os in
4070    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
4071    *)				need_version=no  ;;
4072  esac
4073  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4074  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4075  shlibpath_var=LD_LIBRARY_PATH
4076  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4077    case $host_os in
4078      openbsd2.[[89]] | openbsd2.[[89]].*)
4079	shlibpath_overrides_runpath=no
4080	;;
4081      *)
4082	shlibpath_overrides_runpath=yes
4083	;;
4084      esac
4085  else
4086    shlibpath_overrides_runpath=yes
4087  fi
4088  ;;
4089
4090os2*)
4091  libname_spec='$name'
4092  shrext_cmds=".dll"
4093  need_lib_prefix=no
4094  library_names_spec='$libname${shared_ext} $libname.a'
4095  dynamic_linker='OS/2 ld.exe'
4096  shlibpath_var=LIBPATH
4097  ;;
4098
4099osf3* | osf4* | osf5*)
4100  version_type=osf
4101  need_lib_prefix=no
4102  need_version=no
4103  soname_spec='${libname}${release}${shared_ext}$major'
4104  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4105  shlibpath_var=LD_LIBRARY_PATH
4106  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
4107  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
4108  ;;
4109
4110rdos*)
4111  dynamic_linker=no
4112  ;;
4113
4114solaris*)
4115  version_type=linux
4116  need_lib_prefix=no
4117  need_version=no
4118  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4119  soname_spec='${libname}${release}${shared_ext}$major'
4120  shlibpath_var=LD_LIBRARY_PATH
4121  shlibpath_overrides_runpath=yes
4122  hardcode_into_libs=yes
4123  # ldd complains unless libraries are executable
4124  postinstall_cmds='chmod +x $lib'
4125  ;;
4126
4127sunos4*)
4128  version_type=sunos
4129  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4130  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
4131  shlibpath_var=LD_LIBRARY_PATH
4132  shlibpath_overrides_runpath=yes
4133  if test "$with_gnu_ld" = yes; then
4134    need_lib_prefix=no
4135  fi
4136  need_version=yes
4137  ;;
4138
4139sysv4 | sysv4.3*)
4140  version_type=linux
4141  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4142  soname_spec='${libname}${release}${shared_ext}$major'
4143  shlibpath_var=LD_LIBRARY_PATH
4144  case $host_vendor in
4145    sni)
4146      shlibpath_overrides_runpath=no
4147      need_lib_prefix=no
4148      runpath_var=LD_RUN_PATH
4149      ;;
4150    siemens)
4151      need_lib_prefix=no
4152      ;;
4153    motorola)
4154      need_lib_prefix=no
4155      need_version=no
4156      shlibpath_overrides_runpath=no
4157      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
4158      ;;
4159  esac
4160  ;;
4161
4162sysv4*MP*)
4163  if test -d /usr/nec ;then
4164    version_type=linux
4165    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
4166    soname_spec='$libname${shared_ext}.$major'
4167    shlibpath_var=LD_LIBRARY_PATH
4168  fi
4169  ;;
4170
4171sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4172  version_type=freebsd-elf
4173  need_lib_prefix=no
4174  need_version=no
4175  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4176  soname_spec='${libname}${release}${shared_ext}$major'
4177  shlibpath_var=LD_LIBRARY_PATH
4178  shlibpath_overrides_runpath=yes
4179  hardcode_into_libs=yes
4180  if test "$with_gnu_ld" = yes; then
4181    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
4182  else
4183    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
4184    case $host_os in
4185      sco3.2v5*)
4186        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
4187	;;
4188    esac
4189  fi
4190  sys_lib_dlsearch_path_spec='/usr/lib'
4191  ;;
4192
4193tpf*)
4194  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
4195  version_type=linux
4196  need_lib_prefix=no
4197  need_version=no
4198  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4199  shlibpath_var=LD_LIBRARY_PATH
4200  shlibpath_overrides_runpath=no
4201  hardcode_into_libs=yes
4202  ;;
4203
4204uts4*)
4205  version_type=linux
4206  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4207  soname_spec='${libname}${release}${shared_ext}$major'
4208  shlibpath_var=LD_LIBRARY_PATH
4209  ;;
4210
4211*)
4212  dynamic_linker=no
4213  ;;
4214esac
4215AC_MSG_RESULT([$dynamic_linker])
4216test "$dynamic_linker" = no && can_build_shared=no
4217
4218variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
4219if test "$GCC" = yes; then
4220  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
4221fi
4222
4223if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
4224  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
4225fi
4226if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
4227  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
4228fi
4229
4230_LT_DECL([], [variables_saved_for_relink], [1],
4231    [Variables whose values should be saved in libtool wrapper scripts and
4232    restored at link time])
4233_LT_DECL([], [need_lib_prefix], [0],
4234    [Do we need the "lib" prefix for modules?])
4235_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
4236_LT_DECL([], [version_type], [0], [Library versioning type])
4237_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
4238_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
4239_LT_DECL([], [shlibpath_overrides_runpath], [0],
4240    [Is shlibpath searched before the hard-coded library search path?])
4241_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
4242_LT_DECL([], [library_names_spec], [1],
4243    [[List of archive names.  First name is the real one, the rest are links.
4244    The last name is the one that the linker finds with -lNAME]])
4245_LT_DECL([], [soname_spec], [1],
4246    [[The coded name of the library, if different from the real name]])
4247_LT_DECL([], [install_override_mode], [1],
4248    [Permission mode override for installation of shared libraries])
4249_LT_DECL([], [postinstall_cmds], [2],
4250    [Command to use after installation of a shared archive])
4251_LT_DECL([], [postuninstall_cmds], [2],
4252    [Command to use after uninstallation of a shared archive])
4253_LT_DECL([], [finish_cmds], [2],
4254    [Commands used to finish a libtool library installation in a directory])
4255_LT_DECL([], [finish_eval], [1],
4256    [[As "finish_cmds", except a single script fragment to be evaled but
4257    not shown]])
4258_LT_DECL([], [hardcode_into_libs], [0],
4259    [Whether we should hardcode library paths into libraries])
4260_LT_DECL([], [sys_lib_search_path_spec], [2],
4261    [Compile-time system search path for libraries])
4262_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
4263    [Run-time system search path for libraries])
4264])# _LT_SYS_DYNAMIC_LINKER
4265
4266
4267# _LT_PATH_TOOL_PREFIX(TOOL)
4268# --------------------------
4269# find a file program which can recognize shared library
4270AC_DEFUN([_LT_PATH_TOOL_PREFIX],
4271[m4_require([_LT_DECL_EGREP])dnl
4272AC_MSG_CHECKING([for $1])
4273AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
4274[case $MAGIC_CMD in
4275[[\\/*] |  ?:[\\/]*])
4276  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4277  ;;
4278*)
4279  lt_save_MAGIC_CMD="$MAGIC_CMD"
4280  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4281dnl $ac_dummy forces splitting on constant user-supplied paths.
4282dnl POSIX.2 word splitting is done only on the output of word expansions,
4283dnl not every word.  This closes a longstanding sh security hole.
4284  ac_dummy="m4_if([$2], , $PATH, [$2])"
4285  for ac_dir in $ac_dummy; do
4286    IFS="$lt_save_ifs"
4287    test -z "$ac_dir" && ac_dir=.
4288    if test -f $ac_dir/$1; then
4289      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
4290      if test -n "$file_magic_test_file"; then
4291	case $deplibs_check_method in
4292	"file_magic "*)
4293	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
4294	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4295	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4296	    $EGREP "$file_magic_regex" > /dev/null; then
4297	    :
4298	  else
4299	    cat <<_LT_EOF 1>&2
4300
4301*** Warning: the command libtool uses to detect shared libraries,
4302*** $file_magic_cmd, produces output that libtool cannot recognize.
4303*** The result is that libtool may fail to recognize shared libraries
4304*** as such.  This will affect the creation of libtool libraries that
4305*** depend on shared libraries, but programs linked with such libtool
4306*** libraries will work regardless of this problem.  Nevertheless, you
4307*** may want to report the problem to your system manager and/or to
4308*** bug-libtool@gnu.org
4309
4310_LT_EOF
4311	  fi ;;
4312	esac
4313      fi
4314      break
4315    fi
4316  done
4317  IFS="$lt_save_ifs"
4318  MAGIC_CMD="$lt_save_MAGIC_CMD"
4319  ;;
4320esac])
4321MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4322if test -n "$MAGIC_CMD"; then
4323  AC_MSG_RESULT($MAGIC_CMD)
4324else
4325  AC_MSG_RESULT(no)
4326fi
4327_LT_DECL([], [MAGIC_CMD], [0],
4328	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
4329])# _LT_PATH_TOOL_PREFIX
4330
4331# Old name:
4332AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
4333dnl aclocal-1.4 backwards compatibility:
4334dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
4335
4336
4337# _LT_PATH_MAGIC
4338# --------------
4339# find a file program which can recognize a shared library
4340m4_defun([_LT_PATH_MAGIC],
4341[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
4342if test -z "$lt_cv_path_MAGIC_CMD"; then
4343  if test -n "$ac_tool_prefix"; then
4344    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
4345  else
4346    MAGIC_CMD=:
4347  fi
4348fi
4349])# _LT_PATH_MAGIC
4350
4351
4352# LT_PATH_LD
4353# ----------
4354# find the pathname to the GNU or non-GNU linker
4355AC_DEFUN([LT_PATH_LD],
4356[AC_REQUIRE([AC_PROG_CC])dnl
4357AC_REQUIRE([AC_CANONICAL_HOST])dnl
4358AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4359m4_require([_LT_DECL_SED])dnl
4360m4_require([_LT_DECL_EGREP])dnl
4361m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
4362
4363AC_ARG_WITH([gnu-ld],
4364    [AS_HELP_STRING([--with-gnu-ld],
4365	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
4366    [test "$withval" = no || with_gnu_ld=yes],
4367    [with_gnu_ld=no])dnl
4368
4369ac_prog=ld
4370if test "$GCC" = yes; then
4371  # Check if gcc -print-prog-name=ld gives a path.
4372  AC_MSG_CHECKING([for ld used by $CC])
4373  case $host in
4374  *-*-mingw*)
4375    # gcc leaves a trailing carriage return which upsets mingw
4376    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4377  *)
4378    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4379  esac
4380  case $ac_prog in
4381    # Accept absolute paths.
4382    [[\\/]]* | ?:[[\\/]]*)
4383      re_direlt='/[[^/]][[^/]]*/\.\./'
4384      # Canonicalize the pathname of ld
4385      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
4386      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
4387	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
4388      done
4389      test -z "$LD" && LD="$ac_prog"
4390      ;;
4391  "")
4392    # If it fails, then pretend we aren't using GCC.
4393    ac_prog=ld
4394    ;;
4395  *)
4396    # If it is relative, then search for the first ld in PATH.
4397    with_gnu_ld=unknown
4398    ;;
4399  esac
4400elif test "$with_gnu_ld" = yes; then
4401  AC_MSG_CHECKING([for GNU ld])
4402else
4403  AC_MSG_CHECKING([for non-GNU ld])
4404fi
4405AC_CACHE_VAL(lt_cv_path_LD,
4406[if test -z "$LD"; then
4407  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4408  for ac_dir in $PATH; do
4409    IFS="$lt_save_ifs"
4410    test -z "$ac_dir" && ac_dir=.
4411    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4412      lt_cv_path_LD="$ac_dir/$ac_prog"
4413      # Check to see if the program is GNU ld.  I'd rather use --version,
4414      # but apparently some variants of GNU ld only accept -v.
4415      # Break only if it was the GNU/non-GNU ld that we prefer.
4416      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
4417      *GNU* | *'with BFD'*)
4418	test "$with_gnu_ld" != no && break
4419	;;
4420      *)
4421	test "$with_gnu_ld" != yes && break
4422	;;
4423      esac
4424    fi
4425  done
4426  IFS="$lt_save_ifs"
4427else
4428  lt_cv_path_LD="$LD" # Let the user override the test with a path.
4429fi])
4430LD="$lt_cv_path_LD"
4431if test -n "$LD"; then
4432  AC_MSG_RESULT($LD)
4433else
4434  AC_MSG_RESULT(no)
4435fi
4436test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4437_LT_PATH_LD_GNU
4438AC_SUBST([LD])
4439
4440_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
4441])# LT_PATH_LD
4442
4443# Old names:
4444AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
4445AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
4446dnl aclocal-1.4 backwards compatibility:
4447dnl AC_DEFUN([AM_PROG_LD], [])
4448dnl AC_DEFUN([AC_PROG_LD], [])
4449
4450
4451# _LT_PATH_LD_GNU
4452#- --------------
4453m4_defun([_LT_PATH_LD_GNU],
4454[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4455[# I'd rather use --version here, but apparently some GNU lds only accept -v.
4456case `$LD -v 2>&1 </dev/null` in
4457*GNU* | *'with BFD'*)
4458  lt_cv_prog_gnu_ld=yes
4459  ;;
4460*)
4461  lt_cv_prog_gnu_ld=no
4462  ;;
4463esac])
4464with_gnu_ld=$lt_cv_prog_gnu_ld
4465])# _LT_PATH_LD_GNU
4466
4467
4468# _LT_CMD_RELOAD
4469# --------------
4470# find reload flag for linker
4471#   -- PORTME Some linkers may need a different reload flag.
4472m4_defun([_LT_CMD_RELOAD],
4473[AC_CACHE_CHECK([for $LD option to reload object files],
4474  lt_cv_ld_reload_flag,
4475  [lt_cv_ld_reload_flag='-r'])
4476reload_flag=$lt_cv_ld_reload_flag
4477case $reload_flag in
4478"" | " "*) ;;
4479*) reload_flag=" $reload_flag" ;;
4480esac
4481reload_cmds='$LD$reload_flag -o $output$reload_objs'
4482case $host_os in
4483  cygwin* | mingw* | pw32* | cegcc*)
4484    if test "$GCC" != yes; then
4485      reload_cmds=false
4486    fi
4487    ;;
4488  darwin*)
4489    if test "$GCC" = yes; then
4490      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4491    else
4492      reload_cmds='$LD$reload_flag -o $output$reload_objs'
4493    fi
4494    ;;
4495esac
4496_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
4497_LT_TAGDECL([], [reload_cmds], [2])dnl
4498])# _LT_CMD_RELOAD
4499
4500
4501# _LT_CHECK_MAGIC_METHOD
4502# ----------------------
4503# how to check for library dependencies
4504#  -- PORTME fill in with the dynamic library characteristics
4505m4_defun([_LT_CHECK_MAGIC_METHOD],
4506[m4_require([_LT_DECL_EGREP])
4507m4_require([_LT_DECL_OBJDUMP])
4508AC_CACHE_CHECK([how to recognize dependent libraries],
4509lt_cv_deplibs_check_method,
4510[lt_cv_file_magic_cmd='$MAGIC_CMD'
4511lt_cv_file_magic_test_file=
4512lt_cv_deplibs_check_method='unknown'
4513# Need to set the preceding variable on all platforms that support
4514# interlibrary dependencies.
4515# 'none' -- dependencies not supported.
4516# `unknown' -- same as none, but documents that we really don't know.
4517# 'pass_all' -- all dependencies passed with no checks.
4518# 'test_compile' -- check by making test program.
4519# 'file_magic [[regex]]' -- check by looking for files in library path
4520# which responds to the $file_magic_cmd with a given extended regex.
4521# If you have `file' or equivalent on your system and you're not sure
4522# whether `pass_all' will *always* work, you probably want this one.
4523
4524case $host_os in
4525aix[[4-9]]*)
4526  lt_cv_deplibs_check_method=pass_all
4527  ;;
4528
4529beos*)
4530  lt_cv_deplibs_check_method=pass_all
4531  ;;
4532
4533bsdi[[45]]*)
4534  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4535  lt_cv_file_magic_cmd='/usr/bin/file -L'
4536  lt_cv_file_magic_test_file=/shlib/libc.so
4537  ;;
4538
4539cygwin*)
4540  # func_win32_libid is a shell function defined in ltmain.sh
4541  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4542  lt_cv_file_magic_cmd='func_win32_libid'
4543  ;;
4544
4545mingw* | pw32*)
4546  # Base MSYS/MinGW do not provide the 'file' command needed by
4547  # func_win32_libid shell function, so use a weaker test based on 'objdump',
4548  # unless we find 'file', for example because we are cross-compiling.
4549  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
4550  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
4551    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4552    lt_cv_file_magic_cmd='func_win32_libid'
4553  else
4554    # Keep this pattern in sync with the one in func_win32_libid.
4555    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
4556    lt_cv_file_magic_cmd='$OBJDUMP -f'
4557  fi
4558  ;;
4559
4560cegcc*)
4561  # use the weaker test based on 'objdump'. See mingw*.
4562  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
4563  lt_cv_file_magic_cmd='$OBJDUMP -f'
4564  ;;
4565
4566darwin* | rhapsody*)
4567  lt_cv_deplibs_check_method=pass_all
4568  ;;
4569
4570freebsd* | dragonfly*)
4571  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4572    case $host_cpu in
4573    i*86 )
4574      # Not sure whether the presence of OpenBSD here was a mistake.
4575      # Let's accept both of them until this is cleared up.
4576      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4577      lt_cv_file_magic_cmd=/usr/bin/file
4578      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4579      ;;
4580    esac
4581  else
4582    lt_cv_deplibs_check_method=pass_all
4583  fi
4584  ;;
4585
4586gnu*)
4587  lt_cv_deplibs_check_method=pass_all
4588  ;;
4589
4590haiku*)
4591  lt_cv_deplibs_check_method=pass_all
4592  ;;
4593
4594hpux10.20* | hpux11*)
4595  lt_cv_file_magic_cmd=/usr/bin/file
4596  case $host_cpu in
4597  ia64*)
4598    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4599    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4600    ;;
4601  hppa*64*)
4602    [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]']
4603    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4604    ;;
4605  *)
4606    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
4607    lt_cv_file_magic_test_file=/usr/lib/libc.sl
4608    ;;
4609  esac
4610  ;;
4611
4612interix[[3-9]]*)
4613  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4614  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4615  ;;
4616
4617irix5* | irix6* | nonstopux*)
4618  case $LD in
4619  *-32|*"-32 ") libmagic=32-bit;;
4620  *-n32|*"-n32 ") libmagic=N32;;
4621  *-64|*"-64 ") libmagic=64-bit;;
4622  *) libmagic=never-match;;
4623  esac
4624  lt_cv_deplibs_check_method=pass_all
4625  ;;
4626
4627# This must be Linux ELF.
4628linux* | k*bsd*-gnu | kopensolaris*-gnu)
4629  lt_cv_deplibs_check_method=pass_all
4630  ;;
4631
4632netbsd*)
4633  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
4634    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4635  else
4636    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4637  fi
4638  ;;
4639
4640newos6*)
4641  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4642  lt_cv_file_magic_cmd=/usr/bin/file
4643  lt_cv_file_magic_test_file=/usr/lib/libnls.so
4644  ;;
4645
4646*nto* | *qnx*)
4647  lt_cv_deplibs_check_method=pass_all
4648  ;;
4649
4650openbsd*)
4651  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4652    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4653  else
4654    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4655  fi
4656  ;;
4657
4658osf3* | osf4* | osf5*)
4659  lt_cv_deplibs_check_method=pass_all
4660  ;;
4661
4662rdos*)
4663  lt_cv_deplibs_check_method=pass_all
4664  ;;
4665
4666solaris*)
4667  lt_cv_deplibs_check_method=pass_all
4668  ;;
4669
4670sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4671  lt_cv_deplibs_check_method=pass_all
4672  ;;
4673
4674sysv4 | sysv4.3*)
4675  case $host_vendor in
4676  motorola)
4677    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]]'
4678    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4679    ;;
4680  ncr)
4681    lt_cv_deplibs_check_method=pass_all
4682    ;;
4683  sequent)
4684    lt_cv_file_magic_cmd='/bin/file'
4685    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4686    ;;
4687  sni)
4688    lt_cv_file_magic_cmd='/bin/file'
4689    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4690    lt_cv_file_magic_test_file=/lib/libc.so
4691    ;;
4692  siemens)
4693    lt_cv_deplibs_check_method=pass_all
4694    ;;
4695  pc)
4696    lt_cv_deplibs_check_method=pass_all
4697    ;;
4698  esac
4699  ;;
4700
4701tpf*)
4702  lt_cv_deplibs_check_method=pass_all
4703  ;;
4704esac
4705])
4706
4707file_magic_glob=
4708want_nocaseglob=no
4709if test "$build" = "$host"; then
4710  case $host_os in
4711  mingw* | pw32*)
4712    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
4713      want_nocaseglob=yes
4714    else
4715      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
4716    fi
4717    ;;
4718  esac
4719fi
4720
4721file_magic_cmd=$lt_cv_file_magic_cmd
4722deplibs_check_method=$lt_cv_deplibs_check_method
4723test -z "$deplibs_check_method" && deplibs_check_method=unknown
4724
4725_LT_DECL([], [deplibs_check_method], [1],
4726    [Method to check whether dependent libraries are shared objects])
4727_LT_DECL([], [file_magic_cmd], [1],
4728    [Command to use when deplibs_check_method = "file_magic"])
4729_LT_DECL([], [file_magic_glob], [1],
4730    [How to find potential files when deplibs_check_method = "file_magic"])
4731_LT_DECL([], [want_nocaseglob], [1],
4732    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
4733])# _LT_CHECK_MAGIC_METHOD
4734
4735
4736# LT_PATH_NM
4737# ----------
4738# find the pathname to a BSD- or MS-compatible name lister
4739AC_DEFUN([LT_PATH_NM],
4740[AC_REQUIRE([AC_PROG_CC])dnl
4741AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
4742[if test -n "$NM"; then
4743  # Let the user override the test.
4744  lt_cv_path_NM="$NM"
4745else
4746  lt_nm_to_check="${ac_tool_prefix}nm"
4747  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4748    lt_nm_to_check="$lt_nm_to_check nm"
4749  fi
4750  for lt_tmp_nm in $lt_nm_to_check; do
4751    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4752    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4753      IFS="$lt_save_ifs"
4754      test -z "$ac_dir" && ac_dir=.
4755      tmp_nm="$ac_dir/$lt_tmp_nm"
4756      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4757	# Check to see if the nm accepts a BSD-compat flag.
4758	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
4759	#   nm: unknown option "B" ignored
4760	# Tru64's nm complains that /dev/null is an invalid object file
4761	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4762	*/dev/null* | *'Invalid file or object type'*)
4763	  lt_cv_path_NM="$tmp_nm -B"
4764	  break
4765	  ;;
4766	*)
4767	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4768	  */dev/null*)
4769	    lt_cv_path_NM="$tmp_nm -p"
4770	    break
4771	    ;;
4772	  *)
4773	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4774	    continue # so that we can try to find one that supports BSD flags
4775	    ;;
4776	  esac
4777	  ;;
4778	esac
4779      fi
4780    done
4781    IFS="$lt_save_ifs"
4782  done
4783  : ${lt_cv_path_NM=no}
4784fi])
4785if test "$lt_cv_path_NM" != "no"; then
4786  NM="$lt_cv_path_NM"
4787else
4788  # Didn't find any BSD compatible name lister, look for dumpbin.
4789  if test -n "$DUMPBIN"; then :
4790    # Let the user override the test.
4791  else
4792    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
4793    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
4794    *COFF*)
4795      DUMPBIN="$DUMPBIN -symbols"
4796      ;;
4797    *)
4798      DUMPBIN=:
4799      ;;
4800    esac
4801  fi
4802  AC_SUBST([DUMPBIN])
4803  if test "$DUMPBIN" != ":"; then
4804    NM="$DUMPBIN"
4805  fi
4806fi
4807test -z "$NM" && NM=nm
4808AC_SUBST([NM])
4809_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
4810
4811AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
4812  [lt_cv_nm_interface="BSD nm"
4813  echo "int some_variable = 0;" > conftest.$ac_ext
4814  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
4815  (eval "$ac_compile" 2>conftest.err)
4816  cat conftest.err >&AS_MESSAGE_LOG_FD
4817  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
4818  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4819  cat conftest.err >&AS_MESSAGE_LOG_FD
4820  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
4821  cat conftest.out >&AS_MESSAGE_LOG_FD
4822  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4823    lt_cv_nm_interface="MS dumpbin"
4824  fi
4825  rm -f conftest*])
4826])# LT_PATH_NM
4827
4828# Old names:
4829AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
4830AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4831dnl aclocal-1.4 backwards compatibility:
4832dnl AC_DEFUN([AM_PROG_NM], [])
4833dnl AC_DEFUN([AC_PROG_NM], [])
4834
4835# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4836# --------------------------------
4837# how to determine the name of the shared library
4838# associated with a specific link library.
4839#  -- PORTME fill in with the dynamic library characteristics
4840m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
4841[m4_require([_LT_DECL_EGREP])
4842m4_require([_LT_DECL_OBJDUMP])
4843m4_require([_LT_DECL_DLLTOOL])
4844AC_CACHE_CHECK([how to associate runtime and link libraries],
4845lt_cv_sharedlib_from_linklib_cmd,
4846[lt_cv_sharedlib_from_linklib_cmd='unknown'
4847
4848case $host_os in
4849cygwin* | mingw* | pw32* | cegcc*)
4850  # two different shell functions defined in ltmain.sh
4851  # decide which to use based on capabilities of $DLLTOOL
4852  case `$DLLTOOL --help 2>&1` in
4853  *--identify-strict*)
4854    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
4855    ;;
4856  *)
4857    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
4858    ;;
4859  esac
4860  ;;
4861*)
4862  # fallback: assume linklib IS sharedlib
4863  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
4864  ;;
4865esac
4866])
4867sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
4868test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
4869
4870_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
4871    [Command to associate shared and link libraries])
4872])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
4873
4874
4875# _LT_PATH_MANIFEST_TOOL
4876# ----------------------
4877# locate the manifest tool
4878m4_defun([_LT_PATH_MANIFEST_TOOL],
4879[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
4880test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
4881AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
4882  [lt_cv_path_mainfest_tool=no
4883  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
4884  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
4885  cat conftest.err >&AS_MESSAGE_LOG_FD
4886  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
4887    lt_cv_path_mainfest_tool=yes
4888  fi
4889  rm -f conftest*])
4890if test "x$lt_cv_path_mainfest_tool" != xyes; then
4891  MANIFEST_TOOL=:
4892fi
4893_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
4894])# _LT_PATH_MANIFEST_TOOL
4895
4896
4897# LT_LIB_M
4898# --------
4899# check for math library
4900AC_DEFUN([LT_LIB_M],
4901[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4902LIBM=
4903case $host in
4904*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
4905  # These system don't have libm, or don't need it
4906  ;;
4907*-ncr-sysv4.3*)
4908  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4909  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4910  ;;
4911*)
4912  AC_CHECK_LIB(m, cos, LIBM="-lm")
4913  ;;
4914esac
4915AC_SUBST([LIBM])
4916])# LT_LIB_M
4917
4918# Old name:
4919AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
4920dnl aclocal-1.4 backwards compatibility:
4921dnl AC_DEFUN([AC_CHECK_LIBM], [])
4922
4923
4924# _LT_COMPILER_NO_RTTI([TAGNAME])
4925# -------------------------------
4926m4_defun([_LT_COMPILER_NO_RTTI],
4927[m4_require([_LT_TAG_COMPILER])dnl
4928
4929_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4930
4931if test "$GCC" = yes; then
4932  case $cc_basename in
4933  nvcc*)
4934    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
4935  *)
4936    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
4937  esac
4938
4939  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4940    lt_cv_prog_compiler_rtti_exceptions,
4941    [-fno-rtti -fno-exceptions], [],
4942    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4943fi
4944_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
4945	[Compiler flag to turn off builtin functions])
4946])# _LT_COMPILER_NO_RTTI
4947
4948
4949# _LT_CMD_GLOBAL_SYMBOLS
4950# ----------------------
4951m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
4952[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4953AC_REQUIRE([AC_PROG_CC])dnl
4954AC_REQUIRE([AC_PROG_AWK])dnl
4955AC_REQUIRE([LT_PATH_NM])dnl
4956AC_REQUIRE([LT_PATH_LD])dnl
4957m4_require([_LT_DECL_SED])dnl
4958m4_require([_LT_DECL_EGREP])dnl
4959m4_require([_LT_TAG_COMPILER])dnl
4960
4961# Check for command to grab the raw symbol name followed by C symbol from nm.
4962AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4963AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4964[
4965# These are sane defaults that work on at least a few old systems.
4966# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4967
4968# Character class describing NM global symbol codes.
4969symcode='[[BCDEGRST]]'
4970
4971# Regexp to match symbols that can be accessed directly from C.
4972sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4973
4974# Define system-specific variables.
4975case $host_os in
4976aix*)
4977  symcode='[[BCDT]]'
4978  ;;
4979cygwin* | mingw* | pw32* | cegcc*)
4980  symcode='[[ABCDGISTW]]'
4981  ;;
4982hpux*)
4983  if test "$host_cpu" = ia64; then
4984    symcode='[[ABCDEGRST]]'
4985  fi
4986  ;;
4987irix* | nonstopux*)
4988  symcode='[[BCDEGRST]]'
4989  ;;
4990osf*)
4991  symcode='[[BCDEGQRST]]'
4992  ;;
4993solaris*)
4994  symcode='[[BDRT]]'
4995  ;;
4996sco3.2v5*)
4997  symcode='[[DT]]'
4998  ;;
4999sysv4.2uw2*)
5000  symcode='[[DT]]'
5001  ;;
5002sysv5* | sco5v6* | unixware* | OpenUNIX*)
5003  symcode='[[ABDT]]'
5004  ;;
5005sysv4)
5006  symcode='[[DFNSTU]]'
5007  ;;
5008esac
5009
5010# If we're using GNU nm, then use its standard symbol codes.
5011case `$NM -V 2>&1` in
5012*GNU* | *'with BFD'*)
5013  symcode='[[ABCDGIRSTW]]' ;;
5014esac
5015
5016# Transform an extracted symbol line into a proper C declaration.
5017# Some systems (esp. on ia64) link data and code symbols differently,
5018# so use this general approach.
5019lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5020
5021# Transform an extracted symbol line into symbol name and symbol address
5022lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
5023lt_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'"
5024
5025# Handle CRLF in mingw tool chain
5026opt_cr=
5027case $build_os in
5028mingw*)
5029  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5030  ;;
5031esac
5032
5033# Try without a prefix underscore, then with it.
5034for ac_symprfx in "" "_"; do
5035
5036  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5037  symxfrm="\\1 $ac_symprfx\\2 \\2"
5038
5039  # Write the raw and C identifiers.
5040  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5041    # Fake it for dumpbin and say T for any non-static function
5042    # and D for any global variable.
5043    # Also find C++ and __fastcall symbols from MSVC++,
5044    # which start with @ or ?.
5045    lt_cv_sys_global_symbol_pipe="$AWK ['"\
5046"     {last_section=section; section=\$ 3};"\
5047"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
5048"     \$ 0!~/External *\|/{next};"\
5049"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
5050"     {if(hide[section]) next};"\
5051"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
5052"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
5053"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
5054"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
5055"     ' prfx=^$ac_symprfx]"
5056  else
5057    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5058  fi
5059  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
5060
5061  # Check to see that the pipe works correctly.
5062  pipe_works=no
5063
5064  rm -f conftest*
5065  cat > conftest.$ac_ext <<_LT_EOF
5066#ifdef __cplusplus
5067extern "C" {
5068#endif
5069char nm_test_var;
5070void nm_test_func(void);
5071void nm_test_func(void){}
5072#ifdef __cplusplus
5073}
5074#endif
5075int main(){nm_test_var='a';nm_test_func();return(0);}
5076_LT_EOF
5077
5078  if AC_TRY_EVAL(ac_compile); then
5079    # Now try to grab the symbols.
5080    nlist=conftest.nm
5081    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
5082      # Try sorting and uniquifying the output.
5083      if sort "$nlist" | uniq > "$nlist"T; then
5084	mv -f "$nlist"T "$nlist"
5085      else
5086	rm -f "$nlist"T
5087      fi
5088
5089      # Make sure that we snagged all the symbols we need.
5090      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5091	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5092	  cat <<_LT_EOF > conftest.$ac_ext
5093/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
5094#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
5095/* DATA imports from DLLs on WIN32 con't be const, because runtime
5096   relocations are performed -- see ld's documentation on pseudo-relocs.  */
5097# define LT@&t@_DLSYM_CONST
5098#elif defined(__osf__)
5099/* This system does not cope well with relocations in const data.  */
5100# define LT@&t@_DLSYM_CONST
5101#else
5102# define LT@&t@_DLSYM_CONST const
5103#endif
5104
5105#ifdef __cplusplus
5106extern "C" {
5107#endif
5108
5109_LT_EOF
5110	  # Now generate the symbol file.
5111	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5112
5113	  cat <<_LT_EOF >> conftest.$ac_ext
5114
5115/* The mapping between symbol names and symbols.  */
5116LT@&t@_DLSYM_CONST struct {
5117  const char *name;
5118  void       *address;
5119}
5120lt__PROGRAM__LTX_preloaded_symbols[[]] =
5121{
5122  { "@PROGRAM@", (void *) 0 },
5123_LT_EOF
5124	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
5125	  cat <<\_LT_EOF >> conftest.$ac_ext
5126  {0, (void *) 0}
5127};
5128
5129/* This works around a problem in FreeBSD linker */
5130#ifdef FREEBSD_WORKAROUND
5131static const void *lt_preloaded_setup() {
5132  return lt__PROGRAM__LTX_preloaded_symbols;
5133}
5134#endif
5135
5136#ifdef __cplusplus
5137}
5138#endif
5139_LT_EOF
5140	  # Now try linking the two files.
5141	  mv conftest.$ac_objext conftstm.$ac_objext
5142	  lt_globsym_save_LIBS=$LIBS
5143	  lt_globsym_save_CFLAGS=$CFLAGS
5144	  LIBS="conftstm.$ac_objext"
5145	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5146	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5147	    pipe_works=yes
5148	  fi
5149	  LIBS=$lt_globsym_save_LIBS
5150	  CFLAGS=$lt_globsym_save_CFLAGS
5151	else
5152	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5153	fi
5154      else
5155	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5156      fi
5157    else
5158      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5159    fi
5160  else
5161    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5162    cat conftest.$ac_ext >&5
5163  fi
5164  rm -rf conftest* conftst*
5165
5166  # Do not use the global_symbol_pipe unless it works.
5167  if test "$pipe_works" = yes; then
5168    break
5169  else
5170    lt_cv_sys_global_symbol_pipe=
5171  fi
5172done
5173])
5174if test -z "$lt_cv_sys_global_symbol_pipe"; then
5175  lt_cv_sys_global_symbol_to_cdecl=
5176fi
5177if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5178  AC_MSG_RESULT(failed)
5179else
5180  AC_MSG_RESULT(ok)
5181fi
5182
5183# Response file support.
5184if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5185  nm_file_list_spec='@'
5186elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
5187  nm_file_list_spec='@'
5188fi
5189
5190_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
5191    [Take the output of nm and produce a listing of raw symbols and C names])
5192_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
5193    [Transform the output of nm in a proper C declaration])
5194_LT_DECL([global_symbol_to_c_name_address],
5195    [lt_cv_sys_global_symbol_to_c_name_address], [1],
5196    [Transform the output of nm in a C name address pair])
5197_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
5198    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
5199    [Transform the output of nm in a C name address pair when lib prefix is needed])
5200_LT_DECL([], [nm_file_list_spec], [1],
5201    [Specify filename containing input files for $NM])
5202]) # _LT_CMD_GLOBAL_SYMBOLS
5203
5204
5205# _LT_COMPILER_PIC([TAGNAME])
5206# ---------------------------
5207m4_defun([_LT_COMPILER_PIC],
5208[m4_require([_LT_TAG_COMPILER])dnl
5209_LT_TAGVAR(lt_prog_compiler_wl, $1)=
5210_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5211_LT_TAGVAR(lt_prog_compiler_static, $1)=
5212
5213m4_if([$1], [CXX], [
5214  # C++ specific cases for pic, static, wl, etc.
5215  if test "$GXX" = yes; then
5216    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5217    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5218
5219    case $host_os in
5220    aix*)
5221      # All AIX code is PIC.
5222      if test "$host_cpu" = ia64; then
5223	# AIX 5 now supports IA64 processor
5224	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5225      fi
5226      ;;
5227
5228    amigaos*)
5229      case $host_cpu in
5230      powerpc)
5231            # see comment about AmigaOS4 .so support
5232            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5233        ;;
5234      m68k)
5235            # FIXME: we need at least 68020 code to build shared libraries, but
5236            # adding the `-m68020' flag to GCC prevents building anything better,
5237            # like `-m68040'.
5238            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5239        ;;
5240      esac
5241      ;;
5242
5243    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5244      # PIC is the default for these OSes.
5245      ;;
5246    mingw* | cygwin* | os2* | pw32* | cegcc*)
5247      # This hack is so that the source file can tell whether it is being
5248      # built for inclusion in a dll (and should export symbols for example).
5249      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5250      # (--disable-auto-import) libraries
5251      m4_if([$1], [GCJ], [],
5252	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5253      ;;
5254    darwin* | rhapsody*)
5255      # PIC is the default on this platform
5256      # Common symbols not allowed in MH_DYLIB files
5257      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5258      ;;
5259    *djgpp*)
5260      # DJGPP does not support shared libraries at all
5261      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5262      ;;
5263    haiku*)
5264      # PIC is the default for Haiku.
5265      # The "-static" flag exists, but is broken.
5266      _LT_TAGVAR(lt_prog_compiler_static, $1)=
5267      ;;
5268    interix[[3-9]]*)
5269      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5270      # Instead, we relocate shared libraries at runtime.
5271      ;;
5272    sysv4*MP*)
5273      if test -d /usr/nec; then
5274	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5275      fi
5276      ;;
5277    hpux*)
5278      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5279      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5280      # sets the default TLS model and affects inlining.
5281      case $host_cpu in
5282      hppa*64*)
5283	;;
5284      *)
5285	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5286	;;
5287      esac
5288      ;;
5289    *qnx* | *nto*)
5290      # QNX uses GNU C++, but need to define -shared option too, otherwise
5291      # it will coredump.
5292      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5293      ;;
5294    *)
5295      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5296      ;;
5297    esac
5298  else
5299    case $host_os in
5300      aix[[4-9]]*)
5301	# All AIX code is PIC.
5302	if test "$host_cpu" = ia64; then
5303	  # AIX 5 now supports IA64 processor
5304	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5305	else
5306	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5307	fi
5308	;;
5309      chorus*)
5310	case $cc_basename in
5311	cxch68*)
5312	  # Green Hills C++ Compiler
5313	  # _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"
5314	  ;;
5315	esac
5316	;;
5317      mingw* | cygwin* | os2* | pw32* | cegcc*)
5318	# This hack is so that the source file can tell whether it is being
5319	# built for inclusion in a dll (and should export symbols for example).
5320	m4_if([$1], [GCJ], [],
5321	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5322	;;
5323      dgux*)
5324	case $cc_basename in
5325	  ec++*)
5326	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5327	    ;;
5328	  ghcx*)
5329	    # Green Hills C++ Compiler
5330	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5331	    ;;
5332	  *)
5333	    ;;
5334	esac
5335	;;
5336      freebsd* | dragonfly*)
5337	# FreeBSD uses GNU C++
5338	;;
5339      hpux9* | hpux10* | hpux11*)
5340	case $cc_basename in
5341	  CC*)
5342	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5343	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5344	    if test "$host_cpu" != ia64; then
5345	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5346	    fi
5347	    ;;
5348	  aCC*)
5349	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5350	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5351	    case $host_cpu in
5352	    hppa*64*|ia64*)
5353	      # +Z the default
5354	      ;;
5355	    *)
5356	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5357	      ;;
5358	    esac
5359	    ;;
5360	  *)
5361	    ;;
5362	esac
5363	;;
5364      interix*)
5365	# This is c89, which is MS Visual C++ (no shared libs)
5366	# Anyone wants to do a port?
5367	;;
5368      irix5* | irix6* | nonstopux*)
5369	case $cc_basename in
5370	  CC*)
5371	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5372	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5373	    # CC pic flag -KPIC is the default.
5374	    ;;
5375	  *)
5376	    ;;
5377	esac
5378	;;
5379      linux* | k*bsd*-gnu | kopensolaris*-gnu)
5380	case $cc_basename in
5381	  KCC*)
5382	    # KAI C++ Compiler
5383	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5384	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5385	    ;;
5386	  ecpc* )
5387	    # old Intel C++ for x86_64 which still supported -KPIC.
5388	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5389	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5390	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5391	    ;;
5392	  icpc* )
5393	    # Intel C++, used to be incompatible with GCC.
5394	    # ICC 10 doesn't accept -KPIC any more.
5395	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5396	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5397	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5398	    ;;
5399	  pgCC* | pgcpp*)
5400	    # Portland Group C++ compiler
5401	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5402	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5403	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5404	    ;;
5405	  cxx*)
5406	    # Compaq C++
5407	    # Make sure the PIC flag is empty.  It appears that all Alpha
5408	    # Linux and Compaq Tru64 Unix objects are PIC.
5409	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5410	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5411	    ;;
5412	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
5413	    # IBM XL 8.0, 9.0 on PPC and BlueGene
5414	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5415	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5416	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5417	    ;;
5418	  *)
5419	    case `$CC -V 2>&1 | sed 5q` in
5420	    *Sun\ C*)
5421	      # Sun C++ 5.9
5422	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5423	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5424	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5425	      ;;
5426	    esac
5427	    ;;
5428	esac
5429	;;
5430      lynxos*)
5431	;;
5432      m88k*)
5433	;;
5434      mvs*)
5435	case $cc_basename in
5436	  cxx*)
5437	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5438	    ;;
5439	  *)
5440	    ;;
5441	esac
5442	;;
5443      netbsd*)
5444	;;
5445      *qnx* | *nto*)
5446        # QNX uses GNU C++, but need to define -shared option too, otherwise
5447        # it will coredump.
5448        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5449        ;;
5450      osf3* | osf4* | osf5*)
5451	case $cc_basename in
5452	  KCC*)
5453	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5454	    ;;
5455	  RCC*)
5456	    # Rational C++ 2.4.1
5457	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5458	    ;;
5459	  cxx*)
5460	    # Digital/Compaq C++
5461	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5462	    # Make sure the PIC flag is empty.  It appears that all Alpha
5463	    # Linux and Compaq Tru64 Unix objects are PIC.
5464	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5465	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5466	    ;;
5467	  *)
5468	    ;;
5469	esac
5470	;;
5471      psos*)
5472	;;
5473      solaris*)
5474	case $cc_basename in
5475	  CC* | sunCC*)
5476	    # Sun C++ 4.2, 5.x and Centerline C++
5477	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5478	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5479	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5480	    ;;
5481	  gcx*)
5482	    # Green Hills C++ Compiler
5483	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5484	    ;;
5485	  *)
5486	    ;;
5487	esac
5488	;;
5489      sunos4*)
5490	case $cc_basename in
5491	  CC*)
5492	    # Sun C++ 4.x
5493	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5494	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5495	    ;;
5496	  lcc*)
5497	    # Lucid
5498	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5499	    ;;
5500	  *)
5501	    ;;
5502	esac
5503	;;
5504      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5505	case $cc_basename in
5506	  CC*)
5507	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5508	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5509	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5510	    ;;
5511	esac
5512	;;
5513      tandem*)
5514	case $cc_basename in
5515	  NCC*)
5516	    # NonStop-UX NCC 3.20
5517	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5518	    ;;
5519	  *)
5520	    ;;
5521	esac
5522	;;
5523      vxworks*)
5524	;;
5525      *)
5526	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5527	;;
5528    esac
5529  fi
5530],
5531[
5532  if test "$GCC" = yes; then
5533    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5534    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5535
5536    case $host_os in
5537      aix*)
5538      # All AIX code is PIC.
5539      if test "$host_cpu" = ia64; then
5540	# AIX 5 now supports IA64 processor
5541	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5542      fi
5543      ;;
5544
5545    amigaos*)
5546      case $host_cpu in
5547      powerpc)
5548            # see comment about AmigaOS4 .so support
5549            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5550        ;;
5551      m68k)
5552            # FIXME: we need at least 68020 code to build shared libraries, but
5553            # adding the `-m68020' flag to GCC prevents building anything better,
5554            # like `-m68040'.
5555            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5556        ;;
5557      esac
5558      ;;
5559
5560    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5561      # PIC is the default for these OSes.
5562      ;;
5563
5564    mingw* | cygwin* | pw32* | os2* | cegcc*)
5565      # This hack is so that the source file can tell whether it is being
5566      # built for inclusion in a dll (and should export symbols for example).
5567      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5568      # (--disable-auto-import) libraries
5569      m4_if([$1], [GCJ], [],
5570	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5571      ;;
5572
5573    darwin* | rhapsody*)
5574      # PIC is the default on this platform
5575      # Common symbols not allowed in MH_DYLIB files
5576      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5577      ;;
5578
5579    haiku*)
5580      # PIC is the default for Haiku.
5581      # The "-static" flag exists, but is broken.
5582      _LT_TAGVAR(lt_prog_compiler_static, $1)=
5583      ;;
5584
5585    hpux*)
5586      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
5587      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
5588      # sets the default TLS model and affects inlining.
5589      case $host_cpu in
5590      hppa*64*)
5591	# +Z the default
5592	;;
5593      *)
5594	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5595	;;
5596      esac
5597      ;;
5598
5599    interix[[3-9]]*)
5600      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5601      # Instead, we relocate shared libraries at runtime.
5602      ;;
5603
5604    msdosdjgpp*)
5605      # Just because we use GCC doesn't mean we suddenly get shared libraries
5606      # on systems that don't support them.
5607      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5608      enable_shared=no
5609      ;;
5610
5611    *nto* | *qnx*)
5612      # QNX uses GNU C++, but need to define -shared option too, otherwise
5613      # it will coredump.
5614      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5615      ;;
5616
5617    sysv4*MP*)
5618      if test -d /usr/nec; then
5619	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5620      fi
5621      ;;
5622
5623    *)
5624      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5625      ;;
5626    esac
5627
5628    case $cc_basename in
5629    nvcc*) # Cuda Compiler Driver 2.2
5630      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
5631      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
5632      ;;
5633    esac
5634  else
5635    # PORTME Check for flag to pass linker flags through the system compiler.
5636    case $host_os in
5637    aix*)
5638      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5639      if test "$host_cpu" = ia64; then
5640	# AIX 5 now supports IA64 processor
5641	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5642      else
5643	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5644      fi
5645      ;;
5646
5647    mingw* | cygwin* | pw32* | os2* | cegcc*)
5648      # This hack is so that the source file can tell whether it is being
5649      # built for inclusion in a dll (and should export symbols for example).
5650      m4_if([$1], [GCJ], [],
5651	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
5652      ;;
5653
5654    hpux9* | hpux10* | hpux11*)
5655      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5656      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5657      # not for PA HP-UX.
5658      case $host_cpu in
5659      hppa*64*|ia64*)
5660	# +Z the default
5661	;;
5662      *)
5663	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5664	;;
5665      esac
5666      # Is there a better lt_prog_compiler_static that works with the bundled CC?
5667      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5668      ;;
5669
5670    irix5* | irix6* | nonstopux*)
5671      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5672      # PIC (with -KPIC) is the default.
5673      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5674      ;;
5675
5676    linux* | k*bsd*-gnu | kopensolaris*-gnu)
5677      case $cc_basename in
5678      # old Intel for x86_64 which still supported -KPIC.
5679      ecc*)
5680	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5681	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5682	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5683        ;;
5684      # icc used to be incompatible with GCC.
5685      # ICC 10 doesn't accept -KPIC any more.
5686      icc* | ifort*)
5687	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5688	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5689	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5690        ;;
5691      # Lahey Fortran 8.1.
5692      lf95*)
5693	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5694	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
5695	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
5696	;;
5697      nagfor*)
5698	# NAG Fortran compiler
5699	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
5700	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5701	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5702	;;
5703      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
5704        # Portland Group compilers (*not* the Pentium gcc compiler,
5705	# which looks to be a dead project)
5706	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5707	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5708	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5709        ;;
5710      ccc*)
5711        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5712        # All Alpha code is PIC.
5713        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5714        ;;
5715      xl* | bgxl* | bgf* | mpixl*)
5716	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
5717	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5718	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
5719	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5720	;;
5721      *)
5722	case `$CC -V 2>&1 | sed 5q` in
5723	*Sun\ F* | *Sun*Fortran*)
5724	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
5725	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5726	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5727	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5728	  ;;
5729	*Sun\ C*)
5730	  # Sun C 5.9
5731	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5732	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5733	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5734	  ;;
5735	esac
5736	;;
5737      esac
5738      ;;
5739
5740    newsos6)
5741      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5742      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5743      ;;
5744
5745    *nto* | *qnx*)
5746      # QNX uses GNU C++, but need to define -shared option too, otherwise
5747      # it will coredump.
5748      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5749      ;;
5750
5751    osf3* | osf4* | osf5*)
5752      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5753      # All OSF/1 code is PIC.
5754      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5755      ;;
5756
5757    rdos*)
5758      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5759      ;;
5760
5761    solaris*)
5762      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5763      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5764      case $cc_basename in
5765      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
5766	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5767      *)
5768	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5769      esac
5770      ;;
5771
5772    sunos4*)
5773      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5774      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5775      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5776      ;;
5777
5778    sysv4 | sysv4.2uw2* | sysv4.3*)
5779      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5780      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5781      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5782      ;;
5783
5784    sysv4*MP*)
5785      if test -d /usr/nec ;then
5786	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5787	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5788      fi
5789      ;;
5790
5791    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5792      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5793      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5794      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5795      ;;
5796
5797    unicos*)
5798      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5799      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5800      ;;
5801
5802    uts4*)
5803      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5804      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5805      ;;
5806
5807    *)
5808      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5809      ;;
5810    esac
5811  fi
5812])
5813case $host_os in
5814  # For platforms which do not support PIC, -DPIC is meaningless:
5815  *djgpp*)
5816    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
5817    ;;
5818  *)
5819    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
5820    ;;
5821esac
5822
5823AC_CACHE_CHECK([for $compiler option to produce PIC],
5824  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
5825  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
5826_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
5827
5828#
5829# Check to make sure the PIC flag actually works.
5830#
5831if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
5832  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
5833    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
5834    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
5835    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
5836     "" | " "*) ;;
5837     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5838     esac],
5839    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
5840     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5841fi
5842_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
5843	[Additional compiler flags for building library objects])
5844
5845_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
5846	[How to pass a linker flag through the compiler])
5847#
5848# Check to make sure the static flag actually works.
5849#
5850wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
5851_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5852  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5853  $lt_tmp_static_flag,
5854  [],
5855  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
5856_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
5857	[Compiler flag to prevent dynamic linking])
5858])# _LT_COMPILER_PIC
5859
5860
5861# _LT_LINKER_SHLIBS([TAGNAME])
5862# ----------------------------
5863# See if the linker supports building shared libraries.
5864m4_defun([_LT_LINKER_SHLIBS],
5865[AC_REQUIRE([LT_PATH_LD])dnl
5866AC_REQUIRE([LT_PATH_NM])dnl
5867m4_require([_LT_PATH_MANIFEST_TOOL])dnl
5868m4_require([_LT_FILEUTILS_DEFAULTS])dnl
5869m4_require([_LT_DECL_EGREP])dnl
5870m4_require([_LT_DECL_SED])dnl
5871m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
5872m4_require([_LT_TAG_COMPILER])dnl
5873AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5874m4_if([$1], [CXX], [
5875  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5876  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5877  case $host_os in
5878  aix[[4-9]]*)
5879    # If we're using GNU nm, then we don't want the "-C" option.
5880    # -C means demangle to AIX nm, but means don't demangle with GNU nm
5881    # Also, AIX nm treats weak defined symbols like other global defined
5882    # symbols, whereas GNU nm marks them as "W".
5883    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
5884      _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'
5885    else
5886      _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'
5887    fi
5888    ;;
5889  pw32*)
5890    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5891    ;;
5892  cygwin* | mingw* | cegcc*)
5893    case $cc_basename in
5894    cl*) ;;
5895    *)
5896      _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'
5897      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5898      ;;
5899    esac
5900    ;;
5901  *)
5902    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5903    ;;
5904  esac
5905], [
5906  runpath_var=
5907  _LT_TAGVAR(allow_undefined_flag, $1)=
5908  _LT_TAGVAR(always_export_symbols, $1)=no
5909  _LT_TAGVAR(archive_cmds, $1)=
5910  _LT_TAGVAR(archive_expsym_cmds, $1)=
5911  _LT_TAGVAR(compiler_needs_object, $1)=no
5912  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5913  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
5914  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5915  _LT_TAGVAR(hardcode_automatic, $1)=no
5916  _LT_TAGVAR(hardcode_direct, $1)=no
5917  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
5918  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
5919  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5920  _LT_TAGVAR(hardcode_libdir_separator, $1)=
5921  _LT_TAGVAR(hardcode_minus_L, $1)=no
5922  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5923  _LT_TAGVAR(inherit_rpath, $1)=no
5924  _LT_TAGVAR(link_all_deplibs, $1)=unknown
5925  _LT_TAGVAR(module_cmds, $1)=
5926  _LT_TAGVAR(module_expsym_cmds, $1)=
5927  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
5928  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5929  _LT_TAGVAR(thread_safe_flag_spec, $1)=
5930  _LT_TAGVAR(whole_archive_flag_spec, $1)=
5931  # include_expsyms should be a list of space-separated symbols to be *always*
5932  # included in the symbol list
5933  _LT_TAGVAR(include_expsyms, $1)=
5934  # exclude_expsyms can be an extended regexp of symbols to exclude
5935  # it will be wrapped by ` (' and `)$', so one must not match beginning or
5936  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5937  # as well as any symbol that contains `d'.
5938  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5939  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5940  # platforms (ab)use it in PIC code, but their linkers get confused if
5941  # the symbol is explicitly referenced.  Since portable code cannot
5942  # rely on this symbol name, it's probably fine to never include it in
5943  # preloaded symbol tables.
5944  # Exclude shared library initialization/finalization symbols.
5945dnl Note also adjust exclude_expsyms for C++ above.
5946  extract_expsyms_cmds=
5947
5948  case $host_os in
5949  cygwin* | mingw* | pw32* | cegcc*)
5950    # FIXME: the MSVC++ port hasn't been tested in a loooong time
5951    # When not using gcc, we currently assume that we are using
5952    # Microsoft Visual C++.
5953    if test "$GCC" != yes; then
5954      with_gnu_ld=no
5955    fi
5956    ;;
5957  interix*)
5958    # we just hope/assume this is gcc and not c89 (= MSVC++)
5959    with_gnu_ld=yes
5960    ;;
5961  openbsd*)
5962    with_gnu_ld=no
5963    ;;
5964  esac
5965
5966  _LT_TAGVAR(ld_shlibs, $1)=yes
5967
5968  # On some targets, GNU ld is compatible enough with the native linker
5969  # that we're better off using the native interface for both.
5970  lt_use_gnu_ld_interface=no
5971  if test "$with_gnu_ld" = yes; then
5972    case $host_os in
5973      aix*)
5974	# The AIX port of GNU ld has always aspired to compatibility
5975	# with the native linker.  However, as the warning in the GNU ld
5976	# block says, versions before 2.19.5* couldn't really create working
5977	# shared libraries, regardless of the interface used.
5978	case `$LD -v 2>&1` in
5979	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
5980	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
5981	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
5982	  *)
5983	    lt_use_gnu_ld_interface=yes
5984	    ;;
5985	esac
5986	;;
5987      *)
5988	lt_use_gnu_ld_interface=yes
5989	;;
5990    esac
5991  fi
5992
5993  if test "$lt_use_gnu_ld_interface" = yes; then
5994    # If archive_cmds runs LD, not CC, wlarc should be empty
5995    wlarc='${wl}'
5996
5997    # Set some defaults for GNU ld with shared library support. These
5998    # are reset later if shared libraries are not supported. Putting them
5999    # here allows them to be overridden if necessary.
6000    runpath_var=LD_RUN_PATH
6001    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6002    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6003    # ancient GNU ld didn't support --whole-archive et. al.
6004    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
6005      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6006    else
6007      _LT_TAGVAR(whole_archive_flag_spec, $1)=
6008    fi
6009    supports_anon_versioning=no
6010    case `$LD -v 2>&1` in
6011      *GNU\ gold*) supports_anon_versioning=yes ;;
6012      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6013      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6014      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6015      *\ 2.11.*) ;; # other 2.11 versions
6016      *) supports_anon_versioning=yes ;;
6017    esac
6018
6019    # See if GNU ld supports shared libraries.
6020    case $host_os in
6021    aix[[3-9]]*)
6022      # On AIX/PPC, the GNU linker is very broken
6023      if test "$host_cpu" != ia64; then
6024	_LT_TAGVAR(ld_shlibs, $1)=no
6025	cat <<_LT_EOF 1>&2
6026
6027*** Warning: the GNU linker, at least up to release 2.19, is reported
6028*** to be unable to reliably create shared libraries on AIX.
6029*** Therefore, libtool is disabling shared libraries support.  If you
6030*** really care for shared libraries, you may want to install binutils
6031*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
6032*** You will then need to restart the configuration process.
6033
6034_LT_EOF
6035      fi
6036      ;;
6037
6038    amigaos*)
6039      case $host_cpu in
6040      powerpc)
6041            # see comment about AmigaOS4 .so support
6042            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6043            _LT_TAGVAR(archive_expsym_cmds, $1)=''
6044        ;;
6045      m68k)
6046            _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)'
6047            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6048            _LT_TAGVAR(hardcode_minus_L, $1)=yes
6049        ;;
6050      esac
6051      ;;
6052
6053    beos*)
6054      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6055	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6056	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6057	# support --undefined.  This deserves some investigation.  FIXME
6058	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6059      else
6060	_LT_TAGVAR(ld_shlibs, $1)=no
6061      fi
6062      ;;
6063
6064    cygwin* | mingw* | pw32* | cegcc*)
6065      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6066      # as there is no search path for DLLs.
6067      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6068      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6069      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6070      _LT_TAGVAR(always_export_symbols, $1)=no
6071      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6072      _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'
6073      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
6074
6075      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6076        _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'
6077	# If the export-symbols file already is a .def file (1st line
6078	# is EXPORTS), use it as is; otherwise, prepend...
6079	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6080	  cp $export_symbols $output_objdir/$soname.def;
6081	else
6082	  echo EXPORTS > $output_objdir/$soname.def;
6083	  cat $export_symbols >> $output_objdir/$soname.def;
6084	fi~
6085	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6086      else
6087	_LT_TAGVAR(ld_shlibs, $1)=no
6088      fi
6089      ;;
6090
6091    haiku*)
6092      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6093      _LT_TAGVAR(link_all_deplibs, $1)=yes
6094      ;;
6095
6096    interix[[3-9]]*)
6097      _LT_TAGVAR(hardcode_direct, $1)=no
6098      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6099      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6100      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6101      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6102      # Instead, shared libraries are loaded at an image base (0x10000000 by
6103      # default) and relocated if they conflict, which is a slow very memory
6104      # consuming and fragmenting process.  To avoid this, we pick a random,
6105      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6106      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6107      _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'
6108      _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'
6109      ;;
6110
6111    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
6112      tmp_diet=no
6113      if test "$host_os" = linux-dietlibc; then
6114	case $cc_basename in
6115	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
6116	esac
6117      fi
6118      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
6119	 && test "$tmp_diet" = no
6120      then
6121	tmp_addflag=' $pic_flag'
6122	tmp_sharedflag='-shared'
6123	case $cc_basename,$host_cpu in
6124        pgcc*)				# Portland Group C compiler
6125	  _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'
6126	  tmp_addflag=' $pic_flag'
6127	  ;;
6128	pgf77* | pgf90* | pgf95* | pgfortran*)
6129					# Portland Group f77 and f90 compilers
6130	  _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'
6131	  tmp_addflag=' $pic_flag -Mnomain' ;;
6132	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
6133	  tmp_addflag=' -i_dynamic' ;;
6134	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
6135	  tmp_addflag=' -i_dynamic -nofor_main' ;;
6136	ifc* | ifort*)			# Intel Fortran compiler
6137	  tmp_addflag=' -nofor_main' ;;
6138	lf95*)				# Lahey Fortran 8.1
6139	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
6140	  tmp_sharedflag='--shared' ;;
6141	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
6142	  tmp_sharedflag='-qmkshrobj'
6143	  tmp_addflag= ;;
6144	nvcc*)	# Cuda Compiler Driver 2.2
6145	  _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'
6146	  _LT_TAGVAR(compiler_needs_object, $1)=yes
6147	  ;;
6148	esac
6149	case `$CC -V 2>&1 | sed 5q` in
6150	*Sun\ C*)			# Sun C 5.9
6151	  _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'
6152	  _LT_TAGVAR(compiler_needs_object, $1)=yes
6153	  tmp_sharedflag='-G' ;;
6154	*Sun\ F*)			# Sun Fortran 8.3
6155	  tmp_sharedflag='-G' ;;
6156	esac
6157	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6158
6159        if test "x$supports_anon_versioning" = xyes; then
6160          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6161	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6162	    echo "local: *; };" >> $output_objdir/$libname.ver~
6163	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6164        fi
6165
6166	case $cc_basename in
6167	xlf* | bgf* | bgxlf* | mpixlf*)
6168	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
6169	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
6170	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6171	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6172	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
6173	  if test "x$supports_anon_versioning" = xyes; then
6174	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6175	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6176	      echo "local: *; };" >> $output_objdir/$libname.ver~
6177	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
6178	  fi
6179	  ;;
6180	esac
6181      else
6182        _LT_TAGVAR(ld_shlibs, $1)=no
6183      fi
6184      ;;
6185
6186    netbsd*)
6187      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6188	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
6189	wlarc=
6190      else
6191	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6192	_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'
6193      fi
6194      ;;
6195
6196    solaris*)
6197      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
6198	_LT_TAGVAR(ld_shlibs, $1)=no
6199	cat <<_LT_EOF 1>&2
6200
6201*** Warning: The releases 2.8.* of the GNU linker cannot reliably
6202*** create shared libraries on Solaris systems.  Therefore, libtool
6203*** is disabling shared libraries support.  We urge you to upgrade GNU
6204*** binutils to release 2.9.1 or newer.  Another option is to modify
6205*** your PATH or compiler configuration so that the native linker is
6206*** used, and then restart.
6207
6208_LT_EOF
6209      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6210	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6211	_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'
6212      else
6213	_LT_TAGVAR(ld_shlibs, $1)=no
6214      fi
6215      ;;
6216
6217    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
6218      case `$LD -v 2>&1` in
6219        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
6220	_LT_TAGVAR(ld_shlibs, $1)=no
6221	cat <<_LT_EOF 1>&2
6222
6223*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
6224*** reliably create shared libraries on SCO systems.  Therefore, libtool
6225*** is disabling shared libraries support.  We urge you to upgrade GNU
6226*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
6227*** your PATH or compiler configuration so that the native linker is
6228*** used, and then restart.
6229
6230_LT_EOF
6231	;;
6232	*)
6233	  # For security reasons, it is highly recommended that you always
6234	  # use absolute paths for naming shared libraries, and exclude the
6235	  # DT_RUNPATH tag from executables and libraries.  But doing so
6236	  # requires that you compile everything twice, which is a pain.
6237	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6238	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6239	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6240	    _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'
6241	  else
6242	    _LT_TAGVAR(ld_shlibs, $1)=no
6243	  fi
6244	;;
6245      esac
6246      ;;
6247
6248    sunos4*)
6249      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6250      wlarc=
6251      _LT_TAGVAR(hardcode_direct, $1)=yes
6252      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6253      ;;
6254
6255    *)
6256      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6257	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6258	_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'
6259      else
6260	_LT_TAGVAR(ld_shlibs, $1)=no
6261      fi
6262      ;;
6263    esac
6264
6265    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
6266      runpath_var=
6267      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6268      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6269      _LT_TAGVAR(whole_archive_flag_spec, $1)=
6270    fi
6271  else
6272    # PORTME fill in a description of your system's linker (not GNU ld)
6273    case $host_os in
6274    aix3*)
6275      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6276      _LT_TAGVAR(always_export_symbols, $1)=yes
6277      _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'
6278      # Note: this linker hardcodes the directories in LIBPATH if there
6279      # are no directories specified by -L.
6280      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6281      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
6282	# Neither direct hardcoding nor static linking is supported with a
6283	# broken collect2.
6284	_LT_TAGVAR(hardcode_direct, $1)=unsupported
6285      fi
6286      ;;
6287
6288    aix[[4-9]]*)
6289      if test "$host_cpu" = ia64; then
6290	# On IA64, the linker does run time linking by default, so we don't
6291	# have to do anything special.
6292	aix_use_runtimelinking=no
6293	exp_sym_flag='-Bexport'
6294	no_entry_flag=""
6295      else
6296	# If we're using GNU nm, then we don't want the "-C" option.
6297	# -C means demangle to AIX nm, but means don't demangle with GNU nm
6298	# Also, AIX nm treats weak defined symbols like other global
6299	# defined symbols, whereas GNU nm marks them as "W".
6300	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6301	  _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'
6302	else
6303	  _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'
6304	fi
6305	aix_use_runtimelinking=no
6306
6307	# Test if we are trying to use run time linking or normal
6308	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
6309	# need to do runtime linking.
6310	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
6311	  for ld_flag in $LDFLAGS; do
6312	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6313	    aix_use_runtimelinking=yes
6314	    break
6315	  fi
6316	  done
6317	  ;;
6318	esac
6319
6320	exp_sym_flag='-bexport'
6321	no_entry_flag='-bnoentry'
6322      fi
6323
6324      # When large executables or shared objects are built, AIX ld can
6325      # have problems creating the table of contents.  If linking a library
6326      # or program results in "error TOC overflow" add -mminimal-toc to
6327      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6328      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6329
6330      _LT_TAGVAR(archive_cmds, $1)=''
6331      _LT_TAGVAR(hardcode_direct, $1)=yes
6332      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6333      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6334      _LT_TAGVAR(link_all_deplibs, $1)=yes
6335      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6336
6337      if test "$GCC" = yes; then
6338	case $host_os in aix4.[[012]]|aix4.[[012]].*)
6339	# We only want to do this on AIX 4.2 and lower, the check
6340	# below for broken collect2 doesn't work under 4.3+
6341	  collect2name=`${CC} -print-prog-name=collect2`
6342	  if test -f "$collect2name" &&
6343	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
6344	  then
6345	  # We have reworked collect2
6346	  :
6347	  else
6348	  # We have old collect2
6349	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
6350	  # It fails to find uninstalled libraries when the uninstalled
6351	  # path is not listed in the libpath.  Setting hardcode_minus_L
6352	  # to unsupported forces relinking
6353	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
6354	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6355	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
6356	  fi
6357	  ;;
6358	esac
6359	shared_flag='-shared'
6360	if test "$aix_use_runtimelinking" = yes; then
6361	  shared_flag="$shared_flag "'${wl}-G'
6362	fi
6363      else
6364	# not using gcc
6365	if test "$host_cpu" = ia64; then
6366	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6367	# chokes on -Wl,-G. The following line is correct:
6368	  shared_flag='-G'
6369	else
6370	  if test "$aix_use_runtimelinking" = yes; then
6371	    shared_flag='${wl}-G'
6372	  else
6373	    shared_flag='${wl}-bM:SRE'
6374	  fi
6375	fi
6376      fi
6377
6378      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
6379      # It seems that -bexpall does not export symbols beginning with
6380      # underscore (_), so it is better to generate a list of symbols to export.
6381      _LT_TAGVAR(always_export_symbols, $1)=yes
6382      if test "$aix_use_runtimelinking" = yes; then
6383	# Warning - without using the other runtime loading flags (-brtl),
6384	# -berok will link without error, but may produce a broken library.
6385	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
6386        # Determine the default libpath from the value encoded in an
6387        # empty executable.
6388        _LT_SYS_MODULE_PATH_AIX([$1])
6389        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6390        _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"
6391      else
6392	if test "$host_cpu" = ia64; then
6393	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6394	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6395	  _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"
6396	else
6397	 # Determine the default libpath from the value encoded in an
6398	 # empty executable.
6399	 _LT_SYS_MODULE_PATH_AIX([$1])
6400	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6401	  # Warning - without using the other run time loading flags,
6402	  # -berok will link without error, but may produce a broken library.
6403	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6404	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6405	  if test "$with_gnu_ld" = yes; then
6406	    # We only use this code for GNU lds that support --whole-archive.
6407	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
6408	  else
6409	    # Exported symbols can be pulled into shared objects from archives
6410	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
6411	  fi
6412	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6413	  # This is similar to how AIX traditionally builds its shared libraries.
6414	  _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'
6415	fi
6416      fi
6417      ;;
6418
6419    amigaos*)
6420      case $host_cpu in
6421      powerpc)
6422            # see comment about AmigaOS4 .so support
6423            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6424            _LT_TAGVAR(archive_expsym_cmds, $1)=''
6425        ;;
6426      m68k)
6427            _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)'
6428            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6429            _LT_TAGVAR(hardcode_minus_L, $1)=yes
6430        ;;
6431      esac
6432      ;;
6433
6434    bsdi[[45]]*)
6435      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6436      ;;
6437
6438    cygwin* | mingw* | pw32* | cegcc*)
6439      # When not using gcc, we currently assume that we are using
6440      # Microsoft Visual C++.
6441      # hardcode_libdir_flag_spec is actually meaningless, as there is
6442      # no search path for DLLs.
6443      case $cc_basename in
6444      cl*)
6445	# Native MSVC
6446	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6447	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6448	_LT_TAGVAR(always_export_symbols, $1)=yes
6449	_LT_TAGVAR(file_list_spec, $1)='@'
6450	# Tell ltmain to make .lib files, not .a files.
6451	libext=lib
6452	# Tell ltmain to make .dll files, not .so files.
6453	shrext_cmds=".dll"
6454	# FIXME: Setting linknames here is a bad hack.
6455	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
6456	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6457	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
6458	  else
6459	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
6460	  fi~
6461	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
6462	  linknames='
6463	# The linker will not automatically build a static lib if we build a DLL.
6464	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6465	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6466	_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'
6467	# Don't use ranlib
6468	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
6469	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
6470	  lt_tool_outputfile="@TOOL_OUTPUT@"~
6471	  case $lt_outputfile in
6472	    *.exe|*.EXE) ;;
6473	    *)
6474	      lt_outputfile="$lt_outputfile.exe"
6475	      lt_tool_outputfile="$lt_tool_outputfile.exe"
6476	      ;;
6477	  esac~
6478	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
6479	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
6480	    $RM "$lt_outputfile.manifest";
6481	  fi'
6482	;;
6483      *)
6484	# Assume MSVC wrapper
6485	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6486	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6487	# Tell ltmain to make .lib files, not .a files.
6488	libext=lib
6489	# Tell ltmain to make .dll files, not .so files.
6490	shrext_cmds=".dll"
6491	# FIXME: Setting linknames here is a bad hack.
6492	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
6493	# The linker will automatically build a .lib file if we build a DLL.
6494	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
6495	# FIXME: Should let the user specify the lib program.
6496	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
6497	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6498	;;
6499      esac
6500      ;;
6501
6502    darwin* | rhapsody*)
6503      _LT_DARWIN_LINKER_FEATURES($1)
6504      ;;
6505
6506    dgux*)
6507      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6508      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6509      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6510      ;;
6511
6512    freebsd1*)
6513      _LT_TAGVAR(ld_shlibs, $1)=no
6514      ;;
6515
6516    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6517    # support.  Future versions do this automatically, but an explicit c++rt0.o
6518    # does not break anything, and helps significantly (at the cost of a little
6519    # extra space).
6520    freebsd2.2*)
6521      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6522      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6523      _LT_TAGVAR(hardcode_direct, $1)=yes
6524      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6525      ;;
6526
6527    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6528    freebsd2*)
6529      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6530      _LT_TAGVAR(hardcode_direct, $1)=yes
6531      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6532      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6533      ;;
6534
6535    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6536    freebsd* | dragonfly*)
6537      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6538      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6539      _LT_TAGVAR(hardcode_direct, $1)=yes
6540      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6541      ;;
6542
6543    hpux9*)
6544      if test "$GCC" = yes; then
6545	_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'
6546      else
6547	_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'
6548      fi
6549      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6550      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6551      _LT_TAGVAR(hardcode_direct, $1)=yes
6552
6553      # hardcode_minus_L: Not really in the search PATH,
6554      # but as the default location of the library.
6555      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6556      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6557      ;;
6558
6559    hpux10*)
6560      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6561	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6562      else
6563	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6564      fi
6565      if test "$with_gnu_ld" = no; then
6566	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6567	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6568	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6569	_LT_TAGVAR(hardcode_direct, $1)=yes
6570	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6571	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6572	# hardcode_minus_L: Not really in the search PATH,
6573	# but as the default location of the library.
6574	_LT_TAGVAR(hardcode_minus_L, $1)=yes
6575      fi
6576      ;;
6577
6578    hpux11*)
6579      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
6580	case $host_cpu in
6581	hppa*64*)
6582	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6583	  ;;
6584	ia64*)
6585	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6586	  ;;
6587	*)
6588	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6589	  ;;
6590	esac
6591      else
6592	case $host_cpu in
6593	hppa*64*)
6594	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6595	  ;;
6596	ia64*)
6597	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6598	  ;;
6599	*)
6600	m4_if($1, [], [
6601	  # Older versions of the 11.00 compiler do not understand -b yet
6602	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
6603	  _LT_LINKER_OPTION([if $CC understands -b],
6604	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
6605	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
6606	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
6607	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
6608	  ;;
6609	esac
6610      fi
6611      if test "$with_gnu_ld" = no; then
6612	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6613	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6614
6615	case $host_cpu in
6616	hppa*64*|ia64*)
6617	  _LT_TAGVAR(hardcode_direct, $1)=no
6618	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6619	  ;;
6620	*)
6621	  _LT_TAGVAR(hardcode_direct, $1)=yes
6622	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6623	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6624
6625	  # hardcode_minus_L: Not really in the search PATH,
6626	  # but as the default location of the library.
6627	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
6628	  ;;
6629	esac
6630      fi
6631      ;;
6632
6633    irix5* | irix6* | nonstopux*)
6634      if test "$GCC" = yes; then
6635	_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'
6636	# Try to use the -exported_symbol ld option, if it does not
6637	# work, assume that -exports_file does not work either and
6638	# implicitly export all symbols.
6639	# This should be the same for all languages, so no per-tag cache variable.
6640	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
6641	  [lt_cv_irix_exported_symbol],
6642	  [save_LDFLAGS="$LDFLAGS"
6643	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
6644	   AC_LINK_IFELSE(
6645	     [AC_LANG_SOURCE(
6646	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
6647			      [C++], [[int foo (void) { return 0; }]],
6648			      [Fortran 77], [[
6649      subroutine foo
6650      end]],
6651			      [Fortran], [[
6652      subroutine foo
6653      end]])])],
6654	      [lt_cv_irix_exported_symbol=yes],
6655	      [lt_cv_irix_exported_symbol=no])
6656           LDFLAGS="$save_LDFLAGS"])
6657	if test "$lt_cv_irix_exported_symbol" = yes; then
6658          _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'
6659	fi
6660      else
6661	_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'
6662	_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'
6663      fi
6664      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6665      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6666      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6667      _LT_TAGVAR(inherit_rpath, $1)=yes
6668      _LT_TAGVAR(link_all_deplibs, $1)=yes
6669      ;;
6670
6671    netbsd*)
6672      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
6673	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6674      else
6675	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6676      fi
6677      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6678      _LT_TAGVAR(hardcode_direct, $1)=yes
6679      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6680      ;;
6681
6682    newsos6)
6683      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6684      _LT_TAGVAR(hardcode_direct, $1)=yes
6685      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6686      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6687      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6688      ;;
6689
6690    *nto* | *qnx*)
6691      ;;
6692
6693    openbsd*)
6694      if test -f /usr/libexec/ld.so; then
6695	_LT_TAGVAR(hardcode_direct, $1)=yes
6696	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6697	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
6698	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6699	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6700	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6701	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6702	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6703	else
6704	  case $host_os in
6705	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6706	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6707	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6708	     ;;
6709	   *)
6710	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6711	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6712	     ;;
6713	  esac
6714	fi
6715      else
6716	_LT_TAGVAR(ld_shlibs, $1)=no
6717      fi
6718      ;;
6719
6720    os2*)
6721      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6722      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6723      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6724      _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'
6725      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6726      ;;
6727
6728    osf3*)
6729      if test "$GCC" = yes; then
6730	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6731	_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'
6732      else
6733	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6734	_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'
6735      fi
6736      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6737      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6738      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6739      ;;
6740
6741    osf4* | osf5*)	# as osf3* with the addition of -msym flag
6742      if test "$GCC" = yes; then
6743	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6744	_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'
6745	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6746      else
6747	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6748	_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'
6749	_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~
6750	$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'
6751
6752	# Both c and cxx compiler support -rpath directly
6753	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6754      fi
6755      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
6756      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
6757      ;;
6758
6759    solaris*)
6760      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
6761      if test "$GCC" = yes; then
6762	wlarc='${wl}'
6763	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6764	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6765	  $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'
6766      else
6767	case `$CC -V 2>&1` in
6768	*"Compilers 5.0"*)
6769	  wlarc=''
6770	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6771	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6772	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
6773	  ;;
6774	*)
6775	  wlarc='${wl}'
6776	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
6777	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
6778	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
6779	  ;;
6780	esac
6781      fi
6782      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6783      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6784      case $host_os in
6785      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6786      *)
6787	# The compiler driver will combine and reorder linker options,
6788	# but understands `-z linker_flag'.  GCC discards it without `$wl',
6789	# but is careful enough not to reorder.
6790	# Supported since Solaris 2.6 (maybe 2.5.1?)
6791	if test "$GCC" = yes; then
6792	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6793	else
6794	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6795	fi
6796	;;
6797      esac
6798      _LT_TAGVAR(link_all_deplibs, $1)=yes
6799      ;;
6800
6801    sunos4*)
6802      if test "x$host_vendor" = xsequent; then
6803	# Use $CC to link under sequent, because it throws in some extra .o
6804	# files that make .init and .fini sections work.
6805	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6806      else
6807	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6808      fi
6809      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6810      _LT_TAGVAR(hardcode_direct, $1)=yes
6811      _LT_TAGVAR(hardcode_minus_L, $1)=yes
6812      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6813      ;;
6814
6815    sysv4)
6816      case $host_vendor in
6817	sni)
6818	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6819	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6820	;;
6821	siemens)
6822	  ## LD is ld it makes a PLAMLIB
6823	  ## CC just makes a GrossModule.
6824	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6825	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6826	  _LT_TAGVAR(hardcode_direct, $1)=no
6827        ;;
6828	motorola)
6829	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6830	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6831	;;
6832      esac
6833      runpath_var='LD_RUN_PATH'
6834      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6835      ;;
6836
6837    sysv4.3*)
6838      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6839      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6840      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6841      ;;
6842
6843    sysv4*MP*)
6844      if test -d /usr/nec; then
6845	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6846	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6847	runpath_var=LD_RUN_PATH
6848	hardcode_runpath_var=yes
6849	_LT_TAGVAR(ld_shlibs, $1)=yes
6850      fi
6851      ;;
6852
6853    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6854      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6855      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6856      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6857      runpath_var='LD_RUN_PATH'
6858
6859      if test "$GCC" = yes; then
6860	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6861	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6862      else
6863	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6864	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6865      fi
6866      ;;
6867
6868    sysv5* | sco3.2v5* | sco5v6*)
6869      # Note: We can NOT use -z defs as we might desire, because we do not
6870      # link with -lc, and that would cause any symbols used from libc to
6871      # always be unresolved, which means just about no library would
6872      # ever link correctly.  If we're not using GNU ld we use -z text
6873      # though, which does catch some bad symbols but isn't as heavy-handed
6874      # as -z defs.
6875      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6876      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6877      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
6878      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6879      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
6880      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
6881      _LT_TAGVAR(link_all_deplibs, $1)=yes
6882      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6883      runpath_var='LD_RUN_PATH'
6884
6885      if test "$GCC" = yes; then
6886	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6887	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6888      else
6889	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6890	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6891      fi
6892      ;;
6893
6894    uts4*)
6895      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6896      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6897      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6898      ;;
6899
6900    *)
6901      _LT_TAGVAR(ld_shlibs, $1)=no
6902      ;;
6903    esac
6904
6905    if test x$host_vendor = xsni; then
6906      case $host in
6907      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6908	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
6909	;;
6910      esac
6911    fi
6912  fi
6913])
6914AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
6915test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6916
6917_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6918
6919_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
6920_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
6921_LT_DECL([], [extract_expsyms_cmds], [2],
6922    [The commands to extract the exported symbol list from a shared archive])
6923
6924#
6925# Do we need to explicitly link libc?
6926#
6927case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
6928x|xyes)
6929  # Assume -lc should be added
6930  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6931
6932  if test "$enable_shared" = yes && test "$GCC" = yes; then
6933    case $_LT_TAGVAR(archive_cmds, $1) in
6934    *'~'*)
6935      # FIXME: we may have to deal with multi-command sequences.
6936      ;;
6937    '$CC '*)
6938      # Test whether the compiler implicitly links with -lc since on some
6939      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6940      # to ld, don't add -lc before -lgcc.
6941      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
6942	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
6943	[$RM conftest*
6944	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6945
6946	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6947	  soname=conftest
6948	  lib=conftest
6949	  libobjs=conftest.$ac_objext
6950	  deplibs=
6951	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
6952	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
6953	  compiler_flags=-v
6954	  linker_flags=-v
6955	  verstring=
6956	  output_objdir=.
6957	  libname=conftest
6958	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
6959	  _LT_TAGVAR(allow_undefined_flag, $1)=
6960	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
6961	  then
6962	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
6963	  else
6964	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6965	  fi
6966	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6967	else
6968	  cat conftest.err 1>&5
6969	fi
6970	$RM conftest*
6971	])
6972      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
6973      ;;
6974    esac
6975  fi
6976  ;;
6977esac
6978
6979_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
6980    [Whether or not to add -lc for building shared libraries])
6981_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
6982    [enable_shared_with_static_runtimes], [0],
6983    [Whether or not to disallow shared libs when runtime libs are static])
6984_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
6985    [Compiler flag to allow reflexive dlopens])
6986_LT_TAGDECL([], [whole_archive_flag_spec], [1],
6987    [Compiler flag to generate shared objects directly from archives])
6988_LT_TAGDECL([], [compiler_needs_object], [1],
6989    [Whether the compiler copes with passing no objects directly])
6990_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
6991    [Create an old-style archive from a shared archive])
6992_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
6993    [Create a temporary old-style archive to link instead of a shared archive])
6994_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
6995_LT_TAGDECL([], [archive_expsym_cmds], [2])
6996_LT_TAGDECL([], [module_cmds], [2],
6997    [Commands used to build a loadable module if different from building
6998    a shared archive.])
6999_LT_TAGDECL([], [module_expsym_cmds], [2])
7000_LT_TAGDECL([], [with_gnu_ld], [1],
7001    [Whether we are building with GNU ld or not])
7002_LT_TAGDECL([], [allow_undefined_flag], [1],
7003    [Flag that allows shared libraries with undefined symbols to be built])
7004_LT_TAGDECL([], [no_undefined_flag], [1],
7005    [Flag that enforces no undefined symbols])
7006_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
7007    [Flag to hardcode $libdir into a binary during linking.
7008    This must work even if $libdir does not exist])
7009_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
7010    [[If ld is used when linking, flag to hardcode $libdir into a binary
7011    during linking.  This must work even if $libdir does not exist]])
7012_LT_TAGDECL([], [hardcode_libdir_separator], [1],
7013    [Whether we need a single "-rpath" flag with a separated argument])
7014_LT_TAGDECL([], [hardcode_direct], [0],
7015    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7016    DIR into the resulting binary])
7017_LT_TAGDECL([], [hardcode_direct_absolute], [0],
7018    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7019    DIR into the resulting binary and the resulting library dependency is
7020    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
7021    library is relocated])
7022_LT_TAGDECL([], [hardcode_minus_L], [0],
7023    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
7024    into the resulting binary])
7025_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
7026    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
7027    into the resulting binary])
7028_LT_TAGDECL([], [hardcode_automatic], [0],
7029    [Set to "yes" if building a shared library automatically hardcodes DIR
7030    into the library and all subsequent libraries and executables linked
7031    against it])
7032_LT_TAGDECL([], [inherit_rpath], [0],
7033    [Set to yes if linker adds runtime paths of dependent libraries
7034    to runtime path list])
7035_LT_TAGDECL([], [link_all_deplibs], [0],
7036    [Whether libtool must link a program against all its dependency libraries])
7037_LT_TAGDECL([], [always_export_symbols], [0],
7038    [Set to "yes" if exported symbols are required])
7039_LT_TAGDECL([], [export_symbols_cmds], [2],
7040    [The commands to list exported symbols])
7041_LT_TAGDECL([], [exclude_expsyms], [1],
7042    [Symbols that should not be listed in the preloaded symbols])
7043_LT_TAGDECL([], [include_expsyms], [1],
7044    [Symbols that must always be exported])
7045_LT_TAGDECL([], [prelink_cmds], [2],
7046    [Commands necessary for linking programs (against libraries) with templates])
7047_LT_TAGDECL([], [postlink_cmds], [2],
7048    [Commands necessary for finishing linking programs])
7049_LT_TAGDECL([], [file_list_spec], [1],
7050    [Specify filename containing input files])
7051dnl FIXME: Not yet implemented
7052dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
7053dnl    [Compiler flag to generate thread safe objects])
7054])# _LT_LINKER_SHLIBS
7055
7056
7057# _LT_LANG_C_CONFIG([TAG])
7058# ------------------------
7059# Ensure that the configuration variables for a C compiler are suitably
7060# defined.  These variables are subsequently used by _LT_CONFIG to write
7061# the compiler configuration to `libtool'.
7062m4_defun([_LT_LANG_C_CONFIG],
7063[m4_require([_LT_DECL_EGREP])dnl
7064lt_save_CC="$CC"
7065AC_LANG_PUSH(C)
7066
7067# Source file extension for C test sources.
7068ac_ext=c
7069
7070# Object file extension for compiled C test sources.
7071objext=o
7072_LT_TAGVAR(objext, $1)=$objext
7073
7074# Code to be used in simple compile tests
7075lt_simple_compile_test_code="int some_variable = 0;"
7076
7077# Code to be used in simple link tests
7078lt_simple_link_test_code='int main(){return(0);}'
7079
7080_LT_TAG_COMPILER
7081# Save the default compiler, since it gets overwritten when the other
7082# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
7083compiler_DEFAULT=$CC
7084
7085# save warnings/boilerplate of simple test code
7086_LT_COMPILER_BOILERPLATE
7087_LT_LINKER_BOILERPLATE
7088
7089if test -n "$compiler"; then
7090  _LT_COMPILER_NO_RTTI($1)
7091  _LT_COMPILER_PIC($1)
7092  _LT_COMPILER_C_O($1)
7093  _LT_COMPILER_FILE_LOCKS($1)
7094  _LT_LINKER_SHLIBS($1)
7095  _LT_SYS_DYNAMIC_LINKER($1)
7096  _LT_LINKER_HARDCODE_LIBPATH($1)
7097  LT_SYS_DLOPEN_SELF
7098  _LT_CMD_STRIPLIB
7099
7100  # Report which library types will actually be built
7101  AC_MSG_CHECKING([if libtool supports shared libraries])
7102  AC_MSG_RESULT([$can_build_shared])
7103
7104  AC_MSG_CHECKING([whether to build shared libraries])
7105  test "$can_build_shared" = "no" && enable_shared=no
7106
7107  # On AIX, shared libraries and static libraries use the same namespace, and
7108  # are all built from PIC.
7109  case $host_os in
7110  aix3*)
7111    test "$enable_shared" = yes && enable_static=no
7112    if test -n "$RANLIB"; then
7113      archive_cmds="$archive_cmds~\$RANLIB \$lib"
7114      postinstall_cmds='$RANLIB $lib'
7115    fi
7116    ;;
7117
7118  aix[[4-9]]*)
7119    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7120      test "$enable_shared" = yes && enable_static=no
7121    fi
7122    ;;
7123  esac
7124  AC_MSG_RESULT([$enable_shared])
7125
7126  AC_MSG_CHECKING([whether to build static libraries])
7127  # Make sure either enable_shared or enable_static is yes.
7128  test "$enable_shared" = yes || enable_static=yes
7129  AC_MSG_RESULT([$enable_static])
7130
7131  _LT_CONFIG($1)
7132fi
7133AC_LANG_POP
7134CC="$lt_save_CC"
7135])# _LT_LANG_C_CONFIG
7136
7137
7138# _LT_LANG_CXX_CONFIG([TAG])
7139# --------------------------
7140# Ensure that the configuration variables for a C++ compiler are suitably
7141# defined.  These variables are subsequently used by _LT_CONFIG to write
7142# the compiler configuration to `libtool'.
7143m4_defun([_LT_LANG_CXX_CONFIG],
7144[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7145m4_require([_LT_DECL_EGREP])dnl
7146m4_require([_LT_PATH_MANIFEST_TOOL])dnl
7147if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
7148    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
7149    (test "X$CXX" != "Xg++"))) ; then
7150  AC_PROG_CXXCPP
7151else
7152  _lt_caught_CXX_error=yes
7153fi
7154
7155AC_LANG_PUSH(C++)
7156_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7157_LT_TAGVAR(allow_undefined_flag, $1)=
7158_LT_TAGVAR(always_export_symbols, $1)=no
7159_LT_TAGVAR(archive_expsym_cmds, $1)=
7160_LT_TAGVAR(compiler_needs_object, $1)=no
7161_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7162_LT_TAGVAR(hardcode_direct, $1)=no
7163_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7164_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7165_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7166_LT_TAGVAR(hardcode_libdir_separator, $1)=
7167_LT_TAGVAR(hardcode_minus_L, $1)=no
7168_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7169_LT_TAGVAR(hardcode_automatic, $1)=no
7170_LT_TAGVAR(inherit_rpath, $1)=no
7171_LT_TAGVAR(module_cmds, $1)=
7172_LT_TAGVAR(module_expsym_cmds, $1)=
7173_LT_TAGVAR(link_all_deplibs, $1)=unknown
7174_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7175_LT_TAGVAR(reload_flag, $1)=$reload_flag
7176_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7177_LT_TAGVAR(no_undefined_flag, $1)=
7178_LT_TAGVAR(whole_archive_flag_spec, $1)=
7179_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7180
7181# Source file extension for C++ test sources.
7182ac_ext=cpp
7183
7184# Object file extension for compiled C++ test sources.
7185objext=o
7186_LT_TAGVAR(objext, $1)=$objext
7187
7188# No sense in running all these tests if we already determined that
7189# the CXX compiler isn't working.  Some variables (like enable_shared)
7190# are currently assumed to apply to all compilers on this platform,
7191# and will be corrupted by setting them based on a non-working compiler.
7192if test "$_lt_caught_CXX_error" != yes; then
7193  # Code to be used in simple compile tests
7194  lt_simple_compile_test_code="int some_variable = 0;"
7195
7196  # Code to be used in simple link tests
7197  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
7198
7199  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7200  _LT_TAG_COMPILER
7201
7202  # save warnings/boilerplate of simple test code
7203  _LT_COMPILER_BOILERPLATE
7204  _LT_LINKER_BOILERPLATE
7205
7206  # Allow CC to be a program name with arguments.
7207  lt_save_CC=$CC
7208  lt_save_CFLAGS=$CFLAGS
7209  lt_save_LD=$LD
7210  lt_save_GCC=$GCC
7211  GCC=$GXX
7212  lt_save_with_gnu_ld=$with_gnu_ld
7213  lt_save_path_LD=$lt_cv_path_LD
7214  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
7215    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
7216  else
7217    $as_unset lt_cv_prog_gnu_ld
7218  fi
7219  if test -n "${lt_cv_path_LDCXX+set}"; then
7220    lt_cv_path_LD=$lt_cv_path_LDCXX
7221  else
7222    $as_unset lt_cv_path_LD
7223  fi
7224  test -z "${LDCXX+set}" || LD=$LDCXX
7225  CC=${CXX-"c++"}
7226  CFLAGS=$CXXFLAGS
7227  compiler=$CC
7228  _LT_TAGVAR(compiler, $1)=$CC
7229  _LT_CC_BASENAME([$compiler])
7230
7231  if test -n "$compiler"; then
7232    # We don't want -fno-exception when compiling C++ code, so set the
7233    # no_builtin_flag separately
7234    if test "$GXX" = yes; then
7235      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
7236    else
7237      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
7238    fi
7239
7240    if test "$GXX" = yes; then
7241      # Set up default GNU C++ configuration
7242
7243      LT_PATH_LD
7244
7245      # Check if GNU C++ uses GNU ld as the underlying linker, since the
7246      # archiving commands below assume that GNU ld is being used.
7247      if test "$with_gnu_ld" = yes; then
7248        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7249        _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'
7250
7251        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7252        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7253
7254        # If archive_cmds runs LD, not CC, wlarc should be empty
7255        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
7256        #     investigate it a little bit more. (MM)
7257        wlarc='${wl}'
7258
7259        # ancient GNU ld didn't support --whole-archive et. al.
7260        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
7261	  $GREP 'no-whole-archive' > /dev/null; then
7262          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7263        else
7264          _LT_TAGVAR(whole_archive_flag_spec, $1)=
7265        fi
7266      else
7267        with_gnu_ld=no
7268        wlarc=
7269
7270        # A generic and very simple default shared library creation
7271        # command for GNU C++ for the case where it uses the native
7272        # linker, instead of GNU ld.  If possible, this setting should
7273        # overridden to take advantage of the native linker features on
7274        # the platform it is being used on.
7275        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7276      fi
7277
7278      # Commands to make compiler produce verbose output that lists
7279      # what "hidden" libraries, object files and flags are used when
7280      # linking a shared library.
7281      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7282
7283    else
7284      GXX=no
7285      with_gnu_ld=no
7286      wlarc=
7287    fi
7288
7289    # PORTME: fill in a description of your system's C++ link characteristics
7290    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7291    _LT_TAGVAR(ld_shlibs, $1)=yes
7292    case $host_os in
7293      aix3*)
7294        # FIXME: insert proper C++ library support
7295        _LT_TAGVAR(ld_shlibs, $1)=no
7296        ;;
7297      aix[[4-9]]*)
7298        if test "$host_cpu" = ia64; then
7299          # On IA64, the linker does run time linking by default, so we don't
7300          # have to do anything special.
7301          aix_use_runtimelinking=no
7302          exp_sym_flag='-Bexport'
7303          no_entry_flag=""
7304        else
7305          aix_use_runtimelinking=no
7306
7307          # Test if we are trying to use run time linking or normal
7308          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
7309          # need to do runtime linking.
7310          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7311	    for ld_flag in $LDFLAGS; do
7312	      case $ld_flag in
7313	      *-brtl*)
7314	        aix_use_runtimelinking=yes
7315	        break
7316	        ;;
7317	      esac
7318	    done
7319	    ;;
7320          esac
7321
7322          exp_sym_flag='-bexport'
7323          no_entry_flag='-bnoentry'
7324        fi
7325
7326        # When large executables or shared objects are built, AIX ld can
7327        # have problems creating the table of contents.  If linking a library
7328        # or program results in "error TOC overflow" add -mminimal-toc to
7329        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7330        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7331
7332        _LT_TAGVAR(archive_cmds, $1)=''
7333        _LT_TAGVAR(hardcode_direct, $1)=yes
7334        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7335        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7336        _LT_TAGVAR(link_all_deplibs, $1)=yes
7337        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7338
7339        if test "$GXX" = yes; then
7340          case $host_os in aix4.[[012]]|aix4.[[012]].*)
7341          # We only want to do this on AIX 4.2 and lower, the check
7342          # below for broken collect2 doesn't work under 4.3+
7343	  collect2name=`${CC} -print-prog-name=collect2`
7344	  if test -f "$collect2name" &&
7345	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7346	  then
7347	    # We have reworked collect2
7348	    :
7349	  else
7350	    # We have old collect2
7351	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
7352	    # It fails to find uninstalled libraries when the uninstalled
7353	    # path is not listed in the libpath.  Setting hardcode_minus_L
7354	    # to unsupported forces relinking
7355	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
7356	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7357	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
7358	  fi
7359          esac
7360          shared_flag='-shared'
7361	  if test "$aix_use_runtimelinking" = yes; then
7362	    shared_flag="$shared_flag "'${wl}-G'
7363	  fi
7364        else
7365          # not using gcc
7366          if test "$host_cpu" = ia64; then
7367	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7368	  # chokes on -Wl,-G. The following line is correct:
7369	  shared_flag='-G'
7370          else
7371	    if test "$aix_use_runtimelinking" = yes; then
7372	      shared_flag='${wl}-G'
7373	    else
7374	      shared_flag='${wl}-bM:SRE'
7375	    fi
7376          fi
7377        fi
7378
7379        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7380        # It seems that -bexpall does not export symbols beginning with
7381        # underscore (_), so it is better to generate a list of symbols to
7382	# export.
7383        _LT_TAGVAR(always_export_symbols, $1)=yes
7384        if test "$aix_use_runtimelinking" = yes; then
7385          # Warning - without using the other runtime loading flags (-brtl),
7386          # -berok will link without error, but may produce a broken library.
7387          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7388          # Determine the default libpath from the value encoded in an empty
7389          # executable.
7390          _LT_SYS_MODULE_PATH_AIX([$1])
7391          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7392
7393          _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"
7394        else
7395          if test "$host_cpu" = ia64; then
7396	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7397	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7398	    _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"
7399          else
7400	    # Determine the default libpath from the value encoded in an
7401	    # empty executable.
7402	    _LT_SYS_MODULE_PATH_AIX([$1])
7403	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7404	    # Warning - without using the other run time loading flags,
7405	    # -berok will link without error, but may produce a broken library.
7406	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7407	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7408	    if test "$with_gnu_ld" = yes; then
7409	      # We only use this code for GNU lds that support --whole-archive.
7410	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7411	    else
7412	      # Exported symbols can be pulled into shared objects from archives
7413	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7414	    fi
7415	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7416	    # This is similar to how AIX traditionally builds its shared
7417	    # libraries.
7418	    _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'
7419          fi
7420        fi
7421        ;;
7422
7423      beos*)
7424	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7425	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7426	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7427	  # support --undefined.  This deserves some investigation.  FIXME
7428	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7429	else
7430	  _LT_TAGVAR(ld_shlibs, $1)=no
7431	fi
7432	;;
7433
7434      chorus*)
7435        case $cc_basename in
7436          *)
7437	  # FIXME: insert proper C++ library support
7438	  _LT_TAGVAR(ld_shlibs, $1)=no
7439	  ;;
7440        esac
7441        ;;
7442
7443      cygwin* | mingw* | pw32* | cegcc*)
7444	case $GXX,$cc_basename in
7445	,cl* | no,cl*)
7446	  # Native MSVC
7447	  # hardcode_libdir_flag_spec is actually meaningless, as there is
7448	  # no search path for DLLs.
7449	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7450	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7451	  _LT_TAGVAR(always_export_symbols, $1)=yes
7452	  _LT_TAGVAR(file_list_spec, $1)='@'
7453	  # Tell ltmain to make .lib files, not .a files.
7454	  libext=lib
7455	  # Tell ltmain to make .dll files, not .so files.
7456	  shrext_cmds=".dll"
7457	  # FIXME: Setting linknames here is a bad hack.
7458	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
7459	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7460	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
7461	    else
7462	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
7463	    fi~
7464	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
7465	    linknames='
7466	  # The linker will not automatically build a static lib if we build a DLL.
7467	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7468	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7469	  # Don't use ranlib
7470	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
7471	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
7472	    lt_tool_outputfile="@TOOL_OUTPUT@"~
7473	    case $lt_outputfile in
7474	      *.exe|*.EXE) ;;
7475	      *)
7476		lt_outputfile="$lt_outputfile.exe"
7477		lt_tool_outputfile="$lt_tool_outputfile.exe"
7478		;;
7479	    esac~
7480	    func_to_tool_file "$lt_outputfile"~
7481	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
7482	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
7483	      $RM "$lt_outputfile.manifest";
7484	    fi'
7485	  ;;
7486	*)
7487	  # g++
7488	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7489	  # as there is no search path for DLLs.
7490	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7491	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
7492	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7493	  _LT_TAGVAR(always_export_symbols, $1)=no
7494	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7495
7496	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
7497	    _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'
7498	    # If the export-symbols file already is a .def file (1st line
7499	    # is EXPORTS), use it as is; otherwise, prepend...
7500	    _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7501	      cp $export_symbols $output_objdir/$soname.def;
7502	    else
7503	      echo EXPORTS > $output_objdir/$soname.def;
7504	      cat $export_symbols >> $output_objdir/$soname.def;
7505	    fi~
7506	    $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'
7507	  else
7508	    _LT_TAGVAR(ld_shlibs, $1)=no
7509	  fi
7510	  ;;
7511	esac
7512	;;
7513      darwin* | rhapsody*)
7514        _LT_DARWIN_LINKER_FEATURES($1)
7515	;;
7516
7517      dgux*)
7518        case $cc_basename in
7519          ec++*)
7520	    # FIXME: insert proper C++ library support
7521	    _LT_TAGVAR(ld_shlibs, $1)=no
7522	    ;;
7523          ghcx*)
7524	    # Green Hills C++ Compiler
7525	    # FIXME: insert proper C++ library support
7526	    _LT_TAGVAR(ld_shlibs, $1)=no
7527	    ;;
7528          *)
7529	    # FIXME: insert proper C++ library support
7530	    _LT_TAGVAR(ld_shlibs, $1)=no
7531	    ;;
7532        esac
7533        ;;
7534
7535      freebsd[[12]]*)
7536        # C++ shared libraries reported to be fairly broken before
7537	# switch to ELF
7538        _LT_TAGVAR(ld_shlibs, $1)=no
7539        ;;
7540
7541      freebsd-elf*)
7542        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7543        ;;
7544
7545      freebsd* | dragonfly*)
7546        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
7547        # conventions
7548        _LT_TAGVAR(ld_shlibs, $1)=yes
7549        ;;
7550
7551      gnu*)
7552        ;;
7553
7554      haiku*)
7555        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7556        _LT_TAGVAR(link_all_deplibs, $1)=yes
7557        ;;
7558
7559      hpux9*)
7560        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7561        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7562        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7563        _LT_TAGVAR(hardcode_direct, $1)=yes
7564        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7565				             # but as the default
7566				             # location of the library.
7567
7568        case $cc_basename in
7569          CC*)
7570            # FIXME: insert proper C++ library support
7571            _LT_TAGVAR(ld_shlibs, $1)=no
7572            ;;
7573          aCC*)
7574            _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'
7575            # Commands to make compiler produce verbose output that lists
7576            # what "hidden" libraries, object files and flags are used when
7577            # linking a shared library.
7578            #
7579            # There doesn't appear to be a way to prevent this compiler from
7580            # explicitly linking system object files so we need to strip them
7581            # from the output so that they don't get included in the library
7582            # dependencies.
7583            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"'
7584            ;;
7585          *)
7586            if test "$GXX" = yes; then
7587              _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'
7588            else
7589              # FIXME: insert proper C++ library support
7590              _LT_TAGVAR(ld_shlibs, $1)=no
7591            fi
7592            ;;
7593        esac
7594        ;;
7595
7596      hpux10*|hpux11*)
7597        if test $with_gnu_ld = no; then
7598	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7599	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7600
7601          case $host_cpu in
7602            hppa*64*|ia64*)
7603              ;;
7604            *)
7605	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7606              ;;
7607          esac
7608        fi
7609        case $host_cpu in
7610          hppa*64*|ia64*)
7611            _LT_TAGVAR(hardcode_direct, $1)=no
7612            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7613            ;;
7614          *)
7615            _LT_TAGVAR(hardcode_direct, $1)=yes
7616            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7617            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
7618					         # but as the default
7619					         # location of the library.
7620            ;;
7621        esac
7622
7623        case $cc_basename in
7624          CC*)
7625	    # FIXME: insert proper C++ library support
7626	    _LT_TAGVAR(ld_shlibs, $1)=no
7627	    ;;
7628          aCC*)
7629	    case $host_cpu in
7630	      hppa*64*)
7631	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7632	        ;;
7633	      ia64*)
7634	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7635	        ;;
7636	      *)
7637	        _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'
7638	        ;;
7639	    esac
7640	    # Commands to make compiler produce verbose output that lists
7641	    # what "hidden" libraries, object files and flags are used when
7642	    # linking a shared library.
7643	    #
7644	    # There doesn't appear to be a way to prevent this compiler from
7645	    # explicitly linking system object files so we need to strip them
7646	    # from the output so that they don't get included in the library
7647	    # dependencies.
7648	    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"'
7649	    ;;
7650          *)
7651	    if test "$GXX" = yes; then
7652	      if test $with_gnu_ld = no; then
7653	        case $host_cpu in
7654	          hppa*64*)
7655	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7656	            ;;
7657	          ia64*)
7658	            _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'
7659	            ;;
7660	          *)
7661	            _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'
7662	            ;;
7663	        esac
7664	      fi
7665	    else
7666	      # FIXME: insert proper C++ library support
7667	      _LT_TAGVAR(ld_shlibs, $1)=no
7668	    fi
7669	    ;;
7670        esac
7671        ;;
7672
7673      interix[[3-9]]*)
7674	_LT_TAGVAR(hardcode_direct, $1)=no
7675	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7676	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7677	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7678	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7679	# Instead, shared libraries are loaded at an image base (0x10000000 by
7680	# default) and relocated if they conflict, which is a slow very memory
7681	# consuming and fragmenting process.  To avoid this, we pick a random,
7682	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7683	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7684	_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'
7685	_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'
7686	;;
7687      irix5* | irix6*)
7688        case $cc_basename in
7689          CC*)
7690	    # SGI C++
7691	    _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'
7692
7693	    # Archives containing C++ object files must be created using
7694	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
7695	    # necessary to make sure instantiated templates are included
7696	    # in the archive.
7697	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
7698	    ;;
7699          *)
7700	    if test "$GXX" = yes; then
7701	      if test "$with_gnu_ld" = no; then
7702	        _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'
7703	      else
7704	        _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'
7705	      fi
7706	    fi
7707	    _LT_TAGVAR(link_all_deplibs, $1)=yes
7708	    ;;
7709        esac
7710        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7711        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7712        _LT_TAGVAR(inherit_rpath, $1)=yes
7713        ;;
7714
7715      linux* | k*bsd*-gnu | kopensolaris*-gnu)
7716        case $cc_basename in
7717          KCC*)
7718	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7719
7720	    # KCC will only create a shared library if the output file
7721	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7722	    # to its proper name (with version) after linking.
7723	    _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'
7724	    _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'
7725	    # Commands to make compiler produce verbose output that lists
7726	    # what "hidden" libraries, object files and flags are used when
7727	    # linking a shared library.
7728	    #
7729	    # There doesn't appear to be a way to prevent this compiler from
7730	    # explicitly linking system object files so we need to strip them
7731	    # from the output so that they don't get included in the library
7732	    # dependencies.
7733	    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"'
7734
7735	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7736	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7737
7738	    # Archives containing C++ object files must be created using
7739	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
7740	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
7741	    ;;
7742	  icpc* | ecpc* )
7743	    # Intel C++
7744	    with_gnu_ld=yes
7745	    # version 8.0 and above of icpc choke on multiply defined symbols
7746	    # if we add $predep_objects and $postdep_objects, however 7.1 and
7747	    # earlier do not add the objects themselves.
7748	    case `$CC -V 2>&1` in
7749	      *"Version 7."*)
7750	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7751		_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'
7752		;;
7753	      *)  # Version 8.0 or newer
7754	        tmp_idyn=
7755	        case $host_cpu in
7756		  ia64*) tmp_idyn=' -i_dynamic';;
7757		esac
7758	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7759		_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'
7760		;;
7761	    esac
7762	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7763	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7764	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7765	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7766	    ;;
7767          pgCC* | pgcpp*)
7768            # Portland Group C++ compiler
7769	    case `$CC -V` in
7770	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
7771	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
7772		rm -rf $tpldir~
7773		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
7774		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
7775	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
7776		rm -rf $tpldir~
7777		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
7778		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
7779		$RANLIB $oldlib'
7780	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
7781		rm -rf $tpldir~
7782		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7783		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7784	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
7785		rm -rf $tpldir~
7786		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
7787		$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'
7788	      ;;
7789	    *) # Version 6 and above use weak symbols
7790	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
7791	      _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'
7792	      ;;
7793	    esac
7794
7795	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7796	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7797	    _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'
7798            ;;
7799	  cxx*)
7800	    # Compaq C++
7801	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
7802	    _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'
7803
7804	    runpath_var=LD_RUN_PATH
7805	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7806	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7807
7808	    # Commands to make compiler produce verbose output that lists
7809	    # what "hidden" libraries, object files and flags are used when
7810	    # linking a shared library.
7811	    #
7812	    # There doesn't appear to be a way to prevent this compiler from
7813	    # explicitly linking system object files so we need to strip them
7814	    # from the output so that they don't get included in the library
7815	    # dependencies.
7816	    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'
7817	    ;;
7818	  xl* | mpixl* | bgxl*)
7819	    # IBM XL 8.0 on PPC, with GNU ld
7820	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7821	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7822	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7823	    if test "x$supports_anon_versioning" = xyes; then
7824	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7825		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7826		echo "local: *; };" >> $output_objdir/$libname.ver~
7827		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7828	    fi
7829	    ;;
7830	  *)
7831	    case `$CC -V 2>&1 | sed 5q` in
7832	    *Sun\ C*)
7833	      # Sun C++ 5.9
7834	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
7835	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
7836	      _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'
7837	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7838	      _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'
7839	      _LT_TAGVAR(compiler_needs_object, $1)=yes
7840
7841	      # Not sure whether something based on
7842	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
7843	      # would be better.
7844	      output_verbose_link_cmd='func_echo_all'
7845
7846	      # Archives containing C++ object files must be created using
7847	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
7848	      # necessary to make sure instantiated templates are included
7849	      # in the archive.
7850	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
7851	      ;;
7852	    esac
7853	    ;;
7854	esac
7855	;;
7856
7857      lynxos*)
7858        # FIXME: insert proper C++ library support
7859	_LT_TAGVAR(ld_shlibs, $1)=no
7860	;;
7861
7862      m88k*)
7863        # FIXME: insert proper C++ library support
7864        _LT_TAGVAR(ld_shlibs, $1)=no
7865	;;
7866
7867      mvs*)
7868        case $cc_basename in
7869          cxx*)
7870	    # FIXME: insert proper C++ library support
7871	    _LT_TAGVAR(ld_shlibs, $1)=no
7872	    ;;
7873	  *)
7874	    # FIXME: insert proper C++ library support
7875	    _LT_TAGVAR(ld_shlibs, $1)=no
7876	    ;;
7877	esac
7878	;;
7879
7880      netbsd*)
7881        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7882	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
7883	  wlarc=
7884	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7885	  _LT_TAGVAR(hardcode_direct, $1)=yes
7886	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7887	fi
7888	# Workaround some broken pre-1.5 toolchains
7889	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
7890	;;
7891
7892      *nto* | *qnx*)
7893        _LT_TAGVAR(ld_shlibs, $1)=yes
7894	;;
7895
7896      openbsd2*)
7897        # C++ shared libraries are fairly broken
7898	_LT_TAGVAR(ld_shlibs, $1)=no
7899	;;
7900
7901      openbsd*)
7902	if test -f /usr/libexec/ld.so; then
7903	  _LT_TAGVAR(hardcode_direct, $1)=yes
7904	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7905	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7906	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
7907	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7908	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7909	    _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'
7910	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7911	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7912	  fi
7913	  output_verbose_link_cmd=func_echo_all
7914	else
7915	  _LT_TAGVAR(ld_shlibs, $1)=no
7916	fi
7917	;;
7918
7919      osf3* | osf4* | osf5*)
7920        case $cc_basename in
7921          KCC*)
7922	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7923
7924	    # KCC will only create a shared library if the output file
7925	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
7926	    # to its proper name (with version) after linking.
7927	    _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'
7928
7929	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7930	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7931
7932	    # Archives containing C++ object files must be created using
7933	    # the KAI C++ compiler.
7934	    case $host in
7935	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
7936	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
7937	    esac
7938	    ;;
7939          RCC*)
7940	    # Rational C++ 2.4.1
7941	    # FIXME: insert proper C++ library support
7942	    _LT_TAGVAR(ld_shlibs, $1)=no
7943	    ;;
7944          cxx*)
7945	    case $host in
7946	      osf3*)
7947	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7948	        _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'
7949	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7950		;;
7951	      *)
7952	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7953	        _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'
7954	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
7955	          echo "-hidden">> $lib.exp~
7956	          $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~
7957	          $RM $lib.exp'
7958	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7959		;;
7960	    esac
7961
7962	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7963
7964	    # Commands to make compiler produce verbose output that lists
7965	    # what "hidden" libraries, object files and flags are used when
7966	    # linking a shared library.
7967	    #
7968	    # There doesn't appear to be a way to prevent this compiler from
7969	    # explicitly linking system object files so we need to strip them
7970	    # from the output so that they don't get included in the library
7971	    # dependencies.
7972	    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"'
7973	    ;;
7974	  *)
7975	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
7976	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7977	      case $host in
7978	        osf3*)
7979	          _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'
7980		  ;;
7981	        *)
7982	          _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'
7983		  ;;
7984	      esac
7985
7986	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7987	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7988
7989	      # Commands to make compiler produce verbose output that lists
7990	      # what "hidden" libraries, object files and flags are used when
7991	      # linking a shared library.
7992	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7993
7994	    else
7995	      # FIXME: insert proper C++ library support
7996	      _LT_TAGVAR(ld_shlibs, $1)=no
7997	    fi
7998	    ;;
7999        esac
8000        ;;
8001
8002      psos*)
8003        # FIXME: insert proper C++ library support
8004        _LT_TAGVAR(ld_shlibs, $1)=no
8005        ;;
8006
8007      sunos4*)
8008        case $cc_basename in
8009          CC*)
8010	    # Sun C++ 4.x
8011	    # FIXME: insert proper C++ library support
8012	    _LT_TAGVAR(ld_shlibs, $1)=no
8013	    ;;
8014          lcc*)
8015	    # Lucid
8016	    # FIXME: insert proper C++ library support
8017	    _LT_TAGVAR(ld_shlibs, $1)=no
8018	    ;;
8019          *)
8020	    # FIXME: insert proper C++ library support
8021	    _LT_TAGVAR(ld_shlibs, $1)=no
8022	    ;;
8023        esac
8024        ;;
8025
8026      solaris*)
8027        case $cc_basename in
8028          CC* | sunCC*)
8029	    # Sun C++ 4.2, 5.x and Centerline C++
8030            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
8031	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8032	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8033	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8034	      $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'
8035
8036	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8037	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8038	    case $host_os in
8039	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8040	      *)
8041		# The compiler driver will combine and reorder linker options,
8042		# but understands `-z linker_flag'.
8043	        # Supported since Solaris 2.6 (maybe 2.5.1?)
8044		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
8045	        ;;
8046	    esac
8047	    _LT_TAGVAR(link_all_deplibs, $1)=yes
8048
8049	    output_verbose_link_cmd='func_echo_all'
8050
8051	    # Archives containing C++ object files must be created using
8052	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
8053	    # necessary to make sure instantiated templates are included
8054	    # in the archive.
8055	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8056	    ;;
8057          gcx*)
8058	    # Green Hills C++ Compiler
8059	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8060
8061	    # The C++ compiler must be used to create the archive.
8062	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
8063	    ;;
8064          *)
8065	    # GNU C++ compiler with Solaris linker
8066	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8067	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
8068	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
8069	        _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'
8070	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8071		  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8072
8073	        # Commands to make compiler produce verbose output that lists
8074	        # what "hidden" libraries, object files and flags are used when
8075	        # linking a shared library.
8076	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8077	      else
8078	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
8079	        # platform.
8080	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8081	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8082		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8083
8084	        # Commands to make compiler produce verbose output that lists
8085	        # what "hidden" libraries, object files and flags are used when
8086	        # linking a shared library.
8087	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8088	      fi
8089
8090	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
8091	      case $host_os in
8092		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8093		*)
8094		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8095		  ;;
8096	      esac
8097	    fi
8098	    ;;
8099        esac
8100        ;;
8101
8102    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
8103      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8104      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8105      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8106      runpath_var='LD_RUN_PATH'
8107
8108      case $cc_basename in
8109        CC*)
8110	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8111	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8112	  ;;
8113	*)
8114	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8115	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8116	  ;;
8117      esac
8118      ;;
8119
8120      sysv5* | sco3.2v5* | sco5v6*)
8121	# Note: We can NOT use -z defs as we might desire, because we do not
8122	# link with -lc, and that would cause any symbols used from libc to
8123	# always be unresolved, which means just about no library would
8124	# ever link correctly.  If we're not using GNU ld we use -z text
8125	# though, which does catch some bad symbols but isn't as heavy-handed
8126	# as -z defs.
8127	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8128	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
8129	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8130	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8131	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
8132	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8133	_LT_TAGVAR(link_all_deplibs, $1)=yes
8134	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
8135	runpath_var='LD_RUN_PATH'
8136
8137	case $cc_basename in
8138          CC*)
8139	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8140	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8141	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
8142	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
8143	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
8144	      '"$_LT_TAGVAR(reload_cmds, $1)"
8145	    ;;
8146	  *)
8147	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8148	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8149	    ;;
8150	esac
8151      ;;
8152
8153      tandem*)
8154        case $cc_basename in
8155          NCC*)
8156	    # NonStop-UX NCC 3.20
8157	    # FIXME: insert proper C++ library support
8158	    _LT_TAGVAR(ld_shlibs, $1)=no
8159	    ;;
8160          *)
8161	    # FIXME: insert proper C++ library support
8162	    _LT_TAGVAR(ld_shlibs, $1)=no
8163	    ;;
8164        esac
8165        ;;
8166
8167      vxworks*)
8168        # FIXME: insert proper C++ library support
8169        _LT_TAGVAR(ld_shlibs, $1)=no
8170        ;;
8171
8172      *)
8173        # FIXME: insert proper C++ library support
8174        _LT_TAGVAR(ld_shlibs, $1)=no
8175        ;;
8176    esac
8177
8178    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
8179    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8180
8181    _LT_TAGVAR(GCC, $1)="$GXX"
8182    _LT_TAGVAR(LD, $1)="$LD"
8183
8184    ## CAVEAT EMPTOR:
8185    ## There is no encapsulation within the following macros, do not change
8186    ## the running order or otherwise move them around unless you know exactly
8187    ## what you are doing...
8188    _LT_SYS_HIDDEN_LIBDEPS($1)
8189    _LT_COMPILER_PIC($1)
8190    _LT_COMPILER_C_O($1)
8191    _LT_COMPILER_FILE_LOCKS($1)
8192    _LT_LINKER_SHLIBS($1)
8193    _LT_SYS_DYNAMIC_LINKER($1)
8194    _LT_LINKER_HARDCODE_LIBPATH($1)
8195
8196    _LT_CONFIG($1)
8197  fi # test -n "$compiler"
8198
8199  CC=$lt_save_CC
8200  CFLAGS=$lt_save_CFLAGS
8201  LDCXX=$LD
8202  LD=$lt_save_LD
8203  GCC=$lt_save_GCC
8204  with_gnu_ld=$lt_save_with_gnu_ld
8205  lt_cv_path_LDCXX=$lt_cv_path_LD
8206  lt_cv_path_LD=$lt_save_path_LD
8207  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
8208  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
8209fi # test "$_lt_caught_CXX_error" != yes
8210
8211AC_LANG_POP
8212])# _LT_LANG_CXX_CONFIG
8213
8214
8215# _LT_FUNC_STRIPNAME_CNF
8216# ----------------------
8217# func_stripname_cnf prefix suffix name
8218# strip PREFIX and SUFFIX off of NAME.
8219# PREFIX and SUFFIX must not contain globbing or regex special
8220# characters, hashes, percent signs, but SUFFIX may contain a leading
8221# dot (in which case that matches only a dot).
8222#
8223# This function is identical to the (non-XSI) version of func_stripname,
8224# except this one can be used by m4 code that may be executed by configure,
8225# rather than the libtool script.
8226m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
8227AC_REQUIRE([_LT_DECL_SED])
8228AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
8229func_stripname_cnf ()
8230{
8231  case ${2} in
8232  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
8233  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
8234  esac
8235} # func_stripname_cnf
8236])# _LT_FUNC_STRIPNAME_CNF
8237
8238# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
8239# ---------------------------------
8240# Figure out "hidden" library dependencies from verbose
8241# compiler output when linking a shared library.
8242# Parse the compiler output and extract the necessary
8243# objects, libraries and library flags.
8244m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
8245[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8246AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
8247# Dependencies to place before and after the object being linked:
8248_LT_TAGVAR(predep_objects, $1)=
8249_LT_TAGVAR(postdep_objects, $1)=
8250_LT_TAGVAR(predeps, $1)=
8251_LT_TAGVAR(postdeps, $1)=
8252_LT_TAGVAR(compiler_lib_search_path, $1)=
8253
8254dnl we can't use the lt_simple_compile_test_code here,
8255dnl because it contains code intended for an executable,
8256dnl not a library.  It's possible we should let each
8257dnl tag define a new lt_????_link_test_code variable,
8258dnl but it's only used here...
8259m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
8260int a;
8261void foo (void) { a = 0; }
8262_LT_EOF
8263], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
8264class Foo
8265{
8266public:
8267  Foo (void) { a = 0; }
8268private:
8269  int a;
8270};
8271_LT_EOF
8272], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
8273      subroutine foo
8274      implicit none
8275      integer*4 a
8276      a=0
8277      return
8278      end
8279_LT_EOF
8280], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
8281      subroutine foo
8282      implicit none
8283      integer a
8284      a=0
8285      return
8286      end
8287_LT_EOF
8288], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
8289public class foo {
8290  private int a;
8291  public void bar (void) {
8292    a = 0;
8293  }
8294};
8295_LT_EOF
8296])
8297
8298_lt_libdeps_save_CFLAGS=$CFLAGS
8299case "$CC $CFLAGS " in #(
8300*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
8301*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
8302esac
8303
8304dnl Parse the compiler output and extract the necessary
8305dnl objects, libraries and library flags.
8306if AC_TRY_EVAL(ac_compile); then
8307  # Parse the compiler output and extract the necessary
8308  # objects, libraries and library flags.
8309
8310  # Sentinel used to keep track of whether or not we are before
8311  # the conftest object file.
8312  pre_test_object_deps_done=no
8313
8314  for p in `eval "$output_verbose_link_cmd"`; do
8315    case ${prev}${p} in
8316
8317    -L* | -R* | -l*)
8318       # Some compilers place space between "-{L,R}" and the path.
8319       # Remove the space.
8320       if test $p = "-L" ||
8321          test $p = "-R"; then
8322	 prev=$p
8323	 continue
8324       fi
8325
8326       # Expand the sysroot to ease extracting the directories later.
8327       if test -z "$prev"; then
8328         case $p in
8329         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
8330         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
8331         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
8332         esac
8333       fi
8334       case $p in
8335       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
8336       esac
8337       if test "$pre_test_object_deps_done" = no; then
8338	 case ${prev} in
8339	 -L | -R)
8340	   # Internal compiler library paths should come after those
8341	   # provided the user.  The postdeps already come after the
8342	   # user supplied libs so there is no need to process them.
8343	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
8344	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
8345	   else
8346	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
8347	   fi
8348	   ;;
8349	 # The "-l" case would never come before the object being
8350	 # linked, so don't bother handling this case.
8351	 esac
8352       else
8353	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
8354	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
8355	 else
8356	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
8357	 fi
8358       fi
8359       prev=
8360       ;;
8361
8362    *.lto.$objext) ;; # Ignore GCC LTO objects
8363    *.$objext)
8364       # This assumes that the test object file only shows up
8365       # once in the compiler output.
8366       if test "$p" = "conftest.$objext"; then
8367	 pre_test_object_deps_done=yes
8368	 continue
8369       fi
8370
8371       if test "$pre_test_object_deps_done" = no; then
8372	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
8373	   _LT_TAGVAR(predep_objects, $1)="$p"
8374	 else
8375	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
8376	 fi
8377       else
8378	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
8379	   _LT_TAGVAR(postdep_objects, $1)="$p"
8380	 else
8381	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
8382	 fi
8383       fi
8384       ;;
8385
8386    *) ;; # Ignore the rest.
8387
8388    esac
8389  done
8390
8391  # Clean up.
8392  rm -f a.out a.exe
8393else
8394  echo "libtool.m4: error: problem compiling $1 test program"
8395fi
8396
8397$RM -f confest.$objext
8398CFLAGS=$_lt_libdeps_save_CFLAGS
8399
8400# PORTME: override above test on systems where it is broken
8401m4_if([$1], [CXX],
8402[case $host_os in
8403interix[[3-9]]*)
8404  # Interix 3.5 installs completely hosed .la files for C++, so rather than
8405  # hack all around it, let's just trust "g++" to DTRT.
8406  _LT_TAGVAR(predep_objects,$1)=
8407  _LT_TAGVAR(postdep_objects,$1)=
8408  _LT_TAGVAR(postdeps,$1)=
8409  ;;
8410
8411linux*)
8412  case `$CC -V 2>&1 | sed 5q` in
8413  *Sun\ C*)
8414    # Sun C++ 5.9
8415
8416    # The more standards-conforming stlport4 library is
8417    # incompatible with the Cstd library. Avoid specifying
8418    # it if it's in CXXFLAGS. Ignore libCrun as
8419    # -library=stlport4 depends on it.
8420    case " $CXX $CXXFLAGS " in
8421    *" -library=stlport4 "*)
8422      solaris_use_stlport4=yes
8423      ;;
8424    esac
8425
8426    if test "$solaris_use_stlport4" != yes; then
8427      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8428    fi
8429    ;;
8430  esac
8431  ;;
8432
8433solaris*)
8434  case $cc_basename in
8435  CC* | sunCC*)
8436    # The more standards-conforming stlport4 library is
8437    # incompatible with the Cstd library. Avoid specifying
8438    # it if it's in CXXFLAGS. Ignore libCrun as
8439    # -library=stlport4 depends on it.
8440    case " $CXX $CXXFLAGS " in
8441    *" -library=stlport4 "*)
8442      solaris_use_stlport4=yes
8443      ;;
8444    esac
8445
8446    # Adding this requires a known-good setup of shared libraries for
8447    # Sun compiler versions before 5.6, else PIC objects from an old
8448    # archive will be linked into the output, leading to subtle bugs.
8449    if test "$solaris_use_stlport4" != yes; then
8450      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
8451    fi
8452    ;;
8453  esac
8454  ;;
8455esac
8456])
8457
8458case " $_LT_TAGVAR(postdeps, $1) " in
8459*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
8460esac
8461 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
8462if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
8463 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
8464fi
8465_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
8466    [The directories searched by this compiler when creating a shared library])
8467_LT_TAGDECL([], [predep_objects], [1],
8468    [Dependencies to place before and after the objects being linked to
8469    create a shared library])
8470_LT_TAGDECL([], [postdep_objects], [1])
8471_LT_TAGDECL([], [predeps], [1])
8472_LT_TAGDECL([], [postdeps], [1])
8473_LT_TAGDECL([], [compiler_lib_search_path], [1],
8474    [The library search path used internally by the compiler when linking
8475    a shared library])
8476])# _LT_SYS_HIDDEN_LIBDEPS
8477
8478
8479# _LT_LANG_F77_CONFIG([TAG])
8480# --------------------------
8481# Ensure that the configuration variables for a Fortran 77 compiler are
8482# suitably defined.  These variables are subsequently used by _LT_CONFIG
8483# to write the compiler configuration to `libtool'.
8484m4_defun([_LT_LANG_F77_CONFIG],
8485[AC_LANG_PUSH(Fortran 77)
8486if test -z "$F77" || test "X$F77" = "Xno"; then
8487  _lt_disable_F77=yes
8488fi
8489
8490_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8491_LT_TAGVAR(allow_undefined_flag, $1)=
8492_LT_TAGVAR(always_export_symbols, $1)=no
8493_LT_TAGVAR(archive_expsym_cmds, $1)=
8494_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8495_LT_TAGVAR(hardcode_direct, $1)=no
8496_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8497_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8498_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8499_LT_TAGVAR(hardcode_libdir_separator, $1)=
8500_LT_TAGVAR(hardcode_minus_L, $1)=no
8501_LT_TAGVAR(hardcode_automatic, $1)=no
8502_LT_TAGVAR(inherit_rpath, $1)=no
8503_LT_TAGVAR(module_cmds, $1)=
8504_LT_TAGVAR(module_expsym_cmds, $1)=
8505_LT_TAGVAR(link_all_deplibs, $1)=unknown
8506_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8507_LT_TAGVAR(reload_flag, $1)=$reload_flag
8508_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8509_LT_TAGVAR(no_undefined_flag, $1)=
8510_LT_TAGVAR(whole_archive_flag_spec, $1)=
8511_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8512
8513# Source file extension for f77 test sources.
8514ac_ext=f
8515
8516# Object file extension for compiled f77 test sources.
8517objext=o
8518_LT_TAGVAR(objext, $1)=$objext
8519
8520# No sense in running all these tests if we already determined that
8521# the F77 compiler isn't working.  Some variables (like enable_shared)
8522# are currently assumed to apply to all compilers on this platform,
8523# and will be corrupted by setting them based on a non-working compiler.
8524if test "$_lt_disable_F77" != yes; then
8525  # Code to be used in simple compile tests
8526  lt_simple_compile_test_code="\
8527      subroutine t
8528      return
8529      end
8530"
8531
8532  # Code to be used in simple link tests
8533  lt_simple_link_test_code="\
8534      program t
8535      end
8536"
8537
8538  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8539  _LT_TAG_COMPILER
8540
8541  # save warnings/boilerplate of simple test code
8542  _LT_COMPILER_BOILERPLATE
8543  _LT_LINKER_BOILERPLATE
8544
8545  # Allow CC to be a program name with arguments.
8546  lt_save_CC="$CC"
8547  lt_save_GCC=$GCC
8548  lt_save_CFLAGS=$CFLAGS
8549  CC=${F77-"f77"}
8550  CFLAGS=$FFLAGS
8551  compiler=$CC
8552  _LT_TAGVAR(compiler, $1)=$CC
8553  _LT_CC_BASENAME([$compiler])
8554  GCC=$G77
8555  if test -n "$compiler"; then
8556    AC_MSG_CHECKING([if libtool supports shared libraries])
8557    AC_MSG_RESULT([$can_build_shared])
8558
8559    AC_MSG_CHECKING([whether to build shared libraries])
8560    test "$can_build_shared" = "no" && enable_shared=no
8561
8562    # On AIX, shared libraries and static libraries use the same namespace, and
8563    # are all built from PIC.
8564    case $host_os in
8565      aix3*)
8566        test "$enable_shared" = yes && enable_static=no
8567        if test -n "$RANLIB"; then
8568          archive_cmds="$archive_cmds~\$RANLIB \$lib"
8569          postinstall_cmds='$RANLIB $lib'
8570        fi
8571        ;;
8572      aix[[4-9]]*)
8573	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8574	  test "$enable_shared" = yes && enable_static=no
8575	fi
8576        ;;
8577    esac
8578    AC_MSG_RESULT([$enable_shared])
8579
8580    AC_MSG_CHECKING([whether to build static libraries])
8581    # Make sure either enable_shared or enable_static is yes.
8582    test "$enable_shared" = yes || enable_static=yes
8583    AC_MSG_RESULT([$enable_static])
8584
8585    _LT_TAGVAR(GCC, $1)="$G77"
8586    _LT_TAGVAR(LD, $1)="$LD"
8587
8588    ## CAVEAT EMPTOR:
8589    ## There is no encapsulation within the following macros, do not change
8590    ## the running order or otherwise move them around unless you know exactly
8591    ## what you are doing...
8592    _LT_COMPILER_PIC($1)
8593    _LT_COMPILER_C_O($1)
8594    _LT_COMPILER_FILE_LOCKS($1)
8595    _LT_LINKER_SHLIBS($1)
8596    _LT_SYS_DYNAMIC_LINKER($1)
8597    _LT_LINKER_HARDCODE_LIBPATH($1)
8598
8599    _LT_CONFIG($1)
8600  fi # test -n "$compiler"
8601
8602  GCC=$lt_save_GCC
8603  CC="$lt_save_CC"
8604  CFLAGS="$lt_save_CFLAGS"
8605fi # test "$_lt_disable_F77" != yes
8606
8607AC_LANG_POP
8608])# _LT_LANG_F77_CONFIG
8609
8610
8611# _LT_LANG_FC_CONFIG([TAG])
8612# -------------------------
8613# Ensure that the configuration variables for a Fortran compiler are
8614# suitably defined.  These variables are subsequently used by _LT_CONFIG
8615# to write the compiler configuration to `libtool'.
8616m4_defun([_LT_LANG_FC_CONFIG],
8617[AC_LANG_PUSH(Fortran)
8618
8619if test -z "$FC" || test "X$FC" = "Xno"; then
8620  _lt_disable_FC=yes
8621fi
8622
8623_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8624_LT_TAGVAR(allow_undefined_flag, $1)=
8625_LT_TAGVAR(always_export_symbols, $1)=no
8626_LT_TAGVAR(archive_expsym_cmds, $1)=
8627_LT_TAGVAR(export_dynamic_flag_spec, $1)=
8628_LT_TAGVAR(hardcode_direct, $1)=no
8629_LT_TAGVAR(hardcode_direct_absolute, $1)=no
8630_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
8631_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
8632_LT_TAGVAR(hardcode_libdir_separator, $1)=
8633_LT_TAGVAR(hardcode_minus_L, $1)=no
8634_LT_TAGVAR(hardcode_automatic, $1)=no
8635_LT_TAGVAR(inherit_rpath, $1)=no
8636_LT_TAGVAR(module_cmds, $1)=
8637_LT_TAGVAR(module_expsym_cmds, $1)=
8638_LT_TAGVAR(link_all_deplibs, $1)=unknown
8639_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8640_LT_TAGVAR(reload_flag, $1)=$reload_flag
8641_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8642_LT_TAGVAR(no_undefined_flag, $1)=
8643_LT_TAGVAR(whole_archive_flag_spec, $1)=
8644_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
8645
8646# Source file extension for fc test sources.
8647ac_ext=${ac_fc_srcext-f}
8648
8649# Object file extension for compiled fc test sources.
8650objext=o
8651_LT_TAGVAR(objext, $1)=$objext
8652
8653# No sense in running all these tests if we already determined that
8654# the FC compiler isn't working.  Some variables (like enable_shared)
8655# are currently assumed to apply to all compilers on this platform,
8656# and will be corrupted by setting them based on a non-working compiler.
8657if test "$_lt_disable_FC" != yes; then
8658  # Code to be used in simple compile tests
8659  lt_simple_compile_test_code="\
8660      subroutine t
8661      return
8662      end
8663"
8664
8665  # Code to be used in simple link tests
8666  lt_simple_link_test_code="\
8667      program t
8668      end
8669"
8670
8671  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
8672  _LT_TAG_COMPILER
8673
8674  # save warnings/boilerplate of simple test code
8675  _LT_COMPILER_BOILERPLATE
8676  _LT_LINKER_BOILERPLATE
8677
8678  # Allow CC to be a program name with arguments.
8679  lt_save_CC="$CC"
8680  lt_save_GCC=$GCC
8681  lt_save_CFLAGS=$CFLAGS
8682  CC=${FC-"f95"}
8683  CFLAGS=$FCFLAGS
8684  compiler=$CC
8685  GCC=$ac_cv_fc_compiler_gnu
8686
8687  _LT_TAGVAR(compiler, $1)=$CC
8688  _LT_CC_BASENAME([$compiler])
8689
8690  if test -n "$compiler"; then
8691    AC_MSG_CHECKING([if libtool supports shared libraries])
8692    AC_MSG_RESULT([$can_build_shared])
8693
8694    AC_MSG_CHECKING([whether to build shared libraries])
8695    test "$can_build_shared" = "no" && enable_shared=no
8696
8697    # On AIX, shared libraries and static libraries use the same namespace, and
8698    # are all built from PIC.
8699    case $host_os in
8700      aix3*)
8701        test "$enable_shared" = yes && enable_static=no
8702        if test -n "$RANLIB"; then
8703          archive_cmds="$archive_cmds~\$RANLIB \$lib"
8704          postinstall_cmds='$RANLIB $lib'
8705        fi
8706        ;;
8707      aix[[4-9]]*)
8708	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
8709	  test "$enable_shared" = yes && enable_static=no
8710	fi
8711        ;;
8712    esac
8713    AC_MSG_RESULT([$enable_shared])
8714
8715    AC_MSG_CHECKING([whether to build static libraries])
8716    # Make sure either enable_shared or enable_static is yes.
8717    test "$enable_shared" = yes || enable_static=yes
8718    AC_MSG_RESULT([$enable_static])
8719
8720    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
8721    _LT_TAGVAR(LD, $1)="$LD"
8722
8723    ## CAVEAT EMPTOR:
8724    ## There is no encapsulation within the following macros, do not change
8725    ## the running order or otherwise move them around unless you know exactly
8726    ## what you are doing...
8727    _LT_SYS_HIDDEN_LIBDEPS($1)
8728    _LT_COMPILER_PIC($1)
8729    _LT_COMPILER_C_O($1)
8730    _LT_COMPILER_FILE_LOCKS($1)
8731    _LT_LINKER_SHLIBS($1)
8732    _LT_SYS_DYNAMIC_LINKER($1)
8733    _LT_LINKER_HARDCODE_LIBPATH($1)
8734
8735    _LT_CONFIG($1)
8736  fi # test -n "$compiler"
8737
8738  GCC=$lt_save_GCC
8739  CC=$lt_save_CC
8740  CFLAGS=$lt_save_CFLAGS
8741fi # test "$_lt_disable_FC" != yes
8742
8743AC_LANG_POP
8744])# _LT_LANG_FC_CONFIG
8745
8746
8747# _LT_LANG_GCJ_CONFIG([TAG])
8748# --------------------------
8749# Ensure that the configuration variables for the GNU Java Compiler compiler
8750# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8751# to write the compiler configuration to `libtool'.
8752m4_defun([_LT_LANG_GCJ_CONFIG],
8753[AC_REQUIRE([LT_PROG_GCJ])dnl
8754AC_LANG_SAVE
8755
8756# Source file extension for Java test sources.
8757ac_ext=java
8758
8759# Object file extension for compiled Java test sources.
8760objext=o
8761_LT_TAGVAR(objext, $1)=$objext
8762
8763# Code to be used in simple compile tests
8764lt_simple_compile_test_code="class foo {}"
8765
8766# Code to be used in simple link tests
8767lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
8768
8769# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8770_LT_TAG_COMPILER
8771
8772# save warnings/boilerplate of simple test code
8773_LT_COMPILER_BOILERPLATE
8774_LT_LINKER_BOILERPLATE
8775
8776# Allow CC to be a program name with arguments.
8777lt_save_CC=$CC
8778lt_save_CFLAGS=$CFLAGS
8779lt_save_GCC=$GCC
8780GCC=yes
8781CC=${GCJ-"gcj"}
8782CFLAGS=$GCJFLAGS
8783compiler=$CC
8784_LT_TAGVAR(compiler, $1)=$CC
8785_LT_TAGVAR(LD, $1)="$LD"
8786_LT_CC_BASENAME([$compiler])
8787
8788# GCJ did not exist at the time GCC didn't implicitly link libc in.
8789_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8790
8791_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
8792_LT_TAGVAR(reload_flag, $1)=$reload_flag
8793_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
8794
8795if test -n "$compiler"; then
8796  _LT_COMPILER_NO_RTTI($1)
8797  _LT_COMPILER_PIC($1)
8798  _LT_COMPILER_C_O($1)
8799  _LT_COMPILER_FILE_LOCKS($1)
8800  _LT_LINKER_SHLIBS($1)
8801  _LT_LINKER_HARDCODE_LIBPATH($1)
8802
8803  _LT_CONFIG($1)
8804fi
8805
8806AC_LANG_RESTORE
8807
8808GCC=$lt_save_GCC
8809CC=$lt_save_CC
8810CFLAGS=$lt_save_CFLAGS
8811])# _LT_LANG_GCJ_CONFIG
8812
8813
8814# _LT_LANG_RC_CONFIG([TAG])
8815# -------------------------
8816# Ensure that the configuration variables for the Windows resource compiler
8817# are suitably defined.  These variables are subsequently used by _LT_CONFIG
8818# to write the compiler configuration to `libtool'.
8819m4_defun([_LT_LANG_RC_CONFIG],
8820[AC_REQUIRE([LT_PROG_RC])dnl
8821AC_LANG_SAVE
8822
8823# Source file extension for RC test sources.
8824ac_ext=rc
8825
8826# Object file extension for compiled RC test sources.
8827objext=o
8828_LT_TAGVAR(objext, $1)=$objext
8829
8830# Code to be used in simple compile tests
8831lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
8832
8833# Code to be used in simple link tests
8834lt_simple_link_test_code="$lt_simple_compile_test_code"
8835
8836# ltmain only uses $CC for tagged configurations so make sure $CC is set.
8837_LT_TAG_COMPILER
8838
8839# save warnings/boilerplate of simple test code
8840_LT_COMPILER_BOILERPLATE
8841_LT_LINKER_BOILERPLATE
8842
8843# Allow CC to be a program name with arguments.
8844lt_save_CC="$CC"
8845lt_save_CFLAGS=$CFLAGS
8846lt_save_GCC=$GCC
8847GCC=
8848CC=${RC-"windres"}
8849CFLAGS=
8850compiler=$CC
8851_LT_TAGVAR(compiler, $1)=$CC
8852_LT_CC_BASENAME([$compiler])
8853_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
8854
8855if test -n "$compiler"; then
8856  :
8857  _LT_CONFIG($1)
8858fi
8859
8860GCC=$lt_save_GCC
8861AC_LANG_RESTORE
8862CC=$lt_save_CC
8863CFLAGS=$lt_save_CFLAGS
8864])# _LT_LANG_RC_CONFIG
8865
8866
8867# LT_PROG_GCJ
8868# -----------
8869AC_DEFUN([LT_PROG_GCJ],
8870[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
8871  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
8872    [AC_CHECK_TOOL(GCJ, gcj,)
8873      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8874      AC_SUBST(GCJFLAGS)])])[]dnl
8875])
8876
8877# Old name:
8878AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
8879dnl aclocal-1.4 backwards compatibility:
8880dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
8881
8882
8883# LT_PROG_RC
8884# ----------
8885AC_DEFUN([LT_PROG_RC],
8886[AC_CHECK_TOOL(RC, windres,)
8887])
8888
8889# Old name:
8890AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
8891dnl aclocal-1.4 backwards compatibility:
8892dnl AC_DEFUN([LT_AC_PROG_RC], [])
8893
8894
8895# _LT_DECL_EGREP
8896# --------------
8897# If we don't have a new enough Autoconf to choose the best grep
8898# available, choose the one first in the user's PATH.
8899m4_defun([_LT_DECL_EGREP],
8900[AC_REQUIRE([AC_PROG_EGREP])dnl
8901AC_REQUIRE([AC_PROG_FGREP])dnl
8902test -z "$GREP" && GREP=grep
8903_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
8904_LT_DECL([], [EGREP], [1], [An ERE matcher])
8905_LT_DECL([], [FGREP], [1], [A literal string matcher])
8906dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
8907AC_SUBST([GREP])
8908])
8909
8910
8911# _LT_DECL_OBJDUMP
8912# --------------
8913# If we don't have a new enough Autoconf to choose the best objdump
8914# available, choose the one first in the user's PATH.
8915m4_defun([_LT_DECL_OBJDUMP],
8916[AC_CHECK_TOOL(OBJDUMP, objdump, false)
8917test -z "$OBJDUMP" && OBJDUMP=objdump
8918_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
8919AC_SUBST([OBJDUMP])
8920])
8921
8922# _LT_DECL_DLLTOOL
8923# ----------------
8924# Ensure DLLTOOL variable is set.
8925m4_defun([_LT_DECL_DLLTOOL],
8926[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
8927test -z "$DLLTOOL" && DLLTOOL=dlltool
8928_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
8929AC_SUBST([DLLTOOL])
8930])
8931
8932# _LT_DECL_SED
8933# ------------
8934# Check for a fully-functional sed program, that truncates
8935# as few characters as possible.  Prefer GNU sed if found.
8936m4_defun([_LT_DECL_SED],
8937[AC_PROG_SED
8938test -z "$SED" && SED=sed
8939Xsed="$SED -e 1s/^X//"
8940_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
8941_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
8942    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
8943])# _LT_DECL_SED
8944
8945m4_ifndef([AC_PROG_SED], [
8946# NOTE: This macro has been submitted for inclusion into   #
8947#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8948#  a released version of Autoconf we should remove this    #
8949#  macro and use it instead.                               #
8950
8951m4_defun([AC_PROG_SED],
8952[AC_MSG_CHECKING([for a sed that does not truncate output])
8953AC_CACHE_VAL(lt_cv_path_SED,
8954[# Loop through the user's path and test for sed and gsed.
8955# Then use that list of sed's as ones to test for truncation.
8956as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8957for as_dir in $PATH
8958do
8959  IFS=$as_save_IFS
8960  test -z "$as_dir" && as_dir=.
8961  for lt_ac_prog in sed gsed; do
8962    for ac_exec_ext in '' $ac_executable_extensions; do
8963      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
8964        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8965      fi
8966    done
8967  done
8968done
8969IFS=$as_save_IFS
8970lt_ac_max=0
8971lt_ac_count=0
8972# Add /usr/xpg4/bin/sed as it is typically found on Solaris
8973# along with /bin/sed that truncates output.
8974for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8975  test ! -f $lt_ac_sed && continue
8976  cat /dev/null > conftest.in
8977  lt_ac_count=0
8978  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8979  # Check for GNU sed and select it if it is found.
8980  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8981    lt_cv_path_SED=$lt_ac_sed
8982    break
8983  fi
8984  while true; do
8985    cat conftest.in conftest.in >conftest.tmp
8986    mv conftest.tmp conftest.in
8987    cp conftest.in conftest.nl
8988    echo >>conftest.nl
8989    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8990    cmp -s conftest.out conftest.nl || break
8991    # 10000 chars as input seems more than enough
8992    test $lt_ac_count -gt 10 && break
8993    lt_ac_count=`expr $lt_ac_count + 1`
8994    if test $lt_ac_count -gt $lt_ac_max; then
8995      lt_ac_max=$lt_ac_count
8996      lt_cv_path_SED=$lt_ac_sed
8997    fi
8998  done
8999done
9000])
9001SED=$lt_cv_path_SED
9002AC_SUBST([SED])
9003AC_MSG_RESULT([$SED])
9004])#AC_PROG_SED
9005])#m4_ifndef
9006
9007# Old name:
9008AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
9009dnl aclocal-1.4 backwards compatibility:
9010dnl AC_DEFUN([LT_AC_PROG_SED], [])
9011
9012
9013# _LT_CHECK_SHELL_FEATURES
9014# ------------------------
9015# Find out whether the shell is Bourne or XSI compatible,
9016# or has some other useful features.
9017m4_defun([_LT_CHECK_SHELL_FEATURES],
9018[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
9019# Try some XSI features
9020xsi_shell=no
9021( _lt_dummy="a/b/c"
9022  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
9023      = c,a/b,b/c, \
9024    && eval 'test $(( 1 + 1 )) -eq 2 \
9025    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
9026  && xsi_shell=yes
9027AC_MSG_RESULT([$xsi_shell])
9028_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
9029
9030AC_MSG_CHECKING([whether the shell understands "+="])
9031lt_shell_append=no
9032( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
9033    >/dev/null 2>&1 \
9034  && lt_shell_append=yes
9035AC_MSG_RESULT([$lt_shell_append])
9036_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
9037
9038if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
9039  lt_unset=unset
9040else
9041  lt_unset=false
9042fi
9043_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
9044
9045# test EBCDIC or ASCII
9046case `echo X|tr X '\101'` in
9047 A) # ASCII based system
9048    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
9049  lt_SP2NL='tr \040 \012'
9050  lt_NL2SP='tr \015\012 \040\040'
9051  ;;
9052 *) # EBCDIC based system
9053  lt_SP2NL='tr \100 \n'
9054  lt_NL2SP='tr \r\n \100\100'
9055  ;;
9056esac
9057_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
9058_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
9059])# _LT_CHECK_SHELL_FEATURES
9060
9061
9062# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
9063# ------------------------------------------------------
9064# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
9065# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
9066m4_defun([_LT_PROG_FUNCTION_REPLACE],
9067[dnl {
9068sed -e '/^$1 ()$/,/^} # $1 /c\
9069$1 ()\
9070{\
9071m4_bpatsubsts([$2], [$], [\\], [^\([	 ]\)], [\\\1])
9072} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
9073  && mv -f "$cfgfile.tmp" "$cfgfile" \
9074    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
9075test 0 -eq $? || _lt_function_replace_fail=:
9076])
9077
9078
9079# _LT_PROG_REPLACE_SHELLFNS
9080# -------------------------
9081# Replace existing portable implementations of several shell functions with
9082# equivalent extended shell implementations where those features are available..
9083m4_defun([_LT_PROG_REPLACE_SHELLFNS],
9084[if test x"$xsi_shell" = xyes; then
9085  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
9086    case ${1} in
9087      */*) func_dirname_result="${1%/*}${2}" ;;
9088      *  ) func_dirname_result="${3}" ;;
9089    esac])
9090
9091  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
9092    func_basename_result="${1##*/}"])
9093
9094  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
9095    case ${1} in
9096      */*) func_dirname_result="${1%/*}${2}" ;;
9097      *  ) func_dirname_result="${3}" ;;
9098    esac
9099    func_basename_result="${1##*/}"])
9100
9101  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
9102    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
9103    # positional parameters, so assign one to ordinary parameter first.
9104    func_stripname_result=${3}
9105    func_stripname_result=${func_stripname_result#"${1}"}
9106    func_stripname_result=${func_stripname_result%"${2}"}])
9107
9108  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
9109    func_split_long_opt_name=${1%%=*}
9110    func_split_long_opt_arg=${1#*=}])
9111
9112  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
9113    func_split_short_opt_arg=${1#??}
9114    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
9115
9116  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
9117    case ${1} in
9118      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
9119      *)    func_lo2o_result=${1} ;;
9120    esac])
9121
9122  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
9123
9124  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
9125
9126  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
9127fi
9128
9129if test x"$lt_shell_append" = xyes; then
9130  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
9131
9132  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
9133    func_quote_for_eval "${2}"
9134dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
9135    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
9136
9137  # Save a `func_append' function call where possible by direct use of '+='
9138  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
9139    && mv -f "$cfgfile.tmp" "$cfgfile" \
9140      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
9141  test 0 -eq $? || _lt_function_replace_fail=:
9142else
9143  # Save a `func_append' function call even when '+=' is not available
9144  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
9145    && mv -f "$cfgfile.tmp" "$cfgfile" \
9146      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
9147  test 0 -eq $? || _lt_function_replace_fail=:
9148fi
9149
9150if test x"$_lt_function_replace_fail" = x":"; then
9151  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
9152fi
9153])
9154
9155# _LT_PATH_CONVERSION_FUNCTIONS
9156# -----------------------------
9157# Determine which file name conversion functions should be used by
9158# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
9159# for certain cross-compile configurations and native mingw.
9160m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
9161[AC_REQUIRE([AC_CANONICAL_HOST])dnl
9162AC_REQUIRE([AC_CANONICAL_BUILD])dnl
9163AC_MSG_CHECKING([how to convert $build file names to $host format])
9164AC_CACHE_VAL(lt_cv_to_host_file_cmd,
9165[case $host in
9166  *-*-mingw* )
9167    case $build in
9168      *-*-mingw* ) # actually msys
9169        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
9170        ;;
9171      *-*-cygwin* )
9172        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
9173        ;;
9174      * ) # otherwise, assume *nix
9175        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
9176        ;;
9177    esac
9178    ;;
9179  *-*-cygwin* )
9180    case $build in
9181      *-*-mingw* ) # actually msys
9182        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
9183        ;;
9184      *-*-cygwin* )
9185        lt_cv_to_host_file_cmd=func_convert_file_noop
9186        ;;
9187      * ) # otherwise, assume *nix
9188        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
9189        ;;
9190    esac
9191    ;;
9192  * ) # unhandled hosts (and "normal" native builds)
9193    lt_cv_to_host_file_cmd=func_convert_file_noop
9194    ;;
9195esac
9196])
9197to_host_file_cmd=$lt_cv_to_host_file_cmd
9198AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
9199_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
9200         [0], [convert $build file names to $host format])dnl
9201
9202AC_MSG_CHECKING([how to convert $build file names to toolchain format])
9203AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
9204[#assume ordinary cross tools, or native build.
9205lt_cv_to_tool_file_cmd=func_convert_file_noop
9206case $host in
9207  *-*-mingw* )
9208    case $build in
9209      *-*-mingw* ) # actually msys
9210        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
9211        ;;
9212    esac
9213    ;;
9214esac
9215])
9216to_tool_file_cmd=$lt_cv_to_tool_file_cmd
9217AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
9218_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
9219         [0], [convert $build files to toolchain format])dnl
9220])# _LT_PATH_CONVERSION_FUNCTIONS
9221
9222# Helper functions for option handling.                    -*- Autoconf -*-
9223#
9224#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
9225#   Inc.
9226#   Written by Gary V. Vaughan, 2004
9227#
9228# This file is free software; the Free Software Foundation gives
9229# unlimited permission to copy and/or distribute it, with or without
9230# modifications, as long as this notice is preserved.
9231
9232# serial 7 ltoptions.m4
9233
9234# This is to help aclocal find these macros, as it can't see m4_define.
9235AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9236
9237
9238# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9239# ------------------------------------------
9240m4_define([_LT_MANGLE_OPTION],
9241[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9242
9243
9244# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9245# ---------------------------------------
9246# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9247# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
9248# saved as a flag.
9249m4_define([_LT_SET_OPTION],
9250[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9251m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9252        _LT_MANGLE_DEFUN([$1], [$2]),
9253    [m4_warning([Unknown $1 option `$2'])])[]dnl
9254])
9255
9256
9257# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9258# ------------------------------------------------------------
9259# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9260m4_define([_LT_IF_OPTION],
9261[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9262
9263
9264# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9265# -------------------------------------------------------
9266# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9267# are set.
9268m4_define([_LT_UNLESS_OPTIONS],
9269[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9270	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9271		      [m4_define([$0_found])])])[]dnl
9272m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9273])[]dnl
9274])
9275
9276
9277# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9278# ----------------------------------------
9279# OPTION-LIST is a space-separated list of Libtool options associated
9280# with MACRO-NAME.  If any OPTION has a matching handler declared with
9281# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9282# the unknown option and exit.
9283m4_defun([_LT_SET_OPTIONS],
9284[# Set options
9285m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9286    [_LT_SET_OPTION([$1], _LT_Option)])
9287
9288m4_if([$1],[LT_INIT],[
9289  dnl
9290  dnl Simply set some default values (i.e off) if boolean options were not
9291  dnl specified:
9292  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9293  ])
9294  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
9295  ])
9296  dnl
9297  dnl If no reference was made to various pairs of opposing options, then
9298  dnl we run the default mode handler for the pair.  For example, if neither
9299  dnl `shared' nor `disable-shared' was passed, we enable building of shared
9300  dnl archives by default:
9301  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
9302  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
9303  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
9304  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
9305  		   [_LT_ENABLE_FAST_INSTALL])
9306  ])
9307])# _LT_SET_OPTIONS
9308
9309
9310
9311# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
9312# -----------------------------------------
9313m4_define([_LT_MANGLE_DEFUN],
9314[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9315
9316
9317# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
9318# -----------------------------------------------
9319m4_define([LT_OPTION_DEFINE],
9320[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
9321])# LT_OPTION_DEFINE
9322
9323
9324# dlopen
9325# ------
9326LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
9327])
9328
9329AU_DEFUN([AC_LIBTOOL_DLOPEN],
9330[_LT_SET_OPTION([LT_INIT], [dlopen])
9331AC_DIAGNOSE([obsolete],
9332[$0: Remove this warning and the call to _LT_SET_OPTION when you
9333put the `dlopen' option into LT_INIT's first parameter.])
9334])
9335
9336dnl aclocal-1.4 backwards compatibility:
9337dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9338
9339
9340# win32-dll
9341# ---------
9342# Declare package support for building win32 dll's.
9343LT_OPTION_DEFINE([LT_INIT], [win32-dll],
9344[enable_win32_dll=yes
9345
9346case $host in
9347*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
9348  AC_CHECK_TOOL(AS, as, false)
9349  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
9350  AC_CHECK_TOOL(OBJDUMP, objdump, false)
9351  ;;
9352esac
9353
9354test -z "$AS" && AS=as
9355_LT_DECL([], [AS],      [1], [Assembler program])dnl
9356
9357test -z "$DLLTOOL" && DLLTOOL=dlltool
9358_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
9359
9360test -z "$OBJDUMP" && OBJDUMP=objdump
9361_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
9362])# win32-dll
9363
9364AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
9365[AC_REQUIRE([AC_CANONICAL_HOST])dnl
9366_LT_SET_OPTION([LT_INIT], [win32-dll])
9367AC_DIAGNOSE([obsolete],
9368[$0: Remove this warning and the call to _LT_SET_OPTION when you
9369put the `win32-dll' option into LT_INIT's first parameter.])
9370])
9371
9372dnl aclocal-1.4 backwards compatibility:
9373dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9374
9375
9376# _LT_ENABLE_SHARED([DEFAULT])
9377# ----------------------------
9378# implement the --enable-shared flag, and supports the `shared' and
9379# `disable-shared' LT_INIT options.
9380# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9381m4_define([_LT_ENABLE_SHARED],
9382[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
9383AC_ARG_ENABLE([shared],
9384    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
9385	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
9386    [p=${PACKAGE-default}
9387    case $enableval in
9388    yes) enable_shared=yes ;;
9389    no) enable_shared=no ;;
9390    *)
9391      enable_shared=no
9392      # Look at the argument we got.  We use all the common list separators.
9393      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9394      for pkg in $enableval; do
9395	IFS="$lt_save_ifs"
9396	if test "X$pkg" = "X$p"; then
9397	  enable_shared=yes
9398	fi
9399      done
9400      IFS="$lt_save_ifs"
9401      ;;
9402    esac],
9403    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9404
9405    _LT_DECL([build_libtool_libs], [enable_shared], [0],
9406	[Whether or not to build shared libraries])
9407])# _LT_ENABLE_SHARED
9408
9409LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
9410LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9411
9412# Old names:
9413AC_DEFUN([AC_ENABLE_SHARED],
9414[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
9415])
9416
9417AC_DEFUN([AC_DISABLE_SHARED],
9418[_LT_SET_OPTION([LT_INIT], [disable-shared])
9419])
9420
9421AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
9422AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9423
9424dnl aclocal-1.4 backwards compatibility:
9425dnl AC_DEFUN([AM_ENABLE_SHARED], [])
9426dnl AC_DEFUN([AM_DISABLE_SHARED], [])
9427
9428
9429
9430# _LT_ENABLE_STATIC([DEFAULT])
9431# ----------------------------
9432# implement the --enable-static flag, and support the `static' and
9433# `disable-static' LT_INIT options.
9434# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9435m4_define([_LT_ENABLE_STATIC],
9436[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
9437AC_ARG_ENABLE([static],
9438    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
9439	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
9440    [p=${PACKAGE-default}
9441    case $enableval in
9442    yes) enable_static=yes ;;
9443    no) enable_static=no ;;
9444    *)
9445     enable_static=no
9446      # Look at the argument we got.  We use all the common list separators.
9447      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9448      for pkg in $enableval; do
9449	IFS="$lt_save_ifs"
9450	if test "X$pkg" = "X$p"; then
9451	  enable_static=yes
9452	fi
9453      done
9454      IFS="$lt_save_ifs"
9455      ;;
9456    esac],
9457    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
9458
9459    _LT_DECL([build_old_libs], [enable_static], [0],
9460	[Whether or not to build static libraries])
9461])# _LT_ENABLE_STATIC
9462
9463LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
9464LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9465
9466# Old names:
9467AC_DEFUN([AC_ENABLE_STATIC],
9468[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
9469])
9470
9471AC_DEFUN([AC_DISABLE_STATIC],
9472[_LT_SET_OPTION([LT_INIT], [disable-static])
9473])
9474
9475AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
9476AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9477
9478dnl aclocal-1.4 backwards compatibility:
9479dnl AC_DEFUN([AM_ENABLE_STATIC], [])
9480dnl AC_DEFUN([AM_DISABLE_STATIC], [])
9481
9482
9483
9484# _LT_ENABLE_FAST_INSTALL([DEFAULT])
9485# ----------------------------------
9486# implement the --enable-fast-install flag, and support the `fast-install'
9487# and `disable-fast-install' LT_INIT options.
9488# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
9489m4_define([_LT_ENABLE_FAST_INSTALL],
9490[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
9491AC_ARG_ENABLE([fast-install],
9492    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
9493    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
9494    [p=${PACKAGE-default}
9495    case $enableval in
9496    yes) enable_fast_install=yes ;;
9497    no) enable_fast_install=no ;;
9498    *)
9499      enable_fast_install=no
9500      # Look at the argument we got.  We use all the common list separators.
9501      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
9502      for pkg in $enableval; do
9503	IFS="$lt_save_ifs"
9504	if test "X$pkg" = "X$p"; then
9505	  enable_fast_install=yes
9506	fi
9507      done
9508      IFS="$lt_save_ifs"
9509      ;;
9510    esac],
9511    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9512
9513_LT_DECL([fast_install], [enable_fast_install], [0],
9514	 [Whether or not to optimize for fast installation])dnl
9515])# _LT_ENABLE_FAST_INSTALL
9516
9517LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
9518LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9519
9520# Old names:
9521AU_DEFUN([AC_ENABLE_FAST_INSTALL],
9522[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
9523AC_DIAGNOSE([obsolete],
9524[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9525the `fast-install' option into LT_INIT's first parameter.])
9526])
9527
9528AU_DEFUN([AC_DISABLE_FAST_INSTALL],
9529[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
9530AC_DIAGNOSE([obsolete],
9531[$0: Remove this warning and the call to _LT_SET_OPTION when you put
9532the `disable-fast-install' option into LT_INIT's first parameter.])
9533])
9534
9535dnl aclocal-1.4 backwards compatibility:
9536dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
9537dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9538
9539
9540# _LT_WITH_PIC([MODE])
9541# --------------------
9542# implement the --with-pic flag, and support the `pic-only' and `no-pic'
9543# LT_INIT options.
9544# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
9545m4_define([_LT_WITH_PIC],
9546[AC_ARG_WITH([pic],
9547    [AS_HELP_STRING([--with-pic],
9548	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
9549    [pic_mode="$withval"],
9550    [pic_mode=default])
9551
9552test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9553
9554_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
9555])# _LT_WITH_PIC
9556
9557LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
9558LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9559
9560# Old name:
9561AU_DEFUN([AC_LIBTOOL_PICMODE],
9562[_LT_SET_OPTION([LT_INIT], [pic-only])
9563AC_DIAGNOSE([obsolete],
9564[$0: Remove this warning and the call to _LT_SET_OPTION when you
9565put the `pic-only' option into LT_INIT's first parameter.])
9566])
9567
9568dnl aclocal-1.4 backwards compatibility:
9569dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9570
9571
9572m4_define([_LTDL_MODE], [])
9573LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
9574		 [m4_define([_LTDL_MODE], [nonrecursive])])
9575LT_OPTION_DEFINE([LTDL_INIT], [recursive],
9576		 [m4_define([_LTDL_MODE], [recursive])])
9577LT_OPTION_DEFINE([LTDL_INIT], [subproject],
9578		 [m4_define([_LTDL_MODE], [subproject])])
9579
9580m4_define([_LTDL_TYPE], [])
9581LT_OPTION_DEFINE([LTDL_INIT], [installable],
9582		 [m4_define([_LTDL_TYPE], [installable])])
9583LT_OPTION_DEFINE([LTDL_INIT], [convenience],
9584		 [m4_define([_LTDL_TYPE], [convenience])])
9585
9586# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
9587#
9588# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
9589# Written by Gary V. Vaughan, 2004
9590#
9591# This file is free software; the Free Software Foundation gives
9592# unlimited permission to copy and/or distribute it, with or without
9593# modifications, as long as this notice is preserved.
9594
9595# serial 6 ltsugar.m4
9596
9597# This is to help aclocal find these macros, as it can't see m4_define.
9598AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
9599
9600
9601# lt_join(SEP, ARG1, [ARG2...])
9602# -----------------------------
9603# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
9604# associated separator.
9605# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
9606# versions in m4sugar had bugs.
9607m4_define([lt_join],
9608[m4_if([$#], [1], [],
9609       [$#], [2], [[$2]],
9610       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
9611m4_define([_lt_join],
9612[m4_if([$#$2], [2], [],
9613       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
9614
9615
9616# lt_car(LIST)
9617# lt_cdr(LIST)
9618# ------------
9619# Manipulate m4 lists.
9620# These macros are necessary as long as will still need to support
9621# Autoconf-2.59 which quotes differently.
9622m4_define([lt_car], [[$1]])
9623m4_define([lt_cdr],
9624[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
9625       [$#], 1, [],
9626       [m4_dquote(m4_shift($@))])])
9627m4_define([lt_unquote], $1)
9628
9629
9630# lt_append(MACRO-NAME, STRING, [SEPARATOR])
9631# ------------------------------------------
9632# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
9633# Note that neither SEPARATOR nor STRING are expanded; they are appended
9634# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
9635# No SEPARATOR is output if MACRO-NAME was previously undefined (different
9636# than defined and empty).
9637#
9638# This macro is needed until we can rely on Autoconf 2.62, since earlier
9639# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
9640m4_define([lt_append],
9641[m4_define([$1],
9642	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9643
9644
9645
9646# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
9647# ----------------------------------------------------------
9648# Produce a SEP delimited list of all paired combinations of elements of
9649# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
9650# has the form PREFIXmINFIXSUFFIXn.
9651# Needed until we can rely on m4_combine added in Autoconf 2.62.
9652m4_define([lt_combine],
9653[m4_if(m4_eval([$# > 3]), [1],
9654       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
9655[[m4_foreach([_Lt_prefix], [$2],
9656	     [m4_foreach([_Lt_suffix],
9657		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
9658	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9659
9660
9661# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
9662# -----------------------------------------------------------------------
9663# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
9664# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
9665m4_define([lt_if_append_uniq],
9666[m4_ifdef([$1],
9667	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
9668		 [lt_append([$1], [$2], [$3])$4],
9669		 [$5])],
9670	  [lt_append([$1], [$2], [$3])$4])])
9671
9672
9673# lt_dict_add(DICT, KEY, VALUE)
9674# -----------------------------
9675m4_define([lt_dict_add],
9676[m4_define([$1($2)], [$3])])
9677
9678
9679# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
9680# --------------------------------------------
9681m4_define([lt_dict_add_subkey],
9682[m4_define([$1($2:$3)], [$4])])
9683
9684
9685# lt_dict_fetch(DICT, KEY, [SUBKEY])
9686# ----------------------------------
9687m4_define([lt_dict_fetch],
9688[m4_ifval([$3],
9689	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
9690    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9691
9692
9693# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
9694# -----------------------------------------------------------------
9695m4_define([lt_if_dict_fetch],
9696[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
9697	[$5],
9698    [$6])])
9699
9700
9701# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
9702# --------------------------------------------------------------
9703m4_define([lt_dict_filter],
9704[m4_if([$5], [], [],
9705  [lt_join(m4_quote(m4_default([$4], [[, ]])),
9706           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
9707		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
9708])
9709
9710# ltversion.m4 -- version numbers			-*- Autoconf -*-
9711#
9712#   Copyright (C) 2004 Free Software Foundation, Inc.
9713#   Written by Scott James Remnant, 2004
9714#
9715# This file is free software; the Free Software Foundation gives
9716# unlimited permission to copy and/or distribute it, with or without
9717# modifications, as long as this notice is preserved.
9718
9719# @configure_input@
9720
9721# serial 3293 ltversion.m4
9722# This file is part of GNU Libtool
9723
9724m4_define([LT_PACKAGE_VERSION], [2.4])
9725m4_define([LT_PACKAGE_REVISION], [1.3293])
9726
9727AC_DEFUN([LTVERSION_VERSION],
9728[macro_version='2.4'
9729macro_revision='1.3293'
9730_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
9731_LT_DECL(, macro_revision, 0)
9732])
9733
9734# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
9735#
9736#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
9737#   Written by Scott James Remnant, 2004.
9738#
9739# This file is free software; the Free Software Foundation gives
9740# unlimited permission to copy and/or distribute it, with or without
9741# modifications, as long as this notice is preserved.
9742
9743# serial 5 lt~obsolete.m4
9744
9745# These exist entirely to fool aclocal when bootstrapping libtool.
9746#
9747# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
9748# which have later been changed to m4_define as they aren't part of the
9749# exported API, or moved to Autoconf or Automake where they belong.
9750#
9751# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
9752# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
9753# using a macro with the same name in our local m4/libtool.m4 it'll
9754# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
9755# and doesn't know about Autoconf macros at all.)
9756#
9757# So we provide this file, which has a silly filename so it's always
9758# included after everything else.  This provides aclocal with the
9759# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
9760# because those macros already exist, or will be overwritten later.
9761# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
9762#
9763# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
9764# Yes, that means every name once taken will need to remain here until
9765# we give up compatibility with versions before 1.7, at which point
9766# we need to keep only those names which we still refer to.
9767
9768# This is to help aclocal find these macros, as it can't see m4_define.
9769AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9770
9771m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
9772m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
9773m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
9774m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
9775m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
9776m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
9777m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
9778m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
9779m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
9780m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
9781m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
9782m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
9783m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
9784m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
9785m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
9786m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
9787m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
9788m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
9789m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
9790m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
9791m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
9792m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
9793m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
9794m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
9795m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
9796m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
9797m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
9798m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
9799m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
9800m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
9801m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
9802m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
9803m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
9804m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
9805m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
9806m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
9807m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
9808m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
9809m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
9810m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
9811m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
9812m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
9813m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
9814m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
9815m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
9816m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
9817m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
9818m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
9819m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
9820m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
9821m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
9822m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
9823m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
9824m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
9825m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
9826m4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
9827m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
9828m4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
9829m4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
9830m4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
9831m4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
9832
9833# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
9834# serial 1 (pkg-config-0.24)
9835# 
9836# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
9837#
9838# This program is free software; you can redistribute it and/or modify
9839# it under the terms of the GNU General Public License as published by
9840# the Free Software Foundation; either version 2 of the License, or
9841# (at your option) any later version.
9842#
9843# This program is distributed in the hope that it will be useful, but
9844# WITHOUT ANY WARRANTY; without even the implied warranty of
9845# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9846# General Public License for more details.
9847#
9848# You should have received a copy of the GNU General Public License
9849# along with this program; if not, write to the Free Software
9850# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
9851#
9852# As a special exception to the GNU General Public License, if you
9853# distribute this file as part of a program that contains a
9854# configuration script generated by Autoconf, you may include it under
9855# the same distribution terms that you use for the rest of that program.
9856
9857# PKG_PROG_PKG_CONFIG([MIN-VERSION])
9858# ----------------------------------
9859AC_DEFUN([PKG_PROG_PKG_CONFIG],
9860[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
9861m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
9862m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
9863AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
9864AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
9865AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
9866
9867if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9868	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
9869fi
9870if test -n "$PKG_CONFIG"; then
9871	_pkg_min_version=m4_default([$1], [0.9.0])
9872	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
9873	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9874		AC_MSG_RESULT([yes])
9875	else
9876		AC_MSG_RESULT([no])
9877		PKG_CONFIG=""
9878	fi
9879fi[]dnl
9880])# PKG_PROG_PKG_CONFIG
9881
9882# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
9883#
9884# Check to see whether a particular set of modules exists.  Similar
9885# to PKG_CHECK_MODULES(), but does not set variables or print errors.
9886#
9887# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9888# only at the first occurence in configure.ac, so if the first place
9889# it's called might be skipped (such as if it is within an "if", you
9890# have to call PKG_CHECK_EXISTS manually
9891# --------------------------------------------------------------
9892AC_DEFUN([PKG_CHECK_EXISTS],
9893[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9894if test -n "$PKG_CONFIG" && \
9895    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
9896  m4_default([$2], [:])
9897m4_ifvaln([$3], [else
9898  $3])dnl
9899fi])
9900
9901# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
9902# ---------------------------------------------
9903m4_define([_PKG_CONFIG],
9904[if test -n "$$1"; then
9905    pkg_cv_[]$1="$$1"
9906 elif test -n "$PKG_CONFIG"; then
9907    PKG_CHECK_EXISTS([$3],
9908                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
9909		      test "x$?" != "x0" && pkg_failed=yes ],
9910		     [pkg_failed=yes])
9911 else
9912    pkg_failed=untried
9913fi[]dnl
9914])# _PKG_CONFIG
9915
9916# _PKG_SHORT_ERRORS_SUPPORTED
9917# -----------------------------
9918AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
9919[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
9920if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9921        _pkg_short_errors_supported=yes
9922else
9923        _pkg_short_errors_supported=no
9924fi[]dnl
9925])# _PKG_SHORT_ERRORS_SUPPORTED
9926
9927
9928# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
9929# [ACTION-IF-NOT-FOUND])
9930#
9931#
9932# Note that if there is a possibility the first call to
9933# PKG_CHECK_MODULES might not happen, you should be sure to include an
9934# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
9935#
9936#
9937# --------------------------------------------------------------
9938AC_DEFUN([PKG_CHECK_MODULES],
9939[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
9940AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
9941AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
9942
9943pkg_failed=no
9944AC_MSG_CHECKING([for $1])
9945
9946_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
9947_PKG_CONFIG([$1][_LIBS], [libs], [$2])
9948
9949m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
9950and $1[]_LIBS to avoid the need to call pkg-config.
9951See the pkg-config man page for more details.])
9952
9953if test $pkg_failed = yes; then
9954   	AC_MSG_RESULT([no])
9955        _PKG_SHORT_ERRORS_SUPPORTED
9956        if test $_pkg_short_errors_supported = yes; then
9957	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
9958        else 
9959	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
9960        fi
9961	# Put the nasty error message in config.log where it belongs
9962	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
9963
9964	m4_default([$4], [AC_MSG_ERROR(
9965[Package requirements ($2) were not met:
9966
9967$$1_PKG_ERRORS
9968
9969Consider adjusting the PKG_CONFIG_PATH environment variable if you
9970installed software in a non-standard prefix.
9971
9972_PKG_TEXT])[]dnl
9973        ])
9974elif test $pkg_failed = untried; then
9975     	AC_MSG_RESULT([no])
9976	m4_default([$4], [AC_MSG_FAILURE(
9977[The pkg-config script could not be found or is too old.  Make sure it
9978is in your PATH or set the PKG_CONFIG environment variable to the full
9979path to pkg-config.
9980
9981_PKG_TEXT
9982
9983To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
9984        ])
9985else
9986	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
9987	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
9988        AC_MSG_RESULT([yes])
9989	$3
9990fi[]dnl
9991])# PKG_CHECK_MODULES
9992
9993dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
9994dnl
9995dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
9996dnl 
9997dnl Permission is hereby granted, free of charge, to any person obtaining a
9998dnl copy of this software and associated documentation files (the "Software"),
9999dnl to deal in the Software without restriction, including without limitation
10000dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
10001dnl and/or sell copies of the Software, and to permit persons to whom the
10002dnl Software is furnished to do so, subject to the following conditions:
10003dnl
10004dnl The above copyright notice and this permission notice (including the next
10005dnl paragraph) shall be included in all copies or substantial portions of the
10006dnl Software.
10007dnl
10008dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
10009dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
10010dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
10011dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
10012dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
10013dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
10014dnl DEALINGS IN THE SOFTWARE.
10015
10016# XORG_MACROS_VERSION(required-version)
10017# -------------------------------------
10018# Minimum version: 1.1.0
10019#
10020# If you're using a macro added in Version 1.1 or newer, include this in
10021# your configure.ac with the minimum required version, such as:
10022# XORG_MACROS_VERSION(1.1)
10023#
10024# To ensure that this macro is defined, also add:
10025# m4_ifndef([XORG_MACROS_VERSION],
10026#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
10027#
10028#
10029# See the "minimum version" comment for each macro you use to see what 
10030# version you require.
10031m4_defun([XORG_MACROS_VERSION],[
10032m4_define([vers_have], [1.14.0])
10033m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
10034m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
10035m4_if(m4_cmp(maj_have, maj_needed), 0,,
10036    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
10037m4_if(m4_version_compare(vers_have, [$1]), -1,
10038    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
10039m4_undefine([vers_have])
10040m4_undefine([maj_have])
10041m4_undefine([maj_needed])
10042]) # XORG_MACROS_VERSION
10043
10044# XORG_PROG_RAWCPP()
10045# ------------------
10046# Minimum version: 1.0.0
10047#
10048# Find cpp program and necessary flags for use in pre-processing text files
10049# such as man pages and config files
10050AC_DEFUN([XORG_PROG_RAWCPP],[
10051AC_REQUIRE([AC_PROG_CPP])
10052AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
10053   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
10054
10055# Check for flag to avoid builtin definitions - assumes unix is predefined,
10056# which is not the best choice for supporting other OS'es, but covers most
10057# of the ones we need for now.
10058AC_MSG_CHECKING([if $RAWCPP requires -undef])
10059AC_LANG_CONFTEST([Does cpp redefine unix ?
10060		  AC_LANG_DEFINES_PROVIDED])
10061if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
10062	AC_MSG_RESULT([no])
10063else
10064	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
10065		RAWCPPFLAGS=-undef
10066		AC_MSG_RESULT([yes])
10067	# under Cygwin unix is still defined even with -undef
10068	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
10069		RAWCPPFLAGS="-undef -ansi"
10070		AC_MSG_RESULT([yes, with -ansi])
10071	else
10072		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
10073	fi
10074fi
10075rm -f conftest.$ac_ext
10076
10077AC_MSG_CHECKING([if $RAWCPP requires -traditional])
10078AC_LANG_CONFTEST([Does cpp preserve   "whitespace"?
10079		  AC_LANG_DEFINES_PROVIDED])
10080if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
10081	AC_MSG_RESULT([no])
10082else
10083	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
10084		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
10085		AC_MSG_RESULT([yes])
10086	else
10087		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
10088	fi
10089fi
10090rm -f conftest.$ac_ext
10091AC_SUBST(RAWCPPFLAGS)
10092]) # XORG_PROG_RAWCPP
10093
10094# XORG_MANPAGE_SECTIONS()
10095# -----------------------
10096# Minimum version: 1.0.0
10097#
10098# Determine which sections man pages go in for the different man page types
10099# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
10100# Not sure if there's any better way than just hardcoding by OS name.
10101# Override default settings by setting environment variables
10102# Added MAN_SUBSTS in version 1.8
10103# Added AC_PROG_SED in version 1.8
10104
10105AC_DEFUN([XORG_MANPAGE_SECTIONS],[
10106AC_REQUIRE([AC_CANONICAL_HOST])
10107AC_REQUIRE([AC_PROG_SED])
10108
10109if test x$APP_MAN_SUFFIX = x    ; then
10110    APP_MAN_SUFFIX=1
10111fi
10112if test x$APP_MAN_DIR = x    ; then
10113    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
10114fi
10115
10116if test x$LIB_MAN_SUFFIX = x    ; then
10117    LIB_MAN_SUFFIX=3
10118fi
10119if test x$LIB_MAN_DIR = x    ; then
10120    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
10121fi
10122
10123if test x$FILE_MAN_SUFFIX = x    ; then
10124    case $host_os in
10125	solaris*)	FILE_MAN_SUFFIX=4  ;;
10126	*)		FILE_MAN_SUFFIX=5  ;;
10127    esac
10128fi
10129if test x$FILE_MAN_DIR = x    ; then
10130    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
10131fi
10132
10133if test x$MISC_MAN_SUFFIX = x    ; then
10134    case $host_os in
10135	solaris*)	MISC_MAN_SUFFIX=5  ;;
10136	*)		MISC_MAN_SUFFIX=7  ;;
10137    esac
10138fi
10139if test x$MISC_MAN_DIR = x    ; then
10140    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
10141fi
10142
10143if test x$DRIVER_MAN_SUFFIX = x    ; then
10144    case $host_os in
10145	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
10146	*)		DRIVER_MAN_SUFFIX=4  ;;
10147    esac
10148fi
10149if test x$DRIVER_MAN_DIR = x    ; then
10150    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
10151fi
10152
10153if test x$ADMIN_MAN_SUFFIX = x    ; then
10154    case $host_os in
10155	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
10156	*)		ADMIN_MAN_SUFFIX=8  ;;
10157    esac
10158fi
10159if test x$ADMIN_MAN_DIR = x    ; then
10160    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
10161fi
10162
10163
10164AC_SUBST([APP_MAN_SUFFIX])
10165AC_SUBST([LIB_MAN_SUFFIX])
10166AC_SUBST([FILE_MAN_SUFFIX])
10167AC_SUBST([MISC_MAN_SUFFIX])
10168AC_SUBST([DRIVER_MAN_SUFFIX])
10169AC_SUBST([ADMIN_MAN_SUFFIX])
10170AC_SUBST([APP_MAN_DIR])
10171AC_SUBST([LIB_MAN_DIR])
10172AC_SUBST([FILE_MAN_DIR])
10173AC_SUBST([MISC_MAN_DIR])
10174AC_SUBST([DRIVER_MAN_DIR])
10175AC_SUBST([ADMIN_MAN_DIR])
10176
10177XORG_MAN_PAGE="X Version 11"
10178AC_SUBST([XORG_MAN_PAGE])
10179MAN_SUBSTS="\
10180	-e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
10181	-e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
10182	-e 's|__xservername__|Xorg|g' \
10183	-e 's|__xconfigfile__|xorg.conf|g' \
10184	-e 's|__projectroot__|\$(prefix)|g' \
10185	-e 's|__apploaddir__|\$(appdefaultdir)|g' \
10186	-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
10187	-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
10188	-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
10189	-e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
10190	-e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
10191	-e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
10192AC_SUBST([MAN_SUBSTS])
10193
10194]) # XORG_MANPAGE_SECTIONS
10195
10196# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
10197# ------------------------
10198# Minimum version: 1.7.0
10199#
10200# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
10201# provided by xorg-sgml-doctools, if installed.
10202AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
10203AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
10204XORG_SGML_PATH=
10205PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
10206    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
10207    [m4_ifval([$1],[:],
10208        [if test x"$cross_compiling" != x"yes" ; then
10209            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
10210                          [XORG_SGML_PATH=$prefix/share/sgml])
10211         fi])
10212    ])
10213
10214# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
10215# the path and the name of the doc stylesheet
10216if test "x$XORG_SGML_PATH" != "x" ; then
10217   AC_MSG_RESULT([$XORG_SGML_PATH])
10218   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
10219   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
10220else
10221   AC_MSG_RESULT([no])
10222fi
10223
10224AC_SUBST(XORG_SGML_PATH)
10225AC_SUBST(STYLESHEET_SRCDIR)
10226AC_SUBST(XSL_STYLESHEET)
10227AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
10228]) # XORG_CHECK_SGML_DOCTOOLS
10229
10230# XORG_CHECK_LINUXDOC
10231# -------------------
10232# Minimum version: 1.0.0
10233#
10234# Defines the variable MAKE_TEXT if the necessary tools and
10235# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
10236# Whether or not the necessary tools and files are found can be checked
10237# with the AM_CONDITIONAL "BUILD_LINUXDOC"
10238AC_DEFUN([XORG_CHECK_LINUXDOC],[
10239AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
10240AC_REQUIRE([XORG_WITH_PS2PDF])
10241
10242AC_PATH_PROG(LINUXDOC, linuxdoc)
10243
10244AC_MSG_CHECKING([whether to build documentation])
10245
10246if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
10247   BUILDDOC=yes
10248else
10249   BUILDDOC=no
10250fi
10251
10252AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
10253
10254AC_MSG_RESULT([$BUILDDOC])
10255
10256AC_MSG_CHECKING([whether to build pdf documentation])
10257
10258if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
10259   BUILDPDFDOC=yes
10260else
10261   BUILDPDFDOC=no
10262fi
10263
10264AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
10265
10266AC_MSG_RESULT([$BUILDPDFDOC])
10267
10268MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
10269MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
10270MAKE_PDF="$PS2PDF"
10271MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
10272
10273AC_SUBST(MAKE_TEXT)
10274AC_SUBST(MAKE_PS)
10275AC_SUBST(MAKE_PDF)
10276AC_SUBST(MAKE_HTML)
10277]) # XORG_CHECK_LINUXDOC
10278
10279# XORG_CHECK_DOCBOOK
10280# -------------------
10281# Minimum version: 1.0.0
10282#
10283# Checks for the ability to build output formats from SGML DocBook source.
10284# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
10285# indicates whether the necessary tools and files are found and, if set,
10286# $(MAKE_XXX) blah.sgml will produce blah.xxx.
10287AC_DEFUN([XORG_CHECK_DOCBOOK],[
10288AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
10289
10290BUILDTXTDOC=no
10291BUILDPDFDOC=no
10292BUILDPSDOC=no
10293BUILDHTMLDOC=no
10294
10295AC_PATH_PROG(DOCBOOKPS, docbook2ps)
10296AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
10297AC_PATH_PROG(DOCBOOKHTML, docbook2html)
10298AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
10299
10300AC_MSG_CHECKING([whether to build text documentation])
10301if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
10302   test x$BUILD_TXTDOC != xno; then
10303	BUILDTXTDOC=yes
10304fi
10305AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
10306AC_MSG_RESULT([$BUILDTXTDOC])
10307
10308AC_MSG_CHECKING([whether to build PDF documentation])
10309if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
10310   test x$BUILD_PDFDOC != xno; then
10311	BUILDPDFDOC=yes
10312fi
10313AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
10314AC_MSG_RESULT([$BUILDPDFDOC])
10315
10316AC_MSG_CHECKING([whether to build PostScript documentation])
10317if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
10318   test x$BUILD_PSDOC != xno; then
10319	BUILDPSDOC=yes
10320fi
10321AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
10322AC_MSG_RESULT([$BUILDPSDOC])
10323
10324AC_MSG_CHECKING([whether to build HTML documentation])
10325if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
10326   test x$BUILD_HTMLDOC != xno; then
10327	BUILDHTMLDOC=yes
10328fi
10329AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
10330AC_MSG_RESULT([$BUILDHTMLDOC])
10331
10332MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
10333MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
10334MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
10335MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
10336
10337AC_SUBST(MAKE_TEXT)
10338AC_SUBST(MAKE_PS)
10339AC_SUBST(MAKE_PDF)
10340AC_SUBST(MAKE_HTML)
10341]) # XORG_CHECK_DOCBOOK
10342
10343# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
10344# ----------------
10345# Minimum version: 1.5.0
10346# Minimum version for optional DEFAULT argument: 1.11.0
10347#
10348# Documentation tools are not always available on all platforms and sometimes
10349# not at the appropriate level. This macro enables a module to test for the
10350# presence of the tool and obtain it's path in separate variables. Coupled with
10351# the --with-xmlto option, it allows maximum flexibilty in making decisions
10352# as whether or not to use the xmlto package. When DEFAULT is not specified,
10353# --with-xmlto assumes 'auto'.
10354#
10355# Interface to module:
10356# HAVE_XMLTO: 	used in makefiles to conditionally generate documentation
10357# XMLTO:	returns the path of the xmlto program found
10358#		returns the path set by the user in the environment
10359# --with-xmlto:	'yes' user instructs the module to use xmlto
10360#		'no' user instructs the module not to use xmlto
10361#
10362# Added in version 1.10.0
10363# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
10364#                  xmlto for text output requires either lynx, links, or w3m browsers
10365#
10366# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
10367#
10368AC_DEFUN([XORG_WITH_XMLTO],[
10369AC_ARG_VAR([XMLTO], [Path to xmlto command])
10370m4_define([_defopt], m4_default([$2], [auto]))
10371AC_ARG_WITH(xmlto,
10372	AS_HELP_STRING([--with-xmlto],
10373	   [Use xmlto to regenerate documentation (default: ]_defopt[)]),
10374	   [use_xmlto=$withval], [use_xmlto=]_defopt)
10375m4_undefine([_defopt])
10376
10377if test "x$use_xmlto" = x"auto"; then
10378   AC_PATH_PROG([XMLTO], [xmlto])
10379   if test "x$XMLTO" = "x"; then
10380        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
10381	have_xmlto=no
10382   else
10383        have_xmlto=yes
10384   fi
10385elif test "x$use_xmlto" = x"yes" ; then
10386   AC_PATH_PROG([XMLTO], [xmlto])
10387   if test "x$XMLTO" = "x"; then
10388        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
10389   fi
10390   have_xmlto=yes
10391elif test "x$use_xmlto" = x"no" ; then
10392   if test "x$XMLTO" != "x"; then
10393      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
10394   fi
10395   have_xmlto=no
10396else
10397   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
10398fi
10399
10400# Test for a minimum version of xmlto, if provided.
10401m4_ifval([$1],
10402[if test "$have_xmlto" = yes; then
10403    # scrape the xmlto version
10404    AC_MSG_CHECKING([the xmlto version])
10405    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
10406    AC_MSG_RESULT([$xmlto_version])
10407    AS_VERSION_COMPARE([$xmlto_version], [$1],
10408        [if test "x$use_xmlto" = xauto; then
10409            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
10410            have_xmlto=no
10411        else
10412            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
10413        fi])
10414fi])
10415
10416# Test for the ability of xmlto to generate a text target
10417have_xmlto_text=no
10418cat > conftest.xml << "EOF"
10419EOF
10420AS_IF([test "$have_xmlto" = yes],
10421      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
10422             [have_xmlto_text=yes],
10423             [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
10424rm -f conftest.xml
10425AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
10426AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
10427]) # XORG_WITH_XMLTO
10428
10429# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT])
10430# --------------------------------------------
10431# Minimum version: 1.12.0
10432# Minimum version for optional DEFAULT argument: 1.12.0
10433#
10434# XSLT (Extensible Stylesheet Language Transformations) is a declarative,
10435# XML-based language used for the transformation of XML documents.
10436# The xsltproc command line tool is for applying XSLT stylesheets to XML documents.
10437# It is used under the cover by xmlto to generate html files from DocBook/XML.
10438# The XSLT processor is often used as a standalone tool for transformations.
10439# It should not be assumed that this tool is used only to work with documnetation.
10440# When DEFAULT is not specified, --with-xsltproc assumes 'auto'.
10441#
10442# Interface to module:
10443# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation
10444# XSLTPROC:	 returns the path of the xsltproc program found
10445#		 returns the path set by the user in the environment
10446# --with-xsltproc: 'yes' user instructs the module to use xsltproc
10447#		  'no' user instructs the module not to use xsltproc
10448# have_xsltproc: returns yes if xsltproc found in PATH or no
10449#
10450# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path.
10451#
10452AC_DEFUN([XORG_WITH_XSLTPROC],[
10453AC_ARG_VAR([XSLTPROC], [Path to xsltproc command])
10454m4_define([_defopt], m4_default([$2], [auto]))
10455AC_ARG_WITH(xsltproc,
10456	AS_HELP_STRING([--with-xsltproc],
10457	   [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]),
10458	   [use_xsltproc=$withval], [use_xsltproc=]_defopt)
10459m4_undefine([_defopt])
10460
10461if test "x$use_xsltproc" = x"auto"; then
10462   AC_PATH_PROG([XSLTPROC], [xsltproc])
10463   if test "x$XSLTPROC" = "x"; then
10464        AC_MSG_WARN([xsltproc not found - cannot transform XML documents])
10465	have_xsltproc=no
10466   else
10467        have_xsltproc=yes
10468   fi
10469elif test "x$use_xsltproc" = x"yes" ; then
10470   AC_PATH_PROG([XSLTPROC], [xsltproc])
10471   if test "x$XSLTPROC" = "x"; then
10472        AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH])
10473   fi
10474   have_xsltproc=yes
10475elif test "x$use_xsltproc" = x"no" ; then
10476   if test "x$XSLTPROC" != "x"; then
10477      AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified])
10478   fi
10479   have_xsltproc=no
10480else
10481   AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no'])
10482fi
10483
10484# Checking for minimum version is not implemented
10485# but we want to keep the interface consistent with other commands
10486m4_ifval([$1],[AC_MSG_WARN(Checking for MIN-VERSION is not implemented.)])
10487
10488AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes])
10489]) # XORG_WITH_XSLTPROC
10490
10491
10492# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
10493# ----------------
10494# Minimum version: 1.5.0
10495# Minimum version for optional DEFAULT argument: 1.11.0
10496#
10497# Documentation tools are not always available on all platforms and sometimes
10498# not at the appropriate level. This macro enables a module to test for the
10499# presence of the tool and obtain it's path in separate variables. Coupled with
10500# the --with-asciidoc option, it allows maximum flexibilty in making decisions
10501# as whether or not to use the asciidoc package. When DEFAULT is not specified,
10502# --with-asciidoc assumes 'auto'.
10503#
10504# Interface to module:
10505# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
10506# ASCIIDOC:	 returns the path of the asciidoc program found
10507#		 returns the path set by the user in the environment
10508# --with-asciidoc: 'yes' user instructs the module to use asciidoc
10509#		  'no' user instructs the module not to use asciidoc
10510#
10511# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
10512#
10513AC_DEFUN([XORG_WITH_ASCIIDOC],[
10514AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
10515m4_define([_defopt], m4_default([$2], [auto]))
10516AC_ARG_WITH(asciidoc,
10517	AS_HELP_STRING([--with-asciidoc],
10518	   [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
10519	   [use_asciidoc=$withval], [use_asciidoc=]_defopt)
10520m4_undefine([_defopt])
10521
10522if test "x$use_asciidoc" = x"auto"; then
10523   AC_PATH_PROG([ASCIIDOC], [asciidoc])
10524   if test "x$ASCIIDOC" = "x"; then
10525        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
10526	have_asciidoc=no
10527   else
10528        have_asciidoc=yes
10529   fi
10530elif test "x$use_asciidoc" = x"yes" ; then
10531   AC_PATH_PROG([ASCIIDOC], [asciidoc])
10532   if test "x$ASCIIDOC" = "x"; then
10533        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
10534   fi
10535   have_asciidoc=yes
10536elif test "x$use_asciidoc" = x"no" ; then
10537   if test "x$ASCIIDOC" != "x"; then
10538      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
10539   fi
10540   have_asciidoc=no
10541else
10542   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
10543fi
10544m4_ifval([$1],
10545[if test "$have_asciidoc" = yes; then
10546    # scrape the asciidoc version
10547    AC_MSG_CHECKING([the asciidoc version])
10548    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
10549    AC_MSG_RESULT([$asciidoc_version])
10550    AS_VERSION_COMPARE([$asciidoc_version], [$1],
10551        [if test "x$use_asciidoc" = xauto; then
10552            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
10553            have_asciidoc=no
10554        else
10555            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
10556        fi])
10557fi])
10558AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
10559]) # XORG_WITH_ASCIIDOC
10560
10561# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
10562# --------------------------------
10563# Minimum version: 1.5.0
10564# Minimum version for optional DEFAULT argument: 1.11.0
10565#
10566# Documentation tools are not always available on all platforms and sometimes
10567# not at the appropriate level. This macro enables a module to test for the
10568# presence of the tool and obtain it's path in separate variables. Coupled with
10569# the --with-doxygen option, it allows maximum flexibilty in making decisions
10570# as whether or not to use the doxygen package. When DEFAULT is not specified,
10571# --with-doxygen assumes 'auto'.
10572#
10573# Interface to module:
10574# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
10575# DOXYGEN:	 returns the path of the doxygen program found
10576#		 returns the path set by the user in the environment
10577# --with-doxygen: 'yes' user instructs the module to use doxygen
10578#		  'no' user instructs the module not to use doxygen
10579#
10580# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
10581#
10582AC_DEFUN([XORG_WITH_DOXYGEN],[
10583AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
10584m4_define([_defopt], m4_default([$2], [auto]))
10585AC_ARG_WITH(doxygen,
10586	AS_HELP_STRING([--with-doxygen],
10587	   [Use doxygen to regenerate documentation (default: ]_defopt[)]),
10588	   [use_doxygen=$withval], [use_doxygen=]_defopt)
10589m4_undefine([_defopt])
10590
10591if test "x$use_doxygen" = x"auto"; then
10592   AC_PATH_PROG([DOXYGEN], [doxygen])
10593   if test "x$DOXYGEN" = "x"; then
10594        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
10595	have_doxygen=no
10596   else
10597        have_doxygen=yes
10598   fi
10599elif test "x$use_doxygen" = x"yes" ; then
10600   AC_PATH_PROG([DOXYGEN], [doxygen])
10601   if test "x$DOXYGEN" = "x"; then
10602        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
10603   fi
10604   have_doxygen=yes
10605elif test "x$use_doxygen" = x"no" ; then
10606   if test "x$DOXYGEN" != "x"; then
10607      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
10608   fi
10609   have_doxygen=no
10610else
10611   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
10612fi
10613m4_ifval([$1],
10614[if test "$have_doxygen" = yes; then
10615    # scrape the doxygen version
10616    AC_MSG_CHECKING([the doxygen version])
10617    doxygen_version=`$DOXYGEN --version 2>/dev/null`
10618    AC_MSG_RESULT([$doxygen_version])
10619    AS_VERSION_COMPARE([$doxygen_version], [$1],
10620        [if test "x$use_doxygen" = xauto; then
10621            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
10622            have_doxygen=no
10623        else
10624            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
10625        fi])
10626fi])
10627AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
10628]) # XORG_WITH_DOXYGEN
10629
10630# XORG_WITH_GROFF([DEFAULT])
10631# ----------------
10632# Minimum version: 1.6.0
10633# Minimum version for optional DEFAULT argument: 1.11.0
10634#
10635# Documentation tools are not always available on all platforms and sometimes
10636# not at the appropriate level. This macro enables a module to test for the
10637# presence of the tool and obtain it's path in separate variables. Coupled with
10638# the --with-groff option, it allows maximum flexibilty in making decisions
10639# as whether or not to use the groff package. When DEFAULT is not specified,
10640# --with-groff assumes 'auto'.
10641#
10642# Interface to module:
10643# HAVE_GROFF:	 used in makefiles to conditionally generate documentation
10644# HAVE_GROFF_MM: the memorandum macros (-mm) package
10645# HAVE_GROFF_MS: the -ms macros package
10646# GROFF:	 returns the path of the groff program found
10647#		 returns the path set by the user in the environment
10648# --with-groff:	 'yes' user instructs the module to use groff
10649#		 'no' user instructs the module not to use groff
10650#
10651# Added in version 1.9.0:
10652# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
10653#		   pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
10654#		   psselect from the psutils package.
10655#		   the ghostcript package. Refer to the grohtml man pages
10656#
10657# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
10658#
10659# OS and distros often splits groff in a basic and full package, the former
10660# having the groff program and the later having devices, fonts and macros
10661# Checking for the groff executable is not enough.
10662#
10663# If macros are missing, we cannot assume that groff is useless, so we don't
10664# unset HAVE_GROFF or GROFF env variables.
10665# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
10666#
10667AC_DEFUN([XORG_WITH_GROFF],[
10668AC_ARG_VAR([GROFF], [Path to groff command])
10669m4_define([_defopt], m4_default([$1], [auto]))
10670AC_ARG_WITH(groff,
10671	AS_HELP_STRING([--with-groff],
10672	   [Use groff to regenerate documentation (default: ]_defopt[)]),
10673	   [use_groff=$withval], [use_groff=]_defopt)
10674m4_undefine([_defopt])
10675
10676if test "x$use_groff" = x"auto"; then
10677   AC_PATH_PROG([GROFF], [groff])
10678   if test "x$GROFF" = "x"; then
10679        AC_MSG_WARN([groff not found - documentation targets will be skipped])
10680	have_groff=no
10681   else
10682        have_groff=yes
10683   fi
10684elif test "x$use_groff" = x"yes" ; then
10685   AC_PATH_PROG([GROFF], [groff])
10686   if test "x$GROFF" = "x"; then
10687        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
10688   fi
10689   have_groff=yes
10690elif test "x$use_groff" = x"no" ; then
10691   if test "x$GROFF" != "x"; then
10692      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
10693   fi
10694   have_groff=no
10695else
10696   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
10697fi
10698
10699# We have groff, test for the presence of the macro packages
10700if test "x$have_groff" = x"yes"; then
10701    AC_MSG_CHECKING([for ${GROFF} -ms macros])
10702    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
10703        groff_ms_works=yes
10704    else
10705        groff_ms_works=no
10706    fi
10707    AC_MSG_RESULT([$groff_ms_works])
10708    AC_MSG_CHECKING([for ${GROFF} -mm macros])
10709    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
10710        groff_mm_works=yes
10711    else
10712        groff_mm_works=no
10713    fi
10714    AC_MSG_RESULT([$groff_mm_works])
10715fi
10716
10717# We have groff, test for HTML dependencies, one command per package
10718if test "x$have_groff" = x"yes"; then
10719   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
10720   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
10721   AC_PATH_PROG(PSSELECT_PATH, [psselect])
10722   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
10723      have_groff_html=yes
10724   else
10725      have_groff_html=no
10726      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
10727   fi
10728fi
10729
10730# Set Automake conditionals for Makefiles
10731AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
10732AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
10733AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
10734AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
10735]) # XORG_WITH_GROFF
10736
10737# XORG_WITH_FOP([DEFAULT])
10738# ----------------
10739# Minimum version: 1.6.0
10740# Minimum version for optional DEFAULT argument: 1.11.0
10741#
10742# Documentation tools are not always available on all platforms and sometimes
10743# not at the appropriate level. This macro enables a module to test for the
10744# presence of the tool and obtain it's path in separate variables. Coupled with
10745# the --with-fop option, it allows maximum flexibilty in making decisions
10746# as whether or not to use the fop package. When DEFAULT is not specified,
10747# --with-fop assumes 'auto'.
10748#
10749# Interface to module:
10750# HAVE_FOP: 	used in makefiles to conditionally generate documentation
10751# FOP:	 	returns the path of the fop program found
10752#		returns the path set by the user in the environment
10753# --with-fop: 	'yes' user instructs the module to use fop
10754#		'no' user instructs the module not to use fop
10755#
10756# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
10757#
10758AC_DEFUN([XORG_WITH_FOP],[
10759AC_ARG_VAR([FOP], [Path to fop command])
10760m4_define([_defopt], m4_default([$1], [auto]))
10761AC_ARG_WITH(fop,
10762	AS_HELP_STRING([--with-fop],
10763	   [Use fop to regenerate documentation (default: ]_defopt[)]),
10764	   [use_fop=$withval], [use_fop=]_defopt)
10765m4_undefine([_defopt])
10766
10767if test "x$use_fop" = x"auto"; then
10768   AC_PATH_PROG([FOP], [fop])
10769   if test "x$FOP" = "x"; then
10770        AC_MSG_WARN([fop not found - documentation targets will be skipped])
10771	have_fop=no
10772   else
10773        have_fop=yes
10774   fi
10775elif test "x$use_fop" = x"yes" ; then
10776   AC_PATH_PROG([FOP], [fop])
10777   if test "x$FOP" = "x"; then
10778        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
10779   fi
10780   have_fop=yes
10781elif test "x$use_fop" = x"no" ; then
10782   if test "x$FOP" != "x"; then
10783      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
10784   fi
10785   have_fop=no
10786else
10787   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
10788fi
10789AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
10790]) # XORG_WITH_FOP
10791
10792# XORG_WITH_PS2PDF([DEFAULT])
10793# ----------------
10794# Minimum version: 1.6.0
10795# Minimum version for optional DEFAULT argument: 1.11.0
10796#
10797# Documentation tools are not always available on all platforms and sometimes
10798# not at the appropriate level. This macro enables a module to test for the
10799# presence of the tool and obtain it's path in separate variables. Coupled with
10800# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
10801# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
10802# --with-ps2pdf assumes 'auto'.
10803#
10804# Interface to module:
10805# HAVE_PS2PDF: 	used in makefiles to conditionally generate documentation
10806# PS2PDF:	returns the path of the ps2pdf program found
10807#		returns the path set by the user in the environment
10808# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
10809#		 'no' user instructs the module not to use ps2pdf
10810#
10811# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
10812#
10813AC_DEFUN([XORG_WITH_PS2PDF],[
10814AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
10815m4_define([_defopt], m4_default([$1], [auto]))
10816AC_ARG_WITH(ps2pdf,
10817	AS_HELP_STRING([--with-ps2pdf],
10818	   [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
10819	   [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
10820m4_undefine([_defopt])
10821
10822if test "x$use_ps2pdf" = x"auto"; then
10823   AC_PATH_PROG([PS2PDF], [ps2pdf])
10824   if test "x$PS2PDF" = "x"; then
10825        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
10826	have_ps2pdf=no
10827   else
10828        have_ps2pdf=yes
10829   fi
10830elif test "x$use_ps2pdf" = x"yes" ; then
10831   AC_PATH_PROG([PS2PDF], [ps2pdf])
10832   if test "x$PS2PDF" = "x"; then
10833        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
10834   fi
10835   have_ps2pdf=yes
10836elif test "x$use_ps2pdf" = x"no" ; then
10837   if test "x$PS2PDF" != "x"; then
10838      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
10839   fi
10840   have_ps2pdf=no
10841else
10842   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
10843fi
10844AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
10845]) # XORG_WITH_PS2PDF
10846
10847# XORG_ENABLE_DOCS (enable_docs=yes)
10848# ----------------
10849# Minimum version: 1.6.0
10850#
10851# Documentation tools are not always available on all platforms and sometimes
10852# not at the appropriate level. This macro enables a builder to skip all
10853# documentation targets except traditional man pages.
10854# Combined with the specific tool checking macros XORG_WITH_*, it provides
10855# maximum flexibilty in controlling documentation building.
10856# Refer to:
10857# XORG_WITH_XMLTO         --with-xmlto
10858# XORG_WITH_ASCIIDOC      --with-asciidoc
10859# XORG_WITH_DOXYGEN       --with-doxygen
10860# XORG_WITH_FOP           --with-fop
10861# XORG_WITH_GROFF         --with-groff
10862# XORG_WITH_PS2PDF        --with-ps2pdf
10863#
10864# Interface to module:
10865# ENABLE_DOCS: 	  used in makefiles to conditionally generate documentation
10866# --enable-docs: 'yes' user instructs the module to generate docs
10867#		 'no' user instructs the module not to generate docs
10868# parm1:	specify the default value, yes or no.
10869#
10870AC_DEFUN([XORG_ENABLE_DOCS],[
10871m4_define([docs_default], m4_default([$1], [yes]))
10872AC_ARG_ENABLE(docs,
10873	AS_HELP_STRING([--enable-docs],
10874	   [Enable building the documentation (default: ]docs_default[)]),
10875	   [build_docs=$enableval], [build_docs=]docs_default)
10876m4_undefine([docs_default])
10877AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
10878AC_MSG_CHECKING([whether to build documentation])
10879AC_MSG_RESULT([$build_docs])
10880]) # XORG_ENABLE_DOCS
10881
10882# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
10883# ----------------
10884# Minimum version: 1.6.0
10885#
10886# This macro enables a builder to skip all developer documentation.
10887# Combined with the specific tool checking macros XORG_WITH_*, it provides
10888# maximum flexibilty in controlling documentation building.
10889# Refer to:
10890# XORG_WITH_XMLTO         --with-xmlto
10891# XORG_WITH_ASCIIDOC      --with-asciidoc
10892# XORG_WITH_DOXYGEN       --with-doxygen
10893# XORG_WITH_FOP           --with-fop
10894# XORG_WITH_GROFF         --with-groff
10895# XORG_WITH_PS2PDF        --with-ps2pdf
10896#
10897# Interface to module:
10898# ENABLE_DEVEL_DOCS:	used in makefiles to conditionally generate developer docs
10899# --enable-devel-docs:	'yes' user instructs the module to generate developer docs
10900#			'no' user instructs the module not to generate developer docs
10901# parm1:		specify the default value, yes or no.
10902#
10903AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
10904m4_define([devel_default], m4_default([$1], [yes]))
10905AC_ARG_ENABLE(devel-docs,
10906	AS_HELP_STRING([--enable-devel-docs],
10907	   [Enable building the developer documentation (default: ]devel_default[)]),
10908	   [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
10909m4_undefine([devel_default])
10910AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
10911AC_MSG_CHECKING([whether to build developer documentation])
10912AC_MSG_RESULT([$build_devel_docs])
10913]) # XORG_ENABLE_DEVEL_DOCS
10914
10915# XORG_ENABLE_SPECS (enable_specs=yes)
10916# ----------------
10917# Minimum version: 1.6.0
10918#
10919# This macro enables a builder to skip all functional specification targets.
10920# Combined with the specific tool checking macros XORG_WITH_*, it provides
10921# maximum flexibilty in controlling documentation building.
10922# Refer to:
10923# XORG_WITH_XMLTO         --with-xmlto
10924# XORG_WITH_ASCIIDOC      --with-asciidoc
10925# XORG_WITH_DOXYGEN       --with-doxygen
10926# XORG_WITH_FOP           --with-fop
10927# XORG_WITH_GROFF         --with-groff
10928# XORG_WITH_PS2PDF        --with-ps2pdf
10929#
10930# Interface to module:
10931# ENABLE_SPECS:		used in makefiles to conditionally generate specs
10932# --enable-specs:	'yes' user instructs the module to generate specs
10933#			'no' user instructs the module not to generate specs
10934# parm1:		specify the default value, yes or no.
10935#
10936AC_DEFUN([XORG_ENABLE_SPECS],[
10937m4_define([spec_default], m4_default([$1], [yes]))
10938AC_ARG_ENABLE(specs,
10939	AS_HELP_STRING([--enable-specs],
10940	   [Enable building the specs (default: ]spec_default[)]),
10941	   [build_specs=$enableval], [build_specs=]spec_default)
10942m4_undefine([spec_default])
10943AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
10944AC_MSG_CHECKING([whether to build functional specifications])
10945AC_MSG_RESULT([$build_specs])
10946]) # XORG_ENABLE_SPECS
10947
10948# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto)
10949# ----------------------------------------------
10950# Minimum version: 1.13.0
10951#
10952# This macro enables a builder to enable/disable unit testing
10953# It makes no assumption about the test cases implementation
10954# Test cases may or may not use Automake "Support for test suites"
10955# They may or may not use the software utility library GLib
10956#
10957# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL
10958# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib.
10959# The variable enable_unit_tests is used by other macros in this file.
10960#
10961# Interface to module:
10962# ENABLE_UNIT_TESTS:	used in makefiles to conditionally build tests
10963# enable_unit_tests:    used in configure.ac for additional configuration
10964# --enable-unit-tests:	'yes' user instructs the module to build tests
10965#			'no' user instructs the module not to build tests
10966# parm1:		specify the default value, yes or no.
10967#
10968AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[
10969AC_BEFORE([$0], [XORG_WITH_GLIB])
10970AC_BEFORE([$0], [XORG_LD_WRAP])
10971m4_define([_defopt], m4_default([$1], [auto]))
10972AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests],
10973	[Enable building unit test cases (default: ]_defopt[)]),
10974	[enable_unit_tests=$enableval], [enable_unit_tests=]_defopt)
10975m4_undefine([_defopt])
10976AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno])
10977AC_MSG_CHECKING([whether to build unit test cases])
10978AC_MSG_RESULT([$enable_unit_tests])
10979]) # XORG_ENABLE_UNIT_TESTS
10980
10981# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
10982# ----------------------------------------
10983# Minimum version: 1.13.0
10984#
10985# GLib is a library which provides advanced data structures and functions.
10986# This macro enables a module to test for the presence of Glib.
10987#
10988# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
10989# Otherwise the value of $enable_unit_tests is blank.
10990#
10991# Interface to module:
10992# HAVE_GLIB: used in makefiles to conditionally build targets
10993# with_glib: used in configure.ac to know if GLib has been found
10994# --with-glib:	'yes' user instructs the module to use glib
10995#		'no' user instructs the module not to use glib
10996#
10997AC_DEFUN([XORG_WITH_GLIB],[
10998AC_REQUIRE([PKG_PROG_PKG_CONFIG])
10999m4_define([_defopt], m4_default([$2], [auto]))
11000AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib],
11001	[Use GLib library for unit testing (default: ]_defopt[)]),
11002	[with_glib=$withval], [with_glib=]_defopt)
11003m4_undefine([_defopt])
11004
11005have_glib=no
11006# Do not probe GLib if user explicitly disabled unit testing
11007if test "x$enable_unit_tests" != x"no"; then
11008  # Do not probe GLib if user explicitly disabled it
11009  if test "x$with_glib" != x"no"; then
11010    m4_ifval(
11011      [$1],
11012      [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])],
11013      [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])]
11014    )
11015  fi
11016fi
11017
11018# Not having GLib when unit testing has been explicitly requested is an error
11019if test "x$enable_unit_tests" = x"yes"; then
11020  if test "x$have_glib" = x"no"; then
11021    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
11022  fi
11023fi
11024
11025# Having unit testing disabled when GLib has been explicitly requested is an error
11026if test "x$enable_unit_tests" = x"no"; then
11027  if test "x$with_glib" = x"yes"; then
11028    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
11029  fi
11030fi
11031
11032# Not having GLib when it has been explicitly requested is an error
11033if test "x$with_glib" = x"yes"; then
11034  if test "x$have_glib" = x"no"; then
11035    AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found])
11036  fi
11037fi
11038
11039AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes])
11040]) # XORG_WITH_GLIB
11041
11042# XORG_LD_WRAP
11043# ------------
11044# Minimum version: 1.13.0
11045#
11046# Check if linker supports -wrap, passed via compiler flags
11047#
11048# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing.
11049# Otherwise the value of $enable_unit_tests is blank.
11050#
11051AC_DEFUN([XORG_LD_WRAP],[
11052XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no])
11053# Not having ld wrap when unit testing has been explicitly requested is an error
11054if test "x$enable_unit_tests" = x"yes"; then
11055  if test "x$have_ld_wrap" = x"no"; then
11056    AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available])
11057  fi
11058fi
11059AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes])
11060#
11061]) # XORG_LD_WRAP
11062
11063# XORG_CHECK_LINKER_FLAGS
11064# -----------------------
11065# SYNOPSIS
11066#
11067#   XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE])
11068#
11069# DESCRIPTION
11070#
11071#   Check whether the given linker FLAGS work with the current language's
11072#   linker, or whether they give an error.
11073#
11074#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
11075#   success/failure.
11076#
11077#   NOTE: Based on AX_CHECK_COMPILER_FLAGS.
11078#
11079# LICENSE
11080#
11081#   Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org>
11082#   Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
11083#   Copyright (c) 2009 Matteo Frigo
11084#
11085#   This program is free software: you can redistribute it and/or modify it
11086#   under the terms of the GNU General Public License as published by the
11087#   Free Software Foundation, either version 3 of the License, or (at your
11088#   option) any later version.
11089#
11090#   This program is distributed in the hope that it will be useful, but
11091#   WITHOUT ANY WARRANTY; without even the implied warranty of
11092#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
11093#   Public License for more details.
11094#
11095#   You should have received a copy of the GNU General Public License along
11096#   with this program. If not, see <http://www.gnu.org/licenses/>.
11097#
11098#   As a special exception, the respective Autoconf Macro's copyright owner
11099#   gives unlimited permission to copy, distribute and modify the configure
11100#   scripts that are the output of Autoconf when processing the Macro. You
11101#   need not follow the terms of the GNU General Public License when using
11102#   or distributing such scripts, even though portions of the text of the
11103#   Macro appear in them. The GNU General Public License (GPL) does govern
11104#   all other use of the material that constitutes the Autoconf Macro.
11105#
11106#   This special exception to the GPL applies to versions of the Autoconf
11107#   Macro released by the Autoconf Archive. When you make and distribute a
11108#   modified version of the Autoconf Macro, you may extend this special
11109#   exception to the GPL to apply to your modified version as well.#
11110AC_DEFUN([XORG_CHECK_LINKER_FLAGS],
11111[AC_MSG_CHECKING([whether the linker accepts $1])
11112dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
11113AS_LITERAL_IF([$1],
11114  [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [
11115      ax_save_FLAGS=$LDFLAGS
11116      LDFLAGS="$1"
11117      AC_LINK_IFELSE([AC_LANG_PROGRAM()],
11118        AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
11119        AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
11120      LDFLAGS=$ax_save_FLAGS])],
11121  [ax_save_FLAGS=$LDFLAGS
11122   LDFLAGS="$1"
11123   AC_LINK_IFELSE([AC_LANG_PROGRAM()],
11124     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
11125     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
11126   LDFLAGS=$ax_save_FLAGS])
11127eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1])
11128AC_MSG_RESULT($xorg_check_linker_flags)
11129if test "x$xorg_check_linker_flags" = xyes; then
11130	m4_default([$2], :)
11131else
11132	m4_default([$3], :)
11133fi
11134]) # XORG_CHECK_LINKER_FLAGS
11135
11136# XORG_CHECK_MALLOC_ZERO
11137# ----------------------
11138# Minimum version: 1.0.0
11139#
11140# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
11141# malloc(0) returns NULL.  Packages should add one of these cflags to
11142# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
11143AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
11144AC_ARG_ENABLE(malloc0returnsnull,
11145	AS_HELP_STRING([--enable-malloc0returnsnull],
11146		       [malloc(0) returns NULL (default: auto)]),
11147	[MALLOC_ZERO_RETURNS_NULL=$enableval],
11148	[MALLOC_ZERO_RETURNS_NULL=auto])
11149
11150AC_MSG_CHECKING([whether malloc(0) returns NULL])
11151if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
11152	AC_RUN_IFELSE([AC_LANG_PROGRAM([
11153#include <stdlib.h>
11154],[
11155    char *m0, *r0, *c0, *p;
11156    m0 = malloc(0);
11157    p = malloc(10);
11158    r0 = realloc(p,0);
11159    c0 = calloc(0,10);
11160    exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
11161])],
11162		[MALLOC_ZERO_RETURNS_NULL=yes],
11163		[MALLOC_ZERO_RETURNS_NULL=no],
11164		[MALLOC_ZERO_RETURNS_NULL=yes])
11165fi
11166AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
11167
11168if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
11169	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
11170	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
11171	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
11172else
11173	MALLOC_ZERO_CFLAGS=""
11174	XMALLOC_ZERO_CFLAGS=""
11175	XTMALLOC_ZERO_CFLAGS=""
11176fi
11177
11178AC_SUBST([MALLOC_ZERO_CFLAGS])
11179AC_SUBST([XMALLOC_ZERO_CFLAGS])
11180AC_SUBST([XTMALLOC_ZERO_CFLAGS])
11181]) # XORG_CHECK_MALLOC_ZERO
11182
11183# XORG_WITH_LINT()
11184# ----------------
11185# Minimum version: 1.1.0
11186#
11187# This macro enables the use of a tool that flags some suspicious and
11188# non-portable constructs (likely to be bugs) in C language source code.
11189# It will attempt to locate the tool and use appropriate options.
11190# There are various lint type tools on different platforms.
11191#
11192# Interface to module:
11193# LINT:		returns the path to the tool found on the platform
11194#		or the value set to LINT on the configure cmd line
11195#		also an Automake conditional
11196# LINT_FLAGS:	an Automake variable with appropriate flags
11197#
11198# --with-lint:	'yes' user instructs the module to use lint
11199#		'no' user instructs the module not to use lint (default)
11200#
11201# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
11202# If the user sets the value of LINT_FLAGS, they are used verbatim.
11203#
11204AC_DEFUN([XORG_WITH_LINT],[
11205
11206AC_ARG_VAR([LINT], [Path to a lint-style command])
11207AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
11208AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
11209		[Use a lint-style source code checker (default: disabled)])],
11210		[use_lint=$withval], [use_lint=no])
11211
11212# Obtain platform specific info like program name and options
11213# The lint program on FreeBSD and NetBSD is different from the one on Solaris
11214case $host_os in
11215  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
11216	lint_name=splint
11217	lint_options="-badflag"
11218	;;
11219  *freebsd* | *netbsd*)
11220	lint_name=lint
11221	lint_options="-u -b"
11222	;;
11223  *solaris*)
11224	lint_name=lint
11225	lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
11226	;;
11227esac
11228
11229# Test for the presence of the program (either guessed by the code or spelled out by the user)
11230if test "x$use_lint" = x"yes" ; then
11231   AC_PATH_PROG([LINT], [$lint_name])
11232   if test "x$LINT" = "x"; then
11233        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
11234   fi
11235elif test "x$use_lint" = x"no" ; then
11236   if test "x$LINT" != "x"; then
11237      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
11238   fi
11239else
11240   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
11241fi
11242
11243# User supplied flags override default flags
11244if test "x$LINT_FLAGS" != "x"; then
11245   lint_options=$LINT_FLAGS
11246fi
11247
11248AC_SUBST([LINT_FLAGS],[$lint_options])
11249AM_CONDITIONAL(LINT, [test "x$LINT" != x])
11250
11251]) # XORG_WITH_LINT
11252
11253# XORG_LINT_LIBRARY(LIBNAME)
11254# --------------------------
11255# Minimum version: 1.1.0
11256#
11257# Sets up flags for building lint libraries for checking programs that call
11258# functions in the library.
11259#
11260# Interface to module:
11261# LINTLIB		- Automake variable with the name of lint library file to make
11262# MAKE_LINT_LIB		- Automake conditional
11263#
11264# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
11265#			  - 'no' user instructs the module not to create a lint library (default)
11266
11267AC_DEFUN([XORG_LINT_LIBRARY],[
11268AC_REQUIRE([XORG_WITH_LINT])
11269AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
11270	[Create lint library (default: disabled)])],
11271	[make_lint_lib=$enableval], [make_lint_lib=no])
11272
11273if test "x$make_lint_lib" = x"yes" ; then
11274   LINTLIB=llib-l$1.ln
11275   if test "x$LINT" = "x"; then
11276        AC_MSG_ERROR([Cannot make lint library without --with-lint])
11277   fi
11278elif test "x$make_lint_lib" != x"no" ; then
11279   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
11280fi
11281
11282AC_SUBST(LINTLIB)
11283AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
11284
11285]) # XORG_LINT_LIBRARY
11286
11287# XORG_COMPILER_BRAND
11288# -------------------
11289# Minimum version: 1.14.0
11290#
11291# Checks for various brands of compilers and sets flags as appropriate:
11292#   GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes"
11293#   clang compiler - sets CLANGCC to "yes"
11294#   Intel compiler - sets INTELCC to "yes"
11295#   Sun/Oracle Solaris Studio cc - sets SUNCC to "yes"
11296#
11297AC_DEFUN([XORG_COMPILER_BRAND], [
11298AC_REQUIRE([AC_PROG_CC_C99])
11299AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"])
11300AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
11301AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
11302]) # XORG_COMPILER_BRAND
11303
11304# XORG_CWARNFLAGS
11305# ---------------
11306# Minimum version: 1.2.0
11307#
11308# Defines CWARNFLAGS to enable C compiler warnings.
11309#
11310AC_DEFUN([XORG_CWARNFLAGS], [
11311AC_REQUIRE([AC_PROG_CC_C99])
11312AC_REQUIRE([XORG_COMPILER_BRAND])
11313if  test "x$GCC" = xyes ; then
11314    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
11315-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
11316-Wbad-function-cast -Wformat=2"
11317    case `$CC -dumpversion` in
11318    3.4.* | 4.*)
11319	CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
11320	;;
11321    esac
11322else
11323    if test "x$SUNCC" = "xyes"; then
11324	CWARNFLAGS="-v"
11325    fi
11326fi
11327AC_SUBST(CWARNFLAGS)
11328]) # XORG_CWARNFLAGS
11329
11330# XORG_STRICT_OPTION
11331# -----------------------
11332# Minimum version: 1.3.0
11333#
11334# Add configure option to enable strict compilation flags, such as treating
11335# warnings as fatal errors.
11336# If --enable-strict-compilation is passed to configure, adds strict flags to
11337# $CWARNFLAGS.
11338#
11339# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or
11340# when strict compilation is unconditionally desired.
11341AC_DEFUN([XORG_STRICT_OPTION], [
11342# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
11343AC_REQUIRE([AC_PROG_CC_C99])
11344AC_REQUIRE([XORG_COMPILER_BRAND])
11345AC_REQUIRE([XORG_CWARNFLAGS])
11346
11347AC_ARG_ENABLE(strict-compilation,
11348			  AS_HELP_STRING([--enable-strict-compilation],
11349			  [Enable all warnings from compiler and make them errors (default: disabled)]),
11350			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
11351if test "x$GCC" = xyes ; then
11352    STRICT_CFLAGS="-pedantic -Werror"
11353    # Add -Werror=attributes if supported (gcc 4.2 & later)
11354    AC_MSG_CHECKING([if $CC supports -Werror=attributes])
11355    save_CFLAGS="$CFLAGS"
11356    CFLAGS="$CFLAGS $STRICT_CFLAGS -Werror=attributes"
11357    AC_COMPILE_IFELSE([AC_LANG_SOURCE([return 0;])],
11358		      [STRICT_CFLAGS="$STRICT_CFLAGS -Werror=attributes"
11359		       AC_MSG_RESULT([yes])],
11360		      [AC_MSG_RESULT([no])])
11361    CFLAGS="$save_CFLAGS"
11362elif test "x$SUNCC" = "xyes"; then
11363    STRICT_CFLAGS="-errwarn"
11364elif test "x$INTELCC" = "xyes"; then
11365    STRICT_CFLAGS="-Werror"
11366fi
11367if test "x$STRICT_COMPILE" = "xyes"; then
11368    CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
11369fi
11370AC_SUBST([STRICT_CFLAGS])
11371AC_SUBST([CWARNFLAGS])
11372]) # XORG_STRICT_OPTION
11373
11374# XORG_DEFAULT_OPTIONS
11375# --------------------
11376# Minimum version: 1.3.0
11377#
11378# Defines default options for X.Org modules.
11379#
11380AC_DEFUN([XORG_DEFAULT_OPTIONS], [
11381AC_REQUIRE([AC_PROG_INSTALL])
11382XORG_CWARNFLAGS
11383XORG_STRICT_OPTION
11384XORG_RELEASE_VERSION
11385XORG_CHANGELOG
11386XORG_INSTALL
11387XORG_MANPAGE_SECTIONS
11388m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
11389    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
11390]) # XORG_DEFAULT_OPTIONS
11391
11392# XORG_INSTALL()
11393# ----------------
11394# Minimum version: 1.4.0
11395#
11396# Defines the variable INSTALL_CMD as the command to copy
11397# INSTALL from $prefix/share/util-macros.
11398#
11399AC_DEFUN([XORG_INSTALL], [
11400AC_REQUIRE([PKG_PROG_PKG_CONFIG])
11401macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
11402INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
11403mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
11404|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
11405echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
11406AC_SUBST([INSTALL_CMD])
11407]) # XORG_INSTALL
11408dnl Copyright 2005 Red Hat, Inc
11409dnl
11410dnl Permission to use, copy, modify, distribute, and sell this software and its
11411dnl documentation for any purpose is hereby granted without fee, provided that
11412dnl the above copyright notice appear in all copies and that both that
11413dnl copyright notice and this permission notice appear in supporting
11414dnl documentation.
11415dnl
11416dnl The above copyright notice and this permission notice shall be included
11417dnl in all copies or substantial portions of the Software.
11418dnl
11419dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
11420dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
11421dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11422dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
11423dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
11424dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
11425dnl OTHER DEALINGS IN THE SOFTWARE.
11426dnl
11427dnl Except as contained in this notice, the name of the copyright holders shall
11428dnl not be used in advertising or otherwise to promote the sale, use or
11429dnl other dealings in this Software without prior written authorization
11430dnl from the copyright holders.
11431dnl
11432
11433# XORG_RELEASE_VERSION
11434# --------------------
11435# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
11436 
11437AC_DEFUN([XORG_RELEASE_VERSION],[
11438	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
11439		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
11440		[Major version of this package])
11441	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
11442	if test "x$PVM" = "x"; then
11443		PVM="0"
11444	fi
11445	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
11446		[$PVM],
11447		[Minor version of this package])
11448	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
11449	if test "x$PVP" = "x"; then
11450		PVP="0"
11451	fi
11452	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
11453		[$PVP],
11454		[Patch version of this package])
11455])
11456
11457# XORG_CHANGELOG()
11458# ----------------
11459# Minimum version: 1.2.0
11460#
11461# Defines the variable CHANGELOG_CMD as the command to generate
11462# ChangeLog from git.
11463#
11464#
11465AC_DEFUN([XORG_CHANGELOG], [
11466CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
11467mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
11468|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
11469echo 'git directory not found: installing possibly empty changelog.' >&2)"
11470AC_SUBST([CHANGELOG_CMD])
11471]) # XORG_CHANGELOG
11472
11473dnl
11474dnl Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
11475dnl
11476dnl Permission is hereby granted, free of charge, to any person obtaining a
11477dnl copy of this software and associated documentation files (the "Software"),
11478dnl to deal in the Software without restriction, including without limitation
11479dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
11480dnl and/or sell copies of the Software, and to permit persons to whom the
11481dnl Software is furnished to do so, subject to the following conditions:
11482dnl
11483dnl The above copyright notice and this permission notice (including the next
11484dnl paragraph) shall be included in all copies or substantial portions of the
11485dnl Software.
11486dnl
11487dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11488dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
11489dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
11490dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
11491dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
11492dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
11493dnl DEALINGS IN THE SOFTWARE.
11494dnl
11495
11496# XTRANS_TCP_FLAGS()
11497# ------------------
11498# Find needed libraries for TCP sockets, and check for IPv6 support
11499AC_DEFUN([XTRANS_TCP_FLAGS],[
11500 # SVR4 hides these in libraries other than libc
11501 AC_SEARCH_LIBS(socket, [socket])
11502 AC_SEARCH_LIBS(gethostbyname, [nsl])
11503 if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then
11504   AC_HAVE_LIBRARY([ws2_32])
11505 fi
11506
11507 # Needs to come after above checks for libsocket & libnsl for SVR4 systems
11508 AC_ARG_ENABLE(ipv6, 
11509	AC_HELP_STRING([--enable-ipv6],[Enable IPv6 support]),
11510	[IPV6CONN=$enableval], 
11511	[AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])])
11512 AC_MSG_CHECKING([if IPv6 support should be built])
11513 if test "$IPV6CONN" = "yes"; then
11514	AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections])
11515 fi
11516 AC_MSG_RESULT($IPV6CONN)
11517
11518 # 4.3BSD-Reno added a new member to struct sockaddr_in
11519 AC_CHECK_MEMBER([struct sockaddr_in.sin_len], 
11520	AC_DEFINE([BSD44SOCKETS],1,
11521 	    [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [
11522#include <sys/types.h>
11523#include <sys/socket.h>
11524#include <netinet/in.h>
11525 ])
11526
11527 # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc.
11528 AC_CHECK_TYPES([socklen_t], [], [], [
11529AC_INCLUDES_DEFAULT
11530#include <sys/socket.h>])
11531 
11532]) # XTRANS_TCP_FLAGS
11533
11534# XTRANS_CONNECTION_FLAGS()
11535# -------------------------
11536# Standard checks for which Xtrans transports to use by the Xorg packages
11537# that use Xtrans functions
11538AC_DEFUN([XTRANS_CONNECTION_FLAGS],[
11539 AC_REQUIRE([AC_CANONICAL_HOST])
11540 AC_REQUIRE([AC_TYPE_SIGNAL])
11541 [case $host_os in
11542	mingw*)	unixdef="no"   ;;
11543	*)	unixdef="yes"  ;;
11544 esac]
11545 AC_ARG_ENABLE(unix-transport,
11546	AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]),
11547	[UNIXCONN=$enableval], [UNIXCONN=$unixdef])
11548 AC_MSG_CHECKING([if Xtrans should support UNIX socket connections])
11549 if test "$UNIXCONN" = "yes"; then
11550	AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections])
11551 fi
11552 AC_MSG_RESULT($UNIXCONN)
11553 AC_ARG_ENABLE(tcp-transport, 
11554	AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]),
11555	[TCPCONN=$enableval], [TCPCONN=yes])
11556 AC_MSG_CHECKING([if Xtrans should support TCP socket connections])
11557 AC_MSG_RESULT($TCPCONN)
11558 if test "$TCPCONN" = "yes"; then
11559	AC_DEFINE(TCPCONN,1,[Support TCP socket connections])
11560	XTRANS_TCP_FLAGS
11561 fi
11562 [case $host_os in
11563	solaris*|sco*|sysv4*)	localdef="yes" ;;
11564	*)			localdef="no"  ;;
11565 esac]
11566 AC_ARG_ENABLE(local-transport,
11567	AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]),
11568	[LOCALCONN=$enableval], [LOCALCONN=$localdef])
11569 AC_MSG_CHECKING([if Xtrans should support os-specific local connections])
11570 AC_MSG_RESULT($LOCALCONN)
11571 if test "$LOCALCONN" = "yes"; then
11572	AC_DEFINE(LOCALCONN,1,[Support os-specific local connections])
11573 fi
11574 
11575]) # XTRANS_CONNECTION_FLAGS
11576
11577
11578# XTRANS_SECURE_RPC_FLAGS()
11579# -------------------------
11580# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS
11581# so that any necessary networking libraries are already found
11582AC_DEFUN([XTRANS_SECURE_RPC_FLAGS],
11583[AC_REQUIRE([XTRANS_TCP_FLAGS])
11584 AC_ARG_ENABLE(secure-rpc, 
11585	AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]),
11586        [SECURE_RPC=$enableval], [SECURE_RPC="try"])
11587
11588 if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then
11589	FOUND_SECURE_RPC="no"
11590	AC_CHECK_FUNCS([authdes_seccreate authdes_create],
11591			[FOUND_SECURE_RPC="yes"])
11592	if test "x$FOUND_SECURE_RPC" = "xno" ; then
11593		if test "x$SECURE_RPC" = "xyes" ; then
11594	AC_MSG_ERROR([Secure RPC requested, but required functions not found])
11595		fi	
11596		SECURE_RPC="no"
11597	else
11598		dnl FreeBSD keeps getsecretkey in librpcsvc
11599		AC_SEARCH_LIBS(getsecretkey, [rpcsvc])
11600		SECURE_RPC="yes"
11601	fi
11602 fi
11603 AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported])
11604 if test "x$SECURE_RPC" = "xyes" ; then
11605	AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients])
11606 fi
11607 AC_MSG_RESULT($SECURE_RPC)
11608]) # XTRANS_SECURE_RPC_FLAGS
11609
11610
11611