aclocal.m4 revision 549e21da
1# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
2
3# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12# PARTICULAR PURPOSE.
13
14m4_ifndef([AC_AUTOCONF_VERSION],
15  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
17[m4_warning([this file was generated for autoconf 2.68.
18You have another version of autoconf.  It may work, but is not guaranteed to.
19If you have problems, you may need to regenerate the build system entirely.
20To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
22# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
23#
24# This file is free software; the Free Software Foundation
25# gives unlimited permission to copy and/or distribute it,
26# with or without modifications, as long as this notice is preserved.
27
28# AM_AUTOMAKE_VERSION(VERSION)
29# ----------------------------
30# Automake X.Y traces this macro to ensure aclocal.m4 has been
31# generated from the m4 files accompanying Automake X.Y.
32# (This private macro should not be called outside this file.)
33AC_DEFUN([AM_AUTOMAKE_VERSION],
34[am__api_version='1.11'
35dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
36dnl require some minimum version.  Point them to the right macro.
37m4_if([$1], [1.11.1], [],
38      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
39])
40
41# _AM_AUTOCONF_VERSION(VERSION)
42# -----------------------------
43# aclocal traces this macro to find the Autoconf version.
44# This is a private macro too.  Using m4_define simplifies
45# the logic in aclocal, which can simply ignore this definition.
46m4_define([_AM_AUTOCONF_VERSION], [])
47
48# AM_SET_CURRENT_AUTOMAKE_VERSION
49# -------------------------------
50# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
51# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
52AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
53[AM_AUTOMAKE_VERSION([1.11.1])dnl
54m4_ifndef([AC_AUTOCONF_VERSION],
55  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
56_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
57
58# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
59
60# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
61#
62# This file is free software; the Free Software Foundation
63# gives unlimited permission to copy and/or distribute it,
64# with or without modifications, as long as this notice is preserved.
65
66# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
67# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
68# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
69#
70# Of course, Automake must honor this variable whenever it calls a
71# tool from the auxiliary directory.  The problem is that $srcdir (and
72# therefore $ac_aux_dir as well) can be either absolute or relative,
73# depending on how configure is run.  This is pretty annoying, since
74# it makes $ac_aux_dir quite unusable in subdirectories: in the top
75# source directory, any form will work fine, but in subdirectories a
76# relative path needs to be adjusted first.
77#
78# $ac_aux_dir/missing
79#    fails when called from a subdirectory if $ac_aux_dir is relative
80# $top_srcdir/$ac_aux_dir/missing
81#    fails if $ac_aux_dir is absolute,
82#    fails when called from a subdirectory in a VPATH build with
83#          a relative $ac_aux_dir
84#
85# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
86# are both prefixed by $srcdir.  In an in-source build this is usually
87# harmless because $srcdir is `.', but things will broke when you
88# start a VPATH build or use an absolute $srcdir.
89#
90# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
91# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
92#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
93# and then we would define $MISSING as
94#   MISSING="\${SHELL} $am_aux_dir/missing"
95# This will work as long as MISSING is not called from configure, because
96# unfortunately $(top_srcdir) has no meaning in configure.
97# However there are other variables, like CC, which are often used in
98# configure, and could therefore not use this "fixed" $ac_aux_dir.
99#
100# Another solution, used here, is to always expand $ac_aux_dir to an
101# absolute PATH.  The drawback is that using absolute paths prevent a
102# configured tree to be moved without reconfiguration.
103
104AC_DEFUN([AM_AUX_DIR_EXPAND],
105[dnl Rely on autoconf to set up CDPATH properly.
106AC_PREREQ([2.50])dnl
107# expand $ac_aux_dir to an absolute path
108am_aux_dir=`cd $ac_aux_dir && pwd`
109])
110
111# AM_CONDITIONAL                                            -*- Autoconf -*-
112
113# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
114# Free Software Foundation, Inc.
115#
116# This file is free software; the Free Software Foundation
117# gives unlimited permission to copy and/or distribute it,
118# with or without modifications, as long as this notice is preserved.
119
120# serial 9
121
122# AM_CONDITIONAL(NAME, SHELL-CONDITION)
123# -------------------------------------
124# Define a conditional.
125AC_DEFUN([AM_CONDITIONAL],
126[AC_PREREQ(2.52)dnl
127 ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
128	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
129AC_SUBST([$1_TRUE])dnl
130AC_SUBST([$1_FALSE])dnl
131_AM_SUBST_NOTMAKE([$1_TRUE])dnl
132_AM_SUBST_NOTMAKE([$1_FALSE])dnl
133m4_define([_AM_COND_VALUE_$1], [$2])dnl
134if $2; then
135  $1_TRUE=
136  $1_FALSE='#'
137else
138  $1_TRUE='#'
139  $1_FALSE=
140fi
141AC_CONFIG_COMMANDS_PRE(
142[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
143  AC_MSG_ERROR([[conditional "$1" was never defined.
144Usually this means the macro was only invoked conditionally.]])
145fi])])
146
147# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
148# Free Software Foundation, Inc.
149#
150# This file is free software; the Free Software Foundation
151# gives unlimited permission to copy and/or distribute it,
152# with or without modifications, as long as this notice is preserved.
153
154# serial 10
155
156# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
157# written in clear, in which case automake, when reading aclocal.m4,
158# will think it sees a *use*, and therefore will trigger all it's
159# C support machinery.  Also note that it means that autoscan, seeing
160# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
161
162
163# _AM_DEPENDENCIES(NAME)
164# ----------------------
165# See how the compiler implements dependency checking.
166# NAME is "CC", "CXX", "GCJ", or "OBJC".
167# We try a few techniques and use that to set a single cache variable.
168#
169# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
170# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
171# dependency, and given that the user is not expected to run this macro,
172# just rely on AC_PROG_CC.
173AC_DEFUN([_AM_DEPENDENCIES],
174[AC_REQUIRE([AM_SET_DEPDIR])dnl
175AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
176AC_REQUIRE([AM_MAKE_INCLUDE])dnl
177AC_REQUIRE([AM_DEP_TRACK])dnl
178
179ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
180       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
181       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
182       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
183       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
184                   [depcc="$$1"   am_compiler_list=])
185
186AC_CACHE_CHECK([dependency style of $depcc],
187               [am_cv_$1_dependencies_compiler_type],
188[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
189  # We make a subdir and do the tests there.  Otherwise we can end up
190  # making bogus files that we don't know about and never remove.  For
191  # instance it was reported that on HP-UX the gcc test will end up
192  # making a dummy file named `D' -- because `-MD' means `put the output
193  # in D'.
194  mkdir conftest.dir
195  # Copy depcomp to subdir because otherwise we won't find it if we're
196  # using a relative directory.
197  cp "$am_depcomp" conftest.dir
198  cd conftest.dir
199  # We will build objects and dependencies in a subdirectory because
200  # it helps to detect inapplicable dependency modes.  For instance
201  # both Tru64's cc and ICC support -MD to output dependencies as a
202  # side effect of compilation, but ICC will put the dependencies in
203  # the current directory while Tru64 will put them in the object
204  # directory.
205  mkdir sub
206
207  am_cv_$1_dependencies_compiler_type=none
208  if test "$am_compiler_list" = ""; then
209     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
210  fi
211  am__universal=false
212  m4_case([$1], [CC],
213    [case " $depcc " in #(
214     *\ -arch\ *\ -arch\ *) am__universal=true ;;
215     esac],
216    [CXX],
217    [case " $depcc " in #(
218     *\ -arch\ *\ -arch\ *) am__universal=true ;;
219     esac])
220
221  for depmode in $am_compiler_list; do
222    # Setup a source with many dependencies, because some compilers
223    # like to wrap large dependency lists on column 80 (with \), and
224    # we should not choose a depcomp mode which is confused by this.
225    #
226    # We need to recreate these files for each test, as the compiler may
227    # overwrite some of them when testing with obscure command lines.
228    # This happens at least with the AIX C compiler.
229    : > sub/conftest.c
230    for i in 1 2 3 4 5 6; do
231      echo '#include "conftst'$i'.h"' >> sub/conftest.c
232      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
233      # Solaris 8's {/usr,}/bin/sh.
234      touch sub/conftst$i.h
235    done
236    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
237
238    # We check with `-c' and `-o' for the sake of the "dashmstdout"
239    # mode.  It turns out that the SunPro C++ compiler does not properly
240    # handle `-M -o', and we need to detect this.  Also, some Intel
241    # versions had trouble with output in subdirs
242    am__obj=sub/conftest.${OBJEXT-o}
243    am__minus_obj="-o $am__obj"
244    case $depmode in
245    gcc)
246      # This depmode causes a compiler race in universal mode.
247      test "$am__universal" = false || continue
248      ;;
249    nosideeffect)
250      # after this tag, mechanisms are not by side-effect, so they'll
251      # only be used when explicitly requested
252      if test "x$enable_dependency_tracking" = xyes; then
253	continue
254      else
255	break
256      fi
257      ;;
258    msvisualcpp | msvcmsys)
259      # This compiler won't grok `-c -o', but also, the minuso test has
260      # not run yet.  These depmodes are late enough in the game, and
261      # so weak that their functioning should not be impacted.
262      am__obj=conftest.${OBJEXT-o}
263      am__minus_obj=
264      ;;
265    none) break ;;
266    esac
267    if depmode=$depmode \
268       source=sub/conftest.c object=$am__obj \
269       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
270       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
271         >/dev/null 2>conftest.err &&
272       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
273       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
274       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
275       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
276      # icc doesn't choke on unknown options, it will just issue warnings
277      # or remarks (even with -Werror).  So we grep stderr for any message
278      # that says an option was ignored or not supported.
279      # When given -MP, icc 7.0 and 7.1 complain thusly:
280      #   icc: Command line warning: ignoring option '-M'; no argument required
281      # The diagnosis changed in icc 8.0:
282      #   icc: Command line remark: option '-MP' not supported
283      if (grep 'ignoring option' conftest.err ||
284          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
285        am_cv_$1_dependencies_compiler_type=$depmode
286        break
287      fi
288    fi
289  done
290
291  cd ..
292  rm -rf conftest.dir
293else
294  am_cv_$1_dependencies_compiler_type=none
295fi
296])
297AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
298AM_CONDITIONAL([am__fastdep$1], [
299  test "x$enable_dependency_tracking" != xno \
300  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
301])
302
303
304# AM_SET_DEPDIR
305# -------------
306# Choose a directory name for dependency files.
307# This macro is AC_REQUIREd in _AM_DEPENDENCIES
308AC_DEFUN([AM_SET_DEPDIR],
309[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
310AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
311])
312
313
314# AM_DEP_TRACK
315# ------------
316AC_DEFUN([AM_DEP_TRACK],
317[AC_ARG_ENABLE(dependency-tracking,
318[  --disable-dependency-tracking  speeds up one-time build
319  --enable-dependency-tracking   do not reject slow dependency extractors])
320if test "x$enable_dependency_tracking" != xno; then
321  am_depcomp="$ac_aux_dir/depcomp"
322  AMDEPBACKSLASH='\'
323fi
324AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
325AC_SUBST([AMDEPBACKSLASH])dnl
326_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
327])
328
329# Generate code to set up dependency tracking.              -*- Autoconf -*-
330
331# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
332# Free Software Foundation, Inc.
333#
334# This file is free software; the Free Software Foundation
335# gives unlimited permission to copy and/or distribute it,
336# with or without modifications, as long as this notice is preserved.
337
338#serial 5
339
340# _AM_OUTPUT_DEPENDENCY_COMMANDS
341# ------------------------------
342AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
343[{
344  # Autoconf 2.62 quotes --file arguments for eval, but not when files
345  # are listed without --file.  Let's play safe and only enable the eval
346  # if we detect the quoting.
347  case $CONFIG_FILES in
348  *\'*) eval set x "$CONFIG_FILES" ;;
349  *)   set x $CONFIG_FILES ;;
350  esac
351  shift
352  for mf
353  do
354    # Strip MF so we end up with the name of the file.
355    mf=`echo "$mf" | sed -e 's/:.*$//'`
356    # Check whether this is an Automake generated Makefile or not.
357    # We used to match only the files named `Makefile.in', but
358    # some people rename them; so instead we look at the file content.
359    # Grep'ing the first line is not enough: some people post-process
360    # each Makefile.in and add a new line on top of each file to say so.
361    # Grep'ing the whole file is not good either: AIX grep has a line
362    # limit of 2048, but all sed's we know have understand at least 4000.
363    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
364      dirpart=`AS_DIRNAME("$mf")`
365    else
366      continue
367    fi
368    # Extract the definition of DEPDIR, am__include, and am__quote
369    # from the Makefile without running `make'.
370    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
371    test -z "$DEPDIR" && continue
372    am__include=`sed -n 's/^am__include = //p' < "$mf"`
373    test -z "am__include" && continue
374    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
375    # When using ansi2knr, U may be empty or an underscore; expand it
376    U=`sed -n 's/^U = //p' < "$mf"`
377    # Find all dependency output files, they are included files with
378    # $(DEPDIR) in their names.  We invoke sed twice because it is the
379    # simplest approach to changing $(DEPDIR) to its actual value in the
380    # expansion.
381    for file in `sed -n "
382      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
383	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
384      # Make sure the directory exists.
385      test -f "$dirpart/$file" && continue
386      fdir=`AS_DIRNAME(["$file"])`
387      AS_MKDIR_P([$dirpart/$fdir])
388      # echo "creating $dirpart/$file"
389      echo '# dummy' > "$dirpart/$file"
390    done
391  done
392}
393])# _AM_OUTPUT_DEPENDENCY_COMMANDS
394
395
396# AM_OUTPUT_DEPENDENCY_COMMANDS
397# -----------------------------
398# This macro should only be invoked once -- use via AC_REQUIRE.
399#
400# This code is only required when automatic dependency tracking
401# is enabled.  FIXME.  This creates each `.P' file that we will
402# need in order to bootstrap the dependency handling code.
403AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
404[AC_CONFIG_COMMANDS([depfiles],
405     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
406     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
407])
408
409# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
410# Free Software Foundation, Inc.
411#
412# This file is free software; the Free Software Foundation
413# gives unlimited permission to copy and/or distribute it,
414# with or without modifications, as long as this notice is preserved.
415
416# serial 8
417
418# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
419AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
420
421# Do all the work for Automake.                             -*- Autoconf -*-
422
423# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
424# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
425#
426# This file is free software; the Free Software Foundation
427# gives unlimited permission to copy and/or distribute it,
428# with or without modifications, as long as this notice is preserved.
429
430# serial 16
431
432# This macro actually does too much.  Some checks are only needed if
433# your package does certain things.  But this isn't really a big deal.
434
435# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
436# AM_INIT_AUTOMAKE([OPTIONS])
437# -----------------------------------------------
438# The call with PACKAGE and VERSION arguments is the old style
439# call (pre autoconf-2.50), which is being phased out.  PACKAGE
440# and VERSION should now be passed to AC_INIT and removed from
441# the call to AM_INIT_AUTOMAKE.
442# We support both call styles for the transition.  After
443# the next Automake release, Autoconf can make the AC_INIT
444# arguments mandatory, and then we can depend on a new Autoconf
445# release and drop the old call support.
446AC_DEFUN([AM_INIT_AUTOMAKE],
447[AC_PREREQ([2.62])dnl
448dnl Autoconf wants to disallow AM_ names.  We explicitly allow
449dnl the ones we care about.
450m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
451AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
452AC_REQUIRE([AC_PROG_INSTALL])dnl
453if test "`cd $srcdir && pwd`" != "`pwd`"; then
454  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
455  # is not polluted with repeated "-I."
456  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
457  # test to see if srcdir already configured
458  if test -f $srcdir/config.status; then
459    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
460  fi
461fi
462
463# test whether we have cygpath
464if test -z "$CYGPATH_W"; then
465  if (cygpath --version) >/dev/null 2>/dev/null; then
466    CYGPATH_W='cygpath -w'
467  else
468    CYGPATH_W=echo
469  fi
470fi
471AC_SUBST([CYGPATH_W])
472
473# Define the identity of the package.
474dnl Distinguish between old-style and new-style calls.
475m4_ifval([$2],
476[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
477 AC_SUBST([PACKAGE], [$1])dnl
478 AC_SUBST([VERSION], [$2])],
479[_AM_SET_OPTIONS([$1])dnl
480dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
481m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
482  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
483 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
484 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
485
486_AM_IF_OPTION([no-define],,
487[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
488 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
489
490# Some tools Automake needs.
491AC_REQUIRE([AM_SANITY_CHECK])dnl
492AC_REQUIRE([AC_ARG_PROGRAM])dnl
493AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
494AM_MISSING_PROG(AUTOCONF, autoconf)
495AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
496AM_MISSING_PROG(AUTOHEADER, autoheader)
497AM_MISSING_PROG(MAKEINFO, makeinfo)
498AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
499AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
500AC_REQUIRE([AM_PROG_MKDIR_P])dnl
501# We need awk for the "check" target.  The system "awk" is bad on
502# some platforms.
503AC_REQUIRE([AC_PROG_AWK])dnl
504AC_REQUIRE([AC_PROG_MAKE_SET])dnl
505AC_REQUIRE([AM_SET_LEADING_DOT])dnl
506_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
507	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
508			     [_AM_PROG_TAR([v7])])])
509_AM_IF_OPTION([no-dependencies],,
510[AC_PROVIDE_IFELSE([AC_PROG_CC],
511		  [_AM_DEPENDENCIES(CC)],
512		  [define([AC_PROG_CC],
513			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
514AC_PROVIDE_IFELSE([AC_PROG_CXX],
515		  [_AM_DEPENDENCIES(CXX)],
516		  [define([AC_PROG_CXX],
517			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
518AC_PROVIDE_IFELSE([AC_PROG_OBJC],
519		  [_AM_DEPENDENCIES(OBJC)],
520		  [define([AC_PROG_OBJC],
521			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
522])
523_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
524dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
525dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
526dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
527AC_CONFIG_COMMANDS_PRE(dnl
528[m4_provide_if([_AM_COMPILER_EXEEXT],
529  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
530])
531
532dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
533dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
534dnl mangled by Autoconf and run in a shell conditional statement.
535m4_define([_AC_COMPILER_EXEEXT],
536m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
537
538
539# When config.status generates a header, we must update the stamp-h file.
540# This file resides in the same directory as the config header
541# that is generated.  The stamp files are numbered to have different names.
542
543# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
544# loop where config.status creates the headers, so we can generate
545# our stamp files there.
546AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
547[# Compute $1's index in $config_headers.
548_am_arg=$1
549_am_stamp_count=1
550for _am_header in $config_headers :; do
551  case $_am_header in
552    $_am_arg | $_am_arg:* )
553      break ;;
554    * )
555      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
556  esac
557done
558echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
559
560# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
561#
562# This file is free software; the Free Software Foundation
563# gives unlimited permission to copy and/or distribute it,
564# with or without modifications, as long as this notice is preserved.
565
566# AM_PROG_INSTALL_SH
567# ------------------
568# Define $install_sh.
569AC_DEFUN([AM_PROG_INSTALL_SH],
570[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
571if test x"${install_sh}" != xset; then
572  case $am_aux_dir in
573  *\ * | *\	*)
574    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
575  *)
576    install_sh="\${SHELL} $am_aux_dir/install-sh"
577  esac
578fi
579AC_SUBST(install_sh)])
580
581# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
582#
583# This file is free software; the Free Software Foundation
584# gives unlimited permission to copy and/or distribute it,
585# with or without modifications, as long as this notice is preserved.
586
587# serial 2
588
589# Check whether the underlying file-system supports filenames
590# with a leading dot.  For instance MS-DOS doesn't.
591AC_DEFUN([AM_SET_LEADING_DOT],
592[rm -rf .tst 2>/dev/null
593mkdir .tst 2>/dev/null
594if test -d .tst; then
595  am__leading_dot=.
596else
597  am__leading_dot=_
598fi
599rmdir .tst 2>/dev/null
600AC_SUBST([am__leading_dot])])
601
602# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
603# From Jim Meyering
604
605# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
606# Free Software Foundation, Inc.
607#
608# This file is free software; the Free Software Foundation
609# gives unlimited permission to copy and/or distribute it,
610# with or without modifications, as long as this notice is preserved.
611
612# serial 5
613
614# AM_MAINTAINER_MODE([DEFAULT-MODE])
615# ----------------------------------
616# Control maintainer-specific portions of Makefiles.
617# Default is to disable them, unless `enable' is passed literally.
618# For symmetry, `disable' may be passed as well.  Anyway, the user
619# can override the default with the --enable/--disable switch.
620AC_DEFUN([AM_MAINTAINER_MODE],
621[m4_case(m4_default([$1], [disable]),
622       [enable], [m4_define([am_maintainer_other], [disable])],
623       [disable], [m4_define([am_maintainer_other], [enable])],
624       [m4_define([am_maintainer_other], [enable])
625        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
626AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
627  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
628  AC_ARG_ENABLE([maintainer-mode],
629[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
630			  (and sometimes confusing) to the casual installer],
631      [USE_MAINTAINER_MODE=$enableval],
632      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
633  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
634  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
635  MAINT=$MAINTAINER_MODE_TRUE
636  AC_SUBST([MAINT])dnl
637]
638)
639
640AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
641
642# Check to see how 'make' treats includes.	            -*- Autoconf -*-
643
644# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
645#
646# This file is free software; the Free Software Foundation
647# gives unlimited permission to copy and/or distribute it,
648# with or without modifications, as long as this notice is preserved.
649
650# serial 4
651
652# AM_MAKE_INCLUDE()
653# -----------------
654# Check to see how make treats includes.
655AC_DEFUN([AM_MAKE_INCLUDE],
656[am_make=${MAKE-make}
657cat > confinc << 'END'
658am__doit:
659	@echo this is the am__doit target
660.PHONY: am__doit
661END
662# If we don't find an include directive, just comment out the code.
663AC_MSG_CHECKING([for style of include used by $am_make])
664am__include="#"
665am__quote=
666_am_result=none
667# First try GNU make style include.
668echo "include confinc" > confmf
669# Ignore all kinds of additional output from `make'.
670case `$am_make -s -f confmf 2> /dev/null` in #(
671*the\ am__doit\ target*)
672  am__include=include
673  am__quote=
674  _am_result=GNU
675  ;;
676esac
677# Now try BSD make style include.
678if test "$am__include" = "#"; then
679   echo '.include "confinc"' > confmf
680   case `$am_make -s -f confmf 2> /dev/null` in #(
681   *the\ am__doit\ target*)
682     am__include=.include
683     am__quote="\""
684     _am_result=BSD
685     ;;
686   esac
687fi
688AC_SUBST([am__include])
689AC_SUBST([am__quote])
690AC_MSG_RESULT([$_am_result])
691rm -f confinc confmf
692])
693
694# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
695
696# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
697# Free Software Foundation, Inc.
698#
699# This file is free software; the Free Software Foundation
700# gives unlimited permission to copy and/or distribute it,
701# with or without modifications, as long as this notice is preserved.
702
703# serial 6
704
705# AM_MISSING_PROG(NAME, PROGRAM)
706# ------------------------------
707AC_DEFUN([AM_MISSING_PROG],
708[AC_REQUIRE([AM_MISSING_HAS_RUN])
709$1=${$1-"${am_missing_run}$2"}
710AC_SUBST($1)])
711
712
713# AM_MISSING_HAS_RUN
714# ------------------
715# Define MISSING if not defined so far and test if it supports --run.
716# If it does, set am_missing_run to use it, otherwise, to nothing.
717AC_DEFUN([AM_MISSING_HAS_RUN],
718[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
719AC_REQUIRE_AUX_FILE([missing])dnl
720if test x"${MISSING+set}" != xset; then
721  case $am_aux_dir in
722  *\ * | *\	*)
723    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
724  *)
725    MISSING="\${SHELL} $am_aux_dir/missing" ;;
726  esac
727fi
728# Use eval to expand $SHELL
729if eval "$MISSING --run true"; then
730  am_missing_run="$MISSING --run "
731else
732  am_missing_run=
733  AC_MSG_WARN([`missing' script is too old or missing])
734fi
735])
736
737# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
738#
739# This file is free software; the Free Software Foundation
740# gives unlimited permission to copy and/or distribute it,
741# with or without modifications, as long as this notice is preserved.
742
743# AM_PROG_MKDIR_P
744# ---------------
745# Check for `mkdir -p'.
746AC_DEFUN([AM_PROG_MKDIR_P],
747[AC_PREREQ([2.60])dnl
748AC_REQUIRE([AC_PROG_MKDIR_P])dnl
749dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
750dnl while keeping a definition of mkdir_p for backward compatibility.
751dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
752dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
753dnl Makefile.ins that do not define MKDIR_P, so we do our own
754dnl adjustment using top_builddir (which is defined more often than
755dnl MKDIR_P).
756AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
757case $mkdir_p in
758  [[\\/$]]* | ?:[[\\/]]*) ;;
759  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
760esac
761])
762
763# Helper functions for option handling.                     -*- Autoconf -*-
764
765# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
766#
767# This file is free software; the Free Software Foundation
768# gives unlimited permission to copy and/or distribute it,
769# with or without modifications, as long as this notice is preserved.
770
771# serial 4
772
773# _AM_MANGLE_OPTION(NAME)
774# -----------------------
775AC_DEFUN([_AM_MANGLE_OPTION],
776[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
777
778# _AM_SET_OPTION(NAME)
779# ------------------------------
780# Set option NAME.  Presently that only means defining a flag for this option.
781AC_DEFUN([_AM_SET_OPTION],
782[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
783
784# _AM_SET_OPTIONS(OPTIONS)
785# ----------------------------------
786# OPTIONS is a space-separated list of Automake options.
787AC_DEFUN([_AM_SET_OPTIONS],
788[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
789
790# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
791# -------------------------------------------
792# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
793AC_DEFUN([_AM_IF_OPTION],
794[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
795
796# Check to make sure that the build environment is sane.    -*- Autoconf -*-
797
798# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
799# Free Software Foundation, Inc.
800#
801# This file is free software; the Free Software Foundation
802# gives unlimited permission to copy and/or distribute it,
803# with or without modifications, as long as this notice is preserved.
804
805# serial 5
806
807# AM_SANITY_CHECK
808# ---------------
809AC_DEFUN([AM_SANITY_CHECK],
810[AC_MSG_CHECKING([whether build environment is sane])
811# Just in case
812sleep 1
813echo timestamp > conftest.file
814# Reject unsafe characters in $srcdir or the absolute working directory
815# name.  Accept space and tab only in the latter.
816am_lf='
817'
818case `pwd` in
819  *[[\\\"\#\$\&\'\`$am_lf]]*)
820    AC_MSG_ERROR([unsafe absolute working directory name]);;
821esac
822case $srcdir in
823  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
824    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
825esac
826
827# Do `set' in a subshell so we don't clobber the current shell's
828# arguments.  Must try -L first in case configure is actually a
829# symlink; some systems play weird games with the mod time of symlinks
830# (eg FreeBSD returns the mod time of the symlink's containing
831# directory).
832if (
833   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
834   if test "$[*]" = "X"; then
835      # -L didn't work.
836      set X `ls -t "$srcdir/configure" conftest.file`
837   fi
838   rm -f conftest.file
839   if test "$[*]" != "X $srcdir/configure conftest.file" \
840      && test "$[*]" != "X conftest.file $srcdir/configure"; then
841
842      # If neither matched, then we have a broken ls.  This can happen
843      # if, for instance, CONFIG_SHELL is bash and it inherits a
844      # broken ls alias from the environment.  This has actually
845      # happened.  Such a system could not be considered "sane".
846      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
847alias in your environment])
848   fi
849
850   test "$[2]" = conftest.file
851   )
852then
853   # Ok.
854   :
855else
856   AC_MSG_ERROR([newly created file is older than distributed files!
857Check your system clock])
858fi
859AC_MSG_RESULT(yes)])
860
861# Copyright (C) 2009  Free Software Foundation, Inc.
862#
863# This file is free software; the Free Software Foundation
864# gives unlimited permission to copy and/or distribute it,
865# with or without modifications, as long as this notice is preserved.
866
867# serial 1
868
869# AM_SILENT_RULES([DEFAULT])
870# --------------------------
871# Enable less verbose build rules; with the default set to DEFAULT
872# (`yes' being less verbose, `no' or empty being verbose).
873AC_DEFUN([AM_SILENT_RULES],
874[AC_ARG_ENABLE([silent-rules],
875[  --enable-silent-rules          less verbose build output (undo: `make V=1')
876  --disable-silent-rules         verbose build output (undo: `make V=0')])
877case $enable_silent_rules in
878yes) AM_DEFAULT_VERBOSITY=0;;
879no)  AM_DEFAULT_VERBOSITY=1;;
880*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
881esac
882AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
883AM_BACKSLASH='\'
884AC_SUBST([AM_BACKSLASH])dnl
885_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
886])
887
888# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
889#
890# This file is free software; the Free Software Foundation
891# gives unlimited permission to copy and/or distribute it,
892# with or without modifications, as long as this notice is preserved.
893
894# AM_PROG_INSTALL_STRIP
895# ---------------------
896# One issue with vendor `install' (even GNU) is that you can't
897# specify the program used to strip binaries.  This is especially
898# annoying in cross-compiling environments, where the build's strip
899# is unlikely to handle the host's binaries.
900# Fortunately install-sh will honor a STRIPPROG variable, so we
901# always use install-sh in `make install-strip', and initialize
902# STRIPPROG with the value of the STRIP variable (set by the user).
903AC_DEFUN([AM_PROG_INSTALL_STRIP],
904[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
905# Installed binaries are usually stripped using `strip' when the user
906# run `make install-strip'.  However `strip' might not be the right
907# tool to use in cross-compilation environments, therefore Automake
908# will honor the `STRIP' environment variable to overrule this program.
909dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
910if test "$cross_compiling" != no; then
911  AC_CHECK_TOOL([STRIP], [strip], :)
912fi
913INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
914AC_SUBST([INSTALL_STRIP_PROGRAM])])
915
916# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
917#
918# This file is free software; the Free Software Foundation
919# gives unlimited permission to copy and/or distribute it,
920# with or without modifications, as long as this notice is preserved.
921
922# serial 2
923
924# _AM_SUBST_NOTMAKE(VARIABLE)
925# ---------------------------
926# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
927# This macro is traced by Automake.
928AC_DEFUN([_AM_SUBST_NOTMAKE])
929
930# AM_SUBST_NOTMAKE(VARIABLE)
931# ---------------------------
932# Public sister of _AM_SUBST_NOTMAKE.
933AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
934
935# Check how to create a tarball.                            -*- Autoconf -*-
936
937# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
938#
939# This file is free software; the Free Software Foundation
940# gives unlimited permission to copy and/or distribute it,
941# with or without modifications, as long as this notice is preserved.
942
943# serial 2
944
945# _AM_PROG_TAR(FORMAT)
946# --------------------
947# Check how to create a tarball in format FORMAT.
948# FORMAT should be one of `v7', `ustar', or `pax'.
949#
950# Substitute a variable $(am__tar) that is a command
951# writing to stdout a FORMAT-tarball containing the directory
952# $tardir.
953#     tardir=directory && $(am__tar) > result.tar
954#
955# Substitute a variable $(am__untar) that extract such
956# a tarball read from stdin.
957#     $(am__untar) < result.tar
958AC_DEFUN([_AM_PROG_TAR],
959[# Always define AMTAR for backward compatibility.
960AM_MISSING_PROG([AMTAR], [tar])
961m4_if([$1], [v7],
962     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
963     [m4_case([$1], [ustar],, [pax],,
964              [m4_fatal([Unknown tar format])])
965AC_MSG_CHECKING([how to create a $1 tar archive])
966# Loop over all known methods to create a tar archive until one works.
967_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
968_am_tools=${am_cv_prog_tar_$1-$_am_tools}
969# Do not fold the above two line into one, because Tru64 sh and
970# Solaris sh will not grok spaces in the rhs of `-'.
971for _am_tool in $_am_tools
972do
973  case $_am_tool in
974  gnutar)
975    for _am_tar in tar gnutar gtar;
976    do
977      AM_RUN_LOG([$_am_tar --version]) && break
978    done
979    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
980    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
981    am__untar="$_am_tar -xf -"
982    ;;
983  plaintar)
984    # Must skip GNU tar: if it does not support --format= it doesn't create
985    # ustar tarball either.
986    (tar --version) >/dev/null 2>&1 && continue
987    am__tar='tar chf - "$$tardir"'
988    am__tar_='tar chf - "$tardir"'
989    am__untar='tar xf -'
990    ;;
991  pax)
992    am__tar='pax -L -x $1 -w "$$tardir"'
993    am__tar_='pax -L -x $1 -w "$tardir"'
994    am__untar='pax -r'
995    ;;
996  cpio)
997    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
998    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
999    am__untar='cpio -i -H $1 -d'
1000    ;;
1001  none)
1002    am__tar=false
1003    am__tar_=false
1004    am__untar=false
1005    ;;
1006  esac
1007
1008  # If the value was cached, stop now.  We just wanted to have am__tar
1009  # and am__untar set.
1010  test -n "${am_cv_prog_tar_$1}" && break
1011
1012  # tar/untar a dummy directory, and stop if the command works
1013  rm -rf conftest.dir
1014  mkdir conftest.dir
1015  echo GrepMe > conftest.dir/file
1016  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1017  rm -rf conftest.dir
1018  if test -s conftest.tar; then
1019    AM_RUN_LOG([$am__untar <conftest.tar])
1020    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1021  fi
1022done
1023rm -rf conftest.dir
1024
1025AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1026AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1027AC_SUBST([am__tar])
1028AC_SUBST([am__untar])
1029]) # _AM_PROG_TAR
1030
1031dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
1032dnl
1033dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
1034dnl 
1035dnl Permission is hereby granted, free of charge, to any person obtaining a
1036dnl copy of this software and associated documentation files (the "Software"),
1037dnl to deal in the Software without restriction, including without limitation
1038dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
1039dnl and/or sell copies of the Software, and to permit persons to whom the
1040dnl Software is furnished to do so, subject to the following conditions:
1041dnl
1042dnl The above copyright notice and this permission notice (including the next
1043dnl paragraph) shall be included in all copies or substantial portions of the
1044dnl Software.
1045dnl
1046dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1047dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1048dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
1049dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1050dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1051dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1052dnl DEALINGS IN THE SOFTWARE.
1053
1054# XORG_MACROS_VERSION(required-version)
1055# -------------------------------------
1056# Minimum version: 1.1.0
1057#
1058# If you're using a macro added in Version 1.1 or newer, include this in
1059# your configure.ac with the minimum required version, such as:
1060# XORG_MACROS_VERSION(1.1)
1061#
1062# To ensure that this macro is defined, also add:
1063# m4_ifndef([XORG_MACROS_VERSION],
1064#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
1065#
1066#
1067# See the "minimum version" comment for each macro you use to see what 
1068# version you require.
1069m4_defun([XORG_MACROS_VERSION],[
1070m4_define([vers_have], [1.10.1])
1071m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
1072m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
1073m4_if(m4_cmp(maj_have, maj_needed), 0,,
1074    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
1075m4_if(m4_version_compare(vers_have, [$1]), -1,
1076    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
1077m4_undefine([vers_have])
1078m4_undefine([maj_have])
1079m4_undefine([maj_needed])
1080]) # XORG_MACROS_VERSION
1081
1082# XORG_PROG_RAWCPP()
1083# ------------------
1084# Minimum version: 1.0.0
1085#
1086# Find cpp program and necessary flags for use in pre-processing text files
1087# such as man pages and config files
1088AC_DEFUN([XORG_PROG_RAWCPP],[
1089AC_REQUIRE([AC_PROG_CPP])
1090AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
1091   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
1092
1093# Check for flag to avoid builtin definitions - assumes unix is predefined,
1094# which is not the best choice for supporting other OS'es, but covers most
1095# of the ones we need for now.
1096AC_MSG_CHECKING([if $RAWCPP requires -undef])
1097AC_LANG_CONFTEST([Does cpp redefine unix ?])
1098if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1099	AC_MSG_RESULT([no])
1100else
1101	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1102		RAWCPPFLAGS=-undef
1103		AC_MSG_RESULT([yes])
1104	# under Cygwin unix is still defined even with -undef
1105	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1106		RAWCPPFLAGS="-undef -ansi"
1107		AC_MSG_RESULT([yes, with -ansi])
1108	else
1109		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
1110	fi
1111fi
1112rm -f conftest.$ac_ext
1113
1114AC_MSG_CHECKING([if $RAWCPP requires -traditional])
1115AC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
1116if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
1117	AC_MSG_RESULT([no])
1118else
1119	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
1120		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
1121		AC_MSG_RESULT([yes])
1122	else
1123		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
1124	fi
1125fi
1126rm -f conftest.$ac_ext
1127AC_SUBST(RAWCPPFLAGS)
1128]) # XORG_PROG_RAWCPP
1129
1130# XORG_MANPAGE_SECTIONS()
1131# -----------------------
1132# Minimum version: 1.0.0
1133#
1134# Determine which sections man pages go in for the different man page types
1135# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
1136# Not sure if there's any better way than just hardcoding by OS name.
1137# Override default settings by setting environment variables
1138# Added MAN_SUBSTS in version 1.8
1139# Added AC_PROG_SED in version 1.8
1140
1141AC_DEFUN([XORG_MANPAGE_SECTIONS],[
1142AC_REQUIRE([AC_CANONICAL_HOST])
1143AC_REQUIRE([AC_PROG_SED])
1144
1145if test x$APP_MAN_SUFFIX = x    ; then
1146    APP_MAN_SUFFIX=1
1147fi
1148if test x$APP_MAN_DIR = x    ; then
1149    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
1150fi
1151
1152if test x$LIB_MAN_SUFFIX = x    ; then
1153    LIB_MAN_SUFFIX=3
1154fi
1155if test x$LIB_MAN_DIR = x    ; then
1156    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
1157fi
1158
1159if test x$FILE_MAN_SUFFIX = x    ; then
1160    case $host_os in
1161	solaris*)	FILE_MAN_SUFFIX=4  ;;
1162	*)		FILE_MAN_SUFFIX=5  ;;
1163    esac
1164fi
1165if test x$FILE_MAN_DIR = x    ; then
1166    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
1167fi
1168
1169if test x$MISC_MAN_SUFFIX = x    ; then
1170    case $host_os in
1171	solaris*)	MISC_MAN_SUFFIX=5  ;;
1172	*)		MISC_MAN_SUFFIX=7  ;;
1173    esac
1174fi
1175if test x$MISC_MAN_DIR = x    ; then
1176    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
1177fi
1178
1179if test x$DRIVER_MAN_SUFFIX = x    ; then
1180    case $host_os in
1181	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
1182	*)		DRIVER_MAN_SUFFIX=4  ;;
1183    esac
1184fi
1185if test x$DRIVER_MAN_DIR = x    ; then
1186    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
1187fi
1188
1189if test x$ADMIN_MAN_SUFFIX = x    ; then
1190    case $host_os in
1191	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
1192	*)		ADMIN_MAN_SUFFIX=8  ;;
1193    esac
1194fi
1195if test x$ADMIN_MAN_DIR = x    ; then
1196    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
1197fi
1198
1199
1200AC_SUBST([APP_MAN_SUFFIX])
1201AC_SUBST([LIB_MAN_SUFFIX])
1202AC_SUBST([FILE_MAN_SUFFIX])
1203AC_SUBST([MISC_MAN_SUFFIX])
1204AC_SUBST([DRIVER_MAN_SUFFIX])
1205AC_SUBST([ADMIN_MAN_SUFFIX])
1206AC_SUBST([APP_MAN_DIR])
1207AC_SUBST([LIB_MAN_DIR])
1208AC_SUBST([FILE_MAN_DIR])
1209AC_SUBST([MISC_MAN_DIR])
1210AC_SUBST([DRIVER_MAN_DIR])
1211AC_SUBST([ADMIN_MAN_DIR])
1212
1213XORG_MAN_PAGE="X Version 11"
1214AC_SUBST([XORG_MAN_PAGE])
1215MAN_SUBSTS="\
1216	-e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
1217	-e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
1218	-e 's|__xservername__|Xorg|g' \
1219	-e 's|__xconfigfile__|xorg.conf|g' \
1220	-e 's|__projectroot__|\$(prefix)|g' \
1221	-e 's|__apploaddir__|\$(appdefaultdir)|g' \
1222	-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
1223	-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
1224	-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
1225	-e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
1226	-e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
1227	-e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
1228AC_SUBST([MAN_SUBSTS])
1229
1230]) # XORG_MANPAGE_SECTIONS
1231
1232# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
1233# ------------------------
1234# Minimum version: 1.7.0
1235#
1236# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
1237# provided by xorg-sgml-doctools, if installed.
1238AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
1239AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
1240XORG_SGML_PATH=
1241PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
1242    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
1243    [m4_ifval([$1],[:],
1244        [if test x"$cross_compiling" != x"yes" ; then
1245            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
1246                          [XORG_SGML_PATH=$prefix/share/sgml])
1247         fi])
1248    ])
1249
1250# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
1251# the path and the name of the doc stylesheet
1252if test "x$XORG_SGML_PATH" != "x" ; then
1253   AC_MSG_RESULT([$XORG_SGML_PATH])
1254   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
1255   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
1256else
1257   AC_MSG_RESULT([no])
1258fi
1259
1260AC_SUBST(XORG_SGML_PATH)
1261AC_SUBST(STYLESHEET_SRCDIR)
1262AC_SUBST(XSL_STYLESHEET)
1263AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
1264]) # XORG_CHECK_SGML_DOCTOOLS
1265
1266# XORG_CHECK_LINUXDOC
1267# -------------------
1268# Minimum version: 1.0.0
1269#
1270# Defines the variable MAKE_TEXT if the necessary tools and
1271# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
1272# Whether or not the necessary tools and files are found can be checked
1273# with the AM_CONDITIONAL "BUILD_LINUXDOC"
1274AC_DEFUN([XORG_CHECK_LINUXDOC],[
1275AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
1276AC_REQUIRE([XORG_WITH_PS2PDF])
1277
1278AC_PATH_PROG(LINUXDOC, linuxdoc)
1279
1280AC_MSG_CHECKING([whether to build documentation])
1281
1282if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
1283   BUILDDOC=yes
1284else
1285   BUILDDOC=no
1286fi
1287
1288AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
1289
1290AC_MSG_RESULT([$BUILDDOC])
1291
1292AC_MSG_CHECKING([whether to build pdf documentation])
1293
1294if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
1295   BUILDPDFDOC=yes
1296else
1297   BUILDPDFDOC=no
1298fi
1299
1300AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1301
1302AC_MSG_RESULT([$BUILDPDFDOC])
1303
1304MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
1305MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
1306MAKE_PDF="$PS2PDF"
1307MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
1308
1309AC_SUBST(MAKE_TEXT)
1310AC_SUBST(MAKE_PS)
1311AC_SUBST(MAKE_PDF)
1312AC_SUBST(MAKE_HTML)
1313]) # XORG_CHECK_LINUXDOC
1314
1315# XORG_CHECK_DOCBOOK
1316# -------------------
1317# Minimum version: 1.0.0
1318#
1319# Checks for the ability to build output formats from SGML DocBook source.
1320# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
1321# indicates whether the necessary tools and files are found and, if set,
1322# $(MAKE_XXX) blah.sgml will produce blah.xxx.
1323AC_DEFUN([XORG_CHECK_DOCBOOK],[
1324AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
1325
1326BUILDTXTDOC=no
1327BUILDPDFDOC=no
1328BUILDPSDOC=no
1329BUILDHTMLDOC=no
1330
1331AC_PATH_PROG(DOCBOOKPS, docbook2ps)
1332AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
1333AC_PATH_PROG(DOCBOOKHTML, docbook2html)
1334AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
1335
1336AC_MSG_CHECKING([whether to build text documentation])
1337if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
1338   test x$BUILD_TXTDOC != xno; then
1339	BUILDTXTDOC=yes
1340fi
1341AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
1342AC_MSG_RESULT([$BUILDTXTDOC])
1343
1344AC_MSG_CHECKING([whether to build PDF documentation])
1345if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
1346   test x$BUILD_PDFDOC != xno; then
1347	BUILDPDFDOC=yes
1348fi
1349AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1350AC_MSG_RESULT([$BUILDPDFDOC])
1351
1352AC_MSG_CHECKING([whether to build PostScript documentation])
1353if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
1354   test x$BUILD_PSDOC != xno; then
1355	BUILDPSDOC=yes
1356fi
1357AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
1358AC_MSG_RESULT([$BUILDPSDOC])
1359
1360AC_MSG_CHECKING([whether to build HTML documentation])
1361if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
1362   test x$BUILD_HTMLDOC != xno; then
1363	BUILDHTMLDOC=yes
1364fi
1365AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
1366AC_MSG_RESULT([$BUILDHTMLDOC])
1367
1368MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
1369MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
1370MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
1371MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
1372
1373AC_SUBST(MAKE_TEXT)
1374AC_SUBST(MAKE_PS)
1375AC_SUBST(MAKE_PDF)
1376AC_SUBST(MAKE_HTML)
1377]) # XORG_CHECK_DOCBOOK
1378
1379# XORG_WITH_XMLTO([MIN-VERSION])
1380# ----------------
1381# Minimum version: 1.5.0
1382#
1383# Documentation tools are not always available on all platforms and sometimes
1384# not at the appropriate level. This macro enables a module to test for the
1385# presence of the tool and obtain it's path in separate variables. Coupled with
1386# the --with-xmlto option, it allows maximum flexibilty in making decisions
1387# as whether or not to use the xmlto package.
1388#
1389# Interface to module:
1390# HAVE_XMLTO: 	used in makefiles to conditionally generate documentation
1391# XMLTO:	returns the path of the xmlto program found
1392#		returns the path set by the user in the environment
1393# --with-xmlto:	'yes' user instructs the module to use xmlto
1394#		'no' user instructs the module not to use xmlto
1395#
1396# Added in version 1.10.0
1397# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
1398#                  xmlto for text output requires either lynx, links, or w3m browsers
1399#
1400# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
1401#
1402AC_DEFUN([XORG_WITH_XMLTO],[
1403AC_ARG_VAR([XMLTO], [Path to xmlto command])
1404AC_ARG_WITH(xmlto,
1405	AS_HELP_STRING([--with-xmlto],
1406	   [Use xmlto to regenerate documentation (default: yes, if installed)]),
1407	   [use_xmlto=$withval], [use_xmlto=auto])
1408
1409if test "x$use_xmlto" = x"auto"; then
1410   AC_PATH_PROG([XMLTO], [xmlto])
1411   if test "x$XMLTO" = "x"; then
1412        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
1413	have_xmlto=no
1414   else
1415        have_xmlto=yes
1416   fi
1417elif test "x$use_xmlto" = x"yes" ; then
1418   AC_PATH_PROG([XMLTO], [xmlto])
1419   if test "x$XMLTO" = "x"; then
1420        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
1421   fi
1422   have_xmlto=yes
1423elif test "x$use_xmlto" = x"no" ; then
1424   if test "x$XMLTO" != "x"; then
1425      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
1426   fi
1427   have_xmlto=no
1428else
1429   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
1430fi
1431
1432# Test for a minimum version of xmlto, if provided.
1433m4_ifval([$1],
1434[if test "$have_xmlto" = yes; then
1435    # scrape the xmlto version
1436    AC_MSG_CHECKING([the xmlto version])
1437    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
1438    AC_MSG_RESULT([$xmlto_version])
1439    AS_VERSION_COMPARE([$xmlto_version], [$1],
1440        [if test "x$use_xmlto" = xauto; then
1441            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
1442            have_xmlto=no
1443        else
1444            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
1445        fi])
1446fi])
1447
1448# Test for the ability of xmlto to generate a text target
1449have_xmlto_text=no
1450cat > conftest.xml << "EOF"
1451EOF
1452AS_IF([test "$have_xmlto" = yes],
1453      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
1454             [have_xmlto_text=yes],
1455             [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
1456rm -f conftest.xml
1457AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
1458AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
1459]) # XORG_WITH_XMLTO
1460
1461# XORG_WITH_ASCIIDOC([MIN-VERSION])
1462# ----------------
1463# Minimum version: 1.5.0
1464#
1465# Documentation tools are not always available on all platforms and sometimes
1466# not at the appropriate level. This macro enables a module to test for the
1467# presence of the tool and obtain it's path in separate variables. Coupled with
1468# the --with-asciidoc option, it allows maximum flexibilty in making decisions
1469# as whether or not to use the asciidoc package.
1470#
1471# Interface to module:
1472# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
1473# ASCIIDOC:	 returns the path of the asciidoc program found
1474#		 returns the path set by the user in the environment
1475# --with-asciidoc: 'yes' user instructs the module to use asciidoc
1476#		  'no' user instructs the module not to use asciidoc
1477#
1478# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
1479#
1480AC_DEFUN([XORG_WITH_ASCIIDOC],[
1481AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
1482AC_ARG_WITH(asciidoc,
1483	AS_HELP_STRING([--with-asciidoc],
1484	   [Use asciidoc to regenerate documentation (default: yes, if installed)]),
1485	   [use_asciidoc=$withval], [use_asciidoc=auto])
1486
1487if test "x$use_asciidoc" = x"auto"; then
1488   AC_PATH_PROG([ASCIIDOC], [asciidoc])
1489   if test "x$ASCIIDOC" = "x"; then
1490        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
1491	have_asciidoc=no
1492   else
1493        have_asciidoc=yes
1494   fi
1495elif test "x$use_asciidoc" = x"yes" ; then
1496   AC_PATH_PROG([ASCIIDOC], [asciidoc])
1497   if test "x$ASCIIDOC" = "x"; then
1498        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
1499   fi
1500   have_asciidoc=yes
1501elif test "x$use_asciidoc" = x"no" ; then
1502   if test "x$ASCIIDOC" != "x"; then
1503      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
1504   fi
1505   have_asciidoc=no
1506else
1507   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
1508fi
1509m4_ifval([$1],
1510[if test "$have_asciidoc" = yes; then
1511    # scrape the asciidoc version
1512    AC_MSG_CHECKING([the asciidoc version])
1513    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
1514    AC_MSG_RESULT([$asciidoc_version])
1515    AS_VERSION_COMPARE([$asciidoc_version], [$1],
1516        [if test "x$use_asciidoc" = xauto; then
1517            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
1518            have_asciidoc=no
1519        else
1520            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
1521        fi])
1522fi])
1523AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
1524]) # XORG_WITH_ASCIIDOC
1525
1526# XORG_WITH_DOXYGEN([MIN-VERSION])
1527# --------------------------------
1528# Minimum version: 1.5.0
1529#
1530# Documentation tools are not always available on all platforms and sometimes
1531# not at the appropriate level. This macro enables a module to test for the
1532# presence of the tool and obtain it's path in separate variables. Coupled with
1533# the --with-doxygen option, it allows maximum flexibilty in making decisions
1534# as whether or not to use the doxygen package.
1535#
1536# Interface to module:
1537# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
1538# DOXYGEN:	 returns the path of the doxygen program found
1539#		 returns the path set by the user in the environment
1540# --with-doxygen: 'yes' user instructs the module to use doxygen
1541#		  'no' user instructs the module not to use doxygen
1542#
1543# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
1544#
1545AC_DEFUN([XORG_WITH_DOXYGEN],[
1546AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
1547AC_ARG_WITH(doxygen,
1548	AS_HELP_STRING([--with-doxygen],
1549	   [Use doxygen to regenerate documentation (default: yes, if installed)]),
1550	   [use_doxygen=$withval], [use_doxygen=auto])
1551
1552if test "x$use_doxygen" = x"auto"; then
1553   AC_PATH_PROG([DOXYGEN], [doxygen])
1554   if test "x$DOXYGEN" = "x"; then
1555        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
1556	have_doxygen=no
1557   else
1558        have_doxygen=yes
1559   fi
1560elif test "x$use_doxygen" = x"yes" ; then
1561   AC_PATH_PROG([DOXYGEN], [doxygen])
1562   if test "x$DOXYGEN" = "x"; then
1563        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
1564   fi
1565   have_doxygen=yes
1566elif test "x$use_doxygen" = x"no" ; then
1567   if test "x$DOXYGEN" != "x"; then
1568      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
1569   fi
1570   have_doxygen=no
1571else
1572   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
1573fi
1574m4_ifval([$1],
1575[if test "$have_doxygen" = yes; then
1576    # scrape the doxygen version
1577    AC_MSG_CHECKING([the doxygen version])
1578    doxygen_version=`$DOXYGEN --version 2>/dev/null`
1579    AC_MSG_RESULT([$doxygen_version])
1580    AS_VERSION_COMPARE([$doxygen_version], [$1],
1581        [if test "x$use_doxygen" = xauto; then
1582            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
1583            have_doxygen=no
1584        else
1585            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
1586        fi])
1587fi])
1588AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
1589]) # XORG_WITH_DOXYGEN
1590
1591# XORG_WITH_GROFF
1592# ----------------
1593# Minimum version: 1.6.0
1594#
1595# Documentation tools are not always available on all platforms and sometimes
1596# not at the appropriate level. This macro enables a module to test for the
1597# presence of the tool and obtain it's path in separate variables. Coupled with
1598# the --with-groff option, it allows maximum flexibilty in making decisions
1599# as whether or not to use the groff package.
1600#
1601# Interface to module:
1602# HAVE_GROFF:	 used in makefiles to conditionally generate documentation
1603# HAVE_GROFF_MM: the memorandum macros (-mm) package
1604# HAVE_GROFF_MS: the -ms macros package
1605# GROFF:	 returns the path of the groff program found
1606#		 returns the path set by the user in the environment
1607# --with-groff:	 'yes' user instructs the module to use groff
1608#		 'no' user instructs the module not to use groff
1609#
1610# Added in version 1.9.0:
1611# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
1612#		   pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
1613#		   psselect from the psutils package.
1614#		   the ghostcript package. Refer to the grohtml man pages
1615#
1616# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
1617#
1618# OS and distros often splits groff in a basic and full package, the former
1619# having the groff program and the later having devices, fonts and macros
1620# Checking for the groff executable is not enough.
1621#
1622# If macros are missing, we cannot assume that groff is useless, so we don't
1623# unset HAVE_GROFF or GROFF env variables.
1624# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
1625#
1626AC_DEFUN([XORG_WITH_GROFF],[
1627AC_ARG_VAR([GROFF], [Path to groff command])
1628AC_ARG_WITH(groff,
1629	AS_HELP_STRING([--with-groff],
1630	   [Use groff to regenerate documentation (default: yes, if installed)]),
1631	   [use_groff=$withval], [use_groff=auto])
1632
1633if test "x$use_groff" = x"auto"; then
1634   AC_PATH_PROG([GROFF], [groff])
1635   if test "x$GROFF" = "x"; then
1636        AC_MSG_WARN([groff not found - documentation targets will be skipped])
1637	have_groff=no
1638   else
1639        have_groff=yes
1640   fi
1641elif test "x$use_groff" = x"yes" ; then
1642   AC_PATH_PROG([GROFF], [groff])
1643   if test "x$GROFF" = "x"; then
1644        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
1645   fi
1646   have_groff=yes
1647elif test "x$use_groff" = x"no" ; then
1648   if test "x$GROFF" != "x"; then
1649      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
1650   fi
1651   have_groff=no
1652else
1653   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
1654fi
1655
1656# We have groff, test for the presence of the macro packages
1657if test "x$have_groff" = x"yes"; then
1658    AC_MSG_CHECKING([for ${GROFF} -ms macros])
1659    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
1660        groff_ms_works=yes
1661    else
1662        groff_ms_works=no
1663    fi
1664    AC_MSG_RESULT([$groff_ms_works])
1665    AC_MSG_CHECKING([for ${GROFF} -mm macros])
1666    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
1667        groff_mm_works=yes
1668    else
1669        groff_mm_works=no
1670    fi
1671    AC_MSG_RESULT([$groff_mm_works])
1672fi
1673
1674# We have groff, test for HTML dependencies, one command per package
1675if test "x$have_groff" = x"yes"; then
1676   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
1677   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
1678   AC_PATH_PROG(PSSELECT_PATH, [psselect])
1679   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
1680      have_groff_html=yes
1681   else
1682      have_groff_html=no
1683      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
1684   fi
1685fi
1686
1687# Set Automake conditionals for Makefiles
1688AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
1689AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
1690AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
1691AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
1692]) # XORG_WITH_GROFF
1693
1694# XORG_WITH_FOP
1695# ----------------
1696# Minimum version: 1.6.0
1697#
1698# Documentation tools are not always available on all platforms and sometimes
1699# not at the appropriate level. This macro enables a module to test for the
1700# presence of the tool and obtain it's path in separate variables. Coupled with
1701# the --with-fop option, it allows maximum flexibilty in making decisions
1702# as whether or not to use the fop package.
1703#
1704# Interface to module:
1705# HAVE_FOP: 	used in makefiles to conditionally generate documentation
1706# FOP:	 	returns the path of the fop program found
1707#		returns the path set by the user in the environment
1708# --with-fop: 	'yes' user instructs the module to use fop
1709#		'no' user instructs the module not to use fop
1710#
1711# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
1712#
1713AC_DEFUN([XORG_WITH_FOP],[
1714AC_ARG_VAR([FOP], [Path to fop command])
1715AC_ARG_WITH(fop,
1716	AS_HELP_STRING([--with-fop],
1717	   [Use fop to regenerate documentation (default: yes, if installed)]),
1718	   [use_fop=$withval], [use_fop=auto])
1719
1720if test "x$use_fop" = x"auto"; then
1721   AC_PATH_PROG([FOP], [fop])
1722   if test "x$FOP" = "x"; then
1723        AC_MSG_WARN([fop not found - documentation targets will be skipped])
1724	have_fop=no
1725   else
1726        have_fop=yes
1727   fi
1728elif test "x$use_fop" = x"yes" ; then
1729   AC_PATH_PROG([FOP], [fop])
1730   if test "x$FOP" = "x"; then
1731        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
1732   fi
1733   have_fop=yes
1734elif test "x$use_fop" = x"no" ; then
1735   if test "x$FOP" != "x"; then
1736      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
1737   fi
1738   have_fop=no
1739else
1740   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
1741fi
1742AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
1743]) # XORG_WITH_FOP
1744
1745# XORG_WITH_PS2PDF
1746# ----------------
1747# Minimum version: 1.6.0
1748#
1749# Documentation tools are not always available on all platforms and sometimes
1750# not at the appropriate level. This macro enables a module to test for the
1751# presence of the tool and obtain it's path in separate variables. Coupled with
1752# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
1753# as whether or not to use the ps2pdf package.
1754#
1755# Interface to module:
1756# HAVE_PS2PDF: 	used in makefiles to conditionally generate documentation
1757# PS2PDF:	returns the path of the ps2pdf program found
1758#		returns the path set by the user in the environment
1759# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
1760#		 'no' user instructs the module not to use ps2pdf
1761#
1762# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
1763#
1764AC_DEFUN([XORG_WITH_PS2PDF],[
1765AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
1766AC_ARG_WITH(ps2pdf,
1767	AS_HELP_STRING([--with-ps2pdf],
1768	   [Use ps2pdf to regenerate documentation (default: yes, if installed)]),
1769	   [use_ps2pdf=$withval], [use_ps2pdf=auto])
1770
1771if test "x$use_ps2pdf" = x"auto"; then
1772   AC_PATH_PROG([PS2PDF], [ps2pdf])
1773   if test "x$PS2PDF" = "x"; then
1774        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
1775	have_ps2pdf=no
1776   else
1777        have_ps2pdf=yes
1778   fi
1779elif test "x$use_ps2pdf" = x"yes" ; then
1780   AC_PATH_PROG([PS2PDF], [ps2pdf])
1781   if test "x$PS2PDF" = "x"; then
1782        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
1783   fi
1784   have_ps2pdf=yes
1785elif test "x$use_ps2pdf" = x"no" ; then
1786   if test "x$PS2PDF" != "x"; then
1787      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
1788   fi
1789   have_ps2pdf=no
1790else
1791   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
1792fi
1793AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
1794]) # XORG_WITH_PS2PDF
1795
1796# XORG_ENABLE_DOCS (enable_docs=yes)
1797# ----------------
1798# Minimum version: 1.6.0
1799#
1800# Documentation tools are not always available on all platforms and sometimes
1801# not at the appropriate level. This macro enables a builder to skip all
1802# documentation targets except traditional man pages.
1803# Combined with the specific tool checking macros XORG_WITH_*, it provides
1804# maximum flexibilty in controlling documentation building.
1805# Refer to:
1806# XORG_WITH_XMLTO         --with-xmlto
1807# XORG_WITH_ASCIIDOC      --with-asciidoc
1808# XORG_WITH_DOXYGEN       --with-doxygen
1809# XORG_WITH_FOP           --with-fop
1810# XORG_WITH_GROFF         --with-groff
1811# XORG_WITH_PS2PDF        --with-ps2pdf
1812#
1813# Interface to module:
1814# ENABLE_DOCS: 	  used in makefiles to conditionally generate documentation
1815# --enable-docs: 'yes' user instructs the module to generate docs
1816#		 'no' user instructs the module not to generate docs
1817# parm1:	specify the default value, yes or no.
1818#
1819AC_DEFUN([XORG_ENABLE_DOCS],[
1820default=$1
1821if test "x$default" = x ; then
1822  default="yes"
1823fi
1824AC_ARG_ENABLE(docs,
1825	AS_HELP_STRING([--enable-docs],
1826	   [Enable building the documentation (default: yes)]),
1827	   [build_docs=$enableval], [build_docs=$default])
1828AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
1829AC_MSG_CHECKING([whether to build documentation])
1830AC_MSG_RESULT([$build_docs])
1831]) # XORG_ENABLE_DOCS
1832
1833# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
1834# ----------------
1835# Minimum version: 1.6.0
1836#
1837# This macro enables a builder to skip all developer documentation.
1838# Combined with the specific tool checking macros XORG_WITH_*, it provides
1839# maximum flexibilty in controlling documentation building.
1840# Refer to:
1841# XORG_WITH_XMLTO         --with-xmlto
1842# XORG_WITH_ASCIIDOC      --with-asciidoc
1843# XORG_WITH_DOXYGEN       --with-doxygen
1844# XORG_WITH_FOP           --with-fop
1845# XORG_WITH_GROFF         --with-groff
1846# XORG_WITH_PS2PDF        --with-ps2pdf
1847#
1848# Interface to module:
1849# ENABLE_DEVEL_DOCS:	used in makefiles to conditionally generate developer docs
1850# --enable-devel-docs:	'yes' user instructs the module to generate developer docs
1851#			'no' user instructs the module not to generate developer docs
1852# parm1:		specify the default value, yes or no.
1853#
1854AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
1855devel_default=$1
1856if test "x$devel_default" = x ; then
1857  devel_default="yes"
1858fi
1859AC_ARG_ENABLE(devel-docs,
1860	AS_HELP_STRING([--enable-devel-docs],
1861	   [Enable building the developer documentation (default: yes)]),
1862	   [build_devel_docs=$enableval], [build_devel_docs=$devel_default])
1863AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
1864AC_MSG_CHECKING([whether to build developer documentation])
1865AC_MSG_RESULT([$build_devel_docs])
1866]) # XORG_ENABLE_DEVEL_DOCS
1867
1868# XORG_ENABLE_SPECS (enable_specs=yes)
1869# ----------------
1870# Minimum version: 1.6.0
1871#
1872# This macro enables a builder to skip all functional specification targets.
1873# Combined with the specific tool checking macros XORG_WITH_*, it provides
1874# maximum flexibilty in controlling documentation building.
1875# Refer to:
1876# XORG_WITH_XMLTO         --with-xmlto
1877# XORG_WITH_ASCIIDOC      --with-asciidoc
1878# XORG_WITH_DOXYGEN       --with-doxygen
1879# XORG_WITH_FOP           --with-fop
1880# XORG_WITH_GROFF         --with-groff
1881# XORG_WITH_PS2PDF        --with-ps2pdf
1882#
1883# Interface to module:
1884# ENABLE_SPECS:		used in makefiles to conditionally generate specs
1885# --enable-specs:	'yes' user instructs the module to generate specs
1886#			'no' user instructs the module not to generate specs
1887# parm1:		specify the default value, yes or no.
1888#
1889AC_DEFUN([XORG_ENABLE_SPECS],[
1890spec_default=$1
1891if test "x$spec_default" = x ; then
1892  spec_default="yes"
1893fi
1894AC_ARG_ENABLE(specs,
1895	AS_HELP_STRING([--enable-specs],
1896	   [Enable building the specs (default: yes)]),
1897	   [build_specs=$enableval], [build_specs=$spec_default])
1898AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
1899AC_MSG_CHECKING([whether to build functional specifications])
1900AC_MSG_RESULT([$build_specs])
1901]) # XORG_ENABLE_SPECS
1902
1903# XORG_CHECK_MALLOC_ZERO
1904# ----------------------
1905# Minimum version: 1.0.0
1906#
1907# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
1908# malloc(0) returns NULL.  Packages should add one of these cflags to
1909# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
1910AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
1911AC_ARG_ENABLE(malloc0returnsnull,
1912	AS_HELP_STRING([--enable-malloc0returnsnull],
1913		       [malloc(0) returns NULL (default: auto)]),
1914	[MALLOC_ZERO_RETURNS_NULL=$enableval],
1915	[MALLOC_ZERO_RETURNS_NULL=auto])
1916
1917AC_MSG_CHECKING([whether malloc(0) returns NULL])
1918if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
1919	AC_RUN_IFELSE([
1920char *malloc();
1921char *realloc();
1922char *calloc();
1923main() {
1924    char *m0, *r0, *c0, *p;
1925    m0 = malloc(0);
1926    p = malloc(10);
1927    r0 = realloc(p,0);
1928    c0 = calloc(0);
1929    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
1930}],
1931		[MALLOC_ZERO_RETURNS_NULL=yes],
1932		[MALLOC_ZERO_RETURNS_NULL=no],
1933		[MALLOC_ZERO_RETURNS_NULL=yes])
1934fi
1935AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
1936
1937if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
1938	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
1939	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
1940	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
1941else
1942	MALLOC_ZERO_CFLAGS=""
1943	XMALLOC_ZERO_CFLAGS=""
1944	XTMALLOC_ZERO_CFLAGS=""
1945fi
1946
1947AC_SUBST([MALLOC_ZERO_CFLAGS])
1948AC_SUBST([XMALLOC_ZERO_CFLAGS])
1949AC_SUBST([XTMALLOC_ZERO_CFLAGS])
1950]) # XORG_CHECK_MALLOC_ZERO
1951
1952# XORG_WITH_LINT()
1953# ----------------
1954# Minimum version: 1.1.0
1955#
1956# This macro enables the use of a tool that flags some suspicious and
1957# non-portable constructs (likely to be bugs) in C language source code.
1958# It will attempt to locate the tool and use appropriate options.
1959# There are various lint type tools on different platforms.
1960#
1961# Interface to module:
1962# LINT:		returns the path to the tool found on the platform
1963#		or the value set to LINT on the configure cmd line
1964#		also an Automake conditional
1965# LINT_FLAGS:	an Automake variable with appropriate flags
1966#
1967# --with-lint:	'yes' user instructs the module to use lint
1968#		'no' user instructs the module not to use lint (default)
1969#
1970# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
1971# If the user sets the value of LINT_FLAGS, they are used verbatim.
1972#
1973AC_DEFUN([XORG_WITH_LINT],[
1974
1975AC_ARG_VAR([LINT], [Path to a lint-style command])
1976AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
1977AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
1978		[Use a lint-style source code checker (default: disabled)])],
1979		[use_lint=$withval], [use_lint=no])
1980
1981# Obtain platform specific info like program name and options
1982# The lint program on FreeBSD and NetBSD is different from the one on Solaris
1983case $host_os in
1984  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
1985	lint_name=splint
1986	lint_options="-badflag"
1987	;;
1988  *freebsd* | *netbsd*)
1989	lint_name=lint
1990	lint_options="-u -b"
1991	;;
1992  *solaris*)
1993	lint_name=lint
1994	lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
1995	;;
1996esac
1997
1998# Test for the presence of the program (either guessed by the code or spelled out by the user)
1999if test "x$use_lint" = x"yes" ; then
2000   AC_PATH_PROG([LINT], [$lint_name])
2001   if test "x$LINT" = "x"; then
2002        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
2003   fi
2004elif test "x$use_lint" = x"no" ; then
2005   if test "x$LINT" != "x"; then
2006      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
2007   fi
2008else
2009   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
2010fi
2011
2012# User supplied flags override default flags
2013if test "x$LINT_FLAGS" != "x"; then
2014   lint_options=$LINT_FLAGS
2015fi
2016
2017AC_SUBST([LINT_FLAGS],[$lint_options])
2018AM_CONDITIONAL(LINT, [test "x$LINT" != x])
2019
2020]) # XORG_WITH_LINT
2021
2022# XORG_LINT_LIBRARY(LIBNAME)
2023# --------------------------
2024# Minimum version: 1.1.0
2025#
2026# Sets up flags for building lint libraries for checking programs that call
2027# functions in the library.
2028#
2029# Interface to module:
2030# LINTLIB		- Automake variable with the name of lint library file to make
2031# MAKE_LINT_LIB		- Automake conditional
2032#
2033# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
2034#			  - 'no' user instructs the module not to create a lint library (default)
2035
2036AC_DEFUN([XORG_LINT_LIBRARY],[
2037AC_REQUIRE([XORG_WITH_LINT])
2038AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
2039	[Create lint library (default: disabled)])],
2040	[make_lint_lib=$enableval], [make_lint_lib=no])
2041
2042if test "x$make_lint_lib" = x"yes" ; then
2043   LINTLIB=llib-l$1.ln
2044   if test "x$LINT" = "x"; then
2045        AC_MSG_ERROR([Cannot make lint library without --with-lint])
2046   fi
2047elif test "x$make_lint_lib" != x"no" ; then
2048   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
2049fi
2050
2051AC_SUBST(LINTLIB)
2052AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
2053
2054]) # XORG_LINT_LIBRARY
2055
2056# XORG_CWARNFLAGS
2057# ---------------
2058# Minimum version: 1.2.0
2059#
2060# Defines CWARNFLAGS to enable C compiler warnings.
2061#
2062AC_DEFUN([XORG_CWARNFLAGS], [
2063AC_REQUIRE([AC_PROG_CC_C99])
2064if  test "x$GCC" = xyes ; then
2065    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
2066-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
2067-Wbad-function-cast -Wformat=2"
2068    case `$CC -dumpversion` in
2069    3.4.* | 4.*)
2070	CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
2071	;;
2072    esac
2073else
2074    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
2075    if test "x$SUNCC" = "xyes"; then
2076	CWARNFLAGS="-v"
2077    fi
2078fi
2079AC_SUBST(CWARNFLAGS)
2080]) # XORG_CWARNFLAGS
2081
2082# XORG_STRICT_OPTION
2083# -----------------------
2084# Minimum version: 1.3.0
2085#
2086# Add configure option to enable strict compilation
2087AC_DEFUN([XORG_STRICT_OPTION], [
2088# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
2089AC_REQUIRE([AC_PROG_CC_C99])
2090AC_REQUIRE([XORG_CWARNFLAGS])
2091
2092AC_ARG_ENABLE(strict-compilation,
2093			  AS_HELP_STRING([--enable-strict-compilation],
2094			  [Enable all warnings from compiler and make them errors (default: disabled)]),
2095			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
2096if test "x$STRICT_COMPILE" = "xyes"; then
2097	AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
2098	AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
2099	if test "x$GCC" = xyes ; then
2100		STRICT_CFLAGS="-pedantic -Werror"
2101	elif test "x$SUNCC" = "xyes"; then
2102		STRICT_CFLAGS="-errwarn"
2103    elif test "x$INTELCC" = "xyes"; then
2104		STRICT_CFLAGS="-Werror"
2105	fi
2106fi
2107CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
2108AC_SUBST([CWARNFLAGS])
2109]) # XORG_STRICT_OPTION
2110
2111# XORG_DEFAULT_OPTIONS
2112# --------------------
2113# Minimum version: 1.3.0
2114#
2115# Defines default options for X.Org modules.
2116#
2117AC_DEFUN([XORG_DEFAULT_OPTIONS], [
2118AC_REQUIRE([AC_PROG_INSTALL])
2119XORG_CWARNFLAGS
2120XORG_STRICT_OPTION
2121XORG_RELEASE_VERSION
2122XORG_CHANGELOG
2123XORG_INSTALL
2124XORG_MANPAGE_SECTIONS
2125m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
2126    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
2127]) # XORG_DEFAULT_OPTIONS
2128
2129# XORG_INSTALL()
2130# ----------------
2131# Minimum version: 1.4.0
2132#
2133# Defines the variable INSTALL_CMD as the command to copy
2134# INSTALL from $prefix/share/util-macros.
2135#
2136AC_DEFUN([XORG_INSTALL], [
2137AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2138macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
2139INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
2140mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
2141|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
2142echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
2143AC_SUBST([INSTALL_CMD])
2144]) # XORG_INSTALL
2145dnl Copyright 2005 Red Hat, Inc
2146dnl
2147dnl Permission to use, copy, modify, distribute, and sell this software and its
2148dnl documentation for any purpose is hereby granted without fee, provided that
2149dnl the above copyright notice appear in all copies and that both that
2150dnl copyright notice and this permission notice appear in supporting
2151dnl documentation.
2152dnl
2153dnl The above copyright notice and this permission notice shall be included
2154dnl in all copies or substantial portions of the Software.
2155dnl
2156dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
2157dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2158dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
2159dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
2160dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
2161dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2162dnl OTHER DEALINGS IN THE SOFTWARE.
2163dnl
2164dnl Except as contained in this notice, the name of the copyright holders shall
2165dnl not be used in advertising or otherwise to promote the sale, use or
2166dnl other dealings in this Software without prior written authorization
2167dnl from the copyright holders.
2168dnl
2169
2170# XORG_RELEASE_VERSION
2171# --------------------
2172# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
2173 
2174AC_DEFUN([XORG_RELEASE_VERSION],[
2175	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
2176		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
2177		[Major version of this package])
2178	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
2179	if test "x$PVM" = "x"; then
2180		PVM="0"
2181	fi
2182	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
2183		[$PVM],
2184		[Minor version of this package])
2185	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
2186	if test "x$PVP" = "x"; then
2187		PVP="0"
2188	fi
2189	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
2190		[$PVP],
2191		[Patch version of this package])
2192])
2193
2194# XORG_CHANGELOG()
2195# ----------------
2196# Minimum version: 1.2.0
2197#
2198# Defines the variable CHANGELOG_CMD as the command to generate
2199# ChangeLog from git.
2200#
2201#
2202AC_DEFUN([XORG_CHANGELOG], [
2203CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
2204mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
2205|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
2206echo 'git directory not found: installing possibly empty changelog.' >&2)"
2207AC_SUBST([CHANGELOG_CMD])
2208]) # XORG_CHANGELOG
2209
2210dnl $XdotOrg: lib/xtrans/xtrans.m4,v 1.6 2005/07/26 18:59:11 alanc Exp $
2211dnl
2212dnl Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
2213dnl
2214dnl Permission is hereby granted, free of charge, to any person obtaining a
2215dnl copy of this software and associated documentation files (the "Software"),
2216dnl to deal in the Software without restriction, including without limitation
2217dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
2218dnl and/or sell copies of the Software, and to permit persons to whom the
2219dnl Software is furnished to do so, subject to the following conditions:
2220dnl
2221dnl The above copyright notice and this permission notice (including the next
2222dnl paragraph) shall be included in all copies or substantial portions of the
2223dnl Software.
2224dnl
2225dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2226dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2227dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
2228dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2229dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
2230dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2231dnl DEALINGS IN THE SOFTWARE.
2232dnl 
2233
2234# XTRANS_TCP_FLAGS()
2235# ------------------
2236# Find needed libraries for TCP sockets, and check for IPv6 support
2237AC_DEFUN([XTRANS_TCP_FLAGS],[
2238 # SVR4 hides these in libraries other than libc
2239 AC_SEARCH_LIBS(socket, [socket])
2240 AC_SEARCH_LIBS(gethostbyname, [nsl])
2241 if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then
2242   AC_HAVE_LIBRARY([ws2_32])
2243 fi
2244
2245 # Needs to come after above checks for libsocket & libnsl for SVR4 systems
2246 AC_ARG_ENABLE(ipv6, 
2247	AC_HELP_STRING([--enable-ipv6],[Enable IPv6 support]),
2248	[IPV6CONN=$enableval], 
2249	[AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])])
2250 AC_MSG_CHECKING([if IPv6 support should be built])
2251 if test "$IPV6CONN" = "yes"; then
2252	AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections])
2253 fi
2254 AC_MSG_RESULT($IPV6CONN)
2255
2256 # 4.3BSD-Reno added a new member to struct sockaddr_in
2257 AC_CHECK_MEMBER([struct sockaddr_in.sin_len], 
2258	AC_DEFINE([BSD44SOCKETS],1,
2259 	    [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [
2260#include <sys/types.h>
2261#include <sys/socket.h>
2262#include <netinet/in.h>
2263 ])
2264
2265 # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc.
2266 AC_CHECK_TYPES([socklen_t], [], [], [
2267AC_INCLUDES_DEFAULT
2268#include <sys/socket.h>])
2269 
2270]) # XTRANS_TCP_FLAGS
2271
2272# XTRANS_CONNECTION_FLAGS()
2273# -------------------------
2274# Standard checks for which Xtrans transports to use by the Xorg packages
2275# that use Xtrans functions
2276AC_DEFUN([XTRANS_CONNECTION_FLAGS],[
2277 AC_REQUIRE([AC_CANONICAL_HOST])
2278 AC_REQUIRE([AC_TYPE_SIGNAL])
2279 [case $host_os in
2280	mingw*)	unixdef="no"   ;;
2281	*)	unixdef="yes"  ;;
2282 esac]
2283 AC_ARG_ENABLE(unix-transport,
2284	AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]),
2285	[UNIXCONN=$enableval], [UNIXCONN=$unixdef])
2286 AC_MSG_CHECKING([if Xtrans should support UNIX socket connections])
2287 if test "$UNIXCONN" = "yes"; then
2288	AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections])
2289 fi
2290 AC_MSG_RESULT($UNIXCONN)
2291 AC_ARG_ENABLE(tcp-transport, 
2292	AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]),
2293	[TCPCONN=$enableval], [TCPCONN=yes])
2294 AC_MSG_CHECKING([if Xtrans should support TCP socket connections])
2295 AC_MSG_RESULT($TCPCONN)
2296 if test "$TCPCONN" = "yes"; then
2297	AC_DEFINE(TCPCONN,1,[Support TCP socket connections])
2298	XTRANS_TCP_FLAGS
2299 fi
2300 [case $host_os in
2301	solaris*|sco*|sysv4*)	localdef="yes" ;;
2302	*)			localdef="no"  ;;
2303 esac]
2304 AC_ARG_ENABLE(local-transport,
2305	AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]),
2306	[LOCALCONN=$enableval], [LOCALCONN=$localdef])
2307 AC_MSG_CHECKING([if Xtrans should support os-specific local connections])
2308 AC_MSG_RESULT($LOCALCONN)
2309 if test "$LOCALCONN" = "yes"; then
2310	AC_DEFINE(LOCALCONN,1,[Support os-specific local connections])
2311 fi
2312 
2313]) # XTRANS_CONNECTION_FLAGS
2314
2315
2316# XTRANS_SECURE_RPC_FLAGS()
2317# -------------------------
2318# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS
2319# so that any necessary networking libraries are already found
2320AC_DEFUN([XTRANS_SECURE_RPC_FLAGS],
2321[AC_REQUIRE([XTRANS_TCP_FLAGS])
2322 AC_ARG_ENABLE(secure-rpc, 
2323	AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]),
2324        [SECURE_RPC=$enableval], [SECURE_RPC="try"])
2325
2326 if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then
2327	FOUND_SECURE_RPC="no"
2328	AC_CHECK_FUNCS([authdes_seccreate authdes_create],
2329			[FOUND_SECURE_RPC="yes"])
2330	if test "x$FOUND_SECURE_RPC" = "xno" ; then
2331		if test "x$SECURE_RPC" = "xyes" ; then
2332	AC_MSG_ERROR([Secure RPC requested, but required functions not found])
2333		fi	
2334		SECURE_RPC="no"
2335	else
2336		dnl FreeBSD keeps getsecretkey in librpcsvc
2337		AC_SEARCH_LIBS(getsecretkey, [rpcsvc])
2338		SECURE_RPC="yes"
2339	fi
2340 fi
2341 AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported])
2342 if test "x$SECURE_RPC" = "xyes" ; then
2343	AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients])
2344 fi
2345 AC_MSG_RESULT($SECURE_RPC)
2346]) # XTRANS_SECURE_RPC_FLAGS
2347
2348
2349# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2350# 
2351# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
2352#
2353# This program is free software; you can redistribute it and/or modify
2354# it under the terms of the GNU General Public License as published by
2355# the Free Software Foundation; either version 2 of the License, or
2356# (at your option) any later version.
2357#
2358# This program is distributed in the hope that it will be useful, but
2359# WITHOUT ANY WARRANTY; without even the implied warranty of
2360# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2361# General Public License for more details.
2362#
2363# You should have received a copy of the GNU General Public License
2364# along with this program; if not, write to the Free Software
2365# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2366#
2367# As a special exception to the GNU General Public License, if you
2368# distribute this file as part of a program that contains a
2369# configuration script generated by Autoconf, you may include it under
2370# the same distribution terms that you use for the rest of that program.
2371
2372# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2373# ----------------------------------
2374AC_DEFUN([PKG_PROG_PKG_CONFIG],
2375[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
2376m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
2377AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
2378if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
2379	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
2380fi
2381if test -n "$PKG_CONFIG"; then
2382	_pkg_min_version=m4_default([$1], [0.9.0])
2383	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
2384	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
2385		AC_MSG_RESULT([yes])
2386	else
2387		AC_MSG_RESULT([no])
2388		PKG_CONFIG=""
2389	fi
2390		
2391fi[]dnl
2392])# PKG_PROG_PKG_CONFIG
2393
2394# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2395#
2396# Check to see whether a particular set of modules exists.  Similar
2397# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2398#
2399#
2400# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2401# this or PKG_CHECK_MODULES is called, or make sure to call
2402# PKG_CHECK_EXISTS manually
2403# --------------------------------------------------------------
2404AC_DEFUN([PKG_CHECK_EXISTS],
2405[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2406if test -n "$PKG_CONFIG" && \
2407    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
2408  m4_ifval([$2], [$2], [:])
2409m4_ifvaln([$3], [else
2410  $3])dnl
2411fi])
2412
2413
2414# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2415# ---------------------------------------------
2416m4_define([_PKG_CONFIG],
2417[if test -n "$$1"; then
2418    pkg_cv_[]$1="$$1"
2419 elif test -n "$PKG_CONFIG"; then
2420    PKG_CHECK_EXISTS([$3],
2421                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
2422		     [pkg_failed=yes])
2423 else
2424    pkg_failed=untried
2425fi[]dnl
2426])# _PKG_CONFIG
2427
2428# _PKG_SHORT_ERRORS_SUPPORTED
2429# -----------------------------
2430AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
2431[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
2432if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
2433        _pkg_short_errors_supported=yes
2434else
2435        _pkg_short_errors_supported=no
2436fi[]dnl
2437])# _PKG_SHORT_ERRORS_SUPPORTED
2438
2439
2440# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2441# [ACTION-IF-NOT-FOUND])
2442#
2443#
2444# Note that if there is a possibility the first call to
2445# PKG_CHECK_MODULES might not happen, you should be sure to include an
2446# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2447#
2448#
2449# --------------------------------------------------------------
2450AC_DEFUN([PKG_CHECK_MODULES],
2451[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
2452AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
2453AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
2454
2455pkg_failed=no
2456AC_MSG_CHECKING([for $1])
2457
2458_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
2459_PKG_CONFIG([$1][_LIBS], [libs], [$2])
2460
2461m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
2462and $1[]_LIBS to avoid the need to call pkg-config.
2463See the pkg-config man page for more details.])
2464
2465if test $pkg_failed = yes; then
2466        _PKG_SHORT_ERRORS_SUPPORTED
2467        if test $_pkg_short_errors_supported = yes; then
2468	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
2469        else 
2470	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
2471        fi
2472	# Put the nasty error message in config.log where it belongs
2473	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
2474
2475	ifelse([$4], , [AC_MSG_ERROR(dnl
2476[Package requirements ($2) were not met:
2477
2478$$1_PKG_ERRORS
2479
2480Consider adjusting the PKG_CONFIG_PATH environment variable if you
2481installed software in a non-standard prefix.
2482
2483_PKG_TEXT
2484])],
2485		[AC_MSG_RESULT([no])
2486                $4])
2487elif test $pkg_failed = untried; then
2488	ifelse([$4], , [AC_MSG_FAILURE(dnl
2489[The pkg-config script could not be found or is too old.  Make sure it
2490is in your PATH or set the PKG_CONFIG environment variable to the full
2491path to pkg-config.
2492
2493_PKG_TEXT
2494
2495To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
2496		[$4])
2497else
2498	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
2499	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
2500        AC_MSG_RESULT([yes])
2501	ifelse([$3], , :, [$3])
2502fi[]dnl
2503])# PKG_CHECK_MODULES
2504
2505# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2506#
2507#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
2508#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
2509#                 Inc.
2510#   Written by Gordon Matzigkeit, 1996
2511#
2512# This file is free software; the Free Software Foundation gives
2513# unlimited permission to copy and/or distribute it, with or without
2514# modifications, as long as this notice is preserved.
2515
2516m4_define([_LT_COPYING], [dnl
2517#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
2518#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
2519#                 Inc.
2520#   Written by Gordon Matzigkeit, 1996
2521#
2522#   This file is part of GNU Libtool.
2523#
2524# GNU Libtool is free software; you can redistribute it and/or
2525# modify it under the terms of the GNU General Public License as
2526# published by the Free Software Foundation; either version 2 of
2527# the License, or (at your option) any later version.
2528#
2529# As a special exception to the GNU General Public License,
2530# if you distribute this file as part of a program or library that
2531# is built using GNU Libtool, you may include this file under the
2532# same distribution terms that you use for the rest of that program.
2533#
2534# GNU Libtool is distributed in the hope that it will be useful,
2535# but WITHOUT ANY WARRANTY; without even the implied warranty of
2536# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2537# GNU General Public License for more details.
2538#
2539# You should have received a copy of the GNU General Public License
2540# along with GNU Libtool; see the file COPYING.  If not, a copy
2541# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
2542# obtained by writing to the Free Software Foundation, Inc.,
2543# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2544])
2545
2546# serial 57 LT_INIT
2547
2548
2549# LT_PREREQ(VERSION)
2550# ------------------
2551# Complain and exit if this libtool version is less that VERSION.
2552m4_defun([LT_PREREQ],
2553[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
2554       [m4_default([$3],
2555		   [m4_fatal([Libtool version $1 or higher is required],
2556		             63)])],
2557       [$2])])
2558
2559
2560# _LT_CHECK_BUILDDIR
2561# ------------------
2562# Complain if the absolute build directory name contains unusual characters
2563m4_defun([_LT_CHECK_BUILDDIR],
2564[case `pwd` in
2565  *\ * | *\	*)
2566    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
2567esac
2568])
2569
2570
2571# LT_INIT([OPTIONS])
2572# ------------------
2573AC_DEFUN([LT_INIT],
2574[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
2575AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
2576AC_BEFORE([$0], [LT_LANG])dnl
2577AC_BEFORE([$0], [LT_OUTPUT])dnl
2578AC_BEFORE([$0], [LTDL_INIT])dnl
2579m4_require([_LT_CHECK_BUILDDIR])dnl
2580
2581dnl Autoconf doesn't catch unexpanded LT_ macros by default:
2582m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
2583m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
2584dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
2585dnl unless we require an AC_DEFUNed macro:
2586AC_REQUIRE([LTOPTIONS_VERSION])dnl
2587AC_REQUIRE([LTSUGAR_VERSION])dnl
2588AC_REQUIRE([LTVERSION_VERSION])dnl
2589AC_REQUIRE([LTOBSOLETE_VERSION])dnl
2590m4_require([_LT_PROG_LTMAIN])dnl
2591
2592_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
2593
2594dnl Parse OPTIONS
2595_LT_SET_OPTIONS([$0], [$1])
2596
2597# This can be used to rebuild libtool when needed
2598LIBTOOL_DEPS="$ltmain"
2599
2600# Always use our own libtool.
2601LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2602AC_SUBST(LIBTOOL)dnl
2603
2604_LT_SETUP
2605
2606# Only expand once:
2607m4_define([LT_INIT])
2608])# LT_INIT
2609
2610# Old names:
2611AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
2612AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
2613dnl aclocal-1.4 backwards compatibility:
2614dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
2615dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
2616
2617
2618# _LT_CC_BASENAME(CC)
2619# -------------------
2620# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
2621m4_defun([_LT_CC_BASENAME],
2622[for cc_temp in $1""; do
2623  case $cc_temp in
2624    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
2625    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
2626    \-*) ;;
2627    *) break;;
2628  esac
2629done
2630cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
2631])
2632
2633
2634# _LT_FILEUTILS_DEFAULTS
2635# ----------------------
2636# It is okay to use these file commands and assume they have been set
2637# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
2638m4_defun([_LT_FILEUTILS_DEFAULTS],
2639[: ${CP="cp -f"}
2640: ${MV="mv -f"}
2641: ${RM="rm -f"}
2642])# _LT_FILEUTILS_DEFAULTS
2643
2644
2645# _LT_SETUP
2646# ---------
2647m4_defun([_LT_SETUP],
2648[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2649AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2650AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
2651AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
2652
2653_LT_DECL([], [host_alias], [0], [The host system])dnl
2654_LT_DECL([], [host], [0])dnl
2655_LT_DECL([], [host_os], [0])dnl
2656dnl
2657_LT_DECL([], [build_alias], [0], [The build system])dnl
2658_LT_DECL([], [build], [0])dnl
2659_LT_DECL([], [build_os], [0])dnl
2660dnl
2661AC_REQUIRE([AC_PROG_CC])dnl
2662AC_REQUIRE([LT_PATH_LD])dnl
2663AC_REQUIRE([LT_PATH_NM])dnl
2664dnl
2665AC_REQUIRE([AC_PROG_LN_S])dnl
2666test -z "$LN_S" && LN_S="ln -s"
2667_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
2668dnl
2669AC_REQUIRE([LT_CMD_MAX_LEN])dnl
2670_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
2671_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
2672dnl
2673m4_require([_LT_FILEUTILS_DEFAULTS])dnl
2674m4_require([_LT_CHECK_SHELL_FEATURES])dnl
2675m4_require([_LT_CMD_RELOAD])dnl
2676m4_require([_LT_CHECK_MAGIC_METHOD])dnl
2677m4_require([_LT_CMD_OLD_ARCHIVE])dnl
2678m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
2679
2680_LT_CONFIG_LIBTOOL_INIT([
2681# See if we are running on zsh, and set the options which allow our
2682# commands through without removal of \ escapes INIT.
2683if test -n "\${ZSH_VERSION+set}" ; then
2684   setopt NO_GLOB_SUBST
2685fi
2686])
2687if test -n "${ZSH_VERSION+set}" ; then
2688   setopt NO_GLOB_SUBST
2689fi
2690
2691_LT_CHECK_OBJDIR
2692
2693m4_require([_LT_TAG_COMPILER])dnl
2694
2695case $host_os in
2696aix3*)
2697  # AIX sometimes has problems with the GCC collect2 program.  For some
2698  # reason, if we set the COLLECT_NAMES environment variable, the problems
2699  # vanish in a puff of smoke.
2700  if test "X${COLLECT_NAMES+set}" != Xset; then
2701    COLLECT_NAMES=
2702    export COLLECT_NAMES
2703  fi
2704  ;;
2705esac
2706
2707# Global variables:
2708ofile=libtool
2709can_build_shared=yes
2710
2711# All known linkers require a `.a' archive for static linking (except MSVC,
2712# which needs '.lib').
2713libext=a
2714
2715with_gnu_ld="$lt_cv_prog_gnu_ld"
2716
2717old_CC="$CC"
2718old_CFLAGS="$CFLAGS"
2719
2720# Set sane defaults for various variables
2721test -z "$CC" && CC=cc
2722test -z "$LTCC" && LTCC=$CC
2723test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
2724test -z "$LD" && LD=ld
2725test -z "$ac_objext" && ac_objext=o
2726
2727_LT_CC_BASENAME([$compiler])
2728
2729# Only perform the check for file, if the check method requires it
2730test -z "$MAGIC_CMD" && MAGIC_CMD=file
2731case $deplibs_check_method in
2732file_magic*)
2733  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
2734    _LT_PATH_MAGIC
2735  fi
2736  ;;
2737esac
2738
2739# Use C for the default configuration in the libtool script
2740LT_SUPPORTED_TAG([CC])
2741_LT_LANG_C_CONFIG
2742_LT_LANG_DEFAULT_CONFIG
2743_LT_CONFIG_COMMANDS
2744])# _LT_SETUP
2745
2746
2747# _LT_PREPARE_SED_QUOTE_VARS
2748# --------------------------
2749# Define a few sed substitution that help us do robust quoting.
2750m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
2751[# Backslashify metacharacters that are still active within
2752# double-quoted strings.
2753sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
2754
2755# Same as above, but do not quote variable references.
2756double_quote_subst='s/\([["`\\]]\)/\\\1/g'
2757
2758# Sed substitution to delay expansion of an escaped shell variable in a
2759# double_quote_subst'ed string.
2760delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
2761
2762# Sed substitution to delay expansion of an escaped single quote.
2763delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
2764
2765# Sed substitution to avoid accidental globbing in evaled expressions
2766no_glob_subst='s/\*/\\\*/g'
2767])
2768
2769# _LT_PROG_LTMAIN
2770# ---------------
2771# Note that this code is called both from `configure', and `config.status'
2772# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
2773# `config.status' has no value for ac_aux_dir unless we are using Automake,
2774# so we pass a copy along to make sure it has a sensible value anyway.
2775m4_defun([_LT_PROG_LTMAIN],
2776[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
2777_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
2778ltmain="$ac_aux_dir/ltmain.sh"
2779])# _LT_PROG_LTMAIN
2780
2781
2782
2783# So that we can recreate a full libtool script including additional
2784# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
2785# in macros and then make a single call at the end using the `libtool'
2786# label.
2787
2788
2789# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
2790# ----------------------------------------
2791# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2792m4_define([_LT_CONFIG_LIBTOOL_INIT],
2793[m4_ifval([$1],
2794          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
2795                     [$1
2796])])])
2797
2798# Initialize.
2799m4_define([_LT_OUTPUT_LIBTOOL_INIT])
2800
2801
2802# _LT_CONFIG_LIBTOOL([COMMANDS])
2803# ------------------------------
2804# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
2805m4_define([_LT_CONFIG_LIBTOOL],
2806[m4_ifval([$1],
2807          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
2808                     [$1
2809])])])
2810
2811# Initialize.
2812m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
2813
2814
2815# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
2816# -----------------------------------------------------
2817m4_defun([_LT_CONFIG_SAVE_COMMANDS],
2818[_LT_CONFIG_LIBTOOL([$1])
2819_LT_CONFIG_LIBTOOL_INIT([$2])
2820])
2821
2822
2823# _LT_FORMAT_COMMENT([COMMENT])
2824# -----------------------------
2825# Add leading comment marks to the start of each line, and a trailing
2826# full-stop to the whole comment if one is not present already.
2827m4_define([_LT_FORMAT_COMMENT],
2828[m4_ifval([$1], [
2829m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
2830              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
2831)])
2832
2833
2834
2835
2836
2837# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
2838# -------------------------------------------------------------------
2839# CONFIGNAME is the name given to the value in the libtool script.
2840# VARNAME is the (base) name used in the configure script.
2841# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
2842# VARNAME.  Any other value will be used directly.
2843m4_define([_LT_DECL],
2844[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
2845    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
2846	[m4_ifval([$1], [$1], [$2])])
2847    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
2848    m4_ifval([$4],
2849	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
2850    lt_dict_add_subkey([lt_decl_dict], [$2],
2851	[tagged?], [m4_ifval([$5], [yes], [no])])])
2852])
2853
2854
2855# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
2856# --------------------------------------------------------
2857m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
2858
2859
2860# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
2861# ------------------------------------------------
2862m4_define([lt_decl_tag_varnames],
2863[_lt_decl_filter([tagged?], [yes], $@)])
2864
2865
2866# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
2867# ---------------------------------------------------------
2868m4_define([_lt_decl_filter],
2869[m4_case([$#],
2870  [0], [m4_fatal([$0: too few arguments: $#])],
2871  [1], [m4_fatal([$0: too few arguments: $#: $1])],
2872  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
2873  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
2874  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
2875])
2876
2877
2878# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
2879# --------------------------------------------------
2880m4_define([lt_decl_quote_varnames],
2881[_lt_decl_filter([value], [1], $@)])
2882
2883
2884# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
2885# ---------------------------------------------------
2886m4_define([lt_decl_dquote_varnames],
2887[_lt_decl_filter([value], [2], $@)])
2888
2889
2890# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
2891# ---------------------------------------------------
2892m4_define([lt_decl_varnames_tagged],
2893[m4_assert([$# <= 2])dnl
2894_$0(m4_quote(m4_default([$1], [[, ]])),
2895    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
2896    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
2897m4_define([_lt_decl_varnames_tagged],
2898[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
2899
2900
2901# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
2902# ------------------------------------------------
2903m4_define([lt_decl_all_varnames],
2904[_$0(m4_quote(m4_default([$1], [[, ]])),
2905     m4_if([$2], [],
2906	   m4_quote(lt_decl_varnames),
2907	m4_quote(m4_shift($@))))[]dnl
2908])
2909m4_define([_lt_decl_all_varnames],
2910[lt_join($@, lt_decl_varnames_tagged([$1],
2911			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
2912])
2913
2914
2915# _LT_CONFIG_STATUS_DECLARE([VARNAME])
2916# ------------------------------------
2917# Quote a variable value, and forward it to `config.status' so that its
2918# declaration there will have the same value as in `configure'.  VARNAME
2919# must have a single quote delimited value for this to work.
2920m4_define([_LT_CONFIG_STATUS_DECLARE],
2921[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
2922
2923
2924# _LT_CONFIG_STATUS_DECLARATIONS
2925# ------------------------------
2926# We delimit libtool config variables with single quotes, so when
2927# we write them to config.status, we have to be sure to quote all
2928# embedded single quotes properly.  In configure, this macro expands
2929# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
2930#
2931#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
2932m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
2933[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
2934    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
2935
2936
2937# _LT_LIBTOOL_TAGS
2938# ----------------
2939# Output comment and list of tags supported by the script
2940m4_defun([_LT_LIBTOOL_TAGS],
2941[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
2942available_tags="_LT_TAGS"dnl
2943])
2944
2945
2946# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
2947# -----------------------------------
2948# Extract the dictionary values for VARNAME (optionally with TAG) and
2949# expand to a commented shell variable setting:
2950#
2951#    # Some comment about what VAR is for.
2952#    visible_name=$lt_internal_name
2953m4_define([_LT_LIBTOOL_DECLARE],
2954[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
2955					   [description])))[]dnl
2956m4_pushdef([_libtool_name],
2957    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
2958m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
2959    [0], [_libtool_name=[$]$1],
2960    [1], [_libtool_name=$lt_[]$1],
2961    [2], [_libtool_name=$lt_[]$1],
2962    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
2963m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
2964])
2965
2966
2967# _LT_LIBTOOL_CONFIG_VARS
2968# -----------------------
2969# Produce commented declarations of non-tagged libtool config variables
2970# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
2971# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
2972# section) are produced by _LT_LIBTOOL_TAG_VARS.
2973m4_defun([_LT_LIBTOOL_CONFIG_VARS],
2974[m4_foreach([_lt_var],
2975    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
2976    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
2977
2978
2979# _LT_LIBTOOL_TAG_VARS(TAG)
2980# -------------------------
2981m4_define([_LT_LIBTOOL_TAG_VARS],
2982[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
2983    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
2984
2985
2986# _LT_TAGVAR(VARNAME, [TAGNAME])
2987# ------------------------------
2988m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
2989
2990
2991# _LT_CONFIG_COMMANDS
2992# -------------------
2993# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
2994# variables for single and double quote escaping we saved from calls
2995# to _LT_DECL, we can put quote escaped variables declarations
2996# into `config.status', and then the shell code to quote escape them in
2997# for loops in `config.status'.  Finally, any additional code accumulated
2998# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
2999m4_defun([_LT_CONFIG_COMMANDS],
3000[AC_PROVIDE_IFELSE([LT_OUTPUT],
3001	dnl If the libtool generation code has been placed in $CONFIG_LT,
3002	dnl instead of duplicating it all over again into config.status,
3003	dnl then we will have config.status run $CONFIG_LT later, so it
3004	dnl needs to know what name is stored there:
3005        [AC_CONFIG_COMMANDS([libtool],
3006            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
3007    dnl If the libtool generation code is destined for config.status,
3008    dnl expand the accumulated commands and init code now:
3009    [AC_CONFIG_COMMANDS([libtool],
3010        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
3011])#_LT_CONFIG_COMMANDS
3012
3013
3014# Initialize.
3015m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
3016[
3017
3018# The HP-UX ksh and POSIX shell print the target directory to stdout
3019# if CDPATH is set.
3020(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
3021
3022sed_quote_subst='$sed_quote_subst'
3023double_quote_subst='$double_quote_subst'
3024delay_variable_subst='$delay_variable_subst'
3025_LT_CONFIG_STATUS_DECLARATIONS
3026LTCC='$LTCC'
3027LTCFLAGS='$LTCFLAGS'
3028compiler='$compiler_DEFAULT'
3029
3030# A function that is used when there is no print builtin or printf.
3031func_fallback_echo ()
3032{
3033  eval 'cat <<_LTECHO_EOF
3034\$[]1
3035_LTECHO_EOF'
3036}
3037
3038# Quote evaled strings.
3039for var in lt_decl_all_varnames([[ \
3040]], lt_decl_quote_varnames); do
3041    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
3042    *[[\\\\\\\`\\"\\\$]]*)
3043      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
3044      ;;
3045    *)
3046      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
3047      ;;
3048    esac
3049done
3050
3051# Double-quote double-evaled strings.
3052for var in lt_decl_all_varnames([[ \
3053]], lt_decl_dquote_varnames); do
3054    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
3055    *[[\\\\\\\`\\"\\\$]]*)
3056      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
3057      ;;
3058    *)
3059      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
3060      ;;
3061    esac
3062done
3063
3064_LT_OUTPUT_LIBTOOL_INIT
3065])
3066
3067# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
3068# ------------------------------------
3069# Generate a child script FILE with all initialization necessary to
3070# reuse the environment learned by the parent script, and make the
3071# file executable.  If COMMENT is supplied, it is inserted after the
3072# `#!' sequence but before initialization text begins.  After this
3073# macro, additional text can be appended to FILE to form the body of
3074# the child script.  The macro ends with non-zero status if the
3075# file could not be fully written (such as if the disk is full).
3076m4_ifdef([AS_INIT_GENERATED],
3077[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
3078[m4_defun([_LT_GENERATED_FILE_INIT],
3079[m4_require([AS_PREPARE])]dnl
3080[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
3081[lt_write_fail=0
3082cat >$1 <<_ASEOF || lt_write_fail=1
3083#! $SHELL
3084# Generated by $as_me.
3085$2
3086SHELL=\${CONFIG_SHELL-$SHELL}
3087export SHELL
3088_ASEOF
3089cat >>$1 <<\_ASEOF || lt_write_fail=1
3090AS_SHELL_SANITIZE
3091_AS_PREPARE
3092exec AS_MESSAGE_FD>&1
3093_ASEOF
3094test $lt_write_fail = 0 && chmod +x $1[]dnl
3095m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
3096
3097# LT_OUTPUT
3098# ---------
3099# This macro allows early generation of the libtool script (before
3100# AC_OUTPUT is called), incase it is used in configure for compilation
3101# tests.
3102AC_DEFUN([LT_OUTPUT],
3103[: ${CONFIG_LT=./config.lt}
3104AC_MSG_NOTICE([creating $CONFIG_LT])
3105_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
3106[# Run this file to recreate a libtool stub with the current configuration.])
3107
3108cat >>"$CONFIG_LT" <<\_LTEOF
3109lt_cl_silent=false
3110exec AS_MESSAGE_LOG_FD>>config.log
3111{
3112  echo
3113  AS_BOX([Running $as_me.])
3114} >&AS_MESSAGE_LOG_FD
3115
3116lt_cl_help="\
3117\`$as_me' creates a local libtool stub from the current configuration,
3118for use in further configure time tests before the real libtool is
3119generated.
3120
3121Usage: $[0] [[OPTIONS]]
3122
3123  -h, --help      print this help, then exit
3124  -V, --version   print version number, then exit
3125  -q, --quiet     do not print progress messages
3126  -d, --debug     don't remove temporary files
3127
3128Report bugs to <bug-libtool@gnu.org>."
3129
3130lt_cl_version="\
3131m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
3132m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
3133configured by $[0], generated by m4_PACKAGE_STRING.
3134
3135Copyright (C) 2010 Free Software Foundation, Inc.
3136This config.lt script is free software; the Free Software Foundation
3137gives unlimited permision to copy, distribute and modify it."
3138
3139while test $[#] != 0
3140do
3141  case $[1] in
3142    --version | --v* | -V )
3143      echo "$lt_cl_version"; exit 0 ;;
3144    --help | --h* | -h )
3145      echo "$lt_cl_help"; exit 0 ;;
3146    --debug | --d* | -d )
3147      debug=: ;;
3148    --quiet | --q* | --silent | --s* | -q )
3149      lt_cl_silent=: ;;
3150
3151    -*) AC_MSG_ERROR([unrecognized option: $[1]
3152Try \`$[0] --help' for more information.]) ;;
3153
3154    *) AC_MSG_ERROR([unrecognized argument: $[1]
3155Try \`$[0] --help' for more information.]) ;;
3156  esac
3157  shift
3158done
3159
3160if $lt_cl_silent; then
3161  exec AS_MESSAGE_FD>/dev/null
3162fi
3163_LTEOF
3164
3165cat >>"$CONFIG_LT" <<_LTEOF
3166_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
3167_LTEOF
3168
3169cat >>"$CONFIG_LT" <<\_LTEOF
3170AC_MSG_NOTICE([creating $ofile])
3171_LT_OUTPUT_LIBTOOL_COMMANDS
3172AS_EXIT(0)
3173_LTEOF
3174chmod +x "$CONFIG_LT"
3175
3176# configure is writing to config.log, but config.lt does its own redirection,
3177# appending to config.log, which fails on DOS, as config.log is still kept
3178# open by configure.  Here we exec the FD to /dev/null, effectively closing
3179# config.log, so it can be properly (re)opened and appended to by config.lt.
3180lt_cl_success=:
3181test "$silent" = yes &&
3182  lt_config_lt_args="$lt_config_lt_args --quiet"
3183exec AS_MESSAGE_LOG_FD>/dev/null
3184$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
3185exec AS_MESSAGE_LOG_FD>>config.log
3186$lt_cl_success || AS_EXIT(1)
3187])# LT_OUTPUT
3188
3189
3190# _LT_CONFIG(TAG)
3191# ---------------
3192# If TAG is the built-in tag, create an initial libtool script with a
3193# default configuration from the untagged config vars.  Otherwise add code
3194# to config.status for appending the configuration named by TAG from the
3195# matching tagged config vars.
3196m4_defun([_LT_CONFIG],
3197[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3198_LT_CONFIG_SAVE_COMMANDS([
3199  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
3200  m4_if(_LT_TAG, [C], [
3201    # See if we are running on zsh, and set the options which allow our
3202    # commands through without removal of \ escapes.
3203    if test -n "${ZSH_VERSION+set}" ; then
3204      setopt NO_GLOB_SUBST
3205    fi
3206
3207    cfgfile="${ofile}T"
3208    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
3209    $RM "$cfgfile"
3210
3211    cat <<_LT_EOF >> "$cfgfile"
3212#! $SHELL
3213
3214# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3215# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
3216# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3217# NOTE: Changes made to this file will be lost: look at ltmain.sh.
3218#
3219_LT_COPYING
3220_LT_LIBTOOL_TAGS
3221
3222# ### BEGIN LIBTOOL CONFIG
3223_LT_LIBTOOL_CONFIG_VARS
3224_LT_LIBTOOL_TAG_VARS
3225# ### END LIBTOOL CONFIG
3226
3227_LT_EOF
3228
3229  case $host_os in
3230  aix3*)
3231    cat <<\_LT_EOF >> "$cfgfile"
3232# AIX sometimes has problems with the GCC collect2 program.  For some
3233# reason, if we set the COLLECT_NAMES environment variable, the problems
3234# vanish in a puff of smoke.
3235if test "X${COLLECT_NAMES+set}" != Xset; then
3236  COLLECT_NAMES=
3237  export COLLECT_NAMES
3238fi
3239_LT_EOF
3240    ;;
3241  esac
3242
3243  _LT_PROG_LTMAIN
3244
3245  # We use sed instead of cat because bash on DJGPP gets confused if
3246  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
3247  # text mode, it properly converts lines to CR/LF.  This bash problem
3248  # is reportedly fixed, but why not run on old versions too?
3249  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
3250    || (rm -f "$cfgfile"; exit 1)
3251
3252  _LT_PROG_XSI_SHELLFNS
3253
3254  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
3255    || (rm -f "$cfgfile"; exit 1)
3256
3257  mv -f "$cfgfile" "$ofile" ||
3258    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
3259  chmod +x "$ofile"
3260],
3261[cat <<_LT_EOF >> "$ofile"
3262
3263dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
3264dnl in a comment (ie after a #).
3265# ### BEGIN LIBTOOL TAG CONFIG: $1
3266_LT_LIBTOOL_TAG_VARS(_LT_TAG)
3267# ### END LIBTOOL TAG CONFIG: $1
3268_LT_EOF
3269])dnl /m4_if
3270],
3271[m4_if([$1], [], [
3272    PACKAGE='$PACKAGE'
3273    VERSION='$VERSION'
3274    TIMESTAMP='$TIMESTAMP'
3275    RM='$RM'
3276    ofile='$ofile'], [])
3277])dnl /_LT_CONFIG_SAVE_COMMANDS
3278])# _LT_CONFIG
3279
3280
3281# LT_SUPPORTED_TAG(TAG)
3282# ---------------------
3283# Trace this macro to discover what tags are supported by the libtool
3284# --tag option, using:
3285#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
3286AC_DEFUN([LT_SUPPORTED_TAG], [])
3287
3288
3289# C support is built-in for now
3290m4_define([_LT_LANG_C_enabled], [])
3291m4_define([_LT_TAGS], [])
3292
3293
3294# LT_LANG(LANG)
3295# -------------
3296# Enable libtool support for the given language if not already enabled.
3297AC_DEFUN([LT_LANG],
3298[AC_BEFORE([$0], [LT_OUTPUT])dnl
3299m4_case([$1],
3300  [C],			[_LT_LANG(C)],
3301  [C++],		[_LT_LANG(CXX)],
3302  [Java],		[_LT_LANG(GCJ)],
3303  [Fortran 77],		[_LT_LANG(F77)],
3304  [Fortran],		[_LT_LANG(FC)],
3305  [Windows Resource],	[_LT_LANG(RC)],
3306  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
3307    [_LT_LANG($1)],
3308    [m4_fatal([$0: unsupported language: "$1"])])])dnl
3309])# LT_LANG
3310
3311
3312# _LT_LANG(LANGNAME)
3313# ------------------
3314m4_defun([_LT_LANG],
3315[m4_ifdef([_LT_LANG_]$1[_enabled], [],
3316  [LT_SUPPORTED_TAG([$1])dnl
3317  m4_append([_LT_TAGS], [$1 ])dnl
3318  m4_define([_LT_LANG_]$1[_enabled], [])dnl
3319  _LT_LANG_$1_CONFIG($1)])dnl
3320])# _LT_LANG
3321
3322
3323# _LT_LANG_DEFAULT_CONFIG
3324# -----------------------
3325m4_defun([_LT_LANG_DEFAULT_CONFIG],
3326[AC_PROVIDE_IFELSE([AC_PROG_CXX],
3327  [LT_LANG(CXX)],
3328  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
3329
3330AC_PROVIDE_IFELSE([AC_PROG_F77],
3331  [LT_LANG(F77)],
3332  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
3333
3334AC_PROVIDE_IFELSE([AC_PROG_FC],
3335  [LT_LANG(FC)],
3336  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
3337
3338dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
3339dnl pulling things in needlessly.
3340AC_PROVIDE_IFELSE([AC_PROG_GCJ],
3341  [LT_LANG(GCJ)],
3342  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
3343    [LT_LANG(GCJ)],
3344    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
3345      [LT_LANG(GCJ)],
3346      [m4_ifdef([AC_PROG_GCJ],
3347	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
3348       m4_ifdef([A][M_PROG_GCJ],
3349	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
3350       m4_ifdef([LT_PROG_GCJ],
3351	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
3352
3353AC_PROVIDE_IFELSE([LT_PROG_RC],
3354  [LT_LANG(RC)],
3355  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
3356])# _LT_LANG_DEFAULT_CONFIG
3357
3358# Obsolete macros:
3359AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
3360AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
3361AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
3362AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
3363AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
3364dnl aclocal-1.4 backwards compatibility:
3365dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
3366dnl AC_DEFUN([AC_LIBTOOL_F77], [])
3367dnl AC_DEFUN([AC_LIBTOOL_FC], [])
3368dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
3369dnl AC_DEFUN([AC_LIBTOOL_RC], [])
3370
3371
3372# _LT_TAG_COMPILER
3373# ----------------
3374m4_defun([_LT_TAG_COMPILER],
3375[AC_REQUIRE([AC_PROG_CC])dnl
3376
3377_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
3378_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
3379_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
3380_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
3381
3382# If no C compiler was specified, use CC.
3383LTCC=${LTCC-"$CC"}
3384
3385# If no C compiler flags were specified, use CFLAGS.
3386LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
3387
3388# Allow CC to be a program name with arguments.
3389compiler=$CC
3390])# _LT_TAG_COMPILER
3391
3392
3393# _LT_COMPILER_BOILERPLATE
3394# ------------------------
3395# Check for compiler boilerplate output or warnings with
3396# the simple compiler test code.
3397m4_defun([_LT_COMPILER_BOILERPLATE],
3398[m4_require([_LT_DECL_SED])dnl
3399ac_outfile=conftest.$ac_objext
3400echo "$lt_simple_compile_test_code" >conftest.$ac_ext
3401eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
3402_lt_compiler_boilerplate=`cat conftest.err`
3403$RM conftest*
3404])# _LT_COMPILER_BOILERPLATE
3405
3406
3407# _LT_LINKER_BOILERPLATE
3408# ----------------------
3409# Check for linker boilerplate output or warnings with
3410# the simple link test code.
3411m4_defun([_LT_LINKER_BOILERPLATE],
3412[m4_require([_LT_DECL_SED])dnl
3413ac_outfile=conftest.$ac_objext
3414echo "$lt_simple_link_test_code" >conftest.$ac_ext
3415eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
3416_lt_linker_boilerplate=`cat conftest.err`
3417$RM -r conftest*
3418])# _LT_LINKER_BOILERPLATE
3419
3420# _LT_REQUIRED_DARWIN_CHECKS
3421# -------------------------
3422m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
3423  case $host_os in
3424    rhapsody* | darwin*)
3425    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
3426    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
3427    AC_CHECK_TOOL([LIPO], [lipo], [:])
3428    AC_CHECK_TOOL([OTOOL], [otool], [:])
3429    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
3430    _LT_DECL([], [DSYMUTIL], [1],
3431      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
3432    _LT_DECL([], [NMEDIT], [1],
3433      [Tool to change global to local symbols on Mac OS X])
3434    _LT_DECL([], [LIPO], [1],
3435      [Tool to manipulate fat objects and archives on Mac OS X])
3436    _LT_DECL([], [OTOOL], [1],
3437      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
3438    _LT_DECL([], [OTOOL64], [1],
3439      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
3440
3441    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
3442      [lt_cv_apple_cc_single_mod=no
3443      if test -z "${LT_MULTI_MODULE}"; then
3444	# By default we will add the -single_module flag. You can override
3445	# by either setting the environment variable LT_MULTI_MODULE
3446	# non-empty at configure time, or by adding -multi_module to the
3447	# link flags.
3448	rm -rf libconftest.dylib*
3449	echo "int foo(void){return 1;}" > conftest.c
3450	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
3451-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
3452	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
3453	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
3454        _lt_result=$?
3455	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
3456	  lt_cv_apple_cc_single_mod=yes
3457	else
3458	  cat conftest.err >&AS_MESSAGE_LOG_FD
3459	fi
3460	rm -rf libconftest.dylib*
3461	rm -f conftest.*
3462      fi])
3463    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
3464      [lt_cv_ld_exported_symbols_list],
3465      [lt_cv_ld_exported_symbols_list=no
3466      save_LDFLAGS=$LDFLAGS
3467      echo "_main" > conftest.sym
3468      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
3469      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3470	[lt_cv_ld_exported_symbols_list=yes],
3471	[lt_cv_ld_exported_symbols_list=no])
3472	LDFLAGS="$save_LDFLAGS"
3473    ])
3474    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
3475      [lt_cv_ld_force_load=no
3476      cat > conftest.c << _LT_EOF
3477int forced_loaded() { return 2;}
3478_LT_EOF
3479      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
3480      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
3481      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
3482      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
3483      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
3484      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
3485      cat > conftest.c << _LT_EOF
3486int main() { return 0;}
3487_LT_EOF
3488      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
3489      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
3490      _lt_result=$?
3491      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
3492	lt_cv_ld_force_load=yes
3493      else
3494	cat conftest.err >&AS_MESSAGE_LOG_FD
3495      fi
3496        rm -f conftest.err libconftest.a conftest conftest.c
3497        rm -rf conftest.dSYM
3498    ])
3499    case $host_os in
3500    rhapsody* | darwin1.[[012]])
3501      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
3502    darwin1.*)
3503      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3504    darwin*) # darwin 5.x on
3505      # if running on 10.5 or later, the deployment target defaults
3506      # to the OS version, if on x86, and 10.4, the deployment
3507      # target defaults to 10.4. Don't you love it?
3508      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
3509	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
3510	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3511	10.[[012]]*)
3512	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3513	10.*)
3514	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3515      esac
3516    ;;
3517  esac
3518    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
3519      _lt_dar_single_mod='$single_module'
3520    fi
3521    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
3522      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
3523    else
3524      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
3525    fi
3526    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
3527      _lt_dsymutil='~$DSYMUTIL $lib || :'
3528    else
3529      _lt_dsymutil=
3530    fi
3531    ;;
3532  esac
3533])
3534
3535
3536# _LT_DARWIN_LINKER_FEATURES
3537# --------------------------
3538# Checks for linker and compiler features on darwin
3539m4_defun([_LT_DARWIN_LINKER_FEATURES],
3540[
3541  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
3542  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
3543  _LT_TAGVAR(hardcode_direct, $1)=no
3544  _LT_TAGVAR(hardcode_automatic, $1)=yes
3545  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3546  if test "$lt_cv_ld_force_load" = "yes"; then
3547    _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\"`'
3548  else
3549    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
3550  fi
3551  _LT_TAGVAR(link_all_deplibs, $1)=yes
3552  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
3553  case $cc_basename in
3554     ifort*) _lt_dar_can_shared=yes ;;
3555     *) _lt_dar_can_shared=$GCC ;;
3556  esac
3557  if test "$_lt_dar_can_shared" = "yes"; then
3558    output_verbose_link_cmd=func_echo_all
3559    _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}"
3560    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
3561    _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}"
3562    _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}"
3563    m4_if([$1], [CXX],
3564[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
3565      _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}"
3566      _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}"
3567    fi
3568],[])
3569  else
3570  _LT_TAGVAR(ld_shlibs, $1)=no
3571  fi
3572])
3573
3574# _LT_SYS_MODULE_PATH_AIX
3575# -----------------------
3576# Links a minimal program and checks the executable
3577# for the system default hardcoded library path. In most cases,
3578# this is /usr/lib:/lib, but when the MPI compilers are used
3579# the location of the communication and MPI libs are included too.
3580# If we don't find anything, use the default library path according
3581# to the aix ld manual.
3582m4_defun([_LT_SYS_MODULE_PATH_AIX],
3583[m4_require([_LT_DECL_SED])dnl
3584AC_LINK_IFELSE(AC_LANG_PROGRAM,[
3585lt_aix_libpath_sed='
3586    /Import File Strings/,/^$/ {
3587	/^0/ {
3588	    s/^0  *\(.*\)$/\1/
3589	    p
3590	}
3591    }'
3592aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3593# Check for a 64-bit object if we didn't find anything.
3594if test -z "$aix_libpath"; then
3595  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3596fi],[])
3597if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
3598])# _LT_SYS_MODULE_PATH_AIX
3599
3600
3601# _LT_SHELL_INIT(ARG)
3602# -------------------
3603m4_define([_LT_SHELL_INIT],
3604[m4_divert_text([M4SH-INIT], [$1
3605])])# _LT_SHELL_INIT
3606
3607
3608
3609# _LT_PROG_ECHO_BACKSLASH
3610# -----------------------
3611# Find how we can fake an echo command that does not interpret backslash.
3612# In particular, with Autoconf 2.60 or later we add some code to the start
3613# of the generated configure script which will find a shell with a builtin
3614# printf (which we can use as an echo command).
3615m4_defun([_LT_PROG_ECHO_BACKSLASH],
3616[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
3617ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
3618ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
3619
3620AC_MSG_CHECKING([how to print strings])
3621# Test print first, because it will be a builtin if present.
3622if test "X`print -r -- -n 2>/dev/null`" = X-n && \
3623   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
3624  ECHO='print -r --'
3625elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
3626  ECHO='printf %s\n'
3627else
3628  # Use this function as a fallback that always works.
3629  func_fallback_echo ()
3630  {
3631    eval 'cat <<_LTECHO_EOF
3632$[]1
3633_LTECHO_EOF'
3634  }
3635  ECHO='func_fallback_echo'
3636fi
3637
3638# func_echo_all arg...
3639# Invoke $ECHO with all args, space-separated.
3640func_echo_all ()
3641{
3642    $ECHO "$*" 
3643}
3644
3645case "$ECHO" in
3646  printf*) AC_MSG_RESULT([printf]) ;;
3647  print*) AC_MSG_RESULT([print -r]) ;;
3648  *) AC_MSG_RESULT([cat]) ;;
3649esac
3650
3651m4_ifdef([_AS_DETECT_SUGGESTED],
3652[_AS_DETECT_SUGGESTED([
3653  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
3654    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
3655    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
3656    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
3657    PATH=/empty FPATH=/empty; export PATH FPATH
3658    test "X`printf %s $ECHO`" = "X$ECHO" \
3659      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
3660
3661_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
3662_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
3663])# _LT_PROG_ECHO_BACKSLASH
3664
3665
3666# _LT_ENABLE_LOCK
3667# ---------------
3668m4_defun([_LT_ENABLE_LOCK],
3669[AC_ARG_ENABLE([libtool-lock],
3670  [AS_HELP_STRING([--disable-libtool-lock],
3671    [avoid locking (might break parallel builds)])])
3672test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
3673
3674# Some flags need to be propagated to the compiler or linker for good
3675# libtool support.
3676case $host in
3677ia64-*-hpux*)
3678  # Find out which ABI we are using.
3679  echo 'int i;' > conftest.$ac_ext
3680  if AC_TRY_EVAL(ac_compile); then
3681    case `/usr/bin/file conftest.$ac_objext` in
3682      *ELF-32*)
3683	HPUX_IA64_MODE="32"
3684	;;
3685      *ELF-64*)
3686	HPUX_IA64_MODE="64"
3687	;;
3688    esac
3689  fi
3690  rm -rf conftest*
3691  ;;
3692*-*-irix6*)
3693  # Find out which ABI we are using.
3694  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
3695  if AC_TRY_EVAL(ac_compile); then
3696    if test "$lt_cv_prog_gnu_ld" = yes; then
3697      case `/usr/bin/file conftest.$ac_objext` in
3698	*32-bit*)
3699	  LD="${LD-ld} -melf32bsmip"
3700	  ;;
3701	*N32*)
3702	  LD="${LD-ld} -melf32bmipn32"
3703	  ;;
3704	*64-bit*)
3705	  LD="${LD-ld} -melf64bmip"
3706	;;
3707      esac
3708    else
3709      case `/usr/bin/file conftest.$ac_objext` in
3710	*32-bit*)
3711	  LD="${LD-ld} -32"
3712	  ;;
3713	*N32*)
3714	  LD="${LD-ld} -n32"
3715	  ;;
3716	*64-bit*)
3717	  LD="${LD-ld} -64"
3718	  ;;
3719      esac
3720    fi
3721  fi
3722  rm -rf conftest*
3723  ;;
3724
3725x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
3726s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
3727  # Find out which ABI we are using.
3728  echo 'int i;' > conftest.$ac_ext
3729  if AC_TRY_EVAL(ac_compile); then
3730    case `/usr/bin/file conftest.o` in
3731      *32-bit*)
3732	case $host in
3733	  x86_64-*kfreebsd*-gnu)
3734	    LD="${LD-ld} -m elf_i386_fbsd"
3735	    ;;
3736	  x86_64-*linux*)
3737	    LD="${LD-ld} -m elf_i386"
3738	    ;;
3739	  ppc64-*linux*|powerpc64-*linux*)
3740	    LD="${LD-ld} -m elf32ppclinux"
3741	    ;;
3742	  s390x-*linux*)
3743	    LD="${LD-ld} -m elf_s390"
3744	    ;;
3745	  sparc64-*linux*)
3746	    LD="${LD-ld} -m elf32_sparc"
3747	    ;;
3748	esac
3749	;;
3750      *64-bit*)
3751	case $host in
3752	  x86_64-*kfreebsd*-gnu)
3753	    LD="${LD-ld} -m elf_x86_64_fbsd"
3754	    ;;
3755	  x86_64-*linux*)
3756	    LD="${LD-ld} -m elf_x86_64"
3757	    ;;
3758	  ppc*-*linux*|powerpc*-*linux*)
3759	    LD="${LD-ld} -m elf64ppc"
3760	    ;;
3761	  s390*-*linux*|s390*-*tpf*)
3762	    LD="${LD-ld} -m elf64_s390"
3763	    ;;
3764	  sparc*-*linux*)
3765	    LD="${LD-ld} -m elf64_sparc"
3766	    ;;
3767	esac
3768	;;
3769    esac
3770  fi
3771  rm -rf conftest*
3772  ;;
3773
3774*-*-sco3.2v5*)
3775  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
3776  SAVE_CFLAGS="$CFLAGS"
3777  CFLAGS="$CFLAGS -belf"
3778  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
3779    [AC_LANG_PUSH(C)
3780     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
3781     AC_LANG_POP])
3782  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
3783    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
3784    CFLAGS="$SAVE_CFLAGS"
3785  fi
3786  ;;
3787sparc*-*solaris*)
3788  # Find out which ABI we are using.
3789  echo 'int i;' > conftest.$ac_ext
3790  if AC_TRY_EVAL(ac_compile); then
3791    case `/usr/bin/file conftest.o` in
3792    *64-bit*)
3793      case $lt_cv_prog_gnu_ld in
3794      yes*) LD="${LD-ld} -m elf64_sparc" ;;
3795      *)
3796	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
3797	  LD="${LD-ld} -64"
3798	fi
3799	;;
3800      esac
3801      ;;
3802    esac
3803  fi
3804  rm -rf conftest*
3805  ;;
3806esac
3807
3808need_locks="$enable_libtool_lock"
3809])# _LT_ENABLE_LOCK
3810
3811
3812# _LT_CMD_OLD_ARCHIVE
3813# -------------------
3814m4_defun([_LT_CMD_OLD_ARCHIVE],
3815[AC_CHECK_TOOL(AR, ar, false)
3816test -z "$AR" && AR=ar
3817test -z "$AR_FLAGS" && AR_FLAGS=cru
3818_LT_DECL([], [AR], [1], [The archiver])
3819_LT_DECL([], [AR_FLAGS], [1])
3820
3821AC_CHECK_TOOL(STRIP, strip, :)
3822test -z "$STRIP" && STRIP=:
3823_LT_DECL([], [STRIP], [1], [A symbol stripping program])
3824
3825AC_CHECK_TOOL(RANLIB, ranlib, :)
3826test -z "$RANLIB" && RANLIB=:
3827_LT_DECL([], [RANLIB], [1],
3828    [Commands used to install an old-style archive])
3829
3830# Determine commands to create old-style static archives.
3831old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
3832old_postinstall_cmds='chmod 644 $oldlib'
3833old_postuninstall_cmds=
3834
3835if test -n "$RANLIB"; then
3836  case $host_os in
3837  openbsd*)
3838    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
3839    ;;
3840  *)
3841    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
3842    ;;
3843  esac
3844  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
3845fi
3846
3847case $host_os in
3848  darwin*)
3849    lock_old_archive_extraction=yes ;;
3850  *)
3851    lock_old_archive_extraction=no ;;
3852esac
3853_LT_DECL([], [old_postinstall_cmds], [2])
3854_LT_DECL([], [old_postuninstall_cmds], [2])
3855_LT_TAGDECL([], [old_archive_cmds], [2],
3856    [Commands used to build an old-style archive])
3857_LT_DECL([], [lock_old_archive_extraction], [0],
3858    [Whether to use a lock for old archive extraction])
3859])# _LT_CMD_OLD_ARCHIVE
3860
3861
3862# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3863#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
3864# ----------------------------------------------------------------
3865# Check whether the given compiler option works
3866AC_DEFUN([_LT_COMPILER_OPTION],
3867[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3868m4_require([_LT_DECL_SED])dnl
3869AC_CACHE_CHECK([$1], [$2],
3870  [$2=no
3871   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
3872   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
3873   lt_compiler_flag="$3"
3874   # Insert the option either (1) after the last *FLAGS variable, or
3875   # (2) before a word containing "conftest.", or (3) at the end.
3876   # Note that $ac_compile itself does not contain backslashes and begins
3877   # with a dollar sign (not a hyphen), so the echo should work correctly.
3878   # The option is referenced via a variable to avoid confusing sed.
3879   lt_compile=`echo "$ac_compile" | $SED \
3880   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
3881   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
3882   -e 's:$: $lt_compiler_flag:'`
3883   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
3884   (eval "$lt_compile" 2>conftest.err)
3885   ac_status=$?
3886   cat conftest.err >&AS_MESSAGE_LOG_FD
3887   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
3888   if (exit $ac_status) && test -s "$ac_outfile"; then
3889     # The compiler can only warn and ignore the option if not recognized
3890     # So say no if there are warnings other than the usual output.
3891     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
3892     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3893     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
3894       $2=yes
3895     fi
3896   fi
3897   $RM conftest*
3898])
3899
3900if test x"[$]$2" = xyes; then
3901    m4_if([$5], , :, [$5])
3902else
3903    m4_if([$6], , :, [$6])
3904fi
3905])# _LT_COMPILER_OPTION
3906
3907# Old name:
3908AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
3909dnl aclocal-1.4 backwards compatibility:
3910dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
3911
3912
3913# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
3914#                  [ACTION-SUCCESS], [ACTION-FAILURE])
3915# ----------------------------------------------------
3916# Check whether the given linker option works
3917AC_DEFUN([_LT_LINKER_OPTION],
3918[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
3919m4_require([_LT_DECL_SED])dnl
3920AC_CACHE_CHECK([$1], [$2],
3921  [$2=no
3922   save_LDFLAGS="$LDFLAGS"
3923   LDFLAGS="$LDFLAGS $3"
3924   echo "$lt_simple_link_test_code" > conftest.$ac_ext
3925   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
3926     # The linker can only warn and ignore the option if not recognized
3927     # So say no if there are warnings
3928     if test -s conftest.err; then
3929       # Append any errors to the config.log.
3930       cat conftest.err 1>&AS_MESSAGE_LOG_FD
3931       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
3932       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
3933       if diff conftest.exp conftest.er2 >/dev/null; then
3934         $2=yes
3935       fi
3936     else
3937       $2=yes
3938     fi
3939   fi
3940   $RM -r conftest*
3941   LDFLAGS="$save_LDFLAGS"
3942])
3943
3944if test x"[$]$2" = xyes; then
3945    m4_if([$4], , :, [$4])
3946else
3947    m4_if([$5], , :, [$5])
3948fi
3949])# _LT_LINKER_OPTION
3950
3951# Old name:
3952AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
3953dnl aclocal-1.4 backwards compatibility:
3954dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
3955
3956
3957# LT_CMD_MAX_LEN
3958#---------------
3959AC_DEFUN([LT_CMD_MAX_LEN],
3960[AC_REQUIRE([AC_CANONICAL_HOST])dnl
3961# find the maximum length of command line arguments
3962AC_MSG_CHECKING([the maximum length of command line arguments])
3963AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
3964  i=0
3965  teststring="ABCD"
3966
3967  case $build_os in
3968  msdosdjgpp*)
3969    # On DJGPP, this test can blow up pretty badly due to problems in libc
3970    # (any single argument exceeding 2000 bytes causes a buffer overrun
3971    # during glob expansion).  Even if it were fixed, the result of this
3972    # check would be larger than it should be.
3973    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
3974    ;;
3975
3976  gnu*)
3977    # Under GNU Hurd, this test is not required because there is
3978    # no limit to the length of command line arguments.
3979    # Libtool will interpret -1 as no limit whatsoever
3980    lt_cv_sys_max_cmd_len=-1;
3981    ;;
3982
3983  cygwin* | mingw* | cegcc*)
3984    # On Win9x/ME, this test blows up -- it succeeds, but takes
3985    # about 5 minutes as the teststring grows exponentially.
3986    # Worse, since 9x/ME are not pre-emptively multitasking,
3987    # you end up with a "frozen" computer, even though with patience
3988    # the test eventually succeeds (with a max line length of 256k).
3989    # Instead, let's just punt: use the minimum linelength reported by
3990    # all of the supported platforms: 8192 (on NT/2K/XP).
3991    lt_cv_sys_max_cmd_len=8192;
3992    ;;
3993
3994  mint*)
3995    # On MiNT this can take a long time and run out of memory.
3996    lt_cv_sys_max_cmd_len=8192;
3997    ;;
3998
3999  amigaos*)
4000    # On AmigaOS with pdksh, this test takes hours, literally.
4001    # So we just punt and use a minimum line length of 8192.
4002    lt_cv_sys_max_cmd_len=8192;
4003    ;;
4004
4005  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
4006    # This has been around since 386BSD, at least.  Likely further.
4007    if test -x /sbin/sysctl; then
4008      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
4009    elif test -x /usr/sbin/sysctl; then
4010      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
4011    else
4012      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
4013    fi
4014    # And add a safety zone
4015    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
4016    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
4017    ;;
4018
4019  interix*)
4020    # We know the value 262144 and hardcode it with a safety zone (like BSD)
4021    lt_cv_sys_max_cmd_len=196608
4022    ;;
4023
4024  osf*)
4025    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
4026    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
4027    # nice to cause kernel panics so lets avoid the loop below.
4028    # First set a reasonable default.
4029    lt_cv_sys_max_cmd_len=16384
4030    #
4031    if test -x /sbin/sysconfig; then
4032      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
4033        *1*) lt_cv_sys_max_cmd_len=-1 ;;
4034      esac
4035    fi
4036    ;;
4037  sco3.2v5*)
4038    lt_cv_sys_max_cmd_len=102400
4039    ;;
4040  sysv5* | sco5v6* | sysv4.2uw2*)
4041    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
4042    if test -n "$kargmax"; then
4043      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
4044    else
4045      lt_cv_sys_max_cmd_len=32768
4046    fi
4047    ;;
4048  *)
4049    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
4050    if test -n "$lt_cv_sys_max_cmd_len"; then
4051      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
4052      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
4053    else
4054      # Make teststring a little bigger before we do anything with it.
4055      # a 1K string should be a reasonable start.
4056      for i in 1 2 3 4 5 6 7 8 ; do
4057        teststring=$teststring$teststring
4058      done
4059      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
4060      # If test is not a shell built-in, we'll probably end up computing a
4061      # maximum length that is only half of the actual maximum length, but
4062      # we can't tell.
4063      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
4064	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
4065	      test $i != 17 # 1/2 MB should be enough
4066      do
4067        i=`expr $i + 1`
4068        teststring=$teststring$teststring
4069      done
4070      # Only check the string length outside the loop.
4071      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
4072      teststring=
4073      # Add a significant safety factor because C++ compilers can tack on
4074      # massive amounts of additional arguments before passing them to the
4075      # linker.  It appears as though 1/2 is a usable value.
4076      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
4077    fi
4078    ;;
4079  esac
4080])
4081if test -n $lt_cv_sys_max_cmd_len ; then
4082  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
4083else
4084  AC_MSG_RESULT(none)
4085fi
4086max_cmd_len=$lt_cv_sys_max_cmd_len
4087_LT_DECL([], [max_cmd_len], [0],
4088    [What is the maximum length of a command?])
4089])# LT_CMD_MAX_LEN
4090
4091# Old name:
4092AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
4093dnl aclocal-1.4 backwards compatibility:
4094dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
4095
4096
4097# _LT_HEADER_DLFCN
4098# ----------------
4099m4_defun([_LT_HEADER_DLFCN],
4100[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
4101])# _LT_HEADER_DLFCN
4102
4103
4104# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
4105#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
4106# ----------------------------------------------------------------
4107m4_defun([_LT_TRY_DLOPEN_SELF],
4108[m4_require([_LT_HEADER_DLFCN])dnl
4109if test "$cross_compiling" = yes; then :
4110  [$4]
4111else
4112  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
4113  lt_status=$lt_dlunknown
4114  cat > conftest.$ac_ext <<_LT_EOF
4115[#line $LINENO "configure"
4116#include "confdefs.h"
4117
4118#if HAVE_DLFCN_H
4119#include <dlfcn.h>
4120#endif
4121
4122#include <stdio.h>
4123
4124#ifdef RTLD_GLOBAL
4125#  define LT_DLGLOBAL		RTLD_GLOBAL
4126#else
4127#  ifdef DL_GLOBAL
4128#    define LT_DLGLOBAL		DL_GLOBAL
4129#  else
4130#    define LT_DLGLOBAL		0
4131#  endif
4132#endif
4133
4134/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
4135   find out it does not work in some platform. */
4136#ifndef LT_DLLAZY_OR_NOW
4137#  ifdef RTLD_LAZY
4138#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
4139#  else
4140#    ifdef DL_LAZY
4141#      define LT_DLLAZY_OR_NOW		DL_LAZY
4142#    else
4143#      ifdef RTLD_NOW
4144#        define LT_DLLAZY_OR_NOW	RTLD_NOW
4145#      else
4146#        ifdef DL_NOW
4147#          define LT_DLLAZY_OR_NOW	DL_NOW
4148#        else
4149#          define LT_DLLAZY_OR_NOW	0
4150#        endif
4151#      endif
4152#    endif
4153#  endif
4154#endif
4155
4156/* When -fvisbility=hidden is used, assume the code has been annotated
4157   correspondingly for the symbols needed.  */
4158#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
4159void fnord () __attribute__((visibility("default")));
4160#endif
4161
4162void fnord () { int i=42; }
4163int main ()
4164{
4165  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
4166  int status = $lt_dlunknown;
4167
4168  if (self)
4169    {
4170      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
4171      else
4172        {
4173	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
4174          else puts (dlerror ());
4175	}
4176      /* dlclose (self); */
4177    }
4178  else
4179    puts (dlerror ());
4180
4181  return status;
4182}]
4183_LT_EOF
4184  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
4185    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
4186    lt_status=$?
4187    case x$lt_status in
4188      x$lt_dlno_uscore) $1 ;;
4189      x$lt_dlneed_uscore) $2 ;;
4190      x$lt_dlunknown|x*) $3 ;;
4191    esac
4192  else :
4193    # compilation failed
4194    $3
4195  fi
4196fi
4197rm -fr conftest*
4198])# _LT_TRY_DLOPEN_SELF
4199
4200
4201# LT_SYS_DLOPEN_SELF
4202# ------------------
4203AC_DEFUN([LT_SYS_DLOPEN_SELF],
4204[m4_require([_LT_HEADER_DLFCN])dnl
4205if test "x$enable_dlopen" != xyes; then
4206  enable_dlopen=unknown
4207  enable_dlopen_self=unknown
4208  enable_dlopen_self_static=unknown
4209else
4210  lt_cv_dlopen=no
4211  lt_cv_dlopen_libs=
4212
4213  case $host_os in
4214  beos*)
4215    lt_cv_dlopen="load_add_on"
4216    lt_cv_dlopen_libs=
4217    lt_cv_dlopen_self=yes
4218    ;;
4219
4220  mingw* | pw32* | cegcc*)
4221    lt_cv_dlopen="LoadLibrary"
4222    lt_cv_dlopen_libs=
4223    ;;
4224
4225  cygwin*)
4226    lt_cv_dlopen="dlopen"
4227    lt_cv_dlopen_libs=
4228    ;;
4229
4230  darwin*)
4231  # if libdl is installed we need to link against it
4232    AC_CHECK_LIB([dl], [dlopen],
4233		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
4234    lt_cv_dlopen="dyld"
4235    lt_cv_dlopen_libs=
4236    lt_cv_dlopen_self=yes
4237    ])
4238    ;;
4239
4240  *)
4241    AC_CHECK_FUNC([shl_load],
4242	  [lt_cv_dlopen="shl_load"],
4243      [AC_CHECK_LIB([dld], [shl_load],
4244	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
4245	[AC_CHECK_FUNC([dlopen],
4246	      [lt_cv_dlopen="dlopen"],
4247	  [AC_CHECK_LIB([dl], [dlopen],
4248		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
4249	    [AC_CHECK_LIB([svld], [dlopen],
4250		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
4251	      [AC_CHECK_LIB([dld], [dld_link],
4252		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
4253	      ])
4254	    ])
4255	  ])
4256	])
4257      ])
4258    ;;
4259  esac
4260
4261  if test "x$lt_cv_dlopen" != xno; then
4262    enable_dlopen=yes
4263  else
4264    enable_dlopen=no
4265  fi
4266
4267  case $lt_cv_dlopen in
4268  dlopen)
4269    save_CPPFLAGS="$CPPFLAGS"
4270    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
4271
4272    save_LDFLAGS="$LDFLAGS"
4273    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
4274
4275    save_LIBS="$LIBS"
4276    LIBS="$lt_cv_dlopen_libs $LIBS"
4277
4278    AC_CACHE_CHECK([whether a program can dlopen itself],
4279	  lt_cv_dlopen_self, [dnl
4280	  _LT_TRY_DLOPEN_SELF(
4281	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
4282	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
4283    ])
4284
4285    if test "x$lt_cv_dlopen_self" = xyes; then
4286      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
4287      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
4288	  lt_cv_dlopen_self_static, [dnl
4289	  _LT_TRY_DLOPEN_SELF(
4290	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
4291	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
4292      ])
4293    fi
4294
4295    CPPFLAGS="$save_CPPFLAGS"
4296    LDFLAGS="$save_LDFLAGS"
4297    LIBS="$save_LIBS"
4298    ;;
4299  esac
4300
4301  case $lt_cv_dlopen_self in
4302  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
4303  *) enable_dlopen_self=unknown ;;
4304  esac
4305
4306  case $lt_cv_dlopen_self_static in
4307  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
4308  *) enable_dlopen_self_static=unknown ;;
4309  esac
4310fi
4311_LT_DECL([dlopen_support], [enable_dlopen], [0],
4312	 [Whether dlopen is supported])
4313_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
4314	 [Whether dlopen of programs is supported])
4315_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
4316	 [Whether dlopen of statically linked programs is supported])
4317])# LT_SYS_DLOPEN_SELF
4318
4319# Old name:
4320AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
4321dnl aclocal-1.4 backwards compatibility:
4322dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
4323
4324
4325# _LT_COMPILER_C_O([TAGNAME])
4326# ---------------------------
4327# Check to see if options -c and -o are simultaneously supported by compiler.
4328# This macro does not hard code the compiler like AC_PROG_CC_C_O.
4329m4_defun([_LT_COMPILER_C_O],
4330[m4_require([_LT_DECL_SED])dnl
4331m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4332m4_require([_LT_TAG_COMPILER])dnl
4333AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
4334  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
4335  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
4336   $RM -r conftest 2>/dev/null
4337   mkdir conftest
4338   cd conftest
4339   mkdir out
4340   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
4341
4342   lt_compiler_flag="-o out/conftest2.$ac_objext"
4343   # Insert the option either (1) after the last *FLAGS variable, or
4344   # (2) before a word containing "conftest.", or (3) at the end.
4345   # Note that $ac_compile itself does not contain backslashes and begins
4346   # with a dollar sign (not a hyphen), so the echo should work correctly.
4347   lt_compile=`echo "$ac_compile" | $SED \
4348   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
4349   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
4350   -e 's:$: $lt_compiler_flag:'`
4351   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
4352   (eval "$lt_compile" 2>out/conftest.err)
4353   ac_status=$?
4354   cat out/conftest.err >&AS_MESSAGE_LOG_FD
4355   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
4356   if (exit $ac_status) && test -s out/conftest2.$ac_objext
4357   then
4358     # The compiler can only warn and ignore the option if not recognized
4359     # So say no if there are warnings
4360     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
4361     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
4362     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
4363       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4364     fi
4365   fi
4366   chmod u+w . 2>&AS_MESSAGE_LOG_FD
4367   $RM conftest*
4368   # SGI C++ compiler will create directory out/ii_files/ for
4369   # template instantiation
4370   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
4371   $RM out/* && rmdir out
4372   cd ..
4373   $RM -r conftest
4374   $RM conftest*
4375])
4376_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
4377	[Does compiler simultaneously support -c and -o options?])
4378])# _LT_COMPILER_C_O
4379
4380
4381# _LT_COMPILER_FILE_LOCKS([TAGNAME])
4382# ----------------------------------
4383# Check to see if we can do hard links to lock some files if needed
4384m4_defun([_LT_COMPILER_FILE_LOCKS],
4385[m4_require([_LT_ENABLE_LOCK])dnl
4386m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4387_LT_COMPILER_C_O([$1])
4388
4389hard_links="nottested"
4390if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
4391  # do not overwrite the value of need_locks provided by the user
4392  AC_MSG_CHECKING([if we can lock with hard links])
4393  hard_links=yes
4394  $RM conftest*
4395  ln conftest.a conftest.b 2>/dev/null && hard_links=no
4396  touch conftest.a
4397  ln conftest.a conftest.b 2>&5 || hard_links=no
4398  ln conftest.a conftest.b 2>/dev/null && hard_links=no
4399  AC_MSG_RESULT([$hard_links])
4400  if test "$hard_links" = no; then
4401    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
4402    need_locks=warn
4403  fi
4404else
4405  need_locks=no
4406fi
4407_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
4408])# _LT_COMPILER_FILE_LOCKS
4409
4410
4411# _LT_CHECK_OBJDIR
4412# ----------------
4413m4_defun([_LT_CHECK_OBJDIR],
4414[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
4415[rm -f .libs 2>/dev/null
4416mkdir .libs 2>/dev/null
4417if test -d .libs; then
4418  lt_cv_objdir=.libs
4419else
4420  # MS-DOS does not allow filenames that begin with a dot.
4421  lt_cv_objdir=_libs
4422fi
4423rmdir .libs 2>/dev/null])
4424objdir=$lt_cv_objdir
4425_LT_DECL([], [objdir], [0],
4426         [The name of the directory that contains temporary libtool files])dnl
4427m4_pattern_allow([LT_OBJDIR])dnl
4428AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
4429  [Define to the sub-directory in which libtool stores uninstalled libraries.])
4430])# _LT_CHECK_OBJDIR
4431
4432
4433# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
4434# --------------------------------------
4435# Check hardcoding attributes.
4436m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
4437[AC_MSG_CHECKING([how to hardcode library paths into programs])
4438_LT_TAGVAR(hardcode_action, $1)=
4439if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
4440   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
4441   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
4442
4443  # We can hardcode non-existent directories.
4444  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
4445     # If the only mechanism to avoid hardcoding is shlibpath_var, we
4446     # have to relink, otherwise we might link with an installed library
4447     # when we should be linking with a yet-to-be-installed one
4448     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
4449     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
4450    # Linking always hardcodes the temporary library directory.
4451    _LT_TAGVAR(hardcode_action, $1)=relink
4452  else
4453    # We can link without hardcoding, and we can hardcode nonexisting dirs.
4454    _LT_TAGVAR(hardcode_action, $1)=immediate
4455  fi
4456else
4457  # We cannot hardcode anything, or else we can only hardcode existing
4458  # directories.
4459  _LT_TAGVAR(hardcode_action, $1)=unsupported
4460fi
4461AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
4462
4463if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
4464   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
4465  # Fast installation is not supported
4466  enable_fast_install=no
4467elif test "$shlibpath_overrides_runpath" = yes ||
4468     test "$enable_shared" = no; then
4469  # Fast installation is not necessary
4470  enable_fast_install=needless
4471fi
4472_LT_TAGDECL([], [hardcode_action], [0],
4473    [How to hardcode a shared library path into an executable])
4474])# _LT_LINKER_HARDCODE_LIBPATH
4475
4476
4477# _LT_CMD_STRIPLIB
4478# ----------------
4479m4_defun([_LT_CMD_STRIPLIB],
4480[m4_require([_LT_DECL_EGREP])
4481striplib=
4482old_striplib=
4483AC_MSG_CHECKING([whether stripping libraries is possible])
4484if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
4485  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
4486  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
4487  AC_MSG_RESULT([yes])
4488else
4489# FIXME - insert some real tests, host_os isn't really good enough
4490  case $host_os in
4491  darwin*)
4492    if test -n "$STRIP" ; then
4493      striplib="$STRIP -x"
4494      old_striplib="$STRIP -S"
4495      AC_MSG_RESULT([yes])
4496    else
4497      AC_MSG_RESULT([no])
4498    fi
4499    ;;
4500  *)
4501    AC_MSG_RESULT([no])
4502    ;;
4503  esac
4504fi
4505_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
4506_LT_DECL([], [striplib], [1])
4507])# _LT_CMD_STRIPLIB
4508
4509
4510# _LT_SYS_DYNAMIC_LINKER([TAG])
4511# -----------------------------
4512# PORTME Fill in your ld.so characteristics
4513m4_defun([_LT_SYS_DYNAMIC_LINKER],
4514[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4515m4_require([_LT_DECL_EGREP])dnl
4516m4_require([_LT_FILEUTILS_DEFAULTS])dnl
4517m4_require([_LT_DECL_OBJDUMP])dnl
4518m4_require([_LT_DECL_SED])dnl
4519m4_require([_LT_CHECK_SHELL_FEATURES])dnl
4520AC_MSG_CHECKING([dynamic linker characteristics])
4521m4_if([$1],
4522	[], [
4523if test "$GCC" = yes; then
4524  case $host_os in
4525    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
4526    *) lt_awk_arg="/^libraries:/" ;;
4527  esac
4528  case $host_os in
4529    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
4530    *) lt_sed_strip_eq="s,=/,/,g" ;;
4531  esac
4532  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
4533  case $lt_search_path_spec in
4534  *\;*)
4535    # if the path contains ";" then we assume it to be the separator
4536    # otherwise default to the standard path separator (i.e. ":") - it is
4537    # assumed that no part of a normal pathname contains ";" but that should
4538    # okay in the real world where ";" in dirpaths is itself problematic.
4539    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
4540    ;;
4541  *)
4542    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
4543    ;;
4544  esac
4545  # Ok, now we have the path, separated by spaces, we can step through it
4546  # and add multilib dir if necessary.
4547  lt_tmp_lt_search_path_spec=
4548  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
4549  for lt_sys_path in $lt_search_path_spec; do
4550    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
4551      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
4552    else
4553      test -d "$lt_sys_path" && \
4554	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
4555    fi
4556  done
4557  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
4558BEGIN {RS=" "; FS="/|\n";} {
4559  lt_foo="";
4560  lt_count=0;
4561  for (lt_i = NF; lt_i > 0; lt_i--) {
4562    if ($lt_i != "" && $lt_i != ".") {
4563      if ($lt_i == "..") {
4564        lt_count++;
4565      } else {
4566        if (lt_count == 0) {
4567          lt_foo="/" $lt_i lt_foo;
4568        } else {
4569          lt_count--;
4570        }
4571      }
4572    }
4573  }
4574  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
4575  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
4576}'`
4577  # AWK program above erroneously prepends '/' to C:/dos/paths
4578  # for these hosts.
4579  case $host_os in
4580    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
4581      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
4582  esac
4583  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
4584else
4585  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
4586fi])
4587library_names_spec=
4588libname_spec='lib$name'
4589soname_spec=
4590shrext_cmds=".so"
4591postinstall_cmds=
4592postuninstall_cmds=
4593finish_cmds=
4594finish_eval=
4595shlibpath_var=
4596shlibpath_overrides_runpath=unknown
4597version_type=none
4598dynamic_linker="$host_os ld.so"
4599sys_lib_dlsearch_path_spec="/lib /usr/lib"
4600need_lib_prefix=unknown
4601hardcode_into_libs=no
4602
4603# when you set need_version to no, make sure it does not cause -set_version
4604# flags to be left without arguments
4605need_version=unknown
4606
4607case $host_os in
4608aix3*)
4609  version_type=linux
4610  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
4611  shlibpath_var=LIBPATH
4612
4613  # AIX 3 has no versioning support, so we append a major version to the name.
4614  soname_spec='${libname}${release}${shared_ext}$major'
4615  ;;
4616
4617aix[[4-9]]*)
4618  version_type=linux
4619  need_lib_prefix=no
4620  need_version=no
4621  hardcode_into_libs=yes
4622  if test "$host_cpu" = ia64; then
4623    # AIX 5 supports IA64
4624    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
4625    shlibpath_var=LD_LIBRARY_PATH
4626  else
4627    # With GCC up to 2.95.x, collect2 would create an import file
4628    # for dependence libraries.  The import file would start with
4629    # the line `#! .'.  This would cause the generated library to
4630    # depend on `.', always an invalid library.  This was fixed in
4631    # development snapshots of GCC prior to 3.0.
4632    case $host_os in
4633      aix4 | aix4.[[01]] | aix4.[[01]].*)
4634      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
4635	   echo ' yes '
4636	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
4637	:
4638      else
4639	can_build_shared=no
4640      fi
4641      ;;
4642    esac
4643    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
4644    # soname into executable. Probably we can add versioning support to
4645    # collect2, so additional links can be useful in future.
4646    if test "$aix_use_runtimelinking" = yes; then
4647      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
4648      # instead of lib<name>.a to let people know that these are not
4649      # typical AIX shared libraries.
4650      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4651    else
4652      # We preserve .a as extension for shared libraries through AIX4.2
4653      # and later when we are not doing run time linking.
4654      library_names_spec='${libname}${release}.a $libname.a'
4655      soname_spec='${libname}${release}${shared_ext}$major'
4656    fi
4657    shlibpath_var=LIBPATH
4658  fi
4659  ;;
4660
4661amigaos*)
4662  case $host_cpu in
4663  powerpc)
4664    # Since July 2007 AmigaOS4 officially supports .so libraries.
4665    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
4666    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4667    ;;
4668  m68k)
4669    library_names_spec='$libname.ixlibrary $libname.a'
4670    # Create ${libname}_ixlibrary.a entries in /sys/libs.
4671    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'
4672    ;;
4673  esac
4674  ;;
4675
4676beos*)
4677  library_names_spec='${libname}${shared_ext}'
4678  dynamic_linker="$host_os ld.so"
4679  shlibpath_var=LIBRARY_PATH
4680  ;;
4681
4682bsdi[[45]]*)
4683  version_type=linux
4684  need_version=no
4685  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4686  soname_spec='${libname}${release}${shared_ext}$major'
4687  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
4688  shlibpath_var=LD_LIBRARY_PATH
4689  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
4690  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
4691  # the default ld.so.conf also contains /usr/contrib/lib and
4692  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
4693  # libtool to hard-code these into programs
4694  ;;
4695
4696cygwin* | mingw* | pw32* | cegcc*)
4697  version_type=windows
4698  shrext_cmds=".dll"
4699  need_version=no
4700  need_lib_prefix=no
4701
4702  case $GCC,$host_os in
4703  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
4704    library_names_spec='$libname.dll.a'
4705    # DLL is installed to $(libdir)/../bin by postinstall_cmds
4706    postinstall_cmds='base_file=`basename \${file}`~
4707      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
4708      dldir=$destdir/`dirname \$dlpath`~
4709      test -d \$dldir || mkdir -p \$dldir~
4710      $install_prog $dir/$dlname \$dldir/$dlname~
4711      chmod a+x \$dldir/$dlname~
4712      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
4713        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
4714      fi'
4715    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
4716      dlpath=$dir/\$dldll~
4717       $RM \$dlpath'
4718    shlibpath_overrides_runpath=yes
4719
4720    case $host_os in
4721    cygwin*)
4722      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
4723      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4724m4_if([$1], [],[
4725      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
4726      ;;
4727    mingw* | cegcc*)
4728      # MinGW DLLs use traditional 'lib' prefix
4729      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4730      ;;
4731    pw32*)
4732      # pw32 DLLs use 'pw' prefix rather than 'lib'
4733      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
4734      ;;
4735    esac
4736    ;;
4737
4738  *)
4739    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
4740    ;;
4741  esac
4742  dynamic_linker='Win32 ld.exe'
4743  # FIXME: first we should search . and the directory the executable is in
4744  shlibpath_var=PATH
4745  ;;
4746
4747darwin* | rhapsody*)
4748  dynamic_linker="$host_os dyld"
4749  version_type=darwin
4750  need_lib_prefix=no
4751  need_version=no
4752  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
4753  soname_spec='${libname}${release}${major}$shared_ext'
4754  shlibpath_overrides_runpath=yes
4755  shlibpath_var=DYLD_LIBRARY_PATH
4756  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
4757m4_if([$1], [],[
4758  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
4759  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
4760  ;;
4761
4762dgux*)
4763  version_type=linux
4764  need_lib_prefix=no
4765  need_version=no
4766  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
4767  soname_spec='${libname}${release}${shared_ext}$major'
4768  shlibpath_var=LD_LIBRARY_PATH
4769  ;;
4770
4771freebsd1*)
4772  dynamic_linker=no
4773  ;;
4774
4775freebsd* | dragonfly*)
4776  # DragonFly does not have aout.  When/if they implement a new
4777  # versioning mechanism, adjust this.
4778  if test -x /usr/bin/objformat; then
4779    objformat=`/usr/bin/objformat`
4780  else
4781    case $host_os in
4782    freebsd[[123]]*) objformat=aout ;;
4783    *) objformat=elf ;;
4784    esac
4785  fi
4786  version_type=freebsd-$objformat
4787  case $version_type in
4788    freebsd-elf*)
4789      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
4790      need_version=no
4791      need_lib_prefix=no
4792      ;;
4793    freebsd-*)
4794      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
4795      need_version=yes
4796      ;;
4797  esac
4798  shlibpath_var=LD_LIBRARY_PATH
4799  case $host_os in
4800  freebsd2*)
4801    shlibpath_overrides_runpath=yes
4802    ;;
4803  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
4804    shlibpath_overrides_runpath=yes
4805    hardcode_into_libs=yes
4806    ;;
4807  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
4808  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
4809    shlibpath_overrides_runpath=no
4810    hardcode_into_libs=yes
4811    ;;
4812  *) # from 4.6 on, and DragonFly
4813    shlibpath_overrides_runpath=yes
4814    hardcode_into_libs=yes
4815    ;;
4816  esac
4817  ;;
4818
4819gnu*)
4820  version_type=linux
4821  need_lib_prefix=no
4822  need_version=no
4823  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
4824  soname_spec='${libname}${release}${shared_ext}$major'
4825  shlibpath_var=LD_LIBRARY_PATH
4826  hardcode_into_libs=yes
4827  ;;
4828
4829haiku*)
4830  version_type=linux
4831  need_lib_prefix=no
4832  need_version=no
4833  dynamic_linker="$host_os runtime_loader"
4834  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
4835  soname_spec='${libname}${release}${shared_ext}$major'
4836  shlibpath_var=LIBRARY_PATH
4837  shlibpath_overrides_runpath=yes
4838  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
4839  hardcode_into_libs=yes
4840  ;;
4841
4842hpux9* | hpux10* | hpux11*)
4843  # Give a soname corresponding to the major version so that dld.sl refuses to
4844  # link against other versions.
4845  version_type=sunos
4846  need_lib_prefix=no
4847  need_version=no
4848  case $host_cpu in
4849  ia64*)
4850    shrext_cmds='.so'
4851    hardcode_into_libs=yes
4852    dynamic_linker="$host_os dld.so"
4853    shlibpath_var=LD_LIBRARY_PATH
4854    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4855    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4856    soname_spec='${libname}${release}${shared_ext}$major'
4857    if test "X$HPUX_IA64_MODE" = X32; then
4858      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
4859    else
4860      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
4861    fi
4862    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4863    ;;
4864  hppa*64*)
4865    shrext_cmds='.sl'
4866    hardcode_into_libs=yes
4867    dynamic_linker="$host_os dld.sl"
4868    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
4869    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
4870    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4871    soname_spec='${libname}${release}${shared_ext}$major'
4872    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
4873    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
4874    ;;
4875  *)
4876    shrext_cmds='.sl'
4877    dynamic_linker="$host_os dld.sl"
4878    shlibpath_var=SHLIB_PATH
4879    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
4880    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4881    soname_spec='${libname}${release}${shared_ext}$major'
4882    ;;
4883  esac
4884  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
4885  postinstall_cmds='chmod 555 $lib'
4886  # or fails outright, so override atomically:
4887  install_override_mode=555
4888  ;;
4889
4890interix[[3-9]]*)
4891  version_type=linux
4892  need_lib_prefix=no
4893  need_version=no
4894  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
4895  soname_spec='${libname}${release}${shared_ext}$major'
4896  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
4897  shlibpath_var=LD_LIBRARY_PATH
4898  shlibpath_overrides_runpath=no
4899  hardcode_into_libs=yes
4900  ;;
4901
4902irix5* | irix6* | nonstopux*)
4903  case $host_os in
4904    nonstopux*) version_type=nonstopux ;;
4905    *)
4906	if test "$lt_cv_prog_gnu_ld" = yes; then
4907		version_type=linux
4908	else
4909		version_type=irix
4910	fi ;;
4911  esac
4912  need_lib_prefix=no
4913  need_version=no
4914  soname_spec='${libname}${release}${shared_ext}$major'
4915  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
4916  case $host_os in
4917  irix5* | nonstopux*)
4918    libsuff= shlibsuff=
4919    ;;
4920  *)
4921    case $LD in # libtool.m4 will add one of these switches to LD
4922    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
4923      libsuff= shlibsuff= libmagic=32-bit;;
4924    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
4925      libsuff=32 shlibsuff=N32 libmagic=N32;;
4926    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
4927      libsuff=64 shlibsuff=64 libmagic=64-bit;;
4928    *) libsuff= shlibsuff= libmagic=never-match;;
4929    esac
4930    ;;
4931  esac
4932  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
4933  shlibpath_overrides_runpath=no
4934  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
4935  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
4936  hardcode_into_libs=yes
4937  ;;
4938
4939# No shared lib support for Linux oldld, aout, or coff.
4940linux*oldld* | linux*aout* | linux*coff*)
4941  dynamic_linker=no
4942  ;;
4943
4944# This must be Linux ELF.
4945linux* | k*bsd*-gnu | kopensolaris*-gnu)
4946  version_type=linux
4947  need_lib_prefix=no
4948  need_version=no
4949  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
4950  soname_spec='${libname}${release}${shared_ext}$major'
4951  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
4952  shlibpath_var=LD_LIBRARY_PATH
4953  shlibpath_overrides_runpath=no
4954
4955  # Some binutils ld are patched to set DT_RUNPATH
4956  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
4957    [lt_cv_shlibpath_overrides_runpath=no
4958    save_LDFLAGS=$LDFLAGS
4959    save_libdir=$libdir
4960    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
4961	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
4962    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
4963      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
4964	 [lt_cv_shlibpath_overrides_runpath=yes])])
4965    LDFLAGS=$save_LDFLAGS
4966    libdir=$save_libdir
4967    ])
4968  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
4969
4970  # This implies no fast_install, which is unacceptable.
4971  # Some rework will be needed to allow for fast_install
4972  # before this can be enabled.
4973  hardcode_into_libs=yes
4974
4975  # Append ld.so.conf contents to the search path
4976  if test -f /etc/ld.so.conf; then
4977    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' ' '`
4978    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
4979  fi
4980
4981  # We used to test for /lib/ld.so.1 and disable shared libraries on
4982  # powerpc, because MkLinux only supported shared libraries with the
4983  # GNU dynamic linker.  Since this was broken with cross compilers,
4984  # most powerpc-linux boxes support dynamic linking these days and
4985  # people can always --disable-shared, the test was removed, and we
4986  # assume the GNU/Linux dynamic linker is in use.
4987  dynamic_linker='GNU/Linux ld.so'
4988  ;;
4989
4990netbsd*)
4991  version_type=sunos
4992  need_lib_prefix=no
4993  need_version=no
4994  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
4995    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
4996    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
4997    dynamic_linker='NetBSD (a.out) ld.so'
4998  else
4999    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
5000    soname_spec='${libname}${release}${shared_ext}$major'
5001    dynamic_linker='NetBSD ld.elf_so'
5002  fi
5003  shlibpath_var=LD_LIBRARY_PATH
5004  shlibpath_overrides_runpath=yes
5005  hardcode_into_libs=yes
5006  ;;
5007
5008newsos6)
5009  version_type=linux
5010  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5011  shlibpath_var=LD_LIBRARY_PATH
5012  shlibpath_overrides_runpath=yes
5013  ;;
5014
5015*nto* | *qnx*)
5016  version_type=qnx
5017  need_lib_prefix=no
5018  need_version=no
5019  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5020  soname_spec='${libname}${release}${shared_ext}$major'
5021  shlibpath_var=LD_LIBRARY_PATH
5022  shlibpath_overrides_runpath=no
5023  hardcode_into_libs=yes
5024  dynamic_linker='ldqnx.so'
5025  ;;
5026
5027openbsd*)
5028  version_type=sunos
5029  sys_lib_dlsearch_path_spec="/usr/lib"
5030  need_lib_prefix=no
5031  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
5032  case $host_os in
5033    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
5034    *)				need_version=no  ;;
5035  esac
5036  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
5037  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
5038  shlibpath_var=LD_LIBRARY_PATH
5039  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5040    case $host_os in
5041      openbsd2.[[89]] | openbsd2.[[89]].*)
5042	shlibpath_overrides_runpath=no
5043	;;
5044      *)
5045	shlibpath_overrides_runpath=yes
5046	;;
5047      esac
5048  else
5049    shlibpath_overrides_runpath=yes
5050  fi
5051  ;;
5052
5053os2*)
5054  libname_spec='$name'
5055  shrext_cmds=".dll"
5056  need_lib_prefix=no
5057  library_names_spec='$libname${shared_ext} $libname.a'
5058  dynamic_linker='OS/2 ld.exe'
5059  shlibpath_var=LIBPATH
5060  ;;
5061
5062osf3* | osf4* | osf5*)
5063  version_type=osf
5064  need_lib_prefix=no
5065  need_version=no
5066  soname_spec='${libname}${release}${shared_ext}$major'
5067  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5068  shlibpath_var=LD_LIBRARY_PATH
5069  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
5070  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
5071  ;;
5072
5073rdos*)
5074  dynamic_linker=no
5075  ;;
5076
5077solaris*)
5078  version_type=linux
5079  need_lib_prefix=no
5080  need_version=no
5081  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5082  soname_spec='${libname}${release}${shared_ext}$major'
5083  shlibpath_var=LD_LIBRARY_PATH
5084  shlibpath_overrides_runpath=yes
5085  hardcode_into_libs=yes
5086  # ldd complains unless libraries are executable
5087  postinstall_cmds='chmod +x $lib'
5088  ;;
5089
5090sunos4*)
5091  version_type=sunos
5092  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
5093  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
5094  shlibpath_var=LD_LIBRARY_PATH
5095  shlibpath_overrides_runpath=yes
5096  if test "$with_gnu_ld" = yes; then
5097    need_lib_prefix=no
5098  fi
5099  need_version=yes
5100  ;;
5101
5102sysv4 | sysv4.3*)
5103  version_type=linux
5104  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5105  soname_spec='${libname}${release}${shared_ext}$major'
5106  shlibpath_var=LD_LIBRARY_PATH
5107  case $host_vendor in
5108    sni)
5109      shlibpath_overrides_runpath=no
5110      need_lib_prefix=no
5111      runpath_var=LD_RUN_PATH
5112      ;;
5113    siemens)
5114      need_lib_prefix=no
5115      ;;
5116    motorola)
5117      need_lib_prefix=no
5118      need_version=no
5119      shlibpath_overrides_runpath=no
5120      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
5121      ;;
5122  esac
5123  ;;
5124
5125sysv4*MP*)
5126  if test -d /usr/nec ;then
5127    version_type=linux
5128    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
5129    soname_spec='$libname${shared_ext}.$major'
5130    shlibpath_var=LD_LIBRARY_PATH
5131  fi
5132  ;;
5133
5134sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
5135  version_type=freebsd-elf
5136  need_lib_prefix=no
5137  need_version=no
5138  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
5139  soname_spec='${libname}${release}${shared_ext}$major'
5140  shlibpath_var=LD_LIBRARY_PATH
5141  shlibpath_overrides_runpath=yes
5142  hardcode_into_libs=yes
5143  if test "$with_gnu_ld" = yes; then
5144    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
5145  else
5146    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
5147    case $host_os in
5148      sco3.2v5*)
5149        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
5150	;;
5151    esac
5152  fi
5153  sys_lib_dlsearch_path_spec='/usr/lib'
5154  ;;
5155
5156tpf*)
5157  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
5158  version_type=linux
5159  need_lib_prefix=no
5160  need_version=no
5161  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5162  shlibpath_var=LD_LIBRARY_PATH
5163  shlibpath_overrides_runpath=no
5164  hardcode_into_libs=yes
5165  ;;
5166
5167uts4*)
5168  version_type=linux
5169  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
5170  soname_spec='${libname}${release}${shared_ext}$major'
5171  shlibpath_var=LD_LIBRARY_PATH
5172  ;;
5173
5174*)
5175  dynamic_linker=no
5176  ;;
5177esac
5178AC_MSG_RESULT([$dynamic_linker])
5179test "$dynamic_linker" = no && can_build_shared=no
5180
5181variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
5182if test "$GCC" = yes; then
5183  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5184fi
5185
5186if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
5187  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
5188fi
5189if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
5190  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
5191fi
5192
5193_LT_DECL([], [variables_saved_for_relink], [1],
5194    [Variables whose values should be saved in libtool wrapper scripts and
5195    restored at link time])
5196_LT_DECL([], [need_lib_prefix], [0],
5197    [Do we need the "lib" prefix for modules?])
5198_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
5199_LT_DECL([], [version_type], [0], [Library versioning type])
5200_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
5201_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
5202_LT_DECL([], [shlibpath_overrides_runpath], [0],
5203    [Is shlibpath searched before the hard-coded library search path?])
5204_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
5205_LT_DECL([], [library_names_spec], [1],
5206    [[List of archive names.  First name is the real one, the rest are links.
5207    The last name is the one that the linker finds with -lNAME]])
5208_LT_DECL([], [soname_spec], [1],
5209    [[The coded name of the library, if different from the real name]])
5210_LT_DECL([], [install_override_mode], [1],
5211    [Permission mode override for installation of shared libraries])
5212_LT_DECL([], [postinstall_cmds], [2],
5213    [Command to use after installation of a shared archive])
5214_LT_DECL([], [postuninstall_cmds], [2],
5215    [Command to use after uninstallation of a shared archive])
5216_LT_DECL([], [finish_cmds], [2],
5217    [Commands used to finish a libtool library installation in a directory])
5218_LT_DECL([], [finish_eval], [1],
5219    [[As "finish_cmds", except a single script fragment to be evaled but
5220    not shown]])
5221_LT_DECL([], [hardcode_into_libs], [0],
5222    [Whether we should hardcode library paths into libraries])
5223_LT_DECL([], [sys_lib_search_path_spec], [2],
5224    [Compile-time system search path for libraries])
5225_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
5226    [Run-time system search path for libraries])
5227])# _LT_SYS_DYNAMIC_LINKER
5228
5229
5230# _LT_PATH_TOOL_PREFIX(TOOL)
5231# --------------------------
5232# find a file program which can recognize shared library
5233AC_DEFUN([_LT_PATH_TOOL_PREFIX],
5234[m4_require([_LT_DECL_EGREP])dnl
5235AC_MSG_CHECKING([for $1])
5236AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
5237[case $MAGIC_CMD in
5238[[\\/*] |  ?:[\\/]*])
5239  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
5240  ;;
5241*)
5242  lt_save_MAGIC_CMD="$MAGIC_CMD"
5243  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5244dnl $ac_dummy forces splitting on constant user-supplied paths.
5245dnl POSIX.2 word splitting is done only on the output of word expansions,
5246dnl not every word.  This closes a longstanding sh security hole.
5247  ac_dummy="m4_if([$2], , $PATH, [$2])"
5248  for ac_dir in $ac_dummy; do
5249    IFS="$lt_save_ifs"
5250    test -z "$ac_dir" && ac_dir=.
5251    if test -f $ac_dir/$1; then
5252      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
5253      if test -n "$file_magic_test_file"; then
5254	case $deplibs_check_method in
5255	"file_magic "*)
5256	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
5257	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5258	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
5259	    $EGREP "$file_magic_regex" > /dev/null; then
5260	    :
5261	  else
5262	    cat <<_LT_EOF 1>&2
5263
5264*** Warning: the command libtool uses to detect shared libraries,
5265*** $file_magic_cmd, produces output that libtool cannot recognize.
5266*** The result is that libtool may fail to recognize shared libraries
5267*** as such.  This will affect the creation of libtool libraries that
5268*** depend on shared libraries, but programs linked with such libtool
5269*** libraries will work regardless of this problem.  Nevertheless, you
5270*** may want to report the problem to your system manager and/or to
5271*** bug-libtool@gnu.org
5272
5273_LT_EOF
5274	  fi ;;
5275	esac
5276      fi
5277      break
5278    fi
5279  done
5280  IFS="$lt_save_ifs"
5281  MAGIC_CMD="$lt_save_MAGIC_CMD"
5282  ;;
5283esac])
5284MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
5285if test -n "$MAGIC_CMD"; then
5286  AC_MSG_RESULT($MAGIC_CMD)
5287else
5288  AC_MSG_RESULT(no)
5289fi
5290_LT_DECL([], [MAGIC_CMD], [0],
5291	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
5292])# _LT_PATH_TOOL_PREFIX
5293
5294# Old name:
5295AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
5296dnl aclocal-1.4 backwards compatibility:
5297dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
5298
5299
5300# _LT_PATH_MAGIC
5301# --------------
5302# find a file program which can recognize a shared library
5303m4_defun([_LT_PATH_MAGIC],
5304[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
5305if test -z "$lt_cv_path_MAGIC_CMD"; then
5306  if test -n "$ac_tool_prefix"; then
5307    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
5308  else
5309    MAGIC_CMD=:
5310  fi
5311fi
5312])# _LT_PATH_MAGIC
5313
5314
5315# LT_PATH_LD
5316# ----------
5317# find the pathname to the GNU or non-GNU linker
5318AC_DEFUN([LT_PATH_LD],
5319[AC_REQUIRE([AC_PROG_CC])dnl
5320AC_REQUIRE([AC_CANONICAL_HOST])dnl
5321AC_REQUIRE([AC_CANONICAL_BUILD])dnl
5322m4_require([_LT_DECL_SED])dnl
5323m4_require([_LT_DECL_EGREP])dnl
5324m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
5325
5326AC_ARG_WITH([gnu-ld],
5327    [AS_HELP_STRING([--with-gnu-ld],
5328	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
5329    [test "$withval" = no || with_gnu_ld=yes],
5330    [with_gnu_ld=no])dnl
5331
5332ac_prog=ld
5333if test "$GCC" = yes; then
5334  # Check if gcc -print-prog-name=ld gives a path.
5335  AC_MSG_CHECKING([for ld used by $CC])
5336  case $host in
5337  *-*-mingw*)
5338    # gcc leaves a trailing carriage return which upsets mingw
5339    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
5340  *)
5341    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
5342  esac
5343  case $ac_prog in
5344    # Accept absolute paths.
5345    [[\\/]]* | ?:[[\\/]]*)
5346      re_direlt='/[[^/]][[^/]]*/\.\./'
5347      # Canonicalize the pathname of ld
5348      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
5349      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
5350	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
5351      done
5352      test -z "$LD" && LD="$ac_prog"
5353      ;;
5354  "")
5355    # If it fails, then pretend we aren't using GCC.
5356    ac_prog=ld
5357    ;;
5358  *)
5359    # If it is relative, then search for the first ld in PATH.
5360    with_gnu_ld=unknown
5361    ;;
5362  esac
5363elif test "$with_gnu_ld" = yes; then
5364  AC_MSG_CHECKING([for GNU ld])
5365else
5366  AC_MSG_CHECKING([for non-GNU ld])
5367fi
5368AC_CACHE_VAL(lt_cv_path_LD,
5369[if test -z "$LD"; then
5370  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5371  for ac_dir in $PATH; do
5372    IFS="$lt_save_ifs"
5373    test -z "$ac_dir" && ac_dir=.
5374    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
5375      lt_cv_path_LD="$ac_dir/$ac_prog"
5376      # Check to see if the program is GNU ld.  I'd rather use --version,
5377      # but apparently some variants of GNU ld only accept -v.
5378      # Break only if it was the GNU/non-GNU ld that we prefer.
5379      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
5380      *GNU* | *'with BFD'*)
5381	test "$with_gnu_ld" != no && break
5382	;;
5383      *)
5384	test "$with_gnu_ld" != yes && break
5385	;;
5386      esac
5387    fi
5388  done
5389  IFS="$lt_save_ifs"
5390else
5391  lt_cv_path_LD="$LD" # Let the user override the test with a path.
5392fi])
5393LD="$lt_cv_path_LD"
5394if test -n "$LD"; then
5395  AC_MSG_RESULT($LD)
5396else
5397  AC_MSG_RESULT(no)
5398fi
5399test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
5400_LT_PATH_LD_GNU
5401AC_SUBST([LD])
5402
5403_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
5404])# LT_PATH_LD
5405
5406# Old names:
5407AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
5408AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
5409dnl aclocal-1.4 backwards compatibility:
5410dnl AC_DEFUN([AM_PROG_LD], [])
5411dnl AC_DEFUN([AC_PROG_LD], [])
5412
5413
5414# _LT_PATH_LD_GNU
5415#- --------------
5416m4_defun([_LT_PATH_LD_GNU],
5417[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
5418[# I'd rather use --version here, but apparently some GNU lds only accept -v.
5419case `$LD -v 2>&1 </dev/null` in
5420*GNU* | *'with BFD'*)
5421  lt_cv_prog_gnu_ld=yes
5422  ;;
5423*)
5424  lt_cv_prog_gnu_ld=no
5425  ;;
5426esac])
5427with_gnu_ld=$lt_cv_prog_gnu_ld
5428])# _LT_PATH_LD_GNU
5429
5430
5431# _LT_CMD_RELOAD
5432# --------------
5433# find reload flag for linker
5434#   -- PORTME Some linkers may need a different reload flag.
5435m4_defun([_LT_CMD_RELOAD],
5436[AC_CACHE_CHECK([for $LD option to reload object files],
5437  lt_cv_ld_reload_flag,
5438  [lt_cv_ld_reload_flag='-r'])
5439reload_flag=$lt_cv_ld_reload_flag
5440case $reload_flag in
5441"" | " "*) ;;
5442*) reload_flag=" $reload_flag" ;;
5443esac
5444reload_cmds='$LD$reload_flag -o $output$reload_objs'
5445case $host_os in
5446  darwin*)
5447    if test "$GCC" = yes; then
5448      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
5449    else
5450      reload_cmds='$LD$reload_flag -o $output$reload_objs'
5451    fi
5452    ;;
5453esac
5454_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
5455_LT_TAGDECL([], [reload_cmds], [2])dnl
5456])# _LT_CMD_RELOAD
5457
5458
5459# _LT_CHECK_MAGIC_METHOD
5460# ----------------------
5461# how to check for library dependencies
5462#  -- PORTME fill in with the dynamic library characteristics
5463m4_defun([_LT_CHECK_MAGIC_METHOD],
5464[m4_require([_LT_DECL_EGREP])
5465m4_require([_LT_DECL_OBJDUMP])
5466AC_CACHE_CHECK([how to recognize dependent libraries],
5467lt_cv_deplibs_check_method,
5468[lt_cv_file_magic_cmd='$MAGIC_CMD'
5469lt_cv_file_magic_test_file=
5470lt_cv_deplibs_check_method='unknown'
5471# Need to set the preceding variable on all platforms that support
5472# interlibrary dependencies.
5473# 'none' -- dependencies not supported.
5474# `unknown' -- same as none, but documents that we really don't know.
5475# 'pass_all' -- all dependencies passed with no checks.
5476# 'test_compile' -- check by making test program.
5477# 'file_magic [[regex]]' -- check by looking for files in library path
5478# which responds to the $file_magic_cmd with a given extended regex.
5479# If you have `file' or equivalent on your system and you're not sure
5480# whether `pass_all' will *always* work, you probably want this one.
5481
5482case $host_os in
5483aix[[4-9]]*)
5484  lt_cv_deplibs_check_method=pass_all
5485  ;;
5486
5487beos*)
5488  lt_cv_deplibs_check_method=pass_all
5489  ;;
5490
5491bsdi[[45]]*)
5492  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
5493  lt_cv_file_magic_cmd='/usr/bin/file -L'
5494  lt_cv_file_magic_test_file=/shlib/libc.so
5495  ;;
5496
5497cygwin*)
5498  # func_win32_libid is a shell function defined in ltmain.sh
5499  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5500  lt_cv_file_magic_cmd='func_win32_libid'
5501  ;;
5502
5503mingw* | pw32*)
5504  # Base MSYS/MinGW do not provide the 'file' command needed by
5505  # func_win32_libid shell function, so use a weaker test based on 'objdump',
5506  # unless we find 'file', for example because we are cross-compiling.
5507  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
5508  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
5509    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
5510    lt_cv_file_magic_cmd='func_win32_libid'
5511  else
5512    # Keep this pattern in sync with the one in func_win32_libid.
5513    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
5514    lt_cv_file_magic_cmd='$OBJDUMP -f'
5515  fi
5516  ;;
5517
5518cegcc*)
5519  # use the weaker test based on 'objdump'. See mingw*.
5520  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
5521  lt_cv_file_magic_cmd='$OBJDUMP -f'
5522  ;;
5523
5524darwin* | rhapsody*)
5525  lt_cv_deplibs_check_method=pass_all
5526  ;;
5527
5528freebsd* | dragonfly*)
5529  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5530    case $host_cpu in
5531    i*86 )
5532      # Not sure whether the presence of OpenBSD here was a mistake.
5533      # Let's accept both of them until this is cleared up.
5534      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
5535      lt_cv_file_magic_cmd=/usr/bin/file
5536      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
5537      ;;
5538    esac
5539  else
5540    lt_cv_deplibs_check_method=pass_all
5541  fi
5542  ;;
5543
5544gnu*)
5545  lt_cv_deplibs_check_method=pass_all
5546  ;;
5547
5548haiku*)
5549  lt_cv_deplibs_check_method=pass_all
5550  ;;
5551
5552hpux10.20* | hpux11*)
5553  lt_cv_file_magic_cmd=/usr/bin/file
5554  case $host_cpu in
5555  ia64*)
5556    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
5557    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
5558    ;;
5559  hppa*64*)
5560    [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]']
5561    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
5562    ;;
5563  *)
5564    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
5565    lt_cv_file_magic_test_file=/usr/lib/libc.sl
5566    ;;
5567  esac
5568  ;;
5569
5570interix[[3-9]]*)
5571  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
5572  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
5573  ;;
5574
5575irix5* | irix6* | nonstopux*)
5576  case $LD in
5577  *-32|*"-32 ") libmagic=32-bit;;
5578  *-n32|*"-n32 ") libmagic=N32;;
5579  *-64|*"-64 ") libmagic=64-bit;;
5580  *) libmagic=never-match;;
5581  esac
5582  lt_cv_deplibs_check_method=pass_all
5583  ;;
5584
5585# This must be Linux ELF.
5586linux* | k*bsd*-gnu | kopensolaris*-gnu)
5587  lt_cv_deplibs_check_method=pass_all
5588  ;;
5589
5590netbsd*)
5591  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
5592    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5593  else
5594    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
5595  fi
5596  ;;
5597
5598newos6*)
5599  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
5600  lt_cv_file_magic_cmd=/usr/bin/file
5601  lt_cv_file_magic_test_file=/usr/lib/libnls.so
5602  ;;
5603
5604*nto* | *qnx*)
5605  lt_cv_deplibs_check_method=pass_all
5606  ;;
5607
5608openbsd*)
5609  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5610    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
5611  else
5612    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
5613  fi
5614  ;;
5615
5616osf3* | osf4* | osf5*)
5617  lt_cv_deplibs_check_method=pass_all
5618  ;;
5619
5620rdos*)
5621  lt_cv_deplibs_check_method=pass_all
5622  ;;
5623
5624solaris*)
5625  lt_cv_deplibs_check_method=pass_all
5626  ;;
5627
5628sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
5629  lt_cv_deplibs_check_method=pass_all
5630  ;;
5631
5632sysv4 | sysv4.3*)
5633  case $host_vendor in
5634  motorola)
5635    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]]'
5636    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
5637    ;;
5638  ncr)
5639    lt_cv_deplibs_check_method=pass_all
5640    ;;
5641  sequent)
5642    lt_cv_file_magic_cmd='/bin/file'
5643    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
5644    ;;
5645  sni)
5646    lt_cv_file_magic_cmd='/bin/file'
5647    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
5648    lt_cv_file_magic_test_file=/lib/libc.so
5649    ;;
5650  siemens)
5651    lt_cv_deplibs_check_method=pass_all
5652    ;;
5653  pc)
5654    lt_cv_deplibs_check_method=pass_all
5655    ;;
5656  esac
5657  ;;
5658
5659tpf*)
5660  lt_cv_deplibs_check_method=pass_all
5661  ;;
5662esac
5663])
5664file_magic_cmd=$lt_cv_file_magic_cmd
5665deplibs_check_method=$lt_cv_deplibs_check_method
5666test -z "$deplibs_check_method" && deplibs_check_method=unknown
5667
5668_LT_DECL([], [deplibs_check_method], [1],
5669    [Method to check whether dependent libraries are shared objects])
5670_LT_DECL([], [file_magic_cmd], [1],
5671    [Command to use when deplibs_check_method == "file_magic"])
5672])# _LT_CHECK_MAGIC_METHOD
5673
5674
5675# LT_PATH_NM
5676# ----------
5677# find the pathname to a BSD- or MS-compatible name lister
5678AC_DEFUN([LT_PATH_NM],
5679[AC_REQUIRE([AC_PROG_CC])dnl
5680AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
5681[if test -n "$NM"; then
5682  # Let the user override the test.
5683  lt_cv_path_NM="$NM"
5684else
5685  lt_nm_to_check="${ac_tool_prefix}nm"
5686  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
5687    lt_nm_to_check="$lt_nm_to_check nm"
5688  fi
5689  for lt_tmp_nm in $lt_nm_to_check; do
5690    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
5691    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
5692      IFS="$lt_save_ifs"
5693      test -z "$ac_dir" && ac_dir=.
5694      tmp_nm="$ac_dir/$lt_tmp_nm"
5695      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
5696	# Check to see if the nm accepts a BSD-compat flag.
5697	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
5698	#   nm: unknown option "B" ignored
5699	# Tru64's nm complains that /dev/null is an invalid object file
5700	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
5701	*/dev/null* | *'Invalid file or object type'*)
5702	  lt_cv_path_NM="$tmp_nm -B"
5703	  break
5704	  ;;
5705	*)
5706	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
5707	  */dev/null*)
5708	    lt_cv_path_NM="$tmp_nm -p"
5709	    break
5710	    ;;
5711	  *)
5712	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
5713	    continue # so that we can try to find one that supports BSD flags
5714	    ;;
5715	  esac
5716	  ;;
5717	esac
5718      fi
5719    done
5720    IFS="$lt_save_ifs"
5721  done
5722  : ${lt_cv_path_NM=no}
5723fi])
5724if test "$lt_cv_path_NM" != "no"; then
5725  NM="$lt_cv_path_NM"
5726else
5727  # Didn't find any BSD compatible name lister, look for dumpbin.
5728  if test -n "$DUMPBIN"; then :
5729    # Let the user override the test.
5730  else
5731    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
5732    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
5733    *COFF*)
5734      DUMPBIN="$DUMPBIN -symbols"
5735      ;;
5736    *)
5737      DUMPBIN=:
5738      ;;
5739    esac
5740  fi
5741  AC_SUBST([DUMPBIN])
5742  if test "$DUMPBIN" != ":"; then
5743    NM="$DUMPBIN"
5744  fi
5745fi
5746test -z "$NM" && NM=nm
5747AC_SUBST([NM])
5748_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
5749
5750AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
5751  [lt_cv_nm_interface="BSD nm"
5752  echo "int some_variable = 0;" > conftest.$ac_ext
5753  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
5754  (eval "$ac_compile" 2>conftest.err)
5755  cat conftest.err >&AS_MESSAGE_LOG_FD
5756  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
5757  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
5758  cat conftest.err >&AS_MESSAGE_LOG_FD
5759  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
5760  cat conftest.out >&AS_MESSAGE_LOG_FD
5761  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
5762    lt_cv_nm_interface="MS dumpbin"
5763  fi
5764  rm -f conftest*])
5765])# LT_PATH_NM
5766
5767# Old names:
5768AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
5769AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
5770dnl aclocal-1.4 backwards compatibility:
5771dnl AC_DEFUN([AM_PROG_NM], [])
5772dnl AC_DEFUN([AC_PROG_NM], [])
5773
5774
5775# LT_LIB_M
5776# --------
5777# check for math library
5778AC_DEFUN([LT_LIB_M],
5779[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5780LIBM=
5781case $host in
5782*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
5783  # These system don't have libm, or don't need it
5784  ;;
5785*-ncr-sysv4.3*)
5786  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
5787  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
5788  ;;
5789*)
5790  AC_CHECK_LIB(m, cos, LIBM="-lm")
5791  ;;
5792esac
5793AC_SUBST([LIBM])
5794])# LT_LIB_M
5795
5796# Old name:
5797AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
5798dnl aclocal-1.4 backwards compatibility:
5799dnl AC_DEFUN([AC_CHECK_LIBM], [])
5800
5801
5802# _LT_COMPILER_NO_RTTI([TAGNAME])
5803# -------------------------------
5804m4_defun([_LT_COMPILER_NO_RTTI],
5805[m4_require([_LT_TAG_COMPILER])dnl
5806
5807_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5808
5809if test "$GCC" = yes; then
5810  case $cc_basename in
5811  nvcc*)
5812    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
5813  *)
5814    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
5815  esac
5816
5817  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5818    lt_cv_prog_compiler_rtti_exceptions,
5819    [-fno-rtti -fno-exceptions], [],
5820    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5821fi
5822_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
5823	[Compiler flag to turn off builtin functions])
5824])# _LT_COMPILER_NO_RTTI
5825
5826
5827# _LT_CMD_GLOBAL_SYMBOLS
5828# ----------------------
5829m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
5830[AC_REQUIRE([AC_CANONICAL_HOST])dnl
5831AC_REQUIRE([AC_PROG_CC])dnl
5832AC_REQUIRE([AC_PROG_AWK])dnl
5833AC_REQUIRE([LT_PATH_NM])dnl
5834AC_REQUIRE([LT_PATH_LD])dnl
5835m4_require([_LT_DECL_SED])dnl
5836m4_require([_LT_DECL_EGREP])dnl
5837m4_require([_LT_TAG_COMPILER])dnl
5838
5839# Check for command to grab the raw symbol name followed by C symbol from nm.
5840AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5841AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5842[
5843# These are sane defaults that work on at least a few old systems.
5844# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
5845
5846# Character class describing NM global symbol codes.
5847symcode='[[BCDEGRST]]'
5848
5849# Regexp to match symbols that can be accessed directly from C.
5850sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5851
5852# Define system-specific variables.
5853case $host_os in
5854aix*)
5855  symcode='[[BCDT]]'
5856  ;;
5857cygwin* | mingw* | pw32* | cegcc*)
5858  symcode='[[ABCDGISTW]]'
5859  ;;
5860hpux*)
5861  if test "$host_cpu" = ia64; then
5862    symcode='[[ABCDEGRST]]'
5863  fi
5864  ;;
5865irix* | nonstopux*)
5866  symcode='[[BCDEGRST]]'
5867  ;;
5868osf*)
5869  symcode='[[BCDEGQRST]]'
5870  ;;
5871solaris*)
5872  symcode='[[BDRT]]'
5873  ;;
5874sco3.2v5*)
5875  symcode='[[DT]]'
5876  ;;
5877sysv4.2uw2*)
5878  symcode='[[DT]]'
5879  ;;
5880sysv5* | sco5v6* | unixware* | OpenUNIX*)
5881  symcode='[[ABDT]]'
5882  ;;
5883sysv4)
5884  symcode='[[DFNSTU]]'
5885  ;;
5886esac
5887
5888# If we're using GNU nm, then use its standard symbol codes.
5889case `$NM -V 2>&1` in
5890*GNU* | *'with BFD'*)
5891  symcode='[[ABCDGIRSTW]]' ;;
5892esac
5893
5894# Transform an extracted symbol line into a proper C declaration.
5895# Some systems (esp. on ia64) link data and code symbols differently,
5896# so use this general approach.
5897lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5898
5899# Transform an extracted symbol line into symbol name and symbol address
5900lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
5901lt_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'"
5902
5903# Handle CRLF in mingw tool chain
5904opt_cr=
5905case $build_os in
5906mingw*)
5907  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5908  ;;
5909esac
5910
5911# Try without a prefix underscore, then with it.
5912for ac_symprfx in "" "_"; do
5913
5914  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
5915  symxfrm="\\1 $ac_symprfx\\2 \\2"
5916
5917  # Write the raw and C identifiers.
5918  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
5919    # Fake it for dumpbin and say T for any non-static function
5920    # and D for any global variable.
5921    # Also find C++ and __fastcall symbols from MSVC++,
5922    # which start with @ or ?.
5923    lt_cv_sys_global_symbol_pipe="$AWK ['"\
5924"     {last_section=section; section=\$ 3};"\
5925"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
5926"     \$ 0!~/External *\|/{next};"\
5927"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
5928"     {if(hide[section]) next};"\
5929"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
5930"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
5931"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
5932"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
5933"     ' prfx=^$ac_symprfx]"
5934  else
5935    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
5936  fi
5937
5938  # Check to see that the pipe works correctly.
5939  pipe_works=no
5940
5941  rm -f conftest*
5942  cat > conftest.$ac_ext <<_LT_EOF
5943#ifdef __cplusplus
5944extern "C" {
5945#endif
5946char nm_test_var;
5947void nm_test_func(void);
5948void nm_test_func(void){}
5949#ifdef __cplusplus
5950}
5951#endif
5952int main(){nm_test_var='a';nm_test_func();return(0);}
5953_LT_EOF
5954
5955  if AC_TRY_EVAL(ac_compile); then
5956    # Now try to grab the symbols.
5957    nlist=conftest.nm
5958    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
5959      # Try sorting and uniquifying the output.
5960      if sort "$nlist" | uniq > "$nlist"T; then
5961	mv -f "$nlist"T "$nlist"
5962      else
5963	rm -f "$nlist"T
5964      fi
5965
5966      # Make sure that we snagged all the symbols we need.
5967      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
5968	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
5969	  cat <<_LT_EOF > conftest.$ac_ext
5970#ifdef __cplusplus
5971extern "C" {
5972#endif
5973
5974_LT_EOF
5975	  # Now generate the symbol file.
5976	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
5977
5978	  cat <<_LT_EOF >> conftest.$ac_ext
5979
5980/* The mapping between symbol names and symbols.  */
5981const struct {
5982  const char *name;
5983  void       *address;
5984}
5985lt__PROGRAM__LTX_preloaded_symbols[[]] =
5986{
5987  { "@PROGRAM@", (void *) 0 },
5988_LT_EOF
5989	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
5990	  cat <<\_LT_EOF >> conftest.$ac_ext
5991  {0, (void *) 0}
5992};
5993
5994/* This works around a problem in FreeBSD linker */
5995#ifdef FREEBSD_WORKAROUND
5996static const void *lt_preloaded_setup() {
5997  return lt__PROGRAM__LTX_preloaded_symbols;
5998}
5999#endif
6000
6001#ifdef __cplusplus
6002}
6003#endif
6004_LT_EOF
6005	  # Now try linking the two files.
6006	  mv conftest.$ac_objext conftstm.$ac_objext
6007	  lt_save_LIBS="$LIBS"
6008	  lt_save_CFLAGS="$CFLAGS"
6009	  LIBS="conftstm.$ac_objext"
6010	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
6011	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
6012	    pipe_works=yes
6013	  fi
6014	  LIBS="$lt_save_LIBS"
6015	  CFLAGS="$lt_save_CFLAGS"
6016	else
6017	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
6018	fi
6019      else
6020	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
6021      fi
6022    else
6023      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
6024    fi
6025  else
6026    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
6027    cat conftest.$ac_ext >&5
6028  fi
6029  rm -rf conftest* conftst*
6030
6031  # Do not use the global_symbol_pipe unless it works.
6032  if test "$pipe_works" = yes; then
6033    break
6034  else
6035    lt_cv_sys_global_symbol_pipe=
6036  fi
6037done
6038])
6039if test -z "$lt_cv_sys_global_symbol_pipe"; then
6040  lt_cv_sys_global_symbol_to_cdecl=
6041fi
6042if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
6043  AC_MSG_RESULT(failed)
6044else
6045  AC_MSG_RESULT(ok)
6046fi
6047
6048_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
6049    [Take the output of nm and produce a listing of raw symbols and C names])
6050_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
6051    [Transform the output of nm in a proper C declaration])
6052_LT_DECL([global_symbol_to_c_name_address],
6053    [lt_cv_sys_global_symbol_to_c_name_address], [1],
6054    [Transform the output of nm in a C name address pair])
6055_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
6056    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
6057    [Transform the output of nm in a C name address pair when lib prefix is needed])
6058]) # _LT_CMD_GLOBAL_SYMBOLS
6059
6060
6061# _LT_COMPILER_PIC([TAGNAME])
6062# ---------------------------
6063m4_defun([_LT_COMPILER_PIC],
6064[m4_require([_LT_TAG_COMPILER])dnl
6065_LT_TAGVAR(lt_prog_compiler_wl, $1)=
6066_LT_TAGVAR(lt_prog_compiler_pic, $1)=
6067_LT_TAGVAR(lt_prog_compiler_static, $1)=
6068
6069AC_MSG_CHECKING([for $compiler option to produce PIC])
6070m4_if([$1], [CXX], [
6071  # C++ specific cases for pic, static, wl, etc.
6072  if test "$GXX" = yes; then
6073    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6074    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6075
6076    case $host_os in
6077    aix*)
6078      # All AIX code is PIC.
6079      if test "$host_cpu" = ia64; then
6080	# AIX 5 now supports IA64 processor
6081	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6082      fi
6083      ;;
6084
6085    amigaos*)
6086      case $host_cpu in
6087      powerpc)
6088            # see comment about AmigaOS4 .so support
6089            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6090        ;;
6091      m68k)
6092            # FIXME: we need at least 68020 code to build shared libraries, but
6093            # adding the `-m68020' flag to GCC prevents building anything better,
6094            # like `-m68040'.
6095            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6096        ;;
6097      esac
6098      ;;
6099
6100    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6101      # PIC is the default for these OSes.
6102      ;;
6103    mingw* | cygwin* | os2* | pw32* | cegcc*)
6104      # This hack is so that the source file can tell whether it is being
6105      # built for inclusion in a dll (and should export symbols for example).
6106      # Although the cygwin gcc ignores -fPIC, still need this for old-style
6107      # (--disable-auto-import) libraries
6108      m4_if([$1], [GCJ], [],
6109	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6110      ;;
6111    darwin* | rhapsody*)
6112      # PIC is the default on this platform
6113      # Common symbols not allowed in MH_DYLIB files
6114      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6115      ;;
6116    *djgpp*)
6117      # DJGPP does not support shared libraries at all
6118      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6119      ;;
6120    haiku*)
6121      # PIC is the default for Haiku.
6122      # The "-static" flag exists, but is broken.
6123      _LT_TAGVAR(lt_prog_compiler_static, $1)=
6124      ;;
6125    interix[[3-9]]*)
6126      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6127      # Instead, we relocate shared libraries at runtime.
6128      ;;
6129    sysv4*MP*)
6130      if test -d /usr/nec; then
6131	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6132      fi
6133      ;;
6134    hpux*)
6135      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
6136      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
6137      # sets the default TLS model and affects inlining.
6138      case $host_cpu in
6139      hppa*64*)
6140	;;
6141      *)
6142	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6143	;;
6144      esac
6145      ;;
6146    *qnx* | *nto*)
6147      # QNX uses GNU C++, but need to define -shared option too, otherwise
6148      # it will coredump.
6149      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6150      ;;
6151    *)
6152      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6153      ;;
6154    esac
6155  else
6156    case $host_os in
6157      aix[[4-9]]*)
6158	# All AIX code is PIC.
6159	if test "$host_cpu" = ia64; then
6160	  # AIX 5 now supports IA64 processor
6161	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6162	else
6163	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6164	fi
6165	;;
6166      chorus*)
6167	case $cc_basename in
6168	cxch68*)
6169	  # Green Hills C++ Compiler
6170	  # _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"
6171	  ;;
6172	esac
6173	;;
6174      dgux*)
6175	case $cc_basename in
6176	  ec++*)
6177	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6178	    ;;
6179	  ghcx*)
6180	    # Green Hills C++ Compiler
6181	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6182	    ;;
6183	  *)
6184	    ;;
6185	esac
6186	;;
6187      freebsd* | dragonfly*)
6188	# FreeBSD uses GNU C++
6189	;;
6190      hpux9* | hpux10* | hpux11*)
6191	case $cc_basename in
6192	  CC*)
6193	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6194	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6195	    if test "$host_cpu" != ia64; then
6196	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6197	    fi
6198	    ;;
6199	  aCC*)
6200	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6201	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6202	    case $host_cpu in
6203	    hppa*64*|ia64*)
6204	      # +Z the default
6205	      ;;
6206	    *)
6207	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6208	      ;;
6209	    esac
6210	    ;;
6211	  *)
6212	    ;;
6213	esac
6214	;;
6215      interix*)
6216	# This is c89, which is MS Visual C++ (no shared libs)
6217	# Anyone wants to do a port?
6218	;;
6219      irix5* | irix6* | nonstopux*)
6220	case $cc_basename in
6221	  CC*)
6222	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6223	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6224	    # CC pic flag -KPIC is the default.
6225	    ;;
6226	  *)
6227	    ;;
6228	esac
6229	;;
6230      linux* | k*bsd*-gnu | kopensolaris*-gnu)
6231	case $cc_basename in
6232	  KCC*)
6233	    # KAI C++ Compiler
6234	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6235	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6236	    ;;
6237	  ecpc* )
6238	    # old Intel C++ for x86_64 which still supported -KPIC.
6239	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6240	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6241	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6242	    ;;
6243	  icpc* )
6244	    # Intel C++, used to be incompatible with GCC.
6245	    # ICC 10 doesn't accept -KPIC any more.
6246	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6247	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6248	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6249	    ;;
6250	  pgCC* | pgcpp*)
6251	    # Portland Group C++ compiler
6252	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6253	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6254	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6255	    ;;
6256	  cxx*)
6257	    # Compaq C++
6258	    # Make sure the PIC flag is empty.  It appears that all Alpha
6259	    # Linux and Compaq Tru64 Unix objects are PIC.
6260	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6261	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6262	    ;;
6263	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
6264	    # IBM XL 8.0, 9.0 on PPC and BlueGene
6265	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6266	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
6267	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
6268	    ;;
6269	  *)
6270	    case `$CC -V 2>&1 | sed 5q` in
6271	    *Sun\ C*)
6272	      # Sun C++ 5.9
6273	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6274	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6275	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6276	      ;;
6277	    esac
6278	    ;;
6279	esac
6280	;;
6281      lynxos*)
6282	;;
6283      m88k*)
6284	;;
6285      mvs*)
6286	case $cc_basename in
6287	  cxx*)
6288	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6289	    ;;
6290	  *)
6291	    ;;
6292	esac
6293	;;
6294      netbsd*)
6295	;;
6296      *qnx* | *nto*)
6297        # QNX uses GNU C++, but need to define -shared option too, otherwise
6298        # it will coredump.
6299        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6300        ;;
6301      osf3* | osf4* | osf5*)
6302	case $cc_basename in
6303	  KCC*)
6304	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6305	    ;;
6306	  RCC*)
6307	    # Rational C++ 2.4.1
6308	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6309	    ;;
6310	  cxx*)
6311	    # Digital/Compaq C++
6312	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6313	    # Make sure the PIC flag is empty.  It appears that all Alpha
6314	    # Linux and Compaq Tru64 Unix objects are PIC.
6315	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6316	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6317	    ;;
6318	  *)
6319	    ;;
6320	esac
6321	;;
6322      psos*)
6323	;;
6324      solaris*)
6325	case $cc_basename in
6326	  CC* | sunCC*)
6327	    # Sun C++ 4.2, 5.x and Centerline C++
6328	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6329	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6330	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6331	    ;;
6332	  gcx*)
6333	    # Green Hills C++ Compiler
6334	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6335	    ;;
6336	  *)
6337	    ;;
6338	esac
6339	;;
6340      sunos4*)
6341	case $cc_basename in
6342	  CC*)
6343	    # Sun C++ 4.x
6344	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6345	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6346	    ;;
6347	  lcc*)
6348	    # Lucid
6349	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6350	    ;;
6351	  *)
6352	    ;;
6353	esac
6354	;;
6355      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6356	case $cc_basename in
6357	  CC*)
6358	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6359	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6360	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6361	    ;;
6362	esac
6363	;;
6364      tandem*)
6365	case $cc_basename in
6366	  NCC*)
6367	    # NonStop-UX NCC 3.20
6368	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6369	    ;;
6370	  *)
6371	    ;;
6372	esac
6373	;;
6374      vxworks*)
6375	;;
6376      *)
6377	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6378	;;
6379    esac
6380  fi
6381],
6382[
6383  if test "$GCC" = yes; then
6384    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6385    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6386
6387    case $host_os in
6388      aix*)
6389      # All AIX code is PIC.
6390      if test "$host_cpu" = ia64; then
6391	# AIX 5 now supports IA64 processor
6392	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6393      fi
6394      ;;
6395
6396    amigaos*)
6397      case $host_cpu in
6398      powerpc)
6399            # see comment about AmigaOS4 .so support
6400            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6401        ;;
6402      m68k)
6403            # FIXME: we need at least 68020 code to build shared libraries, but
6404            # adding the `-m68020' flag to GCC prevents building anything better,
6405            # like `-m68040'.
6406            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6407        ;;
6408      esac
6409      ;;
6410
6411    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6412      # PIC is the default for these OSes.
6413      ;;
6414
6415    mingw* | cygwin* | pw32* | os2* | cegcc*)
6416      # This hack is so that the source file can tell whether it is being
6417      # built for inclusion in a dll (and should export symbols for example).
6418      # Although the cygwin gcc ignores -fPIC, still need this for old-style
6419      # (--disable-auto-import) libraries
6420      m4_if([$1], [GCJ], [],
6421	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6422      ;;
6423
6424    darwin* | rhapsody*)
6425      # PIC is the default on this platform
6426      # Common symbols not allowed in MH_DYLIB files
6427      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6428      ;;
6429
6430    haiku*)
6431      # PIC is the default for Haiku.
6432      # The "-static" flag exists, but is broken.
6433      _LT_TAGVAR(lt_prog_compiler_static, $1)=
6434      ;;
6435
6436    hpux*)
6437      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
6438      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
6439      # sets the default TLS model and affects inlining.
6440      case $host_cpu in
6441      hppa*64*)
6442	# +Z the default
6443	;;
6444      *)
6445	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6446	;;
6447      esac
6448      ;;
6449
6450    interix[[3-9]]*)
6451      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6452      # Instead, we relocate shared libraries at runtime.
6453      ;;
6454
6455    msdosdjgpp*)
6456      # Just because we use GCC doesn't mean we suddenly get shared libraries
6457      # on systems that don't support them.
6458      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6459      enable_shared=no
6460      ;;
6461
6462    *nto* | *qnx*)
6463      # QNX uses GNU C++, but need to define -shared option too, otherwise
6464      # it will coredump.
6465      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6466      ;;
6467
6468    sysv4*MP*)
6469      if test -d /usr/nec; then
6470	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6471      fi
6472      ;;
6473
6474    *)
6475      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6476      ;;
6477    esac
6478
6479    case $cc_basename in
6480    nvcc*) # Cuda Compiler Driver 2.2
6481      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
6482      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
6483      ;;
6484    esac
6485  else
6486    # PORTME Check for flag to pass linker flags through the system compiler.
6487    case $host_os in
6488    aix*)
6489      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6490      if test "$host_cpu" = ia64; then
6491	# AIX 5 now supports IA64 processor
6492	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6493      else
6494	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6495      fi
6496      ;;
6497
6498    mingw* | cygwin* | pw32* | os2* | cegcc*)
6499      # This hack is so that the source file can tell whether it is being
6500      # built for inclusion in a dll (and should export symbols for example).
6501      m4_if([$1], [GCJ], [],
6502	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6503      ;;
6504
6505    hpux9* | hpux10* | hpux11*)
6506      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6507      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6508      # not for PA HP-UX.
6509      case $host_cpu in
6510      hppa*64*|ia64*)
6511	# +Z the default
6512	;;
6513      *)
6514	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6515	;;
6516      esac
6517      # Is there a better lt_prog_compiler_static that works with the bundled CC?
6518      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6519      ;;
6520
6521    irix5* | irix6* | nonstopux*)
6522      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6523      # PIC (with -KPIC) is the default.
6524      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6525      ;;
6526
6527    linux* | k*bsd*-gnu | kopensolaris*-gnu)
6528      case $cc_basename in
6529      # old Intel for x86_64 which still supported -KPIC.
6530      ecc*)
6531	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6532	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6533	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6534        ;;
6535      # icc used to be incompatible with GCC.
6536      # ICC 10 doesn't accept -KPIC any more.
6537      icc* | ifort*)
6538	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6539	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6540	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
6541        ;;
6542      # Lahey Fortran 8.1.
6543      lf95*)
6544	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6545	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
6546	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
6547	;;
6548      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
6549        # Portland Group compilers (*not* the Pentium gcc compiler,
6550	# which looks to be a dead project)
6551	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6552	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6553	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6554        ;;
6555      ccc*)
6556        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6557        # All Alpha code is PIC.
6558        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6559        ;;
6560      xl* | bgxl* | bgf* | mpixl*)
6561	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
6562	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6563	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
6564	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
6565	;;
6566      *)
6567	case `$CC -V 2>&1 | sed 5q` in
6568	*Sun\ F* | *Sun*Fortran*)
6569	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
6570	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6571	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6572	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
6573	  ;;
6574	*Sun\ C*)
6575	  # Sun C 5.9
6576	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6577	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6578	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6579	  ;;
6580	esac
6581	;;
6582      esac
6583      ;;
6584
6585    newsos6)
6586      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6587      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6588      ;;
6589
6590    *nto* | *qnx*)
6591      # QNX uses GNU C++, but need to define -shared option too, otherwise
6592      # it will coredump.
6593      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
6594      ;;
6595
6596    osf3* | osf4* | osf5*)
6597      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6598      # All OSF/1 code is PIC.
6599      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6600      ;;
6601
6602    rdos*)
6603      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6604      ;;
6605
6606    solaris*)
6607      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6608      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6609      case $cc_basename in
6610      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
6611	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
6612      *)
6613	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
6614      esac
6615      ;;
6616
6617    sunos4*)
6618      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6619      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6620      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6621      ;;
6622
6623    sysv4 | sysv4.2uw2* | sysv4.3*)
6624      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6625      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6626      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6627      ;;
6628
6629    sysv4*MP*)
6630      if test -d /usr/nec ;then
6631	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
6632	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6633      fi
6634      ;;
6635
6636    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6637      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6638      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6639      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6640      ;;
6641
6642    unicos*)
6643      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6644      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6645      ;;
6646
6647    uts4*)
6648      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6649      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6650      ;;
6651
6652    *)
6653      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6654      ;;
6655    esac
6656  fi
6657])
6658case $host_os in
6659  # For platforms which do not support PIC, -DPIC is meaningless:
6660  *djgpp*)
6661    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
6662    ;;
6663  *)
6664    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
6665    ;;
6666esac
6667AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
6668_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
6669	[How to pass a linker flag through the compiler])
6670
6671#
6672# Check to make sure the PIC flag actually works.
6673#
6674if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
6675  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
6676    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
6677    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
6678    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
6679     "" | " "*) ;;
6680     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
6681     esac],
6682    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
6683     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
6684fi
6685_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
6686	[Additional compiler flags for building library objects])
6687
6688#
6689# Check to make sure the static flag actually works.
6690#
6691wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
6692_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
6693  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
6694  $lt_tmp_static_flag,
6695  [],
6696  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
6697_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
6698	[Compiler flag to prevent dynamic linking])
6699])# _LT_COMPILER_PIC
6700
6701
6702# _LT_LINKER_SHLIBS([TAGNAME])
6703# ----------------------------
6704# See if the linker supports building shared libraries.
6705m4_defun([_LT_LINKER_SHLIBS],
6706[AC_REQUIRE([LT_PATH_LD])dnl
6707AC_REQUIRE([LT_PATH_NM])dnl
6708m4_require([_LT_FILEUTILS_DEFAULTS])dnl
6709m4_require([_LT_DECL_EGREP])dnl
6710m4_require([_LT_DECL_SED])dnl
6711m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
6712m4_require([_LT_TAG_COMPILER])dnl
6713AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
6714m4_if([$1], [CXX], [
6715  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6716  case $host_os in
6717  aix[[4-9]]*)
6718    # If we're using GNU nm, then we don't want the "-C" option.
6719    # -C means demangle to AIX nm, but means don't demangle with GNU nm
6720    # Also, AIX nm treats weak defined symbols like other global defined
6721    # symbols, whereas GNU nm marks them as "W".
6722    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
6723      _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'
6724    else
6725      _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'
6726    fi
6727    ;;
6728  pw32*)
6729    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
6730  ;;
6731  cygwin* | mingw* | cegcc*)
6732    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
6733  ;;
6734  *)
6735    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6736  ;;
6737  esac
6738  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6739], [
6740  runpath_var=
6741  _LT_TAGVAR(allow_undefined_flag, $1)=
6742  _LT_TAGVAR(always_export_symbols, $1)=no
6743  _LT_TAGVAR(archive_cmds, $1)=
6744  _LT_TAGVAR(archive_expsym_cmds, $1)=
6745  _LT_TAGVAR(compiler_needs_object, $1)=no
6746  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6747  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
6748  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
6749  _LT_TAGVAR(hardcode_automatic, $1)=no
6750  _LT_TAGVAR(hardcode_direct, $1)=no
6751  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
6752  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
6753  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
6754  _LT_TAGVAR(hardcode_libdir_separator, $1)=
6755  _LT_TAGVAR(hardcode_minus_L, $1)=no
6756  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6757  _LT_TAGVAR(inherit_rpath, $1)=no
6758  _LT_TAGVAR(link_all_deplibs, $1)=unknown
6759  _LT_TAGVAR(module_cmds, $1)=
6760  _LT_TAGVAR(module_expsym_cmds, $1)=
6761  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
6762  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
6763  _LT_TAGVAR(thread_safe_flag_spec, $1)=
6764  _LT_TAGVAR(whole_archive_flag_spec, $1)=
6765  # include_expsyms should be a list of space-separated symbols to be *always*
6766  # included in the symbol list
6767  _LT_TAGVAR(include_expsyms, $1)=
6768  # exclude_expsyms can be an extended regexp of symbols to exclude
6769  # it will be wrapped by ` (' and `)$', so one must not match beginning or
6770  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
6771  # as well as any symbol that contains `d'.
6772  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
6773  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
6774  # platforms (ab)use it in PIC code, but their linkers get confused if
6775  # the symbol is explicitly referenced.  Since portable code cannot
6776  # rely on this symbol name, it's probably fine to never include it in
6777  # preloaded symbol tables.
6778  # Exclude shared library initialization/finalization symbols.
6779dnl Note also adjust exclude_expsyms for C++ above.
6780  extract_expsyms_cmds=
6781
6782  case $host_os in
6783  cygwin* | mingw* | pw32* | cegcc*)
6784    # FIXME: the MSVC++ port hasn't been tested in a loooong time
6785    # When not using gcc, we currently assume that we are using
6786    # Microsoft Visual C++.
6787    if test "$GCC" != yes; then
6788      with_gnu_ld=no
6789    fi
6790    ;;
6791  interix*)
6792    # we just hope/assume this is gcc and not c89 (= MSVC++)
6793    with_gnu_ld=yes
6794    ;;
6795  openbsd*)
6796    with_gnu_ld=no
6797    ;;
6798  esac
6799
6800  _LT_TAGVAR(ld_shlibs, $1)=yes
6801
6802  # On some targets, GNU ld is compatible enough with the native linker
6803  # that we're better off using the native interface for both.
6804  lt_use_gnu_ld_interface=no
6805  if test "$with_gnu_ld" = yes; then
6806    case $host_os in
6807      aix*)
6808	# The AIX port of GNU ld has always aspired to compatibility
6809	# with the native linker.  However, as the warning in the GNU ld
6810	# block says, versions before 2.19.5* couldn't really create working
6811	# shared libraries, regardless of the interface used.
6812	case `$LD -v 2>&1` in
6813	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
6814	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
6815	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
6816	  *)
6817	    lt_use_gnu_ld_interface=yes
6818	    ;;
6819	esac
6820	;;
6821      *)
6822	lt_use_gnu_ld_interface=yes
6823	;;
6824    esac
6825  fi
6826
6827  if test "$lt_use_gnu_ld_interface" = yes; then
6828    # If archive_cmds runs LD, not CC, wlarc should be empty
6829    wlarc='${wl}'
6830
6831    # Set some defaults for GNU ld with shared library support. These
6832    # are reset later if shared libraries are not supported. Putting them
6833    # here allows them to be overridden if necessary.
6834    runpath_var=LD_RUN_PATH
6835    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6836    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
6837    # ancient GNU ld didn't support --whole-archive et. al.
6838    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
6839      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
6840    else
6841      _LT_TAGVAR(whole_archive_flag_spec, $1)=
6842    fi
6843    supports_anon_versioning=no
6844    case `$LD -v 2>&1` in
6845      *GNU\ gold*) supports_anon_versioning=yes ;;
6846      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
6847      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
6848      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
6849      *\ 2.11.*) ;; # other 2.11 versions
6850      *) supports_anon_versioning=yes ;;
6851    esac
6852
6853    # See if GNU ld supports shared libraries.
6854    case $host_os in
6855    aix[[3-9]]*)
6856      # On AIX/PPC, the GNU linker is very broken
6857      if test "$host_cpu" != ia64; then
6858	_LT_TAGVAR(ld_shlibs, $1)=no
6859	cat <<_LT_EOF 1>&2
6860
6861*** Warning: the GNU linker, at least up to release 2.19, is reported
6862*** to be unable to reliably create shared libraries on AIX.
6863*** Therefore, libtool is disabling shared libraries support.  If you
6864*** really care for shared libraries, you may want to install binutils
6865*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
6866*** You will then need to restart the configuration process.
6867
6868_LT_EOF
6869      fi
6870      ;;
6871
6872    amigaos*)
6873      case $host_cpu in
6874      powerpc)
6875            # see comment about AmigaOS4 .so support
6876            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6877            _LT_TAGVAR(archive_expsym_cmds, $1)=''
6878        ;;
6879      m68k)
6880            _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)'
6881            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6882            _LT_TAGVAR(hardcode_minus_L, $1)=yes
6883        ;;
6884      esac
6885      ;;
6886
6887    beos*)
6888      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
6889	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6890	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
6891	# support --undefined.  This deserves some investigation.  FIXME
6892	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6893      else
6894	_LT_TAGVAR(ld_shlibs, $1)=no
6895      fi
6896      ;;
6897
6898    cygwin* | mingw* | pw32* | cegcc*)
6899      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
6900      # as there is no search path for DLLs.
6901      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6902      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
6903      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
6904      _LT_TAGVAR(always_export_symbols, $1)=no
6905      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6906      _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'
6907
6908      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
6909        _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'
6910	# If the export-symbols file already is a .def file (1st line
6911	# is EXPORTS), use it as is; otherwise, prepend...
6912	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
6913	  cp $export_symbols $output_objdir/$soname.def;
6914	else
6915	  echo EXPORTS > $output_objdir/$soname.def;
6916	  cat $export_symbols >> $output_objdir/$soname.def;
6917	fi~
6918	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
6919      else
6920	_LT_TAGVAR(ld_shlibs, $1)=no
6921      fi
6922      ;;
6923
6924    haiku*)
6925      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6926      _LT_TAGVAR(link_all_deplibs, $1)=yes
6927      ;;
6928
6929    interix[[3-9]]*)
6930      _LT_TAGVAR(hardcode_direct, $1)=no
6931      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
6932      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6933      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6934      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
6935      # Instead, shared libraries are loaded at an image base (0x10000000 by
6936      # default) and relocated if they conflict, which is a slow very memory
6937      # consuming and fragmenting process.  To avoid this, we pick a random,
6938      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
6939      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
6940      _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'
6941      _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'
6942      ;;
6943
6944    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
6945      tmp_diet=no
6946      if test "$host_os" = linux-dietlibc; then
6947	case $cc_basename in
6948	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
6949	esac
6950      fi
6951      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
6952	 && test "$tmp_diet" = no
6953      then
6954	tmp_addflag=
6955	tmp_sharedflag='-shared'
6956	case $cc_basename,$host_cpu in
6957        pgcc*)				# Portland Group C compiler
6958	  _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'
6959	  tmp_addflag=' $pic_flag'
6960	  ;;
6961	pgf77* | pgf90* | pgf95* | pgfortran*)
6962					# Portland Group f77 and f90 compilers
6963	  _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'
6964	  tmp_addflag=' $pic_flag -Mnomain' ;;
6965	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
6966	  tmp_addflag=' -i_dynamic' ;;
6967	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
6968	  tmp_addflag=' -i_dynamic -nofor_main' ;;
6969	ifc* | ifort*)			# Intel Fortran compiler
6970	  tmp_addflag=' -nofor_main' ;;
6971	lf95*)				# Lahey Fortran 8.1
6972	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
6973	  tmp_sharedflag='--shared' ;;
6974	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
6975	  tmp_sharedflag='-qmkshrobj'
6976	  tmp_addflag= ;;
6977	nvcc*)	# Cuda Compiler Driver 2.2
6978	  _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'
6979	  _LT_TAGVAR(compiler_needs_object, $1)=yes
6980	  ;;
6981	esac
6982	case `$CC -V 2>&1 | sed 5q` in
6983	*Sun\ C*)			# Sun C 5.9
6984	  _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'
6985	  _LT_TAGVAR(compiler_needs_object, $1)=yes
6986	  tmp_sharedflag='-G' ;;
6987	*Sun\ F*)			# Sun Fortran 8.3
6988	  tmp_sharedflag='-G' ;;
6989	esac
6990	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
6991
6992        if test "x$supports_anon_versioning" = xyes; then
6993          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
6994	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
6995	    echo "local: *; };" >> $output_objdir/$libname.ver~
6996	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
6997        fi
6998
6999	case $cc_basename in
7000	xlf* | bgf* | bgxlf* | mpixlf*)
7001	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
7002	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
7003	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7004	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
7005	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
7006	  if test "x$supports_anon_versioning" = xyes; then
7007	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
7008	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7009	      echo "local: *; };" >> $output_objdir/$libname.ver~
7010	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
7011	  fi
7012	  ;;
7013	esac
7014      else
7015        _LT_TAGVAR(ld_shlibs, $1)=no
7016      fi
7017      ;;
7018
7019    netbsd*)
7020      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7021	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
7022	wlarc=
7023      else
7024	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7025	_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'
7026      fi
7027      ;;
7028
7029    solaris*)
7030      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
7031	_LT_TAGVAR(ld_shlibs, $1)=no
7032	cat <<_LT_EOF 1>&2
7033
7034*** Warning: The releases 2.8.* of the GNU linker cannot reliably
7035*** create shared libraries on Solaris systems.  Therefore, libtool
7036*** is disabling shared libraries support.  We urge you to upgrade GNU
7037*** binutils to release 2.9.1 or newer.  Another option is to modify
7038*** your PATH or compiler configuration so that the native linker is
7039*** used, and then restart.
7040
7041_LT_EOF
7042      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7043	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7044	_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'
7045      else
7046	_LT_TAGVAR(ld_shlibs, $1)=no
7047      fi
7048      ;;
7049
7050    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
7051      case `$LD -v 2>&1` in
7052        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
7053	_LT_TAGVAR(ld_shlibs, $1)=no
7054	cat <<_LT_EOF 1>&2
7055
7056*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
7057*** reliably create shared libraries on SCO systems.  Therefore, libtool
7058*** is disabling shared libraries support.  We urge you to upgrade GNU
7059*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
7060*** your PATH or compiler configuration so that the native linker is
7061*** used, and then restart.
7062
7063_LT_EOF
7064	;;
7065	*)
7066	  # For security reasons, it is highly recommended that you always
7067	  # use absolute paths for naming shared libraries, and exclude the
7068	  # DT_RUNPATH tag from executables and libraries.  But doing so
7069	  # requires that you compile everything twice, which is a pain.
7070	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7071	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7072	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7073	    _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'
7074	  else
7075	    _LT_TAGVAR(ld_shlibs, $1)=no
7076	  fi
7077	;;
7078      esac
7079      ;;
7080
7081    sunos4*)
7082      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7083      wlarc=
7084      _LT_TAGVAR(hardcode_direct, $1)=yes
7085      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7086      ;;
7087
7088    *)
7089      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
7090	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7091	_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'
7092      else
7093	_LT_TAGVAR(ld_shlibs, $1)=no
7094      fi
7095      ;;
7096    esac
7097
7098    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
7099      runpath_var=
7100      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7101      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
7102      _LT_TAGVAR(whole_archive_flag_spec, $1)=
7103    fi
7104  else
7105    # PORTME fill in a description of your system's linker (not GNU ld)
7106    case $host_os in
7107    aix3*)
7108      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7109      _LT_TAGVAR(always_export_symbols, $1)=yes
7110      _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'
7111      # Note: this linker hardcodes the directories in LIBPATH if there
7112      # are no directories specified by -L.
7113      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7114      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
7115	# Neither direct hardcoding nor static linking is supported with a
7116	# broken collect2.
7117	_LT_TAGVAR(hardcode_direct, $1)=unsupported
7118      fi
7119      ;;
7120
7121    aix[[4-9]]*)
7122      if test "$host_cpu" = ia64; then
7123	# On IA64, the linker does run time linking by default, so we don't
7124	# have to do anything special.
7125	aix_use_runtimelinking=no
7126	exp_sym_flag='-Bexport'
7127	no_entry_flag=""
7128      else
7129	# If we're using GNU nm, then we don't want the "-C" option.
7130	# -C means demangle to AIX nm, but means don't demangle with GNU nm
7131	# Also, AIX nm treats weak defined symbols like other global
7132	# defined symbols, whereas GNU nm marks them as "W".
7133	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
7134	  _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'
7135	else
7136	  _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'
7137	fi
7138	aix_use_runtimelinking=no
7139
7140	# Test if we are trying to use run time linking or normal
7141	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
7142	# need to do runtime linking.
7143	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7144	  for ld_flag in $LDFLAGS; do
7145	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
7146	    aix_use_runtimelinking=yes
7147	    break
7148	  fi
7149	  done
7150	  ;;
7151	esac
7152
7153	exp_sym_flag='-bexport'
7154	no_entry_flag='-bnoentry'
7155      fi
7156
7157      # When large executables or shared objects are built, AIX ld can
7158      # have problems creating the table of contents.  If linking a library
7159      # or program results in "error TOC overflow" add -mminimal-toc to
7160      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7161      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7162
7163      _LT_TAGVAR(archive_cmds, $1)=''
7164      _LT_TAGVAR(hardcode_direct, $1)=yes
7165      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7166      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7167      _LT_TAGVAR(link_all_deplibs, $1)=yes
7168      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7169
7170      if test "$GCC" = yes; then
7171	case $host_os in aix4.[[012]]|aix4.[[012]].*)
7172	# We only want to do this on AIX 4.2 and lower, the check
7173	# below for broken collect2 doesn't work under 4.3+
7174	  collect2name=`${CC} -print-prog-name=collect2`
7175	  if test -f "$collect2name" &&
7176	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
7177	  then
7178	  # We have reworked collect2
7179	  :
7180	  else
7181	  # We have old collect2
7182	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
7183	  # It fails to find uninstalled libraries when the uninstalled
7184	  # path is not listed in the libpath.  Setting hardcode_minus_L
7185	  # to unsupported forces relinking
7186	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
7187	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7188	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
7189	  fi
7190	  ;;
7191	esac
7192	shared_flag='-shared'
7193	if test "$aix_use_runtimelinking" = yes; then
7194	  shared_flag="$shared_flag "'${wl}-G'
7195	fi
7196      else
7197	# not using gcc
7198	if test "$host_cpu" = ia64; then
7199	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7200	# chokes on -Wl,-G. The following line is correct:
7201	  shared_flag='-G'
7202	else
7203	  if test "$aix_use_runtimelinking" = yes; then
7204	    shared_flag='${wl}-G'
7205	  else
7206	    shared_flag='${wl}-bM:SRE'
7207	  fi
7208	fi
7209      fi
7210
7211      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
7212      # It seems that -bexpall does not export symbols beginning with
7213      # underscore (_), so it is better to generate a list of symbols to export.
7214      _LT_TAGVAR(always_export_symbols, $1)=yes
7215      if test "$aix_use_runtimelinking" = yes; then
7216	# Warning - without using the other runtime loading flags (-brtl),
7217	# -berok will link without error, but may produce a broken library.
7218	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
7219        # Determine the default libpath from the value encoded in an
7220        # empty executable.
7221        _LT_SYS_MODULE_PATH_AIX
7222        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7223        _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"
7224      else
7225	if test "$host_cpu" = ia64; then
7226	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7227	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7228	  _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"
7229	else
7230	 # Determine the default libpath from the value encoded in an
7231	 # empty executable.
7232	 _LT_SYS_MODULE_PATH_AIX
7233	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7234	  # Warning - without using the other run time loading flags,
7235	  # -berok will link without error, but may produce a broken library.
7236	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7237	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7238	  if test "$with_gnu_ld" = yes; then
7239	    # We only use this code for GNU lds that support --whole-archive.
7240	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
7241	  else
7242	    # Exported symbols can be pulled into shared objects from archives
7243	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7244	  fi
7245	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7246	  # This is similar to how AIX traditionally builds its shared libraries.
7247	  _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'
7248	fi
7249      fi
7250      ;;
7251
7252    amigaos*)
7253      case $host_cpu in
7254      powerpc)
7255            # see comment about AmigaOS4 .so support
7256            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7257            _LT_TAGVAR(archive_expsym_cmds, $1)=''
7258        ;;
7259      m68k)
7260            _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)'
7261            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7262            _LT_TAGVAR(hardcode_minus_L, $1)=yes
7263        ;;
7264      esac
7265      ;;
7266
7267    bsdi[[45]]*)
7268      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
7269      ;;
7270
7271    cygwin* | mingw* | pw32* | cegcc*)
7272      # When not using gcc, we currently assume that we are using
7273      # Microsoft Visual C++.
7274      # hardcode_libdir_flag_spec is actually meaningless, as there is
7275      # no search path for DLLs.
7276      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7277      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7278      # Tell ltmain to make .lib files, not .a files.
7279      libext=lib
7280      # Tell ltmain to make .dll files, not .so files.
7281      shrext_cmds=".dll"
7282      # FIXME: Setting linknames here is a bad hack.
7283      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
7284      # The linker will automatically build a .lib file if we build a DLL.
7285      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
7286      # FIXME: Should let the user specify the lib program.
7287      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
7288      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
7289      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7290      ;;
7291
7292    darwin* | rhapsody*)
7293      _LT_DARWIN_LINKER_FEATURES($1)
7294      ;;
7295
7296    dgux*)
7297      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7298      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7299      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7300      ;;
7301
7302    freebsd1*)
7303      _LT_TAGVAR(ld_shlibs, $1)=no
7304      ;;
7305
7306    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
7307    # support.  Future versions do this automatically, but an explicit c++rt0.o
7308    # does not break anything, and helps significantly (at the cost of a little
7309    # extra space).
7310    freebsd2.2*)
7311      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
7312      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7313      _LT_TAGVAR(hardcode_direct, $1)=yes
7314      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7315      ;;
7316
7317    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
7318    freebsd2*)
7319      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7320      _LT_TAGVAR(hardcode_direct, $1)=yes
7321      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7322      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7323      ;;
7324
7325    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
7326    freebsd* | dragonfly*)
7327      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
7328      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7329      _LT_TAGVAR(hardcode_direct, $1)=yes
7330      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7331      ;;
7332
7333    hpux9*)
7334      if test "$GCC" = yes; then
7335	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
7336      else
7337	_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'
7338      fi
7339      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7340      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7341      _LT_TAGVAR(hardcode_direct, $1)=yes
7342
7343      # hardcode_minus_L: Not really in the search PATH,
7344      # but as the default location of the library.
7345      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7346      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7347      ;;
7348
7349    hpux10*)
7350      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
7351	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7352      else
7353	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
7354      fi
7355      if test "$with_gnu_ld" = no; then
7356	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7357	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
7358	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7359	_LT_TAGVAR(hardcode_direct, $1)=yes
7360	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7361	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7362	# hardcode_minus_L: Not really in the search PATH,
7363	# but as the default location of the library.
7364	_LT_TAGVAR(hardcode_minus_L, $1)=yes
7365      fi
7366      ;;
7367
7368    hpux11*)
7369      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
7370	case $host_cpu in
7371	hppa*64*)
7372	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7373	  ;;
7374	ia64*)
7375	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7376	  ;;
7377	*)
7378	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7379	  ;;
7380	esac
7381      else
7382	case $host_cpu in
7383	hppa*64*)
7384	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7385	  ;;
7386	ia64*)
7387	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7388	  ;;
7389	*)
7390	m4_if($1, [], [
7391	  # Older versions of the 11.00 compiler do not understand -b yet
7392	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
7393	  _LT_LINKER_OPTION([if $CC understands -b],
7394	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
7395	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
7396	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
7397	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
7398	  ;;
7399	esac
7400      fi
7401      if test "$with_gnu_ld" = no; then
7402	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7403	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
7404
7405	case $host_cpu in
7406	hppa*64*|ia64*)
7407	  _LT_TAGVAR(hardcode_direct, $1)=no
7408	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7409	  ;;
7410	*)
7411	  _LT_TAGVAR(hardcode_direct, $1)=yes
7412	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7413	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7414
7415	  # hardcode_minus_L: Not really in the search PATH,
7416	  # but as the default location of the library.
7417	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
7418	  ;;
7419	esac
7420      fi
7421      ;;
7422
7423    irix5* | irix6* | nonstopux*)
7424      if test "$GCC" = yes; then
7425	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $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'
7426	# Try to use the -exported_symbol ld option, if it does not
7427	# work, assume that -exports_file does not work either and
7428	# implicitly export all symbols.
7429        save_LDFLAGS="$LDFLAGS"
7430        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
7431        AC_LINK_IFELSE(int foo(void) {},
7432          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $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'
7433        )
7434        LDFLAGS="$save_LDFLAGS"
7435      else
7436	_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'
7437	_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'
7438      fi
7439      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7440      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7441      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7442      _LT_TAGVAR(inherit_rpath, $1)=yes
7443      _LT_TAGVAR(link_all_deplibs, $1)=yes
7444      ;;
7445
7446    netbsd*)
7447      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
7448	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
7449      else
7450	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
7451      fi
7452      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7453      _LT_TAGVAR(hardcode_direct, $1)=yes
7454      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7455      ;;
7456
7457    newsos6)
7458      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7459      _LT_TAGVAR(hardcode_direct, $1)=yes
7460      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7461      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7462      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7463      ;;
7464
7465    *nto* | *qnx*)
7466      ;;
7467
7468    openbsd*)
7469      if test -f /usr/libexec/ld.so; then
7470	_LT_TAGVAR(hardcode_direct, $1)=yes
7471	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7472	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
7473	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7474	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7475	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
7476	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7477	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7478	else
7479	  case $host_os in
7480	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
7481	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7482	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7483	     ;;
7484	   *)
7485	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7486	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7487	     ;;
7488	  esac
7489	fi
7490      else
7491	_LT_TAGVAR(ld_shlibs, $1)=no
7492      fi
7493      ;;
7494
7495    os2*)
7496      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7497      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7498      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
7499      _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'
7500      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
7501      ;;
7502
7503    osf3*)
7504      if test "$GCC" = yes; then
7505	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7506	_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'
7507      else
7508	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7509	_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'
7510      fi
7511      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7512      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7513      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7514      ;;
7515
7516    osf4* | osf5*)	# as osf3* with the addition of -msym flag
7517      if test "$GCC" = yes; then
7518	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7519	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_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'
7520	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7521      else
7522	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7523	_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'
7524	_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~
7525	$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'
7526
7527	# Both c and cxx compiler support -rpath directly
7528	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7529      fi
7530      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
7531      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7532      ;;
7533
7534    solaris*)
7535      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
7536      if test "$GCC" = yes; then
7537	wlarc='${wl}'
7538	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7539	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7540	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
7541      else
7542	case `$CC -V 2>&1` in
7543	*"Compilers 5.0"*)
7544	  wlarc=''
7545	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7546	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7547	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
7548	  ;;
7549	*)
7550	  wlarc='${wl}'
7551	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
7552	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
7553	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
7554	  ;;
7555	esac
7556      fi
7557      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7558      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7559      case $host_os in
7560      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7561      *)
7562	# The compiler driver will combine and reorder linker options,
7563	# but understands `-z linker_flag'.  GCC discards it without `$wl',
7564	# but is careful enough not to reorder.
7565	# Supported since Solaris 2.6 (maybe 2.5.1?)
7566	if test "$GCC" = yes; then
7567	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7568	else
7569	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7570	fi
7571	;;
7572      esac
7573      _LT_TAGVAR(link_all_deplibs, $1)=yes
7574      ;;
7575
7576    sunos4*)
7577      if test "x$host_vendor" = xsequent; then
7578	# Use $CC to link under sequent, because it throws in some extra .o
7579	# files that make .init and .fini sections work.
7580	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7581      else
7582	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7583      fi
7584      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7585      _LT_TAGVAR(hardcode_direct, $1)=yes
7586      _LT_TAGVAR(hardcode_minus_L, $1)=yes
7587      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7588      ;;
7589
7590    sysv4)
7591      case $host_vendor in
7592	sni)
7593	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7594	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7595	;;
7596	siemens)
7597	  ## LD is ld it makes a PLAMLIB
7598	  ## CC just makes a GrossModule.
7599	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7600	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7601	  _LT_TAGVAR(hardcode_direct, $1)=no
7602        ;;
7603	motorola)
7604	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7605	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7606	;;
7607      esac
7608      runpath_var='LD_RUN_PATH'
7609      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7610      ;;
7611
7612    sysv4.3*)
7613      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7614      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7615      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
7616      ;;
7617
7618    sysv4*MP*)
7619      if test -d /usr/nec; then
7620	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7621	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7622	runpath_var=LD_RUN_PATH
7623	hardcode_runpath_var=yes
7624	_LT_TAGVAR(ld_shlibs, $1)=yes
7625      fi
7626      ;;
7627
7628    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
7629      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7630      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7631      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7632      runpath_var='LD_RUN_PATH'
7633
7634      if test "$GCC" = yes; then
7635	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7636	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7637      else
7638	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7639	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7640      fi
7641      ;;
7642
7643    sysv5* | sco3.2v5* | sco5v6*)
7644      # Note: We can NOT use -z defs as we might desire, because we do not
7645      # link with -lc, and that would cause any symbols used from libc to
7646      # always be unresolved, which means just about no library would
7647      # ever link correctly.  If we're not using GNU ld we use -z text
7648      # though, which does catch some bad symbols but isn't as heavy-handed
7649      # as -z defs.
7650      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
7651      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
7652      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
7653      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7654      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
7655      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
7656      _LT_TAGVAR(link_all_deplibs, $1)=yes
7657      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
7658      runpath_var='LD_RUN_PATH'
7659
7660      if test "$GCC" = yes; then
7661	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7662	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7663      else
7664	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7665	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
7666      fi
7667      ;;
7668
7669    uts4*)
7670      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7671      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7672      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
7673      ;;
7674
7675    *)
7676      _LT_TAGVAR(ld_shlibs, $1)=no
7677      ;;
7678    esac
7679
7680    if test x$host_vendor = xsni; then
7681      case $host in
7682      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
7683	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
7684	;;
7685      esac
7686    fi
7687  fi
7688])
7689AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
7690test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
7691
7692_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
7693
7694_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
7695_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
7696_LT_DECL([], [extract_expsyms_cmds], [2],
7697    [The commands to extract the exported symbol list from a shared archive])
7698
7699#
7700# Do we need to explicitly link libc?
7701#
7702case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
7703x|xyes)
7704  # Assume -lc should be added
7705  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7706
7707  if test "$enable_shared" = yes && test "$GCC" = yes; then
7708    case $_LT_TAGVAR(archive_cmds, $1) in
7709    *'~'*)
7710      # FIXME: we may have to deal with multi-command sequences.
7711      ;;
7712    '$CC '*)
7713      # Test whether the compiler implicitly links with -lc since on some
7714      # systems, -lgcc has to come before -lc. If gcc already passes -lc
7715      # to ld, don't add -lc before -lgcc.
7716      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
7717	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
7718	[$RM conftest*
7719	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
7720
7721	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
7722	  soname=conftest
7723	  lib=conftest
7724	  libobjs=conftest.$ac_objext
7725	  deplibs=
7726	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
7727	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
7728	  compiler_flags=-v
7729	  linker_flags=-v
7730	  verstring=
7731	  output_objdir=.
7732	  libname=conftest
7733	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
7734	  _LT_TAGVAR(allow_undefined_flag, $1)=
7735	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
7736	  then
7737	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7738	  else
7739	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
7740	  fi
7741	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
7742	else
7743	  cat conftest.err 1>&5
7744	fi
7745	$RM conftest*
7746	])
7747      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
7748      ;;
7749    esac
7750  fi
7751  ;;
7752esac
7753
7754_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
7755    [Whether or not to add -lc for building shared libraries])
7756_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
7757    [enable_shared_with_static_runtimes], [0],
7758    [Whether or not to disallow shared libs when runtime libs are static])
7759_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
7760    [Compiler flag to allow reflexive dlopens])
7761_LT_TAGDECL([], [whole_archive_flag_spec], [1],
7762    [Compiler flag to generate shared objects directly from archives])
7763_LT_TAGDECL([], [compiler_needs_object], [1],
7764    [Whether the compiler copes with passing no objects directly])
7765_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
7766    [Create an old-style archive from a shared archive])
7767_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
7768    [Create a temporary old-style archive to link instead of a shared archive])
7769_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
7770_LT_TAGDECL([], [archive_expsym_cmds], [2])
7771_LT_TAGDECL([], [module_cmds], [2],
7772    [Commands used to build a loadable module if different from building
7773    a shared archive.])
7774_LT_TAGDECL([], [module_expsym_cmds], [2])
7775_LT_TAGDECL([], [with_gnu_ld], [1],
7776    [Whether we are building with GNU ld or not])
7777_LT_TAGDECL([], [allow_undefined_flag], [1],
7778    [Flag that allows shared libraries with undefined symbols to be built])
7779_LT_TAGDECL([], [no_undefined_flag], [1],
7780    [Flag that enforces no undefined symbols])
7781_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
7782    [Flag to hardcode $libdir into a binary during linking.
7783    This must work even if $libdir does not exist])
7784_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
7785    [[If ld is used when linking, flag to hardcode $libdir into a binary
7786    during linking.  This must work even if $libdir does not exist]])
7787_LT_TAGDECL([], [hardcode_libdir_separator], [1],
7788    [Whether we need a single "-rpath" flag with a separated argument])
7789_LT_TAGDECL([], [hardcode_direct], [0],
7790    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7791    DIR into the resulting binary])
7792_LT_TAGDECL([], [hardcode_direct_absolute], [0],
7793    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
7794    DIR into the resulting binary and the resulting library dependency is
7795    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
7796    library is relocated])
7797_LT_TAGDECL([], [hardcode_minus_L], [0],
7798    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
7799    into the resulting binary])
7800_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
7801    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
7802    into the resulting binary])
7803_LT_TAGDECL([], [hardcode_automatic], [0],
7804    [Set to "yes" if building a shared library automatically hardcodes DIR
7805    into the library and all subsequent libraries and executables linked
7806    against it])
7807_LT_TAGDECL([], [inherit_rpath], [0],
7808    [Set to yes if linker adds runtime paths of dependent libraries
7809    to runtime path list])
7810_LT_TAGDECL([], [link_all_deplibs], [0],
7811    [Whether libtool must link a program against all its dependency libraries])
7812_LT_TAGDECL([], [fix_srcfile_path], [1],
7813    [Fix the shell variable $srcfile for the compiler])
7814_LT_TAGDECL([], [always_export_symbols], [0],
7815    [Set to "yes" if exported symbols are required])
7816_LT_TAGDECL([], [export_symbols_cmds], [2],
7817    [The commands to list exported symbols])
7818_LT_TAGDECL([], [exclude_expsyms], [1],
7819    [Symbols that should not be listed in the preloaded symbols])
7820_LT_TAGDECL([], [include_expsyms], [1],
7821    [Symbols that must always be exported])
7822_LT_TAGDECL([], [prelink_cmds], [2],
7823    [Commands necessary for linking programs (against libraries) with templates])
7824_LT_TAGDECL([], [file_list_spec], [1],
7825    [Specify filename containing input files])
7826dnl FIXME: Not yet implemented
7827dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
7828dnl    [Compiler flag to generate thread safe objects])
7829])# _LT_LINKER_SHLIBS
7830
7831
7832# _LT_LANG_C_CONFIG([TAG])
7833# ------------------------
7834# Ensure that the configuration variables for a C compiler are suitably
7835# defined.  These variables are subsequently used by _LT_CONFIG to write
7836# the compiler configuration to `libtool'.
7837m4_defun([_LT_LANG_C_CONFIG],
7838[m4_require([_LT_DECL_EGREP])dnl
7839lt_save_CC="$CC"
7840AC_LANG_PUSH(C)
7841
7842# Source file extension for C test sources.
7843ac_ext=c
7844
7845# Object file extension for compiled C test sources.
7846objext=o
7847_LT_TAGVAR(objext, $1)=$objext
7848
7849# Code to be used in simple compile tests
7850lt_simple_compile_test_code="int some_variable = 0;"
7851
7852# Code to be used in simple link tests
7853lt_simple_link_test_code='int main(){return(0);}'
7854
7855_LT_TAG_COMPILER
7856# Save the default compiler, since it gets overwritten when the other
7857# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
7858compiler_DEFAULT=$CC
7859
7860# save warnings/boilerplate of simple test code
7861_LT_COMPILER_BOILERPLATE
7862_LT_LINKER_BOILERPLATE
7863
7864if test -n "$compiler"; then
7865  _LT_COMPILER_NO_RTTI($1)
7866  _LT_COMPILER_PIC($1)
7867  _LT_COMPILER_C_O($1)
7868  _LT_COMPILER_FILE_LOCKS($1)
7869  _LT_LINKER_SHLIBS($1)
7870  _LT_SYS_DYNAMIC_LINKER($1)
7871  _LT_LINKER_HARDCODE_LIBPATH($1)
7872  LT_SYS_DLOPEN_SELF
7873  _LT_CMD_STRIPLIB
7874
7875  # Report which library types will actually be built
7876  AC_MSG_CHECKING([if libtool supports shared libraries])
7877  AC_MSG_RESULT([$can_build_shared])
7878
7879  AC_MSG_CHECKING([whether to build shared libraries])
7880  test "$can_build_shared" = "no" && enable_shared=no
7881
7882  # On AIX, shared libraries and static libraries use the same namespace, and
7883  # are all built from PIC.
7884  case $host_os in
7885  aix3*)
7886    test "$enable_shared" = yes && enable_static=no
7887    if test -n "$RANLIB"; then
7888      archive_cmds="$archive_cmds~\$RANLIB \$lib"
7889      postinstall_cmds='$RANLIB $lib'
7890    fi
7891    ;;
7892
7893  aix[[4-9]]*)
7894    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
7895      test "$enable_shared" = yes && enable_static=no
7896    fi
7897    ;;
7898  esac
7899  AC_MSG_RESULT([$enable_shared])
7900
7901  AC_MSG_CHECKING([whether to build static libraries])
7902  # Make sure either enable_shared or enable_static is yes.
7903  test "$enable_shared" = yes || enable_static=yes
7904  AC_MSG_RESULT([$enable_static])
7905
7906  _LT_CONFIG($1)
7907fi
7908AC_LANG_POP
7909CC="$lt_save_CC"
7910])# _LT_LANG_C_CONFIG
7911
7912
7913# _LT_LANG_CXX_CONFIG([TAG])
7914# --------------------------
7915# Ensure that the configuration variables for a C++ compiler are suitably
7916# defined.  These variables are subsequently used by _LT_CONFIG to write
7917# the compiler configuration to `libtool'.
7918m4_defun([_LT_LANG_CXX_CONFIG],
7919[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
7920m4_require([_LT_DECL_EGREP])dnl
7921if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
7922    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
7923    (test "X$CXX" != "Xg++"))) ; then
7924  AC_PROG_CXXCPP
7925else
7926  _lt_caught_CXX_error=yes
7927fi
7928
7929AC_LANG_PUSH(C++)
7930_LT_TAGVAR(archive_cmds_need_lc, $1)=no
7931_LT_TAGVAR(allow_undefined_flag, $1)=
7932_LT_TAGVAR(always_export_symbols, $1)=no
7933_LT_TAGVAR(archive_expsym_cmds, $1)=
7934_LT_TAGVAR(compiler_needs_object, $1)=no
7935_LT_TAGVAR(export_dynamic_flag_spec, $1)=
7936_LT_TAGVAR(hardcode_direct, $1)=no
7937_LT_TAGVAR(hardcode_direct_absolute, $1)=no
7938_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
7939_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7940_LT_TAGVAR(hardcode_libdir_separator, $1)=
7941_LT_TAGVAR(hardcode_minus_L, $1)=no
7942_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7943_LT_TAGVAR(hardcode_automatic, $1)=no
7944_LT_TAGVAR(inherit_rpath, $1)=no
7945_LT_TAGVAR(module_cmds, $1)=
7946_LT_TAGVAR(module_expsym_cmds, $1)=
7947_LT_TAGVAR(link_all_deplibs, $1)=unknown
7948_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
7949_LT_TAGVAR(reload_flag, $1)=$reload_flag
7950_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
7951_LT_TAGVAR(no_undefined_flag, $1)=
7952_LT_TAGVAR(whole_archive_flag_spec, $1)=
7953_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7954
7955# Source file extension for C++ test sources.
7956ac_ext=cpp
7957
7958# Object file extension for compiled C++ test sources.
7959objext=o
7960_LT_TAGVAR(objext, $1)=$objext
7961
7962# No sense in running all these tests if we already determined that
7963# the CXX compiler isn't working.  Some variables (like enable_shared)
7964# are currently assumed to apply to all compilers on this platform,
7965# and will be corrupted by setting them based on a non-working compiler.
7966if test "$_lt_caught_CXX_error" != yes; then
7967  # Code to be used in simple compile tests
7968  lt_simple_compile_test_code="int some_variable = 0;"
7969
7970  # Code to be used in simple link tests
7971  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
7972
7973  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
7974  _LT_TAG_COMPILER
7975
7976  # save warnings/boilerplate of simple test code
7977  _LT_COMPILER_BOILERPLATE
7978  _LT_LINKER_BOILERPLATE
7979
7980  # Allow CC to be a program name with arguments.
7981  lt_save_CC=$CC
7982  lt_save_LD=$LD
7983  lt_save_GCC=$GCC
7984  GCC=$GXX
7985  lt_save_with_gnu_ld=$with_gnu_ld
7986  lt_save_path_LD=$lt_cv_path_LD
7987  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
7988    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
7989  else
7990    $as_unset lt_cv_prog_gnu_ld
7991  fi
7992  if test -n "${lt_cv_path_LDCXX+set}"; then
7993    lt_cv_path_LD=$lt_cv_path_LDCXX
7994  else
7995    $as_unset lt_cv_path_LD
7996  fi
7997  test -z "${LDCXX+set}" || LD=$LDCXX
7998  CC=${CXX-"c++"}
7999  compiler=$CC
8000  _LT_TAGVAR(compiler, $1)=$CC
8001  _LT_CC_BASENAME([$compiler])
8002
8003  if test -n "$compiler"; then
8004    # We don't want -fno-exception when compiling C++ code, so set the
8005    # no_builtin_flag separately
8006    if test "$GXX" = yes; then
8007      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
8008    else
8009      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
8010    fi
8011
8012    if test "$GXX" = yes; then
8013      # Set up default GNU C++ configuration
8014
8015      LT_PATH_LD
8016
8017      # Check if GNU C++ uses GNU ld as the underlying linker, since the
8018      # archiving commands below assume that GNU ld is being used.
8019      if test "$with_gnu_ld" = yes; then
8020        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8021        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
8022
8023        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8024        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8025
8026        # If archive_cmds runs LD, not CC, wlarc should be empty
8027        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
8028        #     investigate it a little bit more. (MM)
8029        wlarc='${wl}'
8030
8031        # ancient GNU ld didn't support --whole-archive et. al.
8032        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
8033	  $GREP 'no-whole-archive' > /dev/null; then
8034          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8035        else
8036          _LT_TAGVAR(whole_archive_flag_spec, $1)=
8037        fi
8038      else
8039        with_gnu_ld=no
8040        wlarc=
8041
8042        # A generic and very simple default shared library creation
8043        # command for GNU C++ for the case where it uses the native
8044        # linker, instead of GNU ld.  If possible, this setting should
8045        # overridden to take advantage of the native linker features on
8046        # the platform it is being used on.
8047        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
8048      fi
8049
8050      # Commands to make compiler produce verbose output that lists
8051      # what "hidden" libraries, object files and flags are used when
8052      # linking a shared library.
8053      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8054
8055    else
8056      GXX=no
8057      with_gnu_ld=no
8058      wlarc=
8059    fi
8060
8061    # PORTME: fill in a description of your system's C++ link characteristics
8062    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
8063    _LT_TAGVAR(ld_shlibs, $1)=yes
8064    case $host_os in
8065      aix3*)
8066        # FIXME: insert proper C++ library support
8067        _LT_TAGVAR(ld_shlibs, $1)=no
8068        ;;
8069      aix[[4-9]]*)
8070        if test "$host_cpu" = ia64; then
8071          # On IA64, the linker does run time linking by default, so we don't
8072          # have to do anything special.
8073          aix_use_runtimelinking=no
8074          exp_sym_flag='-Bexport'
8075          no_entry_flag=""
8076        else
8077          aix_use_runtimelinking=no
8078
8079          # Test if we are trying to use run time linking or normal
8080          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
8081          # need to do runtime linking.
8082          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
8083	    for ld_flag in $LDFLAGS; do
8084	      case $ld_flag in
8085	      *-brtl*)
8086	        aix_use_runtimelinking=yes
8087	        break
8088	        ;;
8089	      esac
8090	    done
8091	    ;;
8092          esac
8093
8094          exp_sym_flag='-bexport'
8095          no_entry_flag='-bnoentry'
8096        fi
8097
8098        # When large executables or shared objects are built, AIX ld can
8099        # have problems creating the table of contents.  If linking a library
8100        # or program results in "error TOC overflow" add -mminimal-toc to
8101        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
8102        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8103
8104        _LT_TAGVAR(archive_cmds, $1)=''
8105        _LT_TAGVAR(hardcode_direct, $1)=yes
8106        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8107        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8108        _LT_TAGVAR(link_all_deplibs, $1)=yes
8109        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
8110
8111        if test "$GXX" = yes; then
8112          case $host_os in aix4.[[012]]|aix4.[[012]].*)
8113          # We only want to do this on AIX 4.2 and lower, the check
8114          # below for broken collect2 doesn't work under 4.3+
8115	  collect2name=`${CC} -print-prog-name=collect2`
8116	  if test -f "$collect2name" &&
8117	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
8118	  then
8119	    # We have reworked collect2
8120	    :
8121	  else
8122	    # We have old collect2
8123	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
8124	    # It fails to find uninstalled libraries when the uninstalled
8125	    # path is not listed in the libpath.  Setting hardcode_minus_L
8126	    # to unsupported forces relinking
8127	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
8128	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8129	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
8130	  fi
8131          esac
8132          shared_flag='-shared'
8133	  if test "$aix_use_runtimelinking" = yes; then
8134	    shared_flag="$shared_flag "'${wl}-G'
8135	  fi
8136        else
8137          # not using gcc
8138          if test "$host_cpu" = ia64; then
8139	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
8140	  # chokes on -Wl,-G. The following line is correct:
8141	  shared_flag='-G'
8142          else
8143	    if test "$aix_use_runtimelinking" = yes; then
8144	      shared_flag='${wl}-G'
8145	    else
8146	      shared_flag='${wl}-bM:SRE'
8147	    fi
8148          fi
8149        fi
8150
8151        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
8152        # It seems that -bexpall does not export symbols beginning with
8153        # underscore (_), so it is better to generate a list of symbols to
8154	# export.
8155        _LT_TAGVAR(always_export_symbols, $1)=yes
8156        if test "$aix_use_runtimelinking" = yes; then
8157          # Warning - without using the other runtime loading flags (-brtl),
8158          # -berok will link without error, but may produce a broken library.
8159          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
8160          # Determine the default libpath from the value encoded in an empty
8161          # executable.
8162          _LT_SYS_MODULE_PATH_AIX
8163          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8164
8165          _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"
8166        else
8167          if test "$host_cpu" = ia64; then
8168	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
8169	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
8170	    _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"
8171          else
8172	    # Determine the default libpath from the value encoded in an
8173	    # empty executable.
8174	    _LT_SYS_MODULE_PATH_AIX
8175	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
8176	    # Warning - without using the other run time loading flags,
8177	    # -berok will link without error, but may produce a broken library.
8178	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
8179	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
8180	    if test "$with_gnu_ld" = yes; then
8181	      # We only use this code for GNU lds that support --whole-archive.
8182	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8183	    else
8184	      # Exported symbols can be pulled into shared objects from archives
8185	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
8186	    fi
8187	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
8188	    # This is similar to how AIX traditionally builds its shared
8189	    # libraries.
8190	    _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'
8191          fi
8192        fi
8193        ;;
8194
8195      beos*)
8196	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
8197	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8198	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
8199	  # support --undefined.  This deserves some investigation.  FIXME
8200	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8201	else
8202	  _LT_TAGVAR(ld_shlibs, $1)=no
8203	fi
8204	;;
8205
8206      chorus*)
8207        case $cc_basename in
8208          *)
8209	  # FIXME: insert proper C++ library support
8210	  _LT_TAGVAR(ld_shlibs, $1)=no
8211	  ;;
8212        esac
8213        ;;
8214
8215      cygwin* | mingw* | pw32* | cegcc*)
8216        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
8217        # as there is no search path for DLLs.
8218        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8219        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
8220        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
8221        _LT_TAGVAR(always_export_symbols, $1)=no
8222        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
8223
8224        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
8225          _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'
8226          # If the export-symbols file already is a .def file (1st line
8227          # is EXPORTS), use it as is; otherwise, prepend...
8228          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
8229	    cp $export_symbols $output_objdir/$soname.def;
8230          else
8231	    echo EXPORTS > $output_objdir/$soname.def;
8232	    cat $export_symbols >> $output_objdir/$soname.def;
8233          fi~
8234          $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'
8235        else
8236          _LT_TAGVAR(ld_shlibs, $1)=no
8237        fi
8238        ;;
8239      darwin* | rhapsody*)
8240        _LT_DARWIN_LINKER_FEATURES($1)
8241	;;
8242
8243      dgux*)
8244        case $cc_basename in
8245          ec++*)
8246	    # FIXME: insert proper C++ library support
8247	    _LT_TAGVAR(ld_shlibs, $1)=no
8248	    ;;
8249          ghcx*)
8250	    # Green Hills C++ Compiler
8251	    # FIXME: insert proper C++ library support
8252	    _LT_TAGVAR(ld_shlibs, $1)=no
8253	    ;;
8254          *)
8255	    # FIXME: insert proper C++ library support
8256	    _LT_TAGVAR(ld_shlibs, $1)=no
8257	    ;;
8258        esac
8259        ;;
8260
8261      freebsd[[12]]*)
8262        # C++ shared libraries reported to be fairly broken before
8263	# switch to ELF
8264        _LT_TAGVAR(ld_shlibs, $1)=no
8265        ;;
8266
8267      freebsd-elf*)
8268        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8269        ;;
8270
8271      freebsd* | dragonfly*)
8272        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
8273        # conventions
8274        _LT_TAGVAR(ld_shlibs, $1)=yes
8275        ;;
8276
8277      gnu*)
8278        ;;
8279
8280      haiku*)
8281        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8282        _LT_TAGVAR(link_all_deplibs, $1)=yes
8283        ;;
8284
8285      hpux9*)
8286        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8287        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8288        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8289        _LT_TAGVAR(hardcode_direct, $1)=yes
8290        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8291				             # but as the default
8292				             # location of the library.
8293
8294        case $cc_basename in
8295          CC*)
8296            # FIXME: insert proper C++ library support
8297            _LT_TAGVAR(ld_shlibs, $1)=no
8298            ;;
8299          aCC*)
8300            _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'
8301            # Commands to make compiler produce verbose output that lists
8302            # what "hidden" libraries, object files and flags are used when
8303            # linking a shared library.
8304            #
8305            # There doesn't appear to be a way to prevent this compiler from
8306            # explicitly linking system object files so we need to strip them
8307            # from the output so that they don't get included in the library
8308            # dependencies.
8309            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"'
8310            ;;
8311          *)
8312            if test "$GXX" = yes; then
8313              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
8314            else
8315              # FIXME: insert proper C++ library support
8316              _LT_TAGVAR(ld_shlibs, $1)=no
8317            fi
8318            ;;
8319        esac
8320        ;;
8321
8322      hpux10*|hpux11*)
8323        if test $with_gnu_ld = no; then
8324	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
8325	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8326
8327          case $host_cpu in
8328            hppa*64*|ia64*)
8329              ;;
8330            *)
8331	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8332              ;;
8333          esac
8334        fi
8335        case $host_cpu in
8336          hppa*64*|ia64*)
8337            _LT_TAGVAR(hardcode_direct, $1)=no
8338            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8339            ;;
8340          *)
8341            _LT_TAGVAR(hardcode_direct, $1)=yes
8342            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8343            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
8344					         # but as the default
8345					         # location of the library.
8346            ;;
8347        esac
8348
8349        case $cc_basename in
8350          CC*)
8351	    # FIXME: insert proper C++ library support
8352	    _LT_TAGVAR(ld_shlibs, $1)=no
8353	    ;;
8354          aCC*)
8355	    case $host_cpu in
8356	      hppa*64*)
8357	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8358	        ;;
8359	      ia64*)
8360	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8361	        ;;
8362	      *)
8363	        _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'
8364	        ;;
8365	    esac
8366	    # Commands to make compiler produce verbose output that lists
8367	    # what "hidden" libraries, object files and flags are used when
8368	    # linking a shared library.
8369	    #
8370	    # There doesn't appear to be a way to prevent this compiler from
8371	    # explicitly linking system object files so we need to strip them
8372	    # from the output so that they don't get included in the library
8373	    # dependencies.
8374	    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"'
8375	    ;;
8376          *)
8377	    if test "$GXX" = yes; then
8378	      if test $with_gnu_ld = no; then
8379	        case $host_cpu in
8380	          hppa*64*)
8381	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8382	            ;;
8383	          ia64*)
8384	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8385	            ;;
8386	          *)
8387	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8388	            ;;
8389	        esac
8390	      fi
8391	    else
8392	      # FIXME: insert proper C++ library support
8393	      _LT_TAGVAR(ld_shlibs, $1)=no
8394	    fi
8395	    ;;
8396        esac
8397        ;;
8398
8399      interix[[3-9]]*)
8400	_LT_TAGVAR(hardcode_direct, $1)=no
8401	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8402	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8403	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8404	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
8405	# Instead, shared libraries are loaded at an image base (0x10000000 by
8406	# default) and relocated if they conflict, which is a slow very memory
8407	# consuming and fragmenting process.  To avoid this, we pick a random,
8408	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
8409	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
8410	_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'
8411	_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'
8412	;;
8413      irix5* | irix6*)
8414        case $cc_basename in
8415          CC*)
8416	    # SGI C++
8417	    _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'
8418
8419	    # Archives containing C++ object files must be created using
8420	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
8421	    # necessary to make sure instantiated templates are included
8422	    # in the archive.
8423	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
8424	    ;;
8425          *)
8426	    if test "$GXX" = yes; then
8427	      if test "$with_gnu_ld" = no; then
8428	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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'
8429	      else
8430	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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'
8431	      fi
8432	    fi
8433	    _LT_TAGVAR(link_all_deplibs, $1)=yes
8434	    ;;
8435        esac
8436        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8437        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8438        _LT_TAGVAR(inherit_rpath, $1)=yes
8439        ;;
8440
8441      linux* | k*bsd*-gnu | kopensolaris*-gnu)
8442        case $cc_basename in
8443          KCC*)
8444	    # Kuck and Associates, Inc. (KAI) C++ Compiler
8445
8446	    # KCC will only create a shared library if the output file
8447	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
8448	    # to its proper name (with version) after linking.
8449	    _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'
8450	    _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'
8451	    # Commands to make compiler produce verbose output that lists
8452	    # what "hidden" libraries, object files and flags are used when
8453	    # linking a shared library.
8454	    #
8455	    # There doesn't appear to be a way to prevent this compiler from
8456	    # explicitly linking system object files so we need to strip them
8457	    # from the output so that they don't get included in the library
8458	    # dependencies.
8459	    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"'
8460
8461	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8462	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8463
8464	    # Archives containing C++ object files must be created using
8465	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
8466	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
8467	    ;;
8468	  icpc* | ecpc* )
8469	    # Intel C++
8470	    with_gnu_ld=yes
8471	    # version 8.0 and above of icpc choke on multiply defined symbols
8472	    # if we add $predep_objects and $postdep_objects, however 7.1 and
8473	    # earlier do not add the objects themselves.
8474	    case `$CC -V 2>&1` in
8475	      *"Version 7."*)
8476	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8477		_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'
8478		;;
8479	      *)  # Version 8.0 or newer
8480	        tmp_idyn=
8481	        case $host_cpu in
8482		  ia64*) tmp_idyn=' -i_dynamic';;
8483		esac
8484	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8485		_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'
8486		;;
8487	    esac
8488	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8489	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8490	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8491	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
8492	    ;;
8493          pgCC* | pgcpp*)
8494            # Portland Group C++ compiler
8495	    case `$CC -V` in
8496	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
8497	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
8498		rm -rf $tpldir~
8499		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
8500		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
8501	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
8502		rm -rf $tpldir~
8503		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
8504		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
8505		$RANLIB $oldlib'
8506	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
8507		rm -rf $tpldir~
8508		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
8509		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
8510	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
8511		rm -rf $tpldir~
8512		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
8513		$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'
8514	      ;;
8515	    *) # Version 6 and above use weak symbols
8516	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
8517	      _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'
8518	      ;;
8519	    esac
8520
8521	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
8522	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8523	    _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'
8524            ;;
8525	  cxx*)
8526	    # Compaq C++
8527	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
8528	    _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'
8529
8530	    runpath_var=LD_RUN_PATH
8531	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8532	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8533
8534	    # Commands to make compiler produce verbose output that lists
8535	    # what "hidden" libraries, object files and flags are used when
8536	    # linking a shared library.
8537	    #
8538	    # There doesn't appear to be a way to prevent this compiler from
8539	    # explicitly linking system object files so we need to strip them
8540	    # from the output so that they don't get included in the library
8541	    # dependencies.
8542	    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'
8543	    ;;
8544	  xl* | mpixl* | bgxl*)
8545	    # IBM XL 8.0 on PPC, with GNU ld
8546	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8547	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
8548	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
8549	    if test "x$supports_anon_versioning" = xyes; then
8550	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
8551		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
8552		echo "local: *; };" >> $output_objdir/$libname.ver~
8553		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
8554	    fi
8555	    ;;
8556	  *)
8557	    case `$CC -V 2>&1 | sed 5q` in
8558	    *Sun\ C*)
8559	      # Sun C++ 5.9
8560	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8561	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8562	      _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'
8563	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8564	      _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'
8565	      _LT_TAGVAR(compiler_needs_object, $1)=yes
8566
8567	      # Not sure whether something based on
8568	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
8569	      # would be better.
8570	      output_verbose_link_cmd='func_echo_all'
8571
8572	      # Archives containing C++ object files must be created using
8573	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
8574	      # necessary to make sure instantiated templates are included
8575	      # in the archive.
8576	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8577	      ;;
8578	    esac
8579	    ;;
8580	esac
8581	;;
8582
8583      lynxos*)
8584        # FIXME: insert proper C++ library support
8585	_LT_TAGVAR(ld_shlibs, $1)=no
8586	;;
8587
8588      m88k*)
8589        # FIXME: insert proper C++ library support
8590        _LT_TAGVAR(ld_shlibs, $1)=no
8591	;;
8592
8593      mvs*)
8594        case $cc_basename in
8595          cxx*)
8596	    # FIXME: insert proper C++ library support
8597	    _LT_TAGVAR(ld_shlibs, $1)=no
8598	    ;;
8599	  *)
8600	    # FIXME: insert proper C++ library support
8601	    _LT_TAGVAR(ld_shlibs, $1)=no
8602	    ;;
8603	esac
8604	;;
8605
8606      netbsd*)
8607        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
8608	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
8609	  wlarc=
8610	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8611	  _LT_TAGVAR(hardcode_direct, $1)=yes
8612	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8613	fi
8614	# Workaround some broken pre-1.5 toolchains
8615	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
8616	;;
8617
8618      *nto* | *qnx*)
8619        _LT_TAGVAR(ld_shlibs, $1)=yes
8620	;;
8621
8622      openbsd2*)
8623        # C++ shared libraries are fairly broken
8624	_LT_TAGVAR(ld_shlibs, $1)=no
8625	;;
8626
8627      openbsd*)
8628	if test -f /usr/libexec/ld.so; then
8629	  _LT_TAGVAR(hardcode_direct, $1)=yes
8630	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8631	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
8632	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
8633	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8634	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
8635	    _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'
8636	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
8637	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
8638	  fi
8639	  output_verbose_link_cmd=func_echo_all
8640	else
8641	  _LT_TAGVAR(ld_shlibs, $1)=no
8642	fi
8643	;;
8644
8645      osf3* | osf4* | osf5*)
8646        case $cc_basename in
8647          KCC*)
8648	    # Kuck and Associates, Inc. (KAI) C++ Compiler
8649
8650	    # KCC will only create a shared library if the output file
8651	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
8652	    # to its proper name (with version) after linking.
8653	    _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'
8654
8655	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
8656	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8657
8658	    # Archives containing C++ object files must be created using
8659	    # the KAI C++ compiler.
8660	    case $host in
8661	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
8662	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
8663	    esac
8664	    ;;
8665          RCC*)
8666	    # Rational C++ 2.4.1
8667	    # FIXME: insert proper C++ library support
8668	    _LT_TAGVAR(ld_shlibs, $1)=no
8669	    ;;
8670          cxx*)
8671	    case $host in
8672	      osf3*)
8673	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8674	        _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'
8675	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8676		;;
8677	      *)
8678	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
8679	        _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'
8680	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
8681	          echo "-hidden">> $lib.exp~
8682	          $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~
8683	          $RM $lib.exp'
8684	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
8685		;;
8686	    esac
8687
8688	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8689
8690	    # Commands to make compiler produce verbose output that lists
8691	    # what "hidden" libraries, object files and flags are used when
8692	    # linking a shared library.
8693	    #
8694	    # There doesn't appear to be a way to prevent this compiler from
8695	    # explicitly linking system object files so we need to strip them
8696	    # from the output so that they don't get included in the library
8697	    # dependencies.
8698	    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"'
8699	    ;;
8700	  *)
8701	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8702	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
8703	      case $host in
8704	        osf3*)
8705	          _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'
8706		  ;;
8707	        *)
8708	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
8709		  ;;
8710	      esac
8711
8712	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
8713	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
8714
8715	      # Commands to make compiler produce verbose output that lists
8716	      # what "hidden" libraries, object files and flags are used when
8717	      # linking a shared library.
8718	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8719
8720	    else
8721	      # FIXME: insert proper C++ library support
8722	      _LT_TAGVAR(ld_shlibs, $1)=no
8723	    fi
8724	    ;;
8725        esac
8726        ;;
8727
8728      psos*)
8729        # FIXME: insert proper C++ library support
8730        _LT_TAGVAR(ld_shlibs, $1)=no
8731        ;;
8732
8733      sunos4*)
8734        case $cc_basename in
8735          CC*)
8736	    # Sun C++ 4.x
8737	    # FIXME: insert proper C++ library support
8738	    _LT_TAGVAR(ld_shlibs, $1)=no
8739	    ;;
8740          lcc*)
8741	    # Lucid
8742	    # FIXME: insert proper C++ library support
8743	    _LT_TAGVAR(ld_shlibs, $1)=no
8744	    ;;
8745          *)
8746	    # FIXME: insert proper C++ library support
8747	    _LT_TAGVAR(ld_shlibs, $1)=no
8748	    ;;
8749        esac
8750        ;;
8751
8752      solaris*)
8753        case $cc_basename in
8754          CC* | sunCC*)
8755	    # Sun C++ 4.2, 5.x and Centerline C++
8756            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
8757	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
8758	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
8759	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8760	      $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'
8761
8762	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
8763	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8764	    case $host_os in
8765	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8766	      *)
8767		# The compiler driver will combine and reorder linker options,
8768		# but understands `-z linker_flag'.
8769	        # Supported since Solaris 2.6 (maybe 2.5.1?)
8770		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
8771	        ;;
8772	    esac
8773	    _LT_TAGVAR(link_all_deplibs, $1)=yes
8774
8775	    output_verbose_link_cmd='func_echo_all'
8776
8777	    # Archives containing C++ object files must be created using
8778	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
8779	    # necessary to make sure instantiated templates are included
8780	    # in the archive.
8781	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
8782	    ;;
8783          gcx*)
8784	    # Green Hills C++ Compiler
8785	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8786
8787	    # The C++ compiler must be used to create the archive.
8788	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
8789	    ;;
8790          *)
8791	    # GNU C++ compiler with Solaris linker
8792	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
8793	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
8794	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
8795	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8796	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8797		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8798
8799	        # Commands to make compiler produce verbose output that lists
8800	        # what "hidden" libraries, object files and flags are used when
8801	        # linking a shared library.
8802	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8803	      else
8804	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
8805	        # platform.
8806	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
8807	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
8808		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
8809
8810	        # Commands to make compiler produce verbose output that lists
8811	        # what "hidden" libraries, object files and flags are used when
8812	        # linking a shared library.
8813	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
8814	      fi
8815
8816	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
8817	      case $host_os in
8818		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
8819		*)
8820		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
8821		  ;;
8822	      esac
8823	    fi
8824	    ;;
8825        esac
8826        ;;
8827
8828    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
8829      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8830      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
8831      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8832      runpath_var='LD_RUN_PATH'
8833
8834      case $cc_basename in
8835        CC*)
8836	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8837	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8838	  ;;
8839	*)
8840	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8841	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8842	  ;;
8843      esac
8844      ;;
8845
8846      sysv5* | sco3.2v5* | sco5v6*)
8847	# Note: We can NOT use -z defs as we might desire, because we do not
8848	# link with -lc, and that would cause any symbols used from libc to
8849	# always be unresolved, which means just about no library would
8850	# ever link correctly.  If we're not using GNU ld we use -z text
8851	# though, which does catch some bad symbols but isn't as heavy-handed
8852	# as -z defs.
8853	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8854	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
8855	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
8856	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8857	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
8858	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
8859	_LT_TAGVAR(link_all_deplibs, $1)=yes
8860	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
8861	runpath_var='LD_RUN_PATH'
8862
8863	case $cc_basename in
8864          CC*)
8865	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8866	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8867	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
8868	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
8869	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
8870	      '"$_LT_TAGVAR(reload_cmds, $1)"
8871	    ;;
8872	  *)
8873	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8874	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8875	    ;;
8876	esac
8877      ;;
8878
8879      tandem*)
8880        case $cc_basename in
8881          NCC*)
8882	    # NonStop-UX NCC 3.20
8883	    # FIXME: insert proper C++ library support
8884	    _LT_TAGVAR(ld_shlibs, $1)=no
8885	    ;;
8886          *)
8887	    # FIXME: insert proper C++ library support
8888	    _LT_TAGVAR(ld_shlibs, $1)=no
8889	    ;;
8890        esac
8891        ;;
8892
8893      vxworks*)
8894        # FIXME: insert proper C++ library support
8895        _LT_TAGVAR(ld_shlibs, $1)=no
8896        ;;
8897
8898      *)
8899        # FIXME: insert proper C++ library support
8900        _LT_TAGVAR(ld_shlibs, $1)=no
8901        ;;
8902    esac
8903
8904    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
8905    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8906
8907    _LT_TAGVAR(GCC, $1)="$GXX"
8908    _LT_TAGVAR(LD, $1)="$LD"
8909
8910    ## CAVEAT EMPTOR:
8911    ## There is no encapsulation within the following macros, do not change
8912    ## the running order or otherwise move them around unless you know exactly
8913    ## what you are doing...
8914    _LT_SYS_HIDDEN_LIBDEPS($1)
8915    _LT_COMPILER_PIC($1)
8916    _LT_COMPILER_C_O($1)
8917    _LT_COMPILER_FILE_LOCKS($1)
8918    _LT_LINKER_SHLIBS($1)
8919    _LT_SYS_DYNAMIC_LINKER($1)
8920    _LT_LINKER_HARDCODE_LIBPATH($1)
8921
8922    _LT_CONFIG($1)
8923  fi # test -n "$compiler"
8924
8925  CC=$lt_save_CC
8926  LDCXX=$LD
8927  LD=$lt_save_LD
8928  GCC=$lt_save_GCC
8929  with_gnu_ld=$lt_save_with_gnu_ld
8930  lt_cv_path_LDCXX=$lt_cv_path_LD
8931  lt_cv_path_LD=$lt_save_path_LD
8932  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
8933  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
8934fi # test "$_lt_caught_CXX_error" != yes
8935
8936AC_LANG_POP
8937])# _LT_LANG_CXX_CONFIG
8938
8939
8940# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
8941# ---------------------------------
8942# Figure out "hidden" library dependencies from verbose
8943# compiler output when linking a shared library.
8944# Parse the compiler output and extract the necessary
8945# objects, libraries and library flags.
8946m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
8947[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
8948# Dependencies to place before and after the object being linked:
8949_LT_TAGVAR(predep_objects, $1)=
8950_LT_TAGVAR(postdep_objects, $1)=
8951_LT_TAGVAR(predeps, $1)=
8952_LT_TAGVAR(postdeps, $1)=
8953_LT_TAGVAR(compiler_lib_search_path, $1)=
8954
8955dnl we can't use the lt_simple_compile_test_code here,
8956dnl because it contains code intended for an executable,
8957dnl not a library.  It's possible we should let each
8958dnl tag define a new lt_????_link_test_code variable,
8959dnl but it's only used here...
8960m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
8961int a;
8962void foo (void) { a = 0; }
8963_LT_EOF
8964], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
8965class Foo
8966{
8967public:
8968  Foo (void) { a = 0; }
8969private:
8970  int a;
8971};
8972_LT_EOF
8973], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
8974      subroutine foo
8975      implicit none
8976      integer*4 a
8977      a=0
8978      return
8979      end
8980_LT_EOF
8981], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
8982      subroutine foo
8983      implicit none
8984      integer a
8985      a=0
8986      return
8987      end
8988_LT_EOF
8989], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
8990public class foo {
8991  private int a;
8992  public void bar (void) {
8993    a = 0;
8994  }
8995};
8996_LT_EOF
8997])
8998dnl Parse the compiler output and extract the necessary
8999dnl objects, libraries and library flags.
9000if AC_TRY_EVAL(ac_compile); then
9001  # Parse the compiler output and extract the necessary
9002  # objects, libraries and library flags.
9003
9004  # Sentinel used to keep track of whether or not we are before
9005  # the conftest object file.
9006  pre_test_object_deps_done=no
9007
9008  for p in `eval "$output_verbose_link_cmd"`; do
9009    case $p in
9010
9011    -L* | -R* | -l*)
9012       # Some compilers place space between "-{L,R}" and the path.
9013       # Remove the space.
9014       if test $p = "-L" ||
9015          test $p = "-R"; then
9016	 prev=$p
9017	 continue
9018       else
9019	 prev=
9020       fi
9021
9022       if test "$pre_test_object_deps_done" = no; then
9023	 case $p in
9024	 -L* | -R*)
9025	   # Internal compiler library paths should come after those
9026	   # provided the user.  The postdeps already come after the
9027	   # user supplied libs so there is no need to process them.
9028	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
9029	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
9030	   else
9031	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
9032	   fi
9033	   ;;
9034	 # The "-l" case would never come before the object being
9035	 # linked, so don't bother handling this case.
9036	 esac
9037       else
9038	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
9039	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
9040	 else
9041	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
9042	 fi
9043       fi
9044       ;;
9045
9046    *.$objext)
9047       # This assumes that the test object file only shows up
9048       # once in the compiler output.
9049       if test "$p" = "conftest.$objext"; then
9050	 pre_test_object_deps_done=yes
9051	 continue
9052       fi
9053
9054       if test "$pre_test_object_deps_done" = no; then
9055	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
9056	   _LT_TAGVAR(predep_objects, $1)="$p"
9057	 else
9058	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
9059	 fi
9060       else
9061	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
9062	   _LT_TAGVAR(postdep_objects, $1)="$p"
9063	 else
9064	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
9065	 fi
9066       fi
9067       ;;
9068
9069    *) ;; # Ignore the rest.
9070
9071    esac
9072  done
9073
9074  # Clean up.
9075  rm -f a.out a.exe
9076else
9077  echo "libtool.m4: error: problem compiling $1 test program"
9078fi
9079
9080$RM -f confest.$objext
9081
9082# PORTME: override above test on systems where it is broken
9083m4_if([$1], [CXX],
9084[case $host_os in
9085interix[[3-9]]*)
9086  # Interix 3.5 installs completely hosed .la files for C++, so rather than
9087  # hack all around it, let's just trust "g++" to DTRT.
9088  _LT_TAGVAR(predep_objects,$1)=
9089  _LT_TAGVAR(postdep_objects,$1)=
9090  _LT_TAGVAR(postdeps,$1)=
9091  ;;
9092
9093linux*)
9094  case `$CC -V 2>&1 | sed 5q` in
9095  *Sun\ C*)
9096    # Sun C++ 5.9
9097
9098    # The more standards-conforming stlport4 library is
9099    # incompatible with the Cstd library. Avoid specifying
9100    # it if it's in CXXFLAGS. Ignore libCrun as
9101    # -library=stlport4 depends on it.
9102    case " $CXX $CXXFLAGS " in
9103    *" -library=stlport4 "*)
9104      solaris_use_stlport4=yes
9105      ;;
9106    esac
9107
9108    if test "$solaris_use_stlport4" != yes; then
9109      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
9110    fi
9111    ;;
9112  esac
9113  ;;
9114
9115solaris*)
9116  case $cc_basename in
9117  CC* | sunCC*)
9118    # The more standards-conforming stlport4 library is
9119    # incompatible with the Cstd library. Avoid specifying
9120    # it if it's in CXXFLAGS. Ignore libCrun as
9121    # -library=stlport4 depends on it.
9122    case " $CXX $CXXFLAGS " in
9123    *" -library=stlport4 "*)
9124      solaris_use_stlport4=yes
9125      ;;
9126    esac
9127
9128    # Adding this requires a known-good setup of shared libraries for
9129    # Sun compiler versions before 5.6, else PIC objects from an old
9130    # archive will be linked into the output, leading to subtle bugs.
9131    if test "$solaris_use_stlport4" != yes; then
9132      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
9133    fi
9134    ;;
9135  esac
9136  ;;
9137esac
9138])
9139
9140case " $_LT_TAGVAR(postdeps, $1) " in
9141*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
9142esac
9143 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
9144if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
9145 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
9146fi
9147_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
9148    [The directories searched by this compiler when creating a shared library])
9149_LT_TAGDECL([], [predep_objects], [1],
9150    [Dependencies to place before and after the objects being linked to
9151    create a shared library])
9152_LT_TAGDECL([], [postdep_objects], [1])
9153_LT_TAGDECL([], [predeps], [1])
9154_LT_TAGDECL([], [postdeps], [1])
9155_LT_TAGDECL([], [compiler_lib_search_path], [1],
9156    [The library search path used internally by the compiler when linking
9157    a shared library])
9158])# _LT_SYS_HIDDEN_LIBDEPS
9159
9160
9161# _LT_LANG_F77_CONFIG([TAG])
9162# --------------------------
9163# Ensure that the configuration variables for a Fortran 77 compiler are
9164# suitably defined.  These variables are subsequently used by _LT_CONFIG
9165# to write the compiler configuration to `libtool'.
9166m4_defun([_LT_LANG_F77_CONFIG],
9167[AC_LANG_PUSH(Fortran 77)
9168if test -z "$F77" || test "X$F77" = "Xno"; then
9169  _lt_disable_F77=yes
9170fi
9171
9172_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9173_LT_TAGVAR(allow_undefined_flag, $1)=
9174_LT_TAGVAR(always_export_symbols, $1)=no
9175_LT_TAGVAR(archive_expsym_cmds, $1)=
9176_LT_TAGVAR(export_dynamic_flag_spec, $1)=
9177_LT_TAGVAR(hardcode_direct, $1)=no
9178_LT_TAGVAR(hardcode_direct_absolute, $1)=no
9179_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9180_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
9181_LT_TAGVAR(hardcode_libdir_separator, $1)=
9182_LT_TAGVAR(hardcode_minus_L, $1)=no
9183_LT_TAGVAR(hardcode_automatic, $1)=no
9184_LT_TAGVAR(inherit_rpath, $1)=no
9185_LT_TAGVAR(module_cmds, $1)=
9186_LT_TAGVAR(module_expsym_cmds, $1)=
9187_LT_TAGVAR(link_all_deplibs, $1)=unknown
9188_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9189_LT_TAGVAR(reload_flag, $1)=$reload_flag
9190_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9191_LT_TAGVAR(no_undefined_flag, $1)=
9192_LT_TAGVAR(whole_archive_flag_spec, $1)=
9193_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9194
9195# Source file extension for f77 test sources.
9196ac_ext=f
9197
9198# Object file extension for compiled f77 test sources.
9199objext=o
9200_LT_TAGVAR(objext, $1)=$objext
9201
9202# No sense in running all these tests if we already determined that
9203# the F77 compiler isn't working.  Some variables (like enable_shared)
9204# are currently assumed to apply to all compilers on this platform,
9205# and will be corrupted by setting them based on a non-working compiler.
9206if test "$_lt_disable_F77" != yes; then
9207  # Code to be used in simple compile tests
9208  lt_simple_compile_test_code="\
9209      subroutine t
9210      return
9211      end
9212"
9213
9214  # Code to be used in simple link tests
9215  lt_simple_link_test_code="\
9216      program t
9217      end
9218"
9219
9220  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9221  _LT_TAG_COMPILER
9222
9223  # save warnings/boilerplate of simple test code
9224  _LT_COMPILER_BOILERPLATE
9225  _LT_LINKER_BOILERPLATE
9226
9227  # Allow CC to be a program name with arguments.
9228  lt_save_CC="$CC"
9229  lt_save_GCC=$GCC
9230  CC=${F77-"f77"}
9231  compiler=$CC
9232  _LT_TAGVAR(compiler, $1)=$CC
9233  _LT_CC_BASENAME([$compiler])
9234  GCC=$G77
9235  if test -n "$compiler"; then
9236    AC_MSG_CHECKING([if libtool supports shared libraries])
9237    AC_MSG_RESULT([$can_build_shared])
9238
9239    AC_MSG_CHECKING([whether to build shared libraries])
9240    test "$can_build_shared" = "no" && enable_shared=no
9241
9242    # On AIX, shared libraries and static libraries use the same namespace, and
9243    # are all built from PIC.
9244    case $host_os in
9245      aix3*)
9246        test "$enable_shared" = yes && enable_static=no
9247        if test -n "$RANLIB"; then
9248          archive_cmds="$archive_cmds~\$RANLIB \$lib"
9249          postinstall_cmds='$RANLIB $lib'
9250        fi
9251        ;;
9252      aix[[4-9]]*)
9253	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
9254	  test "$enable_shared" = yes && enable_static=no
9255	fi
9256        ;;
9257    esac
9258    AC_MSG_RESULT([$enable_shared])
9259
9260    AC_MSG_CHECKING([whether to build static libraries])
9261    # Make sure either enable_shared or enable_static is yes.
9262    test "$enable_shared" = yes || enable_static=yes
9263    AC_MSG_RESULT([$enable_static])
9264
9265    _LT_TAGVAR(GCC, $1)="$G77"
9266    _LT_TAGVAR(LD, $1)="$LD"
9267
9268    ## CAVEAT EMPTOR:
9269    ## There is no encapsulation within the following macros, do not change
9270    ## the running order or otherwise move them around unless you know exactly
9271    ## what you are doing...
9272    _LT_COMPILER_PIC($1)
9273    _LT_COMPILER_C_O($1)
9274    _LT_COMPILER_FILE_LOCKS($1)
9275    _LT_LINKER_SHLIBS($1)
9276    _LT_SYS_DYNAMIC_LINKER($1)
9277    _LT_LINKER_HARDCODE_LIBPATH($1)
9278
9279    _LT_CONFIG($1)
9280  fi # test -n "$compiler"
9281
9282  GCC=$lt_save_GCC
9283  CC="$lt_save_CC"
9284fi # test "$_lt_disable_F77" != yes
9285
9286AC_LANG_POP
9287])# _LT_LANG_F77_CONFIG
9288
9289
9290# _LT_LANG_FC_CONFIG([TAG])
9291# -------------------------
9292# Ensure that the configuration variables for a Fortran compiler are
9293# suitably defined.  These variables are subsequently used by _LT_CONFIG
9294# to write the compiler configuration to `libtool'.
9295m4_defun([_LT_LANG_FC_CONFIG],
9296[AC_LANG_PUSH(Fortran)
9297
9298if test -z "$FC" || test "X$FC" = "Xno"; then
9299  _lt_disable_FC=yes
9300fi
9301
9302_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9303_LT_TAGVAR(allow_undefined_flag, $1)=
9304_LT_TAGVAR(always_export_symbols, $1)=no
9305_LT_TAGVAR(archive_expsym_cmds, $1)=
9306_LT_TAGVAR(export_dynamic_flag_spec, $1)=
9307_LT_TAGVAR(hardcode_direct, $1)=no
9308_LT_TAGVAR(hardcode_direct_absolute, $1)=no
9309_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
9310_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
9311_LT_TAGVAR(hardcode_libdir_separator, $1)=
9312_LT_TAGVAR(hardcode_minus_L, $1)=no
9313_LT_TAGVAR(hardcode_automatic, $1)=no
9314_LT_TAGVAR(inherit_rpath, $1)=no
9315_LT_TAGVAR(module_cmds, $1)=
9316_LT_TAGVAR(module_expsym_cmds, $1)=
9317_LT_TAGVAR(link_all_deplibs, $1)=unknown
9318_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9319_LT_TAGVAR(reload_flag, $1)=$reload_flag
9320_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9321_LT_TAGVAR(no_undefined_flag, $1)=
9322_LT_TAGVAR(whole_archive_flag_spec, $1)=
9323_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9324
9325# Source file extension for fc test sources.
9326ac_ext=${ac_fc_srcext-f}
9327
9328# Object file extension for compiled fc test sources.
9329objext=o
9330_LT_TAGVAR(objext, $1)=$objext
9331
9332# No sense in running all these tests if we already determined that
9333# the FC compiler isn't working.  Some variables (like enable_shared)
9334# are currently assumed to apply to all compilers on this platform,
9335# and will be corrupted by setting them based on a non-working compiler.
9336if test "$_lt_disable_FC" != yes; then
9337  # Code to be used in simple compile tests
9338  lt_simple_compile_test_code="\
9339      subroutine t
9340      return
9341      end
9342"
9343
9344  # Code to be used in simple link tests
9345  lt_simple_link_test_code="\
9346      program t
9347      end
9348"
9349
9350  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
9351  _LT_TAG_COMPILER
9352
9353  # save warnings/boilerplate of simple test code
9354  _LT_COMPILER_BOILERPLATE
9355  _LT_LINKER_BOILERPLATE
9356
9357  # Allow CC to be a program name with arguments.
9358  lt_save_CC="$CC"
9359  lt_save_GCC=$GCC
9360  CC=${FC-"f95"}
9361  compiler=$CC
9362  GCC=$ac_cv_fc_compiler_gnu
9363
9364  _LT_TAGVAR(compiler, $1)=$CC
9365  _LT_CC_BASENAME([$compiler])
9366
9367  if test -n "$compiler"; then
9368    AC_MSG_CHECKING([if libtool supports shared libraries])
9369    AC_MSG_RESULT([$can_build_shared])
9370
9371    AC_MSG_CHECKING([whether to build shared libraries])
9372    test "$can_build_shared" = "no" && enable_shared=no
9373
9374    # On AIX, shared libraries and static libraries use the same namespace, and
9375    # are all built from PIC.
9376    case $host_os in
9377      aix3*)
9378        test "$enable_shared" = yes && enable_static=no
9379        if test -n "$RANLIB"; then
9380          archive_cmds="$archive_cmds~\$RANLIB \$lib"
9381          postinstall_cmds='$RANLIB $lib'
9382        fi
9383        ;;
9384      aix[[4-9]]*)
9385	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
9386	  test "$enable_shared" = yes && enable_static=no
9387	fi
9388        ;;
9389    esac
9390    AC_MSG_RESULT([$enable_shared])
9391
9392    AC_MSG_CHECKING([whether to build static libraries])
9393    # Make sure either enable_shared or enable_static is yes.
9394    test "$enable_shared" = yes || enable_static=yes
9395    AC_MSG_RESULT([$enable_static])
9396
9397    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
9398    _LT_TAGVAR(LD, $1)="$LD"
9399
9400    ## CAVEAT EMPTOR:
9401    ## There is no encapsulation within the following macros, do not change
9402    ## the running order or otherwise move them around unless you know exactly
9403    ## what you are doing...
9404    _LT_SYS_HIDDEN_LIBDEPS($1)
9405    _LT_COMPILER_PIC($1)
9406    _LT_COMPILER_C_O($1)
9407    _LT_COMPILER_FILE_LOCKS($1)
9408    _LT_LINKER_SHLIBS($1)
9409    _LT_SYS_DYNAMIC_LINKER($1)
9410    _LT_LINKER_HARDCODE_LIBPATH($1)
9411
9412    _LT_CONFIG($1)
9413  fi # test -n "$compiler"
9414
9415  GCC=$lt_save_GCC
9416  CC="$lt_save_CC"
9417fi # test "$_lt_disable_FC" != yes
9418
9419AC_LANG_POP
9420])# _LT_LANG_FC_CONFIG
9421
9422
9423# _LT_LANG_GCJ_CONFIG([TAG])
9424# --------------------------
9425# Ensure that the configuration variables for the GNU Java Compiler compiler
9426# are suitably defined.  These variables are subsequently used by _LT_CONFIG
9427# to write the compiler configuration to `libtool'.
9428m4_defun([_LT_LANG_GCJ_CONFIG],
9429[AC_REQUIRE([LT_PROG_GCJ])dnl
9430AC_LANG_SAVE
9431
9432# Source file extension for Java test sources.
9433ac_ext=java
9434
9435# Object file extension for compiled Java test sources.
9436objext=o
9437_LT_TAGVAR(objext, $1)=$objext
9438
9439# Code to be used in simple compile tests
9440lt_simple_compile_test_code="class foo {}"
9441
9442# Code to be used in simple link tests
9443lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
9444
9445# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9446_LT_TAG_COMPILER
9447
9448# save warnings/boilerplate of simple test code
9449_LT_COMPILER_BOILERPLATE
9450_LT_LINKER_BOILERPLATE
9451
9452# Allow CC to be a program name with arguments.
9453lt_save_CC="$CC"
9454lt_save_GCC=$GCC
9455GCC=yes
9456CC=${GCJ-"gcj"}
9457compiler=$CC
9458_LT_TAGVAR(compiler, $1)=$CC
9459_LT_TAGVAR(LD, $1)="$LD"
9460_LT_CC_BASENAME([$compiler])
9461
9462# GCJ did not exist at the time GCC didn't implicitly link libc in.
9463_LT_TAGVAR(archive_cmds_need_lc, $1)=no
9464
9465_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
9466_LT_TAGVAR(reload_flag, $1)=$reload_flag
9467_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
9468
9469if test -n "$compiler"; then
9470  _LT_COMPILER_NO_RTTI($1)
9471  _LT_COMPILER_PIC($1)
9472  _LT_COMPILER_C_O($1)
9473  _LT_COMPILER_FILE_LOCKS($1)
9474  _LT_LINKER_SHLIBS($1)
9475  _LT_LINKER_HARDCODE_LIBPATH($1)
9476
9477  _LT_CONFIG($1)
9478fi
9479
9480AC_LANG_RESTORE
9481
9482GCC=$lt_save_GCC
9483CC="$lt_save_CC"
9484])# _LT_LANG_GCJ_CONFIG
9485
9486
9487# _LT_LANG_RC_CONFIG([TAG])
9488# -------------------------
9489# Ensure that the configuration variables for the Windows resource compiler
9490# are suitably defined.  These variables are subsequently used by _LT_CONFIG
9491# to write the compiler configuration to `libtool'.
9492m4_defun([_LT_LANG_RC_CONFIG],
9493[AC_REQUIRE([LT_PROG_RC])dnl
9494AC_LANG_SAVE
9495
9496# Source file extension for RC test sources.
9497ac_ext=rc
9498
9499# Object file extension for compiled RC test sources.
9500objext=o
9501_LT_TAGVAR(objext, $1)=$objext
9502
9503# Code to be used in simple compile tests
9504lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
9505
9506# Code to be used in simple link tests
9507lt_simple_link_test_code="$lt_simple_compile_test_code"
9508
9509# ltmain only uses $CC for tagged configurations so make sure $CC is set.
9510_LT_TAG_COMPILER
9511
9512# save warnings/boilerplate of simple test code
9513_LT_COMPILER_BOILERPLATE
9514_LT_LINKER_BOILERPLATE
9515
9516# Allow CC to be a program name with arguments.
9517lt_save_CC="$CC"
9518lt_save_GCC=$GCC
9519GCC=
9520CC=${RC-"windres"}
9521compiler=$CC
9522_LT_TAGVAR(compiler, $1)=$CC
9523_LT_CC_BASENAME([$compiler])
9524_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
9525
9526if test -n "$compiler"; then
9527  :
9528  _LT_CONFIG($1)
9529fi
9530
9531GCC=$lt_save_GCC
9532AC_LANG_RESTORE
9533CC="$lt_save_CC"
9534])# _LT_LANG_RC_CONFIG
9535
9536
9537# LT_PROG_GCJ
9538# -----------
9539AC_DEFUN([LT_PROG_GCJ],
9540[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
9541  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
9542    [AC_CHECK_TOOL(GCJ, gcj,)
9543      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
9544      AC_SUBST(GCJFLAGS)])])[]dnl
9545])
9546
9547# Old name:
9548AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
9549dnl aclocal-1.4 backwards compatibility:
9550dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
9551
9552
9553# LT_PROG_RC
9554# ----------
9555AC_DEFUN([LT_PROG_RC],
9556[AC_CHECK_TOOL(RC, windres,)
9557])
9558
9559# Old name:
9560AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
9561dnl aclocal-1.4 backwards compatibility:
9562dnl AC_DEFUN([LT_AC_PROG_RC], [])
9563
9564
9565# _LT_DECL_EGREP
9566# --------------
9567# If we don't have a new enough Autoconf to choose the best grep
9568# available, choose the one first in the user's PATH.
9569m4_defun([_LT_DECL_EGREP],
9570[AC_REQUIRE([AC_PROG_EGREP])dnl
9571AC_REQUIRE([AC_PROG_FGREP])dnl
9572test -z "$GREP" && GREP=grep
9573_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
9574_LT_DECL([], [EGREP], [1], [An ERE matcher])
9575_LT_DECL([], [FGREP], [1], [A literal string matcher])
9576dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
9577AC_SUBST([GREP])
9578])
9579
9580
9581# _LT_DECL_OBJDUMP
9582# --------------
9583# If we don't have a new enough Autoconf to choose the best objdump
9584# available, choose the one first in the user's PATH.
9585m4_defun([_LT_DECL_OBJDUMP],
9586[AC_CHECK_TOOL(OBJDUMP, objdump, false)
9587test -z "$OBJDUMP" && OBJDUMP=objdump
9588_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
9589AC_SUBST([OBJDUMP])
9590])
9591
9592
9593# _LT_DECL_SED
9594# ------------
9595# Check for a fully-functional sed program, that truncates
9596# as few characters as possible.  Prefer GNU sed if found.
9597m4_defun([_LT_DECL_SED],
9598[AC_PROG_SED
9599test -z "$SED" && SED=sed
9600Xsed="$SED -e 1s/^X//"
9601_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
9602_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
9603    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
9604])# _LT_DECL_SED
9605
9606m4_ifndef([AC_PROG_SED], [
9607# NOTE: This macro has been submitted for inclusion into   #
9608#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
9609#  a released version of Autoconf we should remove this    #
9610#  macro and use it instead.                               #
9611
9612m4_defun([AC_PROG_SED],
9613[AC_MSG_CHECKING([for a sed that does not truncate output])
9614AC_CACHE_VAL(lt_cv_path_SED,
9615[# Loop through the user's path and test for sed and gsed.
9616# Then use that list of sed's as ones to test for truncation.
9617as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9618for as_dir in $PATH
9619do
9620  IFS=$as_save_IFS
9621  test -z "$as_dir" && as_dir=.
9622  for lt_ac_prog in sed gsed; do
9623    for ac_exec_ext in '' $ac_executable_extensions; do
9624      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
9625        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
9626      fi
9627    done
9628  done
9629done
9630IFS=$as_save_IFS
9631lt_ac_max=0
9632lt_ac_count=0
9633# Add /usr/xpg4/bin/sed as it is typically found on Solaris
9634# along with /bin/sed that truncates output.
9635for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
9636  test ! -f $lt_ac_sed && continue
9637  cat /dev/null > conftest.in
9638  lt_ac_count=0
9639  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
9640  # Check for GNU sed and select it if it is found.
9641  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
9642    lt_cv_path_SED=$lt_ac_sed
9643    break
9644  fi
9645  while true; do
9646    cat conftest.in conftest.in >conftest.tmp
9647    mv conftest.tmp conftest.in
9648    cp conftest.in conftest.nl
9649    echo >>conftest.nl
9650    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
9651    cmp -s conftest.out conftest.nl || break
9652    # 10000 chars as input seems more than enough
9653    test $lt_ac_count -gt 10 && break
9654    lt_ac_count=`expr $lt_ac_count + 1`
9655    if test $lt_ac_count -gt $lt_ac_max; then
9656      lt_ac_max=$lt_ac_count
9657      lt_cv_path_SED=$lt_ac_sed
9658    fi
9659  done
9660done
9661])
9662SED=$lt_cv_path_SED
9663AC_SUBST([SED])
9664AC_MSG_RESULT([$SED])
9665])#AC_PROG_SED
9666])#m4_ifndef
9667
9668# Old name:
9669AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
9670dnl aclocal-1.4 backwards compatibility:
9671dnl AC_DEFUN([LT_AC_PROG_SED], [])
9672
9673
9674# _LT_CHECK_SHELL_FEATURES
9675# ------------------------
9676# Find out whether the shell is Bourne or XSI compatible,
9677# or has some other useful features.
9678m4_defun([_LT_CHECK_SHELL_FEATURES],
9679[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
9680# Try some XSI features
9681xsi_shell=no
9682( _lt_dummy="a/b/c"
9683  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
9684      = c,a/b,, \
9685    && eval 'test $(( 1 + 1 )) -eq 2 \
9686    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
9687  && xsi_shell=yes
9688AC_MSG_RESULT([$xsi_shell])
9689_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
9690
9691AC_MSG_CHECKING([whether the shell understands "+="])
9692lt_shell_append=no
9693( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
9694    >/dev/null 2>&1 \
9695  && lt_shell_append=yes
9696AC_MSG_RESULT([$lt_shell_append])
9697_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
9698
9699if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
9700  lt_unset=unset
9701else
9702  lt_unset=false
9703fi
9704_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
9705
9706# test EBCDIC or ASCII
9707case `echo X|tr X '\101'` in
9708 A) # ASCII based system
9709    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
9710  lt_SP2NL='tr \040 \012'
9711  lt_NL2SP='tr \015\012 \040\040'
9712  ;;
9713 *) # EBCDIC based system
9714  lt_SP2NL='tr \100 \n'
9715  lt_NL2SP='tr \r\n \100\100'
9716  ;;
9717esac
9718_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
9719_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
9720])# _LT_CHECK_SHELL_FEATURES
9721
9722
9723# _LT_PROG_XSI_SHELLFNS
9724# ---------------------
9725# Bourne and XSI compatible variants of some useful shell functions.
9726m4_defun([_LT_PROG_XSI_SHELLFNS],
9727[case $xsi_shell in
9728  yes)
9729    cat << \_LT_EOF >> "$cfgfile"
9730
9731# func_dirname file append nondir_replacement
9732# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
9733# otherwise set result to NONDIR_REPLACEMENT.
9734func_dirname ()
9735{
9736  case ${1} in
9737    */*) func_dirname_result="${1%/*}${2}" ;;
9738    *  ) func_dirname_result="${3}" ;;
9739  esac
9740}
9741
9742# func_basename file
9743func_basename ()
9744{
9745  func_basename_result="${1##*/}"
9746}
9747
9748# func_dirname_and_basename file append nondir_replacement
9749# perform func_basename and func_dirname in a single function
9750# call:
9751#   dirname:  Compute the dirname of FILE.  If nonempty,
9752#             add APPEND to the result, otherwise set result
9753#             to NONDIR_REPLACEMENT.
9754#             value returned in "$func_dirname_result"
9755#   basename: Compute filename of FILE.
9756#             value retuned in "$func_basename_result"
9757# Implementation must be kept synchronized with func_dirname
9758# and func_basename. For efficiency, we do not delegate to
9759# those functions but instead duplicate the functionality here.
9760func_dirname_and_basename ()
9761{
9762  case ${1} in
9763    */*) func_dirname_result="${1%/*}${2}" ;;
9764    *  ) func_dirname_result="${3}" ;;
9765  esac
9766  func_basename_result="${1##*/}"
9767}
9768
9769# func_stripname prefix suffix name
9770# strip PREFIX and SUFFIX off of NAME.
9771# PREFIX and SUFFIX must not contain globbing or regex special
9772# characters, hashes, percent signs, but SUFFIX may contain a leading
9773# dot (in which case that matches only a dot).
9774func_stripname ()
9775{
9776  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
9777  # positional parameters, so assign one to ordinary parameter first.
9778  func_stripname_result=${3}
9779  func_stripname_result=${func_stripname_result#"${1}"}
9780  func_stripname_result=${func_stripname_result%"${2}"}
9781}
9782
9783# func_opt_split
9784func_opt_split ()
9785{
9786  func_opt_split_opt=${1%%=*}
9787  func_opt_split_arg=${1#*=}
9788}
9789
9790# func_lo2o object
9791func_lo2o ()
9792{
9793  case ${1} in
9794    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
9795    *)    func_lo2o_result=${1} ;;
9796  esac
9797}
9798
9799# func_xform libobj-or-source
9800func_xform ()
9801{
9802  func_xform_result=${1%.*}.lo
9803}
9804
9805# func_arith arithmetic-term...
9806func_arith ()
9807{
9808  func_arith_result=$(( $[*] ))
9809}
9810
9811# func_len string
9812# STRING may not start with a hyphen.
9813func_len ()
9814{
9815  func_len_result=${#1}
9816}
9817
9818_LT_EOF
9819    ;;
9820  *) # Bourne compatible functions.
9821    cat << \_LT_EOF >> "$cfgfile"
9822
9823# func_dirname file append nondir_replacement
9824# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
9825# otherwise set result to NONDIR_REPLACEMENT.
9826func_dirname ()
9827{
9828  # Extract subdirectory from the argument.
9829  func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
9830  if test "X$func_dirname_result" = "X${1}"; then
9831    func_dirname_result="${3}"
9832  else
9833    func_dirname_result="$func_dirname_result${2}"
9834  fi
9835}
9836
9837# func_basename file
9838func_basename ()
9839{
9840  func_basename_result=`$ECHO "${1}" | $SED "$basename"`
9841}
9842
9843dnl func_dirname_and_basename
9844dnl A portable version of this function is already defined in general.m4sh
9845dnl so there is no need for it here.
9846
9847# func_stripname prefix suffix name
9848# strip PREFIX and SUFFIX off of NAME.
9849# PREFIX and SUFFIX must not contain globbing or regex special
9850# characters, hashes, percent signs, but SUFFIX may contain a leading
9851# dot (in which case that matches only a dot).
9852# func_strip_suffix prefix name
9853func_stripname ()
9854{
9855  case ${2} in
9856    .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
9857    *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
9858  esac
9859}
9860
9861# sed scripts:
9862my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
9863my_sed_long_arg='1s/^-[[^=]]*=//'
9864
9865# func_opt_split
9866func_opt_split ()
9867{
9868  func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
9869  func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
9870}
9871
9872# func_lo2o object
9873func_lo2o ()
9874{
9875  func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
9876}
9877
9878# func_xform libobj-or-source
9879func_xform ()
9880{
9881  func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'`
9882}
9883
9884# func_arith arithmetic-term...
9885func_arith ()
9886{
9887  func_arith_result=`expr "$[@]"`
9888}
9889
9890# func_len string
9891# STRING may not start with a hyphen.
9892func_len ()
9893{
9894  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
9895}
9896
9897_LT_EOF
9898esac
9899
9900case $lt_shell_append in
9901  yes)
9902    cat << \_LT_EOF >> "$cfgfile"
9903
9904# func_append var value
9905# Append VALUE to the end of shell variable VAR.
9906func_append ()
9907{
9908  eval "$[1]+=\$[2]"
9909}
9910_LT_EOF
9911    ;;
9912  *)
9913    cat << \_LT_EOF >> "$cfgfile"
9914
9915# func_append var value
9916# Append VALUE to the end of shell variable VAR.
9917func_append ()
9918{
9919  eval "$[1]=\$$[1]\$[2]"
9920}
9921
9922_LT_EOF
9923    ;;
9924  esac
9925])
9926
9927# Helper functions for option handling.                    -*- Autoconf -*-
9928#
9929#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
9930#   Inc.
9931#   Written by Gary V. Vaughan, 2004
9932#
9933# This file is free software; the Free Software Foundation gives
9934# unlimited permission to copy and/or distribute it, with or without
9935# modifications, as long as this notice is preserved.
9936
9937# serial 7 ltoptions.m4
9938
9939# This is to help aclocal find these macros, as it can't see m4_define.
9940AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9941
9942
9943# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
9944# ------------------------------------------
9945m4_define([_LT_MANGLE_OPTION],
9946[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9947
9948
9949# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
9950# ---------------------------------------
9951# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
9952# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
9953# saved as a flag.
9954m4_define([_LT_SET_OPTION],
9955[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
9956m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
9957        _LT_MANGLE_DEFUN([$1], [$2]),
9958    [m4_warning([Unknown $1 option `$2'])])[]dnl
9959])
9960
9961
9962# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
9963# ------------------------------------------------------------
9964# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
9965m4_define([_LT_IF_OPTION],
9966[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
9967
9968
9969# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
9970# -------------------------------------------------------
9971# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
9972# are set.
9973m4_define([_LT_UNLESS_OPTIONS],
9974[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9975	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
9976		      [m4_define([$0_found])])])[]dnl
9977m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
9978])[]dnl
9979])
9980
9981
9982# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
9983# ----------------------------------------
9984# OPTION-LIST is a space-separated list of Libtool options associated
9985# with MACRO-NAME.  If any OPTION has a matching handler declared with
9986# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
9987# the unknown option and exit.
9988m4_defun([_LT_SET_OPTIONS],
9989[# Set options
9990m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
9991    [_LT_SET_OPTION([$1], _LT_Option)])
9992
9993m4_if([$1],[LT_INIT],[
9994  dnl
9995  dnl Simply set some default values (i.e off) if boolean options were not
9996  dnl specified:
9997  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
9998  ])
9999  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
10000  ])
10001  dnl
10002  dnl If no reference was made to various pairs of opposing options, then
10003  dnl we run the default mode handler for the pair.  For example, if neither
10004  dnl `shared' nor `disable-shared' was passed, we enable building of shared
10005  dnl archives by default:
10006  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
10007  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
10008  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
10009  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
10010  		   [_LT_ENABLE_FAST_INSTALL])
10011  ])
10012])# _LT_SET_OPTIONS
10013
10014
10015
10016# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
10017# -----------------------------------------
10018m4_define([_LT_MANGLE_DEFUN],
10019[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
10020
10021
10022# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
10023# -----------------------------------------------
10024m4_define([LT_OPTION_DEFINE],
10025[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
10026])# LT_OPTION_DEFINE
10027
10028
10029# dlopen
10030# ------
10031LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
10032])
10033
10034AU_DEFUN([AC_LIBTOOL_DLOPEN],
10035[_LT_SET_OPTION([LT_INIT], [dlopen])
10036AC_DIAGNOSE([obsolete],
10037[$0: Remove this warning and the call to _LT_SET_OPTION when you
10038put the `dlopen' option into LT_INIT's first parameter.])
10039])
10040
10041dnl aclocal-1.4 backwards compatibility:
10042dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
10043
10044
10045# win32-dll
10046# ---------
10047# Declare package support for building win32 dll's.
10048LT_OPTION_DEFINE([LT_INIT], [win32-dll],
10049[enable_win32_dll=yes
10050
10051case $host in
10052*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
10053  AC_CHECK_TOOL(AS, as, false)
10054  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
10055  AC_CHECK_TOOL(OBJDUMP, objdump, false)
10056  ;;
10057esac
10058
10059test -z "$AS" && AS=as
10060_LT_DECL([], [AS],      [1], [Assembler program])dnl
10061
10062test -z "$DLLTOOL" && DLLTOOL=dlltool
10063_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
10064
10065test -z "$OBJDUMP" && OBJDUMP=objdump
10066_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
10067])# win32-dll
10068
10069AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
10070[AC_REQUIRE([AC_CANONICAL_HOST])dnl
10071_LT_SET_OPTION([LT_INIT], [win32-dll])
10072AC_DIAGNOSE([obsolete],
10073[$0: Remove this warning and the call to _LT_SET_OPTION when you
10074put the `win32-dll' option into LT_INIT's first parameter.])
10075])
10076
10077dnl aclocal-1.4 backwards compatibility:
10078dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
10079
10080
10081# _LT_ENABLE_SHARED([DEFAULT])
10082# ----------------------------
10083# implement the --enable-shared flag, and supports the `shared' and
10084# `disable-shared' LT_INIT options.
10085# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
10086m4_define([_LT_ENABLE_SHARED],
10087[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
10088AC_ARG_ENABLE([shared],
10089    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
10090	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
10091    [p=${PACKAGE-default}
10092    case $enableval in
10093    yes) enable_shared=yes ;;
10094    no) enable_shared=no ;;
10095    *)
10096      enable_shared=no
10097      # Look at the argument we got.  We use all the common list separators.
10098      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10099      for pkg in $enableval; do
10100	IFS="$lt_save_ifs"
10101	if test "X$pkg" = "X$p"; then
10102	  enable_shared=yes
10103	fi
10104      done
10105      IFS="$lt_save_ifs"
10106      ;;
10107    esac],
10108    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
10109
10110    _LT_DECL([build_libtool_libs], [enable_shared], [0],
10111	[Whether or not to build shared libraries])
10112])# _LT_ENABLE_SHARED
10113
10114LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
10115LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
10116
10117# Old names:
10118AC_DEFUN([AC_ENABLE_SHARED],
10119[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
10120])
10121
10122AC_DEFUN([AC_DISABLE_SHARED],
10123[_LT_SET_OPTION([LT_INIT], [disable-shared])
10124])
10125
10126AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
10127AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
10128
10129dnl aclocal-1.4 backwards compatibility:
10130dnl AC_DEFUN([AM_ENABLE_SHARED], [])
10131dnl AC_DEFUN([AM_DISABLE_SHARED], [])
10132
10133
10134
10135# _LT_ENABLE_STATIC([DEFAULT])
10136# ----------------------------
10137# implement the --enable-static flag, and support the `static' and
10138# `disable-static' LT_INIT options.
10139# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
10140m4_define([_LT_ENABLE_STATIC],
10141[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
10142AC_ARG_ENABLE([static],
10143    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
10144	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
10145    [p=${PACKAGE-default}
10146    case $enableval in
10147    yes) enable_static=yes ;;
10148    no) enable_static=no ;;
10149    *)
10150     enable_static=no
10151      # Look at the argument we got.  We use all the common list separators.
10152      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10153      for pkg in $enableval; do
10154	IFS="$lt_save_ifs"
10155	if test "X$pkg" = "X$p"; then
10156	  enable_static=yes
10157	fi
10158      done
10159      IFS="$lt_save_ifs"
10160      ;;
10161    esac],
10162    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
10163
10164    _LT_DECL([build_old_libs], [enable_static], [0],
10165	[Whether or not to build static libraries])
10166])# _LT_ENABLE_STATIC
10167
10168LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
10169LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
10170
10171# Old names:
10172AC_DEFUN([AC_ENABLE_STATIC],
10173[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
10174])
10175
10176AC_DEFUN([AC_DISABLE_STATIC],
10177[_LT_SET_OPTION([LT_INIT], [disable-static])
10178])
10179
10180AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
10181AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
10182
10183dnl aclocal-1.4 backwards compatibility:
10184dnl AC_DEFUN([AM_ENABLE_STATIC], [])
10185dnl AC_DEFUN([AM_DISABLE_STATIC], [])
10186
10187
10188
10189# _LT_ENABLE_FAST_INSTALL([DEFAULT])
10190# ----------------------------------
10191# implement the --enable-fast-install flag, and support the `fast-install'
10192# and `disable-fast-install' LT_INIT options.
10193# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
10194m4_define([_LT_ENABLE_FAST_INSTALL],
10195[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
10196AC_ARG_ENABLE([fast-install],
10197    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
10198    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
10199    [p=${PACKAGE-default}
10200    case $enableval in
10201    yes) enable_fast_install=yes ;;
10202    no) enable_fast_install=no ;;
10203    *)
10204      enable_fast_install=no
10205      # Look at the argument we got.  We use all the common list separators.
10206      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
10207      for pkg in $enableval; do
10208	IFS="$lt_save_ifs"
10209	if test "X$pkg" = "X$p"; then
10210	  enable_fast_install=yes
10211	fi
10212      done
10213      IFS="$lt_save_ifs"
10214      ;;
10215    esac],
10216    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
10217
10218_LT_DECL([fast_install], [enable_fast_install], [0],
10219	 [Whether or not to optimize for fast installation])dnl
10220])# _LT_ENABLE_FAST_INSTALL
10221
10222LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
10223LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
10224
10225# Old names:
10226AU_DEFUN([AC_ENABLE_FAST_INSTALL],
10227[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
10228AC_DIAGNOSE([obsolete],
10229[$0: Remove this warning and the call to _LT_SET_OPTION when you put
10230the `fast-install' option into LT_INIT's first parameter.])
10231])
10232
10233AU_DEFUN([AC_DISABLE_FAST_INSTALL],
10234[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
10235AC_DIAGNOSE([obsolete],
10236[$0: Remove this warning and the call to _LT_SET_OPTION when you put
10237the `disable-fast-install' option into LT_INIT's first parameter.])
10238])
10239
10240dnl aclocal-1.4 backwards compatibility:
10241dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
10242dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
10243
10244
10245# _LT_WITH_PIC([MODE])
10246# --------------------
10247# implement the --with-pic flag, and support the `pic-only' and `no-pic'
10248# LT_INIT options.
10249# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
10250m4_define([_LT_WITH_PIC],
10251[AC_ARG_WITH([pic],
10252    [AS_HELP_STRING([--with-pic],
10253	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
10254    [pic_mode="$withval"],
10255    [pic_mode=default])
10256
10257test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
10258
10259_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
10260])# _LT_WITH_PIC
10261
10262LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
10263LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
10264
10265# Old name:
10266AU_DEFUN([AC_LIBTOOL_PICMODE],
10267[_LT_SET_OPTION([LT_INIT], [pic-only])
10268AC_DIAGNOSE([obsolete],
10269[$0: Remove this warning and the call to _LT_SET_OPTION when you
10270put the `pic-only' option into LT_INIT's first parameter.])
10271])
10272
10273dnl aclocal-1.4 backwards compatibility:
10274dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
10275
10276
10277m4_define([_LTDL_MODE], [])
10278LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
10279		 [m4_define([_LTDL_MODE], [nonrecursive])])
10280LT_OPTION_DEFINE([LTDL_INIT], [recursive],
10281		 [m4_define([_LTDL_MODE], [recursive])])
10282LT_OPTION_DEFINE([LTDL_INIT], [subproject],
10283		 [m4_define([_LTDL_MODE], [subproject])])
10284
10285m4_define([_LTDL_TYPE], [])
10286LT_OPTION_DEFINE([LTDL_INIT], [installable],
10287		 [m4_define([_LTDL_TYPE], [installable])])
10288LT_OPTION_DEFINE([LTDL_INIT], [convenience],
10289		 [m4_define([_LTDL_TYPE], [convenience])])
10290
10291# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
10292#
10293# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
10294# Written by Gary V. Vaughan, 2004
10295#
10296# This file is free software; the Free Software Foundation gives
10297# unlimited permission to copy and/or distribute it, with or without
10298# modifications, as long as this notice is preserved.
10299
10300# serial 6 ltsugar.m4
10301
10302# This is to help aclocal find these macros, as it can't see m4_define.
10303AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
10304
10305
10306# lt_join(SEP, ARG1, [ARG2...])
10307# -----------------------------
10308# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
10309# associated separator.
10310# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
10311# versions in m4sugar had bugs.
10312m4_define([lt_join],
10313[m4_if([$#], [1], [],
10314       [$#], [2], [[$2]],
10315       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
10316m4_define([_lt_join],
10317[m4_if([$#$2], [2], [],
10318       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
10319
10320
10321# lt_car(LIST)
10322# lt_cdr(LIST)
10323# ------------
10324# Manipulate m4 lists.
10325# These macros are necessary as long as will still need to support
10326# Autoconf-2.59 which quotes differently.
10327m4_define([lt_car], [[$1]])
10328m4_define([lt_cdr],
10329[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
10330       [$#], 1, [],
10331       [m4_dquote(m4_shift($@))])])
10332m4_define([lt_unquote], $1)
10333
10334
10335# lt_append(MACRO-NAME, STRING, [SEPARATOR])
10336# ------------------------------------------
10337# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
10338# Note that neither SEPARATOR nor STRING are expanded; they are appended
10339# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
10340# No SEPARATOR is output if MACRO-NAME was previously undefined (different
10341# than defined and empty).
10342#
10343# This macro is needed until we can rely on Autoconf 2.62, since earlier
10344# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
10345m4_define([lt_append],
10346[m4_define([$1],
10347	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
10348
10349
10350
10351# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
10352# ----------------------------------------------------------
10353# Produce a SEP delimited list of all paired combinations of elements of
10354# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
10355# has the form PREFIXmINFIXSUFFIXn.
10356# Needed until we can rely on m4_combine added in Autoconf 2.62.
10357m4_define([lt_combine],
10358[m4_if(m4_eval([$# > 3]), [1],
10359       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
10360[[m4_foreach([_Lt_prefix], [$2],
10361	     [m4_foreach([_Lt_suffix],
10362		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
10363	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
10364
10365
10366# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
10367# -----------------------------------------------------------------------
10368# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
10369# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
10370m4_define([lt_if_append_uniq],
10371[m4_ifdef([$1],
10372	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
10373		 [lt_append([$1], [$2], [$3])$4],
10374		 [$5])],
10375	  [lt_append([$1], [$2], [$3])$4])])
10376
10377
10378# lt_dict_add(DICT, KEY, VALUE)
10379# -----------------------------
10380m4_define([lt_dict_add],
10381[m4_define([$1($2)], [$3])])
10382
10383
10384# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
10385# --------------------------------------------
10386m4_define([lt_dict_add_subkey],
10387[m4_define([$1($2:$3)], [$4])])
10388
10389
10390# lt_dict_fetch(DICT, KEY, [SUBKEY])
10391# ----------------------------------
10392m4_define([lt_dict_fetch],
10393[m4_ifval([$3],
10394	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
10395    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
10396
10397
10398# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
10399# -----------------------------------------------------------------
10400m4_define([lt_if_dict_fetch],
10401[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
10402	[$5],
10403    [$6])])
10404
10405
10406# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
10407# --------------------------------------------------------------
10408m4_define([lt_dict_filter],
10409[m4_if([$5], [], [],
10410  [lt_join(m4_quote(m4_default([$4], [[, ]])),
10411           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
10412		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
10413])
10414
10415# ltversion.m4 -- version numbers			-*- Autoconf -*-
10416#
10417#   Copyright (C) 2004 Free Software Foundation, Inc.
10418#   Written by Scott James Remnant, 2004
10419#
10420# This file is free software; the Free Software Foundation gives
10421# unlimited permission to copy and/or distribute it, with or without
10422# modifications, as long as this notice is preserved.
10423
10424# Generated from ltversion.in.
10425
10426# serial 3175 ltversion.m4
10427# This file is part of GNU Libtool
10428
10429m4_define([LT_PACKAGE_VERSION], [2.2.10])
10430m4_define([LT_PACKAGE_REVISION], [1.3175])
10431
10432AC_DEFUN([LTVERSION_VERSION],
10433[macro_version='2.2.10'
10434macro_revision='1.3175'
10435_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
10436_LT_DECL(, macro_revision, 0)
10437])
10438
10439# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
10440#
10441#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
10442#   Written by Scott James Remnant, 2004.
10443#
10444# This file is free software; the Free Software Foundation gives
10445# unlimited permission to copy and/or distribute it, with or without
10446# modifications, as long as this notice is preserved.
10447
10448# serial 5 lt~obsolete.m4
10449
10450# These exist entirely to fool aclocal when bootstrapping libtool.
10451#
10452# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
10453# which have later been changed to m4_define as they aren't part of the
10454# exported API, or moved to Autoconf or Automake where they belong.
10455#
10456# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
10457# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
10458# using a macro with the same name in our local m4/libtool.m4 it'll
10459# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
10460# and doesn't know about Autoconf macros at all.)
10461#
10462# So we provide this file, which has a silly filename so it's always
10463# included after everything else.  This provides aclocal with the
10464# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
10465# because those macros already exist, or will be overwritten later.
10466# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
10467#
10468# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
10469# Yes, that means every name once taken will need to remain here until
10470# we give up compatibility with versions before 1.7, at which point
10471# we need to keep only those names which we still refer to.
10472
10473# This is to help aclocal find these macros, as it can't see m4_define.
10474AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
10475
10476m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
10477m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
10478m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
10479m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
10480m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
10481m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
10482m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
10483m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
10484m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
10485m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
10486m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
10487m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
10488m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
10489m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
10490m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
10491m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
10492m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
10493m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
10494m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
10495m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
10496m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
10497m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
10498m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
10499m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
10500m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
10501m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
10502m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
10503m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
10504m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
10505m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
10506m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
10507m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
10508m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
10509m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
10510m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
10511m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
10512m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
10513m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
10514m4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
10515m4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
10516m4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
10517m4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
10518m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
10519m4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
10520m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
10521m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
10522m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
10523m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
10524m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
10525m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
10526m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
10527m4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
10528m4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
10529m4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
10530m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
10531m4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
10532m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
10533m4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
10534m4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
10535m4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
10536m4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
10537
10538