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