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