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