aclocal.m4 revision 2ae83157
1# generated automatically by aclocal 1.11 -*- 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.63],,
17[m4_warning([this file was generated for autoconf 2.63.
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], [],
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])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# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
695# Free Software Foundation, Inc.
696#
697# This file is free software; the Free Software Foundation
698# gives unlimited permission to copy and/or distribute it,
699# with or without modifications, as long as this notice is preserved.
700
701# serial 6
702
703# AM_PROG_CC_C_O
704# --------------
705# Like AC_PROG_CC_C_O, but changed for automake.
706AC_DEFUN([AM_PROG_CC_C_O],
707[AC_REQUIRE([AC_PROG_CC_C_O])dnl
708AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
709AC_REQUIRE_AUX_FILE([compile])dnl
710# FIXME: we rely on the cache variable name because
711# there is no other way.
712set dummy $CC
713am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
714eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
715if test "$am_t" != yes; then
716   # Losing compiler, so override with the script.
717   # FIXME: It is wrong to rewrite CC.
718   # But if we don't then we get into trouble of one sort or another.
719   # A longer-term fix would be to have automake use am__CC in this case,
720   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
721   CC="$am_aux_dir/compile $CC"
722fi
723dnl Make sure AC_PROG_CC is never called again, or it will override our
724dnl setting of CC.
725m4_define([AC_PROG_CC],
726          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
727])
728
729# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
730
731# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
732# Free Software Foundation, Inc.
733#
734# This file is free software; the Free Software Foundation
735# gives unlimited permission to copy and/or distribute it,
736# with or without modifications, as long as this notice is preserved.
737
738# serial 6
739
740# AM_MISSING_PROG(NAME, PROGRAM)
741# ------------------------------
742AC_DEFUN([AM_MISSING_PROG],
743[AC_REQUIRE([AM_MISSING_HAS_RUN])
744$1=${$1-"${am_missing_run}$2"}
745AC_SUBST($1)])
746
747
748# AM_MISSING_HAS_RUN
749# ------------------
750# Define MISSING if not defined so far and test if it supports --run.
751# If it does, set am_missing_run to use it, otherwise, to nothing.
752AC_DEFUN([AM_MISSING_HAS_RUN],
753[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
754AC_REQUIRE_AUX_FILE([missing])dnl
755if test x"${MISSING+set}" != xset; then
756  case $am_aux_dir in
757  *\ * | *\	*)
758    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
759  *)
760    MISSING="\${SHELL} $am_aux_dir/missing" ;;
761  esac
762fi
763# Use eval to expand $SHELL
764if eval "$MISSING --run true"; then
765  am_missing_run="$MISSING --run "
766else
767  am_missing_run=
768  AC_MSG_WARN([`missing' script is too old or missing])
769fi
770])
771
772# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
773#
774# This file is free software; the Free Software Foundation
775# gives unlimited permission to copy and/or distribute it,
776# with or without modifications, as long as this notice is preserved.
777
778# AM_PROG_MKDIR_P
779# ---------------
780# Check for `mkdir -p'.
781AC_DEFUN([AM_PROG_MKDIR_P],
782[AC_PREREQ([2.60])dnl
783AC_REQUIRE([AC_PROG_MKDIR_P])dnl
784dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
785dnl while keeping a definition of mkdir_p for backward compatibility.
786dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
787dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
788dnl Makefile.ins that do not define MKDIR_P, so we do our own
789dnl adjustment using top_builddir (which is defined more often than
790dnl MKDIR_P).
791AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
792case $mkdir_p in
793  [[\\/$]]* | ?:[[\\/]]*) ;;
794  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
795esac
796])
797
798# Helper functions for option handling.                     -*- Autoconf -*-
799
800# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
801#
802# This file is free software; the Free Software Foundation
803# gives unlimited permission to copy and/or distribute it,
804# with or without modifications, as long as this notice is preserved.
805
806# serial 4
807
808# _AM_MANGLE_OPTION(NAME)
809# -----------------------
810AC_DEFUN([_AM_MANGLE_OPTION],
811[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
812
813# _AM_SET_OPTION(NAME)
814# ------------------------------
815# Set option NAME.  Presently that only means defining a flag for this option.
816AC_DEFUN([_AM_SET_OPTION],
817[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
818
819# _AM_SET_OPTIONS(OPTIONS)
820# ----------------------------------
821# OPTIONS is a space-separated list of Automake options.
822AC_DEFUN([_AM_SET_OPTIONS],
823[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
824
825# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
826# -------------------------------------------
827# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
828AC_DEFUN([_AM_IF_OPTION],
829[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
830
831# Check to make sure that the build environment is sane.    -*- Autoconf -*-
832
833# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
834# Free Software Foundation, Inc.
835#
836# This file is free software; the Free Software Foundation
837# gives unlimited permission to copy and/or distribute it,
838# with or without modifications, as long as this notice is preserved.
839
840# serial 5
841
842# AM_SANITY_CHECK
843# ---------------
844AC_DEFUN([AM_SANITY_CHECK],
845[AC_MSG_CHECKING([whether build environment is sane])
846# Just in case
847sleep 1
848echo timestamp > conftest.file
849# Reject unsafe characters in $srcdir or the absolute working directory
850# name.  Accept space and tab only in the latter.
851am_lf='
852'
853case `pwd` in
854  *[[\\\"\#\$\&\'\`$am_lf]]*)
855    AC_MSG_ERROR([unsafe absolute working directory name]);;
856esac
857case $srcdir in
858  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
859    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
860esac
861
862# Do `set' in a subshell so we don't clobber the current shell's
863# arguments.  Must try -L first in case configure is actually a
864# symlink; some systems play weird games with the mod time of symlinks
865# (eg FreeBSD returns the mod time of the symlink's containing
866# directory).
867if (
868   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
869   if test "$[*]" = "X"; then
870      # -L didn't work.
871      set X `ls -t "$srcdir/configure" conftest.file`
872   fi
873   rm -f conftest.file
874   if test "$[*]" != "X $srcdir/configure conftest.file" \
875      && test "$[*]" != "X conftest.file $srcdir/configure"; then
876
877      # If neither matched, then we have a broken ls.  This can happen
878      # if, for instance, CONFIG_SHELL is bash and it inherits a
879      # broken ls alias from the environment.  This has actually
880      # happened.  Such a system could not be considered "sane".
881      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
882alias in your environment])
883   fi
884
885   test "$[2]" = conftest.file
886   )
887then
888   # Ok.
889   :
890else
891   AC_MSG_ERROR([newly created file is older than distributed files!
892Check your system clock])
893fi
894AC_MSG_RESULT(yes)])
895
896# Copyright (C) 2009  Free Software Foundation, Inc.
897#
898# This file is free software; the Free Software Foundation
899# gives unlimited permission to copy and/or distribute it,
900# with or without modifications, as long as this notice is preserved.
901
902# serial 1
903
904# AM_SILENT_RULES([DEFAULT])
905# --------------------------
906# Enable less verbose build rules; with the default set to DEFAULT
907# (`yes' being less verbose, `no' or empty being verbose).
908AC_DEFUN([AM_SILENT_RULES],
909[AC_ARG_ENABLE([silent-rules],
910[  --enable-silent-rules          less verbose build output (undo: `make V=1')
911  --disable-silent-rules         verbose build output (undo: `make V=0')])
912case $enable_silent_rules in
913yes) AM_DEFAULT_VERBOSITY=0;;
914no)  AM_DEFAULT_VERBOSITY=1;;
915*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
916esac
917AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
918AM_BACKSLASH='\'
919AC_SUBST([AM_BACKSLASH])dnl
920_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
921])
922
923# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
924#
925# This file is free software; the Free Software Foundation
926# gives unlimited permission to copy and/or distribute it,
927# with or without modifications, as long as this notice is preserved.
928
929# AM_PROG_INSTALL_STRIP
930# ---------------------
931# One issue with vendor `install' (even GNU) is that you can't
932# specify the program used to strip binaries.  This is especially
933# annoying in cross-compiling environments, where the build's strip
934# is unlikely to handle the host's binaries.
935# Fortunately install-sh will honor a STRIPPROG variable, so we
936# always use install-sh in `make install-strip', and initialize
937# STRIPPROG with the value of the STRIP variable (set by the user).
938AC_DEFUN([AM_PROG_INSTALL_STRIP],
939[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
940# Installed binaries are usually stripped using `strip' when the user
941# run `make install-strip'.  However `strip' might not be the right
942# tool to use in cross-compilation environments, therefore Automake
943# will honor the `STRIP' environment variable to overrule this program.
944dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
945if test "$cross_compiling" != no; then
946  AC_CHECK_TOOL([STRIP], [strip], :)
947fi
948INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
949AC_SUBST([INSTALL_STRIP_PROGRAM])])
950
951# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
952#
953# This file is free software; the Free Software Foundation
954# gives unlimited permission to copy and/or distribute it,
955# with or without modifications, as long as this notice is preserved.
956
957# serial 2
958
959# _AM_SUBST_NOTMAKE(VARIABLE)
960# ---------------------------
961# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
962# This macro is traced by Automake.
963AC_DEFUN([_AM_SUBST_NOTMAKE])
964
965# AM_SUBST_NOTMAKE(VARIABLE)
966# ---------------------------
967# Public sister of _AM_SUBST_NOTMAKE.
968AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
969
970# Check how to create a tarball.                            -*- Autoconf -*-
971
972# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
973#
974# This file is free software; the Free Software Foundation
975# gives unlimited permission to copy and/or distribute it,
976# with or without modifications, as long as this notice is preserved.
977
978# serial 2
979
980# _AM_PROG_TAR(FORMAT)
981# --------------------
982# Check how to create a tarball in format FORMAT.
983# FORMAT should be one of `v7', `ustar', or `pax'.
984#
985# Substitute a variable $(am__tar) that is a command
986# writing to stdout a FORMAT-tarball containing the directory
987# $tardir.
988#     tardir=directory && $(am__tar) > result.tar
989#
990# Substitute a variable $(am__untar) that extract such
991# a tarball read from stdin.
992#     $(am__untar) < result.tar
993AC_DEFUN([_AM_PROG_TAR],
994[# Always define AMTAR for backward compatibility.
995AM_MISSING_PROG([AMTAR], [tar])
996m4_if([$1], [v7],
997     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
998     [m4_case([$1], [ustar],, [pax],,
999              [m4_fatal([Unknown tar format])])
1000AC_MSG_CHECKING([how to create a $1 tar archive])
1001# Loop over all known methods to create a tar archive until one works.
1002_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1003_am_tools=${am_cv_prog_tar_$1-$_am_tools}
1004# Do not fold the above two line into one, because Tru64 sh and
1005# Solaris sh will not grok spaces in the rhs of `-'.
1006for _am_tool in $_am_tools
1007do
1008  case $_am_tool in
1009  gnutar)
1010    for _am_tar in tar gnutar gtar;
1011    do
1012      AM_RUN_LOG([$_am_tar --version]) && break
1013    done
1014    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1015    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1016    am__untar="$_am_tar -xf -"
1017    ;;
1018  plaintar)
1019    # Must skip GNU tar: if it does not support --format= it doesn't create
1020    # ustar tarball either.
1021    (tar --version) >/dev/null 2>&1 && continue
1022    am__tar='tar chf - "$$tardir"'
1023    am__tar_='tar chf - "$tardir"'
1024    am__untar='tar xf -'
1025    ;;
1026  pax)
1027    am__tar='pax -L -x $1 -w "$$tardir"'
1028    am__tar_='pax -L -x $1 -w "$tardir"'
1029    am__untar='pax -r'
1030    ;;
1031  cpio)
1032    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1033    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1034    am__untar='cpio -i -H $1 -d'
1035    ;;
1036  none)
1037    am__tar=false
1038    am__tar_=false
1039    am__untar=false
1040    ;;
1041  esac
1042
1043  # If the value was cached, stop now.  We just wanted to have am__tar
1044  # and am__untar set.
1045  test -n "${am_cv_prog_tar_$1}" && break
1046
1047  # tar/untar a dummy directory, and stop if the command works
1048  rm -rf conftest.dir
1049  mkdir conftest.dir
1050  echo GrepMe > conftest.dir/file
1051  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1052  rm -rf conftest.dir
1053  if test -s conftest.tar; then
1054    AM_RUN_LOG([$am__untar <conftest.tar])
1055    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1056  fi
1057done
1058rm -rf conftest.dir
1059
1060AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1061AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1062AC_SUBST([am__tar])
1063AC_SUBST([am__untar])
1064]) # _AM_PROG_TAR
1065
1066dnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
1067dnl
1068dnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
1069dnl 
1070dnl Permission is hereby granted, free of charge, to any person obtaining a
1071dnl copy of this software and associated documentation files (the
1072dnl "Software"), to deal in the Software without restriction, including
1073dnl without limitation the rights to use, copy, modify, merge, publish,
1074dnl distribute, and/or sell copies of the Software, and to permit persons
1075dnl to whom the Software is furnished to do so, provided that the above
1076dnl copyright notice(s) and this permission notice appear in all copies of
1077dnl the Software and that both the above copyright notice(s) and this
1078dnl permission notice appear in supporting documentation.
1079dnl
1080dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1081dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1082dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
1083dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
1084dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
1085dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
1086dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
1087dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
1088dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1089dnl
1090dnl Except as contained in this notice, the name of a copyright holder
1091dnl shall not be used in advertising or otherwise to promote the sale, use
1092dnl or other dealings in this Software without prior written authorization
1093dnl of the copyright holder.
1094
1095# XORG_MACROS_VERSION(required-version)
1096# -------------------------------------
1097# Minimum version: 1.1.0
1098#
1099# If you're using a macro added in Version 1.1 or newer, include this in
1100# your configure.ac with the minimum required version, such as:
1101# XORG_MACROS_VERSION(1.1)
1102#
1103# To ensure that this macro is defined, also add:
1104# m4_ifndef([XORG_MACROS_VERSION],
1105#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
1106#
1107#
1108# See the "minimum version" comment for each macro you use to see what 
1109# version you require.
1110m4_defun([XORG_MACROS_VERSION],[
1111m4_define([vers_have], [1.3.0])
1112m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
1113m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
1114m4_if(m4_cmp(maj_have, maj_needed), 0,,
1115    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
1116m4_if(m4_version_compare(vers_have, [$1]), -1,
1117    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
1118m4_undefine([vers_have])
1119m4_undefine([maj_have])
1120m4_undefine([maj_needed])
1121]) # XORG_MACROS_VERSION
1122
1123# XORG_PROG_RAWCPP()
1124# ------------------
1125# Minimum version: 1.0.0
1126#
1127# Find cpp program and necessary flags for use in pre-processing text files
1128# such as man pages and config files
1129AC_DEFUN([XORG_PROG_RAWCPP],[
1130AC_REQUIRE([AC_PROG_CPP])
1131AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
1132   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
1133
1134# Check for flag to avoid builtin definitions - assumes unix is predefined,
1135# which is not the best choice for supporting other OS'es, but covers most
1136# of the ones we need for now.
1137AC_MSG_CHECKING([if $RAWCPP requires -undef])
1138AC_LANG_CONFTEST([Does cpp redefine unix ?])
1139if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1140	AC_MSG_RESULT([no])
1141else
1142	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1143		RAWCPPFLAGS=-undef
1144		AC_MSG_RESULT([yes])
1145	# under Cygwin unix is still defined even with -undef
1146	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
1147		RAWCPPFLAGS="-undef -ansi"
1148		AC_MSG_RESULT([yes, with -ansi])
1149	else
1150		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
1151	fi
1152fi
1153rm -f conftest.$ac_ext
1154
1155AC_MSG_CHECKING([if $RAWCPP requires -traditional])
1156AC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
1157if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
1158	AC_MSG_RESULT([no])
1159else
1160	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
1161		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
1162		AC_MSG_RESULT([yes])
1163	else
1164		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
1165	fi
1166fi
1167rm -f conftest.$ac_ext
1168AC_SUBST(RAWCPPFLAGS)
1169]) # XORG_PROG_RAWCPP
1170
1171# XORG_MANPAGE_SECTIONS()
1172# -----------------------
1173# Minimum version: 1.0.0
1174#
1175# Determine which sections man pages go in for the different man page types
1176# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
1177# Not sure if there's any better way than just hardcoding by OS name.
1178# Override default settings by setting environment variables
1179
1180AC_DEFUN([XORG_MANPAGE_SECTIONS],[
1181AC_REQUIRE([AC_CANONICAL_HOST])
1182
1183if test x$APP_MAN_SUFFIX = x    ; then
1184    APP_MAN_SUFFIX=1
1185fi
1186if test x$APP_MAN_DIR = x    ; then
1187    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
1188fi
1189
1190if test x$LIB_MAN_SUFFIX = x    ; then
1191    LIB_MAN_SUFFIX=3
1192fi
1193if test x$LIB_MAN_DIR = x    ; then
1194    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
1195fi
1196
1197if test x$FILE_MAN_SUFFIX = x    ; then
1198    case $host_os in
1199	solaris*)	FILE_MAN_SUFFIX=4  ;;
1200	*)		FILE_MAN_SUFFIX=5  ;;
1201    esac
1202fi
1203if test x$FILE_MAN_DIR = x    ; then
1204    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
1205fi
1206
1207if test x$MISC_MAN_SUFFIX = x    ; then
1208    case $host_os in
1209	solaris*)	MISC_MAN_SUFFIX=5  ;;
1210	*)		MISC_MAN_SUFFIX=7  ;;
1211    esac
1212fi
1213if test x$MISC_MAN_DIR = x    ; then
1214    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
1215fi
1216
1217if test x$DRIVER_MAN_SUFFIX = x    ; then
1218    case $host_os in
1219	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
1220	*)		DRIVER_MAN_SUFFIX=4  ;;
1221    esac
1222fi
1223if test x$DRIVER_MAN_DIR = x    ; then
1224    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
1225fi
1226
1227if test x$ADMIN_MAN_SUFFIX = x    ; then
1228    case $host_os in
1229	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
1230	*)		ADMIN_MAN_SUFFIX=8  ;;
1231    esac
1232fi
1233if test x$ADMIN_MAN_DIR = x    ; then
1234    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
1235fi
1236
1237
1238AC_SUBST([APP_MAN_SUFFIX])
1239AC_SUBST([LIB_MAN_SUFFIX])
1240AC_SUBST([FILE_MAN_SUFFIX])
1241AC_SUBST([MISC_MAN_SUFFIX])
1242AC_SUBST([DRIVER_MAN_SUFFIX])
1243AC_SUBST([ADMIN_MAN_SUFFIX])
1244AC_SUBST([APP_MAN_DIR])
1245AC_SUBST([LIB_MAN_DIR])
1246AC_SUBST([FILE_MAN_DIR])
1247AC_SUBST([MISC_MAN_DIR])
1248AC_SUBST([DRIVER_MAN_DIR])
1249AC_SUBST([ADMIN_MAN_DIR])
1250]) # XORG_MANPAGE_SECTIONS
1251
1252# XORG_CHECK_LINUXDOC
1253# -------------------
1254# Minimum version: 1.0.0
1255#
1256# Defines the variable MAKE_TEXT if the necessary tools and
1257# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
1258# Whether or not the necessary tools and files are found can be checked
1259# with the AM_CONDITIONAL "BUILD_LINUXDOC"
1260AC_DEFUN([XORG_CHECK_LINUXDOC],[
1261if test x$XORG_SGML_PATH = x ; then
1262    XORG_SGML_PATH=$prefix/share/sgml
1263fi
1264HAVE_DEFS_ENT=
1265
1266if test x"$cross_compiling" = x"yes" ; then
1267  HAVE_DEFS_ENT=no
1268else
1269  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
1270fi
1271
1272AC_PATH_PROG(LINUXDOC, linuxdoc)
1273AC_PATH_PROG(PS2PDF, ps2pdf)
1274
1275AC_MSG_CHECKING([Whether to build documentation])
1276
1277if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
1278   BUILDDOC=yes
1279else
1280   BUILDDOC=no
1281fi
1282
1283AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
1284
1285AC_MSG_RESULT([$BUILDDOC])
1286
1287AC_MSG_CHECKING([Whether to build pdf documentation])
1288
1289if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
1290   BUILDPDFDOC=yes
1291else
1292   BUILDPDFDOC=no
1293fi
1294
1295AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1296
1297AC_MSG_RESULT([$BUILDPDFDOC])
1298
1299MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
1300MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
1301MAKE_PDF="$PS2PDF"
1302MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
1303
1304AC_SUBST(MAKE_TEXT)
1305AC_SUBST(MAKE_PS)
1306AC_SUBST(MAKE_PDF)
1307AC_SUBST(MAKE_HTML)
1308]) # XORG_CHECK_LINUXDOC
1309
1310# XORG_CHECK_DOCBOOK
1311# -------------------
1312# Minimum version: 1.0.0
1313#
1314# Checks for the ability to build output formats from SGML DocBook source.
1315# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
1316# indicates whether the necessary tools and files are found and, if set,
1317# $(MAKE_XXX) blah.sgml will produce blah.xxx.
1318AC_DEFUN([XORG_CHECK_DOCBOOK],[
1319if test x$XORG_SGML_PATH = x ; then
1320    XORG_SGML_PATH=$prefix/share/sgml
1321fi
1322HAVE_DEFS_ENT=
1323BUILDTXTDOC=no
1324BUILDPDFDOC=no
1325BUILDPSDOC=no
1326BUILDHTMLDOC=no
1327
1328AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
1329
1330AC_PATH_PROG(DOCBOOKPS, docbook2ps)
1331AC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
1332AC_PATH_PROG(DOCBOOKHTML, docbook2html)
1333AC_PATH_PROG(DOCBOOKTXT, docbook2txt)
1334
1335AC_MSG_CHECKING([Whether to build text documentation])
1336if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
1337   test x$BUILD_TXTDOC != xno; then
1338	BUILDTXTDOC=yes
1339fi
1340AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
1341AC_MSG_RESULT([$BUILDTXTDOC])
1342
1343AC_MSG_CHECKING([Whether to build PDF documentation])
1344if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
1345   test x$BUILD_PDFDOC != xno; then
1346	BUILDPDFDOC=yes
1347fi
1348AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1349AC_MSG_RESULT([$BUILDPDFDOC])
1350
1351AC_MSG_CHECKING([Whether to build PostScript documentation])
1352if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
1353   test x$BUILD_PSDOC != xno; then
1354	BUILDPSDOC=yes
1355fi
1356AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
1357AC_MSG_RESULT([$BUILDPSDOC])
1358
1359AC_MSG_CHECKING([Whether to build HTML documentation])
1360if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
1361   test x$BUILD_HTMLDOC != xno; then
1362	BUILDHTMLDOC=yes
1363fi
1364AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
1365AC_MSG_RESULT([$BUILDHTMLDOC])
1366
1367MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
1368MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
1369MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
1370MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
1371
1372AC_SUBST(MAKE_TEXT)
1373AC_SUBST(MAKE_PS)
1374AC_SUBST(MAKE_PDF)
1375AC_SUBST(MAKE_HTML)
1376]) # XORG_CHECK_DOCBOOK
1377
1378# XORG_CHECK_MALLOC_ZERO
1379# ----------------------
1380# Minimum version: 1.0.0
1381#
1382# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
1383# malloc(0) returns NULL.  Packages should add one of these cflags to
1384# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
1385AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
1386AC_ARG_ENABLE(malloc0returnsnull,
1387	AS_HELP_STRING([--enable-malloc0returnsnull],
1388		       [malloc(0) returns NULL (default: auto)]),
1389	[MALLOC_ZERO_RETURNS_NULL=$enableval],
1390	[MALLOC_ZERO_RETURNS_NULL=auto])
1391
1392AC_MSG_CHECKING([whether malloc(0) returns NULL])
1393if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
1394	AC_RUN_IFELSE([
1395char *malloc();
1396char *realloc();
1397char *calloc();
1398main() {
1399    char *m0, *r0, *c0, *p;
1400    m0 = malloc(0);
1401    p = malloc(10);
1402    r0 = realloc(p,0);
1403    c0 = calloc(0);
1404    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
1405}],
1406		[MALLOC_ZERO_RETURNS_NULL=yes],
1407		[MALLOC_ZERO_RETURNS_NULL=no])
1408fi
1409AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
1410
1411if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
1412	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
1413	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
1414	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
1415else
1416	MALLOC_ZERO_CFLAGS=""
1417	XMALLOC_ZERO_CFLAGS=""
1418	XTMALLOC_ZERO_CFLAGS=""
1419fi
1420
1421AC_SUBST([MALLOC_ZERO_CFLAGS])
1422AC_SUBST([XMALLOC_ZERO_CFLAGS])
1423AC_SUBST([XTMALLOC_ZERO_CFLAGS])
1424]) # XORG_CHECK_MALLOC_ZERO
1425
1426# XORG_WITH_LINT()
1427# ----------------
1428# Minimum version: 1.1.0
1429#
1430# Sets up flags for source checkers such as lint and sparse if --with-lint
1431# is specified.   (Use --with-lint=sparse for sparse.)
1432# Sets $LINT to name of source checker passed with --with-lint (default: lint)
1433# Sets $LINT_FLAGS to flags to pass to source checker
1434# Sets LINT automake conditional if enabled (default: disabled)
1435#
1436AC_DEFUN([XORG_WITH_LINT],[
1437
1438# Allow checking code with lint, sparse, etc.
1439AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
1440		[Use a lint-style source code checker (default: disabled)])],
1441		[use_lint=$withval], [use_lint=no])
1442if test "x$use_lint" = "xyes" ; then
1443	LINT="lint"
1444else
1445	LINT="$use_lint"
1446fi
1447if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
1448    case $LINT in
1449	lint|*/lint)
1450	    case $host_os in
1451		solaris*)
1452			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
1453			;;
1454	    esac
1455	    ;;
1456    esac
1457fi
1458
1459AC_SUBST(LINT)
1460AC_SUBST(LINT_FLAGS)
1461AM_CONDITIONAL(LINT, [test x$LINT != xno])
1462
1463]) # XORG_WITH_LINT
1464
1465# XORG_LINT_LIBRARY(LIBNAME)
1466# --------------------------
1467# Minimum version: 1.1.0
1468#
1469# Sets up flags for building lint libraries for checking programs that call
1470# functions in the library.
1471# Disabled by default, enable with --enable-lint-library
1472# Sets: 
1473#	@LINTLIB@		- name of lint library file to make
1474#	MAKE_LINT_LIB		- automake conditional
1475#
1476
1477AC_DEFUN([XORG_LINT_LIBRARY],[
1478AC_REQUIRE([XORG_WITH_LINT])
1479# Build lint "library" for more indepth checks of programs calling this library
1480AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
1481	[Create lint library (default: disabled)])],
1482	[make_lint_lib=$enableval], [make_lint_lib=no])
1483if test "x$make_lint_lib" != "xno" ; then
1484	if test "x$LINT" = "xno" ; then
1485		AC_MSG_ERROR([Cannot make lint library without --with-lint])
1486	fi
1487	if test "x$make_lint_lib" = "xyes" ; then
1488		LINTLIB=llib-l$1.ln
1489	else
1490		LINTLIB=$make_lint_lib
1491	fi
1492fi
1493AC_SUBST(LINTLIB)
1494AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
1495
1496]) # XORG_LINT_LIBRARY
1497
1498# XORG_CWARNFLAGS
1499# ---------------
1500# Minimum version: 1.2.0
1501#
1502# Defines CWARNFLAGS to enable C compiler warnings.
1503#
1504AC_DEFUN([XORG_CWARNFLAGS], [
1505AC_REQUIRE([AC_PROG_CC])
1506if  test "x$GCC" = xyes ; then
1507    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
1508-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
1509-Wbad-function-cast"
1510    case `$CC -dumpversion` in
1511    3.4.* | 4.*)
1512	CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
1513	;;
1514    esac
1515else
1516    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
1517    if test "x$SUNCC" = "xyes"; then
1518	CWARNFLAGS="-v"
1519    fi
1520fi
1521AC_SUBST(CWARNFLAGS)
1522m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
1523]) # XORG_CWARNFLAGS
1524
1525# XORG_STRICT_OPTION
1526# -----------------------
1527# Minimum version: 1.3.0
1528#
1529# Add configure option to enable strict compilation
1530AC_DEFUN([XORG_STRICT_OPTION], [
1531AC_REQUIRE([AC_PROG_CC])
1532AC_REQUIRE([AC_PROG_CC_C99])
1533AC_REQUIRE([XORG_CWARNFLAGS])
1534
1535AC_ARG_ENABLE(strict-compilation,
1536			  AS_HELP_STRING([--enable-strict-compilation],
1537			  [Enable all warnings from compiler and make them errors (default: disabled)]),
1538			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
1539if test "x$STRICT_COMPILE" = "xyes"; then
1540	AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
1541	AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
1542	if test "x$GCC" = xyes ; then
1543		STRICT_CFLAGS="-pedantic -Werror"
1544	elif test "x$SUNCC" = "xyes"; then
1545		STRICT_CFLAGS="-errwarn"
1546    elif test "x$INTELCC" = "xyes"; then
1547		STRICT_CFLAGS="-Werror"
1548	fi
1549fi
1550CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
1551AC_SUBST([CWARNFLAGS])
1552]) # XORG_STRICT_OPTION
1553
1554# XORG_DEFAULT_OPTIONS
1555# --------------------
1556# Minimum version: 1.3.0
1557#
1558# Defines default options for X.Org modules.
1559#
1560AC_DEFUN([XORG_DEFAULT_OPTIONS], [
1561XORG_CWARNFLAGS
1562XORG_STRICT_OPTION
1563XORG_RELEASE_VERSION
1564XORG_CHANGELOG
1565XORG_MANPAGE_SECTIONS
1566]) # XORG_DEFAULT_OPTIONS
1567dnl Copyright 2005 Red Hat, Inc
1568dnl
1569dnl Permission to use, copy, modify, distribute, and sell this software and its
1570dnl documentation for any purpose is hereby granted without fee, provided that
1571dnl the above copyright notice appear in all copies and that both that
1572dnl copyright notice and this permission notice appear in supporting
1573dnl documentation.
1574dnl
1575dnl The above copyright notice and this permission notice shall be included
1576dnl in all copies or substantial portions of the Software.
1577dnl
1578dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1579dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1580dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
1581dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
1582dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
1583dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
1584dnl OTHER DEALINGS IN THE SOFTWARE.
1585dnl
1586dnl Except as contained in this notice, the name of the copyright holders shall
1587dnl not be used in advertising or otherwise to promote the sale, use or
1588dnl other dealings in this Software without prior written authorization
1589dnl from the copyright holders.
1590dnl
1591
1592# XORG_RELEASE_VERSION
1593# --------------------
1594# Adds --with/without-release-string and changes the PACKAGE and
1595# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
1596# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
1597# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
1598 
1599AC_DEFUN([XORG_RELEASE_VERSION],[
1600	AC_ARG_WITH(release-version,
1601			AS_HELP_STRING([--with-release-version=STRING],
1602				[Use release version string in package name]),
1603			[RELEASE_VERSION="$withval"],
1604			[RELEASE_VERSION=""])
1605	if test "x$RELEASE_VERSION" != "x"; then
1606		PACKAGE="$PACKAGE-$RELEASE_VERSION"
1607		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
1608		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
1609	fi
1610	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
1611		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
1612		[Major version of this package])
1613	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
1614	if test "x$PVM" = "x"; then
1615		PVM="0"
1616	fi
1617	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
1618		[$PVM],
1619		[Minor version of this package])
1620	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
1621	if test "x$PVP" = "x"; then
1622		PVP="0"
1623	fi
1624	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
1625		[$PVP],
1626		[Patch version of this package])
1627])
1628
1629# XORG_CHANGELOG()
1630# ----------------
1631# Minimum version: 1.2.0
1632#
1633# Defines the variable CHANGELOG_CMD as the command to generate
1634# ChangeLog from git.
1635#
1636# Arrange that distcleancheck ignores ChangeLog left over by distclean.
1637#
1638AC_DEFUN([XORG_CHANGELOG], [
1639CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
1640mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
1641echo 'git directory not found: installing possibly empty changelog.' >&2)"
1642AC_SUBST([CHANGELOG_CMD])
1643AC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
1644]) # XORG_CHANGELOG
1645
1646# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1647
1648# serial 52 AC_PROG_LIBTOOL
1649
1650
1651# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
1652# -----------------------------------------------------------
1653# If this macro is not defined by Autoconf, define it here.
1654m4_ifdef([AC_PROVIDE_IFELSE],
1655         [],
1656         [m4_define([AC_PROVIDE_IFELSE],
1657	         [m4_ifdef([AC_PROVIDE_$1],
1658		           [$2], [$3])])])
1659
1660
1661# AC_PROG_LIBTOOL
1662# ---------------
1663AC_DEFUN([AC_PROG_LIBTOOL],
1664[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
1665dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
1666dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
1667  AC_PROVIDE_IFELSE([AC_PROG_CXX],
1668    [AC_LIBTOOL_CXX],
1669    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
1670  ])])
1671dnl And a similar setup for Fortran 77 support
1672  AC_PROVIDE_IFELSE([AC_PROG_F77],
1673    [AC_LIBTOOL_F77],
1674    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
1675])])
1676
1677dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
1678dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
1679dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
1680  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
1681    [AC_LIBTOOL_GCJ],
1682    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
1683      [AC_LIBTOOL_GCJ],
1684      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
1685	[AC_LIBTOOL_GCJ],
1686      [ifdef([AC_PROG_GCJ],
1687	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1688       ifdef([A][M_PROG_GCJ],
1689	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
1690       ifdef([LT_AC_PROG_GCJ],
1691	     [define([LT_AC_PROG_GCJ],
1692		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
1693])])# AC_PROG_LIBTOOL
1694
1695
1696# _AC_PROG_LIBTOOL
1697# ----------------
1698AC_DEFUN([_AC_PROG_LIBTOOL],
1699[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
1700AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
1701AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
1702AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
1703
1704# This can be used to rebuild libtool when needed
1705LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1706
1707# Always use our own libtool.
1708LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1709AC_SUBST(LIBTOOL)dnl
1710
1711# Prevent multiple expansion
1712define([AC_PROG_LIBTOOL], [])
1713])# _AC_PROG_LIBTOOL
1714
1715
1716# AC_LIBTOOL_SETUP
1717# ----------------
1718AC_DEFUN([AC_LIBTOOL_SETUP],
1719[AC_PREREQ(2.50)dnl
1720AC_REQUIRE([AC_ENABLE_SHARED])dnl
1721AC_REQUIRE([AC_ENABLE_STATIC])dnl
1722AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
1723AC_REQUIRE([AC_CANONICAL_HOST])dnl
1724AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1725AC_REQUIRE([AC_PROG_CC])dnl
1726AC_REQUIRE([AC_PROG_LD])dnl
1727AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
1728AC_REQUIRE([AC_PROG_NM])dnl
1729
1730AC_REQUIRE([AC_PROG_LN_S])dnl
1731AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
1732# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1733AC_REQUIRE([AC_OBJEXT])dnl
1734AC_REQUIRE([AC_EXEEXT])dnl
1735dnl
1736AC_LIBTOOL_SYS_MAX_CMD_LEN
1737AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1738AC_LIBTOOL_OBJDIR
1739
1740AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1741_LT_AC_PROG_ECHO_BACKSLASH
1742
1743case $host_os in
1744aix3*)
1745  # AIX sometimes has problems with the GCC collect2 program.  For some
1746  # reason, if we set the COLLECT_NAMES environment variable, the problems
1747  # vanish in a puff of smoke.
1748  if test "X${COLLECT_NAMES+set}" != Xset; then
1749    COLLECT_NAMES=
1750    export COLLECT_NAMES
1751  fi
1752  ;;
1753esac
1754
1755# Sed substitution that helps us do robust quoting.  It backslashifies
1756# metacharacters that are still active within double-quoted strings.
1757Xsed='sed -e 1s/^X//'
1758[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
1759
1760# Same as above, but do not quote variable references.
1761[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
1762
1763# Sed substitution to delay expansion of an escaped shell variable in a
1764# double_quote_subst'ed string.
1765delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1766
1767# Sed substitution to avoid accidental globbing in evaled expressions
1768no_glob_subst='s/\*/\\\*/g'
1769
1770# Constants:
1771rm="rm -f"
1772
1773# Global variables:
1774default_ofile=libtool
1775can_build_shared=yes
1776
1777# All known linkers require a `.a' archive for static linking (except MSVC,
1778# which needs '.lib').
1779libext=a
1780ltmain="$ac_aux_dir/ltmain.sh"
1781ofile="$default_ofile"
1782with_gnu_ld="$lt_cv_prog_gnu_ld"
1783
1784AC_CHECK_TOOL(AR, ar, false)
1785AC_CHECK_TOOL(RANLIB, ranlib, :)
1786AC_CHECK_TOOL(STRIP, strip, :)
1787
1788old_CC="$CC"
1789old_CFLAGS="$CFLAGS"
1790
1791# Set sane defaults for various variables
1792test -z "$AR" && AR=ar
1793test -z "$AR_FLAGS" && AR_FLAGS=cru
1794test -z "$AS" && AS=as
1795test -z "$CC" && CC=cc
1796test -z "$LTCC" && LTCC=$CC
1797test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
1798test -z "$DLLTOOL" && DLLTOOL=dlltool
1799test -z "$LD" && LD=ld
1800test -z "$LN_S" && LN_S="ln -s"
1801test -z "$MAGIC_CMD" && MAGIC_CMD=file
1802test -z "$NM" && NM=nm
1803test -z "$SED" && SED=sed
1804test -z "$OBJDUMP" && OBJDUMP=objdump
1805test -z "$RANLIB" && RANLIB=:
1806test -z "$STRIP" && STRIP=:
1807test -z "$ac_objext" && ac_objext=o
1808
1809# Determine commands to create old-style static archives.
1810old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
1811old_postinstall_cmds='chmod 644 $oldlib'
1812old_postuninstall_cmds=
1813
1814if test -n "$RANLIB"; then
1815  case $host_os in
1816  openbsd*)
1817    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
1818    ;;
1819  *)
1820    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
1821    ;;
1822  esac
1823  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1824fi
1825
1826_LT_CC_BASENAME([$compiler])
1827
1828# Only perform the check for file, if the check method requires it
1829case $deplibs_check_method in
1830file_magic*)
1831  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1832    AC_PATH_MAGIC
1833  fi
1834  ;;
1835esac
1836
1837_LT_REQUIRED_DARWIN_CHECKS
1838
1839AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1840AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1841enable_win32_dll=yes, enable_win32_dll=no)
1842
1843AC_ARG_ENABLE([libtool-lock],
1844    [AC_HELP_STRING([--disable-libtool-lock],
1845	[avoid locking (might break parallel builds)])])
1846test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1847
1848AC_ARG_WITH([pic],
1849    [AC_HELP_STRING([--with-pic],
1850	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1851    [pic_mode="$withval"],
1852    [pic_mode=default])
1853test -z "$pic_mode" && pic_mode=default
1854
1855# Use C for the default configuration in the libtool script
1856tagname=
1857AC_LIBTOOL_LANG_C_CONFIG
1858_LT_AC_TAGCONFIG
1859])# AC_LIBTOOL_SETUP
1860
1861
1862# _LT_AC_SYS_COMPILER
1863# -------------------
1864AC_DEFUN([_LT_AC_SYS_COMPILER],
1865[AC_REQUIRE([AC_PROG_CC])dnl
1866
1867# If no C compiler was specified, use CC.
1868LTCC=${LTCC-"$CC"}
1869
1870# If no C compiler flags were specified, use CFLAGS.
1871LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
1872
1873# Allow CC to be a program name with arguments.
1874compiler=$CC
1875])# _LT_AC_SYS_COMPILER
1876
1877
1878# _LT_CC_BASENAME(CC)
1879# -------------------
1880# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
1881AC_DEFUN([_LT_CC_BASENAME],
1882[for cc_temp in $1""; do
1883  case $cc_temp in
1884    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
1885    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
1886    \-*) ;;
1887    *) break;;
1888  esac
1889done
1890cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
1891])
1892
1893
1894# _LT_COMPILER_BOILERPLATE
1895# ------------------------
1896# Check for compiler boilerplate output or warnings with
1897# the simple compiler test code.
1898AC_DEFUN([_LT_COMPILER_BOILERPLATE],
1899[AC_REQUIRE([LT_AC_PROG_SED])dnl
1900ac_outfile=conftest.$ac_objext
1901echo "$lt_simple_compile_test_code" >conftest.$ac_ext
1902eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1903_lt_compiler_boilerplate=`cat conftest.err`
1904$rm conftest*
1905])# _LT_COMPILER_BOILERPLATE
1906
1907
1908# _LT_LINKER_BOILERPLATE
1909# ----------------------
1910# Check for linker boilerplate output or warnings with
1911# the simple link test code.
1912AC_DEFUN([_LT_LINKER_BOILERPLATE],
1913[AC_REQUIRE([LT_AC_PROG_SED])dnl
1914ac_outfile=conftest.$ac_objext
1915echo "$lt_simple_link_test_code" >conftest.$ac_ext
1916eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
1917_lt_linker_boilerplate=`cat conftest.err`
1918$rm -r conftest*
1919])# _LT_LINKER_BOILERPLATE
1920
1921# _LT_REQUIRED_DARWIN_CHECKS
1922# --------------------------
1923# Check for some things on darwin
1924AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
1925  case $host_os in
1926    rhapsody* | darwin*)
1927    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
1928    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
1929
1930    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
1931      [lt_cv_apple_cc_single_mod=no
1932      if test -z "${LT_MULTI_MODULE}"; then
1933   # By default we will add the -single_module flag. You can override
1934   # by either setting the environment variable LT_MULTI_MODULE
1935   # non-empty at configure time, or by adding -multi_module to the
1936   # link flags.
1937   echo "int foo(void){return 1;}" > conftest.c
1938   $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
1939     -dynamiclib ${wl}-single_module conftest.c
1940   if test -f libconftest.dylib; then
1941     lt_cv_apple_cc_single_mod=yes
1942     rm -rf libconftest.dylib*
1943   fi
1944   rm conftest.c
1945      fi])
1946    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
1947      [lt_cv_ld_exported_symbols_list],
1948      [lt_cv_ld_exported_symbols_list=no
1949      save_LDFLAGS=$LDFLAGS
1950      echo "_main" > conftest.sym
1951      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
1952      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
1953   [lt_cv_ld_exported_symbols_list=yes],
1954   [lt_cv_ld_exported_symbols_list=no])
1955   LDFLAGS="$save_LDFLAGS"
1956    ])
1957    case $host_os in
1958    rhapsody* | darwin1.[[0123]])
1959      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
1960    darwin1.*)
1961     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1962    darwin*)
1963      # if running on 10.5 or later, the deployment target defaults
1964      # to the OS version, if on x86, and 10.4, the deployment
1965      # target defaults to 10.4. Don't you love it?
1966      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
1967   10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
1968     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1969   10.[[012]]*)
1970     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
1971   10.*)
1972     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
1973      esac
1974    ;;
1975  esac
1976    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
1977      _lt_dar_single_mod='$single_module'
1978    fi
1979    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
1980      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
1981    else
1982      _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
1983    fi
1984    if test "$DSYMUTIL" != ":"; then
1985      _lt_dsymutil="~$DSYMUTIL \$lib || :"
1986    else
1987      _lt_dsymutil=
1988    fi
1989    ;;
1990  esac
1991])
1992
1993# _LT_AC_SYS_LIBPATH_AIX
1994# ----------------------
1995# Links a minimal program and checks the executable
1996# for the system default hardcoded library path. In most cases,
1997# this is /usr/lib:/lib, but when the MPI compilers are used
1998# the location of the communication and MPI libs are included too.
1999# If we don't find anything, use the default library path according
2000# to the aix ld manual.
2001AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
2002[AC_REQUIRE([LT_AC_PROG_SED])dnl
2003AC_LINK_IFELSE(AC_LANG_PROGRAM,[
2004lt_aix_libpath_sed='
2005    /Import File Strings/,/^$/ {
2006	/^0/ {
2007	    s/^0  *\(.*\)$/\1/
2008	    p
2009	}
2010    }'
2011aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2012# Check for a 64-bit object if we didn't find anything.
2013if test -z "$aix_libpath"; then
2014  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
2015fi],[])
2016if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
2017])# _LT_AC_SYS_LIBPATH_AIX
2018
2019
2020# _LT_AC_SHELL_INIT(ARG)
2021# ----------------------
2022AC_DEFUN([_LT_AC_SHELL_INIT],
2023[ifdef([AC_DIVERSION_NOTICE],
2024	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
2025	 [AC_DIVERT_PUSH(NOTICE)])
2026$1
2027AC_DIVERT_POP
2028])# _LT_AC_SHELL_INIT
2029
2030
2031# _LT_AC_PROG_ECHO_BACKSLASH
2032# --------------------------
2033# Add some code to the start of the generated configure script which
2034# will find an echo command which doesn't interpret backslashes.
2035AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
2036[_LT_AC_SHELL_INIT([
2037# Check that we are running under the correct shell.
2038SHELL=${CONFIG_SHELL-/bin/sh}
2039
2040case X$ECHO in
2041X*--fallback-echo)
2042  # Remove one level of quotation (which was required for Make).
2043  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
2044  ;;
2045esac
2046
2047echo=${ECHO-echo}
2048if test "X[$]1" = X--no-reexec; then
2049  # Discard the --no-reexec flag, and continue.
2050  shift
2051elif test "X[$]1" = X--fallback-echo; then
2052  # Avoid inline document here, it may be left over
2053  :
2054elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
2055  # Yippee, $echo works!
2056  :
2057else
2058  # Restart under the correct shell.
2059  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
2060fi
2061
2062if test "X[$]1" = X--fallback-echo; then
2063  # used as fallback echo
2064  shift
2065  cat <<EOF
2066[$]*
2067EOF
2068  exit 0
2069fi
2070
2071# The HP-UX ksh and POSIX shell print the target directory to stdout
2072# if CDPATH is set.
2073(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
2074
2075if test -z "$ECHO"; then
2076if test "X${echo_test_string+set}" != Xset; then
2077# find a string as large as possible, as long as the shell can cope with it
2078  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
2079    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
2080    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
2081       echo_test_string=`eval $cmd` &&
2082       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
2083    then
2084      break
2085    fi
2086  done
2087fi
2088
2089if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
2090   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
2091   test "X$echo_testing_string" = "X$echo_test_string"; then
2092  :
2093else
2094  # The Solaris, AIX, and Digital Unix default echo programs unquote
2095  # backslashes.  This makes it impossible to quote backslashes using
2096  #   echo "$something" | sed 's/\\/\\\\/g'
2097  #
2098  # So, first we look for a working echo in the user's PATH.
2099
2100  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2101  for dir in $PATH /usr/ucb; do
2102    IFS="$lt_save_ifs"
2103    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
2104       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
2105       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
2106       test "X$echo_testing_string" = "X$echo_test_string"; then
2107      echo="$dir/echo"
2108      break
2109    fi
2110  done
2111  IFS="$lt_save_ifs"
2112
2113  if test "X$echo" = Xecho; then
2114    # We didn't find a better echo, so look for alternatives.
2115    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
2116       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
2117       test "X$echo_testing_string" = "X$echo_test_string"; then
2118      # This shell has a builtin print -r that does the trick.
2119      echo='print -r'
2120    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
2121	 test "X$CONFIG_SHELL" != X/bin/ksh; then
2122      # If we have ksh, try running configure again with it.
2123      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
2124      export ORIGINAL_CONFIG_SHELL
2125      CONFIG_SHELL=/bin/ksh
2126      export CONFIG_SHELL
2127      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
2128    else
2129      # Try using printf.
2130      echo='printf %s\n'
2131      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
2132	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
2133	 test "X$echo_testing_string" = "X$echo_test_string"; then
2134	# Cool, printf works
2135	:
2136      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2137	   test "X$echo_testing_string" = 'X\t' &&
2138	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2139	   test "X$echo_testing_string" = "X$echo_test_string"; then
2140	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
2141	export CONFIG_SHELL
2142	SHELL="$CONFIG_SHELL"
2143	export SHELL
2144	echo="$CONFIG_SHELL [$]0 --fallback-echo"
2145      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
2146	   test "X$echo_testing_string" = 'X\t' &&
2147	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
2148	   test "X$echo_testing_string" = "X$echo_test_string"; then
2149	echo="$CONFIG_SHELL [$]0 --fallback-echo"
2150      else
2151	# maybe with a smaller string...
2152	prev=:
2153
2154	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
2155	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
2156	  then
2157	    break
2158	  fi
2159	  prev="$cmd"
2160	done
2161
2162	if test "$prev" != 'sed 50q "[$]0"'; then
2163	  echo_test_string=`eval $prev`
2164	  export echo_test_string
2165	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
2166	else
2167	  # Oops.  We lost completely, so just stick with echo.
2168	  echo=echo
2169	fi
2170      fi
2171    fi
2172  fi
2173fi
2174fi
2175
2176# Copy echo and quote the copy suitably for passing to libtool from
2177# the Makefile, instead of quoting the original, which is used later.
2178ECHO=$echo
2179if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
2180   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
2181fi
2182
2183AC_SUBST(ECHO)
2184])])# _LT_AC_PROG_ECHO_BACKSLASH
2185
2186
2187# _LT_AC_LOCK
2188# -----------
2189AC_DEFUN([_LT_AC_LOCK],
2190[AC_ARG_ENABLE([libtool-lock],
2191    [AC_HELP_STRING([--disable-libtool-lock],
2192	[avoid locking (might break parallel builds)])])
2193test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2194
2195# Some flags need to be propagated to the compiler or linker for good
2196# libtool support.
2197case $host in
2198ia64-*-hpux*)
2199  # Find out which ABI we are using.
2200  echo 'int i;' > conftest.$ac_ext
2201  if AC_TRY_EVAL(ac_compile); then
2202    case `/usr/bin/file conftest.$ac_objext` in
2203    *ELF-32*)
2204      HPUX_IA64_MODE="32"
2205      ;;
2206    *ELF-64*)
2207      HPUX_IA64_MODE="64"
2208      ;;
2209    esac
2210  fi
2211  rm -rf conftest*
2212  ;;
2213*-*-irix6*)
2214  # Find out which ABI we are using.
2215  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
2216  if AC_TRY_EVAL(ac_compile); then
2217   if test "$lt_cv_prog_gnu_ld" = yes; then
2218    case `/usr/bin/file conftest.$ac_objext` in
2219    *32-bit*)
2220      LD="${LD-ld} -melf32bsmip"
2221      ;;
2222    *N32*)
2223      LD="${LD-ld} -melf32bmipn32"
2224      ;;
2225    *64-bit*)
2226      LD="${LD-ld} -melf64bmip"
2227      ;;
2228    esac
2229   else
2230    case `/usr/bin/file conftest.$ac_objext` in
2231    *32-bit*)
2232      LD="${LD-ld} -32"
2233      ;;
2234    *N32*)
2235      LD="${LD-ld} -n32"
2236      ;;
2237    *64-bit*)
2238      LD="${LD-ld} -64"
2239      ;;
2240    esac
2241   fi
2242  fi
2243  rm -rf conftest*
2244  ;;
2245
2246x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
2247s390*-*linux*|sparc*-*linux*)
2248  # Find out which ABI we are using.
2249  echo 'int i;' > conftest.$ac_ext
2250  if AC_TRY_EVAL(ac_compile); then
2251    case `/usr/bin/file conftest.o` in
2252    *32-bit*)
2253      case $host in
2254        x86_64-*kfreebsd*-gnu)
2255          LD="${LD-ld} -m elf_i386_fbsd"
2256          ;;
2257        x86_64-*linux*)
2258          LD="${LD-ld} -m elf_i386"
2259          ;;
2260        ppc64-*linux*|powerpc64-*linux*)
2261          LD="${LD-ld} -m elf32ppclinux"
2262          ;;
2263        s390x-*linux*)
2264          LD="${LD-ld} -m elf_s390"
2265          ;;
2266        sparc64-*linux*)
2267          LD="${LD-ld} -m elf32_sparc"
2268          ;;
2269      esac
2270      ;;
2271    *64-bit*)
2272      case $host in
2273        x86_64-*kfreebsd*-gnu)
2274          LD="${LD-ld} -m elf_x86_64_fbsd"
2275          ;;
2276        x86_64-*linux*)
2277          LD="${LD-ld} -m elf_x86_64"
2278          ;;
2279        ppc*-*linux*|powerpc*-*linux*)
2280          LD="${LD-ld} -m elf64ppc"
2281          ;;
2282        s390*-*linux*)
2283          LD="${LD-ld} -m elf64_s390"
2284          ;;
2285        sparc*-*linux*)
2286          LD="${LD-ld} -m elf64_sparc"
2287          ;;
2288      esac
2289      ;;
2290    esac
2291  fi
2292  rm -rf conftest*
2293  ;;
2294
2295*-*-sco3.2v5*)
2296  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2297  SAVE_CFLAGS="$CFLAGS"
2298  CFLAGS="$CFLAGS -belf"
2299  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
2300    [AC_LANG_PUSH(C)
2301     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
2302     AC_LANG_POP])
2303  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2304    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2305    CFLAGS="$SAVE_CFLAGS"
2306  fi
2307  ;;
2308sparc*-*solaris*)
2309  # Find out which ABI we are using.
2310  echo 'int i;' > conftest.$ac_ext
2311  if AC_TRY_EVAL(ac_compile); then
2312    case `/usr/bin/file conftest.o` in
2313    *64-bit*)
2314      case $lt_cv_prog_gnu_ld in
2315      yes*) LD="${LD-ld} -m elf64_sparc" ;;
2316      *)
2317        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
2318	  LD="${LD-ld} -64"
2319	fi
2320	;;
2321      esac
2322      ;;
2323    esac
2324  fi
2325  rm -rf conftest*
2326  ;;
2327
2328AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
2329[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
2330  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
2331  AC_CHECK_TOOL(AS, as, false)
2332  AC_CHECK_TOOL(OBJDUMP, objdump, false)
2333  ;;
2334  ])
2335esac
2336
2337need_locks="$enable_libtool_lock"
2338
2339])# _LT_AC_LOCK
2340
2341
2342# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2343#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
2344# ----------------------------------------------------------------
2345# Check whether the given compiler option works
2346AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
2347[AC_REQUIRE([LT_AC_PROG_SED])
2348AC_CACHE_CHECK([$1], [$2],
2349  [$2=no
2350  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
2351   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2352   lt_compiler_flag="$3"
2353   # Insert the option either (1) after the last *FLAGS variable, or
2354   # (2) before a word containing "conftest.", or (3) at the end.
2355   # Note that $ac_compile itself does not contain backslashes and begins
2356   # with a dollar sign (not a hyphen), so the echo should work correctly.
2357   # The option is referenced via a variable to avoid confusing sed.
2358   lt_compile=`echo "$ac_compile" | $SED \
2359   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2360   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2361   -e 's:$: $lt_compiler_flag:'`
2362   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2363   (eval "$lt_compile" 2>conftest.err)
2364   ac_status=$?
2365   cat conftest.err >&AS_MESSAGE_LOG_FD
2366   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2367   if (exit $ac_status) && test -s "$ac_outfile"; then
2368     # The compiler can only warn and ignore the option if not recognized
2369     # So say no if there are warnings other than the usual output.
2370     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
2371     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2372     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
2373       $2=yes
2374     fi
2375   fi
2376   $rm conftest*
2377])
2378
2379if test x"[$]$2" = xyes; then
2380    ifelse([$5], , :, [$5])
2381else
2382    ifelse([$6], , :, [$6])
2383fi
2384])# AC_LIBTOOL_COMPILER_OPTION
2385
2386
2387# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
2388#                          [ACTION-SUCCESS], [ACTION-FAILURE])
2389# ------------------------------------------------------------
2390# Check whether the given compiler option works
2391AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
2392[AC_REQUIRE([LT_AC_PROG_SED])dnl
2393AC_CACHE_CHECK([$1], [$2],
2394  [$2=no
2395   save_LDFLAGS="$LDFLAGS"
2396   LDFLAGS="$LDFLAGS $3"
2397   echo "$lt_simple_link_test_code" > conftest.$ac_ext
2398   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
2399     # The linker can only warn and ignore the option if not recognized
2400     # So say no if there are warnings
2401     if test -s conftest.err; then
2402       # Append any errors to the config.log.
2403       cat conftest.err 1>&AS_MESSAGE_LOG_FD
2404       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
2405       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
2406       if diff conftest.exp conftest.er2 >/dev/null; then
2407         $2=yes
2408       fi
2409     else
2410       $2=yes
2411     fi
2412   fi
2413   $rm -r conftest*
2414   LDFLAGS="$save_LDFLAGS"
2415])
2416
2417if test x"[$]$2" = xyes; then
2418    ifelse([$4], , :, [$4])
2419else
2420    ifelse([$5], , :, [$5])
2421fi
2422])# AC_LIBTOOL_LINKER_OPTION
2423
2424
2425# AC_LIBTOOL_SYS_MAX_CMD_LEN
2426# --------------------------
2427AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
2428[# find the maximum length of command line arguments
2429AC_MSG_CHECKING([the maximum length of command line arguments])
2430AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
2431  i=0
2432  teststring="ABCD"
2433
2434  case $build_os in
2435  msdosdjgpp*)
2436    # On DJGPP, this test can blow up pretty badly due to problems in libc
2437    # (any single argument exceeding 2000 bytes causes a buffer overrun
2438    # during glob expansion).  Even if it were fixed, the result of this
2439    # check would be larger than it should be.
2440    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
2441    ;;
2442
2443  gnu*)
2444    # Under GNU Hurd, this test is not required because there is
2445    # no limit to the length of command line arguments.
2446    # Libtool will interpret -1 as no limit whatsoever
2447    lt_cv_sys_max_cmd_len=-1;
2448    ;;
2449
2450  cygwin* | mingw*)
2451    # On Win9x/ME, this test blows up -- it succeeds, but takes
2452    # about 5 minutes as the teststring grows exponentially.
2453    # Worse, since 9x/ME are not pre-emptively multitasking,
2454    # you end up with a "frozen" computer, even though with patience
2455    # the test eventually succeeds (with a max line length of 256k).
2456    # Instead, let's just punt: use the minimum linelength reported by
2457    # all of the supported platforms: 8192 (on NT/2K/XP).
2458    lt_cv_sys_max_cmd_len=8192;
2459    ;;
2460
2461  amigaos*)
2462    # On AmigaOS with pdksh, this test takes hours, literally.
2463    # So we just punt and use a minimum line length of 8192.
2464    lt_cv_sys_max_cmd_len=8192;
2465    ;;
2466
2467  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
2468    # This has been around since 386BSD, at least.  Likely further.
2469    if test -x /sbin/sysctl; then
2470      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
2471    elif test -x /usr/sbin/sysctl; then
2472      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2473    else
2474      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
2475    fi
2476    # And add a safety zone
2477    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2478    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2479    ;;
2480
2481  interix*)
2482    # We know the value 262144 and hardcode it with a safety zone (like BSD)
2483    lt_cv_sys_max_cmd_len=196608
2484    ;;
2485
2486  osf*)
2487    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
2488    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
2489    # nice to cause kernel panics so lets avoid the loop below.
2490    # First set a reasonable default.
2491    lt_cv_sys_max_cmd_len=16384
2492    #
2493    if test -x /sbin/sysconfig; then
2494      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
2495        *1*) lt_cv_sys_max_cmd_len=-1 ;;
2496      esac
2497    fi
2498    ;;
2499  sco3.2v5*)
2500    lt_cv_sys_max_cmd_len=102400
2501    ;;
2502  sysv5* | sco5v6* | sysv4.2uw2*)
2503    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
2504    if test -n "$kargmax"; then
2505      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
2506    else
2507      lt_cv_sys_max_cmd_len=32768
2508    fi
2509    ;;
2510  *)
2511    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
2512    if test -n "$lt_cv_sys_max_cmd_len"; then
2513      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
2514      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
2515    else
2516      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
2517      while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
2518	       = "XX$teststring") >/dev/null 2>&1 &&
2519	      new_result=`expr "X$teststring" : ".*" 2>&1` &&
2520	      lt_cv_sys_max_cmd_len=$new_result &&
2521	      test $i != 17 # 1/2 MB should be enough
2522      do
2523        i=`expr $i + 1`
2524        teststring=$teststring$teststring
2525      done
2526      teststring=
2527      # Add a significant safety factor because C++ compilers can tack on massive
2528      # amounts of additional arguments before passing them to the linker.
2529      # It appears as though 1/2 is a usable value.
2530      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
2531    fi
2532    ;;
2533  esac
2534])
2535if test -n $lt_cv_sys_max_cmd_len ; then
2536  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
2537else
2538  AC_MSG_RESULT(none)
2539fi
2540])# AC_LIBTOOL_SYS_MAX_CMD_LEN
2541
2542
2543# _LT_AC_CHECK_DLFCN
2544# ------------------
2545AC_DEFUN([_LT_AC_CHECK_DLFCN],
2546[AC_CHECK_HEADERS(dlfcn.h)dnl
2547])# _LT_AC_CHECK_DLFCN
2548
2549
2550# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
2551#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
2552# ---------------------------------------------------------------------
2553AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
2554[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
2555if test "$cross_compiling" = yes; then :
2556  [$4]
2557else
2558  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
2559  lt_status=$lt_dlunknown
2560  cat > conftest.$ac_ext <<EOF
2561[#line __oline__ "configure"
2562#include "confdefs.h"
2563
2564#if HAVE_DLFCN_H
2565#include <dlfcn.h>
2566#endif
2567
2568#include <stdio.h>
2569
2570#ifdef RTLD_GLOBAL
2571#  define LT_DLGLOBAL		RTLD_GLOBAL
2572#else
2573#  ifdef DL_GLOBAL
2574#    define LT_DLGLOBAL		DL_GLOBAL
2575#  else
2576#    define LT_DLGLOBAL		0
2577#  endif
2578#endif
2579
2580/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
2581   find out it does not work in some platform. */
2582#ifndef LT_DLLAZY_OR_NOW
2583#  ifdef RTLD_LAZY
2584#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
2585#  else
2586#    ifdef DL_LAZY
2587#      define LT_DLLAZY_OR_NOW		DL_LAZY
2588#    else
2589#      ifdef RTLD_NOW
2590#        define LT_DLLAZY_OR_NOW	RTLD_NOW
2591#      else
2592#        ifdef DL_NOW
2593#          define LT_DLLAZY_OR_NOW	DL_NOW
2594#        else
2595#          define LT_DLLAZY_OR_NOW	0
2596#        endif
2597#      endif
2598#    endif
2599#  endif
2600#endif
2601
2602#ifdef __cplusplus
2603extern "C" void exit (int);
2604#endif
2605
2606void fnord() { int i=42;}
2607int main ()
2608{
2609  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
2610  int status = $lt_dlunknown;
2611
2612  if (self)
2613    {
2614      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
2615      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
2616      /* dlclose (self); */
2617    }
2618  else
2619    puts (dlerror ());
2620
2621    exit (status);
2622}]
2623EOF
2624  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
2625    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
2626    lt_status=$?
2627    case x$lt_status in
2628      x$lt_dlno_uscore) $1 ;;
2629      x$lt_dlneed_uscore) $2 ;;
2630      x$lt_dlunknown|x*) $3 ;;
2631    esac
2632  else :
2633    # compilation failed
2634    $3
2635  fi
2636fi
2637rm -fr conftest*
2638])# _LT_AC_TRY_DLOPEN_SELF
2639
2640
2641# AC_LIBTOOL_DLOPEN_SELF
2642# ----------------------
2643AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
2644[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
2645if test "x$enable_dlopen" != xyes; then
2646  enable_dlopen=unknown
2647  enable_dlopen_self=unknown
2648  enable_dlopen_self_static=unknown
2649else
2650  lt_cv_dlopen=no
2651  lt_cv_dlopen_libs=
2652
2653  case $host_os in
2654  beos*)
2655    lt_cv_dlopen="load_add_on"
2656    lt_cv_dlopen_libs=
2657    lt_cv_dlopen_self=yes
2658    ;;
2659
2660  mingw* | pw32*)
2661    lt_cv_dlopen="LoadLibrary"
2662    lt_cv_dlopen_libs=
2663   ;;
2664
2665  cygwin*)
2666    lt_cv_dlopen="dlopen"
2667    lt_cv_dlopen_libs=
2668   ;;
2669
2670  darwin*)
2671  # if libdl is installed we need to link against it
2672    AC_CHECK_LIB([dl], [dlopen],
2673		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
2674    lt_cv_dlopen="dyld"
2675    lt_cv_dlopen_libs=
2676    lt_cv_dlopen_self=yes
2677    ])
2678   ;;
2679
2680  *)
2681    AC_CHECK_FUNC([shl_load],
2682	  [lt_cv_dlopen="shl_load"],
2683      [AC_CHECK_LIB([dld], [shl_load],
2684	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
2685	[AC_CHECK_FUNC([dlopen],
2686	      [lt_cv_dlopen="dlopen"],
2687	  [AC_CHECK_LIB([dl], [dlopen],
2688		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
2689	    [AC_CHECK_LIB([svld], [dlopen],
2690		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
2691	      [AC_CHECK_LIB([dld], [dld_link],
2692		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
2693	      ])
2694	    ])
2695	  ])
2696	])
2697      ])
2698    ;;
2699  esac
2700
2701  if test "x$lt_cv_dlopen" != xno; then
2702    enable_dlopen=yes
2703  else
2704    enable_dlopen=no
2705  fi
2706
2707  case $lt_cv_dlopen in
2708  dlopen)
2709    save_CPPFLAGS="$CPPFLAGS"
2710    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
2711
2712    save_LDFLAGS="$LDFLAGS"
2713    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
2714
2715    save_LIBS="$LIBS"
2716    LIBS="$lt_cv_dlopen_libs $LIBS"
2717
2718    AC_CACHE_CHECK([whether a program can dlopen itself],
2719	  lt_cv_dlopen_self, [dnl
2720	  _LT_AC_TRY_DLOPEN_SELF(
2721	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
2722	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
2723    ])
2724
2725    if test "x$lt_cv_dlopen_self" = xyes; then
2726      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
2727      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
2728    	  lt_cv_dlopen_self_static, [dnl
2729	  _LT_AC_TRY_DLOPEN_SELF(
2730	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
2731	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
2732      ])
2733    fi
2734
2735    CPPFLAGS="$save_CPPFLAGS"
2736    LDFLAGS="$save_LDFLAGS"
2737    LIBS="$save_LIBS"
2738    ;;
2739  esac
2740
2741  case $lt_cv_dlopen_self in
2742  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
2743  *) enable_dlopen_self=unknown ;;
2744  esac
2745
2746  case $lt_cv_dlopen_self_static in
2747  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
2748  *) enable_dlopen_self_static=unknown ;;
2749  esac
2750fi
2751])# AC_LIBTOOL_DLOPEN_SELF
2752
2753
2754# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
2755# ---------------------------------
2756# Check to see if options -c and -o are simultaneously supported by compiler
2757AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
2758[AC_REQUIRE([LT_AC_PROG_SED])dnl
2759AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
2760AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
2761  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
2762  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
2763   $rm -r conftest 2>/dev/null
2764   mkdir conftest
2765   cd conftest
2766   mkdir out
2767   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
2768
2769   lt_compiler_flag="-o out/conftest2.$ac_objext"
2770   # Insert the option either (1) after the last *FLAGS variable, or
2771   # (2) before a word containing "conftest.", or (3) at the end.
2772   # Note that $ac_compile itself does not contain backslashes and begins
2773   # with a dollar sign (not a hyphen), so the echo should work correctly.
2774   lt_compile=`echo "$ac_compile" | $SED \
2775   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
2776   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
2777   -e 's:$: $lt_compiler_flag:'`
2778   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
2779   (eval "$lt_compile" 2>out/conftest.err)
2780   ac_status=$?
2781   cat out/conftest.err >&AS_MESSAGE_LOG_FD
2782   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
2783   if (exit $ac_status) && test -s out/conftest2.$ac_objext
2784   then
2785     # The compiler can only warn and ignore the option if not recognized
2786     # So say no if there are warnings
2787     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
2788     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
2789     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
2790       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
2791     fi
2792   fi
2793   chmod u+w . 2>&AS_MESSAGE_LOG_FD
2794   $rm conftest*
2795   # SGI C++ compiler will create directory out/ii_files/ for
2796   # template instantiation
2797   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
2798   $rm out/* && rmdir out
2799   cd ..
2800   rmdir conftest
2801   $rm conftest*
2802])
2803])# AC_LIBTOOL_PROG_CC_C_O
2804
2805
2806# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
2807# -----------------------------------------
2808# Check to see if we can do hard links to lock some files if needed
2809AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
2810[AC_REQUIRE([_LT_AC_LOCK])dnl
2811
2812hard_links="nottested"
2813if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
2814  # do not overwrite the value of need_locks provided by the user
2815  AC_MSG_CHECKING([if we can lock with hard links])
2816  hard_links=yes
2817  $rm conftest*
2818  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2819  touch conftest.a
2820  ln conftest.a conftest.b 2>&5 || hard_links=no
2821  ln conftest.a conftest.b 2>/dev/null && hard_links=no
2822  AC_MSG_RESULT([$hard_links])
2823  if test "$hard_links" = no; then
2824    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
2825    need_locks=warn
2826  fi
2827else
2828  need_locks=no
2829fi
2830])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
2831
2832
2833# AC_LIBTOOL_OBJDIR
2834# -----------------
2835AC_DEFUN([AC_LIBTOOL_OBJDIR],
2836[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
2837[rm -f .libs 2>/dev/null
2838mkdir .libs 2>/dev/null
2839if test -d .libs; then
2840  lt_cv_objdir=.libs
2841else
2842  # MS-DOS does not allow filenames that begin with a dot.
2843  lt_cv_objdir=_libs
2844fi
2845rmdir .libs 2>/dev/null])
2846objdir=$lt_cv_objdir
2847])# AC_LIBTOOL_OBJDIR
2848
2849
2850# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
2851# ----------------------------------------------
2852# Check hardcoding attributes.
2853AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
2854[AC_MSG_CHECKING([how to hardcode library paths into programs])
2855_LT_AC_TAGVAR(hardcode_action, $1)=
2856if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
2857   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
2858   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
2859
2860  # We can hardcode non-existant directories.
2861  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
2862     # If the only mechanism to avoid hardcoding is shlibpath_var, we
2863     # have to relink, otherwise we might link with an installed library
2864     # when we should be linking with a yet-to-be-installed one
2865     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
2866     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
2867    # Linking always hardcodes the temporary library directory.
2868    _LT_AC_TAGVAR(hardcode_action, $1)=relink
2869  else
2870    # We can link without hardcoding, and we can hardcode nonexisting dirs.
2871    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
2872  fi
2873else
2874  # We cannot hardcode anything, or else we can only hardcode existing
2875  # directories.
2876  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
2877fi
2878AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
2879
2880if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
2881  # Fast installation is not supported
2882  enable_fast_install=no
2883elif test "$shlibpath_overrides_runpath" = yes ||
2884     test "$enable_shared" = no; then
2885  # Fast installation is not necessary
2886  enable_fast_install=needless
2887fi
2888])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
2889
2890
2891# AC_LIBTOOL_SYS_LIB_STRIP
2892# ------------------------
2893AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
2894[striplib=
2895old_striplib=
2896AC_MSG_CHECKING([whether stripping libraries is possible])
2897if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2898  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2899  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2900  AC_MSG_RESULT([yes])
2901else
2902# FIXME - insert some real tests, host_os isn't really good enough
2903  case $host_os in
2904   darwin*)
2905       if test -n "$STRIP" ; then
2906         striplib="$STRIP -x"
2907         old_striplib="$STRIP -S"
2908         AC_MSG_RESULT([yes])
2909       else
2910  AC_MSG_RESULT([no])
2911fi
2912       ;;
2913   *)
2914  AC_MSG_RESULT([no])
2915    ;;
2916  esac
2917fi
2918])# AC_LIBTOOL_SYS_LIB_STRIP
2919
2920
2921# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2922# -----------------------------
2923# PORTME Fill in your ld.so characteristics
2924AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
2925[AC_REQUIRE([LT_AC_PROG_SED])dnl
2926AC_MSG_CHECKING([dynamic linker characteristics])
2927library_names_spec=
2928libname_spec='lib$name'
2929soname_spec=
2930shrext_cmds=".so"
2931postinstall_cmds=
2932postuninstall_cmds=
2933finish_cmds=
2934finish_eval=
2935shlibpath_var=
2936shlibpath_overrides_runpath=unknown
2937version_type=none
2938dynamic_linker="$host_os ld.so"
2939sys_lib_dlsearch_path_spec="/lib /usr/lib"
2940m4_if($1,[],[
2941if test "$GCC" = yes; then
2942  case $host_os in
2943    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
2944    *) lt_awk_arg="/^libraries:/" ;;
2945  esac
2946  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2947  if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
2948    # if the path contains ";" then we assume it to be the separator
2949    # otherwise default to the standard path separator (i.e. ":") - it is
2950    # assumed that no part of a normal pathname contains ";" but that should
2951    # okay in the real world where ";" in dirpaths is itself problematic.
2952    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
2953  else
2954    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2955  fi
2956  # Ok, now we have the path, separated by spaces, we can step through it
2957  # and add multilib dir if necessary.
2958  lt_tmp_lt_search_path_spec=
2959  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
2960  for lt_sys_path in $lt_search_path_spec; do
2961    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
2962      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
2963    else
2964      test -d "$lt_sys_path" && \
2965	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
2966    fi
2967  done
2968  lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
2969BEGIN {RS=" "; FS="/|\n";} {
2970  lt_foo="";
2971  lt_count=0;
2972  for (lt_i = NF; lt_i > 0; lt_i--) {
2973    if ($lt_i != "" && $lt_i != ".") {
2974      if ($lt_i == "..") {
2975        lt_count++;
2976      } else {
2977        if (lt_count == 0) {
2978          lt_foo="/" $lt_i lt_foo;
2979        } else {
2980          lt_count--;
2981        }
2982      }
2983    }
2984  }
2985  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
2986  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
2987}'`
2988  sys_lib_search_path_spec=`echo $lt_search_path_spec`
2989else
2990  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2991fi])
2992need_lib_prefix=unknown
2993hardcode_into_libs=no
2994
2995# when you set need_version to no, make sure it does not cause -set_version
2996# flags to be left without arguments
2997need_version=unknown
2998
2999case $host_os in
3000aix3*)
3001  version_type=linux
3002  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
3003  shlibpath_var=LIBPATH
3004
3005  # AIX 3 has no versioning support, so we append a major version to the name.
3006  soname_spec='${libname}${release}${shared_ext}$major'
3007  ;;
3008
3009aix[[4-9]]*)
3010  version_type=linux
3011  need_lib_prefix=no
3012  need_version=no
3013  hardcode_into_libs=yes
3014  if test "$host_cpu" = ia64; then
3015    # AIX 5 supports IA64
3016    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
3017    shlibpath_var=LD_LIBRARY_PATH
3018  else
3019    # With GCC up to 2.95.x, collect2 would create an import file
3020    # for dependence libraries.  The import file would start with
3021    # the line `#! .'.  This would cause the generated library to
3022    # depend on `.', always an invalid library.  This was fixed in
3023    # development snapshots of GCC prior to 3.0.
3024    case $host_os in
3025      aix4 | aix4.[[01]] | aix4.[[01]].*)
3026      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
3027	   echo ' yes '
3028	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
3029	:
3030      else
3031	can_build_shared=no
3032      fi
3033      ;;
3034    esac
3035    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
3036    # soname into executable. Probably we can add versioning support to
3037    # collect2, so additional links can be useful in future.
3038    if test "$aix_use_runtimelinking" = yes; then
3039      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
3040      # instead of lib<name>.a to let people know that these are not
3041      # typical AIX shared libraries.
3042      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3043    else
3044      # We preserve .a as extension for shared libraries through AIX4.2
3045      # and later when we are not doing run time linking.
3046      library_names_spec='${libname}${release}.a $libname.a'
3047      soname_spec='${libname}${release}${shared_ext}$major'
3048    fi
3049    shlibpath_var=LIBPATH
3050  fi
3051  ;;
3052
3053amigaos*)
3054  library_names_spec='$libname.ixlibrary $libname.a'
3055  # Create ${libname}_ixlibrary.a entries in /sys/libs.
3056  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
3057  ;;
3058
3059beos*)
3060  library_names_spec='${libname}${shared_ext}'
3061  dynamic_linker="$host_os ld.so"
3062  shlibpath_var=LIBRARY_PATH
3063  ;;
3064
3065bsdi[[45]]*)
3066  version_type=linux
3067  need_version=no
3068  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3069  soname_spec='${libname}${release}${shared_ext}$major'
3070  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
3071  shlibpath_var=LD_LIBRARY_PATH
3072  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
3073  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
3074  # the default ld.so.conf also contains /usr/contrib/lib and
3075  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
3076  # libtool to hard-code these into programs
3077  ;;
3078
3079cygwin* | mingw* | pw32*)
3080  version_type=windows
3081  shrext_cmds=".dll"
3082  need_version=no
3083  need_lib_prefix=no
3084
3085  case $GCC,$host_os in
3086  yes,cygwin* | yes,mingw* | yes,pw32*)
3087    library_names_spec='$libname.dll.a'
3088    # DLL is installed to $(libdir)/../bin by postinstall_cmds
3089    postinstall_cmds='base_file=`basename \${file}`~
3090      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
3091      dldir=$destdir/`dirname \$dlpath`~
3092      test -d \$dldir || mkdir -p \$dldir~
3093      $install_prog $dir/$dlname \$dldir/$dlname~
3094      chmod a+x \$dldir/$dlname'
3095    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
3096      dlpath=$dir/\$dldll~
3097       $rm \$dlpath'
3098    shlibpath_overrides_runpath=yes
3099
3100    case $host_os in
3101    cygwin*)
3102      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
3103      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3104      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
3105      ;;
3106    mingw*)
3107      # MinGW DLLs use traditional 'lib' prefix
3108      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3109      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
3110      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
3111        # It is most probably a Windows format PATH printed by
3112        # mingw gcc, but we are running on Cygwin. Gcc prints its search
3113        # path with ; separators, and with drive letters. We can handle the
3114        # drive letters (cygwin fileutils understands them), so leave them,
3115        # especially as we might pass files found there to a mingw objdump,
3116        # which wouldn't understand a cygwinified path. Ahh.
3117        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
3118      else
3119        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
3120      fi
3121      ;;
3122    pw32*)
3123      # pw32 DLLs use 'pw' prefix rather than 'lib'
3124      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
3125      ;;
3126    esac
3127    ;;
3128
3129  *)
3130    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
3131    ;;
3132  esac
3133  dynamic_linker='Win32 ld.exe'
3134  # FIXME: first we should search . and the directory the executable is in
3135  shlibpath_var=PATH
3136  ;;
3137
3138darwin* | rhapsody*)
3139  dynamic_linker="$host_os dyld"
3140  version_type=darwin
3141  need_lib_prefix=no
3142  need_version=no
3143  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
3144  soname_spec='${libname}${release}${major}$shared_ext'
3145  shlibpath_overrides_runpath=yes
3146  shlibpath_var=DYLD_LIBRARY_PATH
3147  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
3148  m4_if([$1], [],[
3149  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 
3150  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
3151  ;;
3152
3153dgux*)
3154  version_type=linux
3155  need_lib_prefix=no
3156  need_version=no
3157  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
3158  soname_spec='${libname}${release}${shared_ext}$major'
3159  shlibpath_var=LD_LIBRARY_PATH
3160  ;;
3161
3162freebsd1*)
3163  dynamic_linker=no
3164  ;;
3165
3166freebsd* | dragonfly*)
3167  # DragonFly does not have aout.  When/if they implement a new
3168  # versioning mechanism, adjust this.
3169  if test -x /usr/bin/objformat; then
3170    objformat=`/usr/bin/objformat`
3171  else
3172    case $host_os in
3173    freebsd[[123]]*) objformat=aout ;;
3174    *) objformat=elf ;;
3175    esac
3176  fi
3177  version_type=freebsd-$objformat
3178  case $version_type in
3179    freebsd-elf*)
3180      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3181      need_version=no
3182      need_lib_prefix=no
3183      ;;
3184    freebsd-*)
3185      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
3186      need_version=yes
3187      ;;
3188  esac
3189  shlibpath_var=LD_LIBRARY_PATH
3190  case $host_os in
3191  freebsd2*)
3192    shlibpath_overrides_runpath=yes
3193    ;;
3194  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
3195    shlibpath_overrides_runpath=yes
3196    hardcode_into_libs=yes
3197    ;;
3198  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
3199  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
3200    shlibpath_overrides_runpath=no
3201    hardcode_into_libs=yes
3202    ;;
3203  *) # from 4.6 on, and DragonFly
3204    shlibpath_overrides_runpath=yes
3205    hardcode_into_libs=yes
3206    ;;
3207  esac
3208  ;;
3209
3210gnu*)
3211  version_type=linux
3212  need_lib_prefix=no
3213  need_version=no
3214  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
3215  soname_spec='${libname}${release}${shared_ext}$major'
3216  shlibpath_var=LD_LIBRARY_PATH
3217  hardcode_into_libs=yes
3218  ;;
3219
3220hpux9* | hpux10* | hpux11*)
3221  # Give a soname corresponding to the major version so that dld.sl refuses to
3222  # link against other versions.
3223  version_type=sunos
3224  need_lib_prefix=no
3225  need_version=no
3226  case $host_cpu in
3227  ia64*)
3228    shrext_cmds='.so'
3229    hardcode_into_libs=yes
3230    dynamic_linker="$host_os dld.so"
3231    shlibpath_var=LD_LIBRARY_PATH
3232    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3233    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3234    soname_spec='${libname}${release}${shared_ext}$major'
3235    if test "X$HPUX_IA64_MODE" = X32; then
3236      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
3237    else
3238      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
3239    fi
3240    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3241    ;;
3242   hppa*64*)
3243     shrext_cmds='.sl'
3244     hardcode_into_libs=yes
3245     dynamic_linker="$host_os dld.sl"
3246     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
3247     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
3248     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3249     soname_spec='${libname}${release}${shared_ext}$major'
3250     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
3251     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
3252     ;;
3253   *)
3254    shrext_cmds='.sl'
3255    dynamic_linker="$host_os dld.sl"
3256    shlibpath_var=SHLIB_PATH
3257    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
3258    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3259    soname_spec='${libname}${release}${shared_ext}$major'
3260    ;;
3261  esac
3262  # HP-UX runs *really* slowly unless shared libraries are mode 555.
3263  postinstall_cmds='chmod 555 $lib'
3264  ;;
3265
3266interix[[3-9]]*)
3267  version_type=linux
3268  need_lib_prefix=no
3269  need_version=no
3270  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3271  soname_spec='${libname}${release}${shared_ext}$major'
3272  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
3273  shlibpath_var=LD_LIBRARY_PATH
3274  shlibpath_overrides_runpath=no
3275  hardcode_into_libs=yes
3276  ;;
3277
3278irix5* | irix6* | nonstopux*)
3279  case $host_os in
3280    nonstopux*) version_type=nonstopux ;;
3281    *)
3282	if test "$lt_cv_prog_gnu_ld" = yes; then
3283		version_type=linux
3284	else
3285		version_type=irix
3286	fi ;;
3287  esac
3288  need_lib_prefix=no
3289  need_version=no
3290  soname_spec='${libname}${release}${shared_ext}$major'
3291  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
3292  case $host_os in
3293  irix5* | nonstopux*)
3294    libsuff= shlibsuff=
3295    ;;
3296  *)
3297    case $LD in # libtool.m4 will add one of these switches to LD
3298    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
3299      libsuff= shlibsuff= libmagic=32-bit;;
3300    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
3301      libsuff=32 shlibsuff=N32 libmagic=N32;;
3302    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
3303      libsuff=64 shlibsuff=64 libmagic=64-bit;;
3304    *) libsuff= shlibsuff= libmagic=never-match;;
3305    esac
3306    ;;
3307  esac
3308  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
3309  shlibpath_overrides_runpath=no
3310  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
3311  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
3312  hardcode_into_libs=yes
3313  ;;
3314
3315# No shared lib support for Linux oldld, aout, or coff.
3316linux*oldld* | linux*aout* | linux*coff*)
3317  dynamic_linker=no
3318  ;;
3319
3320# This must be Linux ELF.
3321linux* | k*bsd*-gnu)
3322  version_type=linux
3323  need_lib_prefix=no
3324  need_version=no
3325  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3326  soname_spec='${libname}${release}${shared_ext}$major'
3327  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
3328  shlibpath_var=LD_LIBRARY_PATH
3329  shlibpath_overrides_runpath=no
3330  # This implies no fast_install, which is unacceptable.
3331  # Some rework will be needed to allow for fast_install
3332  # before this can be enabled.
3333  hardcode_into_libs=yes
3334
3335  # Append ld.so.conf contents to the search path
3336  if test -f /etc/ld.so.conf; then
3337    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ 	]*hwcap[ 	]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
3338    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
3339  fi
3340
3341  # We used to test for /lib/ld.so.1 and disable shared libraries on
3342  # powerpc, because MkLinux only supported shared libraries with the
3343  # GNU dynamic linker.  Since this was broken with cross compilers,
3344  # most powerpc-linux boxes support dynamic linking these days and
3345  # people can always --disable-shared, the test was removed, and we
3346  # assume the GNU/Linux dynamic linker is in use.
3347  dynamic_linker='GNU/Linux ld.so'
3348  ;;
3349
3350netbsd*)
3351  version_type=sunos
3352  need_lib_prefix=no
3353  need_version=no
3354  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3355    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3356    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3357    dynamic_linker='NetBSD (a.out) ld.so'
3358  else
3359    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
3360    soname_spec='${libname}${release}${shared_ext}$major'
3361    dynamic_linker='NetBSD ld.elf_so'
3362  fi
3363  shlibpath_var=LD_LIBRARY_PATH
3364  shlibpath_overrides_runpath=yes
3365  hardcode_into_libs=yes
3366  ;;
3367
3368newsos6)
3369  version_type=linux
3370  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3371  shlibpath_var=LD_LIBRARY_PATH
3372  shlibpath_overrides_runpath=yes
3373  ;;
3374
3375nto-qnx*)
3376  version_type=linux
3377  need_lib_prefix=no
3378  need_version=no
3379  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3380  soname_spec='${libname}${release}${shared_ext}$major'
3381  shlibpath_var=LD_LIBRARY_PATH
3382  shlibpath_overrides_runpath=yes
3383  ;;
3384
3385openbsd*)
3386  version_type=sunos
3387  sys_lib_dlsearch_path_spec="/usr/lib"
3388  need_lib_prefix=no
3389  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3390  case $host_os in
3391    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
3392    *)                         need_version=no  ;;
3393  esac
3394  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3395  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3396  shlibpath_var=LD_LIBRARY_PATH
3397  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3398    case $host_os in
3399      openbsd2.[[89]] | openbsd2.[[89]].*)
3400	shlibpath_overrides_runpath=no
3401	;;
3402      *)
3403	shlibpath_overrides_runpath=yes
3404	;;
3405      esac
3406  else
3407    shlibpath_overrides_runpath=yes
3408  fi
3409  ;;
3410
3411os2*)
3412  libname_spec='$name'
3413  shrext_cmds=".dll"
3414  need_lib_prefix=no
3415  library_names_spec='$libname${shared_ext} $libname.a'
3416  dynamic_linker='OS/2 ld.exe'
3417  shlibpath_var=LIBPATH
3418  ;;
3419
3420osf3* | osf4* | osf5*)
3421  version_type=osf
3422  need_lib_prefix=no
3423  need_version=no
3424  soname_spec='${libname}${release}${shared_ext}$major'
3425  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3426  shlibpath_var=LD_LIBRARY_PATH
3427  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3428  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3429  ;;
3430
3431rdos*)
3432  dynamic_linker=no
3433  ;;
3434
3435solaris*)
3436  version_type=linux
3437  need_lib_prefix=no
3438  need_version=no
3439  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3440  soname_spec='${libname}${release}${shared_ext}$major'
3441  shlibpath_var=LD_LIBRARY_PATH
3442  shlibpath_overrides_runpath=yes
3443  hardcode_into_libs=yes
3444  # ldd complains unless libraries are executable
3445  postinstall_cmds='chmod +x $lib'
3446  ;;
3447
3448sunos4*)
3449  version_type=sunos
3450  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
3451  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3452  shlibpath_var=LD_LIBRARY_PATH
3453  shlibpath_overrides_runpath=yes
3454  if test "$with_gnu_ld" = yes; then
3455    need_lib_prefix=no
3456  fi
3457  need_version=yes
3458  ;;
3459
3460sysv4 | sysv4.3*)
3461  version_type=linux
3462  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3463  soname_spec='${libname}${release}${shared_ext}$major'
3464  shlibpath_var=LD_LIBRARY_PATH
3465  case $host_vendor in
3466    sni)
3467      shlibpath_overrides_runpath=no
3468      need_lib_prefix=no
3469      export_dynamic_flag_spec='${wl}-Blargedynsym'
3470      runpath_var=LD_RUN_PATH
3471      ;;
3472    siemens)
3473      need_lib_prefix=no
3474      ;;
3475    motorola)
3476      need_lib_prefix=no
3477      need_version=no
3478      shlibpath_overrides_runpath=no
3479      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3480      ;;
3481  esac
3482  ;;
3483
3484sysv4*MP*)
3485  if test -d /usr/nec ;then
3486    version_type=linux
3487    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
3488    soname_spec='$libname${shared_ext}.$major'
3489    shlibpath_var=LD_LIBRARY_PATH
3490  fi
3491  ;;
3492
3493sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
3494  version_type=freebsd-elf
3495  need_lib_prefix=no
3496  need_version=no
3497  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
3498  soname_spec='${libname}${release}${shared_ext}$major'
3499  shlibpath_var=LD_LIBRARY_PATH
3500  hardcode_into_libs=yes
3501  if test "$with_gnu_ld" = yes; then
3502    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
3503    shlibpath_overrides_runpath=no
3504  else
3505    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
3506    shlibpath_overrides_runpath=yes
3507    case $host_os in
3508      sco3.2v5*)
3509        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
3510	;;
3511    esac
3512  fi
3513  sys_lib_dlsearch_path_spec='/usr/lib'
3514  ;;
3515
3516uts4*)
3517  version_type=linux
3518  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
3519  soname_spec='${libname}${release}${shared_ext}$major'
3520  shlibpath_var=LD_LIBRARY_PATH
3521  ;;
3522
3523*)
3524  dynamic_linker=no
3525  ;;
3526esac
3527AC_MSG_RESULT([$dynamic_linker])
3528test "$dynamic_linker" = no && can_build_shared=no
3529
3530AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
3531[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
3532sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
3533AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
3534[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
3535sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
3536
3537variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3538if test "$GCC" = yes; then
3539  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3540fi
3541])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
3542
3543
3544# _LT_AC_TAGCONFIG
3545# ----------------
3546AC_DEFUN([_LT_AC_TAGCONFIG],
3547[AC_REQUIRE([LT_AC_PROG_SED])dnl
3548AC_ARG_WITH([tags],
3549    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
3550        [include additional configurations @<:@automatic@:>@])],
3551    [tagnames="$withval"])
3552
3553if test -f "$ltmain" && test -n "$tagnames"; then
3554  if test ! -f "${ofile}"; then
3555    AC_MSG_WARN([output file `$ofile' does not exist])
3556  fi
3557
3558  if test -z "$LTCC"; then
3559    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
3560    if test -z "$LTCC"; then
3561      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
3562    else
3563      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
3564    fi
3565  fi
3566  if test -z "$LTCFLAGS"; then
3567    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
3568  fi
3569
3570  # Extract list of available tagged configurations in $ofile.
3571  # Note that this assumes the entire list is on one line.
3572  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
3573
3574  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3575  for tagname in $tagnames; do
3576    IFS="$lt_save_ifs"
3577    # Check whether tagname contains only valid characters
3578    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
3579    "") ;;
3580    *)  AC_MSG_ERROR([invalid tag name: $tagname])
3581	;;
3582    esac
3583
3584    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
3585    then
3586      AC_MSG_ERROR([tag name \"$tagname\" already exists])
3587    fi
3588
3589    # Update the list of available tags.
3590    if test -n "$tagname"; then
3591      echo appending configuration tag \"$tagname\" to $ofile
3592
3593      case $tagname in
3594      CXX)
3595	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
3596	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
3597	    (test "X$CXX" != "Xg++"))) ; then
3598	  AC_LIBTOOL_LANG_CXX_CONFIG
3599	else
3600	  tagname=""
3601	fi
3602	;;
3603
3604      F77)
3605	if test -n "$F77" && test "X$F77" != "Xno"; then
3606	  AC_LIBTOOL_LANG_F77_CONFIG
3607	else
3608	  tagname=""
3609	fi
3610	;;
3611
3612      GCJ)
3613	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
3614	  AC_LIBTOOL_LANG_GCJ_CONFIG
3615	else
3616	  tagname=""
3617	fi
3618	;;
3619
3620      RC)
3621	AC_LIBTOOL_LANG_RC_CONFIG
3622	;;
3623
3624      *)
3625	AC_MSG_ERROR([Unsupported tag name: $tagname])
3626	;;
3627      esac
3628
3629      # Append the new tag name to the list of available tags.
3630      if test -n "$tagname" ; then
3631      available_tags="$available_tags $tagname"
3632    fi
3633    fi
3634  done
3635  IFS="$lt_save_ifs"
3636
3637  # Now substitute the updated list of available tags.
3638  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
3639    mv "${ofile}T" "$ofile"
3640    chmod +x "$ofile"
3641  else
3642    rm -f "${ofile}T"
3643    AC_MSG_ERROR([unable to update list of available tagged configurations.])
3644  fi
3645fi
3646])# _LT_AC_TAGCONFIG
3647
3648
3649# AC_LIBTOOL_DLOPEN
3650# -----------------
3651# enable checks for dlopen support
3652AC_DEFUN([AC_LIBTOOL_DLOPEN],
3653 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
3654])# AC_LIBTOOL_DLOPEN
3655
3656
3657# AC_LIBTOOL_WIN32_DLL
3658# --------------------
3659# declare package support for building win32 DLLs
3660AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
3661[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
3662])# AC_LIBTOOL_WIN32_DLL
3663
3664
3665# AC_ENABLE_SHARED([DEFAULT])
3666# ---------------------------
3667# implement the --enable-shared flag
3668# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
3669AC_DEFUN([AC_ENABLE_SHARED],
3670[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3671AC_ARG_ENABLE([shared],
3672    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
3673	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
3674    [p=${PACKAGE-default}
3675    case $enableval in
3676    yes) enable_shared=yes ;;
3677    no) enable_shared=no ;;
3678    *)
3679      enable_shared=no
3680      # Look at the argument we got.  We use all the common list separators.
3681      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3682      for pkg in $enableval; do
3683	IFS="$lt_save_ifs"
3684	if test "X$pkg" = "X$p"; then
3685	  enable_shared=yes
3686	fi
3687      done
3688      IFS="$lt_save_ifs"
3689      ;;
3690    esac],
3691    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
3692])# AC_ENABLE_SHARED
3693
3694
3695# AC_DISABLE_SHARED
3696# -----------------
3697# set the default shared flag to --disable-shared
3698AC_DEFUN([AC_DISABLE_SHARED],
3699[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3700AC_ENABLE_SHARED(no)
3701])# AC_DISABLE_SHARED
3702
3703
3704# AC_ENABLE_STATIC([DEFAULT])
3705# ---------------------------
3706# implement the --enable-static flag
3707# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
3708AC_DEFUN([AC_ENABLE_STATIC],
3709[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3710AC_ARG_ENABLE([static],
3711    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
3712	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
3713    [p=${PACKAGE-default}
3714    case $enableval in
3715    yes) enable_static=yes ;;
3716    no) enable_static=no ;;
3717    *)
3718     enable_static=no
3719      # Look at the argument we got.  We use all the common list separators.
3720      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3721      for pkg in $enableval; do
3722	IFS="$lt_save_ifs"
3723	if test "X$pkg" = "X$p"; then
3724	  enable_static=yes
3725	fi
3726      done
3727      IFS="$lt_save_ifs"
3728      ;;
3729    esac],
3730    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
3731])# AC_ENABLE_STATIC
3732
3733
3734# AC_DISABLE_STATIC
3735# -----------------
3736# set the default static flag to --disable-static
3737AC_DEFUN([AC_DISABLE_STATIC],
3738[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3739AC_ENABLE_STATIC(no)
3740])# AC_DISABLE_STATIC
3741
3742
3743# AC_ENABLE_FAST_INSTALL([DEFAULT])
3744# ---------------------------------
3745# implement the --enable-fast-install flag
3746# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
3747AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3748[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3749AC_ARG_ENABLE([fast-install],
3750    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
3751    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
3752    [p=${PACKAGE-default}
3753    case $enableval in
3754    yes) enable_fast_install=yes ;;
3755    no) enable_fast_install=no ;;
3756    *)
3757      enable_fast_install=no
3758      # Look at the argument we got.  We use all the common list separators.
3759      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
3760      for pkg in $enableval; do
3761	IFS="$lt_save_ifs"
3762	if test "X$pkg" = "X$p"; then
3763	  enable_fast_install=yes
3764	fi
3765      done
3766      IFS="$lt_save_ifs"
3767      ;;
3768    esac],
3769    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
3770])# AC_ENABLE_FAST_INSTALL
3771
3772
3773# AC_DISABLE_FAST_INSTALL
3774# -----------------------
3775# set the default to --disable-fast-install
3776AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3777[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3778AC_ENABLE_FAST_INSTALL(no)
3779])# AC_DISABLE_FAST_INSTALL
3780
3781
3782# AC_LIBTOOL_PICMODE([MODE])
3783# --------------------------
3784# implement the --with-pic flag
3785# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
3786AC_DEFUN([AC_LIBTOOL_PICMODE],
3787[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3788pic_mode=ifelse($#,1,$1,default)
3789])# AC_LIBTOOL_PICMODE
3790
3791
3792# AC_PROG_EGREP
3793# -------------
3794# This is predefined starting with Autoconf 2.54, so this conditional
3795# definition can be removed once we require Autoconf 2.54 or later.
3796m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
3797[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
3798   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3799    then ac_cv_prog_egrep='grep -E'
3800    else ac_cv_prog_egrep='egrep'
3801    fi])
3802 EGREP=$ac_cv_prog_egrep
3803 AC_SUBST([EGREP])
3804])])
3805
3806
3807# AC_PATH_TOOL_PREFIX
3808# -------------------
3809# find a file program which can recognize shared library
3810AC_DEFUN([AC_PATH_TOOL_PREFIX],
3811[AC_REQUIRE([AC_PROG_EGREP])dnl
3812AC_MSG_CHECKING([for $1])
3813AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3814[case $MAGIC_CMD in
3815[[\\/*] |  ?:[\\/]*])
3816  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3817  ;;
3818*)
3819  lt_save_MAGIC_CMD="$MAGIC_CMD"
3820  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3821dnl $ac_dummy forces splitting on constant user-supplied paths.
3822dnl POSIX.2 word splitting is done only on the output of word expansions,
3823dnl not every word.  This closes a longstanding sh security hole.
3824  ac_dummy="ifelse([$2], , $PATH, [$2])"
3825  for ac_dir in $ac_dummy; do
3826    IFS="$lt_save_ifs"
3827    test -z "$ac_dir" && ac_dir=.
3828    if test -f $ac_dir/$1; then
3829      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3830      if test -n "$file_magic_test_file"; then
3831	case $deplibs_check_method in
3832	"file_magic "*)
3833	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
3834	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3835	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3836	    $EGREP "$file_magic_regex" > /dev/null; then
3837	    :
3838	  else
3839	    cat <<EOF 1>&2
3840
3841*** Warning: the command libtool uses to detect shared libraries,
3842*** $file_magic_cmd, produces output that libtool cannot recognize.
3843*** The result is that libtool may fail to recognize shared libraries
3844*** as such.  This will affect the creation of libtool libraries that
3845*** depend on shared libraries, but programs linked with such libtool
3846*** libraries will work regardless of this problem.  Nevertheless, you
3847*** may want to report the problem to your system manager and/or to
3848*** bug-libtool@gnu.org
3849
3850EOF
3851	  fi ;;
3852	esac
3853      fi
3854      break
3855    fi
3856  done
3857  IFS="$lt_save_ifs"
3858  MAGIC_CMD="$lt_save_MAGIC_CMD"
3859  ;;
3860esac])
3861MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3862if test -n "$MAGIC_CMD"; then
3863  AC_MSG_RESULT($MAGIC_CMD)
3864else
3865  AC_MSG_RESULT(no)
3866fi
3867])# AC_PATH_TOOL_PREFIX
3868
3869
3870# AC_PATH_MAGIC
3871# -------------
3872# find a file program which can recognize a shared library
3873AC_DEFUN([AC_PATH_MAGIC],
3874[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
3875if test -z "$lt_cv_path_MAGIC_CMD"; then
3876  if test -n "$ac_tool_prefix"; then
3877    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
3878  else
3879    MAGIC_CMD=:
3880  fi
3881fi
3882])# AC_PATH_MAGIC
3883
3884
3885# AC_PROG_LD
3886# ----------
3887# find the pathname to the GNU or non-GNU linker
3888AC_DEFUN([AC_PROG_LD],
3889[AC_ARG_WITH([gnu-ld],
3890    [AC_HELP_STRING([--with-gnu-ld],
3891	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
3892    [test "$withval" = no || with_gnu_ld=yes],
3893    [with_gnu_ld=no])
3894AC_REQUIRE([LT_AC_PROG_SED])dnl
3895AC_REQUIRE([AC_PROG_CC])dnl
3896AC_REQUIRE([AC_CANONICAL_HOST])dnl
3897AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3898ac_prog=ld
3899if test "$GCC" = yes; then
3900  # Check if gcc -print-prog-name=ld gives a path.
3901  AC_MSG_CHECKING([for ld used by $CC])
3902  case $host in
3903  *-*-mingw*)
3904    # gcc leaves a trailing carriage return which upsets mingw
3905    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3906  *)
3907    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3908  esac
3909  case $ac_prog in
3910    # Accept absolute paths.
3911    [[\\/]]* | ?:[[\\/]]*)
3912      re_direlt='/[[^/]][[^/]]*/\.\./'
3913      # Canonicalize the pathname of ld
3914      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
3915      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3916	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
3917      done
3918      test -z "$LD" && LD="$ac_prog"
3919      ;;
3920  "")
3921    # If it fails, then pretend we aren't using GCC.
3922    ac_prog=ld
3923    ;;
3924  *)
3925    # If it is relative, then search for the first ld in PATH.
3926    with_gnu_ld=unknown
3927    ;;
3928  esac
3929elif test "$with_gnu_ld" = yes; then
3930  AC_MSG_CHECKING([for GNU ld])
3931else
3932  AC_MSG_CHECKING([for non-GNU ld])
3933fi
3934AC_CACHE_VAL(lt_cv_path_LD,
3935[if test -z "$LD"; then
3936  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3937  for ac_dir in $PATH; do
3938    IFS="$lt_save_ifs"
3939    test -z "$ac_dir" && ac_dir=.
3940    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3941      lt_cv_path_LD="$ac_dir/$ac_prog"
3942      # Check to see if the program is GNU ld.  I'd rather use --version,
3943      # but apparently some variants of GNU ld only accept -v.
3944      # Break only if it was the GNU/non-GNU ld that we prefer.
3945      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
3946      *GNU* | *'with BFD'*)
3947	test "$with_gnu_ld" != no && break
3948	;;
3949      *)
3950	test "$with_gnu_ld" != yes && break
3951	;;
3952      esac
3953    fi
3954  done
3955  IFS="$lt_save_ifs"
3956else
3957  lt_cv_path_LD="$LD" # Let the user override the test with a path.
3958fi])
3959LD="$lt_cv_path_LD"
3960if test -n "$LD"; then
3961  AC_MSG_RESULT($LD)
3962else
3963  AC_MSG_RESULT(no)
3964fi
3965test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3966AC_PROG_LD_GNU
3967])# AC_PROG_LD
3968
3969
3970# AC_PROG_LD_GNU
3971# --------------
3972AC_DEFUN([AC_PROG_LD_GNU],
3973[AC_REQUIRE([AC_PROG_EGREP])dnl
3974AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3975[# I'd rather use --version here, but apparently some GNU lds only accept -v.
3976case `$LD -v 2>&1 </dev/null` in
3977*GNU* | *'with BFD'*)
3978  lt_cv_prog_gnu_ld=yes
3979  ;;
3980*)
3981  lt_cv_prog_gnu_ld=no
3982  ;;
3983esac])
3984with_gnu_ld=$lt_cv_prog_gnu_ld
3985])# AC_PROG_LD_GNU
3986
3987
3988# AC_PROG_LD_RELOAD_FLAG
3989# ----------------------
3990# find reload flag for linker
3991#   -- PORTME Some linkers may need a different reload flag.
3992AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3993[AC_CACHE_CHECK([for $LD option to reload object files],
3994  lt_cv_ld_reload_flag,
3995  [lt_cv_ld_reload_flag='-r'])
3996reload_flag=$lt_cv_ld_reload_flag
3997case $reload_flag in
3998"" | " "*) ;;
3999*) reload_flag=" $reload_flag" ;;
4000esac
4001reload_cmds='$LD$reload_flag -o $output$reload_objs'
4002case $host_os in
4003  darwin*)
4004    if test "$GCC" = yes; then
4005      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
4006    else
4007      reload_cmds='$LD$reload_flag -o $output$reload_objs'
4008    fi
4009    ;;
4010esac
4011])# AC_PROG_LD_RELOAD_FLAG
4012
4013
4014# AC_DEPLIBS_CHECK_METHOD
4015# -----------------------
4016# how to check for library dependencies
4017#  -- PORTME fill in with the dynamic library characteristics
4018AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
4019[AC_CACHE_CHECK([how to recognize dependent libraries],
4020lt_cv_deplibs_check_method,
4021[lt_cv_file_magic_cmd='$MAGIC_CMD'
4022lt_cv_file_magic_test_file=
4023lt_cv_deplibs_check_method='unknown'
4024# Need to set the preceding variable on all platforms that support
4025# interlibrary dependencies.
4026# 'none' -- dependencies not supported.
4027# `unknown' -- same as none, but documents that we really don't know.
4028# 'pass_all' -- all dependencies passed with no checks.
4029# 'test_compile' -- check by making test program.
4030# 'file_magic [[regex]]' -- check by looking for files in library path
4031# which responds to the $file_magic_cmd with a given extended regex.
4032# If you have `file' or equivalent on your system and you're not sure
4033# whether `pass_all' will *always* work, you probably want this one.
4034
4035case $host_os in
4036aix[[4-9]]*)
4037  lt_cv_deplibs_check_method=pass_all
4038  ;;
4039
4040beos*)
4041  lt_cv_deplibs_check_method=pass_all
4042  ;;
4043
4044bsdi[[45]]*)
4045  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4046  lt_cv_file_magic_cmd='/usr/bin/file -L'
4047  lt_cv_file_magic_test_file=/shlib/libc.so
4048  ;;
4049
4050cygwin*)
4051  # func_win32_libid is a shell function defined in ltmain.sh
4052  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4053  lt_cv_file_magic_cmd='func_win32_libid'
4054  ;;
4055
4056mingw* | pw32*)
4057  # Base MSYS/MinGW do not provide the 'file' command needed by
4058  # func_win32_libid shell function, so use a weaker test based on 'objdump',
4059  # unless we find 'file', for example because we are cross-compiling.
4060  if ( file / ) >/dev/null 2>&1; then
4061    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
4062    lt_cv_file_magic_cmd='func_win32_libid'
4063  else
4064    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4065    lt_cv_file_magic_cmd='$OBJDUMP -f'
4066  fi
4067  ;;
4068
4069darwin* | rhapsody*)
4070  lt_cv_deplibs_check_method=pass_all
4071  ;;
4072
4073freebsd* | dragonfly*)
4074  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4075    case $host_cpu in
4076    i*86 )
4077      # Not sure whether the presence of OpenBSD here was a mistake.
4078      # Let's accept both of them until this is cleared up.
4079      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
4080      lt_cv_file_magic_cmd=/usr/bin/file
4081      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4082      ;;
4083    esac
4084  else
4085    lt_cv_deplibs_check_method=pass_all
4086  fi
4087  ;;
4088
4089gnu*)
4090  lt_cv_deplibs_check_method=pass_all
4091  ;;
4092
4093hpux10.20* | hpux11*)
4094  lt_cv_file_magic_cmd=/usr/bin/file
4095  case $host_cpu in
4096  ia64*)
4097    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
4098    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
4099    ;;
4100  hppa*64*)
4101    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
4102    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
4103    ;;
4104  *)
4105    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4106    lt_cv_file_magic_test_file=/usr/lib/libc.sl
4107    ;;
4108  esac
4109  ;;
4110
4111interix[[3-9]]*)
4112  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
4113  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
4114  ;;
4115
4116irix5* | irix6* | nonstopux*)
4117  case $LD in
4118  *-32|*"-32 ") libmagic=32-bit;;
4119  *-n32|*"-n32 ") libmagic=N32;;
4120  *-64|*"-64 ") libmagic=64-bit;;
4121  *) libmagic=never-match;;
4122  esac
4123  lt_cv_deplibs_check_method=pass_all
4124  ;;
4125
4126# This must be Linux ELF.
4127linux* | k*bsd*-gnu)
4128  lt_cv_deplibs_check_method=pass_all
4129  ;;
4130
4131netbsd*)
4132  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4133    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4134  else
4135    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
4136  fi
4137  ;;
4138
4139newos6*)
4140  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4141  lt_cv_file_magic_cmd=/usr/bin/file
4142  lt_cv_file_magic_test_file=/usr/lib/libnls.so
4143  ;;
4144
4145nto-qnx*)
4146  lt_cv_deplibs_check_method=unknown
4147  ;;
4148
4149openbsd*)
4150  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4151    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
4152  else
4153    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
4154  fi
4155  ;;
4156
4157osf3* | osf4* | osf5*)
4158  lt_cv_deplibs_check_method=pass_all
4159  ;;
4160
4161rdos*)
4162  lt_cv_deplibs_check_method=pass_all
4163  ;;
4164
4165solaris*)
4166  lt_cv_deplibs_check_method=pass_all
4167  ;;
4168
4169sysv4 | sysv4.3*)
4170  case $host_vendor in
4171  motorola)
4172    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]]'
4173    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4174    ;;
4175  ncr)
4176    lt_cv_deplibs_check_method=pass_all
4177    ;;
4178  sequent)
4179    lt_cv_file_magic_cmd='/bin/file'
4180    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4181    ;;
4182  sni)
4183    lt_cv_file_magic_cmd='/bin/file'
4184    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4185    lt_cv_file_magic_test_file=/lib/libc.so
4186    ;;
4187  siemens)
4188    lt_cv_deplibs_check_method=pass_all
4189    ;;
4190  pc)
4191    lt_cv_deplibs_check_method=pass_all
4192    ;;
4193  esac
4194  ;;
4195
4196sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
4197  lt_cv_deplibs_check_method=pass_all
4198  ;;
4199esac
4200])
4201file_magic_cmd=$lt_cv_file_magic_cmd
4202deplibs_check_method=$lt_cv_deplibs_check_method
4203test -z "$deplibs_check_method" && deplibs_check_method=unknown
4204])# AC_DEPLIBS_CHECK_METHOD
4205
4206
4207# AC_PROG_NM
4208# ----------
4209# find the pathname to a BSD-compatible name lister
4210AC_DEFUN([AC_PROG_NM],
4211[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
4212[if test -n "$NM"; then
4213  # Let the user override the test.
4214  lt_cv_path_NM="$NM"
4215else
4216  lt_nm_to_check="${ac_tool_prefix}nm"
4217  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
4218    lt_nm_to_check="$lt_nm_to_check nm"
4219  fi
4220  for lt_tmp_nm in $lt_nm_to_check; do
4221    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4222    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
4223      IFS="$lt_save_ifs"
4224      test -z "$ac_dir" && ac_dir=.
4225      tmp_nm="$ac_dir/$lt_tmp_nm"
4226      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
4227	# Check to see if the nm accepts a BSD-compat flag.
4228	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
4229	#   nm: unknown option "B" ignored
4230	# Tru64's nm complains that /dev/null is an invalid object file
4231	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
4232	*/dev/null* | *'Invalid file or object type'*)
4233	  lt_cv_path_NM="$tmp_nm -B"
4234	  break
4235	  ;;
4236	*)
4237	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
4238	  */dev/null*)
4239	    lt_cv_path_NM="$tmp_nm -p"
4240	    break
4241	    ;;
4242	  *)
4243	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4244	    continue # so that we can try to find one that supports BSD flags
4245	    ;;
4246	  esac
4247	  ;;
4248	esac
4249      fi
4250    done
4251    IFS="$lt_save_ifs"
4252  done
4253  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4254fi])
4255NM="$lt_cv_path_NM"
4256])# AC_PROG_NM
4257
4258
4259# AC_CHECK_LIBM
4260# -------------
4261# check for math library
4262AC_DEFUN([AC_CHECK_LIBM],
4263[AC_REQUIRE([AC_CANONICAL_HOST])dnl
4264LIBM=
4265case $host in
4266*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
4267  # These system don't have libm, or don't need it
4268  ;;
4269*-ncr-sysv4.3*)
4270  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4271  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
4272  ;;
4273*)
4274  AC_CHECK_LIB(m, cos, LIBM="-lm")
4275  ;;
4276esac
4277])# AC_CHECK_LIBM
4278
4279
4280# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
4281# -----------------------------------
4282# sets LIBLTDL to the link flags for the libltdl convenience library and
4283# LTDLINCL to the include flags for the libltdl header and adds
4284# --enable-ltdl-convenience to the configure arguments.  Note that
4285# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
4286# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
4287# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
4288# (note the single quotes!).  If your package is not flat and you're not
4289# using automake, define top_builddir and top_srcdir appropriately in
4290# the Makefiles.
4291AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4292[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4293  case $enable_ltdl_convenience in
4294  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4295  "") enable_ltdl_convenience=yes
4296      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4297  esac
4298  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4299  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4300  # For backwards non-gettext consistent compatibility...
4301  INCLTDL="$LTDLINCL"
4302])# AC_LIBLTDL_CONVENIENCE
4303
4304
4305# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
4306# -----------------------------------
4307# sets LIBLTDL to the link flags for the libltdl installable library and
4308# LTDLINCL to the include flags for the libltdl header and adds
4309# --enable-ltdl-install to the configure arguments.  Note that
4310# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
4311# and an installed libltdl is not found, it is assumed to be `libltdl'.
4312# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
4313# '${top_srcdir}/' (note the single quotes!).  If your package is not
4314# flat and you're not using automake, define top_builddir and top_srcdir
4315# appropriately in the Makefiles.
4316# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4317AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4318[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4319  AC_CHECK_LIB(ltdl, lt_dlinit,
4320  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4321  [if test x"$enable_ltdl_install" = xno; then
4322     AC_MSG_WARN([libltdl not installed, but installation disabled])
4323   else
4324     enable_ltdl_install=yes
4325   fi
4326  ])
4327  if test x"$enable_ltdl_install" = x"yes"; then
4328    ac_configure_args="$ac_configure_args --enable-ltdl-install"
4329    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4330    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4331  else
4332    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4333    LIBLTDL="-lltdl"
4334    LTDLINCL=
4335  fi
4336  # For backwards non-gettext consistent compatibility...
4337  INCLTDL="$LTDLINCL"
4338])# AC_LIBLTDL_INSTALLABLE
4339
4340
4341# AC_LIBTOOL_CXX
4342# --------------
4343# enable support for C++ libraries
4344AC_DEFUN([AC_LIBTOOL_CXX],
4345[AC_REQUIRE([_LT_AC_LANG_CXX])
4346])# AC_LIBTOOL_CXX
4347
4348
4349# _LT_AC_LANG_CXX
4350# ---------------
4351AC_DEFUN([_LT_AC_LANG_CXX],
4352[AC_REQUIRE([AC_PROG_CXX])
4353AC_REQUIRE([_LT_AC_PROG_CXXCPP])
4354_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
4355])# _LT_AC_LANG_CXX
4356
4357# _LT_AC_PROG_CXXCPP
4358# ------------------
4359AC_DEFUN([_LT_AC_PROG_CXXCPP],
4360[
4361AC_REQUIRE([AC_PROG_CXX])
4362if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
4363    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
4364    (test "X$CXX" != "Xg++"))) ; then
4365  AC_PROG_CXXCPP
4366fi
4367])# _LT_AC_PROG_CXXCPP
4368
4369# AC_LIBTOOL_F77
4370# --------------
4371# enable support for Fortran 77 libraries
4372AC_DEFUN([AC_LIBTOOL_F77],
4373[AC_REQUIRE([_LT_AC_LANG_F77])
4374])# AC_LIBTOOL_F77
4375
4376
4377# _LT_AC_LANG_F77
4378# ---------------
4379AC_DEFUN([_LT_AC_LANG_F77],
4380[AC_REQUIRE([AC_PROG_F77])
4381_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
4382])# _LT_AC_LANG_F77
4383
4384
4385# AC_LIBTOOL_GCJ
4386# --------------
4387# enable support for GCJ libraries
4388AC_DEFUN([AC_LIBTOOL_GCJ],
4389[AC_REQUIRE([_LT_AC_LANG_GCJ])
4390])# AC_LIBTOOL_GCJ
4391
4392
4393# _LT_AC_LANG_GCJ
4394# ---------------
4395AC_DEFUN([_LT_AC_LANG_GCJ],
4396[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
4397  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
4398    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
4399      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
4400	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
4401	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
4402_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
4403])# _LT_AC_LANG_GCJ
4404
4405
4406# AC_LIBTOOL_RC
4407# -------------
4408# enable support for Windows resource files
4409AC_DEFUN([AC_LIBTOOL_RC],
4410[AC_REQUIRE([LT_AC_PROG_RC])
4411_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
4412])# AC_LIBTOOL_RC
4413
4414
4415# AC_LIBTOOL_LANG_C_CONFIG
4416# ------------------------
4417# Ensure that the configuration vars for the C compiler are
4418# suitably defined.  Those variables are subsequently used by
4419# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4420AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
4421AC_DEFUN([_LT_AC_LANG_C_CONFIG],
4422[lt_save_CC="$CC"
4423AC_LANG_PUSH(C)
4424
4425# Source file extension for C test sources.
4426ac_ext=c
4427
4428# Object file extension for compiled C test sources.
4429objext=o
4430_LT_AC_TAGVAR(objext, $1)=$objext
4431
4432# Code to be used in simple compile tests
4433lt_simple_compile_test_code="int some_variable = 0;"
4434
4435# Code to be used in simple link tests
4436lt_simple_link_test_code='int main(){return(0);}'
4437
4438_LT_AC_SYS_COMPILER
4439
4440# save warnings/boilerplate of simple test code
4441_LT_COMPILER_BOILERPLATE
4442_LT_LINKER_BOILERPLATE
4443
4444AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4445AC_LIBTOOL_PROG_COMPILER_PIC($1)
4446AC_LIBTOOL_PROG_CC_C_O($1)
4447AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4448AC_LIBTOOL_PROG_LD_SHLIBS($1)
4449AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4450AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4451AC_LIBTOOL_SYS_LIB_STRIP
4452AC_LIBTOOL_DLOPEN_SELF
4453
4454# Report which library types will actually be built
4455AC_MSG_CHECKING([if libtool supports shared libraries])
4456AC_MSG_RESULT([$can_build_shared])
4457
4458AC_MSG_CHECKING([whether to build shared libraries])
4459test "$can_build_shared" = "no" && enable_shared=no
4460
4461# On AIX, shared libraries and static libraries use the same namespace, and
4462# are all built from PIC.
4463case $host_os in
4464aix3*)
4465  test "$enable_shared" = yes && enable_static=no
4466  if test -n "$RANLIB"; then
4467    archive_cmds="$archive_cmds~\$RANLIB \$lib"
4468    postinstall_cmds='$RANLIB $lib'
4469  fi
4470  ;;
4471
4472aix[[4-9]]*)
4473  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4474    test "$enable_shared" = yes && enable_static=no
4475  fi
4476    ;;
4477esac
4478AC_MSG_RESULT([$enable_shared])
4479
4480AC_MSG_CHECKING([whether to build static libraries])
4481# Make sure either enable_shared or enable_static is yes.
4482test "$enable_shared" = yes || enable_static=yes
4483AC_MSG_RESULT([$enable_static])
4484
4485AC_LIBTOOL_CONFIG($1)
4486
4487AC_LANG_POP
4488CC="$lt_save_CC"
4489])# AC_LIBTOOL_LANG_C_CONFIG
4490
4491
4492# AC_LIBTOOL_LANG_CXX_CONFIG
4493# --------------------------
4494# Ensure that the configuration vars for the C compiler are
4495# suitably defined.  Those variables are subsequently used by
4496# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4497AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
4498AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
4499[AC_LANG_PUSH(C++)
4500AC_REQUIRE([AC_PROG_CXX])
4501AC_REQUIRE([_LT_AC_PROG_CXXCPP])
4502
4503_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4504_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4505_LT_AC_TAGVAR(always_export_symbols, $1)=no
4506_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4507_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4508_LT_AC_TAGVAR(hardcode_direct, $1)=no
4509_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4510_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4511_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4512_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4513_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4514_LT_AC_TAGVAR(hardcode_automatic, $1)=no
4515_LT_AC_TAGVAR(module_cmds, $1)=
4516_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4517_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4518_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4519_LT_AC_TAGVAR(no_undefined_flag, $1)=
4520_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4521_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4522
4523# Dependencies to place before and after the object being linked:
4524_LT_AC_TAGVAR(predep_objects, $1)=
4525_LT_AC_TAGVAR(postdep_objects, $1)=
4526_LT_AC_TAGVAR(predeps, $1)=
4527_LT_AC_TAGVAR(postdeps, $1)=
4528_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
4529_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
4530
4531# Source file extension for C++ test sources.
4532ac_ext=cpp
4533
4534# Object file extension for compiled C++ test sources.
4535objext=o
4536_LT_AC_TAGVAR(objext, $1)=$objext
4537
4538# Code to be used in simple compile tests
4539lt_simple_compile_test_code="int some_variable = 0;"
4540
4541# Code to be used in simple link tests
4542lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
4543
4544# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4545_LT_AC_SYS_COMPILER
4546
4547# save warnings/boilerplate of simple test code
4548_LT_COMPILER_BOILERPLATE
4549_LT_LINKER_BOILERPLATE
4550
4551# Allow CC to be a program name with arguments.
4552lt_save_CC=$CC
4553lt_save_LD=$LD
4554lt_save_GCC=$GCC
4555GCC=$GXX
4556lt_save_with_gnu_ld=$with_gnu_ld
4557lt_save_path_LD=$lt_cv_path_LD
4558if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
4559  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
4560else
4561  $as_unset lt_cv_prog_gnu_ld
4562fi
4563if test -n "${lt_cv_path_LDCXX+set}"; then
4564  lt_cv_path_LD=$lt_cv_path_LDCXX
4565else
4566  $as_unset lt_cv_path_LD
4567fi
4568test -z "${LDCXX+set}" || LD=$LDCXX
4569CC=${CXX-"c++"}
4570compiler=$CC
4571_LT_AC_TAGVAR(compiler, $1)=$CC
4572_LT_CC_BASENAME([$compiler])
4573
4574# We don't want -fno-exception wen compiling C++ code, so set the
4575# no_builtin_flag separately
4576if test "$GXX" = yes; then
4577  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4578else
4579  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4580fi
4581
4582if test "$GXX" = yes; then
4583  # Set up default GNU C++ configuration
4584
4585  AC_PROG_LD
4586
4587  # Check if GNU C++ uses GNU ld as the underlying linker, since the
4588  # archiving commands below assume that GNU ld is being used.
4589  if test "$with_gnu_ld" = yes; then
4590    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
4591    _LT_AC_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'
4592
4593    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
4594    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
4595
4596    # If archive_cmds runs LD, not CC, wlarc should be empty
4597    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
4598    #     investigate it a little bit more. (MM)
4599    wlarc='${wl}'
4600
4601    # ancient GNU ld didn't support --whole-archive et. al.
4602    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
4603	grep 'no-whole-archive' > /dev/null; then
4604      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
4605    else
4606      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4607    fi
4608  else
4609    with_gnu_ld=no
4610    wlarc=
4611
4612    # A generic and very simple default shared library creation
4613    # command for GNU C++ for the case where it uses the native
4614    # linker, instead of GNU ld.  If possible, this setting should
4615    # overridden to take advantage of the native linker features on
4616    # the platform it is being used on.
4617    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
4618  fi
4619
4620  # Commands to make compiler produce verbose output that lists
4621  # what "hidden" libraries, object files and flags are used when
4622  # linking a shared library.
4623  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4624
4625else
4626  GXX=no
4627  with_gnu_ld=no
4628  wlarc=
4629fi
4630
4631# PORTME: fill in a description of your system's C++ link characteristics
4632AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
4633_LT_AC_TAGVAR(ld_shlibs, $1)=yes
4634case $host_os in
4635  aix3*)
4636    # FIXME: insert proper C++ library support
4637    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4638    ;;
4639  aix[[4-9]]*)
4640    if test "$host_cpu" = ia64; then
4641      # On IA64, the linker does run time linking by default, so we don't
4642      # have to do anything special.
4643      aix_use_runtimelinking=no
4644      exp_sym_flag='-Bexport'
4645      no_entry_flag=""
4646    else
4647      aix_use_runtimelinking=no
4648
4649      # Test if we are trying to use run time linking or normal
4650      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
4651      # need to do runtime linking.
4652      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
4653	for ld_flag in $LDFLAGS; do
4654	  case $ld_flag in
4655	  *-brtl*)
4656	    aix_use_runtimelinking=yes
4657	    break
4658	    ;;
4659	  esac
4660	done
4661	;;
4662      esac
4663
4664      exp_sym_flag='-bexport'
4665      no_entry_flag='-bnoentry'
4666    fi
4667
4668    # When large executables or shared objects are built, AIX ld can
4669    # have problems creating the table of contents.  If linking a library
4670    # or program results in "error TOC overflow" add -mminimal-toc to
4671    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
4672    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
4673
4674    _LT_AC_TAGVAR(archive_cmds, $1)=''
4675    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4676    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
4677    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4678
4679    if test "$GXX" = yes; then
4680      case $host_os in aix4.[[012]]|aix4.[[012]].*)
4681      # We only want to do this on AIX 4.2 and lower, the check
4682      # below for broken collect2 doesn't work under 4.3+
4683	collect2name=`${CC} -print-prog-name=collect2`
4684	if test -f "$collect2name" && \
4685	   strings "$collect2name" | grep resolve_lib_name >/dev/null
4686	then
4687	  # We have reworked collect2
4688	  :
4689	else
4690	  # We have old collect2
4691	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
4692	  # It fails to find uninstalled libraries when the uninstalled
4693	  # path is not listed in the libpath.  Setting hardcode_minus_L
4694	  # to unsupported forces relinking
4695	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
4696	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4697	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4698	fi
4699	;;
4700      esac
4701      shared_flag='-shared'
4702      if test "$aix_use_runtimelinking" = yes; then
4703	shared_flag="$shared_flag "'${wl}-G'
4704      fi
4705    else
4706      # not using gcc
4707      if test "$host_cpu" = ia64; then
4708	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
4709	# chokes on -Wl,-G. The following line is correct:
4710	shared_flag='-G'
4711      else
4712	if test "$aix_use_runtimelinking" = yes; then
4713	  shared_flag='${wl}-G'
4714	else
4715	  shared_flag='${wl}-bM:SRE'
4716	fi
4717      fi
4718    fi
4719
4720    # It seems that -bexpall does not export symbols beginning with
4721    # underscore (_), so it is better to generate a list of symbols to export.
4722    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
4723    if test "$aix_use_runtimelinking" = yes; then
4724      # Warning - without using the other runtime loading flags (-brtl),
4725      # -berok will link without error, but may produce a broken library.
4726      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
4727      # Determine the default libpath from the value encoded in an empty executable.
4728      _LT_AC_SYS_LIBPATH_AIX
4729      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4730
4731      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
4732     else
4733      if test "$host_cpu" = ia64; then
4734	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
4735	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
4736	_LT_AC_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"
4737      else
4738	# Determine the default libpath from the value encoded in an empty executable.
4739	_LT_AC_SYS_LIBPATH_AIX
4740	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
4741	# Warning - without using the other run time loading flags,
4742	# -berok will link without error, but may produce a broken library.
4743	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
4744	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
4745	# Exported symbols can be pulled into shared objects from archives
4746	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
4747	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
4748	# This is similar to how AIX traditionally builds its shared libraries.
4749	_LT_AC_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'
4750      fi
4751    fi
4752    ;;
4753
4754  beos*)
4755    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
4756      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4757      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
4758      # support --undefined.  This deserves some investigation.  FIXME
4759      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
4760    else
4761      _LT_AC_TAGVAR(ld_shlibs, $1)=no
4762    fi
4763    ;;
4764
4765  chorus*)
4766    case $cc_basename in
4767      *)
4768	# FIXME: insert proper C++ library support
4769	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4770	;;
4771    esac
4772    ;;
4773
4774  cygwin* | mingw* | pw32*)
4775    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
4776    # as there is no search path for DLLs.
4777    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
4778    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
4779    _LT_AC_TAGVAR(always_export_symbols, $1)=no
4780    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
4781
4782    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
4783      _LT_AC_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'
4784      # If the export-symbols file already is a .def file (1st line
4785      # is EXPORTS), use it as is; otherwise, prepend...
4786      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
4787	cp $export_symbols $output_objdir/$soname.def;
4788      else
4789	echo EXPORTS > $output_objdir/$soname.def;
4790	cat $export_symbols >> $output_objdir/$soname.def;
4791      fi~
4792      $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'
4793    else
4794      _LT_AC_TAGVAR(ld_shlibs, $1)=no
4795    fi
4796  ;;
4797      darwin* | rhapsody*)
4798      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4799      _LT_AC_TAGVAR(hardcode_direct, $1)=no
4800      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
4801      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
4802      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
4803      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
4804      _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
4805      if test "$GXX" = yes ; then
4806      output_verbose_link_cmd='echo'
4807      _LT_AC_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}"
4808      _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
4809      _LT_AC_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}"
4810      _LT_AC_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}"
4811      if test "$lt_cv_apple_cc_single_mod" != "yes"; then
4812        _LT_AC_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}"
4813        _LT_AC_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}"
4814      fi
4815      else
4816      case $cc_basename in
4817        xlc*)
4818         output_verbose_link_cmd='echo'
4819          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
4820          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
4821          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
4822          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4823          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
4824          ;;
4825       *)
4826         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4827          ;;
4828      esac
4829      fi
4830        ;;
4831
4832  dgux*)
4833    case $cc_basename in
4834      ec++*)
4835	# FIXME: insert proper C++ library support
4836	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4837	;;
4838      ghcx*)
4839	# Green Hills C++ Compiler
4840	# FIXME: insert proper C++ library support
4841	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4842	;;
4843      *)
4844	# FIXME: insert proper C++ library support
4845	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4846	;;
4847    esac
4848    ;;
4849  freebsd[[12]]*)
4850    # C++ shared libraries reported to be fairly broken before switch to ELF
4851    _LT_AC_TAGVAR(ld_shlibs, $1)=no
4852    ;;
4853  freebsd-elf*)
4854    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4855    ;;
4856  freebsd* | dragonfly*)
4857    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
4858    # conventions
4859    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
4860    ;;
4861  gnu*)
4862    ;;
4863  hpux9*)
4864    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4865    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4866    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4867    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4868    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4869				# but as the default
4870				# location of the library.
4871
4872    case $cc_basename in
4873    CC*)
4874      # FIXME: insert proper C++ library support
4875      _LT_AC_TAGVAR(ld_shlibs, $1)=no
4876      ;;
4877    aCC*)
4878      _LT_AC_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'
4879      # Commands to make compiler produce verbose output that lists
4880      # what "hidden" libraries, object files and flags are used when
4881      # linking a shared library.
4882      #
4883      # There doesn't appear to be a way to prevent this compiler from
4884      # explicitly linking system object files so we need to strip them
4885      # from the output so that they don't get included in the library
4886      # dependencies.
4887      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4888      ;;
4889    *)
4890      if test "$GXX" = yes; then
4891        _LT_AC_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'
4892      else
4893        # FIXME: insert proper C++ library support
4894        _LT_AC_TAGVAR(ld_shlibs, $1)=no
4895      fi
4896      ;;
4897    esac
4898    ;;
4899  hpux10*|hpux11*)
4900    if test $with_gnu_ld = no; then
4901      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
4902      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4903
4904      case $host_cpu in
4905      hppa*64*|ia64*) ;;
4906      *)
4907	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4908        ;;
4909      esac
4910    fi
4911    case $host_cpu in
4912    hppa*64*|ia64*)
4913      _LT_AC_TAGVAR(hardcode_direct, $1)=no
4914      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4915      ;;
4916    *)
4917      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
4918      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
4919					      # but as the default
4920					      # location of the library.
4921      ;;
4922    esac
4923
4924    case $cc_basename in
4925      CC*)
4926	# FIXME: insert proper C++ library support
4927	_LT_AC_TAGVAR(ld_shlibs, $1)=no
4928	;;
4929      aCC*)
4930	case $host_cpu in
4931	hppa*64*)
4932	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4933	  ;;
4934	ia64*)
4935	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4936	  ;;
4937	*)
4938	  _LT_AC_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'
4939	  ;;
4940	esac
4941	# Commands to make compiler produce verbose output that lists
4942	# what "hidden" libraries, object files and flags are used when
4943	# linking a shared library.
4944	#
4945	# There doesn't appear to be a way to prevent this compiler from
4946	# explicitly linking system object files so we need to strip them
4947	# from the output so that they don't get included in the library
4948	# dependencies.
4949	output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4950	;;
4951      *)
4952	if test "$GXX" = yes; then
4953	  if test $with_gnu_ld = no; then
4954	    case $host_cpu in
4955	    hppa*64*)
4956	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4957	      ;;
4958	    ia64*)
4959	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4960	      ;;
4961	    *)
4962	      _LT_AC_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'
4963	      ;;
4964	    esac
4965	  fi
4966	else
4967	  # FIXME: insert proper C++ library support
4968	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
4969	fi
4970	;;
4971    esac
4972    ;;
4973  interix[[3-9]]*)
4974    _LT_AC_TAGVAR(hardcode_direct, $1)=no
4975    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4976    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4977    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
4978    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
4979    # Instead, shared libraries are loaded at an image base (0x10000000 by
4980    # default) and relocated if they conflict, which is a slow very memory
4981    # consuming and fragmenting process.  To avoid this, we pick a random,
4982    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
4983    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
4984    _LT_AC_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'
4985    _LT_AC_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'
4986    ;;
4987  irix5* | irix6*)
4988    case $cc_basename in
4989      CC*)
4990	# SGI C++
4991	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
4992
4993	# Archives containing C++ object files must be created using
4994	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
4995	# necessary to make sure instantiated templates are included
4996	# in the archive.
4997	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
4998	;;
4999      *)
5000	if test "$GXX" = yes; then
5001	  if test "$with_gnu_ld" = no; then
5002	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5003	  else
5004	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
5005	  fi
5006	fi
5007	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5008	;;
5009    esac
5010    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5011    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5012    ;;
5013  linux* | k*bsd*-gnu)
5014    case $cc_basename in
5015      KCC*)
5016	# Kuck and Associates, Inc. (KAI) C++ Compiler
5017
5018	# KCC will only create a shared library if the output file
5019	# ends with ".so" (or ".sl" for HP-UX), so rename the library
5020	# to its proper name (with version) after linking.
5021	_LT_AC_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'
5022	_LT_AC_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'
5023	# Commands to make compiler produce verbose output that lists
5024	# what "hidden" libraries, object files and flags are used when
5025	# linking a shared library.
5026	#
5027	# There doesn't appear to be a way to prevent this compiler from
5028	# explicitly linking system object files so we need to strip them
5029	# from the output so that they don't get included in the library
5030	# dependencies.
5031	output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
5032
5033	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
5034	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5035
5036	# Archives containing C++ object files must be created using
5037	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
5038	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5039	;;
5040      icpc*)
5041	# Intel C++
5042	with_gnu_ld=yes
5043	# version 8.0 and above of icpc choke on multiply defined symbols
5044	# if we add $predep_objects and $postdep_objects, however 7.1 and
5045	# earlier do not add the objects themselves.
5046	case `$CC -V 2>&1` in
5047	*"Version 7."*)
5048  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5049  	  _LT_AC_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'
5050	  ;;
5051	*)  # Version 8.0 or newer
5052	  tmp_idyn=
5053	  case $host_cpu in
5054	    ia64*) tmp_idyn=' -i_dynamic';;
5055	  esac
5056  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5057	  _LT_AC_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'
5058	  ;;
5059	esac
5060	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5061	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5062	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5063	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
5064	;;
5065      pgCC* | pgcpp*)
5066        # Portland Group C++ compiler
5067	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
5068  	_LT_AC_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'
5069
5070	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5071	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5072	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5073        ;;
5074      cxx*)
5075	# Compaq C++
5076	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
5077	_LT_AC_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'
5078
5079	runpath_var=LD_RUN_PATH
5080	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5081	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5082
5083	# Commands to make compiler produce verbose output that lists
5084	# what "hidden" libraries, object files and flags are used when
5085	# linking a shared library.
5086	#
5087	# There doesn't appear to be a way to prevent this compiler from
5088	# explicitly linking system object files so we need to strip them
5089	# from the output so that they don't get included in the library
5090	# dependencies.
5091	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $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; echo $list'
5092	;;
5093      *)
5094	case `$CC -V 2>&1 | sed 5q` in
5095	*Sun\ C*)
5096	  # Sun C++ 5.9
5097	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5098	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5099	  _LT_AC_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'
5100	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5101	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5102
5103	  # Not sure whether something based on
5104	  # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
5105	  # would be better.
5106	  output_verbose_link_cmd='echo'
5107
5108	  # Archives containing C++ object files must be created using
5109	  # "CC -xar", where "CC" is the Sun C++ compiler.  This is
5110	  # necessary to make sure instantiated templates are included
5111	  # in the archive.
5112	  _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
5113	  ;;
5114	esac
5115	;;
5116    esac
5117    ;;
5118  lynxos*)
5119    # FIXME: insert proper C++ library support
5120    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5121    ;;
5122  m88k*)
5123    # FIXME: insert proper C++ library support
5124    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5125    ;;
5126  mvs*)
5127    case $cc_basename in
5128      cxx*)
5129	# FIXME: insert proper C++ library support
5130	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5131	;;
5132      *)
5133	# FIXME: insert proper C++ library support
5134	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5135	;;
5136    esac
5137    ;;
5138  netbsd*)
5139    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5140      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
5141      wlarc=
5142      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5143      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5144      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5145    fi
5146    # Workaround some broken pre-1.5 toolchains
5147    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
5148    ;;
5149  openbsd2*)
5150    # C++ shared libraries are fairly broken
5151    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5152    ;;
5153  openbsd*)
5154    if test -f /usr/libexec/ld.so; then
5155      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5156      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5157      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
5158      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5159      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5160	_LT_AC_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'
5161	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5162	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5163      fi
5164      output_verbose_link_cmd='echo'
5165    else
5166      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5167    fi
5168    ;;
5169  osf3*)
5170    case $cc_basename in
5171      KCC*)
5172	# Kuck and Associates, Inc. (KAI) C++ Compiler
5173
5174	# KCC will only create a shared library if the output file
5175	# ends with ".so" (or ".sl" for HP-UX), so rename the library
5176	# to its proper name (with version) after linking.
5177	_LT_AC_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'
5178
5179	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5180	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5181
5182	# Archives containing C++ object files must be created using
5183	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
5184	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
5185
5186	;;
5187      RCC*)
5188	# Rational C++ 2.4.1
5189	# FIXME: insert proper C++ library support
5190	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5191	;;
5192      cxx*)
5193	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5194	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5195
5196	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5197	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5198
5199	# Commands to make compiler produce verbose output that lists
5200	# what "hidden" libraries, object files and flags are used when
5201	# linking a shared library.
5202	#
5203	# There doesn't appear to be a way to prevent this compiler from
5204	# explicitly linking system object files so we need to strip them
5205	# from the output so that they don't get included in the library
5206	# dependencies.
5207	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list'
5208	;;
5209      *)
5210	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5211	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5212	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5213
5214	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5215	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5216
5217	  # Commands to make compiler produce verbose output that lists
5218	  # what "hidden" libraries, object files and flags are used when
5219	  # linking a shared library.
5220	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
5221
5222	else
5223	  # FIXME: insert proper C++ library support
5224	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
5225	fi
5226	;;
5227    esac
5228    ;;
5229  osf4* | osf5*)
5230    case $cc_basename in
5231      KCC*)
5232	# Kuck and Associates, Inc. (KAI) C++ Compiler
5233
5234	# KCC will only create a shared library if the output file
5235	# ends with ".so" (or ".sl" for HP-UX), so rename the library
5236	# to its proper name (with version) after linking.
5237	_LT_AC_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'
5238
5239	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5240	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5241
5242	# Archives containing C++ object files must be created using
5243	# the KAI C++ compiler.
5244	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
5245	;;
5246      RCC*)
5247	# Rational C++ 2.4.1
5248	# FIXME: insert proper C++ library support
5249	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5250	;;
5251      cxx*)
5252	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5253	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5254	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
5255	  echo "-hidden">> $lib.exp~
5256	  $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~
5257	  $rm $lib.exp'
5258
5259	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5260	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5261
5262	# Commands to make compiler produce verbose output that lists
5263	# what "hidden" libraries, object files and flags are used when
5264	# linking a shared library.
5265	#
5266	# There doesn't appear to be a way to prevent this compiler from
5267	# explicitly linking system object files so we need to strip them
5268	# from the output so that they don't get included in the library
5269	# dependencies.
5270	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list'
5271	;;
5272      *)
5273	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5274	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5275	 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
5276
5277	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5278	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5279
5280	  # Commands to make compiler produce verbose output that lists
5281	  # what "hidden" libraries, object files and flags are used when
5282	  # linking a shared library.
5283	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
5284
5285	else
5286	  # FIXME: insert proper C++ library support
5287	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
5288	fi
5289	;;
5290    esac
5291    ;;
5292  psos*)
5293    # FIXME: insert proper C++ library support
5294    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5295    ;;
5296  sunos4*)
5297    case $cc_basename in
5298      CC*)
5299	# Sun C++ 4.x
5300	# FIXME: insert proper C++ library support
5301	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5302	;;
5303      lcc*)
5304	# Lucid
5305	# FIXME: insert proper C++ library support
5306	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5307	;;
5308      *)
5309	# FIXME: insert proper C++ library support
5310	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5311	;;
5312    esac
5313    ;;
5314  solaris*)
5315    case $cc_basename in
5316      CC*)
5317	# Sun C++ 4.2, 5.x and Centerline C++
5318        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
5319	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
5320	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
5321	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5322	$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'
5323
5324	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5325	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5326	case $host_os in
5327	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5328	  *)
5329	    # The compiler driver will combine and reorder linker options,
5330	    # but understands `-z linker_flag'.
5331	    # Supported since Solaris 2.6 (maybe 2.5.1?)
5332	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
5333	    ;;
5334	esac
5335	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5336
5337	output_verbose_link_cmd='echo'
5338
5339	# Archives containing C++ object files must be created using
5340	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
5341	# necessary to make sure instantiated templates are included
5342	# in the archive.
5343	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
5344	;;
5345      gcx*)
5346	# Green Hills C++ Compiler
5347	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5348
5349	# The C++ compiler must be used to create the archive.
5350	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
5351	;;
5352      *)
5353	# GNU C++ compiler with Solaris linker
5354	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
5355	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
5356	  if $CC --version | grep -v '^2\.7' > /dev/null; then
5357	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5358	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5359		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
5360
5361	    # Commands to make compiler produce verbose output that lists
5362	    # what "hidden" libraries, object files and flags are used when
5363	    # linking a shared library.
5364	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
5365	  else
5366	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
5367	    # platform.
5368	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
5369	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5370		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
5371
5372	    # Commands to make compiler produce verbose output that lists
5373	    # what "hidden" libraries, object files and flags are used when
5374	    # linking a shared library.
5375	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
5376	  fi
5377
5378	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
5379	  case $host_os in
5380	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5381	  *)
5382	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
5383	    ;;
5384	  esac
5385	fi
5386	;;
5387    esac
5388    ;;
5389  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
5390    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5391    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5392    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5393    runpath_var='LD_RUN_PATH'
5394
5395    case $cc_basename in
5396      CC*)
5397	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5398	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5399	;;
5400      *)
5401	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5402	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
5403	;;
5404    esac
5405    ;;
5406  sysv5* | sco3.2v5* | sco5v6*)
5407    # Note: We can NOT use -z defs as we might desire, because we do not
5408    # link with -lc, and that would cause any symbols used from libc to
5409    # always be unresolved, which means just about no library would
5410    # ever link correctly.  If we're not using GNU ld we use -z text
5411    # though, which does catch some bad symbols but isn't as heavy-handed
5412    # as -z defs.
5413    # For security reasons, it is highly recommended that you always
5414    # use absolute paths for naming shared libraries, and exclude the
5415    # DT_RUNPATH tag from executables and libraries.  But doing so
5416    # requires that you compile everything twice, which is a pain.
5417    # So that behaviour is only enabled if SCOABSPATH is set to a
5418    # non-empty value in the environment.  Most likely only useful for
5419    # creating official distributions of packages.
5420    # This is a hack until libtool officially supports absolute path
5421    # names for shared libraries.
5422    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
5423    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
5424    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5425    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5426    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
5427    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5428    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5429    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5430    runpath_var='LD_RUN_PATH'
5431
5432    case $cc_basename in
5433      CC*)
5434	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
5435	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
5436	;;
5437      *)
5438	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
5439	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
5440	;;
5441    esac
5442    ;;
5443  tandem*)
5444    case $cc_basename in
5445      NCC*)
5446	# NonStop-UX NCC 3.20
5447	# FIXME: insert proper C++ library support
5448	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5449	;;
5450      *)
5451	# FIXME: insert proper C++ library support
5452	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5453	;;
5454    esac
5455    ;;
5456  vxworks*)
5457    # FIXME: insert proper C++ library support
5458    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5459    ;;
5460  *)
5461    # FIXME: insert proper C++ library support
5462    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5463    ;;
5464esac
5465AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
5466test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5467
5468_LT_AC_TAGVAR(GCC, $1)="$GXX"
5469_LT_AC_TAGVAR(LD, $1)="$LD"
5470
5471AC_LIBTOOL_POSTDEP_PREDEP($1)
5472AC_LIBTOOL_PROG_COMPILER_PIC($1)
5473AC_LIBTOOL_PROG_CC_C_O($1)
5474AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5475AC_LIBTOOL_PROG_LD_SHLIBS($1)
5476AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5477AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5478
5479AC_LIBTOOL_CONFIG($1)
5480
5481AC_LANG_POP
5482CC=$lt_save_CC
5483LDCXX=$LD
5484LD=$lt_save_LD
5485GCC=$lt_save_GCC
5486with_gnu_ldcxx=$with_gnu_ld
5487with_gnu_ld=$lt_save_with_gnu_ld
5488lt_cv_path_LDCXX=$lt_cv_path_LD
5489lt_cv_path_LD=$lt_save_path_LD
5490lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
5491lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
5492])# AC_LIBTOOL_LANG_CXX_CONFIG
5493
5494# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
5495# ------------------------------------
5496# Figure out "hidden" library dependencies from verbose
5497# compiler output when linking a shared library.
5498# Parse the compiler output and extract the necessary
5499# objects, libraries and library flags.
5500AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],
5501[AC_REQUIRE([LT_AC_PROG_SED])dnl
5502dnl we can't use the lt_simple_compile_test_code here,
5503dnl because it contains code intended for an executable,
5504dnl not a library.  It's possible we should let each
5505dnl tag define a new lt_????_link_test_code variable,
5506dnl but it's only used here...
5507ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
5508int a;
5509void foo (void) { a = 0; }
5510EOF
5511],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
5512class Foo
5513{
5514public:
5515  Foo (void) { a = 0; }
5516private:
5517  int a;
5518};
5519EOF
5520],[$1],[F77],[cat > conftest.$ac_ext <<EOF
5521      subroutine foo
5522      implicit none
5523      integer*4 a
5524      a=0
5525      return
5526      end
5527EOF
5528],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
5529public class foo {
5530  private int a;
5531  public void bar (void) {
5532    a = 0;
5533  }
5534};
5535EOF
5536])
5537dnl Parse the compiler output and extract the necessary
5538dnl objects, libraries and library flags.
5539if AC_TRY_EVAL(ac_compile); then
5540  # Parse the compiler output and extract the necessary
5541  # objects, libraries and library flags.
5542
5543  # Sentinel used to keep track of whether or not we are before
5544  # the conftest object file.
5545  pre_test_object_deps_done=no
5546
5547  # The `*' in the case matches for architectures that use `case' in
5548  # $output_verbose_cmd can trigger glob expansion during the loop
5549  # eval without this substitution.
5550  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
5551
5552  for p in `eval $output_verbose_link_cmd`; do
5553    case $p in
5554
5555    -L* | -R* | -l*)
5556       # Some compilers place space between "-{L,R}" and the path.
5557       # Remove the space.
5558       if test $p = "-L" \
5559	  || test $p = "-R"; then
5560	 prev=$p
5561	 continue
5562       else
5563	 prev=
5564       fi
5565
5566       if test "$pre_test_object_deps_done" = no; then
5567	 case $p in
5568	 -L* | -R*)
5569	   # Internal compiler library paths should come after those
5570	   # provided the user.  The postdeps already come after the
5571	   # user supplied libs so there is no need to process them.
5572	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
5573	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
5574	   else
5575	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
5576	   fi
5577	   ;;
5578	 # The "-l" case would never come before the object being
5579	 # linked, so don't bother handling this case.
5580	 esac
5581       else
5582	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
5583	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
5584	 else
5585	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
5586	 fi
5587       fi
5588       ;;
5589
5590    *.$objext)
5591       # This assumes that the test object file only shows up
5592       # once in the compiler output.
5593       if test "$p" = "conftest.$objext"; then
5594	 pre_test_object_deps_done=yes
5595	 continue
5596       fi
5597
5598       if test "$pre_test_object_deps_done" = no; then
5599	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
5600	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
5601	 else
5602	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
5603	 fi
5604       else
5605	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
5606	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
5607	 else
5608	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
5609	 fi
5610       fi
5611       ;;
5612
5613    *) ;; # Ignore the rest.
5614
5615    esac
5616  done
5617
5618  # Clean up.
5619  rm -f a.out a.exe
5620else
5621  echo "libtool.m4: error: problem compiling $1 test program"
5622fi
5623
5624$rm -f confest.$objext
5625
5626_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
5627if test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
5628  _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
5629fi
5630
5631# PORTME: override above test on systems where it is broken
5632ifelse([$1],[CXX],
5633[case $host_os in
5634interix[[3-9]]*)
5635  # Interix 3.5 installs completely hosed .la files for C++, so rather than
5636  # hack all around it, let's just trust "g++" to DTRT.
5637  _LT_AC_TAGVAR(predep_objects,$1)=
5638  _LT_AC_TAGVAR(postdep_objects,$1)=
5639  _LT_AC_TAGVAR(postdeps,$1)=
5640  ;;
5641
5642linux*)
5643  case `$CC -V 2>&1 | sed 5q` in
5644  *Sun\ C*)
5645    # Sun C++ 5.9
5646    #
5647    # The more standards-conforming stlport4 library is
5648    # incompatible with the Cstd library. Avoid specifying
5649    # it if it's in CXXFLAGS. Ignore libCrun as
5650    # -library=stlport4 depends on it.
5651    case " $CXX $CXXFLAGS " in
5652    *" -library=stlport4 "*)
5653      solaris_use_stlport4=yes
5654      ;;
5655    esac
5656    if test "$solaris_use_stlport4" != yes; then
5657      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
5658    fi
5659    ;;
5660  esac
5661  ;;
5662
5663solaris*)
5664  case $cc_basename in
5665  CC*)
5666    # The more standards-conforming stlport4 library is
5667    # incompatible with the Cstd library. Avoid specifying
5668    # it if it's in CXXFLAGS. Ignore libCrun as
5669    # -library=stlport4 depends on it.
5670    case " $CXX $CXXFLAGS " in
5671    *" -library=stlport4 "*)
5672      solaris_use_stlport4=yes
5673      ;;
5674    esac
5675
5676    # Adding this requires a known-good setup of shared libraries for
5677    # Sun compiler versions before 5.6, else PIC objects from an old
5678    # archive will be linked into the output, leading to subtle bugs.
5679    if test "$solaris_use_stlport4" != yes; then
5680      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
5681    fi
5682    ;;
5683  esac
5684  ;;
5685esac
5686])
5687case " $_LT_AC_TAGVAR(postdeps, $1) " in
5688*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
5689esac
5690])# AC_LIBTOOL_POSTDEP_PREDEP
5691
5692# AC_LIBTOOL_LANG_F77_CONFIG
5693# --------------------------
5694# Ensure that the configuration vars for the C compiler are
5695# suitably defined.  Those variables are subsequently used by
5696# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5697AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
5698AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
5699[AC_REQUIRE([AC_PROG_F77])
5700AC_LANG_PUSH(Fortran 77)
5701
5702_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5703_LT_AC_TAGVAR(allow_undefined_flag, $1)=
5704_LT_AC_TAGVAR(always_export_symbols, $1)=no
5705_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5706_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5707_LT_AC_TAGVAR(hardcode_direct, $1)=no
5708_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5709_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5710_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5711_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5712_LT_AC_TAGVAR(hardcode_automatic, $1)=no
5713_LT_AC_TAGVAR(module_cmds, $1)=
5714_LT_AC_TAGVAR(module_expsym_cmds, $1)=
5715_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5716_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5717_LT_AC_TAGVAR(no_undefined_flag, $1)=
5718_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5719_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5720
5721# Source file extension for f77 test sources.
5722ac_ext=f
5723
5724# Object file extension for compiled f77 test sources.
5725objext=o
5726_LT_AC_TAGVAR(objext, $1)=$objext
5727
5728# Code to be used in simple compile tests
5729lt_simple_compile_test_code="\
5730      subroutine t
5731      return
5732      end
5733"
5734
5735# Code to be used in simple link tests
5736lt_simple_link_test_code="\
5737      program t
5738      end
5739"
5740
5741# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5742_LT_AC_SYS_COMPILER
5743
5744# save warnings/boilerplate of simple test code
5745_LT_COMPILER_BOILERPLATE
5746_LT_LINKER_BOILERPLATE
5747
5748# Allow CC to be a program name with arguments.
5749lt_save_CC="$CC"
5750CC=${F77-"f77"}
5751compiler=$CC
5752_LT_AC_TAGVAR(compiler, $1)=$CC
5753_LT_CC_BASENAME([$compiler])
5754
5755AC_MSG_CHECKING([if libtool supports shared libraries])
5756AC_MSG_RESULT([$can_build_shared])
5757
5758AC_MSG_CHECKING([whether to build shared libraries])
5759test "$can_build_shared" = "no" && enable_shared=no
5760
5761# On AIX, shared libraries and static libraries use the same namespace, and
5762# are all built from PIC.
5763case $host_os in
5764aix3*)
5765  test "$enable_shared" = yes && enable_static=no
5766  if test -n "$RANLIB"; then
5767    archive_cmds="$archive_cmds~\$RANLIB \$lib"
5768    postinstall_cmds='$RANLIB $lib'
5769  fi
5770  ;;
5771aix[[4-9]]*)
5772  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
5773    test "$enable_shared" = yes && enable_static=no
5774  fi
5775  ;;
5776esac
5777AC_MSG_RESULT([$enable_shared])
5778
5779AC_MSG_CHECKING([whether to build static libraries])
5780# Make sure either enable_shared or enable_static is yes.
5781test "$enable_shared" = yes || enable_static=yes
5782AC_MSG_RESULT([$enable_static])
5783
5784_LT_AC_TAGVAR(GCC, $1)="$G77"
5785_LT_AC_TAGVAR(LD, $1)="$LD"
5786
5787AC_LIBTOOL_PROG_COMPILER_PIC($1)
5788AC_LIBTOOL_PROG_CC_C_O($1)
5789AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5790AC_LIBTOOL_PROG_LD_SHLIBS($1)
5791AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5792AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5793
5794AC_LIBTOOL_CONFIG($1)
5795
5796AC_LANG_POP
5797CC="$lt_save_CC"
5798])# AC_LIBTOOL_LANG_F77_CONFIG
5799
5800
5801# AC_LIBTOOL_LANG_GCJ_CONFIG
5802# --------------------------
5803# Ensure that the configuration vars for the C compiler are
5804# suitably defined.  Those variables are subsequently used by
5805# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5806AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
5807AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
5808[AC_LANG_SAVE
5809
5810# Source file extension for Java test sources.
5811ac_ext=java
5812
5813# Object file extension for compiled Java test sources.
5814objext=o
5815_LT_AC_TAGVAR(objext, $1)=$objext
5816
5817# Code to be used in simple compile tests
5818lt_simple_compile_test_code="class foo {}"
5819
5820# Code to be used in simple link tests
5821lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
5822
5823# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5824_LT_AC_SYS_COMPILER
5825
5826# save warnings/boilerplate of simple test code
5827_LT_COMPILER_BOILERPLATE
5828_LT_LINKER_BOILERPLATE
5829
5830# Allow CC to be a program name with arguments.
5831lt_save_CC="$CC"
5832CC=${GCJ-"gcj"}
5833compiler=$CC
5834_LT_AC_TAGVAR(compiler, $1)=$CC
5835_LT_CC_BASENAME([$compiler])
5836
5837# GCJ did not exist at the time GCC didn't implicitly link libc in.
5838_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5839
5840_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
5841
5842AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
5843AC_LIBTOOL_PROG_COMPILER_PIC($1)
5844AC_LIBTOOL_PROG_CC_C_O($1)
5845AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
5846AC_LIBTOOL_PROG_LD_SHLIBS($1)
5847AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
5848AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
5849
5850AC_LIBTOOL_CONFIG($1)
5851
5852AC_LANG_RESTORE
5853CC="$lt_save_CC"
5854])# AC_LIBTOOL_LANG_GCJ_CONFIG
5855
5856
5857# AC_LIBTOOL_LANG_RC_CONFIG
5858# -------------------------
5859# Ensure that the configuration vars for the Windows resource compiler are
5860# suitably defined.  Those variables are subsequently used by
5861# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
5862AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
5863AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
5864[AC_LANG_SAVE
5865
5866# Source file extension for RC test sources.
5867ac_ext=rc
5868
5869# Object file extension for compiled RC test sources.
5870objext=o
5871_LT_AC_TAGVAR(objext, $1)=$objext
5872
5873# Code to be used in simple compile tests
5874lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
5875
5876# Code to be used in simple link tests
5877lt_simple_link_test_code="$lt_simple_compile_test_code"
5878
5879# ltmain only uses $CC for tagged configurations so make sure $CC is set.
5880_LT_AC_SYS_COMPILER
5881
5882# save warnings/boilerplate of simple test code
5883_LT_COMPILER_BOILERPLATE
5884_LT_LINKER_BOILERPLATE
5885
5886# Allow CC to be a program name with arguments.
5887lt_save_CC="$CC"
5888CC=${RC-"windres"}
5889compiler=$CC
5890_LT_AC_TAGVAR(compiler, $1)=$CC
5891_LT_CC_BASENAME([$compiler])
5892_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
5893
5894AC_LIBTOOL_CONFIG($1)
5895
5896AC_LANG_RESTORE
5897CC="$lt_save_CC"
5898])# AC_LIBTOOL_LANG_RC_CONFIG
5899
5900
5901# AC_LIBTOOL_CONFIG([TAGNAME])
5902# ----------------------------
5903# If TAGNAME is not passed, then create an initial libtool script
5904# with a default configuration from the untagged config vars.  Otherwise
5905# add code to config.status for appending the configuration named by
5906# TAGNAME from the matching tagged config vars.
5907AC_DEFUN([AC_LIBTOOL_CONFIG],
5908[# The else clause should only fire when bootstrapping the
5909# libtool distribution, otherwise you forgot to ship ltmain.sh
5910# with your package, and you will get complaints that there are
5911# no rules to generate ltmain.sh.
5912if test -f "$ltmain"; then
5913  # See if we are running on zsh, and set the options which allow our commands through
5914  # without removal of \ escapes.
5915  if test -n "${ZSH_VERSION+set}" ; then
5916    setopt NO_GLOB_SUBST
5917  fi
5918  # Now quote all the things that may contain metacharacters while being
5919  # careful not to overquote the AC_SUBSTed values.  We take copies of the
5920  # variables and quote the copies for generation of the libtool script.
5921  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
5922    SED SHELL STRIP \
5923    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
5924    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
5925    deplibs_check_method reload_flag reload_cmds need_locks \
5926    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
5927    lt_cv_sys_global_symbol_to_c_name_address \
5928    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
5929    old_postinstall_cmds old_postuninstall_cmds \
5930    _LT_AC_TAGVAR(compiler, $1) \
5931    _LT_AC_TAGVAR(CC, $1) \
5932    _LT_AC_TAGVAR(LD, $1) \
5933    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
5934    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
5935    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
5936    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
5937    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
5938    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
5939    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
5940    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
5941    _LT_AC_TAGVAR(old_archive_cmds, $1) \
5942    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
5943    _LT_AC_TAGVAR(predep_objects, $1) \
5944    _LT_AC_TAGVAR(postdep_objects, $1) \
5945    _LT_AC_TAGVAR(predeps, $1) \
5946    _LT_AC_TAGVAR(postdeps, $1) \
5947    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
5948    _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \
5949    _LT_AC_TAGVAR(archive_cmds, $1) \
5950    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
5951    _LT_AC_TAGVAR(postinstall_cmds, $1) \
5952    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
5953    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
5954    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
5955    _LT_AC_TAGVAR(no_undefined_flag, $1) \
5956    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
5957    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
5958    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
5959    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
5960    _LT_AC_TAGVAR(hardcode_automatic, $1) \
5961    _LT_AC_TAGVAR(module_cmds, $1) \
5962    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
5963    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
5964    _LT_AC_TAGVAR(fix_srcfile_path, $1) \
5965    _LT_AC_TAGVAR(exclude_expsyms, $1) \
5966    _LT_AC_TAGVAR(include_expsyms, $1); do
5967
5968    case $var in
5969    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
5970    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
5971    _LT_AC_TAGVAR(archive_cmds, $1) | \
5972    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
5973    _LT_AC_TAGVAR(module_cmds, $1) | \
5974    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
5975    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
5976    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
5977    extract_expsyms_cmds | reload_cmds | finish_cmds | \
5978    postinstall_cmds | postuninstall_cmds | \
5979    old_postinstall_cmds | old_postuninstall_cmds | \
5980    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
5981      # Double-quote double-evaled strings.
5982      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
5983      ;;
5984    *)
5985      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
5986      ;;
5987    esac
5988  done
5989
5990  case $lt_echo in
5991  *'\[$]0 --fallback-echo"')
5992    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
5993    ;;
5994  esac
5995
5996ifelse([$1], [],
5997  [cfgfile="${ofile}T"
5998  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
5999  $rm -f "$cfgfile"
6000  AC_MSG_NOTICE([creating $ofile])],
6001  [cfgfile="$ofile"])
6002
6003  cat <<__EOF__ >> "$cfgfile"
6004ifelse([$1], [],
6005[#! $SHELL
6006
6007# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
6008# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
6009# NOTE: Changes made to this file will be lost: look at ltmain.sh.
6010#
6011# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
6012# Free Software Foundation, Inc.
6013#
6014# This file is part of GNU Libtool:
6015# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
6016#
6017# This program is free software; you can redistribute it and/or modify
6018# it under the terms of the GNU General Public License as published by
6019# the Free Software Foundation; either version 2 of the License, or
6020# (at your option) any later version.
6021#
6022# This program is distributed in the hope that it will be useful, but
6023# WITHOUT ANY WARRANTY; without even the implied warranty of
6024# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
6025# General Public License for more details.
6026#
6027# You should have received a copy of the GNU General Public License
6028# along with this program; if not, write to the Free Software
6029# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
6030#
6031# As a special exception to the GNU General Public License, if you
6032# distribute this file as part of a program that contains a
6033# configuration script generated by Autoconf, you may include it under
6034# the same distribution terms that you use for the rest of that program.
6035
6036# A sed program that does not truncate output.
6037SED=$lt_SED
6038
6039# Sed that helps us avoid accidentally triggering echo(1) options like -n.
6040Xsed="$SED -e 1s/^X//"
6041
6042# The HP-UX ksh and POSIX shell print the target directory to stdout
6043# if CDPATH is set.
6044(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
6045
6046# The names of the tagged configurations supported by this script.
6047available_tags=
6048
6049# ### BEGIN LIBTOOL CONFIG],
6050[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
6051
6052# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6053
6054# Shell to use when invoking shell scripts.
6055SHELL=$lt_SHELL
6056
6057# Whether or not to build shared libraries.
6058build_libtool_libs=$enable_shared
6059
6060# Whether or not to build static libraries.
6061build_old_libs=$enable_static
6062
6063# Whether or not to add -lc for building shared libraries.
6064build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
6065
6066# Whether or not to disallow shared libs when runtime libs are static
6067allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
6068
6069# Whether or not to optimize for fast installation.
6070fast_install=$enable_fast_install
6071
6072# The host system.
6073host_alias=$host_alias
6074host=$host
6075host_os=$host_os
6076
6077# The build system.
6078build_alias=$build_alias
6079build=$build
6080build_os=$build_os
6081
6082# An echo program that does not interpret backslashes.
6083echo=$lt_echo
6084
6085# The archiver.
6086AR=$lt_AR
6087AR_FLAGS=$lt_AR_FLAGS
6088
6089# A C compiler.
6090LTCC=$lt_LTCC
6091
6092# LTCC compiler flags.
6093LTCFLAGS=$lt_LTCFLAGS
6094
6095# A language-specific compiler.
6096CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
6097
6098# Is the compiler the GNU C compiler?
6099with_gcc=$_LT_AC_TAGVAR(GCC, $1)
6100
6101# An ERE matcher.
6102EGREP=$lt_EGREP
6103
6104# The linker used to build libraries.
6105LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
6106
6107# Whether we need hard or soft links.
6108LN_S=$lt_LN_S
6109
6110# A BSD-compatible nm program.
6111NM=$lt_NM
6112
6113# A symbol stripping program
6114STRIP=$lt_STRIP
6115
6116# Used to examine libraries when file_magic_cmd begins "file"
6117MAGIC_CMD=$MAGIC_CMD
6118
6119# Used on cygwin: DLL creation program.
6120DLLTOOL="$DLLTOOL"
6121
6122# Used on cygwin: object dumper.
6123OBJDUMP="$OBJDUMP"
6124
6125# Used on cygwin: assembler.
6126AS="$AS"
6127
6128# The name of the directory that contains temporary libtool files.
6129objdir=$objdir
6130
6131# How to create reloadable object files.
6132reload_flag=$lt_reload_flag
6133reload_cmds=$lt_reload_cmds
6134
6135# How to pass a linker flag through the compiler.
6136wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6137
6138# Object file suffix (normally "o").
6139objext="$ac_objext"
6140
6141# Old archive suffix (normally "a").
6142libext="$libext"
6143
6144# Shared library suffix (normally ".so").
6145shrext_cmds='$shrext_cmds'
6146
6147# Executable file suffix (normally "").
6148exeext="$exeext"
6149
6150# Additional compiler flags for building library objects.
6151pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
6152pic_mode=$pic_mode
6153
6154# What is the maximum length of a command?
6155max_cmd_len=$lt_cv_sys_max_cmd_len
6156
6157# Does compiler simultaneously support -c and -o options?
6158compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
6159
6160# Must we lock files when doing compilation?
6161need_locks=$lt_need_locks
6162
6163# Do we need the lib prefix for modules?
6164need_lib_prefix=$need_lib_prefix
6165
6166# Do we need a version for libraries?
6167need_version=$need_version
6168
6169# Whether dlopen is supported.
6170dlopen_support=$enable_dlopen
6171
6172# Whether dlopen of programs is supported.
6173dlopen_self=$enable_dlopen_self
6174
6175# Whether dlopen of statically linked programs is supported.
6176dlopen_self_static=$enable_dlopen_self_static
6177
6178# Compiler flag to prevent dynamic linking.
6179link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
6180
6181# Compiler flag to turn off builtin functions.
6182no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
6183
6184# Compiler flag to allow reflexive dlopens.
6185export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
6186
6187# Compiler flag to generate shared objects directly from archives.
6188whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
6189
6190# Compiler flag to generate thread-safe objects.
6191thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
6192
6193# Library versioning type.
6194version_type=$version_type
6195
6196# Format of library name prefix.
6197libname_spec=$lt_libname_spec
6198
6199# List of archive names.  First name is the real one, the rest are links.
6200# The last name is the one that the linker finds with -lNAME.
6201library_names_spec=$lt_library_names_spec
6202
6203# The coded name of the library, if different from the real name.
6204soname_spec=$lt_soname_spec
6205
6206# Commands used to build and install an old-style archive.
6207RANLIB=$lt_RANLIB
6208old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
6209old_postinstall_cmds=$lt_old_postinstall_cmds
6210old_postuninstall_cmds=$lt_old_postuninstall_cmds
6211
6212# Create an old-style archive from a shared archive.
6213old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
6214
6215# Create a temporary old-style archive to link instead of a shared archive.
6216old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
6217
6218# Commands used to build and install a shared archive.
6219archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
6220archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
6221postinstall_cmds=$lt_postinstall_cmds
6222postuninstall_cmds=$lt_postuninstall_cmds
6223
6224# Commands used to build a loadable module (assumed same as above if empty)
6225module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
6226module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
6227
6228# Commands to strip libraries.
6229old_striplib=$lt_old_striplib
6230striplib=$lt_striplib
6231
6232# Dependencies to place before the objects being linked to create a
6233# shared library.
6234predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
6235
6236# Dependencies to place after the objects being linked to create a
6237# shared library.
6238postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
6239
6240# Dependencies to place before the objects being linked to create a
6241# shared library.
6242predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
6243
6244# Dependencies to place after the objects being linked to create a
6245# shared library.
6246postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
6247
6248# The directories searched by this compiler when creating a shared
6249# library
6250compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)
6251
6252# The library search path used internally by the compiler when linking
6253# a shared library.
6254compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
6255
6256# Method to check whether dependent libraries are shared objects.
6257deplibs_check_method=$lt_deplibs_check_method
6258
6259# Command to use when deplibs_check_method == file_magic.
6260file_magic_cmd=$lt_file_magic_cmd
6261
6262# Flag that allows shared libraries with undefined symbols to be built.
6263allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
6264
6265# Flag that forces no undefined symbols.
6266no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
6267
6268# Commands used to finish a libtool library installation in a directory.
6269finish_cmds=$lt_finish_cmds
6270
6271# Same as above, but a single script fragment to be evaled but not shown.
6272finish_eval=$lt_finish_eval
6273
6274# Take the output of nm and produce a listing of raw symbols and C names.
6275global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
6276
6277# Transform the output of nm in a proper C declaration
6278global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
6279
6280# Transform the output of nm in a C name address pair
6281global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
6282
6283# This is the shared library runtime path variable.
6284runpath_var=$runpath_var
6285
6286# This is the shared library path variable.
6287shlibpath_var=$shlibpath_var
6288
6289# Is shlibpath searched before the hard-coded library search path?
6290shlibpath_overrides_runpath=$shlibpath_overrides_runpath
6291
6292# How to hardcode a shared library path into an executable.
6293hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
6294
6295# Whether we should hardcode library paths into libraries.
6296hardcode_into_libs=$hardcode_into_libs
6297
6298# Flag to hardcode \$libdir into a binary during linking.
6299# This must work even if \$libdir does not exist.
6300hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
6301
6302# If ld is used when linking, flag to hardcode \$libdir into
6303# a binary during linking. This must work even if \$libdir does
6304# not exist.
6305hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
6306
6307# Whether we need a single -rpath flag with a separated argument.
6308hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
6309
6310# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
6311# resulting binary.
6312hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
6313
6314# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
6315# resulting binary.
6316hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
6317
6318# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
6319# the resulting binary.
6320hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
6321
6322# Set to yes if building a shared library automatically hardcodes DIR into the library
6323# and all subsequent libraries and executables linked against it.
6324hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
6325
6326# Variables whose values should be saved in libtool wrapper scripts and
6327# restored at relink time.
6328variables_saved_for_relink="$variables_saved_for_relink"
6329
6330# Whether libtool must link a program against all its dependency libraries.
6331link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
6332
6333# Compile-time system search path for libraries
6334sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
6335
6336# Run-time system search path for libraries
6337sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
6338
6339# Fix the shell variable \$srcfile for the compiler.
6340fix_srcfile_path=$lt_fix_srcfile_path
6341
6342# Set to yes if exported symbols are required.
6343always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
6344
6345# The commands to list exported symbols.
6346export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
6347
6348# The commands to extract the exported symbol list from a shared archive.
6349extract_expsyms_cmds=$lt_extract_expsyms_cmds
6350
6351# Symbols that should not be listed in the preloaded symbols.
6352exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
6353
6354# Symbols that must always be exported.
6355include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
6356
6357ifelse([$1],[],
6358[# ### END LIBTOOL CONFIG],
6359[# ### END LIBTOOL TAG CONFIG: $tagname])
6360
6361__EOF__
6362
6363ifelse([$1],[], [
6364  case $host_os in
6365  aix3*)
6366    cat <<\EOF >> "$cfgfile"
6367
6368# AIX sometimes has problems with the GCC collect2 program.  For some
6369# reason, if we set the COLLECT_NAMES environment variable, the problems
6370# vanish in a puff of smoke.
6371if test "X${COLLECT_NAMES+set}" != Xset; then
6372  COLLECT_NAMES=
6373  export COLLECT_NAMES
6374fi
6375EOF
6376    ;;
6377  esac
6378
6379  # We use sed instead of cat because bash on DJGPP gets confused if
6380  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
6381  # text mode, it properly converts lines to CR/LF.  This bash problem
6382  # is reportedly fixed, but why not run on old versions too?
6383  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
6384
6385  mv -f "$cfgfile" "$ofile" || \
6386    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
6387  chmod +x "$ofile"
6388])
6389else
6390  # If there is no Makefile yet, we rely on a make rule to execute
6391  # `config.status --recheck' to rerun these tests and create the
6392  # libtool script then.
6393  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
6394  if test -f "$ltmain_in"; then
6395    test -f Makefile && make "$ltmain"
6396  fi
6397fi
6398])# AC_LIBTOOL_CONFIG
6399
6400
6401# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
6402# -------------------------------------------
6403AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
6404[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
6405
6406_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
6407
6408if test "$GCC" = yes; then
6409  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
6410
6411  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
6412    lt_cv_prog_compiler_rtti_exceptions,
6413    [-fno-rtti -fno-exceptions], [],
6414    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
6415fi
6416])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
6417
6418
6419# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
6420# ---------------------------------
6421AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
6422[AC_REQUIRE([AC_CANONICAL_HOST])
6423AC_REQUIRE([LT_AC_PROG_SED])
6424AC_REQUIRE([AC_PROG_NM])
6425AC_REQUIRE([AC_OBJEXT])
6426# Check for command to grab the raw symbol name followed by C symbol from nm.
6427AC_MSG_CHECKING([command to parse $NM output from $compiler object])
6428AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
6429[
6430# These are sane defaults that work on at least a few old systems.
6431# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
6432
6433# Character class describing NM global symbol codes.
6434symcode='[[BCDEGRST]]'
6435
6436# Regexp to match symbols that can be accessed directly from C.
6437sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
6438
6439# Transform an extracted symbol line into a proper C declaration
6440lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
6441
6442# Transform an extracted symbol line into symbol name and symbol address
6443lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
6444
6445# Define system-specific variables.
6446case $host_os in
6447aix*)
6448  symcode='[[BCDT]]'
6449  ;;
6450cygwin* | mingw* | pw32*)
6451  symcode='[[ABCDGISTW]]'
6452  ;;
6453hpux*) # Its linker distinguishes data from code symbols
6454  if test "$host_cpu" = ia64; then
6455    symcode='[[ABCDEGRST]]'
6456  fi
6457  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6458  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
6459  ;;
6460linux* | k*bsd*-gnu)
6461  if test "$host_cpu" = ia64; then
6462    symcode='[[ABCDGIRSTW]]'
6463    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
6464    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
6465  fi
6466  ;;
6467irix* | nonstopux*)
6468  symcode='[[BCDEGRST]]'
6469  ;;
6470osf*)
6471  symcode='[[BCDEGQRST]]'
6472  ;;
6473solaris*)
6474  symcode='[[BDRT]]'
6475  ;;
6476sco3.2v5*)
6477  symcode='[[DT]]'
6478  ;;
6479sysv4.2uw2*)
6480  symcode='[[DT]]'
6481  ;;
6482sysv5* | sco5v6* | unixware* | OpenUNIX*)
6483  symcode='[[ABDT]]'
6484  ;;
6485sysv4)
6486  symcode='[[DFNSTU]]'
6487  ;;
6488esac
6489
6490# Handle CRLF in mingw tool chain
6491opt_cr=
6492case $build_os in
6493mingw*)
6494  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
6495  ;;
6496esac
6497
6498# If we're using GNU nm, then use its standard symbol codes.
6499case `$NM -V 2>&1` in
6500*GNU* | *'with BFD'*)
6501  symcode='[[ABCDGIRSTW]]' ;;
6502esac
6503
6504# Try without a prefix undercore, then with it.
6505for ac_symprfx in "" "_"; do
6506
6507  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
6508  symxfrm="\\1 $ac_symprfx\\2 \\2"
6509
6510  # Write the raw and C identifiers.
6511  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
6512
6513  # Check to see that the pipe works correctly.
6514  pipe_works=no
6515
6516  rm -f conftest*
6517  cat > conftest.$ac_ext <<EOF
6518#ifdef __cplusplus
6519extern "C" {
6520#endif
6521char nm_test_var;
6522void nm_test_func(){}
6523#ifdef __cplusplus
6524}
6525#endif
6526int main(){nm_test_var='a';nm_test_func();return(0);}
6527EOF
6528
6529  if AC_TRY_EVAL(ac_compile); then
6530    # Now try to grab the symbols.
6531    nlist=conftest.nm
6532    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
6533      # Try sorting and uniquifying the output.
6534      if sort "$nlist" | uniq > "$nlist"T; then
6535	mv -f "$nlist"T "$nlist"
6536      else
6537	rm -f "$nlist"T
6538      fi
6539
6540      # Make sure that we snagged all the symbols we need.
6541      if grep ' nm_test_var$' "$nlist" >/dev/null; then
6542	if grep ' nm_test_func$' "$nlist" >/dev/null; then
6543	  cat <<EOF > conftest.$ac_ext
6544#ifdef __cplusplus
6545extern "C" {
6546#endif
6547
6548EOF
6549	  # Now generate the symbol file.
6550	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
6551
6552	  cat <<EOF >> conftest.$ac_ext
6553#if defined (__STDC__) && __STDC__
6554# define lt_ptr_t void *
6555#else
6556# define lt_ptr_t char *
6557# define const
6558#endif
6559
6560/* The mapping between symbol names and symbols. */
6561const struct {
6562  const char *name;
6563  lt_ptr_t address;
6564}
6565lt_preloaded_symbols[[]] =
6566{
6567EOF
6568	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
6569	  cat <<\EOF >> conftest.$ac_ext
6570  {0, (lt_ptr_t) 0}
6571};
6572
6573#ifdef __cplusplus
6574}
6575#endif
6576EOF
6577	  # Now try linking the two files.
6578	  mv conftest.$ac_objext conftstm.$ac_objext
6579	  lt_save_LIBS="$LIBS"
6580	  lt_save_CFLAGS="$CFLAGS"
6581	  LIBS="conftstm.$ac_objext"
6582	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
6583	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
6584	    pipe_works=yes
6585	  fi
6586	  LIBS="$lt_save_LIBS"
6587	  CFLAGS="$lt_save_CFLAGS"
6588	else
6589	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
6590	fi
6591      else
6592	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
6593      fi
6594    else
6595      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
6596    fi
6597  else
6598    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
6599    cat conftest.$ac_ext >&5
6600  fi
6601  rm -rf conftest* conftst*
6602
6603  # Do not use the global_symbol_pipe unless it works.
6604  if test "$pipe_works" = yes; then
6605    break
6606  else
6607    lt_cv_sys_global_symbol_pipe=
6608  fi
6609done
6610])
6611if test -z "$lt_cv_sys_global_symbol_pipe"; then
6612  lt_cv_sys_global_symbol_to_cdecl=
6613fi
6614if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
6615  AC_MSG_RESULT(failed)
6616else
6617  AC_MSG_RESULT(ok)
6618fi
6619]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
6620
6621
6622# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
6623# ---------------------------------------
6624AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
6625[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
6626_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6627_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
6628
6629AC_MSG_CHECKING([for $compiler option to produce PIC])
6630 ifelse([$1],[CXX],[
6631  # C++ specific cases for pic, static, wl, etc.
6632  if test "$GXX" = yes; then
6633    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6634    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6635
6636    case $host_os in
6637    aix*)
6638      # All AIX code is PIC.
6639      if test "$host_cpu" = ia64; then
6640	# AIX 5 now supports IA64 processor
6641	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6642      fi
6643      ;;
6644    amigaos*)
6645      # FIXME: we need at least 68020 code to build shared libraries, but
6646      # adding the `-m68020' flag to GCC prevents building anything better,
6647      # like `-m68040'.
6648      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6649      ;;
6650    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6651      # PIC is the default for these OSes.
6652      ;;
6653    mingw* | cygwin* | os2* | pw32*)
6654      # This hack is so that the source file can tell whether it is being
6655      # built for inclusion in a dll (and should export symbols for example).
6656      # Although the cygwin gcc ignores -fPIC, still need this for old-style
6657      # (--disable-auto-import) libraries
6658      m4_if([$1], [GCJ], [],
6659	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6660      ;;
6661    darwin* | rhapsody*)
6662      # PIC is the default on this platform
6663      # Common symbols not allowed in MH_DYLIB files
6664      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6665      ;;
6666    *djgpp*)
6667      # DJGPP does not support shared libraries at all
6668      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6669      ;;
6670    interix[[3-9]]*)
6671      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6672      # Instead, we relocate shared libraries at runtime.
6673      ;;
6674    sysv4*MP*)
6675      if test -d /usr/nec; then
6676	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6677      fi
6678      ;;
6679    hpux*)
6680      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6681      # not for PA HP-UX.
6682      case $host_cpu in
6683      hppa*64*|ia64*)
6684	;;
6685      *)
6686	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6687	;;
6688      esac
6689      ;;
6690    *)
6691      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6692      ;;
6693    esac
6694  else
6695    case $host_os in
6696      aix[[4-9]]*)
6697	# All AIX code is PIC.
6698	if test "$host_cpu" = ia64; then
6699	  # AIX 5 now supports IA64 processor
6700	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6701	else
6702	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6703	fi
6704	;;
6705      chorus*)
6706	case $cc_basename in
6707	cxch68*)
6708	  # Green Hills C++ Compiler
6709	  # _LT_AC_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"
6710	  ;;
6711	esac
6712	;;
6713       darwin*)
6714         # PIC is the default on this platform
6715         # Common symbols not allowed in MH_DYLIB files
6716         case $cc_basename in
6717           xlc*)
6718           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
6719           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6720           ;;
6721         esac
6722       ;;
6723      dgux*)
6724	case $cc_basename in
6725	  ec++*)
6726	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6727	    ;;
6728	  ghcx*)
6729	    # Green Hills C++ Compiler
6730	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6731	    ;;
6732	  *)
6733	    ;;
6734	esac
6735	;;
6736      freebsd* | dragonfly*)
6737	# FreeBSD uses GNU C++
6738	;;
6739      hpux9* | hpux10* | hpux11*)
6740	case $cc_basename in
6741	  CC*)
6742	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6743	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6744	    if test "$host_cpu" != ia64; then
6745	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6746	    fi
6747	    ;;
6748	  aCC*)
6749	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6750	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
6751	    case $host_cpu in
6752	    hppa*64*|ia64*)
6753	      # +Z the default
6754	      ;;
6755	    *)
6756	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
6757	      ;;
6758	    esac
6759	    ;;
6760	  *)
6761	    ;;
6762	esac
6763	;;
6764      interix*)
6765	# This is c89, which is MS Visual C++ (no shared libs)
6766	# Anyone wants to do a port?
6767	;;
6768      irix5* | irix6* | nonstopux*)
6769	case $cc_basename in
6770	  CC*)
6771	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6772	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6773	    # CC pic flag -KPIC is the default.
6774	    ;;
6775	  *)
6776	    ;;
6777	esac
6778	;;
6779      linux* | k*bsd*-gnu)
6780	case $cc_basename in
6781	  KCC*)
6782	    # KAI C++ Compiler
6783	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6784	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6785	    ;;
6786	  icpc* | ecpc*)
6787	    # Intel C++
6788	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6789	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6790	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6791	    ;;
6792	  pgCC* | pgcpp*)
6793	    # Portland Group C++ compiler.
6794	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6795	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
6796	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6797	    ;;
6798	  cxx*)
6799	    # Compaq C++
6800	    # Make sure the PIC flag is empty.  It appears that all Alpha
6801	    # Linux and Compaq Tru64 Unix objects are PIC.
6802	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6803	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6804	    ;;
6805	  *)
6806	    case `$CC -V 2>&1 | sed 5q` in
6807	    *Sun\ C*)
6808	      # Sun C++ 5.9
6809	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6810	      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6811	      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6812	      ;;
6813	    esac
6814	    ;;
6815	esac
6816	;;
6817      lynxos*)
6818	;;
6819      m88k*)
6820	;;
6821      mvs*)
6822	case $cc_basename in
6823	  cxx*)
6824	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
6825	    ;;
6826	  *)
6827	    ;;
6828	esac
6829	;;
6830      netbsd*)
6831	;;
6832      osf3* | osf4* | osf5*)
6833	case $cc_basename in
6834	  KCC*)
6835	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
6836	    ;;
6837	  RCC*)
6838	    # Rational C++ 2.4.1
6839	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6840	    ;;
6841	  cxx*)
6842	    # Digital/Compaq C++
6843	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6844	    # Make sure the PIC flag is empty.  It appears that all Alpha
6845	    # Linux and Compaq Tru64 Unix objects are PIC.
6846	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
6847	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
6848	    ;;
6849	  *)
6850	    ;;
6851	esac
6852	;;
6853      psos*)
6854	;;
6855      solaris*)
6856	case $cc_basename in
6857	  CC*)
6858	    # Sun C++ 4.2, 5.x and Centerline C++
6859	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6860	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6861	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
6862	    ;;
6863	  gcx*)
6864	    # Green Hills C++ Compiler
6865	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
6866	    ;;
6867	  *)
6868	    ;;
6869	esac
6870	;;
6871      sunos4*)
6872	case $cc_basename in
6873	  CC*)
6874	    # Sun C++ 4.x
6875	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6876	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6877	    ;;
6878	  lcc*)
6879	    # Lucid
6880	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
6881	    ;;
6882	  *)
6883	    ;;
6884	esac
6885	;;
6886      tandem*)
6887	case $cc_basename in
6888	  NCC*)
6889	    # NonStop-UX NCC 3.20
6890	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6891	    ;;
6892	  *)
6893	    ;;
6894	esac
6895	;;
6896      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
6897	case $cc_basename in
6898	  CC*)
6899	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6900	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
6901	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6902	    ;;
6903	esac
6904	;;
6905      vxworks*)
6906	;;
6907      *)
6908	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6909	;;
6910    esac
6911  fi
6912],
6913[
6914  if test "$GCC" = yes; then
6915    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6916    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
6917
6918    case $host_os in
6919      aix*)
6920      # All AIX code is PIC.
6921      if test "$host_cpu" = ia64; then
6922	# AIX 5 now supports IA64 processor
6923	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6924      fi
6925      ;;
6926
6927    amigaos*)
6928      # FIXME: we need at least 68020 code to build shared libraries, but
6929      # adding the `-m68020' flag to GCC prevents building anything better,
6930      # like `-m68040'.
6931      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
6932      ;;
6933
6934    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
6935      # PIC is the default for these OSes.
6936      ;;
6937
6938    mingw* | cygwin* | pw32* | os2*)
6939      # This hack is so that the source file can tell whether it is being
6940      # built for inclusion in a dll (and should export symbols for example).
6941      # Although the cygwin gcc ignores -fPIC, still need this for old-style
6942      # (--disable-auto-import) libraries
6943      m4_if([$1], [GCJ], [],
6944	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
6945      ;;
6946
6947    darwin* | rhapsody*)
6948      # PIC is the default on this platform
6949      # Common symbols not allowed in MH_DYLIB files
6950      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
6951      ;;
6952
6953    interix[[3-9]]*)
6954      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
6955      # Instead, we relocate shared libraries at runtime.
6956      ;;
6957
6958    msdosdjgpp*)
6959      # Just because we use GCC doesn't mean we suddenly get shared libraries
6960      # on systems that don't support them.
6961      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
6962      enable_shared=no
6963      ;;
6964
6965    sysv4*MP*)
6966      if test -d /usr/nec; then
6967	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
6968      fi
6969      ;;
6970
6971    hpux*)
6972      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
6973      # not for PA HP-UX.
6974      case $host_cpu in
6975      hppa*64*|ia64*)
6976	# +Z the default
6977	;;
6978      *)
6979	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6980	;;
6981      esac
6982      ;;
6983
6984    *)
6985      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
6986      ;;
6987    esac
6988  else
6989    # PORTME Check for flag to pass linker flags through the system compiler.
6990    case $host_os in
6991    aix*)
6992      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
6993      if test "$host_cpu" = ia64; then
6994	# AIX 5 now supports IA64 processor
6995	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
6996      else
6997	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
6998      fi
6999      ;;
7000      darwin*)
7001        # PIC is the default on this platform
7002        # Common symbols not allowed in MH_DYLIB files
7003       case $cc_basename in
7004         xlc*)
7005         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
7006         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7007         ;;
7008       esac
7009       ;;
7010
7011    mingw* | cygwin* | pw32* | os2*)
7012      # This hack is so that the source file can tell whether it is being
7013      # built for inclusion in a dll (and should export symbols for example).
7014      m4_if([$1], [GCJ], [],
7015	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
7016      ;;
7017
7018    hpux9* | hpux10* | hpux11*)
7019      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7020      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
7021      # not for PA HP-UX.
7022      case $host_cpu in
7023      hppa*64*|ia64*)
7024	# +Z the default
7025	;;
7026      *)
7027	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
7028	;;
7029      esac
7030      # Is there a better lt_prog_compiler_static that works with the bundled CC?
7031      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
7032      ;;
7033
7034    irix5* | irix6* | nonstopux*)
7035      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7036      # PIC (with -KPIC) is the default.
7037      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7038      ;;
7039
7040    newsos6)
7041      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7042      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7043      ;;
7044
7045    linux* | k*bsd*-gnu)
7046      case $cc_basename in
7047      icc* | ecc*)
7048	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7049	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7050	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
7051        ;;
7052      pgcc* | pgf77* | pgf90* | pgf95*)
7053        # Portland Group compilers (*not* the Pentium gcc compiler,
7054	# which looks to be a dead project)
7055	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7056	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
7057	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7058        ;;
7059      ccc*)
7060        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7061        # All Alpha code is PIC.
7062        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7063        ;;
7064      *)
7065        case `$CC -V 2>&1 | sed 5q` in
7066	*Sun\ C*)
7067	  # Sun C 5.9
7068	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7069	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7070	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7071	  ;;
7072	*Sun\ F*)
7073	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
7074	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7075	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7076	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
7077	  ;;
7078	esac
7079	;;
7080      esac
7081      ;;
7082
7083    osf3* | osf4* | osf5*)
7084      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7085      # All OSF/1 code is PIC.
7086      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7087      ;;
7088
7089    rdos*)
7090      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
7091      ;;
7092
7093    solaris*)
7094      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7095      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7096      case $cc_basename in
7097      f77* | f90* | f95*)
7098	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
7099      *)
7100	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
7101      esac
7102      ;;
7103
7104    sunos4*)
7105      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
7106      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
7107      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7108      ;;
7109
7110    sysv4 | sysv4.2uw2* | sysv4.3*)
7111      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7112      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7113      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7114      ;;
7115
7116    sysv4*MP*)
7117      if test -d /usr/nec ;then
7118	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
7119	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7120      fi
7121      ;;
7122
7123    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
7124      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7125      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
7126      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7127      ;;
7128
7129    unicos*)
7130      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
7131      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
7132      ;;
7133
7134    uts4*)
7135      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
7136      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7137      ;;
7138
7139    *)
7140      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
7141      ;;
7142    esac
7143  fi
7144])
7145AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
7146
7147#
7148# Check to make sure the PIC flag actually works.
7149#
7150if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
7151  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
7152    _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1),
7153    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
7154    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
7155     "" | " "*) ;;
7156     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
7157     esac],
7158    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
7159     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
7160fi
7161case $host_os in
7162  # For platforms which do not support PIC, -DPIC is meaningless:
7163  *djgpp*)
7164    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
7165    ;;
7166  *)
7167    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
7168    ;;
7169esac
7170
7171#
7172# Check to make sure the static flag actually works.
7173#
7174wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
7175AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
7176  _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1),
7177  $lt_tmp_static_flag,
7178  [],
7179  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
7180])
7181
7182
7183# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
7184# ------------------------------------
7185# See if the linker supports building shared libraries.
7186AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
7187[AC_REQUIRE([LT_AC_PROG_SED])dnl
7188AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
7189ifelse([$1],[CXX],[
7190  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7191  case $host_os in
7192  aix[[4-9]]*)
7193    # If we're using GNU nm, then we don't want the "-C" option.
7194    # -C means demangle to AIX nm, but means don't demangle with GNU nm
7195    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
7196      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
7197    else
7198      _LT_AC_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'
7199    fi
7200    ;;
7201  pw32*)
7202    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
7203  ;;
7204  cygwin* | mingw*)
7205    _LT_AC_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'
7206  ;;
7207  *)
7208    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7209  ;;
7210  esac
7211  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
7212],[
7213  runpath_var=
7214  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
7215  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
7216  _LT_AC_TAGVAR(archive_cmds, $1)=
7217  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
7218  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
7219  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
7220  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
7221  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7222  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
7223  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
7224  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
7225  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
7226  _LT_AC_TAGVAR(hardcode_direct, $1)=no
7227  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
7228  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7229  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
7230  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
7231  _LT_AC_TAGVAR(module_cmds, $1)=
7232  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
7233  _LT_AC_TAGVAR(always_export_symbols, $1)=no
7234  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
7235  # include_expsyms should be a list of space-separated symbols to be *always*
7236  # included in the symbol list
7237  _LT_AC_TAGVAR(include_expsyms, $1)=
7238  # exclude_expsyms can be an extended regexp of symbols to exclude
7239  # it will be wrapped by ` (' and `)$', so one must not match beginning or
7240  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
7241  # as well as any symbol that contains `d'.
7242  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
7243  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
7244  # platforms (ab)use it in PIC code, but their linkers get confused if
7245  # the symbol is explicitly referenced.  Since portable code cannot
7246  # rely on this symbol name, it's probably fine to never include it in
7247  # preloaded symbol tables.
7248  # Exclude shared library initialization/finalization symbols.
7249dnl Note also adjust exclude_expsyms for C++ above.
7250  extract_expsyms_cmds=
7251  # Just being paranoid about ensuring that cc_basename is set.
7252  _LT_CC_BASENAME([$compiler])
7253  case $host_os in
7254  cygwin* | mingw* | pw32*)
7255    # FIXME: the MSVC++ port hasn't been tested in a loooong time
7256    # When not using gcc, we currently assume that we are using
7257    # Microsoft Visual C++.
7258    if test "$GCC" != yes; then
7259      with_gnu_ld=no
7260    fi
7261    ;;
7262  interix*)
7263    # we just hope/assume this is gcc and not c89 (= MSVC++)
7264    with_gnu_ld=yes
7265    ;;
7266  openbsd*)
7267    with_gnu_ld=no
7268    ;;
7269  esac
7270
7271  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
7272  if test "$with_gnu_ld" = yes; then
7273    # If archive_cmds runs LD, not CC, wlarc should be empty
7274    wlarc='${wl}'
7275
7276    # Set some defaults for GNU ld with shared library support. These
7277    # are reset later if shared libraries are not supported. Putting them
7278    # here allows them to be overridden if necessary.
7279    runpath_var=LD_RUN_PATH
7280    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
7281    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7282    # ancient GNU ld didn't support --whole-archive et. al.
7283    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
7284	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
7285      else
7286  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7287    fi
7288    supports_anon_versioning=no
7289    case `$LD -v 2>/dev/null` in
7290      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
7291      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
7292      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
7293      *\ 2.11.*) ;; # other 2.11 versions
7294      *) supports_anon_versioning=yes ;;
7295    esac
7296
7297    # See if GNU ld supports shared libraries.
7298    case $host_os in
7299    aix[[3-9]]*)
7300      # On AIX/PPC, the GNU linker is very broken
7301      if test "$host_cpu" != ia64; then
7302	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7303	cat <<EOF 1>&2
7304
7305*** Warning: the GNU linker, at least up to release 2.9.1, is reported
7306*** to be unable to reliably create shared libraries on AIX.
7307*** Therefore, libtool is disabling shared libraries support.  If you
7308*** really care for shared libraries, you may want to modify your PATH
7309*** so that a non-GNU linker is found, and then restart.
7310
7311EOF
7312      fi
7313      ;;
7314
7315    amigaos*)
7316      _LT_AC_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)'
7317      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7318      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7319
7320      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
7321      # that the semantics of dynamic libraries on AmigaOS, at least up
7322      # to version 4, is to share data among multiple programs linked
7323      # with the same dynamic library.  Since this doesn't match the
7324      # behavior of shared libraries on other platforms, we can't use
7325      # them.
7326      _LT_AC_TAGVAR(ld_shlibs, $1)=no
7327      ;;
7328
7329    beos*)
7330      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7331	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7332	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
7333	# support --undefined.  This deserves some investigation.  FIXME
7334	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7335      else
7336	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7337      fi
7338      ;;
7339
7340    cygwin* | mingw* | pw32*)
7341      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
7342      # as there is no search path for DLLs.
7343      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7344      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7345      _LT_AC_TAGVAR(always_export_symbols, $1)=no
7346      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7347      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
7348
7349      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
7350        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7351	# If the export-symbols file already is a .def file (1st line
7352	# is EXPORTS), use it as is; otherwise, prepend...
7353	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
7354	  cp $export_symbols $output_objdir/$soname.def;
7355	else
7356	  echo EXPORTS > $output_objdir/$soname.def;
7357	  cat $export_symbols >> $output_objdir/$soname.def;
7358	fi~
7359	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
7360      else
7361	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7362      fi
7363      ;;
7364
7365    interix[[3-9]]*)
7366      _LT_AC_TAGVAR(hardcode_direct, $1)=no
7367      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7368      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7369      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7370      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
7371      # Instead, shared libraries are loaded at an image base (0x10000000 by
7372      # default) and relocated if they conflict, which is a slow very memory
7373      # consuming and fragmenting process.  To avoid this, we pick a random,
7374      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
7375      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
7376      _LT_AC_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'
7377      _LT_AC_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'
7378      ;;
7379
7380    gnu* | linux* | k*bsd*-gnu)
7381      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7382	tmp_addflag=
7383	case $cc_basename,$host_cpu in
7384	pgcc*)				# Portland Group C compiler
7385	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
7386	  tmp_addflag=' $pic_flag'
7387	  ;;
7388	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
7389	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
7390	  tmp_addflag=' $pic_flag -Mnomain' ;;
7391	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
7392	  tmp_addflag=' -i_dynamic' ;;
7393	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
7394	  tmp_addflag=' -i_dynamic -nofor_main' ;;
7395	ifc* | ifort*)			# Intel Fortran compiler
7396	  tmp_addflag=' -nofor_main' ;;
7397	esac
7398	case `$CC -V 2>&1 | sed 5q` in
7399	*Sun\ C*)			# Sun C 5.9
7400	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
7401	  tmp_sharedflag='-G' ;;
7402	*Sun\ F*)			# Sun Fortran 8.3
7403	  tmp_sharedflag='-G' ;;
7404	*)
7405	  tmp_sharedflag='-shared' ;;
7406	esac
7407	_LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7408
7409	if test $supports_anon_versioning = yes; then
7410	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
7411  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
7412  $echo "local: *; };" >> $output_objdir/$libname.ver~
7413	  $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
7414	fi
7415      else
7416	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7417      fi
7418      ;;
7419
7420    netbsd*)
7421      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7422	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
7423	wlarc=
7424      else
7425	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7426	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7427      fi
7428      ;;
7429
7430    solaris*)
7431      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
7432	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7433	cat <<EOF 1>&2
7434
7435*** Warning: The releases 2.8.* of the GNU linker cannot reliably
7436*** create shared libraries on Solaris systems.  Therefore, libtool
7437*** is disabling shared libraries support.  We urge you to upgrade GNU
7438*** binutils to release 2.9.1 or newer.  Another option is to modify
7439*** your PATH or compiler configuration so that the native linker is
7440*** used, and then restart.
7441
7442EOF
7443      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7444	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7445	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7446      else
7447	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7448      fi
7449      ;;
7450
7451    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
7452      case `$LD -v 2>&1` in
7453        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
7454	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7455	cat <<_LT_EOF 1>&2
7456
7457*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
7458*** reliably create shared libraries on SCO systems.  Therefore, libtool
7459*** is disabling shared libraries support.  We urge you to upgrade GNU
7460*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
7461*** your PATH or compiler configuration so that the native linker is
7462*** used, and then restart.
7463
7464_LT_EOF
7465	;;
7466	*)
7467	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7468	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
7469	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
7470	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
7471	  else
7472	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
7473	  fi
7474	;;
7475      esac
7476      ;;
7477
7478    sunos4*)
7479      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7480      wlarc=
7481      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7482      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7483      ;;
7484
7485    *)
7486      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
7487	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
7488	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
7489      else
7490	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7491      fi
7492      ;;
7493    esac
7494
7495    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
7496      runpath_var=
7497      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
7498      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
7499      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
7500    fi
7501  else
7502    # PORTME fill in a description of your system's linker (not GNU ld)
7503    case $host_os in
7504    aix3*)
7505      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7506      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
7507      _LT_AC_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'
7508      # Note: this linker hardcodes the directories in LIBPATH if there
7509      # are no directories specified by -L.
7510      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7511      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
7512	# Neither direct hardcoding nor static linking is supported with a
7513	# broken collect2.
7514	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
7515      fi
7516      ;;
7517
7518    aix[[4-9]]*)
7519      if test "$host_cpu" = ia64; then
7520	# On IA64, the linker does run time linking by default, so we don't
7521	# have to do anything special.
7522	aix_use_runtimelinking=no
7523	exp_sym_flag='-Bexport'
7524	no_entry_flag=""
7525      else
7526	# If we're using GNU nm, then we don't want the "-C" option.
7527	# -C means demangle to AIX nm, but means don't demangle with GNU nm
7528	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
7529	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
7530	else
7531	  _LT_AC_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'
7532	fi
7533	aix_use_runtimelinking=no
7534
7535	# Test if we are trying to use run time linking or normal
7536	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
7537	# need to do runtime linking.
7538	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
7539	  for ld_flag in $LDFLAGS; do
7540  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
7541  	    aix_use_runtimelinking=yes
7542  	    break
7543  	  fi
7544	  done
7545	  ;;
7546	esac
7547
7548	exp_sym_flag='-bexport'
7549	no_entry_flag='-bnoentry'
7550      fi
7551
7552      # When large executables or shared objects are built, AIX ld can
7553      # have problems creating the table of contents.  If linking a library
7554      # or program results in "error TOC overflow" add -mminimal-toc to
7555      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
7556      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7557
7558      _LT_AC_TAGVAR(archive_cmds, $1)=''
7559      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7560      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
7561      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7562
7563      if test "$GCC" = yes; then
7564	case $host_os in aix4.[[012]]|aix4.[[012]].*)
7565	# We only want to do this on AIX 4.2 and lower, the check
7566	# below for broken collect2 doesn't work under 4.3+
7567	  collect2name=`${CC} -print-prog-name=collect2`
7568	  if test -f "$collect2name" && \
7569  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
7570	  then
7571  	  # We have reworked collect2
7572  	  :
7573	  else
7574  	  # We have old collect2
7575  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
7576  	  # It fails to find uninstalled libraries when the uninstalled
7577  	  # path is not listed in the libpath.  Setting hardcode_minus_L
7578  	  # to unsupported forces relinking
7579  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7580  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7581  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
7582	  fi
7583	  ;;
7584	esac
7585	shared_flag='-shared'
7586	if test "$aix_use_runtimelinking" = yes; then
7587	  shared_flag="$shared_flag "'${wl}-G'
7588	fi
7589      else
7590	# not using gcc
7591	if test "$host_cpu" = ia64; then
7592  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
7593  	# chokes on -Wl,-G. The following line is correct:
7594	  shared_flag='-G'
7595	else
7596	  if test "$aix_use_runtimelinking" = yes; then
7597	    shared_flag='${wl}-G'
7598	  else
7599	    shared_flag='${wl}-bM:SRE'
7600	  fi
7601	fi
7602      fi
7603
7604      # It seems that -bexpall does not export symbols beginning with
7605      # underscore (_), so it is better to generate a list of symbols to export.
7606      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
7607      if test "$aix_use_runtimelinking" = yes; then
7608	# Warning - without using the other runtime loading flags (-brtl),
7609	# -berok will link without error, but may produce a broken library.
7610	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
7611       # Determine the default libpath from the value encoded in an empty executable.
7612       _LT_AC_SYS_LIBPATH_AIX
7613       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7614	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
7615       else
7616	if test "$host_cpu" = ia64; then
7617	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
7618	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
7619	  _LT_AC_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"
7620	else
7621	 # Determine the default libpath from the value encoded in an empty executable.
7622	 _LT_AC_SYS_LIBPATH_AIX
7623	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7624	  # Warning - without using the other run time loading flags,
7625	  # -berok will link without error, but may produce a broken library.
7626	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
7627	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
7628	  # Exported symbols can be pulled into shared objects from archives
7629	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
7630	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
7631	  # This is similar to how AIX traditionally builds its shared libraries.
7632	  _LT_AC_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'
7633	fi
7634      fi
7635      ;;
7636
7637    amigaos*)
7638      _LT_AC_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)'
7639      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7640      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7641      # see comment about different semantics on the GNU ld section
7642      _LT_AC_TAGVAR(ld_shlibs, $1)=no
7643      ;;
7644
7645    bsdi[[45]]*)
7646      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
7647      ;;
7648
7649    cygwin* | mingw* | pw32*)
7650      # When not using gcc, we currently assume that we are using
7651      # Microsoft Visual C++.
7652      # hardcode_libdir_flag_spec is actually meaningless, as there is
7653      # no search path for DLLs.
7654      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
7655      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7656      # Tell ltmain to make .lib files, not .a files.
7657      libext=lib
7658      # Tell ltmain to make .dll files, not .so files.
7659      shrext_cmds=".dll"
7660      # FIXME: Setting linknames here is a bad hack.
7661      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
7662      # The linker will automatically build a .lib file if we build a DLL.
7663      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
7664      # FIXME: Should let the user specify the lib program.
7665      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
7666      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
7667      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
7668      ;;
7669
7670    darwin* | rhapsody*)
7671      case $host_os in
7672        rhapsody* | darwin1.[[012]])
7673         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
7674         ;;
7675       *) # Darwin 1.3 on
7676         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
7677           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
7678         else
7679           case ${MACOSX_DEPLOYMENT_TARGET} in
7680             10.[[012]])
7681               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
7682               ;;
7683             10.*)
7684               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
7685               ;;
7686           esac
7687         fi
7688         ;;
7689      esac
7690      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
7691      _LT_AC_TAGVAR(hardcode_direct, $1)=no
7692      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
7693      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
7694      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
7695      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7696    if test "$GCC" = yes ; then
7697    	output_verbose_link_cmd='echo'
7698        _LT_AC_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}"
7699        _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
7700        _LT_AC_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}"
7701        _LT_AC_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}"
7702    else
7703      case $cc_basename in
7704        xlc*)
7705         output_verbose_link_cmd='echo'
7706         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
7707         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
7708          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
7709         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7710          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
7711          ;;
7712       *)
7713         _LT_AC_TAGVAR(ld_shlibs, $1)=no
7714          ;;
7715      esac
7716    fi
7717      ;;
7718
7719    dgux*)
7720      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7721      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7722      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7723      ;;
7724
7725    freebsd1*)
7726      _LT_AC_TAGVAR(ld_shlibs, $1)=no
7727      ;;
7728
7729    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
7730    # support.  Future versions do this automatically, but an explicit c++rt0.o
7731    # does not break anything, and helps significantly (at the cost of a little
7732    # extra space).
7733    freebsd2.2*)
7734      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
7735      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7736      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7737      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7738      ;;
7739
7740    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
7741    freebsd2*)
7742      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7743      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7744      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7745      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7746      ;;
7747
7748    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
7749    freebsd* | dragonfly*)
7750      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
7751      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7752      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7753      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7754      ;;
7755
7756    hpux9*)
7757      if test "$GCC" = yes; then
7758	_LT_AC_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'
7759      else
7760	_LT_AC_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'
7761      fi
7762      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7763      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7764      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7765
7766      # hardcode_minus_L: Not really in the search PATH,
7767      # but as the default location of the library.
7768      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7769      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7770      ;;
7771
7772    hpux10*)
7773      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
7774	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7775      else
7776	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
7777      fi
7778      if test "$with_gnu_ld" = no; then
7779	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7780	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7781
7782	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7783	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7784
7785	# hardcode_minus_L: Not really in the search PATH,
7786	# but as the default location of the library.
7787	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7788      fi
7789      ;;
7790
7791    hpux11*)
7792      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
7793	case $host_cpu in
7794	hppa*64*)
7795	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7796	  ;;
7797	ia64*)
7798	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7799	  ;;
7800	*)
7801	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7802	  ;;
7803	esac
7804      else
7805	case $host_cpu in
7806	hppa*64*)
7807	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7808	  ;;
7809	ia64*)
7810	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
7811	  ;;
7812	*)
7813	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
7814	  ;;
7815	esac
7816      fi
7817      if test "$with_gnu_ld" = no; then
7818	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
7819	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7820
7821	case $host_cpu in
7822	hppa*64*|ia64*)
7823	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
7824	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
7825	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7826	  ;;
7827	*)
7828	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7829	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7830
7831	  # hardcode_minus_L: Not really in the search PATH,
7832	  # but as the default location of the library.
7833	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7834	  ;;
7835	esac
7836      fi
7837      ;;
7838
7839    irix5* | irix6* | nonstopux*)
7840      if test "$GCC" = yes; then
7841	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7842      else
7843	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
7844	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
7845      fi
7846      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7847      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7848      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7849      ;;
7850
7851    netbsd*)
7852      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
7853	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
7854      else
7855	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
7856      fi
7857      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7858      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7859      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7860      ;;
7861
7862    newsos6)
7863      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7864      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7865      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7866      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7867      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7868      ;;
7869
7870    openbsd*)
7871      if test -f /usr/libexec/ld.so; then
7872	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
7873	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7874	if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
7875	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7876	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
7877	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7878	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
7879	else
7880	  case $host_os in
7881	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
7882	     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
7883	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7884	     ;;
7885	   *)
7886	     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
7887	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
7888	     ;;
7889	  esac
7890        fi
7891      else
7892	_LT_AC_TAGVAR(ld_shlibs, $1)=no
7893      fi
7894      ;;
7895
7896    os2*)
7897      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7898      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7899      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
7900      _LT_AC_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'
7901      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
7902      ;;
7903
7904    osf3*)
7905      if test "$GCC" = yes; then
7906	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7907	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7908      else
7909	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7910	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
7911      fi
7912      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7913      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7914      ;;
7915
7916    osf4* | osf5*)	# as osf3* with the addition of -msym flag
7917      if test "$GCC" = yes; then
7918	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
7919	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
7920	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
7921      else
7922	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
7923	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
7924	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
7925	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
7926
7927	# Both c and cxx compiler support -rpath directly
7928	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
7929      fi
7930      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
7931      ;;
7932
7933    solaris*)
7934      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
7935      if test "$GCC" = yes; then
7936	wlarc='${wl}'
7937	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
7938	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7939	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
7940      else
7941	wlarc=''
7942	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
7943	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
7944  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
7945      fi
7946      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
7947      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7948      case $host_os in
7949      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
7950      *)
7951	# The compiler driver will combine and reorder linker options,
7952	# but understands `-z linker_flag'.  GCC discards it without `$wl',
7953	# but is careful enough not to reorder.
7954 	# Supported since Solaris 2.6 (maybe 2.5.1?)
7955	if test "$GCC" = yes; then
7956	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
7957	else
7958	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
7959	fi
7960	;;
7961      esac
7962      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
7963      ;;
7964
7965    sunos4*)
7966      if test "x$host_vendor" = xsequent; then
7967	# Use $CC to link under sequent, because it throws in some extra .o
7968	# files that make .init and .fini sections work.
7969	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
7970      else
7971	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
7972      fi
7973      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
7974      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
7975      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
7976      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7977      ;;
7978
7979    sysv4)
7980      case $host_vendor in
7981	sni)
7982	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7983	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
7984	;;
7985	siemens)
7986	  ## LD is ld it makes a PLAMLIB
7987	  ## CC just makes a GrossModule.
7988	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
7989	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
7990	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
7991        ;;
7992	motorola)
7993	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
7994	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
7995	;;
7996      esac
7997      runpath_var='LD_RUN_PATH'
7998      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
7999      ;;
8000
8001    sysv4.3*)
8002      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8003      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8004      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
8005      ;;
8006
8007    sysv4*MP*)
8008      if test -d /usr/nec; then
8009	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8010	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8011	runpath_var=LD_RUN_PATH
8012	hardcode_runpath_var=yes
8013	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
8014      fi
8015      ;;
8016
8017    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
8018      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8019      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8020      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8021      runpath_var='LD_RUN_PATH'
8022
8023      if test "$GCC" = yes; then
8024	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8025	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8026      else
8027	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8028	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
8029      fi
8030      ;;
8031
8032    sysv5* | sco3.2v5* | sco5v6*)
8033      # Note: We can NOT use -z defs as we might desire, because we do not
8034      # link with -lc, and that would cause any symbols used from libc to
8035      # always be unresolved, which means just about no library would
8036      # ever link correctly.  If we're not using GNU ld we use -z text
8037      # though, which does catch some bad symbols but isn't as heavy-handed
8038      # as -z defs.
8039      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
8040      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
8041      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8042      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8043      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
8044      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
8045      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
8046      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
8047      runpath_var='LD_RUN_PATH'
8048
8049      if test "$GCC" = yes; then
8050	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
8051	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
8052      else
8053	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
8054	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
8055      fi
8056      ;;
8057
8058    uts4*)
8059      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
8060      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
8061      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
8062      ;;
8063
8064    *)
8065      _LT_AC_TAGVAR(ld_shlibs, $1)=no
8066      ;;
8067    esac
8068  fi
8069])
8070AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
8071test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
8072
8073#
8074# Do we need to explicitly link libc?
8075#
8076case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
8077x|xyes)
8078  # Assume -lc should be added
8079  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8080
8081  if test "$enable_shared" = yes && test "$GCC" = yes; then
8082    case $_LT_AC_TAGVAR(archive_cmds, $1) in
8083    *'~'*)
8084      # FIXME: we may have to deal with multi-command sequences.
8085      ;;
8086    '$CC '*)
8087      # Test whether the compiler implicitly links with -lc since on some
8088      # systems, -lgcc has to come before -lc. If gcc already passes -lc
8089      # to ld, don't add -lc before -lgcc.
8090      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
8091      $rm conftest*
8092      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
8093
8094      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
8095        soname=conftest
8096        lib=conftest
8097        libobjs=conftest.$ac_objext
8098        deplibs=
8099        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
8100	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
8101        compiler_flags=-v
8102        linker_flags=-v
8103        verstring=
8104        output_objdir=.
8105        libname=conftest
8106        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
8107        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
8108        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
8109        then
8110	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
8111        else
8112	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
8113        fi
8114        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
8115      else
8116        cat conftest.err 1>&5
8117      fi
8118      $rm conftest*
8119      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
8120      ;;
8121    esac
8122  fi
8123  ;;
8124esac
8125])# AC_LIBTOOL_PROG_LD_SHLIBS
8126
8127
8128# _LT_AC_FILE_LTDLL_C
8129# -------------------
8130# Be careful that the start marker always follows a newline.
8131AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
8132# /* ltdll.c starts here */
8133# #define WIN32_LEAN_AND_MEAN
8134# #include <windows.h>
8135# #undef WIN32_LEAN_AND_MEAN
8136# #include <stdio.h>
8137#
8138# #ifndef __CYGWIN__
8139# #  ifdef __CYGWIN32__
8140# #    define __CYGWIN__ __CYGWIN32__
8141# #  endif
8142# #endif
8143#
8144# #ifdef __cplusplus
8145# extern "C" {
8146# #endif
8147# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
8148# #ifdef __cplusplus
8149# }
8150# #endif
8151#
8152# #ifdef __CYGWIN__
8153# #include <cygwin/cygwin_dll.h>
8154# DECLARE_CYGWIN_DLL( DllMain );
8155# #endif
8156# HINSTANCE __hDllInstance_base;
8157#
8158# BOOL APIENTRY
8159# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
8160# {
8161#   __hDllInstance_base = hInst;
8162#   return TRUE;
8163# }
8164# /* ltdll.c ends here */
8165])# _LT_AC_FILE_LTDLL_C
8166
8167
8168# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
8169# ---------------------------------
8170AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
8171
8172
8173# old names
8174AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
8175AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
8176AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
8177AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
8178AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
8179AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
8180AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
8181
8182# This is just to silence aclocal about the macro not being used
8183ifelse([AC_DISABLE_FAST_INSTALL])
8184
8185AC_DEFUN([LT_AC_PROG_GCJ],
8186[AC_CHECK_TOOL(GCJ, gcj, no)
8187  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
8188  AC_SUBST(GCJFLAGS)
8189])
8190
8191AC_DEFUN([LT_AC_PROG_RC],
8192[AC_CHECK_TOOL(RC, windres, no)
8193])
8194
8195
8196# Cheap backport of AS_EXECUTABLE_P and required macros
8197# from Autoconf 2.59; we should not use $as_executable_p directly.
8198
8199# _AS_TEST_PREPARE
8200# ----------------
8201m4_ifndef([_AS_TEST_PREPARE],
8202[m4_defun([_AS_TEST_PREPARE],
8203[if test -x / >/dev/null 2>&1; then
8204  as_executable_p='test -x'
8205else
8206  as_executable_p='test -f'
8207fi
8208])])# _AS_TEST_PREPARE
8209
8210# AS_EXECUTABLE_P
8211# ---------------
8212# Check whether a file is executable.
8213m4_ifndef([AS_EXECUTABLE_P],
8214[m4_defun([AS_EXECUTABLE_P],
8215[AS_REQUIRE([_AS_TEST_PREPARE])dnl
8216$as_executable_p $1[]dnl
8217])])# AS_EXECUTABLE_P
8218
8219# NOTE: This macro has been submitted for inclusion into   #
8220#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
8221#  a released version of Autoconf we should remove this    #
8222#  macro and use it instead.                               #
8223# LT_AC_PROG_SED
8224# --------------
8225# Check for a fully-functional sed program, that truncates
8226# as few characters as possible.  Prefer GNU sed if found.
8227AC_DEFUN([LT_AC_PROG_SED],
8228[AC_MSG_CHECKING([for a sed that does not truncate output])
8229AC_CACHE_VAL(lt_cv_path_SED,
8230[# Loop through the user's path and test for sed and gsed.
8231# Then use that list of sed's as ones to test for truncation.
8232as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8233for as_dir in $PATH
8234do
8235  IFS=$as_save_IFS
8236  test -z "$as_dir" && as_dir=.
8237  for lt_ac_prog in sed gsed; do
8238    for ac_exec_ext in '' $ac_executable_extensions; do
8239      if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
8240        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
8241      fi
8242    done
8243  done
8244done
8245IFS=$as_save_IFS
8246lt_ac_max=0
8247lt_ac_count=0
8248# Add /usr/xpg4/bin/sed as it is typically found on Solaris
8249# along with /bin/sed that truncates output.
8250for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
8251  test ! -f $lt_ac_sed && continue
8252  cat /dev/null > conftest.in
8253  lt_ac_count=0
8254  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
8255  # Check for GNU sed and select it if it is found.
8256  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
8257    lt_cv_path_SED=$lt_ac_sed
8258    break
8259  fi
8260  while true; do
8261    cat conftest.in conftest.in >conftest.tmp
8262    mv conftest.tmp conftest.in
8263    cp conftest.in conftest.nl
8264    echo >>conftest.nl
8265    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
8266    cmp -s conftest.out conftest.nl || break
8267    # 10000 chars as input seems more than enough
8268    test $lt_ac_count -gt 10 && break
8269    lt_ac_count=`expr $lt_ac_count + 1`
8270    if test $lt_ac_count -gt $lt_ac_max; then
8271      lt_ac_max=$lt_ac_count
8272      lt_cv_path_SED=$lt_ac_sed
8273    fi
8274  done
8275done
8276])
8277SED=$lt_cv_path_SED
8278AC_SUBST([SED])
8279AC_MSG_RESULT([$SED])
8280])
8281
8282# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
8283# 
8284# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
8285#
8286# This program is free software; you can redistribute it and/or modify
8287# it under the terms of the GNU General Public License as published by
8288# the Free Software Foundation; either version 2 of the License, or
8289# (at your option) any later version.
8290#
8291# This program is distributed in the hope that it will be useful, but
8292# WITHOUT ANY WARRANTY; without even the implied warranty of
8293# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
8294# General Public License for more details.
8295#
8296# You should have received a copy of the GNU General Public License
8297# along with this program; if not, write to the Free Software
8298# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8299#
8300# As a special exception to the GNU General Public License, if you
8301# distribute this file as part of a program that contains a
8302# configuration script generated by Autoconf, you may include it under
8303# the same distribution terms that you use for the rest of that program.
8304
8305# PKG_PROG_PKG_CONFIG([MIN-VERSION])
8306# ----------------------------------
8307AC_DEFUN([PKG_PROG_PKG_CONFIG],
8308[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
8309m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
8310AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
8311if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8312	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
8313fi
8314if test -n "$PKG_CONFIG"; then
8315	_pkg_min_version=m4_default([$1], [0.9.0])
8316	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
8317	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8318		AC_MSG_RESULT([yes])
8319	else
8320		AC_MSG_RESULT([no])
8321		PKG_CONFIG=""
8322	fi
8323		
8324fi[]dnl
8325])# PKG_PROG_PKG_CONFIG
8326
8327# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
8328#
8329# Check to see whether a particular set of modules exists.  Similar
8330# to PKG_CHECK_MODULES(), but does not set variables or print errors.
8331#
8332#
8333# Similar to PKG_CHECK_MODULES, make sure that the first instance of
8334# this or PKG_CHECK_MODULES is called, or make sure to call
8335# PKG_CHECK_EXISTS manually
8336# --------------------------------------------------------------
8337AC_DEFUN([PKG_CHECK_EXISTS],
8338[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8339if test -n "$PKG_CONFIG" && \
8340    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
8341  m4_ifval([$2], [$2], [:])
8342m4_ifvaln([$3], [else
8343  $3])dnl
8344fi])
8345
8346
8347# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
8348# ---------------------------------------------
8349m4_define([_PKG_CONFIG],
8350[if test -n "$$1"; then
8351    pkg_cv_[]$1="$$1"
8352 elif test -n "$PKG_CONFIG"; then
8353    PKG_CHECK_EXISTS([$3],
8354                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
8355		     [pkg_failed=yes])
8356 else
8357    pkg_failed=untried
8358fi[]dnl
8359])# _PKG_CONFIG
8360
8361# _PKG_SHORT_ERRORS_SUPPORTED
8362# -----------------------------
8363AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
8364[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
8365if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8366        _pkg_short_errors_supported=yes
8367else
8368        _pkg_short_errors_supported=no
8369fi[]dnl
8370])# _PKG_SHORT_ERRORS_SUPPORTED
8371
8372
8373# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
8374# [ACTION-IF-NOT-FOUND])
8375#
8376#
8377# Note that if there is a possibility the first call to
8378# PKG_CHECK_MODULES might not happen, you should be sure to include an
8379# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
8380#
8381#
8382# --------------------------------------------------------------
8383AC_DEFUN([PKG_CHECK_MODULES],
8384[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
8385AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
8386AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
8387
8388pkg_failed=no
8389AC_MSG_CHECKING([for $1])
8390
8391_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
8392_PKG_CONFIG([$1][_LIBS], [libs], [$2])
8393
8394m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
8395and $1[]_LIBS to avoid the need to call pkg-config.
8396See the pkg-config man page for more details.])
8397
8398if test $pkg_failed = yes; then
8399        _PKG_SHORT_ERRORS_SUPPORTED
8400        if test $_pkg_short_errors_supported = yes; then
8401	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
8402        else 
8403	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
8404        fi
8405	# Put the nasty error message in config.log where it belongs
8406	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
8407
8408	ifelse([$4], , [AC_MSG_ERROR(dnl
8409[Package requirements ($2) were not met:
8410
8411$$1_PKG_ERRORS
8412
8413Consider adjusting the PKG_CONFIG_PATH environment variable if you
8414installed software in a non-standard prefix.
8415
8416_PKG_TEXT
8417])],
8418		[AC_MSG_RESULT([no])
8419                $4])
8420elif test $pkg_failed = untried; then
8421	ifelse([$4], , [AC_MSG_FAILURE(dnl
8422[The pkg-config script could not be found or is too old.  Make sure it
8423is in your PATH or set the PKG_CONFIG environment variable to the full
8424path to pkg-config.
8425
8426_PKG_TEXT
8427
8428To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
8429		[$4])
8430else
8431	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
8432	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
8433        AC_MSG_RESULT([yes])
8434	ifelse([$3], , :, [$3])
8435fi[]dnl
8436])# PKG_CHECK_MODULES
8437
8438m4_include([acinclude.m4])
8439